Custom php.ini with PHP 5.3


I was using a custom php.ini on PHP 5.2, and am now in the process of moving across to PHP 5.3.

I’ve followed the instructions on the Wiki -

  1. Created a .php/5.3 directory inside my home:
  1. Copied an existing php.ini file into this directory and renamed it to phpini

However, when I run phpinfo(), the correct ini file path is not showing up:

Configuration File (php.ini) Path /etc/php53 Loaded Configuration File /etc/php53/php.ini Scan this dir for additional .ini files /etc/php53/conf.d Additional .ini files parsed (none)

Am I missing a step somewhere? (I’m using a PS)



btw, the custom ini seems to be parsed OK if you use a phprc file, but not if you use a phpini.


On PHP 5.2 I was using a custom php.ini with memcached enabled.

I’ve noticed on 5.3, using the same extension setting, that memcached is not enabled. I’m tearing my hair out a little bit wondering why?

Here´s the phprc file:

[code];;; php.ini overrides for PHP 53

output_buffering = 4096
post_max_size = 20M

extension = /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/[/code]

Obviously, the last line is the one that’s being ignored. I’ve tried various different paths, including placing in the same directory as phprc, but nothing seems to happen (I’d expect to see a memcached section in phpinfo). The other settings are being applied, so I know that phprc is being read:

Loaded Configuration File /etc/php53/php.ini Scan this dir for additional .ini files /etc/php53/conf.d Additional .ini files parsed /home/me/.php/5.3/phprc


Just to add, memcached is fully working on PHP 5.2 on the same server, and I’ve copied the instructions from here to get it working on PHP 5.3 (adding the extension to phprc).

The phprc file is being parsed, as per above, and other settings from the same file are being applied. I have no idea why the memcache extension is not being loaded :frowning:


Keep in mind that PHP extensions are not binary-compatible between PHP 5.2 and 5.3. You may need to recompile extensions for the appropriate PHP version — see for step-by-step instructions for PHP 5.3.


thanks, all working now. I recompiled the memcache extension and things started working :slight_smile: