Connect to mysql don't work with @Infinity

Hi Mr/Ms @Infinity
I use bellow source. but it’s seam don’t work
can you share me advices

<? if(!session_id()); session_start(); $hostname= "localhost"; $username= "id11394882_shop"; $password = "shop1234"; $database = "id11394882_shop"; $visitorTimeout = 900; //=15 * 60 $MAXPAGE = 10; $multiLanguage = 1;//0 : single ; 1 : multi $arrLanguage = array( array('vn','Việt Nam'), array('en','English') ); conectionstring i use: <? $conn = @mysql_connect($hostname, $username, $password) or die("Không thể kết nối cơ sở dữ liệu !"); mysql_select_db($database); mysql_query("SET NAMES 'utf8'");

Forgotten to include your URL.

I’m testing with this link
https://testbanhang2019.000webhostapp.com
I tried changing to several different server databases but it didn’t work
I have done it successfully many times with MATBAO Hosting with this source code, but not at the moment

Not sure what the issue is.

I can see your database id11394882_shop and id11394882_wp_404f02891928b7b083c8b5b2dfb5212f are both working absolutely fine :slight_smile:

Your hostname / server name is always localhost

You can only use your databases on our hosting via our phpMyAdmin or using scripts hosted on your 000webhost account.

You cannot use our databases for REMOTEMYSQL or management outside of the 000webhost network :slight_smile:

I modify turn back server 000webhost finish
Can you help me check it

I’ve enabled errors to show on your website and it appears there is a few?

What PHP version does this run on normally?

Last time, it work normaly with php version 4.1.0.

1 Like

That’ll be the reason then the minimum we support is 5.4, your version of 4.1 is well and truly outdated.

I will try with another source code
Thank you so much for support

1 Like

As reference, mysql_* pack has been deprecated as of PHP 5.* and removed as of PHP 7.0

We recommend you to use mysqli_* or PDO instead.