Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

apache 2.0.35  +PHP4 + mysql

Posted on 2002-04-29
6
446 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 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