Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 21st May 2008, 15:05
catdude catdude is offline
Senior Member
 
Join Date: Jun 2007
Posts: 178
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Quote:
Originally Posted by onastvar
Catdude i changed permissions to 775 and I get same result. How would I run PL file within terminal.
Go into the appropriate directory:
cd <ISPConfig user home dir>/mydomain.com/cgi-bin

Once there, execute the file with:
./formail.pl

If you have a permissions problem, this ought to cause an error message to come up on your screen. If everything is working properly, it ought to spit some HTML out on your screen.
Reply With Quote
Sponsored Links
  #12  
Old 21st May 2008, 23:19
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 188
Thanks: 59
Thanked 10 Times in 10 Posts
Default The script is (formmail.pl) from Matt's Script Archive

Hi Ben,

this is actually formmail script from Matt's Script Archive. It does have print section.

Code:
# Print HTTP header and opening HTML tags.                           #
print "Content-type: text/html\n\n";
print "<html>\n <head>\n";
Any other suggestions???
Thanks!
Reply With Quote
  #13  
Old 23rd May 2008, 03:00
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 188
Thanks: 59
Thanked 10 Times in 10 Posts
Default

catdude thank u

When I run ./formmail.pl from terminal this is what I get
bash: ./formmail.pl: /usr/bin/perl^M: bad interpreter: No such file or directory

thanks
Reply With Quote
  #14  
Old 23rd May 2008, 10:02
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,265 Times in 4,129 Posts
Default

It looks as if the formail.pl has been saved / uploaded with windows linebreaks. Please save the file again with unix linebreaks.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #15  
Old 23rd May 2008, 16:00
catdude catdude is offline
Senior Member
 
Join Date: Jun 2007
Posts: 178
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Quote:
Originally Posted by till
It looks as if the formail.pl has been saved / uploaded with windows linebreaks. Please save the file again with unix linebreaks.
As a cheap and dirty quick fix, especially if all you have to convert is a single file, zip the file (with zip, not gzip or bzip) then unzip it with the "-a" flag.

For example:
zip 1.zip formail.pl
unzip -a 1.zip
rm 1.zip
Reply With Quote
  #16  
Old 24th May 2008, 12:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

You can also use the dos2unix command to convert the file to Unix linebreaks.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #17  
Old 24th May 2008, 17:44
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 188
Thanks: 59
Thanked 10 Times in 10 Posts
Default

I think I fixed linebreaks with zipping and unzippping the PL file. Now I'm getting this error in my suexec.log. When I run the script in firefox I get a blank page, when I run it in terminal entire script gets printer out. I tried to google error msg below with no luck or any helpful answers.

[2008-05-24 10:34:47]: uid: (10005/web6_admin) gid: (10006/10006) cmd: formmail.pl
[2008-05-24 10:34:47]: target uid/gid (10005/10006) mismatch with directory (10005/10006) or program (0/0)
Reply With Quote
  #18  
Old 25th May 2008, 13:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Are you using suExec? Can you post the vhost configuration of that web site? To what owner and group does the formail.pl script belong?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #19  
Old 25th May 2008, 19:08
onastvar onastvar is offline
Senior Member
 
Join Date: Apr 2008
Location: U.S.A.
Posts: 188
Thanks: 59
Thanked 10 Times in 10 Posts
Default

This is the /etc/httpd/conf/vhosts/Vhosts_ispconfig.com for that website



Code:
######################################
# Vhost: www.domain.com:80
######################################
#
#
<VirtualHost xx.xxx.xxx.xx:80>
SuexecUserGroup web6_domain web6
ServerName www.domain.com:80
ServerAdmin webmaster@domain.com
DocumentRoot /var/www/web6/web
ServerAlias webmail.domain.com domain.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
Alias  /cgi-bin/ /var/www/web6/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web6/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Directory /var/www/web6/web>
  suPHP_Engine on
  suPHP_UserGroup web6_admin web6
  AddHandler x-httpd-php .php .php3 .php4 .php5
  suPHP_AddHandler x-httpd-php
</Directory>
Alias /error/ "/var/www/web6/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
RewriteEngine on
RewriteCond %{HTTP_HOST}   ^webmail\.domain\.com [NC]
RewriteRule ^/(.*)         http://www.domain.com:81/roundcubemail/$1 [L,R]
</VirtualHost>
#
Reply With Quote
  #20  
Old 26th May 2008, 15:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

What's the output of
Code:
ls -la /var/www/web6/cgi-bin
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Autoresponder installation problem cgi script won't run MikeM Installation/Configuration 8 14th September 2007 17:52
Windows PHP script problem richj1232003 Programming/Scripts 1 2nd November 2006 09:01
Perl and cgi script installation linuxuser1 General 30 26th April 2006 23:09
Internal Server Error 500 cgi script mphayesuk General 6 8th February 2006 22:53


All times are GMT +2. The time now is 22:02.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.