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 8th May 2007, 22:26
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,452
Thanks: 813
Thanked 5,222 Times in 4,092 Posts
Default

Please have a look at the apache error log of the website, not the main apache error log. The error log of the website is in the log directory in the website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #12  
Old 8th May 2007, 22:33
octopus octopus is offline
Junior Member
 
Join Date: Apr 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hmmmmm missing file ??? must each website in the cgi-bin need a php4 file?


[Tue May 08 22:30:40 2007] [error] [client 192.168.20.23] File does not exist: /var/www/web1/web/cgi-bin
[Tue May 08 22:30:40 2007] [error] [client 192.168.20.23] File does not exist: /var/www/web1/web/cgi-bin
[Tue May 08 22:30:40 2007] [error] [client 192.168.20.23] File does not exist: /var/www/web1/web/cgi-bin
[Tue May 08 22:30:40 2007] [error] [client 192.168.20.23] File does not exist: /var/www/web1/web/cgi-bin
Reply With Quote
  #13  
Old 9th May 2007, 10:56
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,452
Thanks: 813
Thanked 5,222 Times in 4,092 Posts
Default

No. There are two solutions for this problem.

1) Enable the cgi checkbox for this website and then create a symlink with the name php in the cgi-bin directory of the website (which is in the website root, not inside the web directory as /var/www/web1/web/cgi-bin is virtually mapped to this directory) which points to php cgi binary.

2) You create a global alias for the cgi-bin directory and place the symlink for php there, so you dont have to create the symlink for every website manually.

But 2) is normally created automatically by debian, so I wonder why it does not work for you as you said that it worked as you added the addtype and action is the apache configuration directly. maybe you activated suexec in your apache which prevents access to the global cgi directory.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #14  
Old 9th May 2007, 18:39
octopus octopus is offline
Junior Member
 
Join Date: Apr 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
No. There are two solutions for this problem.

1) Enable the cgi checkbox for this website and then create a symlink with the name php in the cgi-bin directory of the website (which is in the website root, not inside the web directory as /var/www/web1/web/cgi-bin is virtually mapped to this directory) which points to php cgi binary.

2) You create a global alias for the cgi-bin directory and place the symlink for php there, so you dont have to create the symlink for every website manually.

But 2) is normally created automatically by debian, so I wonder why it does not work for you as you said that it worked as you added the addtype and action is the apache configuration directly. maybe you activated suexec in your apache which prevents access to the global cgi directory.
the only thing i activate is this in apache?

a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include

how create a vrituale mapping to cgi-bin?
Reply With Quote
  #15  
Old 14th May 2007, 10:33
nightfreak nightfreak is offline
Junior Member
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have exactly the same problem and created a ScriptAlias called "cgi-bin" that points to "/usr/bin". this is my configuration:

Code:
ScriptAlias /cgi-bin "/usr/bin"
<Directory "/usr/bin">
        AllowOverride None
        Options +ExecCGI +FollowSymLinks
        Order allow,deny
        Allow from all
</Directory>

AddHandler php-script .php4
Action php-script /cgi-bin/php4-cgi
The 404 errors are gone now, but i still doesn't work, i get the following error now:
Code:
Warning: Unexpected character in input: '' (ASCII=8) state=1 in /usr/bin/php4-cgi on line 977

Warning: Unexpected character in input: '' (ASCII=7) state=1 in /usr/bin/php4-cgi on line 977

Warning: Unexpected character in input: ' in /usr/bin/php4-cgi on line 978

Parse error: syntax error, unexpected '?' in /usr/bin/php4-cgi on line 978
Reply With Quote
  #16  
Old 15th May 2007, 13:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Is there maybe a syntax error in your PHP script?
__________________
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 16th May 2007, 08:17
nightfreak nightfreak is offline
Junior Member
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The script has no syntax error, its a simple phpinfo() script.

Why is it so difficult to install to get php4-cgi running, with or without fastcgi? I tried a lot of howtos, but none seemed to work. i'm running apache mpm prefork with mod_php5.
Reply With Quote
  #18  
Old 16th May 2007, 09:30
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,452
Thanks: 813
Thanked 5,222 Times in 4,092 Posts
Default

I had similar script errors in one installation. It was related to the php4 binary. Just as a test, please try to install php5-cgi (you dont have to remove mod_php5 for this) and then replace the line:

AddHandler php-script .php4
Action php-script /cgi-bin/php4-cgi

with:

AddHandler php-script .php5
Action php-script /cgi-bin/php5-cgi

in your configuration and test if .php5 files work as cgi.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #19  
Old 16th May 2007, 13:03
nightfreak nightfreak is offline
Junior Member
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

php5-cgi works! Any idea what wrong? I would like to avoid recompiling php4-cgi.
Reply With Quote
  #20  
Old 17th May 2007, 15:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
 
Default

Do you need PHP4? Because otherwise I'd suggest you go with PHP5.
__________________
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
php4 and php5 at same time findafriend Installation/Configuration 7 22nd June 2007 16:44
PHP5 is on, but PHP4 (as cgi?) is needed... schmidtedv Installation/Configuration 1 12th April 2007 13:44
PHP5 in apache PHP4 at cli. how do get get PHP5 at both ThE-LyNX Installation/Configuration 1 28th August 2006 23:49
suse 10.1 php5 to php4 Boon-Dog-Danny Installation/Configuration 2 6th August 2006 15:09
PHP4 and PHP5 for SUSE 9.3 Prof M.Behrens Installation/Configuration 3 2nd April 2006 22:20


All times are GMT +2. The time now is 15:37.


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