Solved

apache 2.0.35  +PHP4 + mysql

Posted on 2002-04-29
6
427 Views
Last Modified: 2010-03-04
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
0
Comment
Question by:jerbell
  • 3
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
samri earned 400 total points
ID: 6977933
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
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6978204
What OS you are using then I will guide you step by step
what you have to do

Harry
0
 

Author Comment

by:jerbell
ID: 6978769
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:jerbell
ID: 6978790
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
 

Author Comment

by:jerbell
ID: 6978794
thanks once again!!!
Now all I have to do is lurn the language!! ;)
0
 
LVL 15

Expert Comment

by:samri
ID: 6979200
jerbell,

no. prob.

learning sounds fun, and good luck to you.

cheers.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now