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 at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20110215/8c34d57a/attachment.html>
On Tue, 15 Feb 2011, Paul A wrote:> To: 'CentOS mailing list' <centos at centos.org> > From: Paul A <razor at 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 at 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 at 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 at 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] -----------------------------------------------------------------
On Tue, 15 Feb 2011, Paul A wrote:> To: 'CentOS mailing list' <centos at centos.org> > From: Paul A <razor at 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 at centos.org> > From: Paul A <razor at 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 0This 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] -----------------------------------------------------------------