Jump to content
LemmeCheck.Info

Does it work on PHP 5.6?


callisto
 Share

Recommended Posts

Just tried to install the unencoded Arylia PHP 5.3 on PHP 5.6 for a new site, but keep getting the following errors:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /myhomedir/arylia/common/db_connect.inc.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /myhomedir/arylia/common/db_connect.inc.php:3) in /myhomedir/arylia/app/functions.inc.php on line 4

anyone run into the same problem?

Thanks

Link to comment
Share on other sites

Not me, I run the same script in my environments using 5.6.x with no issues at all.

Below is the contents of my own db_connect_inc.php file, if you want to compare. We're on php 5.6.x here.

<?

if(mysql_connect($_APPDATA["cfg"]["db"]["host"], $_APPDATA["cfg"]["db"]["user"], $_APPDATA["cfg"]["db"]["pass"]) && mysql_select_db($_APPDATA["cfg"]["db"]["name"])) {

	if($settingsResult = mysql_query("SELECT * FROM ". TBL_SETTINGS)) {
		$settingsArray = mysql_fetch_assoc($settingsResult);
		
		if(!startsWith("3.", $settingsArray["version"])) {
			if(strpos($_SERVER["REQUEST_URI"], "install") === false) {
				header("Location: install/");
				exit;
			}
		}
		
		foreach($settingsArray as $label => $value) {
			$labelArray = explode("-", $label);
			if(sizeof($labelArray) == 2) $_APPDATA["cfg"][$labelArray[0]][$labelArray[1]] = $value;
			else $_APPDATA["cfg"][$labelArray[0]] = $value;
		}
	} else {
		header("Location: install/");
		exit;
	}
} else {
	header("Location: install/");
	exit;
}

?>

 

Link to comment
Share on other sites

  • 1 month later...
On 9/11/2018 at 6:30 PM, Robert said:

Not me, I run the same script in my environments using 5.6.x with no issues at all.

Below is the contents of my own db_connect_inc.php file, if you want to compare. We're on php 5.6.x here.


<?

if(mysql_connect($_APPDATA["cfg"]["db"]["host"], $_APPDATA["cfg"]["db"]["user"], $_APPDATA["cfg"]["db"]["pass"]) && mysql_select_db($_APPDATA["cfg"]["db"]["name"])) {

	if($settingsResult = mysql_query("SELECT * FROM ". TBL_SETTINGS)) {
		$settingsArray = mysql_fetch_assoc($settingsResult);
		
		if(!startsWith("3.", $settingsArray["version"])) {
			if(strpos($_SERVER["REQUEST_URI"], "install") === false) {
				header("Location: install/");
				exit;
			}
		}
		
		foreach($settingsArray as $label => $value) {
			$labelArray = explode("-", $label);
			if(sizeof($labelArray) == 2) $_APPDATA["cfg"][$labelArray[0]][$labelArray[1]] = $value;
			else $_APPDATA["cfg"][$labelArray[0]] = $value;
		}
	} else {
		header("Location: install/");
		exit;
	}
} else {
	header("Location: install/");
	exit;
}

?>

 

Thanks Robert, but that's identical to what I have, so weird

Link to comment
Share on other sites

  • 5 months later...
On 11/5/2018 at 8:10 PM, callisto said:

Thanks Robert, but that's identical to what I have, so weird

I run PHP 5.6.40 with Arylia 3.2.0.

I have to turn "on" the "short_open_tag" setting on PHP 5.6.40 config file, it came "off" on 5.6.x

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. policies