Unable to start Apache Web Server


#1

Hi,

I’ve spent most of today trying to restart Apache. I’ve been using the webserver for weeks, if not months, and last night I forgot to log out. I was logged into both apache (using apache50 start ~/workspace/xxxxx) and mysql (using mysql50 start). Both are part of the Harvard CS50 course.

At present, all efforts to sudo, killall, restart, reload, etc. have timed out or failed. My log files seem very full (I stopped scrolling down at line 53000) and grep doesn’t return anything for today’s date (“mar 11”) from any .log file. WTF.

I have screen shots if they would help, but I’m a bit alarmed that all this effort hasn’t fixed a problem that just happened because I forgot to log out for eight hours.


#2

Could you post the last few lines of your apache error log file here. You can get them with cat /var/log/apache2/error.log | tail -20 or if the cs50 log file is in a different location and you please paste the last few lines of it.

Do you see any errors when running apache50 start or what output does it give?


#3

Thank you for promptness.

command returns entries for March 3rd only.

with “apache50 start ~/workspace/pset7/public”:

  • Starting web server apache2
  • The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
    Apache failed to start!

If I try to open the web server address, “No application seems to be running here” <~ response is same if I start mysql50 and try to access phpmyadmin, although, within the IDE, mysql shows no probs upon start.


#4

** I’m adding # (#https) before links so I can get around new user limitations

inspireme1@ide50:~/lib/apache2/log $ cat error.log | tail -20
[Thu Mar 03 16:03:12.892474 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892488 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892510 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461711 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892515 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892524 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892598 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461712 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892604 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892616 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892638 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461713 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892643 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892652 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892673 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461714 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892678 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892687 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892708 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461715 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892712 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892721 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/pset7/public/sell.php:0, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892742 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Notice: Undefined offset: 461716 in /home/ubuntu/workspace/pset7/public/sell.php on line 38, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892747 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP Stack trace:, referer: #https://ide50-inspireme1.cs50.io/sell.php
[Thu Mar 03 16:03:12.892756 2016] [:error] [pid 1377] [client 10.240.0.174:53656] PHP 1. {main}() /home/ubuntu/workspace/p


#5

What is the status on this bug? I’m experiencing a major disruption to my workflow. Thnx.


#6


#7

Hi,

According to the logs, there’s a syntax error in your code. Can you fix those and try restarting your server again?

Regards,
​Mutahhir


#8

Hi Mutahhir,

All efforts to restart have failed. start has been attempted with multiple folders (so different test files) as root. All efforts have timed out.


#9

Hi, problem appears to have resolved using echo > ~/lib/apache2/log/error.log. I have access again


#10

Hi @mutahhir, @bradydowling I have the same problem:

Can you help me ? What info do you need to access this workspace?
Thanks in advance


#11

I’m not certain that the original problem described in this thread is the
same as the problem posted. However, then source of the problems is
posted, as well as, potentially, a remedy. I do not know if the remedy
described still works.