#1  
Old 26th September 2007, 18:22
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
Default Php4 / Php5

Hello

I need help for writing a .htaccess file.

(1) My server is running PHP5 as apache2 module
(2) I did also install PHP4 as cgi
Both PHP versions suhoshin ones...

(3) When I want to run PHP4 in a specific folder I use this .htaccess:
Code:
AddHandler php-script .php
Action php-script /cgi-bin/php4
So, let's say I have a folder /var/www/webX/html/ that runs on PHP4 because of the .htaccess in there, how can I then make a subfolder of it to use PHP5 again (e.g. /var/www/webX/html/pwg/)?
Reply With Quote
Sponsored Links
  #2  
Old 27th September 2007, 18:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

I haven't tested this, but you could try to delete the .htaccess file and use something like

Code:
<DirectoryMatch "^/var/www/webX/html$">
  AddHandler php-script .php
  Action php-script /cgi-bin/php4 
</DirectoryMatch>
in the vhost configuration. The $ at the end of the regex should make sure that only /var/www/webX/html matches the regex.
__________________
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
  #3  
Old 27th September 2007, 18:13
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
Default

I can try that thx falko
Reply With Quote
  #4  
Old 28th September 2007, 18:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Please let me know if it worked.
__________________
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
  #5  
Old 28th September 2007, 19:45
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,126
Thanks: 4
Thanked 43 Times in 40 Posts
Default

nope, it's using PHP5
Reply With Quote
  #6  
Old 28th September 2007, 20:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

Can you try
Code:
<DirectoryMatch "^/var/www/webX/html/$">
instead?
__________________
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
php4 and php5 white debian4 octopus Installation/Configuration 21 18th May 2007 09:58
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 16:00.


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