- Joined
- Feb 2, 2015
- Messages
- 37
- Points
- 0
To upgrade PHP version 5.3 on DirectAdmin, you can follow the steps below:
SSH login your server and type following lines:
If you get this error
First, edit /usr/local/directadmin/custombuild/configure/ap2/configure.php5
Replace --with-pcre-regex=/usr/local with --with-pcre-regex
After that run these commands
And check phpinfo() to see if PHP and PCRE are updated.
Alternative solution
First, install PCRE 8.10:
Install
Finally, check phpinfo() to see if it's properly installed.
PHP Version: 5.3.x
PCRE Library Version: 8.10
Under Configure Command, you should find: --with-pcre-regex=/usr/local
Upgrade to PHP 5.4.x
How to upgrade Mysql with custombuild
To upgrade mysql using the custombuild script, do the following:
Where mysql can be 5.0, 5.1 or 5.5.
A full raw sql backup will be run prior to the upgrade if you have mysql_backup=yes set. It goes without saying, always make backups, either with this tool, or with other means.
After the mysql update, always recompile php.
SSH login your server and type following lines:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php5_ver 5.3
./build php n
Then you can do these stepsthis version of PCRE is not complied with PCRE_UTF8
First, edit /usr/local/directadmin/custombuild/configure/ap2/configure.php5
Replace --with-pcre-regex=/usr/local with --with-pcre-regex
After that run these commands
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php5_ver 5.3
./build php n
Alternative solution
First, install PCRE 8.10:
Code:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.bz2
tar jxf pcre-8.10.tar.bz2 && cd pcre-8.10
./configure --prefix=/usr/local
Code:
cd /usr/local/directadmin/custombuild/
./build update
./build set php5_ver 5.3
./build php n
PHP Version: 5.3.x
PCRE Library Version: 8.10
Under Configure Command, you should find: --with-pcre-regex=/usr/local
Upgrade to PHP 5.4.x
Code:
cd /usr/local/directadmin/custombuild
./build set custombuild 1.2
./build set php5_ver 5.4
./build update
./build clean
./build php d
To upgrade mysql using the custombuild script, do the following:
Code:
cd /usr/local/directadmin/custombuild
./build set mysql 5.1
./build set mysql_inst yes
./build set mysql_backup yes
./build update
./build mysql
A full raw sql backup will be run prior to the upgrade if you have mysql_backup=yes set. It goes without saying, always make backups, either with this tool, or with other means.
After the mysql update, always recompile php.
Code:
./build php n