I'm looking at the ubuntu sets up php for both apache (mod_php) and php cli. They have one configuration ini in /etc/php5/apache2/php.ini which contains settings for apache+php and another configuration ini in /etc/php5/cli/php.ini for php cli. How do I duplicate these settings? I'm compiling php in a rhel environment
when you compile php, you will need to compile it twice. so what you can do is first check out your php info for the mod_php and than your cli. they may be compiled differently.
so for mod_php, you might do something with:
for php cli:
it is importantly to not configure apxs2 while you are configuring your cli.
Those values are hard coded at compile time. On Debian/Ubuntu packages these paths appear to be modified via the
On a Debian/Ubuntu system do an
Answer of @Zoredache is the proper one.
Missing info is "how do I apply those path?
let's say you get the source package for PHP in Debian 7
All further steps assume you are in this directory.
In this directory, you can find the "debian" subdirectory, which contains a "debian/patches" directory which contains the patches that debian apply to the original sources.
We will create a patch that fits in this hierarchy using the tool called "quilt":
The quilt patch system manages a stack of patches to the original source. We then apply all patches contained in the package.
if you want to apply it just for the php.ini location, in for example PHP 5.3 source, you can try to delete in debian/patches/ all of the files except 0004-006-debian_quirks.patch and then move it in the PHP 5.3 folder.