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.

Yesterday, I was enjoying just messing around with the website code, since I've not touched the actual settings of PHP and Apache since yesterday... (I must say I had the module php_mysql enabled) I made a MySQL connector yesterday and worked perfectly! This morning, I start up the computer and when I try to run Apache, it gives me 'The requested operation has failed'. I look in the apache log and I see this.

[Fri Feb 22 08:07:39 2013] [warn] pid file C:/dev/progs/Apache/Apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

I looked around the internet and found I must delete that file. I tried deleting then restarting but that didn't work.

Then I found that disabling all PHP modules will work. So I went ahead and disabled the php_mysql module (that is the only one enabled).

Then it starts up again! Except I want it to start with MySQL. Then I try to run the connector on my php page. I get this.

[22-Feb-2013 07:59:54] PHP Fatal error:  Call to undefined function mysql_connect() in C:\dev\www\test\index.php on line 48

So I really want mysql to run on PHP, but I don't want mysql to stop me running Apache...

Any help?

(Running Apache/2.0.64 PHP/5.2.17 MySQL5.6 - Win32 Home Premium)

share|improve this question
    
Your dependencies are broken. –  symcbean Feb 22 '13 at 10:00
    
Dependencies? What do you mean? –  KeirDavis Feb 22 '13 at 12:42

1 Answer 1

The first message is just a warning, you should always use apachectl to start/stop/restart apache. http://httpd.apache.org/docs/2.2/programs/apachectl.html

The most common cause of PHP not starting but working fine when the extensions are disabled is due to an incorrect extension path or missing file. You will need to set this in php.ini, then restart apache (using apachectl of course). More than likely the extension_dir in php.ini is not pointing to your dll files, by default it points to ./ from memory.

Instructions on windows extensions from php.net: http://php.net/manual/en/install.windows.extensions.php

share|improve this answer

Your Answer

 
discard

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.