Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP 5.1.6 configuration over apache 2.0.59

Posted on 2006-10-19
5
Medium Priority
?
305 Views
Last Modified: 2008-01-16
Hi all,

         I have installed php 5.1.6 and apache 2.0.59 on AIX box, and i have modified the httpd.conf file for php 5 as shown below

./configure --prefix=$BASE/php --with-config-file-path=$BASE/php --with-apxs2=$BAP/bin/apxs

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

php_value max_execution_time 0

DirectoryIndex index.html index.htm index.php

when i access the php pages, source code is displayed, rather than web page, means php code is not compiled

am i missing anything in configuring the conf file

Please suggest
0
Comment
Question by:nexus12345
5 Comments
 
LVL 15

Expert Comment

by:babuno5
ID: 17767301
just to make sure have u followed the following step to install php

1  ./configure  with required options
2  make
3  make install

then make changes in the http.conf

then restart the apache server
0
 

Author Comment

by:nexus12345
ID: 17767348
i have not run the third command make install

instead i just copied the following files

cp .libs/libphp5.so /usr/local/apache2/modules
cp php.ini-recommended /usr/local/apache2/conf/php.ini

when i start the server i am able to see php version along with apache version at the bottom of the page

make install returned following error

/opt/apache/test/2.0.59//build/instdso.sh SH_LIBTOOL='/opt/apache/test/2.0.59//build/libtool' libphp5.la /opt/apache/test/2.0.59//modules
rm -f /opt/apache/test/2.0.59//modules/libphp5.so
/opt/apache/test/2.0.59//build/libtool --mode=install cp libphp5.la /opt/apache/test/2.0.59//modules/
cp .libs/libphp5.a /opt/apache/test/2.0.59//modules/libphp5.a
cp .libs/libphp5.lai /opt/apache/test/2.0.59//modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /home/ssendhil/php-5.1.6/libs'
chmod 755 /opt/apache/test/2.0.59//modules/libphp5.so
chmod: /opt/apache/test/2.0.59//modules/libphp5.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.

so i copied directly the files as suggested in the link http://www.pseriestech.org/forum/tutorials/compiling-apache2-php-5-1-a-105.html



0
 
LVL 2

Accepted Solution

by:
jkiefner earned 1000 total points
ID: 17769231
rename the libphp5.so file you copied to the apache directory. sometimes php make install will see it and just modifiy it rather than create a new one.
do a find apxs and make not of the location of the apache apxs file. should be something like /usr/sbin/apxs.
run buildconf --force
when you run ./configure, add --with-apxs2=/<location of your apxs file>  also you probably need to add --prefix=/opt since i believe the default is /usr/local.
run make
make install
see if that doesn't clear up the apxs error.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question