Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache installation - beginner stuck! :( 1

Status
Not open for further replies.

CindyHome

Technical User
May 5, 2005
6
0
0
CA
Hi,
I sure hope someone can help.. have been at this all day so far.
I have just installed and configured Apache and PHP on Win98.

"Start Apache in Control" appears to run properly and typing localhost in the browser returns:

"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page."

But when I try to hit: (a file which I made) it returns "File not found". At one point (during trying different configuration settings of php.ini and httpd.conf, the page simply kept trying to load for a loooong time.

Apache service monitor shows no services running (I can't start or stop).

I am using a netgear router.

Hope I have provided all the necessary information,
and that someone can help.

Thanks!
Cindy
 
Dunno if I can help at all but I couldn't get mine setup to work properly either, but then someone recommended phpdev to me which sets up apache/php/mysql for you and with little config editing you are up and running in no time, if you are interested you can find it here
 
Hi Hespy,
Thanks :) I have a lot of very good information on configuring, and have spent many hours following them (and then trying different things) without success. I am concerned that this is related to my router (which none of the configuration guidelines talks about) and hope someone here knows whether or not that is a factor.
Cindy
PS--I did browse the phpdev site but found it hard to find config information.
 
I had similar trouble, got apache up and running looked good but wouldn't talk with php, thats why i just scrapped it and installed phpdev, you don't need to do make any changes to the config, unless u want something to work differently, but im sure there is someone here who could trouble shoot your installation!
 
It sounds like you don't have php installed and/or you haven't changed your Apache setup file to allow PHP to run.

If you are just looking to get a working system, a great way is to download one of the PHP/MySql/PHP packages that install and get everything up and running for you.

You could check out:
Good Luck!


| Feedback is always appreciated as this will help to further our knowledge as well |
 
php is installed ...

"and/or you haven't changed your Apache setup file to allow PHP to run"

What exactly do you mean by that?

works but
does not (the file is there)

Sometimes it says page not found, other times (after experimenting with configuration), it tries to save the file, or open it in dreamweaver instead of just reading it in the browser.
Cindy
 
It took me about 1 weeks time to get PHP/MySQL/Apache up and running.

"Sometimes it says page not found, other times (after experimenting with configuration), it tries to save the file, or open it in dreamweaver instead of just reading it in the browser."

I don't understand the later part. When you try to open a .php file and you fail to open it.

1. Make sure the httpd.conf is set to point to where the .php file is. The default path is /usr/local/apache2/htdocs
2. Next check the read permission of the directory and .php file.

If all fails, stick a .html file and try to open it. If you can do so, you will need to go back and do the install all over again. Make sure you're not missing any steps.






 
Hey, great idea about the HTML file, Williey.
I can access it, so it seems Apache is ok, and
that it's PHP that is not working? (or are the
two not talking?)

What I meant was, when I try to access
the browser tries to download/open the
file instead of displaying it.

I have already tried re-installing both Apache
and PHP, but get the same results.
 
Read the manual about apache config for pphp

This assumes PHP is installed to c:\php. Adjust the path if this is not the case.

For PHP 4:

# Add to the end of the LoadModule section
# Don't forget to copy this file from the sapi directory!
LoadModule php4_module "C:/php/php4apache.dll"

# Add to the end of the AddModule section
AddModule mod_php4.c

For PHP 5:

# Add to the end of the LoadModule section
LoadModule php5_module "C:/php/php5apache.dll"

# Add to the end of the AddModule section
AddModule mod_php5.c

For both:

# Add this line inside the <IfModule mod_mime.c> conditional brace
AddType application/x-httpd-php .php

# For syntax highlighted .phps files, also add
AddType application/x-httpd-php-source .phps

Installing as a CGI binary

If you unzipped the PHP package to C:\php\ as described in the Manual Installation Steps section, you need to insert these lines to your Apache configuration file to set up the CGI binary:

Example 6-4. PHP and Apache 1.3.x as CGI

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php

# For PHP 4
Action application/x-httpd-php "/php/php.exe"

# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"

# specify the directory where php.ini is
SetEnv PHPRC C:/php

Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top