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
  #21  
Old 27th August 2008, 18:50
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Thats fine and the current version of apache is 2.x named apache2 so apache = apache2.
You just said that apache 1.x is installed in addition to 2.x. So which is it? Is my server running one? both?

I still don't get how both get installed and only one works. Or it works for some people but not everyone... I am really lost here. I think maybe the instructions are incorrect or something.
Reply With Quote
Sponsored Links
  #22  
Old 28th August 2008, 04:12
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Is there a CentOS equivalent of the command a2enmod php5?
Reply With Quote
  #23  
Old 28th August 2008, 09:03
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

I just checked everything, and apache and php are all installed fine. So something is wrong with ISPConfig, not the server. Can someone help?
Reply With Quote
  #24  
Old 28th August 2008, 09:15
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Does anyone know which config file ISPConfig uses to control whether PHP is enabled on a particular site? If it's not the main php.conf file or httpd.conf, then what is it?
Reply With Quote
  #25  
Old 28th August 2008, 09:22
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
This is no general issue with ISPConfig and centos or the guide, so other users are very likely not affected by your problem. I lready installed it several times with this guide on centos without any problem.

Are there copies of the file Vhost_ispconfig.conf with a date appended in same directory? You can find the directory on your system by running:

locate Vhost_ispconfig.conf
Hi, I found the file you were thinking of. It is not Vhost_ispconfig.conf, but rather Vhosts_ispconfig.conf

If you are still willing to help, here are the contents of one of the sites for that file:

Code:
######################################
# Vhost: www.k-rad.hk:80
######################################
#
#
<VirtualHost 64.40.112.137:80>
ServerName www.k-rad.hk:80
ServerAdmin webmaster@k-rad.hk
DocumentRoot /var/www/web4/web
ServerAlias k-rad.hk
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 $
ErrorLog /var/www/web4/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode Off
<IfModule mod_ruby.c>
  <Directory /var/www/web4/web>
    Options +ExecCGI
  </Directory>
  RubyRequire apache/ruby-run
  #RubySafeLevel 0
  <Files *.rb>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
  <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
  </Files>
</IfModule>
Alias /error/ "/var/www/web4/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/web4/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</IfModule>
</VirtualHost>
#
#
#
When I try disabling PHP completely, it no longer shows a download dialog. Instead, apache serves a blank page (looking at the code, you can see the unparsed file still).

So Apache is working, i think it's just php that's broken. How should I go about fixing it?

Last edited by spuppy; 28th August 2008 at 09:28.
Reply With Quote
  #26  
Old 28th August 2008, 11:25
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

OK after expirementing ALL DAY I finally found a solution. I have no idea why, but this is what I did

I changed the following

Code:
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
To

Code:
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    SetHandler php5-script
</Files>
Can someone come up with a theory on why this is? And how can I get it to show up on all the vhosts without having to do this manually every time I add or edit a site?
Reply With Quote
  #27  
Old 28th August 2008, 11:43
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,717
Thanks: 820
Thanked 5,322 Times in 4,175 Posts
Default

Thats no bug, so there is nothing to be fixed. You missed to tell us that you use OpenSuSE. OpenSuSE does not understand the apache directives that all other linux distributions use to activate php, so you have to set this in the configuration. Please have a look here, it is all explained in the first steps guide, I guess you skipped this manual as you configured your server:

http://www.howtoforge.com/ispconfig-2.x-first-steps
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #28  
Old 28th August 2008, 11:47
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Thats no bug, so there is nothing to be fixed. You missed to tell us that you use OpenSuSE. OpenSuSE does not understand the apache directives that all other linux distributions use to activate php, so you have to set this in the configuration. Please have a look here, it is all explained in the first steps guide, I guess you skipped this manual as you configured your server:

http://www.howtoforge.com/ispconfig-2.x-first-steps
You'll note that I deleted the "fix" that I thought I found. That wasn't a fix, and thus I deleted the last reply.

I am NOT using OpenSuSE. I am using CentOS 5.2, as I originally stated. I followed the directions exactly, and it is broken.

The only way to fix it is to manually edit the Vhosts_ispconfig.conf file and make the changes I made above.

Can you explain this bug? How does this fix it? And how can I make it so that line is always added, so I can have PHP working on all the new sites I add?
Reply With Quote
  #29  
Old 28th August 2008, 15:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Can you try post #2 on http://www.howtoforge.com/forums/sho...pache2_php%22] ?
__________________
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
  #30  
Old 28th August 2008, 16:01
spuppy spuppy is offline
Member
 
Join Date: Aug 2007
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by falko View Post
I had it set to 'addtype' before, and I thought that was the solution. Turns out I was wrong, which is why I deleted the reply I posted (the one that you replied to earlier). Currently the only way I can get it working is to manually add SetHandler php5-script in between the <Files *.php> tags.

If you can figure out why, then great. It will benefit everyone else with similar problems running CentOS 5.2. If you want, I can try some other things with my server to help you figure out what is going on. Just let me know.
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
Apache stopped mccharlet General 6 15th August 2007 15:27
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 15:55
PHP Sessions not working on one site! badben General 5 24th August 2006 17:47
php script injections Grizzly General 21 18th July 2006 08:55
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58


All times are GMT +2. The time now is 11:28.


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