Results 1 to 5 of 5

Thread: PHP problems

  1. #1
    Join Date
    Oct 2006
    Location
    UK - Wales
    Posts
    7

    PHP problems

    hi,

    im not sure if this is the right forum or even right site to ask this but:

    i know that php 5 no longer supports the mysql commands by default but i can't get the extension for the commands to work. i've read and done what the FAQ says on the php site but nothing works. obviously im doing something wrong so if someone could post a link or a walkthrough of exactly what needs to be done and where i'd realy appreciate it.

    thanks

  2. #2
    Join Date
    May 2006
    Posts
    130
    Which OS are you using?

  3. #3
    you should ask this in this forum:

    http://www.webhostingtalk.com/forumdisplay.php?f=37
    http://www.empresasdehosting.com
    THE WEB HOSTING INDEX IN SPANISH
    http://www.empresasdehosting.net
    THE WEB HOSTING DIRECTORY IN SPANISH

  4. #4
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    665

    Wink

    Hi Spasticus,

    The mysql client header files haven't been provided by PHP for a long time now, starting with mid-release versions of PHP4.

    Recompiling mysql with PHP support is very simple however. I'll lay it out using the most foolproof instructions I can muster, with some cut+paste from our requirements guide.

    1. create a php page that contains this code:
    <?php phpinfo( -1 ); ?>

    2. upload this page to your webserver

    3. access the page using your browser and copy and paste the ‘configure command’ section into a blank file. It might look something like this:

    ‘./configure’ ‘--with-apxs=/usr/local/apache/bin/apxs’ ‘--with-xml’‘--with-libxml-dir=/usr/bin’ ‘--enable-bcmath’ ‘--enable-calendar’ ‘--enable-ftp’
    ‘--with-pear’ ‘--enable-sockets’ ‘--enable-track-vars’
    ‘--enable-versioning’ ‘--with-zlib’ ‘--with-zlib-dir=/usr/local/lib’
    ‘--with-curl=/usr/local/lib’ ‘--with-mcrypt=/usr/local/lib’ ‘--with-gd’
    ‘--with-png-dir=/usr/lib’ ‘--enable-mbstring’ ‘--with-xsl’

    4. strip all single quotation marks from the configure command, and add --with-mysql

    5. save the file as ‘phpcompile’ on your drive (no extension), we’ll use it later. I always make a little sandbox in /devel, which is where I save phpcompile and the wget files that follow

    6. download the latest PHP5 tar.gz archive to your server (5.1.x recommended),
    use the following command
    http://www.php.net/get/php-5.1.6.tar...php.net/mirror

    7. extract the archive using
    tar -zxf php-5.1.6.tar.gz

    8. enter the extracted archive’s directory
    cd php-5.1.6

    9. copy your ‘phpcompile’ file into this directory, make it executable, configure, compile, and then install:

    chmod 700 phpcompile
    ./phpcompile
    make clean (if you have previously attempted to compile)
    make
    make install

    If the configure command fails, it is likely that you’ve misplaced a library - it might be necessary to specify where the ‘absent’ library is located in this case. If in contrast no errors occur, after the make install command completes, restart Apache, and check your phpinfo page for the appropriate version change.

    Good luck.
    Alex
    circlical - hosting software development
    forums * blog

  5. #5
    Hello,

    If your are using the control panel Cpanel/WHM then there a script to compile php with apache server:

    /scripts/easyapache

    Select the 6 option and then follow the instruction.

    select the apropriate version of PHP, in your case PHP5 and select all the possible modules with PHP and the things should go fine for you from there.

    Thank you.

    Regards,

Posting Permissions

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