Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I have been trying to install PHP in my Linux Mandriva machine but am encountering problems. The documentation first tells how to install Apache server (which I did successfully) followed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28

    Question PHP Installation


    I have been trying to install PHP in my Linux Mandriva machine but am encountering problems.

    The documentation first tells how to install Apache server (which I did successfully) followed by the PHP installation. After uncompressing the tar.gz PHP installation file, as per the installation instructions, I executed ./configure. The next step tells to run make but the following error gets generated when I run the make command:

    make: *** No targets specified and no makefile found. Stop.

    This is where I am getting stuck up. Can someone please help me resolve this problem?

    Thanks,

    Ron

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Were there any errors after running configure? Did configure say it generated the Makefiles?

  3. #3
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    It's been a while since I did this, but I think you'll need to compile PHP with additional options so it hooks up with Apache and MYSQL. This can turn out to be quite complicated, and I would recommend buying a book (published by O'Reilly perhaps?) You could just Google around for information, but a book is very useful in this case.

    Type ./configure --help for additional options.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  4. #4
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    Thanks, mates, for your suggestions.

    Were there any errors after running configure? Did configure say it generated the Makefiles?
    No, ./configure didnīt say that it generated the Makefiles but the folder in which I uncompressed the tar.gz file, it has the following Makefiles:

    Makefile.frag
    Makefile.fragments
    Makefile.gcov
    Makefile.global
    &
    Makefile.objects

    The only error that ./configure generates is this:

    configure: error: xml2-config not found. Please check your libxml2 installation.

    The above error gets generated at the very end.

    It's been a while since I did this, but I think you'll need to compile PHP with additional options so it hooks up with Apache and MYSQL.
    Is it mandatory to install MySQL before installing PHP? Actually I have come across a few posts in some other Linux forums which gave me the impression that MySQL HAS to be installed prior to installing PHP. Is it so?

    Thanks once again,

    Regards,

    Ron

  5. #5
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    It's been a while since I did this, but I think you'll need to compile PHP with additional options so it hooks up with Apache and MYSQL.
    BTW, when I had a look at the programs installed in my machine under the Database category in the Software Management GUI, MySQL-server-5.0.45-0.glibc23.i386 is already listed. I suppose that mean MySQL is already installed in my machine, isnīt it? But when I run the command mysqld, then the following error gets generated:

    Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

    Strangely, I donīt find the manual, which the above error refers to, anywhere in the /var/lib folder where MySQL is installed!

    Thanks,

    Regards,

    Ron

  6. #6
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Hi - No I don't think PHP actually requires MYSQL. However it is often used with it as part of a LAMP setup. LAMP = Linux, Apache, MYSQL and PHP. PHP is usually embedded in html or xhtml files.

    I remember being advised that you should always compile each package (Apache etc.) from source with options in ./configure to recognise the location of the other packages. Working with precompiled binaries (such as your already installed MYSQL) may not work the way you want. It depends on your goals. Often, precompiled software doesn't include every feature you might wish!

    Is libxml2 already installed? If you log in as root you could try typing urpmq libxml2 . That might tell you. Or there could be an option to specify the path of libxml2 in ./configure . I remember PHP being a complete pain to compile, but it is very possible and once installed works well.

    PHP version 4 has been deprecated now, so you want version 5. If libxml2 isn't installed, doing so should be straightforward. Best of luck!

    I don't often suggest buying books for packages (as I did before) but you might still consider this. Or visit the PHP website and read their online documents.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  7. #7
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    Is libxml2 already installed? If you log in as root you could try typing urpmq libxml2 . That might tell you
    When I do urpmq libxml2, it generates the following output:

    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8:en_US:en",
    LC_ALL = (unset),
    LC_PAPER = "hi_IN.UTF-8",
    LC_ADDRESS = "hi_IN.UTF-8",
    LC_MONETARY = "hi_IN.UTF-8",
    LC_SOURCED = "1",
    LC_NUMERIC = "hi_IN.UTF-8",
    LC_TELEPHONE = "hi_IN.UTF-8",
    LC_MESSAGES = "en_US.UTF-8",
    LC_COLLATE = "en_US.UTF-8",
    LC_IDENTIFICATION = "hi_IN.UTF-8",
    LC_MEASUREMENT = "hi_IN.UTF-8",
    LC_CTYPE = "en_US.UTF-8",
    LC_TIME = "en_US.UTF-8",
    LC_NAME = "hi_IN.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    libxml2


    Now what does the above output mean? After getting the above output, I downloaded libxml2 using the Software Media Manager but after it was installed, I again ran urpmq libxml2 but the output was the same!

    Thanks,

    Regards,

    Ron

  8. #8
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    Friends, I could finally manage to install PHP after libxml2 was installed but I am not able to run PHP files in the browser (FireFox). Actually there´s a tool named ASP2PHP which automatically converts ASP files to PHP files which is what I did but when I opened a PHP file in the browser (using Apache as the server), all I could see is just the source code of the PHP file.

    Any ideas what could be causing this?

    Thanks a lot friends for your helpful inputs.

    Regards,

    Ron

  9. #9
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    For help with the Perl issue, please read this.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  10. #10
    Just Joined!
    Join Date
    Aug 2007
    Posts
    28
    Quote Originally Posted by fingal View Post
    For help with the Perl issue, please read this.
    Fingal, I believe you have misread my question. I am asking about PHP, not PERL.

    Anyway, itīs OK........you never know......that link might come handy sometime in the future. Moreover to err is human......

    Thanks,

    Regards,

    Ron

Page 1 of 2 1 2 LastLast

Posting Permissions

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