All my Perl scripts have stopped running

software development

#1

A user pointed out that one of my Perl scripts in a web page just returns a 500 Internal Error. I looked into it and found that none of my perl scripts can run. I made sure that the scripts and directory are set at 755. When I run a script from a telenet screen, it appears to write normal html to the terminal. In the http/error.log, I get:
[Tue Nov 27 10:10:24 2012] [error] [client 68.116.21.250] suexec failure: could not open log file
[Tue Nov 27 10:10:24 2012] [error] [client 68.116.21.250] fopen: Permission denied
[Tue Nov 27 10:10:24 2012] [error] [client 68.116.21.250] Premature end of script headers: upload7.cgi
[Tue Nov 27 10:10:24 2012] [error] [client 68.116.21.250] File does not exist: /home/ykfpdata/ykfp.org/internal_error.html

Do I now need to configure something so perl can open a log file?

I haven’t done much with Perl in a couple years. But it’s not just my scripts. I have a library of charting routines from a commercial source that has a perl version and none of the demos are running either: http://ykfp.org/ChartDirector4.0/perldemo_cgi/


#2

If it has to do with suexec, contact support. That is what is used to run the perl scripts as your user instead of the apache user.


#3

Crap, it’s because perl is at /usr/bin/perl not /usr/local/bin/perl that all my scripts have. Did that just change within the last year?

My local Ubuntu host also has perl at /usr/bin/perl.

For fun, I’m going to see if I can write a little shell script that searches the cgi directories and changes the path where ever the wrong path is found.


#4

The interpreter changed a couple of years ago, with an OS update — I’m not sure exactly when we started providing a link at /usr/local/bin/perl, but we no longer do.

As far as the charting library goes, it looks as though it includes a compiled library which is probably out of date now. Check for an update at the source site, if you still need it to work.