![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use Suexec with Apache2 ? | kernings | UNIX for Dummies Questions & Answers | 1 | 03-10-2008 10:41 PM |
| install apache2 in bsd 6.2 | tamayo | BSD | 2 | 12-04-2007 03:29 PM |
| apache2 ldap | hassan1 | SuSE | 0 | 01-29-2006 01:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
apache2 & two php versions, how to use specific version
Hi all,
I have my Debian web server, where apache2 and php 5.2.0 are installed from debian package. It worked fine, both in CLI & Browser. Recently i installed the php 5.2.9 from the source. To verify it i executed the "php --version" and it is showing 5.2.9 . But in the browser still it is showing the older version ? Why apache2 will not take the newest php version by default ? And now how i can insist apache2 to use this php version ? Kindly guide me. |
|
||||
|
The version that is loaded by Apache is determined by the version that is seen by Apache, i.e. the one that is dumped in the Apache modules directory. If your installed version does not overwrite the one in that directory (presumably installed from the package tree), the distribution's version will be served.
Whether you can use your compiled version depends on whether your compile process has created a libphp5.so. If there is one, you can then try to overwrite and see if it works. If you compile PHP as CLI or CGI, then you will not get that shared library. Then you will need to recompile your PHP. For details, please check the PHP manual for compilation hints. |
|
||||
|
Yes, you are right that the current compilation has not generated the libphp5.so, bcoz i did is
./configure make && make install which has not created any libphp5.so file. So i tried doing, ./configure --with-apxs I believe this is the way to create the libphp5.so ? Am i right in saying this ?? And while doing make i am facing the following error ? make: *** [sapi/apache2handler/mod_php5.lo] Error 1 I searched, and tried hard to rectify the error and no progress in it. --- Actually i have Debian Etch, where there is no package for the php 5.2.9 so i am installing from source which is making these issues ... Please help me solving the above issue, and guide me in installing 5.2.9 in Debian Etch 3.0 . Any help is appreciated ! |
|
||||
|
Any additional error messages above that line? I guess you may have omitted some. You should be quoting all the relevant error messages or no one will be able to help you. Thank you.
By the way, you probably want to try --with-apxs2 if you have Apache 2. PHP: Apache 2.0 on Unix systems - Manual |
|
||||
|
Thanks for your time.
This is the command which i give in the dir "./php-5.2.9". $ ./configure --with-apxs2 This got executed successfully and while executing make i face the following error, In file included from /root/php-5.2.9/sapi/apache2handler/mod_php5.c:26: /root/php-5.2.9/sapi/apache2handler/php_apache.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php5_module' /root/php-5.2.9/sapi/apache2handler/php_apache.h:38: error: expected specifier-qualifier-list before 'apr_bucket_brigade' /root/php-5.2.9/sapi/apache2handler/php_apache.h:51: error: expected ')' before '*' token /root/php-5.2.9/sapi/apache2handler/php_apache.h:52: error: expected ')' before '*' token /root/php-5.2.9/sapi/apache2handler/php_apache.h:56: error: expected ')' before '*' token /root/php-5.2.9/sapi/apache2handler/mod_php5.c:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'module' make: *** [sapi/apache2handler/mod_php5.lo] Error 1 What could be the issue ? |
|
||||
|
This is unusual.
Are you sure you have run this from a clean source tree? That is, either you run a "make distclean" before you try "configure - make" again, or you try again with a source tree extracted fresh from tarball. |
|
||||
|
I still face the same error, i downloaded the source from php.net.
1. Source Extracted: I extracted the source fresh from the tar ball. 2. configure configured it as, Code:
./configure --with-apxs2=/usr/bin/apxs while executing make, the following is the last part of the error. Code:
/bin/sh /root/sathiya/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/sathiya/php-5.2.9/meta_ccld -IZend/ -I/root/sathiya/php-5.2.9/Zend/ -DPHP_ATOM_INC -I/root/sathiya/php-5.2.9/include -I/root/sathiya/php-5.2.9/main -I/root/sathiya/php-5.2.9 -I/usr/include/libxml2 -I/root/sathiya/php-5.2.9/ext/date/lib -I/root/sathiya/php-5.2.9/TSRM -I/root/sathiya/php-5.2.9/Zend -D_REENTRANT -I/usr/include -g -O2 -pthread -DZTS -prefer-non-pic -c /root/sathiya/php-5.2.9/Zend/zend_object_handlers.c -o Zend/zend_object_handlers.lo /bin/sh /root/sathiya/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/sathiya/php-5.2.9/meta_ccld -IZend/ -I/root/sathiya/php-5.2.9/Zend/ -DPHP_ATOM_INC -I/root/sathiya/php-5.2.9/include -I/root/sathiya/php-5.2.9/main -I/root/sathiya/php-5.2.9 -I/usr/include/libxml2 -I/root/sathiya/php-5.2.9/ext/date/lib -I/root/sathiya/php-5.2.9/TSRM -I/root/sathiya/php-5.2.9/Zend -D_REENTRANT -I/usr/include -g -O2 -pthread -DZTS -prefer-non-pic -c /root/sathiya/php-5.2.9/Zend/zend_objects_API.c -o Zend/zend_objects_API.lo /bin/sh /root/sathiya/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/sathiya/php-5.2.9/meta_ccld -IZend/ -I/root/sathiya/php-5.2.9/Zend/ -DPHP_ATOM_INC -I/root/sathiya/php-5.2.9/include -I/root/sathiya/php-5.2.9/main -I/root/sathiya/php-5.2.9 -I/usr/include/libxml2 -I/root/sathiya/php-5.2.9/ext/date/lib -I/root/sathiya/php-5.2.9/TSRM -I/root/sathiya/php-5.2.9/Zend -D_REENTRANT -I/usr/include -g -O2 -pthread -DZTS -prefer-non-pic -c /root/sathiya/php-5.2.9/Zend/zend_default_classes.c -o Zend/zend_default_classes.lo /bin/sh /root/sathiya/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/sathiya/php-5.2.9/meta_ccld -IZend/ -I/root/sathiya/php-5.2.9/Zend/ -DPHP_ATOM_INC -I/root/sathiya/php-5.2.9/include -I/root/sathiya/php-5.2.9/main -I/root/sathiya/php-5.2.9 -I/usr/include/libxml2 -I/root/sathiya/php-5.2.9/ext/date/lib -I/root/sathiya/php-5.2.9/TSRM -I/root/sathiya/php-5.2.9/Zend -D_REENTRANT -I/usr/include -g -O2 -pthread -DZTS -prefer-non-pic -c /root/sathiya/php-5.2.9/Zend/zend_execute.c -o Zend/zend_execute.lo /bin/sh /root/sathiya/php-5.2.9/libtool --silent --preserve-dup-deps --mode=compile /root/sathiya/php-5.2.9/meta_ccld -DLINUX=22 -DEAPI -DTARGET="apache" -DHAVE_SET_DUMPABLE -DDB_DBM_HSEARCH=1 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/apache-1.3 -Isapi/apache2handler/ -I/root/sathiya/php-5.2.9/sapi/apache2handler/ -DPHP_ATOM_INC -I/root/sathiya/php-5.2.9/include -I/root/sathiya/php-5.2.9/main -I/root/sathiya/php-5.2.9 -I/usr/include/libxml2 -I/root/sathiya/php-5.2.9/ext/date/lib -I/root/sathiya/php-5.2.9/TSRM -I/root/sathiya/php-5.2.9/Zend -D_REENTRANT -I/usr/include -g -O2 -pthread -DZTS -prefer-non-pic -c /root/sathiya/php-5.2.9/sapi/apache2handler/mod_php5.c -o sapi/apache2handler/mod_php5.lo In file included from /root/sathiya/php-5.2.9/sapi/apache2handler/mod_php5.c:26: /root/sathiya/php-5.2.9/sapi/apache2handler/php_apache.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'php5_module' /root/sathiya/php-5.2.9/sapi/apache2handler/php_apache.h:38: error: expected specifier-qualifier-list before 'apr_bucket_brigade' /root/sathiya/php-5.2.9/sapi/apache2handler/php_apache.h:51: error: expected ')' before '*' token /root/sathiya/php-5.2.9/sapi/apache2handler/php_apache.h:52: error: expected ')' before '*' token /root/sathiya/php-5.2.9/sapi/apache2handler/php_apache.h:56: error: expected ')' before '*' token /root/sathiya/php-5.2.9/sapi/apache2handler/mod_php5.c:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'module' make: *** [sapi/apache2handler/mod_php5.lo] Error 1 |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|