Installing PHP 5 under /home: how to?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jean-Christian Imbeault

    Installing PHP 5 under /home: how to?

    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!
  • Pjotr Wedersteers

    #2
    Re: Installing PHP 5 under /home: how to?

    Jean-Christian Imbeault wrote:[color=blue]
    > 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![/color]

    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.


    Comment

    • Jean-Christian Imbeault

      #3
      Re: Installing PHP 5 under /home: how to?

      "Pjotr Wedersteers" <x33159@westert erp.com> wrote in message news:<411541f8$ 0$6968$e4fe514c @news.xs4all.nl >...[color=blue]
      > I assume (right?) make and make install went without shocking errors ?[/color]

      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@tkrnda pd2 ~/php-5.0.0]$ ls ../apache/libexec/
      httpd.exp
      [color=blue]
      > Does apache have proper rights (rx) to /home/imbeauje/apache/exec/ AND
      > libphp5.so ?[/color]

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

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

      ServerRoot "/home/imbeauje/apache"
      [color=blue]
      > Tried supplying the full path to libphp5.so too?[/color]

      How?
      [color=blue]
      > Well sofar what I can come up with without digging deeper. Good luck![/color]

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

      Jc

      Comment

      • Pjotr Wedersteers

        #4
        Re: Installing PHP 5 under /home: how to?

        Jean-Christian Imbeault wrote:[color=blue]
        > "Pjotr Wedersteers" <x33159@westert erp.com> wrote in message
        > news:<411541f8$ 0$6968$e4fe514c @news.xs4all.nl >...[color=green]
        >> I assume (right?) make and make install went without shocking errors
        >> ?[/color]
        >
        > 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@tkrnda pd2 ~/php-5.0.0]$ ls ../apache/libexec/
        > httpd.exp
        >[color=green]
        >> Does apache have proper rights (rx) to /home/imbeauje/apache/exec/
        >> AND libphp5.so ?[/color]
        >
        > There is no apache/exec dir but there is an apache/libexec, is that
        > what you meant?
        >[color=green]
        >> Is the .so file actually in that directory ? (I know, sounds silly,
        >> but how often people simply forgot to check..)[/color]
        >
        > I can't find a libphp5.so file anywhere, even in apache/libexec.
        >[color=green]
        >> Where does your apache serverroot point to ?[/color]
        >
        > ServerRoot "/home/imbeauje/apache"
        >[color=green]
        >> Tried supplying the full path to libphp5.so too?[/color]
        >
        > How?
        >[color=green]
        >> Well sofar what I can come up with without digging deeper. Good luck![/color]
        >
        > Looks like I am missing a step in the installation? No libphp5.so is
        > definitely not a good thing ...
        >
        > Jc[/color]

        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


        Comment

        Working...