PHP configure/php/configure.phpXX files

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
CustomBuild (rev. 2305) has been modified to always use configure/php/configure.phpXX files instead of configure/mode/configure.phpXX, so, we finally have a single place to edit the config :) Old custom/ configs would still be in effect (backwards compatibility).

Another change: mod_php will use /usr/local/phpXX folder, old php.ini, php.conf.d will be symlinked to it for backwards compatibility, so, when switching the modes - configs won't be lost, if the version matches. Additional benefits - less confusion with config file location + in the future ./build rewrite_conf will be enough to switch the PHP mode.
 

bdacus01

Verified User
Joined
Jul 22, 2017
Messages
670
Location
Murfreesboro
Ok so is there a recommended way to just migrate our custom files to correct new locations? or will CB do that for us?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
CB will keep using your own custom location if you have any, it’s fully backwards compatible.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,514
Why does /usr/local/directadmin/custombuild/configure/php/configure.phpXX have this line?:

Code:
--with-litespeed \
We don't use litespeed. Anyway I will just remove it in my custom file then.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,514
Also in configure.php73 it has --without-libzip \ , but in configure.php72 it does not. I am about to upgrade to PHP 7.3.x, and it would be nice if you can explain why --without-libzip \ is added in configure.php73?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
Why does /usr/local/directadmin/custombuild/configure/php/configure.phpXX have this line?:

Code:
--with-litespeed \
We don't use litespeed. Anyway I will just remove it in my custom file then.
--with-litespeed does not install LiteSpeed, it's not a webserver choice.

Also in configure.php73 it has --without-libzip \ , but in configure.php72 it does not. I am about to upgrade to PHP 7.3.x, and it would be nice if you can explain why --without-libzip \ is added in configure.php73?
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,514
OK. So it should do no harm to remove --with-litespeed then?

I just upgraded a server from php-fpm72 to php-fpm73 and ioncube does not work. Can you please look at ticket #22653. It is kind of urgent.

Edit: It was a bug wich Marynas solved quckly.
 
Last edited:

Driesp

Verified User
Joined
Mar 12, 2007
Messages
80
When building mod_php, this change causes problems for me. I have only 1 PHP install with mod_php.
The build scripts prefers config "configure/php/configure.phpXX" but it does not have "--with-apxs2" and has "--enable-fpm" instead.

I have custom config parameters, and copied configure/ap2/configure.phpXX over to custom/ap2/configure.phpXX.
The build scripts now prefers config "custom/ap2/configure.phpXX" which is ok.
But this config file does not have the --prefix=/usr/local/phpXX statement.
Afterwards the build script deleted the freshly builded binaries with symlink.

Which config file should I use and copy over to custom/ap2/ or custom/php/ ?
Should I use "--with-apxs2 --prefix=/usr/local/php72" from now on to compile mod_php?

Kind regards
Dries
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
When building mod_php, this change causes problems for me. I have only 1 PHP install with mod_php.
The build scripts prefers config "configure/php/configure.phpXX" but it does not have "--with-apxs2" and has "--enable-fpm" instead.

I have custom config parameters, and copied configure/ap2/configure.phpXX over to custom/ap2/configure.phpXX.
The build scripts now prefers config "custom/ap2/configure.phpXX" which is ok.
But this config file does not have the --prefix=/usr/local/phpXX statement.
Afterwards the build script deleted the freshly builded binaries with symlink.

Which config file should I use and copy over to custom/ap2/ or custom/php/ ?
Should I use "--with-apxs2 --prefix=/usr/local/php72" from now on to compile mod_php?

Kind regards
Dries
It auto-adds it if apache is used. No worries on this :)
 

Driesp

Verified User
Joined
Mar 12, 2007
Messages
80
Thank you for the prompt reply.

In my case, it installed PHP in /usr/local/
It seems like the build script did not add "--prefix=/usr/local/php72"
Should I add it myself?
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,514
@Driesp, Correct me if I am wrong, but I believe /usr/local/php always is the default path for mod_php, and maybe it is no point in having the version number in the path when you are not able to have more then one mod_php version installed.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
Thank you for the prompt reply.

In my case, it installed PHP in /usr/local/
It seems like the build script did not add "--prefix=/usr/local/php72"
Should I add it myself?
Path in custom config is not replaced, so, I’d suggest adding default one there :)
 

Driesp

Verified User
Joined
Mar 12, 2007
Messages
80
Great, thank you smtalk.
I had to add --prefix=/usr/local/php72 and --program-suffix=72 to my custom config to get it working.

I copied over configure/ap2/configure.php72 to custom/ap2/configure.php72, (like I always did)
but I had to copy over configure/php/configure.php72 to custom/php/configure.php72 and edit the file from there on.

@ditto
The new build script expects new PHP versions (even for mod_php) to be compiled in "/usr/local/phpXX" and symlinks the binaries to the old location "/usr/local".
And the symlinking always overwrote my freshly builded binaries in /usr/local.


I noticed that PHP did not compile the binaries for pear and pecl. The the custombuild script symlinks over it even though they don't exist in the new path /usr/local/php72.
The pear and pecl binaries are gone now, I don't know if this causes issues.

Kind regards
Dries
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,539
Location
LT, EU
Don't you have pecl in /usr/local/php72/bin ? Please check:
Code:
ls /usr/local/php72/bin/pecl*
 
Top