Solved

apache 2.0.35  +PHP4 + mysql

Posted on 2002-04-29
6
459 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
[X]
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
  • 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
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 …
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

690 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