Solved

PHP 5.1.6 configuration over apache 2.0.59

Posted on 2006-10-19
5
268 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
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now