• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

perl problems when migrating to plesk

jola

Basic Pleskian
I am migrating a large site to plesk. Most of my perl scripts are not working under plesk. I have tried to debug this and have noticed several problems, here is an example:

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";

In theory this file should just include the bar.pl file which should display "hello world". However, accessing foo.pl via http only works intermittently. Sometimes it shows "hello world", but most of the time it will not display anything. I have discovered that if I restart apache (/etc/init.d/httpd restart) foo.pl will always work. Hence, this problems seems to somehow be related to cache problems or something.

Anyone have any clues about what this can be related to? Perl under plesk does not seem to work in the same way as perl worked under my previous hosting environment.

I am running this on Plesk 8 since we are using the Migration Manager available in 8. Once I've got the Migration finished we will upgrade to Plesk 10 before we launch the site under plesk.
 
Replying to myself here. I have noticed that these perl problems only seems to affect my IP number based site. On a name-based site the example I showed works as expected. I'm confused.
 
Replying to myself again here. My example with the foo.pl and bar.pl files above cause problems when they are located in the httpdocs directory with Options +ExecCGI set in .htaccess. If I instead place the files in the plesk cgi-bin directory the scripts work as expexted. Hence, something must be different in how CGI/Perl scripts are run in the plesk cgi-bin directory and the httpdocs directory. Perhaps I need to add something more in my .htaccess file... anyone have any suggestions? The bug quest goes on....
 
I'm still investigating possible causes for these problems. I have noticed that when I run scripts in the plesk cgi-bin directory the suexec_log shows my ftp/ssh user being set as user. However, when I run scripts in my httpdocs directory this does not seem to happen. I assume the scripts are run as the httpd user (apache) then. Is this the normal way plesk should work?
 
Back
Top