Re: Re: I fixed it
Originally posted by PCSupportGuys
Hello,
So your using .htaccess? what did you put in your .htaccess file?
-Samuel
Hi!
I didn't use exactly the same method.
The main difference is that I configured a new extension .php5 for the 5th version
I'll explain all the steps:
This is for the Debian
1. Added a raw in /etc/apt/sources.list saying
deb
http://packages.dotdeb.org stable all
Instead of compiling myself the PHP5 I used the
www.dotdeb.org version, which I believe is a good one
2. Install the php5 as cgi program with the following
apt-get update
apt-get install php5-cgi
(if you need other packages like mcrypt use 'apt-get install php5-mcrypt)
3. Optional: For myself I removed the line from the sources.list because it can break some things when doing apt-get update, because dotdeb project has new version for php4, which in my case break some sites
At this point you already have the php5-cgi program installed in /usr/bin/php5-cgi
4. In every virtual server you must do the following
a. create in the root subtree dir called php (in my example /var/www/vhosts/example.com/php)
b. give it the same owner as the owner of the file inside httpdocs
chown example

sacln php
c. copy the php5-cgi file inside the php dir and rename it to php5
cp /usr/bin/php5-cgi /var/www/vhosts/example.com/php/php5
d. here also change the owner
chown example

sacln php5
e. create vhost.conf inside /var/www/vhosts/example.com/conf containing:
ScriptAlias /php5-cgi-custom /var/www/vhosts/example.com/php
Action application/x-httpd-php5-custom "/php5-cgi-custom/php5"
AddType application/x-httpd-php5-custom .php5
This ends the configuration for the domain, don't forget to add in the Plesk configuration for the domain support for cgi (you are running the php5 as cgi program)
And one last thing which must be done server wide. In order to open index.php5 as default page when entering site without link to a page, you must add the index.php5 as possibility in
/etc/apache2/apache2.conf
under DirectoryIndex list
And to answer your question:
I didn't use .htaccess and in the explained configuration you can run (also in the same dir) php4 alongside php5, just make sure to use the .php5 when running php 5 scripts
Hope this helped you.