[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

apache 2.0.35  +PHP4 + mysql

Posted on 2002-04-29
6
Medium Priority
?
472 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 1600 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
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 …
Integration Management Part 2
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month20 days, 11 hours left to enroll

865 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