[SWLUG] Apache PHP modules
Peter Bradley
apvx95 at dsl.pipex.com
Tue Jul 4 17:33:17 UTC 2006
Jonathan Wright wrote:
>
> Must admit - I find it very unusual that they'd just be executables -
> esp. for stuff like MySQL as it's all built in (or at least should be!).
*Long post*. My apologies...
Well, mysql support was built into php4, but it was taken out of php5
and implemented as a separate module.
Here's a sample of the listings of the two extensions directories, and
you'll see what I meant by executables and .so files. However, the
output of the `file` command says they are, in fact, all shared
libraries. Hmmm.... Suggests one's for php4 and one's for php5, but
altering the line php.ini doesn't fix the problem. Hmm...
peter at linux:/usr/lib64/php/extensions> ls -l
total 3246
-rwxr-xr-x 1 root root 33464 2005-09-13 03:14 bcmath.so
-rwxr-xr-x 1 root root 15992 2005-09-13 03:14 bz2.so
-rwxr-xr-x 1 root root 29784 2005-09-13 03:14 calendar.so
-rwxr-xr-x 1 root root 12272 2005-09-13 03:14 ctype.so
-rwxr-xr-x 1 root root 34976 2005-09-13 03:14 curl.so
-rwxr-xr-x 1 root root 30952 2005-09-13 03:14 dbase.so
-rwxr-xr-x 1 root root 58112 2005-09-13 03:14 dbx.so
-rwxr-xr-x 1 root root 103736 2005-09-13 03:14 domxml.so
-rwxr-xr-x 1 root root 59968 2006-06-20 11:47 exif.so
-rwxr-xr-x 1 root root 13272 2005-09-13 03:14 filepro.so
-rwxr-xr-x 1 root root 45480 2005-09-13 03:14 ftp.so
-rwxr-xr-x 1 root root 338528 2006-06-20 11:47 gd.so
-rwxr-xr-x 1 root root 13632 2005-09-13 03:14 gettext.so
-rwxr-xr-x 1 root root 41392 2005-09-13 03:14 gmp.so
-rwxr-xr-x 1 root root 13008 2005-09-13 03:14 iconv.so
-rwxr-xr-x 1 root root 100040 2005-09-13 03:14 imap.so
-rwxr-xr-x 1 root root 45712 2005-09-13 03:14 ldap.so
-rwxr-xr-x 1 root root 1621248 2006-06-20 11:47 mbstring.so
-rwxr-xr-x 1 root root 53488 2005-09-13 03:14 mcal.so
-rwxr-xr-x 1 root root 38960 2005-09-13 03:14 mcrypt.so
-rwxr-xr-x 1 root root 11424 2005-09-13 03:14 mhash.so
-rwxr-xr-x 1 root root 20520 2005-09-13 03:14 mime_magic.so
-rwxr-xr-x 1 root root 51536 2005-09-13 03:14 mysql.so
-rwxr-xr-x 1 root root 89552 2005-09-13 03:14 pgsql.so
-rwxr-xr-x 1 root root 21512 2005-09-13 03:14 qtdom.so
-rwxr-xr-x 1 root root 54832 2005-09-13 03:14 session.so
-rwxr-xr-x 1 root root 10200 2005-09-13 03:14 shmop.so
-rwxr-xr-x 1 root root 26256 2005-09-13 03:14 snmp.so
-rwxr-xr-x 1 root root 46568 2005-09-13 03:14 sockets.so
-rwxr-xr-x 1 root root 9488 2005-09-13 03:14 sysvsem.so
-rwxr-xr-x 1 root root 13376 2005-09-13 03:14 sysvshm.so
-rwxr-xr-x 1 root root 66296 2006-06-20 11:47 unixODBC.so
-rwxr-xr-x 1 root root 29752 2005-09-13 03:14 wddx.so
-rwxr-xr-x 1 root root 32944 2005-09-13 03:14 xslt.so
-rwxr-xr-x 1 root root 15960 2005-09-13 03:14 yp.so
-rwxr-xr-x 1 root root 29856 2005-09-13 03:14 zlib.so
peter at linux:/usr/lib64/php/extensions> file mysql.so
mysql.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV),
stripped
peter at linux:/usr/lib64/php/extensions> cd ../../php5/extensions
peter at linux:/usr/lib64/php5/extensions> ls -l
total 4234
-rw-r--r-- 1 root root 35176 2005-09-13 02:36 bcmath
-rw-r--r-- 1 root root 16080 2005-09-13 02:36 bz2
-rw-r--r-- 1 root root 29904 2005-09-13 02:36 calendar
-rw-r--r-- 1 root root 12208 2005-09-13 02:36 ctype
-rw-r--r-- 1 root root 49672 2005-09-13 02:36 curl
-rw-r--r-- 1 root root 32768 2005-09-13 02:36 dbase
-rw-r--r-- 1 root root 63128 2005-09-13 02:36 dbx
-rw-r--r-- 1 root root 16656 2005-09-13 02:36 dio
-rw-r--r-- 1 root root 151384 2005-09-13 02:36 dom
-rw-r--r-- 1 root root 59960 2006-06-08 18:07 exif
-rw-r--r-- 1 root root 12048 2005-09-13 02:36 fam
-rw-r--r-- 1 root root 14000 2005-09-13 02:36 filepro
-rw-r--r-- 1 root root 45952 2005-09-13 02:36 ftp
-rw-r--r-- 1 root root 336304 2006-06-08 18:07 gd
-rw-r--r-- 1 root root 13520 2005-09-13 02:36 gettext
-rw-r--r-- 1 root root 41680 2005-09-13 02:36 gmp
-rw-r--r-- 1 root root 34096 2005-09-13 02:36 iconv
-rw-r--r-- 1 root root 97680 2005-09-13 02:36 imap
-rw-r--r-- 1 root root 46320 2005-09-13 02:36 ldap
-rw-r--r-- 1 root root 1864640 2006-06-08 18:07 mbstring
-rw-r--r-- 1 root root 37680 2005-09-13 02:36 mcrypt
-rw-r--r-- 1 root root 11472 2005-09-13 02:36 mhash
-rw-r--r-- 1 root root 53712 2005-09-13 02:36 mysql
-rw-r--r-- 1 root root 106000 2006-06-08 18:07 mysqli
-rw-r--r-- 1 root root 83576 2005-09-13 02:36 ncurses
-rw-r--r-- 1 root root 66160 2005-09-13 02:36 odbc
-rw-r--r-- 1 root root 80912 2005-09-13 02:36 openssl
-rw-r--r-- 1 root root 20192 2005-09-13 02:36 pcntl
-rw-r--r-- 1 root root 90992 2005-09-13 02:36 pgsql
-rw-r--r-- 1 root root 22384 2005-09-13 02:36 posix
-rw-r--r-- 1 root root 25200 2005-09-13 02:36 pspell
-rw-r--r-- 1 root root 10224 2005-09-13 02:36 shmop
-rw-r--r-- 1 root root 28912 2006-06-08 18:07 snmp
-rw-r--r-- 1 root root 275848 2005-09-13 02:36 soap
-rw-r--r-- 1 root root 41776 2005-09-13 02:36 sockets
-rw-r--r-- 1 root root 60600 2005-09-13 02:36 sqlite
-rw-r--r-- 1 root root 14256 2005-09-13 02:36 sysvmsg
-rw-r--r-- 1 root root 9232 2005-09-13 02:36 sysvsem
-rw-r--r-- 1 root root 12880 2005-09-13 02:36 sysvshm
-rw-r--r-- 1 root root 15376 2005-09-13 02:36 tokenizer
-rw-r--r-- 1 root root 34096 2005-09-13 02:36 wddx
-rw-r--r-- 1 root root 91864 2005-09-13 02:36 xmlrpc
-rw-r--r-- 1 root root 26080 2005-09-13 02:36 xsl
-rw-r--r-- 1 root root 15920 2005-09-13 02:36 yp
-rw-r--r-- 1 root root 26336 2005-09-13 02:36 zlib
peter at linux:/usr/lib64/php5/extensions> file mysql
mysql: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped
> However, looking at the error message may give some clues:
>
> Module compiled with module API=20020429, debug=0, thread-safety=0
> PHP compiled with module API=20041030, debug=0, thread-safety=0
>
> The API values parse as dates, and given that 2002 is around the time
> of PHP4, and 2004 is the time of PHP5, it looks like your system it
> trying to load PHP4 modules into PHP5 - hence the error.
>
> Can you check to make sure your CGI PHP is at version 5, or (probably
> better) that all your PHP installations (and associated modules, if
> installed separately) are at the version.
>
The only modules with cgi in their name that I have installed are:
apache2-mod_fastcgi v2.4.2 (64 bit)
php-fastcgi (5.0.4, which apparently includes versions for ppc, i586,
and x86_64)
Here is the output of rpm -qa --qf "%{NAME} %{VERSION} %{RELEASE}
%{DISTRIBUTION}\n" \*php\* :
php4-ctype 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-mcrypt 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-snmp 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-zlib 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-devel 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-mhash 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-posix 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-sysvsem 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php4-pear 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-mbstring 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php4-mbstring 4.4.0 6.15 SUSE LINUX 10.0 (X86-64)
php4-dbx 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-iconv 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-mysql 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-sysvshm 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-calendar 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-iconv 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-ncurses 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-wddx 5.0.4 9 SUSE LINUX 10.0 (X86-64)
phplib 7.4 79 SUSE LINUX 10.0 (i586)
apache2-mod_php5 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php5-snmp 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php4 4.4.0 6.15 SUSE LINUX 10.0 (X86-64)
selfphp 2.0 2 SUSE LINUX 10.0 (i586)
php4-bz2 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-dbase 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-filepro 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-gmp 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-mime_magic 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-session 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-sysvsem 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-xslt 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-exif 4.4.0 6.15 SUSE LINUX 10.0 (X86-64)
php5-bz2 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-dbase 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-dom 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-filepro 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-gmp 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-pcntl 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-shmop 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-sqlite 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-tokenizer 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-yp 5.0.4 9 SUSE LINUX 10.0 (X86-64)
mod_php4-core 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-fastcgi 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php5-pear 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php-doc 5.0.3 4 SUSE LINUX 10.0 (i586)
php4-bcmath 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-curl 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-gettext 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-ldap 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-mhash 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-qtdom 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-sockets 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-gd 4.4.0 6.15 SUSE LINUX 10.0 (X86-64)
phpMyAdmin 2.7.0pl2 1.6 SUSE LINUX 10.0 (i586)
php4-wddx 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-bcmath 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-curl 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-dio 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-gettext 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-ldap 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-mysql 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-openssl 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-pspell 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-sockets 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-sysvshm 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-xsl 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-exif 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php5-mysqli 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php4-domxml 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-imap 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-pgsql 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-ctype 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-fam 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-imap 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-odbc 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-soap 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-xmlrpc 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php4-calendar 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-ftp 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-mcal 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-shmop 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php4-yp 4.4.0 6 SUSE LINUX 10.0 (X86-64)
php5-dbx 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-ftp 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-mcrypt 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-pgsql 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-sysvmsg 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-zlib 5.0.4 9 SUSE LINUX 10.0 (X86-64)
php5-gd 5.0.4 9.13 SUSE LINUX 10.0 (X86-64)
php4-unixODBC 4.4.0 6.15 SUSE LINUX 10.0 (X86-64)
In my http service configuration (via YaST), PHP4 is disabled.
Here's the output of `locate php.ini`
peter at linux:/usr/lib64/php/extensions> locate php.ini
/etc/php.ini
/etc/php.ini-zend_studio_server.bak
/etc/php.ini.rpmnew
/etc/php.ini.rpmsave
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini
/etc/php5/fastcgi/php.ini
/php.ini
/php.ini-zend_platform.bak
/usr/local/Zend/etc/php.ini
/usr/local/Zend/etc/php.ini.twin
/usr/local/Zend/ZendStudio-5.2.0/bin/php4/php.ini
/usr/local/Zend/ZendStudio-5.2.0/bin/php5/php.ini
/usr/local/Zend/ZendStudio-5.2.0/bin/phpdocumentor/php.ini
The /etc/php.ini file is actually a symlink to
/usr/local/Zend/etc/php.ini, because I have Zend Studio installed, as is
the one in the root directory.
Does any of this suggest anything to you? It has me completely foxed.
Peter
More information about the Swlug
mailing list