Loading extensions in PHP5 php.ini
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Loading extensions in PHP5 php.ini
Ok, so I have searched a bit, and I cannot seem to find the answer I need. Here goes...
We just installed FC5 as a precursor to our eventual RHEL4 install. The core PHP configuration that comes with FC5 has a load of extensions loaded with the distro, but some that I need are not there. So I want to load these extensions. On Windows this is a snap... uncomment the lines in the ini file and make sure they are in the extensions folder. However, on Linux this seems not to be the case. My question:
How do I enable extensions in PHP5 on Linux? There are literally two .so files in the extensions directory at the moment, neither of which are the ones I want to install. What do I do?
We just installed FC5 as a precursor to our eventual RHEL4 install. The core PHP configuration that comes with FC5 has a load of extensions loaded with the distro, but some that I need are not there. So I want to load these extensions. On Windows this is a snap... uncomment the lines in the ini file and make sure they are in the extensions folder. However, on Linux this seems not to be the case. My question:
How do I enable extensions in PHP5 on Linux? There are literally two .so files in the extensions directory at the moment, neither of which are the ones I want to install. What do I do?
The extensions may ship as extra packages, e.g php_mysql or similar.
Take a look at http://fedora.redhat.com/docs/yum/en/sn ... kages.html and then search for available php modules.
Take a look at http://fedora.redhat.com/docs/yum/en/sn ... kages.html and then search for available php modules.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Okay, I might be getting somewhere. Maybe. How do you build PHP? I keep seeing these lines:
I have also seen the instruction
But regardless of where I try to execute that call, it errors out.
Code: Select all
./configure --some_mod -some-flag
make
make installCode: Select all
Do a ./configure --help to see what options you can useI have no clue of fedora, yum etc. But google knows (almost) everything 
http://www.google.de/search?hl=en&q=fed ... tnG=Search
http://fedora.redhat.com/docs/release-notes/fc4/errata/
http://www.google.de/search?hl=en&q=fed ... tnG=Search
I would give it a shot on fc5, too.7.5.2. php
Version 5.0 of PHP is now included, which includes a number of changes to the language along with significant performance improvements. Please refer to the PHP documentation for more information on migrating from PHP 4.3 to PHP 5.0:
http://www.php.net/manual/en/migration5.php
The /usr/bin/php binary is now built using the CLI command-line SAPI, rather than the CGI SAPI. Use /usr/bin/php-cgi for CGI SAPI. The php-cgi also includes FastCGI support.
The following extensions have been added:
*
The mysqli extension, a new interface designed specifically for MySQL 4.1. This is included in the php-mysql package.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Code: Select all
# php -r 'print_r(get_loaded_extensions());'
Array
(
[0] => libxml
[1] => xml
[2] => wddx
[3] => tokenizer
[4] => sysvshm
[5] => sysvsem
[6] => sysvmsg
[7] => standard
[8] => SimpleXML
[9] => sockets
[10] => SPL
[11] => shmop
[12] => session
[13] => Reflection
[14] => pspell
[15] => posix
[16] => pcntl
[17] => mime_magic
[18] => iconv
[19] => hash
[20] => gmp
[21] => gettext
[22] => ftp
[23] => exif
[24] => date
[25] => curl
[26] => ctype
[27] => calendar
[28] => bz2
[29] => zlib
[30] => pcre
[31] => openssl
[32] => ldap
)- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I did a yum search for php-mysqli and for *mysqli* and there were no matches found. Can I rebuild PHP to include those extensions? I am not at all sure how to do that.
Also, I ran a php -i from the prompt and found these in my output...
I thought when these flags were added that the extensions were loaded. Is that not the case? I am going strictly on not seeing the extensions in php.ini or any .so files in the extensions directory.
Also, I ran a php -i from the prompt and found these in my output...
Code: Select all
'--with-mysql=shared,/usr'
'--with-mysqli=shared,/usr/bin/mysql_config'
'--with-pgsql=shared'
'--enable-pdo=shared'
'--with-pdo-odbc=shared,unixODBC,/usr'
'--with-pdo-mysql=shared,/usr'
'--with-pdo-pgsql=shared,/usr'
'--with-pdo-sqlite=shared,/usr'summary of http://fedora.redhat.com/docs/release-notes/fc4/errata/ 7.5.2 php: "php-mysqli is included in the package php-mysql"Everah wrote:I did a yum search for php-mysqli and for *mysqli* and there were no matches found.
Have to tried to install the package php-mysql (without trailing i)?
I strongly adivse against compiling software on a "binary" system you're not familar with. You probably can, no sweat. But you should first get acquainted with fedora's package managment.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
If you like this sort of stuff, you'll love Gentoo (if you don't pull your hair out
)
That flashy KDE/Gnome that comes with Fedora? You have to install yourself.
Those kwirky appliances such as "Graphics Card" and "Sound Card" and even one of those new fangled pieces of technology called "Modem".. you have to install the drivers all by yourself too :p
The beauty of Gentoo lies in that you actually create your own Kernel which can encompass all the above,if you wish, so it is Blisteringly fast.
That flashy KDE/Gnome that comes with Fedora? You have to install yourself.
Those kwirky appliances such as "Graphics Card" and "Sound Card" and even one of those new fangled pieces of technology called "Modem".. you have to install the drivers all by yourself too :p
The beauty of Gentoo lies in that you actually create your own Kernel which can encompass all the above,if you wish, so it is Blisteringly fast.