Today found out one of the customer’s Zen Cart apps getting blank page and there’s no error found from Apache error_log.
To understand the detailed error generated from Zen Cart, you may use the built in debugging tool by Zen Cart.
1. Go to the cache folder from your Zen Cart.
2. Find the file named ‘myDebug-xxxxx.log’ file as xxxxx is the numbers.
Now, you may troubleshoot the problem from Zen Cart.
One of the customer is facing blank page when they are using Moodle application but they can’t find a way to show the error from Apache error_log.
After search around from the Internet, it is found out Moodle used their custom PHP ini_set function to define the PHP value.
In order to show the detailed error which got from Moodle, simply add the following code to the config.php file.
ini_set ('display_errors', 'on');
ini_set ('log_errors', 'on');
ini_set ('display_startup_errors', 'on');
ini_set ('error_reporting', E_ALL);
Now, browse to your page again and you should see the detailed error by now.
By default, Perl/CGI script will send the error to STDERR where it is the server standard error and normally it will store to the server Apache error log.
To setup private error_log from your Perl/CGI script, you may easily get them done with script below.
use CGI::Carp qw(carpout);
open(LOG, “>>/home/mickgenie.com/logs/cgi-error.log”) or
die(“Unable to open cgi-error.log: $!n”);
The carpout() used to call the error and send it to the log file that you set.
To setup error to send to browser,
use CGI::Carp qw(fatalsToBrowser);
die “Couldn’t open log file”;
Use the above script and it could send all the error to the Browser.
Assume that you have a sample Perl script that only print the clear text and you still got the premature end of script headers error.
Sample Perl Script used.
print “Content-type: text/html\n\n”;
print “Hello, Mick Genie!\n”;
Step to overcome the problem.
1. Check the Apache error_log or domain error log.
2. Check if the perl script come with permission 755 where this will allow the script to execute.
Continue reading Perl Script getting Premature End Of Script Headers Error
Logs are always important to any server to understand any problem or incident from the server.
Some important log location as below,