SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2001
    Location
    Madison, WI
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP4 install under SuSE 7.1

    SuSE Linux 7.1
    apache-1.3.19-6 (installed via RPM as upgrade from 1.3.17)

    mod_php was installed by default but it was only PHP 3.0.17 and i wanted PHP4. followed standard procedure to build dynamic version as follows:

    downloaded php-4.0.6 from www.php.net
    gzip/tar to extract
    cd <mydir>
    ./configure --with-apxs --with-mysql=/usr/local/mysql
    make
    make install

    i've seen it numerous times on these forums and they seemed to verify that what i did was correct. setup the httpd.conf file to load the php4 module and also handle the MIME type. it looks like this:

    LoadModule php4_module /usr/lib/apache/libphp4.so
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4

    NOTE: similar entries still exist for PHP3

    besides some dependencies on bison/lex (i fixed that) no errors whatsoever in the build process and it installed as expected. libphp4.so was in the right place (/usr/lib/apache on my system). restarted apache with "rcapache restart" and it came up with something like this:

    httpd [ SuSEHelp PHP3 PHP4 mod_perl LDAP contrib backhand ]

    so i thought i was in business. .php3 files worked just a before so i didn't break anything. however, .php or .php4 files were never processed. either the browser tried to download the file (??) or i saw the PHP code as text in the body of the page. i tried various things to remove PHP3 because i don't need it but i got strange errors when i restarted the server like "unknown symbol: uncompress".

    anyway, seemed like a very straight-forward process that i've done before. thoughts? i did not install apache from scratch, it was an RPM install. could that have something to do with it?

    separate issue...i would also like very much to build PHP as a cgi (command-line app) so i can write scripts to process PHP pages offline and produce static HTML from it. i couldn't find any hints in the distribution that were obvious but i would guess that it is another set of arguments to the ./configure script. has anyone done that before?

    thanks!

    -matt
    Matt Stephenson
    msteph@chorus.net

  2. #2
    SitePoint Member
    Join Date
    Jul 2001
    Location
    Madison, WI
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SuSE Linux 7.1
    Apache 1.3.19 (from RPM package)
    binary install of MySQL 3.23.40
    trying to install PHP 4.0.6 from source

    OK, me again. i removed PHP3 that was previously installed from an RPM package. i have now configured my PHP4 build to use --with-mysql=/usr/local/mysql and --with-apxs=/usr/sbin/apxs.

    my build is completely successful and i have made the appropriate changes to the .conf files to recognize the new type, etc. when i try to start the server now i see

    Starting httpd [... PHP4 ...]

    so i know it sees it. however, it gives me a dynamic link error about an undefined symbol "compress". could this be a problem with the mysql library that i used? since i removed PHP3 is there a needed module that it needs that was removed with it? is there a path that needs to be added somewhere (i added /usr/local/mysql/lib to the /etc/ld.so.conf file)?

    when i tried to build the CGI verion of PHP (no --with-apxs above) i got a link error in the final stage of the build where a symbol (either compress or uncompress) was not defined in the mysql import library. has anyone seen that before?

    thanks in advance...

    -matt
    Matt Stephenson
    msteph@chorus.net


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •