PHP doesn't work with Apache2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello guys,

I've had two (or three) versions installed on my Fedora linux server. 
It seems I've had something installed when I just rented server, after 
that I've tried to upgrade by building PHP from source.

PHP, installed with yum (before upgrading) had 5.1.6 version. 
When I ran phpinfo(), browser displayed this version. But when 
I ran "php -v" in command line, it displayed 5.2.5 version.

I've got this error when server booted up:

Quote:
[20-Nov-2007 03:27:30] PHP Warning: PHP Startup: json: Unable 
to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=0
PHP compiled with module API=20050922, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
So, I've removed old version(s):

Quote:
rpm -qa | grep php
rpm -e *package*

yum remove php
Then I've downloaded latest version of PHP 5.2.5 and installed it. 
I've copied configuration list that yum uses for older version:

Quote:
./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-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/lib64
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com
--mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache
--with-libdir=lib64 --with-config-file-path=/etc
--with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic
--disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin
--with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf
--without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr
--with-openssl --with-png --with-pspell --with-expat-dir=/usr
--with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp
--enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp
--enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr
--enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio
--with-mime-magic=/usr/share/file/magic.mime --without-sqlite
--with-libxml-dir=/usr --with-xml --with-apxs2=/usr/sbin/apxs --without-mysql
--without-gd --without-odbc --disable-dom --disable-dba --without-unixODBC
--disable-pdo --disable-xmlreader --disable-xmlreader --disable-xmlwriter


make clean
make
make install
After that PHP doesn't work with Apache2. Whe I try to load 
any .php page, I get PHP source code as simple text instead 
of result of executed PHP code.

When I install PHP with yum again, it works.

I wonder how can I install latest PHP from source? How to fix 
the problem with Apache2?

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux