Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
However when I make a change to the /etc/php.ini file it doesn't look like apache is seeing it, for example if I change the post_max_size and upload_max_file to 25M each apache still sees the default 2M. I also removed the /etc/php.ini file and apache is able to start with no problems and it will still see the default 2M.
I was wondering if anyone can tell me why apache is not taking the settings from the /etc/php.ini file and it works without that file.
Thanks, Paul
rpm -qa php
php-5.2.17-1.el5.art
rpm -qa httpd*
httpd-2.2.3-43.el5.centos.3
[root@testip5 html]# httpd -v
Server version: Apache/2.2.3
Server built: Aug 30 2010 12:32:08
Httpd -M
php5_module (shared)
php --ini
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_odbc.so' - /usr/lib/php/modules/pdo_odbc.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
Configuration File (php.ini) Path: /etc
Loaded Configuration File: (none)
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/Fileinfo.ini,
/etc/php.d/curl.ini,
/etc/php.d/dba.ini,
/etc/php.d/dbase.ini,
/etc/php.d/dom.ini,
/etc/php.d/gd.ini,
/etc/php.d/imap.ini,
/etc/php.d/json.ini,
/etc/php.d/ldap.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mcrypt.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/odbc.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_odbc.ini,
/etc/php.d/pdo_pgsql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/pgsql.ini,
/etc/php.d/soap.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlrpc.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
*snip*
I was wondering if anyone can tell me why apache is not taking the settings from the /etc/php.ini file and it works without that file.
Hi Paul.
Creat a php file with this as the contents:
<head> <title>php-info</title> </head>
<?php phpinfo(); ?>
Then load that file into your web browser.
It should produce a page showing all the active php configuration settings. Check the paths where php looks for it's php.ini files.
Obviously you need to restart apache to make the php module read the changes you have made to the php.ini file.
Putting a deliberate error in the php.ini file will confirm that you are in fact editing the correct php.ini file.
; === uncomment this line to force a php.ini parse error === ; you need to do apachectl stop [CR] apachectl start ; to force re-reading of php.ini ; 'apachectl restart' doesn't work under Linux
;-----------------------------------------------------------
If this is a busy live server, then I'm not sure how you are going to do apachectl stop then apachectl start
rpm -qa php
php-5.2.17-1.el5.art
[root@karsites ~]# rpm -qa php php-5.3.3-1.el5.remi
php --ini
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_odbc.so' - /usr/lib/php/modules/pdo_odbc.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
Configuration File (php.ini) Path: /etc
Loaded Configuration File: (none)
^^^^^^ This could be where your problem is. The above line should contain the name of the configuration file php has found and loaded, like this:
[root@karsites ~]# php --ini Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: /etc/php.d/curl.ini, /etc/php.d/dom.ini, /etc/php.d/fileinfo.ini, /etc/php.d/json.ini, /etc/php.d/mbstring.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/soap.ini, /etc/php.d/sqlite.ini, /etc/php.d/wddx.ini, /etc/php.d/xdebug.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini
[root@karsites ~]#
HTH
Keith Roberts
----------------------------------------------------------------- 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] -----------------------------------------------------------------
Keith Roberts wrote:
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
*snip*
I was wondering if anyone can tell me why apache is not taking the settings from the /etc/php.ini file and it works without that file.
Creat a php file with this as the contents:
<head> <title>php-info</title> </head>
<?php phpinfo(); ?>
Then load that file into your web browser.
And when you're done, be 100% POSITIVE that you deleted it. The attacks that are constant will be looking for it, guaranteed. (I see them all the time.)
mark
On Tue, 15 Feb 2011, m.roth@5-cent.us wrote:
To: CentOS mailing list centos@centos.org From: m.roth@5-cent.us Subject: Re: [CentOS] apache 2 and php 5.2
Keith Roberts wrote:
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
*snip*
I was wondering if anyone can tell me why apache is not taking the settings from the /etc/php.ini file and it works without that file.
Creat a php file with this as the contents:
<head> <title>php-info</title> </head>
<?php phpinfo(); ?>
Then load that file into your web browser.
And when you're done, be 100% POSITIVE that you deleted it. The attacks that are constant will be looking for it, guaranteed. (I see them all the time.)
Good point Mark. Surely it could be placed in a hidden directory, and protected with httpd.conf directives, so only localhost can access it?
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] -----------------------------------------------------------------
2011/2/16 Keith Roberts keith@karsites.net:
On Tue, 15 Feb 2011, m.roth@5-cent.us wrote:
To: CentOS mailing list centos@centos.org From: m.roth@5-cent.us Subject: Re: [CentOS] apache 2 and php 5.2
Keith Roberts wrote:
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
*snip*
I was wondering if anyone can tell me why apache is not taking the settings from the /etc/php.ini file and it works without that file.
Creat a php file with this as the contents:
<head> <title>php-info</title> </head>
<?php phpinfo(); ?>
Then load that file into your web browser.
And when you're done, be 100% POSITIVE that you deleted it. The attacks that are constant will be looking for it, guaranteed. (I see them all the time.)
Good point Mark. Surely it could be placed in a hidden directory, and protected with httpd.conf directives, so only localhost can access it?
how about running php --info from commandline?
-- Eero
On Wed, 16 Feb 2011, Eero Volotinen wrote:
*snip*
how about running php --info from commandline?
Good point Eero.
Would that not just return the basic configuration settings for the CLI version of php?
What if the OP has used a different php configuration for the apache php module, by using php configuration directives in the httpd.conf file?
These php config settings would not show up when running the CLI version of php.
Eg.
/etc/php.ini
; open_basedir, if set, limits all file operations to the ; defined directory and below. This directive makes most ; sense if used in a per-directory or per-virtualhost web server ; configuration file. This directive is *NOT* affected by ; whether Safe Mode is turned On or Off. ;
; see also /etc/httpd.conf for overriding these settings for ; the apache php module.
; for CLI PHP version only open_basedir = "./:/tmp/:/loads/of/different/paths/here/:" ;open_basedir = ""
/etc/httpd/conf/httpd.conf
#========================================================================== # APACHE ACCESS TO FILESYSTEM & SERVER DOCUMENT TREE #==========================================================================
<Directory /> Options None AllowOverride None Order Deny,Allow Deny from all
# These are the only directories which apache's PHP module # can have access to. This setting overrides the default # settings in the global php.ini file, which applies to # the CLI version of PHP. # php_admin_value open_basedir '/path/to/apache/doc_root:/another/path/to/linked/files/' php_admin_flag display_errors OFF
</Directory>
So using the httpd.conf php_admin_xxx directives, I can selectively turn on php errors for my development directories, only accessible by me (localhost). Any publicly accesible directories get php error reporting turned off.
I do my web development in a seperate protected development tree, and then push the live code into another 'accessible to all' branch.
Kind Regards,
Keith Roberts
----------------------------------------------------------------- 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] -----------------------------------------------------------------
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.
PHP Version 5.2.17
System Linux testip5.meganet.net 2.6.18-194.26.1.el5PAE #1 SMP Tue Nov 9 13:34:42 EST 2010 i686 Build Date Jan 7 2011 08:50:02 Configure Command './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc Loaded Configuration File /etc/php.ini Scan this dir for additional .ini files /etc/php.d additional .ini files parsed /etc/php.d/Fileinfo.ini, /etc/php.d/curl.ini, /etc/php.d/dba.ini, /etc/php.d/dbase.ini, /etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/odbc.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_odbc.ini, /etc/php.d/pdo_pgsql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/pgsql.ini, /etc/php.d/soap.ini, /etc/php.d/wddx.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlrpc.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety disabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed
Zend logo This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Keith Roberts Sent: Tuesday, February 15, 2011 6:01 PM To: CentOS mailing list Subject: Re: [CentOS] apache 2 and php 5.2
On Wed, 16 Feb 2011, Eero Volotinen wrote:
*snip*
how about running php --info from commandline?
Good point Eero.
Would that not just return the basic configuration settings for the CLI version of php?
What if the OP has used a different php configuration for the apache php module, by using php configuration directives in the httpd.conf file?
These php config settings would not show up when running the CLI version of php.
Eg.
/etc/php.ini
; open_basedir, if set, limits all file operations to the ; defined directory and below. This directive makes most ; sense if used in a per-directory or per-virtualhost web server ; configuration file. This directive is *NOT* affected by ; whether Safe Mode is turned On or Off. ;
; see also /etc/httpd.conf for overriding these settings for ; the apache php module.
; for CLI PHP version only open_basedir = "./:/tmp/:/loads/of/different/paths/here/:" ;open_basedir = ""
/etc/httpd/conf/httpd.conf
#========================================================================== # APACHE ACCESS TO FILESYSTEM & SERVER DOCUMENT TREE #==========================================================================
<Directory /> Options None AllowOverride None Order Deny,Allow Deny from all
# These are the only directories which apache's PHP module # can have access to. This setting overrides the default # settings in the global php.ini file, which applies to # the CLI version of PHP. # php_admin_value open_basedir '/path/to/apache/doc_root:/another/path/to/linked/files/' php_admin_flag display_errors OFF
</Directory>
So using the httpd.conf php_admin_xxx directives, I can selectively turn on php errors for my development directories, only accessible by me (localhost). Any publicly accesible directories get php error reporting turned off.
I do my web development in a seperate protected development tree, and then push the live code into another 'accessible to all' branch.
Kind Regards,
Keith Roberts
----------------------------------------------------------------- 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@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 16 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@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@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@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
No there is only on php.ini on there located in /etc/php.ini, this is so weird.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Keith Roberts Sent: Wednesday, February 16, 2011 11:56 AM To: CentOS mailing list Subject: Re: [CentOS] apache 2 and php 5.2
On Wed, 16 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@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@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.b ak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backu ps/php.ini /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backu ps/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-D BG /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-D BG.bak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-X DEBUG /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-X DEBUG.bak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini.b ak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini-DBG /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini-DBG.bak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini-XDEBUG /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini-XDEBUG.bak /home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu ps/php.ini.bak /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i ni /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i ni.bak /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i ni.f12.org /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i ni /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i ni.bak /home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i ni.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.ba k /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backup s/php.ini /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backup s/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-DB G /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DB G.bak /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XD EBUG /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XD EBUG.bak /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini.ba k /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini-DBG /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini-DBG.bak /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini-XDEBUG /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini-XDEBUG.bak /home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup s/php.ini.bak /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in i /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in i.bak /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in i.orig /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in i /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in i.bak /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in i.org /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gt k2/php.ini /home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gt k2/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@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Paul A wrote:
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Keith Roberts On Wed, 16 Feb 2011, Paul A wrote:
From: Paul A razor@meganet.net
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@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
No there is only on php.ini on there located in /etc/php.ini, this is so weird.
May we assume that you did locate php.ini ?
And *please* stop top posting.
mark
On Wed, 16 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: Re: [CentOS] apache 2 and php 5.2
No there is only on php.ini on there located in /etc/php.ini, this is so weird.
It is - very odd!
What's your file permissions for php.ini ?
Mine are:
-rw-r--r-- root root 76376 Nov 1 11:55 php.ini
Try some of these commands to identify which php you have installed:
[root@karsites ~]# rpm -qv php php-5.3.3-1.el5.remi
[root@karsites ~]# rpm -qf `which php` file /usr/local/bin/php is not owned by any package
[root@karsites ~]# ls -l /usr/local/bin/php lrwxrwxrwx 1 root root 12 Jan 1 15:25 /usr/local/bin/php -> /usr/bin/php
[root@karsites ~]# which php /usr/local/bin/php
The symlink is my own doing for when I used to compile upstream php from source tar.gz
I tried to generate a php error in my /etc/php.ini but nothing happened.
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] -----------------------------------------------------------------
I just googled httpd php.conf linux, thinking that you might need one in /etc/httpd/conf.d/, and found this. You can skip the how-to-build part, but it mentions a number of other steps, such as: cp -p php.ini-recommended /usr/local/apache/php/php.ini
http://dan.drydog.com/apache2php.html
Hope you find this useful.
mark
On Wed, 16 Feb 2011, m.roth@5-cent.us wrote:
To: CentOS mailing list centos@centos.org From: m.roth@5-cent.us Subject: Re: [CentOS] apache 2 and php 5.2
I just googled httpd php.conf linux, thinking that you might need one in /etc/httpd/conf.d/, and found this. You can skip the how-to-build part, but it mentions a number of other steps, such as: cp -p php.ini-recommended /usr/local/apache/php/php.ini
/usr/local/whatever is the default location for installing apache and php if you compile it yourself from upstream source, without specifying a --prefix="/path/to/install/to" to the ./configure command.
Here is an example configure script for php:
#! /bin/sh # # Created by configure
'./configure' \ '--with-apxs2=/usr/local/apache-2.2.6/bin/apxs' \ '--prefix=/usr/local/php-5.2.4' \ '--bindir=/usr/local/bin' \ '--enable-shared=all' \ '--without-pear' \ '--with-mysql=shared' \ '--with-mysql-sock=/var/lib/databases/mysql/mysql.sock' \ '--with-mysqli=shared' \ '--with-pgsql=/usr/local/postgresql-8.2.5/bin' \ '--with-xsl' \ '--with-zlib-dir=/usr/include' \ '--with-readline' \ "$@"
That would then put php.ini into /usr/local/php-5.2.4/lib/php.ini
See my guide on the homepage of www.php-debuggers.net for some more help.
Kind Regards,
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] -----------------------------------------------------------------
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
It might be worth removing all php packages, and doing a fresh install of php 5. Is that too much trouble?
Start with a clean slate, so to speak?
Kind Regards,
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] -----------------------------------------------------------------
On Tue, 15 Feb 2011, Paul A wrote:
To: 'CentOS mailing list' centos@centos.org From: Paul A razor@meganet.net Subject: [CentOS] apache 2 and php 5.2
Hi originally I installed php 4 on centos 5.5 and then a few repos including the remi repo to upgrade to php5, which seems to upgrade/work without any issues.
However when I make a change to the /etc/php.ini file it doesn't look like apache is seeing it, for example if I change the post_max_size and upload_max_file to 25M each apache still sees the default 2M. I also removed the /etc/php.ini file and apache is able to start with no problems and it will still see the default 2M.
...
php --ini
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_odbc.so' - /usr/lib/php/modules/pdo_odbc.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
This could indicate a conflict in the installation - the fact that PHP is looking for a missing library file.
I'm sure your installation of PHP and/or apache is trashed :(
It's *easy done* when mixing repos, if you don't take great care with your yum priorities.
Do you have multiple versions of apache packages installed somehow?
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] -----------------------------------------------------------------