LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP not working with Apache, nor mysql (https://www.linuxquestions.org/questions/linux-software-2/php-not-working-with-apache-nor-mysql-58456/)

wldkos 05-06-2003 04:16 PM

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.

jharris 05-06-2003 06:10 PM

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...

Nothsa 05-06-2003 06:32 PM

The people over at PHP Builder would probably be able to help you.

wldkos 05-06-2003 11:22 PM

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.

wldkos 05-06-2003 11:29 PM

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.

Nothsa 05-07-2003 10:50 AM

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.

wldkos 05-09-2003 09:56 AM

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

bulliver 05-09-2003 08:42 PM

perhaps you could post the relevant section of httpd.conf for us....

wldkos 05-10-2003 12:19 AM

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

wldkos 05-10-2003 12:21 AM

I have the load module for php4 uncommented when I try to have it running.

wldkos 05-10-2003 01:04 AM

was that helpful?

wldkos 05-10-2003 09:27 PM

Any help? I need some, and would appreciate it.

jharris 05-11-2003 05:46 AM

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...

wldkos 05-12-2003 11:38 PM

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?

wldkos 05-13-2003 12:10 AM

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


All times are GMT -5. The time now is 08:57 AM.