LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-06-2003, 04:16 PM   #1
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Rep: Reputation: 30
Lightbulb PHP not working with Apache, nor mysql


I am using RH8 and I am trying to get apache to work with php4 and mysql. MySQL is working fine, but PHP4 won't work when I visit a page with php on it. I have added "load module modules/libphp4.so to apache's httpd.conf and added the application line towards the bottom ( I forgot what it said). Does anyone have any suggestions on how to get php to work? Apache was installed by Tar.gz and php was installed by the initial instal of the system, so my files and folders are a little different.

serverRoot= /usr/local/apache2/ <if that even helps>

Thanks in advance.
 
Old 05-06-2003, 06:10 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
If php was installed by the system from an RPM and you later installed Apache from source via a tarball then you'll need to reinstall a correct version of PHP from source for it to work. I wouldn't of thought that an RPM would do the job for you although I may be wrong. You can get the PHP source from http://www.php.net its pretty straight forward to install.

cheers

Jamie...
 
Old 05-06-2003, 06:32 PM   #3
Nothsa
LQ Newbie
 
Registered: Nov 2002
Posts: 22

Rep: Reputation: 15
The people over at PHP Builder would probably be able to help you.
 
Old 05-06-2003, 11:22 PM   #4
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Thanks guys, would you happen to know how to compile php with apache? For some reason, the last time I tried, I kept getting very weird errors and by process of elimination I chose like 12 of the 15 things that i wanted to have compiled.
 
Old 05-06-2003, 11:29 PM   #5
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jharris
If php was installed by the system from an RPM and you later installed Apache from source via a tarball then you'll need to reinstall a correct version of PHP from source for it to work. I wouldn't of thought that an RPM would do the job for you although I may be wrong. You can get the PHP source from http://www.php.net its pretty straight forward to install.

cheers

Jamie...
I just thought of something, do I have to reinstall apache from source as well and after I install pHP? Thanks.
 
Old 05-07-2003, 10:50 AM   #6
Nothsa
LQ Newbie
 
Registered: Nov 2002
Posts: 22

Rep: Reputation: 15
You don't HAVE to if you install php as a module, but I like compiling it with php so that I have a single binary with everything in it.

Here's the compiling document I always look through whenever I have problems.
 
Old 05-09-2003, 09:56 AM   #7
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Ok, i found out that apache2 does not like working ( nor do they suggest using) php4. So I am now using 1.3.27 and I am having some trouble with my httpd.conf in the "LoadModule" part where I add the php module. I get an error saying that I might have mispelled Loadmodule, even though in the httpd.conf it is exactly spelled right and I can tell because of the example right above it. Does anyone have any suggestions? My server is running now, but that is only cuz I commented out the load module for php.

thanks
 
Old 05-09-2003, 08:42 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
perhaps you could post the relevant section of httpd.conf for us....
 
Old 05-10-2003, 12:19 AM   #9
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Quote:
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file http://httpd.apache.org/docs/dso.html for more
# details about the DSO mechanism and run `httpd -l' for the list of already
# built-in (statically linked and thus always available) modules in your httpd
# binary.
#
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so
# LoadModule php4_module modules/libphp4.so

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On
 
Old 05-10-2003, 12:21 AM   #10
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
I have the load module for php4 uncommented when I try to have it running.
 
Old 05-10-2003, 01:04 AM   #11
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
was that helpful?
 
Old 05-10-2003, 09:27 PM   #12
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Any help? I need some, and would appreciate it.
 
Old 05-11-2003, 05:46 AM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
How did you install PHP from source or RPM? When you do the make install the installer should add the module for you. Mine looks like
Code:
# Example:
# LoadModule foo_module libexec/mod_foo.so
LoadModule php4_module        libexec/libphp4.so
and later in the httpd.conf I have
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Earlier you post a section of your httpd.conf, your module directory was incorrct, try changing it to it similar to the example above and see if that helps. You might also want to check that libphp4.so actually exists in your modules directory.

cheers

Jamie...
 
Old 05-12-2003, 11:38 PM   #14
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
Ok, I am having a fun hard time here. I have /usr/local/apache/modules ( had to add that dir) and /libexec. There is nothing in libexec, so I copied all of my modules from /usr/lib/httpd/modules/ to both libexec and modules. For some reason when I do that, they copy but turn into blank files.

what am I doing wrong?
 
Old 05-13-2003, 12:10 AM   #15
wldkos
Member
 
Registered: Jan 2003
Distribution: Mandrake 9.2 =<3 and Red Hat 8.0 (server)
Posts: 242

Original Poster
Rep: Reputation: 30
I am using this tutorial http://php.zakachalka.com/php_compile.htm
and the apxs is not working. I know for a fact that my directory location is correct but shit isn't working.


Help me please
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Up LAMP: Getting Linux, Apache, MySQL, and PHP Working Together rhythmking Slackware 2 06-08-2005 04:05 AM
Apache not working after installing mysql and php alaateb Linux - Networking 6 04-22-2005 09:24 AM
[9.1 pro] Apache, MySQL & PHP ... not working! Dannyarr SUSE / openSUSE 5 10-17-2004 02:42 PM
php, mysql, apache not working together like expected atheist Debian 2 09-06-2004 11:48 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM


All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration