Find the answer to your Linux question:
Results 1 to 2 of 2
Hello Having managed to compile MySQL ver. 4.1.x from source and finally get it working (the same with Apache) I've got stuck trying to compile php 5.2.1 with MySQL and ...
  1. #1
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539

    PHP installation problems

    Hello

    Having managed to compile MySQL ver. 4.1.x from source and finally get it working (the same with Apache) I've got stuck trying to compile php 5.2.1 with MySQL and Apache support. I just want to learn to use these packages to write web applications. Google searches haven't helped, and the php FAQs are no good either:

    I've tried the following approach, suggested in the O'Reilly book I have:

    ./configure --with-apxs2=/usr/local/apache2//bin/apxs \
    --without-mysql --with-mysqli=/usr/local/mysql//bin/mysql_config

    I've tried many different ./configure options, but they've all failed. Actually it doesn't report any errors at that stage; just during 'make'.

    When I try to make the code it errors out with:
    Code:
    /bin/sh /home/john/tmp/php-5.2.1/libtool --silent --preserve-dup-deps --mode=compile gcc  -Iext/libxml/ -I/home/john/tmp/php-5.2.1/ext/libxml/ -DPHP_ATOM_INC -I/home/john/tmp/php-5.2.1/include -I/home/john/tmp/php-5.2.1/main -I/home/john/tmp/php-5.2.1 -I/usr/include/libxml2 -I/home/john/tmp/php-5.2.1/ext/date/lib -I/usr/local/mysql/include/mysql -I/home/john/tmp/php-5.2.1/TSRM -I/home/john/tmp/php-5.2.1/Zend    -I/usr/include -g -O2   -c /home/john/tmp/php-5.2.1/ext/libxml/libxml.c -o ext/libxml/libxml.lo
    /home/john/tmp/php-5.2.1/libtool: line 68: --without-mysql: command not found
    /home/john/tmp/php-5.2.1/libtool: line 69: invalid: command not found
    /home/john/tmp/php-5.2.1/libtool: command substitution: line 71: unexpected EOF while looking for matching `''
    /home/john/tmp/php-5.2.1/libtool: command substitution: line 73: syntax error: unexpected end of file
    /home/john/tmp/php-5.2.1/libtool: line 71: Try: command not found
    /home/john/tmp/php-5.2.1/libtool: line 410: syntax error near unexpected token `('
    /home/john/tmp/php-5.2.1/libtool: line 410: `elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then'
    make: *** [ext/libxml/libxml.lo] Error 2
    It seems I already have libtool & libxml installed, but I don't want to remove it yet as I suspect a few key packages depend on it (like FireFox!)

    Any ideas? I have the libtool development kit installed as an rpm. This is like being a newbie all over again! I'm considering installing another version of MySQL to see what happens - but not immediately.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  2. #2
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    EDIT: Solved!! - later on I edited this post because I resolved my build problems. Part of it was my own fault. I'd made some mistakes when specifying the path(s) to a couple of directories. That wasn't the end of it though. I had trouble getting PHP to compile against Apache 2 because of a missing libphp5.so in /usr/local/apache2/modules

    I solved this problem by installing PHP 5.1.5 instead of later (and fully supported) versions. Well, I'm not actually running a server (at work etc.), so I won't worry about that just yet. I now have Apache, MySQL and PHP working. No doubt I'll have other things to resolve later on.
    -----------------------------------------------------------------------------------------------------------------------------------

    I'm still trying with this. Strangely, I can't find my specific error message anywhere on the web. It seems to relate to either libtools or libxml ... I've tried compiling with --disable-libxml (or something like that: I read the help file[s] ./configure --help late last night) but the error is always the same. It's unclear if the problem relates to a specific library or application.

    I have an uncomfortable feeling that it wants the libtools-dev package, but probably not ... I'll tell you when my head feels clear.

    I also found the most up-to-date version of libxml and compiled that. I had to ftp it: setting that one up is quite easy. I'm not sure what this is going to do to other packages. Sometimes I've seen things break following an update.

    I also intend to try various combos of mysql binaries, compiling this or that in different ways, with different versions ... Maybe I'll try setting different environment variables. I might even hack my Make file if I'm feeling brave.

    ... if all that fails (give me a week) I'll file a bug report. I have no idea what the problem is, but it's annoying to say the least.
    Last edited by fingal; 03-11-2007 at 12:31 AM. Reason: Bad spelling!
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

Posting Permissions

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