File: //proc/self/root/proc/self/root/scripts.20110531.215904.25158/listproblems
#!/usr/bin/perl
# cpanel - listproblems Copyright(c) 2010 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
BEGIN { unshift @INC, '/usr/local/cpanel'; }
use Cpanel::HttpUtils::ApRestart ();
Cpanel::HttpUtils::ApRestart::safeaprestart();
sleep(1);
my $size = (stat("/usr/local/apache/logs/error_log"))[7];
$seekpoint = ($size - (1024*16));
if ($seekpoint < 0) { $seekpoint = 0; }
open(WL,"/usr/local/apache/logs/error_log");
seek(WL,$seekpoint,0);
while(<WL>) {
unshift(@WR,$_);
}
close(WL);
foreach (@WR) {
if (/resuming normal operations/i) {
$webserver = $1;
last();
}
}
if ($webserver eq "") {
die "Could not find the latest apache startup line";
}
if ($webserver !~ /frontpage/i) {
print "Warning: Frontpage is missing from apache.\n";
print "1) Make sure 'AddModule mod_frontpage.c' is in httpd.conf (apache 1 only)\n";
print "2) Make sure mod_frontpage is compiled into apache (run /scripts/easyapache to rebuild)\n";
}
if ($webserver !~ /php/i) {
print "Warning: php is missing from apache.\n";
print "1) Make sure 'AddModule mod_php4.c' is in httpd.conf\n";
print "1) Make sure 'LoadModule php4_module libexec/libphp4.so' is in httpd.conf\n";
print "1) Make sure mod_php4 is compiled into apache (run /scripts/easyapache to rebuild)\n";
}