php5.0beta and apache2

This is a discussion on php5.0beta and apache2 within the PHP Language forums, part of the PHP Programming Forums category; Hi, I've just installed apache 2 on windows98 and works fine. Then, I install php5.0.0 beta and ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-06-2004
gustavo
 
Posts: n/a
Default php5.0beta and apache2

Hi, I've just installed apache 2 on windows98 and works fine.
Then, I install php5.0.0 beta and works as expected, but some
restrictions apply.

Im a newbie to php, and I dont know why, when I request at
the server the test.html it dont send me the results of
the php script in that (dot) html file, but if I change the
extension to (dot) php and I request that file (test.php) the
server shows me the results of the php script.

What Im doing wrong? Its something in the httpd.conf of the
apache server?

Any feedback would be appreciated. Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 01-06-2004
tom
 
Posts: n/a
Default Re: php5.0beta and apache2

gustavo wrote:

> Hi, I've just installed apache 2 on windows98 and works fine.
> Then, I install php5.0.0 beta and works as expected, but some
> restrictions apply.
>
> Im a newbie to php, and I dont know why, when I request at
> the server the test.html it dont send me the results of
> the php script in that (dot) html file, but if I change the
> extension to (dot) php and I request that file (test.php) the
> server shows me the results of the php script.
>
> What Im doing wrong? Its something in the httpd.conf of the
> apache server?
>
> Any feedback would be appreciated. Thanks in advance.


This was just my question a few days ago:

"> sorry newbie:
> 1. is it that <?php (stuff) ?> will NOT work in my index.html file ?

Will only work if the webserver has been told to send .html files to PHP."

and

"Yes, very normal.
But you can configure your HTTP server to pass whetever pages you want
to the PHP engine.
Check "AddType" for Apache's httpd.conf
For example:
**AddType*application/x-httpd-php*.php*.phtml*.html*.script
will serve php from files ending in .php, .phtml, .html, and .script"

see helpful responses, in context even, from Andrew, Pedro, Ed and Count in
"Re: getting started - gui and file organisation" and "<?php in .html
files ??" messages below

regards, tom



Reply With Quote
  #3 (permalink)  
Old 01-06-2004
Agelmar
 
Posts: n/a
Default Re: php5.0beta and apache2

tom wrote:
> gustavo wrote:
>
>
>>Hi, I've just installed apache 2 on windows98 and works fine.
>>Then, I install php5.0.0 beta and works as expected, but some
>>restrictions apply.
>>
>>Im a newbie to php, and I dont know why, when I request at
>>the server the test.html it dont send me the results of
>>the php script in that (dot) html file, but if I change the
>>extension to (dot) php and I request that file (test.php) the
>>server shows me the results of the php script.
>>
>>What Im doing wrong? Its something in the httpd.conf of the
>>apache server?
>>
>>Any feedback would be appreciated. Thanks in advance.

>
>
> This was just my question a few days ago:
>
> "> sorry newbie:
>
>>1. is it that <?php (stuff) ?> will NOT work in my index.html file ?

>
> Will only work if the webserver has been told to send .html files to PHP."
>
> and
>
> "Yes, very normal.
> But you can configure your HTTP server to pass whetever pages you want
> to the PHP engine.
> Check "AddType" for Apache's httpd.conf
> For example:
> AddType application/x-httpd-php .php .phtml .html .script
> will serve php from files ending in .php, .phtml, .html, and .script"
>
> see helpful responses, in context even, from Andrew, Pedro, Ed and Count in
> "Re: getting started - gui and file organisation" and "<?php in .html
> files ??" messages below
>
> regards, tom


While you *can* set up your webserver, unless you have a **very** good
reason to, you should *not*. If you set up your webserver to do this,
your server will have to parse all .html files for PHP, even if there's
no PHP in them. This is a senseless waste... if you have a PHP file,
name it .php!

Reply With Quote
  #4 (permalink)  
Old 01-07-2004
gustavo
 
Posts: n/a
Default Re: php5.0beta and apache2

Thanks for your help, I began to understand how it works,
there was a moment before I ask for help that I think
"I love Apapche, does it love me?", these kind of thoughts
come to me when things goes wrong, thanks again for your
valued help. In this right moment I think
Apache (and PHP) loves me!
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 07:09 AM.


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