Cannot run PHP scripts anymore

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I had been running PHP script successfully for a year or so with WAMP but yesterday i noticed that scripts were not opening/running. When I go to http://localhost, the page just keeps on loadingindefinitely. Of course, there is no errors in the scripts.

I tried:

  • Re-starting All Services
  • Re-installing WAMP
  • Even tried easyphp (similar to wamp)
  • uninstalled the suspicious softwares

When I tried telnet localhost 80, it says "Connecting to localhost..." but it never connects.

Interesting:

Am able to run script inside PHP Designer (the editor for PHP) but not on browser using WAMP as said before.

OS: XP SP2 with Avira Antivirus

Update: Here is my Apache log, but I can't figure out what it says:

[Wed Feb 17 10:27:35 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Feb 17 10:27:35 2010] [notice] Server built: Jan 18 2008 00:37:19
[Wed Feb 17 10:27:35 2010] [notice] Parent: Created child process 740
[Wed Feb 17 10:27:36 2010] [notice] Child 740: Child process is running
[Wed Feb 17 10:27:36 2010] [notice] Child 740: Acquired the start mutex.
[Wed Feb 17 10:27:36 2010] [notice] Child 740: Starting 64 worker threads.
[Wed Feb 17 10:27:36 2010] [notice] Child 740: Starting thread to listen on port 80.
[Wed Feb 17 10:31:15 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Feb 17 10:31:15 2010] [notice] Child 740: Exit event signaled. Child process is ending.
[Wed Feb 17 10:31:16 2010] [notice] Child 740: Released the start mutex
[Wed Feb 17 10:31:17 2010] [notice] Child 740: All worker threads have exited.
[Wed Feb 17 10:31:17 2010] [notice] Child 740: Child process is exiting
[Wed Feb 17 10:31:18 2010] [notice] Parent: Child process exited successfully.
[Wed Feb 17 10:31:28 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Feb 17 10:31:28 2010] [notice] Server built: Jan 18 2008 00:37:19
[Wed Feb 17 10:31:28 2010] [notice] Parent: Created child process 2200
[Wed Feb 17 10:31:28 2010] [notice] Child 2200: Child process is running
[Wed Feb 17 10:31:28 2010] [notice] Child 2200: Acquired the start mutex.
[Wed Feb 17 10:31:28 2010] [notice] Child 2200: Starting 64 worker threads.
[Wed Feb 17 10:31:28 2010] [notice] Child 2200: Starting thread to listen on port 80.
[Wed Feb 17 10:34:20 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Feb 17 10:34:22 2010] [notice] Child 2200: Exit event signaled. Child process is ending.
[Wed Feb 17 10:34:24 2010] [notice] Child 2200: Released the start mutex
[Wed Feb 17 10:34:25 2010] [notice] Child 2200: All worker threads have exited.
[Wed Feb 17 10:34:25 2010] [notice] Child 2200: Child process is exiting
[Wed Feb 17 10:34:26 2010] [notice] Parent: Child process exited successfully.
[Wed Feb 17 10:43:32 2010] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Feb 17 10:43:32 2010] [notice] Server built: Jan 18 2008 00:37:19
[Wed Feb 17 10:43:32 2010] [notice] Parent: Created child process 3640
[Wed Feb 17 10:43:33 2010] [notice] Child 3640: Child process is running
[Wed Feb 17 10:43:33 2010] [notice] Child 3640: Acquired the start mutex.
[Wed Feb 17 10:43:33 2010] [notice] Child 3640: Starting 64 worker threads.
[Wed Feb 17 10:43:33 2010] [notice] Child 3640: Starting thread to listen on port 80.
[Wed Feb 17 10:46:27 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Feb 17 10:46:27 2010] [notice] Child 3640: Exit event signaled. Child process is ending.
[Wed Feb 17 10:46:28 2010] [notice] Child 3640: Released the start mutex
[Wed Feb 17 10:46:29 2010] [notice] Child 3640: All worker threads have exited.
profilepic.png
manpreet 2 years ago

First check if your apache server is running. Start->Run->cmd and then execute command:

netstat -abn

Lookup the result for line like this:

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 600 [apache.exe]

If you cant find anything listening on port 80 ( no 0.0.0.0:80 line) then your apache is failing to start. To find out why it cant start you should find apache log directory and examine the error.log (may be you have updated your php resently?). If you find 0.0.0.0:80 listening line but some other software is listening there (do you have IIS running?) then you should remove / reconfigure that softure to free port 80. If you have apache listening on port 80 but still cant open your site and you cant figure out what is causing the problem via examining apache log files then it my be database problem. Check if your mysql is running and listening using same command but you should be looking for

TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING [mysqld-nt.exe]

If you cant find such line then your mysql server is not running - check mysql log files for errors. If both servers are running and you cant get any output in your browser then check your firewall and antivirus - they may block your requests. Hope this helps ;)


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community