cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build update
mkdir -p custom/suphp
cp -pf configure/suphp/configure.php5 custom/suphp/configure.php6
perl -pi -e 's/php53/phprep/' versions.txt
perl -pi -e 's/php6/php53/' versions.txt
perl -pi -e 's/phprep/php6/' versions.txt
./build set php5_ver 5.2
./build set php6_cgi yes
./build set php5_cgi no
./build set php5_cli yes
#set php6-cgi (or cli) to yes in the options.conf
./build php n
mv -f /usr/local/php6 /usr/local/php6_old
ln -s /usr/local/php5 /usr/local/php6
You CAN have PHP 5.2 and 5.3 on the system. This trick will work with CustomBuild 1.2:
Now PHP 5.3 will be installed as PHP6 in configuration filesCode:cd /usr/local/directadmin/custombuild ./build update perl -pi -e 's/php53/phprep/' versions.txt perl -pi -e 's/php6/php53/' versions.txt perl -pi -e 's/phprep/php6/' versions.txt ./build set php5_ver 5.2 #set php6-cgi (or cli) to yes in the options.conf ./build php n
*** There was an error while trying to configure php. Check the custom/suphp/configure.php6 file
Make Complete
Copying php.ini..
cp: php.ini-dist: No such file or directory
<FilesMatch "\.php$">
AddHandler x-httpd-php6 .php
</FilesMatch>
Yep, I was just mentioning because the script doesn't find it automatically, probably because the path is different between PHP 6 and 5.3.
So, it's not required to compile suPHP or modify the configure script for Apache?
We can just use:
in a vhost?Code:<FilesMatch "\.php$"> AddHandler x-httpd-php6 .php </FilesMatch>
# ls /usr/local/php6/bin
total 7062
-rwxr-xr-x 1 root wheel 11M Jan 3 09:54 php
-rwxr-xr-x 1 root wheel 4.4K Jan 3 09:54 phpize
-rwxr-xr-x 1 root wheel 3.5K Jan 3 09:54 php-config
-rwxr-xr-x 1 root wheel 14K Jan 3 09:54 phar.phar
lrwxr-xr-x 1 root wheel 29B Jan 3 09:54 phar -> /usr/local/php5/bin/phar.phar
drwxr-xr-x 2 root wheel 7B Jan 3 09:54 .
drwxr-xr-x 9 root wheel 10B Jan 3 09:54 ..
I'm either missing an "Action" or it's pointing to the wrong file since I don't have php-cgi, but couldn't quickly find which file was supposed to define that, so I'm going the FastCGI route. Seems easier.Do you get no error? Try "./build rewrite_confs".
and then to removecp -pf custom/ap2/configure.php5 custom/suphp/configure.php6
and to add this at the top--with-apxs2 \
and to modify the path to pear--prefix=/usr/local/php5 \
--enable-force-cgi-redirect \
--enable-fpm \
--disable-cli \
--with-config-file-path=/usr/local/etc/php5/cgi \
--with-pear=/usr/local/php5/lib/php \
You CAN have PHP 5.2 and 5.3 on the system. This trick will work with CustomBuild 1.2 (PHP5.2 as CLI and 5.3 as CGI (suPHP)):
Now PHP 5.3 will be installed as PHP6 in configuration filesCode:cd /usr/local/directadmin/custombuild ./build set custombuild 1.2 ./build update mkdir -p custom/suphp cp -pf configure/suphp/configure.php5 custom/suphp/configure.php6 perl -pi -e 's/php53/phprep/' versions.txt perl -pi -e 's/php6/php53/' versions.txt perl -pi -e 's/phprep/php6/' versions.txt ./build set php5_ver 5.2 ./build set php6_cgi yes ./build set php5_cgi no ./build set php5_cli yes #set php6-cgi (or cli) to yes in the options.conf ./build php n mv -f /usr/local/php6 /usr/local/php6_old ln -s /usr/local/php5 /usr/local/php6
*** There was an error while trying to configure php. Check the custom/suphp/configure.php6 file