cgi not working under Puppy

Problems with the Linux version of XAMPP, questions, comments, and anything related.

cgi not working under Puppy

Postby tlchost » 16. August 2009 10:29

I am using PuppyLinux as a live CD. XAMPP for Linux installed and working fine.
I want to run several virtual sites and have them on my USB drive (/mnt/home).

With the following in httpd-vhosts.conf I can see the website, but when I call a cgi
Apache tells me that it either can not see the file or it does not have permissions
to run it.

<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs
ServerName localhost
ScriptAlias /cgi-bin/ "/opt/lampp/cgi-bin/"
<Directory "/opt/lampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /mnt/home/ohsosoft/public_html
ServerName ohsosoft
ScriptAlias /cgi-bin/ "/mnt/home/ohsosoft/public_html//cgi-bin/"
<Directory "/mnt/home/ohsosoft/public_html/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
ErrorLog /mnt/home/logs/ohsosoft-error_log
CustomLog /mnt/home/logs/ohsosoft-access_log common
</VirtualHost>

the httpd.conf file has
ServerRoot "/opt/lampp"
Should it be different for the virtual sites?

Thanks for any assistance.
Thom
tlchost
 
Posts: 7
Joined: 15. February 2009 16:08

Re: cgi not working under Puppy

Postby Nobbie » 16. August 2009 11:23

>ScriptAlias /cgi-bin/ "/mnt/home/ohsosoft/public_html//cgi-bin/"

Remove one of the two slashes before cgi-bin/

And check the owner permissions of /mnt/home/ohsosoft/public_html/cgi-bin, it must be readable and executable for the Apache user.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: cgi not working under Puppy

Postby tlchost » 17. August 2009 05:05

Nobbie wrote:>ScriptAlias /cgi-bin/ "/mnt/home/ohsosoft/public_html//cgi-bin/"
Remove one of the two slashes before cgi-bin/
And check the owner permissions of /mnt/home/ohsosoft/public_html/cgi-bin, it must be readable and executable for the Apache user.


Removed double slash....no other changes required....As a test I copied printenv to my cgi-bin folder and it ran.

I noticed my scripts used on various servers all use /usr/bin/perl in the shebang line. Apparently xampp wants to do it another way. Since my goal is to develop locally and upload to the servers, how can I change the behavior of xampp to use /usr/bin/perl, instead of the default values?

Thanks
tlchost
 
Posts: 7
Joined: 15. February 2009 16:08

Re: cgi not working under Puppy

Postby Nobbie » 17. August 2009 08:41

>Apparently xampp wants to do it another way.

What does that mean?
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: cgi not working under Puppy

Postby tlchost » 17. August 2009 12:12

Nobbie wrote:>Apparently xampp wants to do it another way.
What does that mean?


Sorry for the confusion.

The scripts supplied with xampp use this convention
#!/opt/lampp/bin/perl

Puppy has perl installed in /usr/bin/perl

Do I need to change only the shebang line in the script to use /usr/bin/perl or is there
something else I need to do ?

Thanks
tlchost
 
Posts: 7
Joined: 15. February 2009 16:08

Re: cgi not working under Puppy

Postby Wiedmann » 17. August 2009 12:31

The scripts supplied with xampp use this convention
#!/opt/lampp/bin/perl

Because XAMPP Perl (and all the Perl module) is installed in "/opt/lampp/bin/perl".

Puppy has perl installed in /usr/bin/perl

Fine. Now it's your decision to use XAMPP Perl or Puppy Perl (the system perl) in your cgi scripts. Apache is just using that one, what is declared in the shebang line.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 24 guests