Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)

This is a discussion on Problem with Apache Web Server config file and PHP (please give advice on what problem may be me) within the PHP General forums, part of the PHP Programming Forums category; HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2003
Karen Santmyer
 
Posts: n/a
Default Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)

HI:

Can anyone refer me to someone that can help with the problem below.

I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file.

Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file.

The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2?

Please help. I understand everything, just don't know why it is prompting me to download a file.

Thanks.

Karen






---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
Reply With Quote
  #2 (permalink)  
Old 07-16-2003
Marek Kilimajer
 
Posts: n/a
Default Re: [PHP] Problem with Apache Web Server config file and PHP (pleasegive advice on what problem may be me)

Did you add these lines to http.conf?:
LoadModule php4_module c:/php4/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

If you did, did you restart apache afterwards?


karen santmyer wrote:

> HI:
>
> Can anyone refer me to someone that can help with the problem below.
>
> I installed Apache Web Server on my laptop which has Windows XP. I then installed PHP. I followed the directions in the book I had on installing apache and php and what to add to the apache configuration file.
>
> Here is what is happening: After installing everything, I tested my Apache web server installation first and saw the apache web server page like the book said. Then it said to do a little php program - which had phpinfo() in it. But when I retyped the url I got a message that asked me did I want to download a file, which was the php program file.
>
> The PHP is 4.3.2 and the apache web server is 2.0. What am I doing wrong? Should I use apache 1.3.2?
>
> Please help. I understand everything, just don't know why it is prompting me to download a file.
>
> Thanks.
>
> Karen
>
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


Reply With Quote
  #3 (permalink)  
Old 07-17-2003
Ivo Fokkema
 
Posts: n/a
Default Re: Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)

It prompts you for downloading the file because Apache doesn't recognize it
as a PHP-file but sends it directly to the browser. The browser then doesn't
find any known extension (.txt, .htm, .html) and prompts for download.

As Marek allready explained, you need to configure Apache to recognize .php
files. Marek sent you the lines you need already. I may add that maybe these
lines need to be different with your Apache version (2), check the
install.txt in your PHP directory for that. You may also need to replace the
directoryname in de config lines for where your PHP is.

Good luck!

--
[Win2000 | Apache/1.3.23]
[PHP/4.2.3 | MySQL/3.23.53]

Ivo Fokkema
PHP & MySQL programmer
Leiden University Medical Centre
Netherlands

"Karen Santmyer" <ksantmyer@yahoo.com> wrote in message
news:20030716155109.66478.qmail@web40613.mail.yaho o.com...
> HI:
>
> Can anyone refer me to someone that can help with the problem below.
>
> I installed Apache Web Server on my laptop which has Windows XP. I

then installed PHP. I followed the directions in the book I had on
installing apache and php and what to add to the apache configuration file.
>
> Here is what is happening: After installing everything, I tested my

Apache web server installation first and saw the apache web server page like
the book said. Then it said to do a little php program - which had
phpinfo() in it. But when I retyped the url I got a message that asked me
did I want to download a file, which was the php program file.
>
> The PHP is 4.3.2 and the apache web server is 2.0. What am I doing

wrong? Should I use apache 1.3.2?
>
> Please help. I understand everything, just don't know why it is

prompting me to download a file.
>
> Thanks.
>
> Karen
>
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0