Help - Search - Members - Calendar
Full Version: how do I change the PHP configuration?
The Planet Forums > System Administration > Web Hosting
jweiss
I'm having a short somewhere in my head tonight. I can't for the life of me remember how to change the start up configuration of PHP. I'm running CentOS Enterprise 4.7, WHM/cPanel 11.3, and PHP 5.2.6.

Currently php's info() is showing --disable-pdo and I'm wanting to enable it. And I know I've done this before for other commands, but I'm drawing a blank tonight on how I did it.
Catalyst
Is php-pdo even installed?
jweiss
Hmm... good call, it doesn't look like it is. That is, I checked the extension_dir specified in my php.ini file and there weren't any files by that name in there.

So I tried
QUOTE
pecl install pdo


And it kicked out the following, which includes a nice error message.

QUOTE
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
building in /var/tmp/pear-build-root/PDO-1.0.3
running: /root/tmp/pear/temp/PDO/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/temp/PDO/configure' failed


So, I guess my next question is how do I fix the C compiler error?
Oh, and where is the config.log located at that it refers to?
Catalyst
`yum install php-pdo`
jweiss
QUOTE (Catalyst @ Nov 3 2008, 05:21 AM) *
`yum install php-pdo`


Thanks for helping, it looks like I need it more that I thought. I'm beginning to think I must have messed up some things somewhere along the way, because that didn't work either. Here's the output on that command:

QUOTE
# yum install php-pdo
Setting up Install Process
Setting up repositories
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
No Match for argument: php-pdo
Nothing to do
Catalyst
Which OS and php version are you using?
jweiss
QUOTE (Catalyst @ Nov 3 2008, 10:20 AM) *
Which OS and php version are you using?


CentOS Enterprise 4.7, WHM/cPanel 11.3, and PHP 5.2.6
Catalyst
If php-pdo isn't available to compile in the Control Panel then it's not gonna be so easy... go to your Apache compilation directory ... copy the head of your php info ... then `./configure [paste all that] '--with-pdo' '--with-pdo-mysql'` ... and pray.
jweiss
QUOTE (Catalyst @ Nov 3 2008, 10:38 AM) *
If php-pdo isn't available to compile in the Control Panel then it's not gonna be so easy... go to your Apache compilation directory ... copy the head of your php info ... then `./configure [paste all that] '--with-pdo' '--with-pdo-mysql'` ... and pray.


Okay, I've got PDO installed and PHP configured with it. Still not sure why I get the C compiler error when I try to install things using PECL. Thanks for the help Catalyst.

Now... on to installing Zend Framework!!! icon_smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.