Hi all

I wasn't sure whether to post under Linux/Unix Help or PHP5, but my question is about the installation of PHP, so here we go:

I'm installing LAMP with Apache 2, MySQL 4.1.7 and PHP 5.0.2. I've got as far as 'LAM' - only the P is missing. The configure statement I'm using is:

./configure
--with-apxs2=/usr/local/apache2/bin/apxs
--with-mysqli
--with-xsl=/usr/share/doc/packages/libxslt
--enable-soap

The configuration chokes on libxml and says it's not installed. According to YaST, it is installed (/usr/share/doc/packages/libxml2). I tried forcing it (--with-libxml-dir=/usr/share/doc/packages/libxml2), but it still chokes.

Question: is it possible that the version of libxml2 is too old for PHP5? The configuration output doesn't say that, but I'm starting to wonder if that might be the problem. The version I have is given as 2.5.10-25 under YaST. Or is my configuration statement simply faulty? This is my first ever attempt at configuring PHP as, up until now, I've been using WAMP.

Thanks for you advice

Norm

    Hi,

    this is the location of the docs. The lib and includes should be somewhere in /usr/lib and /usr/include.

    What does

    rpm --query --all |grep xml2

    give you ?

    Thomas

      Hi Tsinka

      Thanks for that. The result of that rpm query is:

      libxml2-devel-2.5.10-25
      libxml2-2.5.10-32

      As you pointed out, the lib and includes are indeed under /usr/lib and /usr/include.

      I then did the same for XSLT and the result is:

      libxslt-1.0.32-25

      This is to be found under /usr/lib, not surprisingly.

      So ... what now?

      Thanks for your help

      Norm

        Ok,

        try something like

        ./configure
        --with-apxs2=/usr/local/apache2/bin/apxs
        --with-mysqli
        --with-xsl=/usr
        --with-libxml-dir=/usr
        --enable-soap

        (or /usr/lib instead of /usr, not completely sure).

        Which SuSE version is installed ?

        Thomas

          Thanks Tsinka

          I'll try that this evening and report back.

          My distro is SuSE 9.0 Pro, kernel 2.4

          Norm

            Hi Thomas

            My configuration statement is now as follows:

            ./configure
            --with-apxs2=/usr/local/apache2/bin/apxs
            --with-mysqli
            --without-sqlite
            --with-xsl=/usr/lib
            --enable-soap
            --with-libxml-dir=/usr/lib
            

            The configuration stops with the following:

            Configuring extensions
            checking whether to enable LIBXML support... yes
            checking libxml2 install dir... /usr/lib
            checking whether libxml build works... no
            configure: error: build test failed.
            Please check the config.log for details.

            Any suggestions?

            Thanks

            Norm 😕

              Post the file config.log (as attachment)

              Thomas

                That was quick - thanks. Here's the file. As I have made several attempts, you might find it's quite large - just have a look at the last attempt.

                Thanks

                Norm

                  The config.log file will be overwritten each time you rerun configure so the contents are the result of just one configure run.

                  First step:

                  Install the zlib RPM package.

                  EDIT: Then rerun configure

                  Thomas

                    OK - done.

                    For some reason, SuSE installed zlib, but not zlib-devel. I would have thought you needed both.

                    I now have both.

                    Next step?

                    Norm 😃

                      Rerun configure ... if it fails ... post config.log.

                      Thomas

                        Well, hey! Taht ALMOST worked.

                        PHP seems to be installed now. Could I, however, try your patience just a little longer and ask you about the last lines of the configure routine now:

                        checking for MySQLi support... yes
                        checking whether to enable embedded MySQLi support... no
                        mysql_config not found
                        configure: error: Please reinstall the mysql distribution

                        What did I do wrong with MySQL??? I installed 4.1.7 using client and server RPMs.

                        Thanks

                        Norm

                          Sorry, you wanted the config.log again in case of failure

                          Norm

                            Which error do you get ? A MySQL error ? Which MySQL packages did you install ?

                            Thomas

                              I installed MySQL 4.1.7 i386 RPMs. First server and then client. I chose 4.1.7 because I want MySQLi

                              The error I'm referring to is the one in the new configure log - namely as shown above. What are the implications of this error? Is PHP now installed, but I have to re-do MySQL? If so, why and what should I do differently. Or is PHP not yet installed as a result of this error?

                              Thanks very much

                              Norm

                                I checked the log but the one I downloaded doesn't show an error at all. It just stops with the note

                                checking whether to enable embedded MySQLi support

                                No error message ...

                                Did you install the mysql-devel package ?

                                Thomas

                                  I installed only the server and client packages. The packages I installed are:

                                  MySQL-server-4.1.7-0.i386.rpm
                                  MySQL-client-4.1.7-0.i386.rpm

                                  In the list of packages, there are also:

                                  MySQL-devel-4.1.7-0.i386.rpm
                                  MySQL-shared-4.1.7-0.i386.rpm
                                  MySQL-embedded-4.1.7-0.i386.rpm
                                  MySQL-shared-compat-4.1.7-0.i386.rpm

                                  Common sense dictates that I need the devel package. Sorry to be so stupid, but I find the MySQL website contradictory and confusing in many places. Can I just install the devel package or do I need to uninstall the server and client first and then do things in a particular order.

                                  Thanks again

                                  Norm

                                    I'm not completely sure but I think you need

                                    -shared
                                    and
                                    -devel

                                    I don't think that you need to uninstall the already installed MySQL packages.

                                    Thomas

                                      I'll have another good look at the MySQL manual and see if I can decipher it.

                                      Thanks for all your help and I'll post back when I've got things up and running - but not this evening.

                                      Cheers

                                      Norm

                                        Write a Reply...