Jump to content
callisto

Does it work on PHP 5.6?

Recommended Posts

callisto

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

Share this post


Link to post
Share on other sites
Robert

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;
}

?>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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