PHP imap script issues

ssgill

Verified User
Joined
May 9, 2012
Messages
164
Hello, i just went to hell and came back all i wanted to do was install second version of php with imap support. So i followed this KB

http://www.directadmin.com/imap.txt

My custombuild 2.0 setup

custom_versions.txt
Code:
php5:5.3.29:

options.conf
Code:
php1_releasie=5.3
php1_mode=php-fpm
php2_release=5.6
php2_mode=php-fpm

autover=no

Following steps from article.
Downloaded files.directadmin.com/services/all/imap_php.sh

Changes to the file
Code:
CONFIGURE=configure.php56

WEB=fpm

Desired result was that php 5.6 will be installed with imap support.

This is what happened.

Script added new php release flag at the bottom of options.conf file
Code:
php1_releasie=5.5

Created fpm folder in custom folder.
Installed php 5.5 as systemwide, php 5.3 gone, apache crashed.

I checked my options.conf file, didn't scrolled down to the end of the file. On top my php settings where correct, so tried reinstalling PHP

./build php n

So in this process it installed php 5.6 also but php 5.5 remained because it was set at the bottom of the file. Well finally found that line, removed it and did a rebuild of php and its working now.

But in my Directadmin Show Services page its showing me 4 php version.

php-fpm53 php-fpm53 (pid 26655 ) 15.2 MB Start Stop Restart Reload
php-fpm54 Process is stopped 0 B Start Stop Restart Reload
php-fpm55 Process is stopped 0 B Start Stop Restart Reload
php-fpm56 Process is stopped 0 B Start Stop Restart Reload

Not sure how php 5.4 got installed but you can see its there but are stopped, i didn't tried starting them in case something else goes wrong.

I would like to remove all traces of other 3 versions for PHP from server, then will reinstall php 5.6

Any help would be appreciated.

Thanks
 
There are not really any ways to delete old php versions (Martynas may be able to correct me on that if I'm wrong),
but usually to stop using an older version, all you do it turn it off in the options.conf, and run:
./build all d
./build rewrite_confs

and the apache configs won't be pointing to the old php versions anyway.

The leftover files won't hurt anything.
You may be able to delete the old /usr/local/phpXX folders, but if they're not hurting anything, I wouldn't personally delete them.
In the even anything was linked to anything in that folder, it may break things (I can't think of anything that would, but leaving it shouldn't hurt anything)

John
 
Thanks John, couple of questions

1) Did i did something wrong when i ran http://www.directadmin.com/imap.txt script. Because it installed php55 by adding flag in options.conf. Is this the way script was suppose to execute. If so then please add this information in the article so that we are warned, if this was not expected result then please have a look at the script.

2) How does directadmin determines installed php versions on the server, it only support 2 versions but my admin section shows 4.

Thanks
 
1) The script http://files.directadmin.com/services/all/imap_php.sh does not make any changes to the options.conf.
If something was previously missing from the options.conf, it's possible that build added it.
I notice your pasted:
Code:
php1_releasie=5.5
which is a typo, should be
Code:
php1_release=5.5
which might be why the build script add it, as php1_release was not present.

2) If you're referring to seeing all php-fpm versions in the services monitor, I believe that's an old bug.
Edit:
/usr/local/directadmin/data/admin/services.status

and delete the values that are not being used.

John
 
Back
Top