Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed WAMP because I am attempting to modify an an application which uses Zend Optimizer (I cannot use Z.O. with PHP5.3+, which is why I decided to install WAMP). I downloaded the latest version - Wamp Server 2.1 - which comes bundled with PHP5.3.5. I then downloaded a PHP version that would be compatible with Z.O. - 5.2.9. - and a compatible Apache version, 2.0.63.

My problem: PHP scripts run fine, but anything with MySQL does not work. Running the testmysql.php script returns the fatal error: Fatal error: Call to undefined function mysql_connect() in C:\wamp\www\testmysql.php on line 2".

I have looked in the PHP INI files inside both PHP versions, and I'm fairly sure the relevant information is there. At least, there are parts inside that mention MySQL! Perhaps somebody could clarify exactly what information should be present?

Also, when visiting a page that called phpinfo(), I noticed that the 'Loaded Configuration File' was pointing to C:\wamp\bin\php\php5.3.5\php.ini, even though I have enabled the older PHP version. I've stopped and started Apache, too, and that hasn't made a difference.

Is anybody able to offer any assistance? Anything at all would be great; I'm not very good at messing around with Apache/

share|improve this question

1 Answer 1

I currently don't have Wamp installed, but it always used the php.ini file located in the same folder as the apache bin (ought to be something like c:\wamp\bin\apache2\Apache2xxxx\bin\php.ini)

share|improve this answer
Does this mean I would then have to replace the INI file inside the Apache2... directory every time I change PHP versions? –  Pete171 Aug 25 '11 at 14:51
I'm sure it's not meant to be that way, but it seems like it. Try moving it though to see if the version specific files kick in! –  splitfeed Aug 25 '11 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.