Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ 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

The first message is just a warning, you should always use apachectl to start/stop/restart apache.

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

share|improve this answer

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.