Upgraded Apache and now I get php error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sysop1911
Forum Newbie
Posts: 10
Joined: Fri Aug 28, 2009 1:54 pm

Upgraded Apache and now I get php error

Post by sysop1911 »

I've got PHP 5.2.6 installed in the XAMPP suite on a Windows Server 2003 R2 box. I recently upgraded the Apache version from 2.2.9 to 2.2.13. Apache installed ok, but now when I go to the homepage, I get the following error:

-----------------------------------------------------------------------------------------------------------------
Fatal error: Call to undefined function mysql_escape_string() in D:\ezpublish\lib\ezdb\classes\ezmysqldb.php on line 848
Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.
------------------------------------------------------------------------------------------------------------------

ez Publish is our CMS. Is there something in one of the new Apache DLL that makes "mysql_escape_string()" invalid? On the PHP site it says the following about mysql_escape_string:

--------------------------------------------------------------------------------------------------------------
Warning
This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.
--------------------------------------------------------------------------------------------------------------

Can anyone help me out with this? Can I add or a remove a DLL maybe change the "mysql_escape_string()" to whatever replaces it? Thanks.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Upgraded Apache and now I get php error

Post by Darhazer »

Probably installing new apache you've lost your php.ini file
Check where is the php.ini file (via phpinfo()) and enable the mysql extension in it
sysop1911
Forum Newbie
Posts: 10
Joined: Fri Aug 28, 2009 1:54 pm

Re: Upgraded Apache and now I get php error

Post by sysop1911 »

Okay, I'll take a look at that. Thanks.
sysop1911
Forum Newbie
Posts: 10
Joined: Fri Aug 28, 2009 1:54 pm

Re: Upgraded Apache and now I get php error

Post by sysop1911 »

I checked and the php.ini file and the "extension=php_mysql.dll" is there and it's not commented out, so that's not the problem.
Post Reply