Results 1 to 12 of 12

Thread: Compile PHP

  1. #1
    Join Date
    Feb 2001
    Posts
    129

    * Compile PHP

    Hi,

    I need to re-compile PHP on my Raq4i. Here are the specs I need:

    PHP (PHP 4.2.2 and above) :
    1.1) compiled as Apache Module :
    - with MySQL support
    - with Curl (for PayPal IPN)
    - enable socket
    1.2) compiled as CGI
    - all the options for compiling as Apache Module plus
    enable pcntl (process control -- to allow the script to
    act as a daemon)
    - note : you shouldnt compile with Optimizer coz pcntl
    doesnt work with optimizer

    Anyone that can help me with this? Where do I start?

    Thanks


  2. #2
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    1,354
    I posted instructions on compililng PHP from source some time back. If you need to add extra libraries etc., it's not that difficult AS LONG AS you have the correct required libraries installed.
    If you have a look on the PHP site you will find comprehensive details for installing extra libraries etc.,
    Blacknight
    ICANN accredited domain registrar

  3. #3
    Join Date
    Feb 2001
    Posts
    129
    Thanks, I'll try to find your instructions. I don't think I need any extra libraries...


  4. #4
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    1,354
    If you're still having problems let me know...
    Blacknight
    ICANN accredited domain registrar

  5. #5
    Surfer,

    Did you actually find the instructions? If yes, please psot the instructions URL here.

  6. #6
    Join Date
    Feb 2002
    Location
    The Netherlands
    Posts
    308
    http://www.HaVa.nl
    Reliable hosting and Colocation

  7. #7
    Join Date
    Feb 2001
    Posts
    129
    Originally posted by blacknight
    If you're still having problems let me know...
    I found this thread http://www.webhostingtalk.com/showth...threadid=61449

    I am going to start installing PHP today! I'll let you know how it goes!


  8. #8
    Join Date
    Feb 2001
    Posts
    129
    BTW:

    How do I do this?

    1.2) compiled as CGI
    - all the options for compiling as Apache Module plus
    enable pcntl (process control -- to allow the script to
    act as a daemon)

    Thanks

  9. #9
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    1,354
    to compile as CGI (eg. /usr/bin/php) take out the reference to apxs in the configure command
    Blacknight
    ICANN accredited domain registrar

  10. #10
    Join Date
    Feb 2001
    Posts
    129
    Thanks for your reply!

    I figured this out! What I have understood so far is that I basically do the same as the apache module (but without apxs) and then don't do the final "make install" command. I then put the binary "PHP" file where I want it.

    My problem so far is that I get an error when I am trying the "make" command. Configure went fine!

    Error (last couple of lines):

    libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
    ./.libs/libphp4.a(browscap.lo): In function `browser_reg_compare':
    /home/php4_2/php-4.2.3/ext/standard/browscap.c:193: undefined reference to `php_regcomp'
    /home/php4_2/php-4.2.3/ext/standard/browscap.c:196: undefined reference to `php_regexec'
    /home/php4_2/php-4.2.3/ext/standard/browscap.c:199: undefined reference to `php_regfree'
    ./.libs/libphp4.a(reg.lo): In function `_php_regcomp':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:50: undefined reference to `php_regcomp'
    ./.libs/libphp4.a(reg.lo): In function `_free_reg_cache':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:69: undefined reference to `php_regfree'
    ./.libs/libphp4.a(reg.lo): In function `php_reg_eprint':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:119: undefined reference to `php_regerror'
    /home/php4_2/php-4.2.3/ext/standard/reg.c:124: undefined reference to `php_regerror'
    /home/php4_2/php-4.2.3/ext/standard/reg.c:129: undefined reference to `php_regerror'
    /home/php4_2/php-4.2.3/ext/standard/reg.c:140: undefined reference to `php_regerror'
    ./.libs/libphp4.a(reg.lo): In function `php_ereg':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:207: undefined reference to `php_regexec'
    ./.libs/libphp4.a(reg.lo): In function `php_reg_replace':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:321: undefined reference to `php_regexec'
    ./.libs/libphp4.a(reg.lo): In function `php_split':
    /home/php4_2/php-4.2.3/ext/standard/reg.c:580: undefined reference to `php_regexec'
    ./.libs/libphp4.a(url.lo): In function `php_url_parse':
    /home/php4_2/php-4.2.3/ext/standard/url.c:74: undefined reference to `php_regcomp'
    /home/php4_2/php-4.2.3/ext/standard/url.c:80: undefined reference to `php_regexec'
    /home/php4_2/php-4.2.3/ext/standard/url.c:115: undefined reference to `php_regfree'
    /home/php4_2/php-4.2.3/ext/standard/url.c:118: undefined reference to `php_regcomp'
    /home/php4_2/php-4.2.3/ext/standard/url.c:118: undefined reference to `php_regexec'
    /home/php4_2/php-4.2.3/ext/standard/url.c:127: undefined reference to `php_regfree'
    /home/php4_2/php-4.2.3/ext/standard/url.c:154: undefined reference to `php_regfree'
    /home/php4_2/php-4.2.3/ext/standard/url.c:157: undefined reference to `php_regfree'
    collect2: ld returned 1 exit status
    make[1]: *** [php] Error 1
    make[1]: Leaving directory `/home/php4_2/php-4.2.3'
    make: *** [all-recursive] Error 1

  11. #11
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    1,354
    If you've already used the same source to compile the Apache module you'll need to run 'make clean' first.
    The run configure without the apxs.
    make
    make install

    The location of php.ini won't make any difference unless you've taken out a lot of other options from the config (at least it shouldn't as far as I can remember)

    Beware of using the CGI, as it is an extra security risk.
    Blacknight
    ICANN accredited domain registrar

  12. #12
    Join Date
    Feb 2001
    Posts
    129
    Thanks that could be it!

    Should I really run "make install"?


Posting Permissions

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