+ Post New Thread
Results 1 to 15 of 15
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 ...
  1. #1
    powert's Avatar
    Join Date
    Oct 2010
    Location
    Dorset
    Posts
    12
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    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?

  2. #2

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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

  3. #3
    powert's Avatar
    Join Date
    Oct 2010
    Location
    Dorset
    Posts
    12
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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!

  4. #4

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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

  5. #5
    powert's Avatar
    Join Date
    Oct 2010
    Location
    Dorset
    Posts
    12
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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!

  6. #6

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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

  7. #7

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    also make sure php has mysql set in the php.ini...when you run your phpinfo page does it contain the mysql settings?

  8. #8

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    Any joy?

  9. #9
    powert's Avatar
    Join Date
    Oct 2010
    Location
    Dorset
    Posts
    12
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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!

  10. #10

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    Quote Originally Posted by powert View Post
    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

  11. #11

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    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

  12. Thanks to rodent43 from:

    powert (30th July 2012)

  13. #12
    powert's Avatar
    Join Date
    Oct 2010
    Location
    Dorset
    Posts
    12
    Thank Post
    3
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    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!

  14. #13

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    Not a problem at all...glad you got it all working again

    Not sure I done much really but good stuff...

    Have fun

  15. #14
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    888
    Thank Post
    84
    Thanked 234 Times in 193 Posts
    Rep Power
    82
    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.

  16. Thanks to Marci from:

    rodent43 (30th July 2012)

  17. #15

    Join Date
    Jul 2012
    Posts
    38
    Thank Post
    11
    Thanked 2 Times in 2 Posts
    Rep Power
    5
    Quote Originally Posted by Marci View Post
    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:
+ Post New Thread

Similar Threads

  1. Windows Server 2008 Continuous Reboot Problem after Update
    By techyphil in forum Windows Server 2008
    Replies: 5
    Last Post: 6th December 2010, 09:32 AM
  2. Sibelius problem after changing the ip address of server.
    By tosca925 in forum Educational Software
    Replies: 3
    Last Post: 11th September 2007, 06:53 PM
  3. Replies: 6
    Last Post: 26th February 2007, 10:21 AM
  4. Offline files problems after server rebuild
    By plexer in forum Windows
    Replies: 6
    Last Post: 3rd September 2006, 09:23 PM
  5. 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
  •