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 ...
- 09-04-2007 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 28
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
- 09-04-2007 #2Linux Engineer
- Join Date
- Nov 2004
- Location
- Ft. Polk, LA
- Posts
- 796
Were there any errors after running configure? Did configure say it generated the Makefiles?
- 09-04-2007 #3
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
- 09-04-2007 #4Just Joined!
- Join Date
- Aug 2007
- Posts
- 28
Thanks, mates, for your suggestions.
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:Were there any errors after running configure? Did configure say it generated the 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.
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?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.
Thanks once again,
Regards,
Ron
- 09-04-2007 #5Just Joined!
- Join Date
- Aug 2007
- Posts
- 28
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: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.
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
- 09-04-2007 #6
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
- 09-05-2007 #7Just Joined!
- Join Date
- Aug 2007
- Posts
- 28
When I do urpmq libxml2, it generates the following output:Is libxml2 already installed? If you log in as root you could try typing urpmq libxml2 . That might tell you
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
- 09-05-2007 #8Just 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
- 09-05-2007 #9
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
- 09-05-2007 #10Just Joined!
- Join Date
- Aug 2007
- Posts
- 28


Reply With Quote

