Apache stopped working

16 posts / 0 new
Last post
#1 Sun, 07/03/2011 - 12:14
tsndp

Apache stopped working

Apache stopped working

Failed to start apache : Starting httpd: Syntax error on line 1011 of /etc/httpd/conf/httpd.conf: can't get fastcgi file info: /home/heyandhra/fcgi-bin/php.fcgi(/home/heyandhra/fcgi-bin/php.fcgi), errno: 2 [FAILED]

Please Help me out, when ever i start apache, this error is showing up

Sun, 07/03/2011 - 12:27
andreychek

Howdy.

It sounds like the file /home/heyandhra/fcgi-bin/php.fcgi was somehow removed or renamed... you may want to try changing the PHP Execution Mode for the account "heyandhra", and see if that helps.

It looks like it's set to FCGID now, you might try setting it to CGI.

-Eric

Sun, 07/03/2011 - 12:30 (Reply to #2)
tsndp

Thanks for ur time and reply bro, but now the error has changed somewhat

Failed to start apache : Starting httpd: Syntax error on line 1009 of /etc/httpd/conf/httpd.conf: can't get fastcgi file info: /home/heyandhra/fcgi-bin/php.fcgi(/home/heyandhra/fcgi-bin/php.fcgi), errno: 2 [FAILED]

can u do something from your side

Sun, 07/03/2011 - 15:13
andreychek

Hmm, that looks like the same error, but a different line number.

No, I can't do anything on my side to fix that, the problem exists on your server... but we can toss out some ideas for you to try :-)

What have you tried so far? The error you're seeing makes it look like it's still trying to use the FCGID execution mode, did you try changing that to CGI? You can change that in Server Configuration -> Website Options.

-Eric

Sun, 07/03/2011 - 20:07
tsndp

Yes sir, i tried all 3 options, but the result is same

Apache mod_php (run as Apache's user) CGI wrapper (run as virtual server owner) FCGId (run as virtual server owner)

Starting httpd: Syntax error on line 1009 of /etc/httpd/conf/httpd.conf: can't get fastcgi file info: /home/heyandhra/fcgi-bin/php.fcgi(/home/heyandhra/fcgi-bin/php.fcgi), errno: 2 [FAILED

is it possible to install back the missing/corrupted file ?

Sun, 07/03/2011 - 20:12
andreychek

Well, in theory, if you set it back to use FCGID, it should reinstall that file.

After setting it to FCGID, what does this command output:

ls -l /home/heyandhra/fcgi-bin/php.fcgi

Sun, 07/03/2011 - 20:36
tsndp

this is the output :(

ls -l /home/heyandhra/fcgi-bin/php.fcgi ls: /home/heyandhra/fcgi-bin/php.fcgi: No such file or directory

Sun, 07/03/2011 - 22:39
andreychek

What is the output of this command:

find /home/heyandhra -name ".cgi"

Sun, 07/03/2011 - 23:03
tsndp

find /home/heyandhra -name ".cgi" find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name .cgi' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ .cgi'.

Mon, 07/04/2011 - 13:33
Locutus

What about this:

ls -l /home/heyandhra
ls -l /home/heyandhra/fcgi-bin

At some point it will probably be easier to look around on your system directly, if you're willing to trust us with a login, than tossing suggestions and error messages back and forth. ;)

Mon, 07/04/2011 - 14:01
tsndp

@Locutus thanks for u reply locutus

unfortunately i found another hard way to rectify as i was running out of options and time (site is already down)

i have formatted completely and installed virtualmin again

and now my error log is fill with [warn] mod_fcgid: stderr: errors.. waht to do ? :)

Mon, 07/04/2011 - 16:20
Locutus

It might help if you posted the complete error message.

It also might help knowing some details about what system (distro, machine) you're running. Otherwise all we can do is guess - which is not helpful.

Mon, 07/04/2011 - 20:59
tsndp

Thank U,

some part of error is

[Tue Jul 05 05:55:38 2011] [warn] mod_fcgid: stderr: PHP Notice: getimagesize() [function.getimagesize]: Read error! in /home/heyandhra/public_html/home/function.resize.php on line 92 [Tue Jul 05 05:55:38 2011] [warn] mod_fcgid: stderr: PHP Warning: fopen(index.html) [function.fopen]: failed to open stream: Permission denied in /home/heyandhra/public_html/home/index.php on line 870 [Tue Jul 05 05:55:38 2011] [warn] mod_fcgid: stderr: PHP Warning: fwrite(): supplied argument is not a valid stream resource in /home/heyandhra/public_html/home/index.php on line 872 [Tue Jul 05 05:55:38 2011] [warn] mod_fcgid: stderr: PHP Warning: fclose(): supplied argument is not a valid stream resource in /home/heyandhra/public_html/home/index.php on line 874

Tue, 07/05/2011 - 03:50
Locutus

And the second part of my question? What's your system (server/VPS)? Your distro? What software are you trying to run there that causes the PHP errors? Please, you do need to give us something here, don't let us guess your setup. You e.g. don't phone your car repair shop and tell them "my car doesn't start, why?" :P

Key error would be this:

[Tue Jul 05 05:55:38 2011] [warn] mod_fcgid: stderr: PHP Warning: fopen(index.html) [function.fopen]: failed to open stream: Permission denied in /home/heyandhra/public_html/home/index.php on line 870

Take a look at that file and see what it is trying to open in line 870.

Oh, also, please enclose listings and screen dumps in [code][/code] tags, makes it much better readable.

Tue, 07/05/2011 - 21:48
tsndp

Here is the code i was trying run and ran excellently on shared hosting

// start the output buffer
ob_start();
$cachefile = "index.html";
// open the cache file "cache/home.html" for writing
$fp = fopen($cachefile, 'w');
// save the contents of output buffer to the file
fwrite($fp, ob_get_contents());
// close the file
fclose($fp);
// Send the output to the browser
ob_end_flush();

PS: index.html is existing and with 777

and on my server i am runnng Wordpress 3.1 (in wordpress sitemap generating and Akismet comment system are not working)

and the VPS version:

OPERATING SYSTEM: CentOS/RHEL 5 Description Operating system CentOS Linux 5.3 Webmin version 1.550 Virtualmin version 3.86.gpl GPL

PHP Version 5.2.17

PS: Overall Apache is taking longer than earlier to load any page!

Wed, 07/06/2011 - 06:57
Locutus

sigh

Which of these lines is 870?

"taking longer than earlier"... What is "earlier" in this context? What did you change as opposed to "earlier"?

Sorry, too much guessing involved here.

Topic locked