apache 2.0.35 +PHP4 + mysql

big points up for grab!!!!
All I want to do is get apache working with php4 and mysql!
am new to this so will need guidance!
I have downlaod mysql and compiled and installed and seems to work
I can view example tables etc....
I have download apache 2.0.35
I realy don't know what am doing at this point but I did the makes and install and it works
I can access apache on 127.0.0.1 (localhost)
I compiled php4 did install but apache is not loading php
am realy lost here!
I need lots of explanation and am using apache 2.0.35!
I can find documentaton on apache 1 but not apache 2.
h
jerbellAsked:
Who is Participating?
 
samriConnect With a Mentor Commented:
I haven't got much experience with PHP either.  Maybe I should be able to gather some information that could get you going.

To my knowledge, php is not part of standard Apache modules.
    # make certain files to be certain types.
    #
    # For example, the PHP 3.x module (not part of the Apache distribution - see
    # http://www.php.net) will typically use:
    #
    #AddType application/x-httpd-php3 .php3
    #AddType application/x-httpd-php3-source .phps
    #
    # And for PHP 4.x, use:
    #
    #AddType application/x-httpd-php .php
    #AddType application/x-httpd-php-source .phps


A couple of links that should get you moving:
http://www.php.net/manual/en/faq.installation.php
http://cvs.php.net/co.php/php4/INSTALL

Some interesting extract from this page:
---
QUICK INSTALL (DSO)

For this to work your Apache httpd must have mod_so enabled.
Check using httpd -l. You should see something like:

Compiled-in modules:
http_core.c
mod_so.c

Chances are you will see a lot more modules than these two. That's ok,
as long as mod_so.c shows up you can proceed with the following steps:

$ gunzip -c php-4.1.x.tar.gz | tar xf -
$ cd php-4.1.x
$ ./configure --with-mysql --with-apxs
$ make
$ make install

If you get an error telling you that the apxs script could not be found,
look for it on your system and if you find it, provide the full path to it
as: --with-apxs=/path/to/apxs

Next you must copy php.ini-dist to the appropriate place (normally
/usr/local/lib/php.ini) and edit it as necessary to set PHP options.

The only thing left to do is to edit your httpd.conf file and make sure the
PHP 4 mime type is there and uncommented. You need a line that looks like
this:

AddType application/x-httpd-php .php

Then restart your server (apachectl restart) and you should be able to
serve up PHP files now. Make a test file called test.php and put some
PHP tags in it. Like <?phpinfo()?>, for example.


--

good luck.
0
 
harwantgrewalCommented:
What OS you are using then I will guide you step by step
what you have to do

Harry
0
 
jerbellAuthor Commented:
I am using linux 7.2 (redhat)
It seems that my apache is compile with dso
when I do httpd -l i see dso in there!
like mention before I am using apache 2.0.35
and am using php 4.2.0

apache is installed in /usr/local/apache2   (default)
I copied the php-dist.ini   as php.ini  in /usr/local/apache2/conf
and also in /usr/local/lib  (as I was unsure where to copy)

Now it's my fist time using php so I believe its not working as
I did a test.php in /usr/local/apache/htdocs
I just created a file with <? echo "hello wordl"; ?>

the page comes up with what I wrote  <? echo "hello wordl"; ?>

I figured if it worked I should only see Hello wordl

when I start apache with apachectl
it says  could not determine servers fully qualified domain for 127.0.0.1 servername

then it sais

apachectl start:httpd started
and I can view html files in htdocs so am assuming apache works just not with php.
thanks
 


0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
jerbellAuthor Commented:
samri I did try your phpinfo and it did give me statistics
and stuff so I think It might be working
so I will award you the points
I was missing this line
AddType application/x-httpd-php .php
in my configuration and I added that maybe that was it
thanks SAMRI
0
 
jerbellAuthor Commented:
thanks once again!!!
Now all I have to do is lurn the language!! ;)
0
 
samriCommented:
jerbell,

no. prob.

learning sounds fun, and good luck to you.

cheers.
0
All Courses

From novice to tech pro — start learning today.