[CentOS] apache 2 and php 5.2

Wed Feb 16 16:56:19 UTC 2011
Keith Roberts <keith at karsites.net>

On Wed, 16 Feb 2011, Paul A wrote:

> To: 'CentOS mailing list' <centos at centos.org>
> From: Paul A <razor at meganet.net>
> Subject: Re: [CentOS] apache 2 and php 5.2
> 
> Keith/guys thanks for the suggestions, here is what I have 
> found. It shows loaded config file is /etc/php.ini but if 
> I remove that file and restart apache it still works. I 
> also did as Keith suggested I removed a comment ';' and I 
> got no errors apache started and it loaded the 
> /etc/php.ini file. It's just completely ignoring that 
> file, if its there or if its not there.

All I can think of is that you have more than one version of 
PHP installed, and it's looking in a non-standard place for 
the php.ini - possibly under /usr/php-version or 
/usr/local/php-version.

Try a file search on your system, and see how many php.ini 
files you can find there.

Eg.

[root at karsites ~]# locate php.ini
/downloads/php-src/5.2.1/php-5.2.1/php.ini-dist
/downloads/php-src/5.2.1/php-5.2.1/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/php.ini-dist
/downloads/php-src/5.2.4/php-5.2.4/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/tmp-php.ini
/downloads/php-src/5.2.5/php-5.2.5/php.ini-dist
/downloads/php-src/5.2.5/php-5.2.5/php.ini-recommended
/etc/php.ini
/etc/php.ini.bak
/etc/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini.f12.org
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.f12.org
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini.orig
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini.org
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gtk2/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gtk2/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.twin
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.twin.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini.bak
/usr/share/doc/php-common-5.3.3/php.ini-development
/usr/share/doc/php-common-5.3.3/php.ini-production

there's no shortage of them around here - but at least I 
know which one PHP is loading (I think!)

HTH

Keith

> -----------------------------------------------------------------
> Websites:
> http://www.karsites.net
> http://www.php-debuggers.net
> http://www.raised-from-the-dead.org.uk
>
> All email addresses are challenge-response protected with
> TMDA [http://tmda.net]
> -----------------------------------------------------------------
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

-- 
-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------