Windows Server 2000/2003 Thread, PHP problems after server reboot in Technical; Hi there,
I've been trying to make LDAP work with PHP on our Windows Server 2003 web server - to ...
-
26th July 2012, 02:21 PM #1 PHP problems after server reboot
Hi there,
I've been trying to make LDAP work with PHP on our Windows Server 2003 web server - to do so I was instructed (by online instructions) to make a tiny change in the PHP.ini file, which I did. I was then advised to reboot the server, which I also did....here the problem arises:
Since rebooting the server, no PHP pages are loading. I can access HTML pages alright, but if there is any heavy use of PHP, it throws a HTTP 500 error. I say HEAVY use of PHP because a simple test.php file (saved to the same folder as the other pages which will not load) will work just fine - thought it only contains the <?php phpnifo() ?> command and a simple 'echo HELLO WORLD'.
So I undid the change I made to the PHP.ini and re-reboot the server, but still no luck. I even rolled back the system to a couple of days before I started playing around (using our BackupExec software)...BackupExec wanted me to reboot the server in order for the restore to take effect, so I did....but still no PHP!
The common theme here seems to be rebooting the server - is there something which needs to be kicked off upon rebooting? I've checked the running services and everythink seems hunky dorey. Apache Tomcat is running automatically (which it MUST be because my simple PHP test page worked okay)....just nothing useful!!
Does anybody have any suggestions?
Pretty please?
-
-
IDG Tech News
-
26th July 2012, 02:42 PM #2
- Rep Power
- 2
Does your simple php info page work?
I have not had much experience running php on windows but have loads running on Linux...LAMP server
-
-
26th July 2012, 02:46 PM #3 Thanks for such a quick reply! Yes the simple PHP page works - the phpinfo() command pumps out all the appropriate PHP information, which must mean PHP is up and running. But our main school website (www.lytchett.org.uk) is still falling over. I'm trying to look at the log file now, but it's >900MB so it's a tad slow!
-
-
26th July 2012, 03:11 PM #4
- Rep Power
- 2
have you ever used an app called mTail?
Its the same as tail in Linux...point it at the log and it will pump the latest entries going to the log, then you can refresh the page and see what is being created in the log
here you go if your interested
http://ophilipp.free.fr/op_tail.htm
Last edited by rodent43; 26th July 2012 at 03:12 PM.
Reason: adding link
-
-
26th July 2012, 03:18 PM #5 Thanks buddy - I've managed to look at the log file now. It is vast. Scrolling down to whereabouts I think it all started going wrong, it seems I'm seeing a lot of "PHP Fatal error: Call to undefined function mysql_connect()" error messages - which is a point because the4 majority of our website is using PHP to talk MySQL. So perhaps the SQL server needs a reboot too?
I'm thinking SQL could be involved in this horrid scenario somewhere along the line!
-
-
26th July 2012, 03:32 PM #6
- Rep Power
- 2
mysql_connect would indeed be the connection to mysql database...so I would check to see if it running
using mTail or looking through logs you can find most point at which php is falling over
-
-
26th July 2012, 03:35 PM #7
- Rep Power
- 2
also make sure php has mysql set in the php.ini...when you run your phpinfo page does it contain the mysql settings?
-
-
26th July 2012, 04:15 PM #8
- Rep Power
- 2
-
-
27th July 2012, 02:42 PM #9 Hey, thanks for helping out with this. I do have the php_mysql.dll extension uncommented in the PHP.ini file. Looking through the logs, I'm fairly sure it's mySql that's the issue. If I load phpMyAdmin (our SQL monitoring software) I get the following error message: "phpMyAdmin - Error. Cannot load mysql extension. Please check you PHP configuration".
My phpinfo() output does not have a section on mysql. It must have done at some point because up until now I was running all sorts of SQL commands (successfully).
No joy as yet I'm afraid! So far I've clocked up 20+ hours in 3 days trying to fix this!
-
-
27th July 2012, 03:41 PM #10
- Rep Power
- 2

Originally Posted by
powert
My phpinfo() output does not have a section on mysql. It must have done at some point because up until now I was running all sorts of SQL commands (successfully).
!
Interesting...I would of thought you would find a whole block for mysql...the first part of the block with
MySQL Support enabled
it sound to me that php is not loading the mysql externsion...phpmyadmin is a great piece of kit for admin of MySQL...but it will fail to connect if your php is not running mysql extension
I google windows php install to see how the dll are stored and post back asasp
-
-
27th July 2012, 04:02 PM #11
- Rep Power
- 2
Can you check something for me please...
in your php.ini is the following uncommented to
php_mysqli.dll
having a quick look most sites suggest mysql is enabled by default
-
-
30th July 2012, 09:07 AM #12 Hi, I've been away from work all weekend. Just came in this morning to see you post - I checked the php.ini file and for some reason the php_mysqli.dll extension was repeated twice (once commented, once uncommented) - so I have removed the commented one and made sure that the dll file is uncommented...I am very pleased to say it works!!
So thanks so much for your continued assistance with this. One funny thing is that if I put the php.ini file back how it was (i.e. with two instances of php_mysqli.dll, both commented and uncommented) it still works? Very strange...
Either way mySql is up and running and I've you to thank sir.
...Thanks!
-
-
30th July 2012, 09:31 AM #13
- Rep Power
- 2
Not a problem at all...glad you got it all working again 
Not sure I done much really but good stuff...
Have fun
-
-
30th July 2012, 03:17 PM #14 Tip for the future... make a copy of php.ini to php.[date].bak before you make a change in future, then you can just copy & rename it back again and be back up n' running if your edits go pearshaped. Same goes for any/all conf files to do with Apache / MySQL / PHP.
-
Thanks to Marci from:
rodent43 (30th July 2012)
-
30th July 2012, 04:09 PM #15
- Rep Power
- 2

Originally Posted by
Marci
Tip for the future... make a copy of php.ini to php.[date].bak before you make a change in future, then you can just copy & rename it back again and be back up n' running if your edits go pearshaped. Same goes for any/all conf files to do with Apache / MySQL / PHP.
Agreed...I have read of some zend framework mucking up mysql_connect for some reason but I have not used zend really
-
SHARE: 
Similar Threads
-
By techyphil in forum Windows Server 2008
Replies: 5
Last Post: 6th December 2010, 09:32 AM
-
By tosca925 in forum Educational Software
Replies: 3
Last Post: 11th September 2007, 06:53 PM
-
Replies: 6
Last Post: 26th February 2007, 10:21 AM
-
By plexer in forum Windows
Replies: 6
Last Post: 3rd September 2006, 09:23 PM
-
Replies: 2
Last Post: 24th January 2006, 11:25 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules