By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 739 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Installing PHP 5 under /home: how to?

P: n/a
I have a user account on a RH Linux machine but no root access.

I succesfully installed apache 1.3 under my /home/ account but can't
get PHP to install properly.

I have done the following steps:

#1 compiled and installed apache using --prefix=/home/imbeauje/apache.
Tested that it works.

#2 compiled and installed php using

../configure --with-apache=/home/imbeauje/apache_1.3.31
--prefix=/home/imbeauje/php

#3 added to http.conf LoadModule php5_module libexec/libphp5.so
At this point trying to run apache gives the following error:

Cannot load /home/imbeauje/apache/libexec/libphp5.so into server:
/home/imbeauje/apache/libexec/libphp5.so: cannot open shared object
file: No such file or directory
I commented out the LoadModule line and the error disappeared.

#4 added AddType application/x-httpd-php .php to http.conf

At this point I can start apache but trying to load up a .php file
makes my browser through up a 'save file as' dialog ...

What did I miss?

Thanks!
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jean-Christian Imbeault wrote:
I have a user account on a RH Linux machine but no root access.

I succesfully installed apache 1.3 under my /home/ account but can't
get PHP to install properly.

I have done the following steps:

#1 compiled and installed apache using --prefix=/home/imbeauje/apache.
Tested that it works.

#2 compiled and installed php using

./configure --with-apache=/home/imbeauje/apache_1.3.31
--prefix=/home/imbeauje/php

#3 added to http.conf LoadModule php5_module libexec/libphp5.so
At this point trying to run apache gives the following error:

Cannot load /home/imbeauje/apache/libexec/libphp5.so into server:
/home/imbeauje/apache/libexec/libphp5.so: cannot open shared object
file: No such file or directory
I commented out the LoadModule line and the error disappeared.

#4 added AddType application/x-httpd-php .php to http.conf

At this point I can start apache but trying to load up a .php file
makes my browser through up a 'save file as' dialog ...

What did I miss?

Thanks!


I assume (right?) make and make install went without shocking errors ?
Does apache have proper rights (rx) to /home/imbeauje/apache/exec/ AND
libphp5.so ?
Is the .so file actually in that directory ? (I know, sounds silly, but how
often people simply forgot to check..)
Where does your apache serverroot point to ? Tried supplying the full path
to libphp5.so too?

If you did not load the php module I am not surprised you get a save-as.
After all, what else could apache do with it ? Or am I the silly one now ?
It's been a hot day, brain is cooked.

Well sofar what I can come up with without digging deeper. Good luck!
HTH
Pjotr.
Jul 17 '05 #2

P: n/a
"Pjotr Wedersteers" <x3****@westerterp.com> wrote in message news:<41**********************@news.xs4all.nl>...
I assume (right?) make and make install went without shocking errors ?
Correct.

Installing PHP SAPI module: apache
Installing PHP CLI binary: /home/imbeauje/php/bin/
Installing PHP CLI man page: /home/imbeauje/php/man/man1/
Installing PEAR environment: /home/imbeauje/php/lib/php/
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.3.2
Wrote PEAR system config file at: /home/imbeauje/php/etc/pear.conf
You may want to add: /home/imbeauje/php/lib/php to your php.ini
include_path
[PEAR] XML_RPC - already installed: 1.1.0
Installing build environment: /home/imbeauje/php/lib/php/build/
Installing header files: /home/imbeauje/php/include/php/
Installing helper programs: /home/imbeauje/php/bin/
program: phpize
program: php-config
program: phpextdist
[imbeauje@tkrndapd2 ~/php-5.0.0]$ ls ../apache/libexec/
httpd.exp
Does apache have proper rights (rx) to /home/imbeauje/apache/exec/ AND
libphp5.so ?
There is no apache/exec dir but there is an apache/libexec, is that
what you meant?
Is the .so file actually in that directory ? (I know, sounds silly, but how
often people simply forgot to check..)
I can't find a libphp5.so file anywhere, even in apache/libexec.
Where does your apache serverroot point to ?
ServerRoot "/home/imbeauje/apache"
Tried supplying the full path to libphp5.so too?
How?
Well sofar what I can come up with without digging deeper. Good luck!


Looks like I am missing a step in the installation? No libphp5.so is
definitely not a good thing ...

Jc
Jul 17 '05 #3

P: n/a
Jean-Christian Imbeault wrote:
"Pjotr Wedersteers" <x3****@westerterp.com> wrote in message
news:<41**********************@news.xs4all.nl>...
I assume (right?) make and make install went without shocking errors
?


Correct.

Installing PHP SAPI module: apache
Installing PHP CLI binary: /home/imbeauje/php/bin/
Installing PHP CLI man page: /home/imbeauje/php/man/man1/
Installing PEAR environment: /home/imbeauje/php/lib/php/
[PEAR] Archive_Tar - already installed: 1.1
[PEAR] Console_Getopt - already installed: 1.2
[PEAR] PEAR - already installed: 1.3.2
Wrote PEAR system config file at: /home/imbeauje/php/etc/pear.conf
You may want to add: /home/imbeauje/php/lib/php to your php.ini
include_path
[PEAR] XML_RPC - already installed: 1.1.0
Installing build environment: /home/imbeauje/php/lib/php/build/
Installing header files: /home/imbeauje/php/include/php/
Installing helper programs: /home/imbeauje/php/bin/
program: phpize
program: php-config
program: phpextdist
[imbeauje@tkrndapd2 ~/php-5.0.0]$ ls ../apache/libexec/
httpd.exp
Does apache have proper rights (rx) to /home/imbeauje/apache/exec/
AND libphp5.so ?


There is no apache/exec dir but there is an apache/libexec, is that
what you meant?
Is the .so file actually in that directory ? (I know, sounds silly,
but how often people simply forgot to check..)


I can't find a libphp5.so file anywhere, even in apache/libexec.
Where does your apache serverroot point to ?


ServerRoot "/home/imbeauje/apache"
Tried supplying the full path to libphp5.so too?


How?
Well sofar what I can come up with without digging deeper. Good luck!


Looks like I am missing a step in the installation? No libphp5.so is
definitely not a good thing ...

Jc


Try: locate libphp
Probably the required .so (shared object) file pops up, I would guess in one
of the PHP directories.
copy that file to the aforementioned libexec directory.

I also found this on a similar problem someone had compiling/installing PHP4
on linux : http://bugs.php.net/bug.php?id=9036
A quote from that page : "Yes, of course using --with-apxs makes a
difference. Without that
option you will never get a libphp4.so, you simply get a php binary.
Please read the installation instructions"

Maybe here's your solution too ??
good Luck jean!
Pjotr
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.