Current time: 12-25-2024, 04:05 AM Hello There, Guest! (LoginRegister)


Poll: I have the same/similar issue
This poll is closed.
Yip, mines broken 50.00% 1 50.00%
Nope Perl works perfectly out of the box 50.00% 1 50.00%
Total 2 votes 100%
* You voted for this item. [Show Results]

Thread Closed 
[SOLVED] Perl scripts in websites don't work
Author Message
mike548141 Offline
Junior Member
*

Posts: 49
Joined: Nov 2009
Reputation: 0
Post: #1
[SOLVED] Perl scripts in websites don't work
Hi all,

I've had a look around but its possible I'm just missing something. Basically I can not run perl scripts in websites hosted on my ispCP server.

ispCP 1.0.5 setup on Suse 11.1, all works well, hosting a number of websites (vhost) for HTTP & FTP. Not really using mail etc..

I wanted to run a script called rss2cisco.pl on the server, it converts RSS feeds to CM-XML.
- I put the script in htdocs and pointed a browser at it, the webserver let me download the script (http://<domain>/rss2cisco.pl).
- I created a .htaccess in htdocs with a addhandler for CGI (.pl) and a +Exec option set. When I pointed a web browser at it I got a Error 500.
- I moved the script to <domain>/cgi-bin and removed the .htaccess from htdocs, I still got a error 500 (http://<domain>/cgi-bin/rss2cisco.pl), deleted the script from cgi-bin and I get a error 404.

Perl is installed and I can SSH to the server and run the perl script at the console successfully.
The script is chmod 755 and "perl -wc rss2cisco.pl" shows no syntax errors.

The domain has both PHP and CGI enabled on ispCP.

Help please! How do I run perl scripts in ispCP created websites. I see on the comparison chart it is a feature of ispCP.
http://isp-control.net/documentation/about:comparsion

Completely separate matter= Any thoughts on if/when Tomcat and Python support will be integrated into ispCP?

MC
(This post was last modified: 06-23-2010 05:06 PM by BeNe.)
06-10-2010 04:35 AM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Perl scripts in websites don't work
error logs?
06-10-2010 07:46 PM
Visit this user's website Find all posts by this user
mike548141 Offline
Junior Member
*

Posts: 49
Joined: Nov 2009
Reputation: 0
Post: #3
RE: Perl scripts in websites don't work
I've been watching /var/log/apache/error_log and nothing appears there. There is a 403 message in the access log

x.x.x.x - - [23/Jun/2010:00:51:56 +1200] "GET /cgi-bin/test.pl HTTP/1.1" 403 - "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"

Ta,

MC
Sorry forgot to say nothing comes ups in sites log either i.e. /var/log/apache2/nova.net.nz-combined.log
Hello World perl scripts at
http://117.18.82.10/cgi-bin/test.cgi
http://117.18.82.10/cgi-bin/test.pl

and

http://nova.net.nz/cgi-bin/test.cgi
http://nova.net.nz/cgi-bin/test.pl
(This post was last modified: 06-22-2010 11:00 PM by mike548141.)
06-22-2010 10:56 PM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: Perl scripts in websites don't work
suexec.log?
other error.logs?

/var/log/apache2/users/site-error.log

/J
06-22-2010 11:09 PM
Visit this user's website Find all posts by this user
mike548141 Offline
Junior Member
*

Posts: 49
Joined: Nov 2009
Reputation: 0
Post: #5
RE: Perl scripts in websites don't work
Hi Joximu

Thanks for your help (as always). Suexec held they key to the problem "file is writable by others:"
I used chmod to set the rights to 0750 and Hello World now works

Thanks for your help!

MC
06-23-2010 04:55 PM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #6
RE: [SOLVED] Perl scripts in websites don't work
you're welcome Smile

Joxi
[close]
06-23-2010 05:42 PM
Visit this user's website Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)