Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2000
    Posts
    77

    Can't run php using fastcgi on Censos 4.x

    Hello,

    I install the latest version of php and fastcgi, but I fail to run php script via fastcgi.
    I tried on two different version of Centos v4.4 and v4.1

    When I try to access the php
    http://10.200.1.30/cgi/test.php

    I get "Internal Server Error"

    #tail /var/log/httpd/error_log
    [Wed Dec 20 02:13:26 2006] [warn] FastCGI: (dynamic) server "/var/www/html/cgi/test.php" started (pid 31927)
    FastCGI: can't start server "/var/www/html/cgi/test.php" (pid 31927), execle() failed: Exec format error
    [Wed Dec 20 02:13:26 2006] [warn] FastCGI: (dynamic) server "/var/www/html/cgi/test.php" (pid 31927) terminated by calling exit with status '255'

    The httpd relevant configuration:

    LoadModule fastcgi_module modules/mod_fastcgi.so

    FastCgiIpcDir /tmp/fcgi-ipc/
    FastCgiServer /usr/local/php5/bin/php
    AddHandler php-fastcgi .php

    <Location /cgi>
    SetHandler fastcgi-script
    </Location>

    Action php-fastcgi /cgi-bin/php
    AddType application/x-httpd-php .php

    <Directory "/var/www/html/cgi">
    Options ExecCGI
    </Directory>

    I compile php with:

    ./configure \
    --prefix=/usr/local/php5/ \
    --with-config-file-path=/usr/local/php5/etc/ \
    --with-mysql \
    --with-gd \
    --with-zlib-dir \
    --with-xml \
    --with-zlib \
    --with-curl \
    --enable-fastcgi \
    --enable-discard-path \
    --enable-force-cgi-redirect \
    --enable-sockets

    #/usr/local/php5/bin/php -v
    /usr/local/php5/bin/php: /usr/lib/mysql/libmysqlclient.so.14: no version information available (required by /usr/local/php5/bin/php)
    PHP 5.2.0 (cgi-fcgi) (built: Nov 23 2006 19:10:27)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

    Any help will be appreciate
    Regards,
    Addady

  2. #2
    Join Date
    May 2001
    Location
    HK
    Posts
    3,076

    Smile

    Quote Originally Posted by addady
    #/usr/local/php5/bin/php -v
    /usr/local/php5/bin/php: /usr/lib/mysql/libmysqlclient.so.14: no version information available (required by /usr/local/php5/bin/php)
    You have to fix this error first. I had this before, but I forgot what was causing it. I think you have an rpm package for mySQL or php is looking for an older version of your mySQL. I usually compile and install everything from source rather than RPMs.

  3. #3
    Join Date
    Dec 2000
    Posts
    77
    I usually compile and install everything from source rather than RPMs.
    I prefer not to replace lots of RPM by source compile.

    How can I recompile PHP 5 the the right mysql library?

  4. #4
    Join Date
    May 2001
    Location
    HK
    Posts
    3,076

    Smile

    you can try to recompile php by assignning the dir to mysql --with-mysql=/usr

    and then do make
    cd to sapi/cgi
    do a ./php -v
    and see if it turns out the mysql error

    and if everything looks ok, cd to ../.. and do a make install

    I think I remember why I was getting this error was because mysql was unstalled and re-installed again with a newer version but php was still looking for the old version of mysql

  5. #5
    Join Date
    Dec 2000
    Posts
    77
    The "libmysqlclient.so.14: no version information available" problem
    not happen on v4.4 only on v4.1

    On CentOS 4.4 its fine:
    /usr/local/php5/bin/php -v
    PHP 5.2.0 (cgi-fcgi) (built: Nov 23 2006 19:10:27)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

    but still fastcgi with the same configuration not running.

Posting Permissions

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