Link to home
Start Free TrialLog in
Avatar of gman
gman

asked on

Getting error 500 after php update

Hello,

So i updated PHP from 5.4.20 to 5.4.35, this is on a windows box so i basically replaced all the old php files with the new ones as advised. I ensured the ini file remained untouched. The location hasn't changed either.

The webpage no longer loads, just a blank page. Looking in the error log for apache it states error 500.

Not really sure were else to look for trouble shooting so any help would be great. It's only on a test env so no big rush,
 

Thanks.
Avatar of Gary
Gary
Flag of Ireland image

Add error reporting to the top of your php pages, you can't debug a 500 error - it just means something went wrong somewhere but we're not telling you.

<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);

Open in new window

A missing extension can cause that.  Check your 'php.ini' against the extensions in your 'ext' directory and make sure that they are all there.  Things like this is why I save the old PHP directory when I 'upgrade' my PHP on Windows.
Avatar of gman
gman

ASKER

I'm getting this in the error log.

PHP Fatal error:  Call to undefined function mysql_connect() in D:apache2\\htdocs\\core\\adodb\\drivers\\adodb-mysql.inc.php on line 364

Any idea's on how to fix this? Seems to be related to the php_mysql extension

thanks,
Could be a number of things, use phpinfo() to verify MySQL is installed
Chances are the paths to MySQL in the .ini file are not correct.

p.s.
You shouldn't be using the old mysql library anymore, it is deprecated
Avatar of gman

ASKER

Thanks Gary but thats not the issue, php.ini file wasn't wasn't replaced. I tried replacing the mysql ext dll file with the old one (one from the version i upgraded with) The system now seems functional however when I run php -v I get a compatibility warning.  Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gman

ASKER

Spot on, re-downloaded it. All working!