jola
Basic Pleskian
I am migrating a large site to plesk and we are having big problems to get cgi/perl scripts to work. At first we thought the problems might be because we were using the old Plesk 8 version. We only ran Plesk 8 because we wanted to use the migration manager available only in Plesk 8. However, we have now upgraded to the latest plesk 10 version and we are still having the same problems. Most our perl scripts are not working under plesk. I have tried to debug this and have noticed several problems, here is a very simple example:
A have written a test file called bar.pl that contains:
Accessing this file via http displays "hello world" in my browser, as it should
If have also written a second file foo.pl that contains:
Many of our perl cgi scripts use this technique to include subroutines via a require statement.
In this example, foo.pl should just include and execute the bar.pl file and display the same "hello world" message. However, accessing foo.pl via http only works intermittently. Sometimes it shows "hello world", but most of the time it will not display anything but just show an empty page. I have discovered that if I restart apache (/etc/init.d/httpd restart) foo.pl will always work once and then it fails again. access_log and error_log files indicate no problems, aside from the fact that access_log shows less characters being output when the blank-page error occurs.
I noticed earlier also that if I in Plesk 8 changed the domain from being an IP-based domain to a name-based domain using the common plesk IP number cgi/perl worked as it should and my example above had no problems.
Anyone have any clues about what this can be related to? Perl under plesk on IP based sites does not seem to work in the same way as perl worked under my previous hosting environment. We have tried to solve this for a couple of weeks now without finding any solution and we will soon be forced to abandon our plans to migrate to plesk and instead move to a different hosting environment where our cgi/perl scripts work.
A have written a test file called bar.pl that contains:
Code:
#!/usr/bin/perl
print("Content-type: text/plain\n");
print("\n");
print("hello world\n");
Accessing this file via http displays "hello world" in my browser, as it should
If have also written a second file foo.pl that contains:
Code:
#!/usr/bin/perl
require "/var/www/vhosts/website.com/httpdocs/bar.pl";
Many of our perl cgi scripts use this technique to include subroutines via a require statement.
In this example, foo.pl should just include and execute the bar.pl file and display the same "hello world" message. However, accessing foo.pl via http only works intermittently. Sometimes it shows "hello world", but most of the time it will not display anything but just show an empty page. I have discovered that if I restart apache (/etc/init.d/httpd restart) foo.pl will always work once and then it fails again. access_log and error_log files indicate no problems, aside from the fact that access_log shows less characters being output when the blank-page error occurs.
I noticed earlier also that if I in Plesk 8 changed the domain from being an IP-based domain to a name-based domain using the common plesk IP number cgi/perl worked as it should and my example above had no problems.
Anyone have any clues about what this can be related to? Perl under plesk on IP based sites does not seem to work in the same way as perl worked under my previous hosting environment. We have tried to solve this for a couple of weeks now without finding any solution and we will soon be forced to abandon our plans to migrate to plesk and instead move to a different hosting environment where our cgi/perl scripts work.
Last edited: