You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rob Stone <ro...@mira.net> on 2011/07/30 06:20:06 UTC

[users@httpd] PHP files not being parsed in HTML pages

Hello,

I have a working domain on a free LAMP hosting service. I thought it 
would be a *good idea* if I set up a development environment on my 
Debian laptop.
Followed all the Debian specific stuff about setting it up and copied 
all my files (html, php, js, css, etc.) into the /var/www directory. I 
also created a new project and entered the appropriate lines into my 
httpd.conf file.
I can access my home page but NONE of the php is executed. It all works 
fine on the host server.
I created a three line file to call phpinfo(), placed it into the new 
project's directory and it displays all of the php directives. If I make 
an alteration to the php.ini file and run it again you can see the change.

So, why does a simple file with phpinfo() work and an html page with an 
include "xyz.php" NOT render the page as desired in the browser???? It 
just ignores the include.


When I restart apache, this is what is entered in the error.log file.

[Sat Jul 30 13:14:04 2011] [notice] caught SIGTERM, shutting down
[Sat Jul 30 13:14:05 2011] [notice] Apache/2.2.17 (Debian) PHP/5.3.6-13 
with Suhosin-Patch configured -- resuming normal operations

Output of uname -a
Linux roblaptop 2.6.39-2-686-pae #1 SMP Wed Jun 8 11:33:14 UTC 2011 i686 
GNU/Linux

When I run apachectl -M it shows php5_module (shared).


I've searched various sites for some clue as to what might be the problem.
I need some guidance as to where to look or which directive should be 
set to render php include files whilst running via a localhost.

Thanks,
Rob


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Darryle Steplight <ds...@gmail.com>.
I can't figure out why these conversations keep going on. I thought
the answer was solved with Jeroen Geilman's answer. My answer was
slightly off.

On Sat, Jul 30, 2011 at 5:33 PM, Stormy <st...@stormy.ca> wrote:
> At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
>>
>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>> >>> So, why does a simple file with phpinfo() work and an html page with
>> >>> an
>> >>> include "xyz.php" NOT render the page as desired in the browser????
>> >>> It just
>> >>> ignores the include.
>> >
>> > HTML does not have an "include" directive.
>> > Please don't confuse PHP with HTML.
>>
>> As an aside and for the avoidance of doubt, whilst they are not strictly
>> part of HTML,
>
> SSI are *text* in a format that can be interpreted by an HTML client.
>
>> Server Side Includes (which include a #include directive)
>> are commonly available to plain HTML on many servers.
>
> If php "includes" as output from the server (SSI) anything that cannot be
> parsed as HTML [or as HTML parsable script, js etc] by the client (browser)
> then it will not be "render[ed ...] as desired in the browser????" which was
> the question in this thread.
>
> "Servers" can send anything, invalid text/html from a php script, whatever
> ... if the client browser cannot parse|interpret the content it is doomed to
> failure.
>
> Best - Paul
>
> Tired old sys-admin
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



-- 
----------------------------------------------
"May the Source be with you."

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-08-01 20:45, Rob Stone wrote:
> On 01/08/11 06:11, Jeroen Geilman wrote:
>> On 2011-07-31 21:23, Rob Stone wrote:
>>>
>>> Thanks to Richard this has now been SOLVED.
>>>
>>>
>>
>> Who is Richard ?
>>
>>
>
> I don't know who he is, but he replied to my request for assistance 
> with my problem and made a helpful suggestion, which I followed up, 
> and now I have a working development environment on my laptop.


Can you point him out on this list ?
Even better, why did he not post the solution - or, at least, the 
suggestion hat helped you along - on the list ?


-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Rob Stone <ro...@mira.net>.
On 01/08/11 06:11, Jeroen Geilman wrote:
> On 2011-07-31 21:23, Rob Stone wrote:
>>
>> Thanks to Richard this has now been SOLVED.
>>
>>
>
> Who is Richard ?
>
>

I don't know who he is, but he replied to my request for assistance with 
my problem and made a helpful suggestion, which I followed up, and now I 
have a working development environment on my laptop.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-31 21:23, Rob Stone wrote:
>
> Thanks to Richard this has now been SOLVED.
>
>

Who is Richard ?


-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Rob Stone <ro...@mira.net>.
On 31/07/11 10:14, Jeroen Geilman wrote:
> On 2011-07-31 00:54, Rob Stone wrote:
>>
>>
>> Sorry I have created such a discussion around my use of the word
>> "include". In future I'll try to be semantically correct.
>>
>> By "include" I mean lines of code like this that are embedded into the
>> source html.
>>
>> <?php include "xyz.php"; ?>
>
> And that's exactly the point - it's not "including" anything in the HTML
> file.
> It parses and executes the PHP code embedded in the HTML file, and that
> PHP code contains a command that includes *other* PHP code.
>
> Nowhere does anything get included in an HTML file.
>
>>
>> All of these files echo something back so if a user did a Ctl+U they
>> would not see that "line" but html tags and data.
>> Some of my php files read a database and echo back something, even if
>> it is only "no records found".
>>
>> But when I access my application via localhost and do a Ctl+U, I see
>> those lines and not html tags and data.
>>
>> If apache2 can process a file containing <?php phpinfo(); ?> and
>> display the contents of php.ini with colourful markup, is it using the
>> php5 "engine" or doing it all by itself??
>
> Apache does not process these embedded commands; that is all done by PHP.
>


Thanks to Richard this has now been SOLVED.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-31 00:54, Rob Stone wrote:
>
>
> Sorry I have created such a discussion around my use of the word 
> "include". In future I'll try to be semantically correct.
>
> By "include" I mean lines of code like this that are embedded into the 
> source html.
>
> <?php include "xyz.php"; ?>

And that's exactly the point - it's not "including" anything in the HTML 
file.
It parses and executes the PHP code embedded in the HTML file, and that 
PHP code contains a command that includes *other* PHP code.

Nowhere does anything get included in an HTML file.

>
> All of these files echo something back so if a user did a Ctl+U they 
> would not see that "line" but html tags and data.
> Some of my php files read a database and echo back something, even if 
> it is only "no records found".
>
> But when I access my application via localhost and do a Ctl+U, I see 
> those lines and not html tags and data.
>
> If apache2 can process a file containing <?php phpinfo(); ?> and 
> display the contents of php.ini with colourful markup, is it using the 
> php5 "engine" or doing it all by itself??

Apache does not process these embedded commands; that is all done by PHP.

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Rob Stone <ro...@mira.net>.
On 31/07/11 08:11, LabTech wrote:
> Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then
> all the includes WORK!
> I set the entire HTML PAGE within <?php and ?> brackets. ECHO works! (as
> does INCLUDE)
> ----- Original Message ----- From: "Jeroen Geilman" <je...@adaptr.nl>
> To: <us...@httpd.apache.org>
> Sent: Saturday, July 30, 2011 4:39 PM
> Subject: Re: [users@httpd] PHP files not being parsed in HTML pages
>
>
>> On 2011-07-30 23:33, Stormy wrote:
>>> At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
>>>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>>>> >>> So, why does a simple file with phpinfo() work and an html page
>>>> with an
>>>> >>> include "xyz.php" NOT render the page as desired in the browser????
>>>> >>> It just
>>>> >>> ignores the include.
>>>> >
>>>> > HTML does not have an "include" directive.
>>>> > Please don't confuse PHP with HTML.
>>>>
>>>> As an aside and for the avoidance of doubt, whilst they are not
>>>> strictly
>>>> part of HTML,
>>>
>>> SSI are *text* in a format that can be interpreted by an HTML client.
>>
>> Incorrect.
>> SSI stands for SERVER-Side Includes.
>> The client, if it ever received such content, would not know what to
>> do with it.
>>
>>>
>>>> Server Side Includes (which include a #include directive)
>>>> are commonly available to plain HTML on many servers.
>>>
>>> If php "includes" as output from the server (SSI)
>>
>> PHP is not SSI.
>>
>>> anything that cannot be parsed as HTML [or as HTML parsable script,
>>> js etc] by the client (browser) then it will not be "render[ed ...]
>>> as desired in the browser????" which was the question in this thread.
>>>
>>> "Servers" can send anything, invalid text/html from a php script,
>>> whatever ... if the client browser cannot parse|interpret the content
>>> it is doomed to failure.
>>>
>>> Best - Paul
>>>
>>> Tired old sys-admin
>>
>> I'm sorry to hear that.
>>
>> --
>> J.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> " from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11
>>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


Sorry I have created such a discussion around my use of the word 
"include". In future I'll try to be semantically correct.

By "include" I mean lines of code like this that are embedded into the 
source html.

<?php include "xyz.php"; ?>

All of these files echo something back so if a user did a Ctl+U they 
would not see that "line" but html tags and data.
Some of my php files read a database and echo back something, even if it 
is only "no records found".

But when I access my application via localhost and do a Ctl+U, I see 
those lines and not html tags and data.

If apache2 can process a file containing <?php phpinfo(); ?> and display 
the contents of php.ini with colourful markup, is it using the php5 
"engine" or doing it all by itself??

Thanks for all of your suggestions.

Rob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by LabTech <La...@LOVEnCompany.com>.
Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then all 
the includes WORK!
I set the entire HTML PAGE within <?php and ?> brackets. ECHO works! (as 
does INCLUDE)
----- Original Message ----- 
From: "Jeroen Geilman" <je...@adaptr.nl>
To: <us...@httpd.apache.org>
Sent: Saturday, July 30, 2011 4:39 PM
Subject: Re: [users@httpd] PHP files not being parsed in HTML pages


> On 2011-07-30 23:33, Stormy wrote:
>> At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
>>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>>> >>> So, why does a simple file with phpinfo() work and an html page
>>> with an
>>> >>> include "xyz.php" NOT render the page as desired in the browser????
>>> >>> It just
>>> >>> ignores the include.
>>> >
>>> > HTML does not have an "include" directive.
>>> > Please don't confuse PHP with HTML.
>>>
>>> As an aside and for the avoidance of doubt, whilst they are not strictly
>>> part of HTML,
>>
>> SSI are *text* in a format that can be interpreted by an HTML client.
>
> Incorrect.
> SSI stands for SERVER-Side Includes.
> The client, if it ever received such content, would not know what to do 
> with it.
>
>>
>>> Server Side Includes (which include a #include directive)
>>> are commonly available to plain HTML on many servers.
>>
>> If php "includes" as output from the server (SSI)
>
> PHP is not SSI.
>
>> anything that cannot be parsed as HTML [or as HTML parsable script, js 
>> etc] by the client (browser) then it will not be "render[ed ...] as 
>> desired in the browser????" which was the question in this thread.
>>
>> "Servers" can send anything, invalid text/html from a php script, 
>> whatever ... if the client browser cannot parse|interpret the content it 
>> is doomed to failure.
>>
>> Best - Paul
>>
>> Tired old sys-admin
>
> I'm sorry to hear that.
>
> -- 
> J.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 23:33, Stormy wrote:
> At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>> >>> So, why does a simple file with phpinfo() work and an html page 
>> with an
>> >>> include "xyz.php" NOT render the page as desired in the browser????
>> >>> It just
>> >>> ignores the include.
>> >
>> > HTML does not have an "include" directive.
>> > Please don't confuse PHP with HTML.
>>
>> As an aside and for the avoidance of doubt, whilst they are not strictly
>> part of HTML,
>
> SSI are *text* in a format that can be interpreted by an HTML client.

Incorrect.
SSI stands for SERVER-Side Includes.
The client, if it ever received such content, would not know what to do 
with it.

>
>> Server Side Includes (which include a #include directive)
>> are commonly available to plain HTML on many servers.
>
> If php "includes" as output from the server (SSI)

PHP is not SSI.

> anything that cannot be parsed as HTML [or as HTML parsable script, js 
> etc] by the client (browser) then it will not be "render[ed ...] as 
> desired in the browser????" which was the question in this thread.
>
> "Servers" can send anything, invalid text/html from a php script, 
> whatever ... if the client browser cannot parse|interpret the content 
> it is doomed to failure.
>
> Best - Paul
>
> Tired old sys-admin

I'm sorry to hear that.

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Stormy <st...@stormy.ca>.
At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote:
>On 30/07/2011 18:43, Jeroen Geilman wrote:
> >>> So, why does a simple file with phpinfo() work and an html page with an
> >>> include "xyz.php" NOT render the page as desired in the browser????
> >>> It just
> >>> ignores the include.
> >
> > HTML does not have an "include" directive.
> > Please don't confuse PHP with HTML.
>
>As an aside and for the avoidance of doubt, whilst they are not strictly
>part of HTML,

SSI are *text* in a format that can be interpreted by an HTML client.

>Server Side Includes (which include a #include directive)
>are commonly available to plain HTML on many servers.

If php "includes" as output from the server (SSI) anything that cannot be 
parsed as HTML [or as HTML parsable script, js etc] by the client (browser) 
then it will not be "render[ed ...] as desired in the browser????" which 
was the question in this thread.

"Servers" can send anything, invalid text/html from a php script, whatever 
... if the client browser cannot parse|interpret the content it is doomed 
to failure.

Best - Paul

Tired old sys-admin 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 23:21, Mark Rousell wrote:
> On 30/07/2011 19:54, Jeroen Geilman wrote:
>> On 2011-07-30 20:06, Mark Rousell wrote:
>>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>>>>>> So, why does a simple file with phpinfo() work and an html page
>>>>>> with an
>>>>>> include "xyz.php" NOT render the page as desired in the browser????
>>>>>> It just
>>>>>> ignores the include.
>>>> HTML does not have an "include" directive.
>>>> Please don't confuse PHP with HTML.
>>> As an aside and for the avoidance of doubt, whilst they are not strictly
>>> part of HTML, Server Side Includes (which include a #include directive)
>>> are commonly available to plain HTML on many servers.
>> Server Side Includes execute server-side shell code, and these have to
>> be configured on the server.
> Indeed so. The point in this context is where and how SSIs are accessed
> by the website coder, and that is from within plain HTML. The fact that
> they areexecuted by the server does not change this.

Why do you keep insisting that SSI has anything to do with HTML ?
It does not; it is a standard for executing shell code on-the-fly.

>> It has nothing to do with HTML.
> As I said, SSIs are not part of HTML. But in reality they are associated
> with HTML.

No, they're not.

>
> As it says in the 'Apache Tutorial: Introduction to Server Side
> Includes' at http://httpd.apache.org/docs/2.0/howto/ssi.html :

That's 10 years old.

>
> 	SSI (Server Side Includes) are directives that are placed in
> 	HTML pages, and evaluated on the server while the pages are
> 	being served

Nothing there about SSI being intrinsically or otherwise "associated 
with" HTML.

>
>> No, not "plain HTML".
> Nevertheless, SSIs *are* accessed (both by the coder and by the server)
> from what I can rationally only describe as plain HTML. Certainly, SSIs
> are not themselves "plain HTML" but they are associated with "plain
> HTML" and are placed within "plain HTML".

Only the last is true.

> And so, whilst it is entirely true to say that HTML does not have an
> "include" directive, it also true to say that HTML does have an
> "include" directive available to it (i.e. available to the plain HTML
> coder).

No, that is plain false.
If the server does not support SSI, it will not parse it and return the 
HTML content as-is to the client.

Hence, it has NOTHING to do with HTML.

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Mark Rousell <ma...@signal100.com>.
On 30/07/2011 19:54, Jeroen Geilman wrote:
> On 2011-07-30 20:06, Mark Rousell wrote:
>> On 30/07/2011 18:43, Jeroen Geilman wrote:
>>>>> So, why does a simple file with phpinfo() work and an html page
>>>>> with an
>>>>> include "xyz.php" NOT render the page as desired in the browser????
>>>>> It just
>>>>> ignores the include.
>>> HTML does not have an "include" directive.
>>> Please don't confuse PHP with HTML.
>> As an aside and for the avoidance of doubt, whilst they are not strictly
>> part of HTML, Server Side Includes (which include a #include directive)
>> are commonly available to plain HTML on many servers.
> 
> Server Side Includes execute server-side shell code, and these have to
> be configured on the server.

Indeed so. The point in this context is where and how SSIs are accessed
by the website coder, and that is from within plain HTML. The fact that
they areexecuted by the server does not change this.

> It has nothing to do with HTML.

As I said, SSIs are not part of HTML. But in reality they are associated
with HTML.

As it says in the 'Apache Tutorial: Introduction to Server Side
Includes' at http://httpd.apache.org/docs/2.0/howto/ssi.html :

	SSI (Server Side Includes) are directives that are placed in
	HTML pages, and evaluated on the server while the pages are
	being served

> No, not "plain HTML".

Nevertheless, SSIs *are* accessed (both by the coder and by the server)
from what I can rationally only describe as plain HTML. Certainly, SSIs
are not themselves "plain HTML" but they are associated with "plain
HTML" and are placed within "plain HTML".

And so, whilst it is entirely true to say that HTML does not have an
"include" directive, it also true to say that HTML does have an
"include" directive available to it (i.e. available to the plain HTML
coder).

Anyway, enough splitting hairs.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 20:06, Mark Rousell wrote:
> On 30/07/2011 18:43, Jeroen Geilman wrote:
>>>> So, why does a simple file with phpinfo() work and an html page with an
>>>> include "xyz.php" NOT render the page as desired in the browser????
>>>> It just
>>>> ignores the include.
>> HTML does not have an "include" directive.
>> Please don't confuse PHP with HTML.
> As an aside and for the avoidance of doubt, whilst they are not strictly
> part of HTML, Server Side Includes (which include a #include directive)
> are commonly available to plain HTML on many servers.

No, not "plain HTML".
Server Side Includes execute server-side shell code, and these have to 
be configured on the server.
It has nothing to do with HTML.


-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Mark Rousell <ma...@signal100.com>.
On 30/07/2011 18:43, Jeroen Geilman wrote:
>>> So, why does a simple file with phpinfo() work and an html page with an
>>> include "xyz.php" NOT render the page as desired in the browser????
>>> It just
>>> ignores the include.
> 
> HTML does not have an "include" directive.
> Please don't confuse PHP with HTML.

As an aside and for the avoidance of doubt, whilst they are not strictly
part of HTML, Server Side Includes (which include a #include directive)
are commonly available to plain HTML on many servers.

Ref: http://en.wikipedia.org/wiki/Server_Side_Includes



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 06:41, Darryle Steplight wrote:
> Trying adding this in your vhost, config file or .htaccess file
>
> addHandler x-httpd-php5 .php .htm .html

Please get it right:

<FilesMatch \.php$>
         SetHandler application/x-httpd-php
</FilesMatch>


>
> On Sat, Jul 30, 2011 at 12:20 AM, Rob Stone<ro...@mira.net>  wrote:
>> Hello,
>>
>> I have a working domain on a free LAMP hosting service. I thought it would
>> be a *good idea* if I set up a development environment on my Debian laptop.
>> Followed all the Debian specific stuff about setting it up and copied all my
>> files (html, php, js, css, etc.) into the /var/www directory. I also created
>> a new project and entered the appropriate lines into my httpd.conf file.
>> I can access my home page but NONE of the php is executed. It all works fine
>> on the host server.
>> I created a three line file to call phpinfo(),

That's 2 lines too many:

     $echo "<?phpinfo()?>" > info.php

>> placed it into the new
>> project's directory and it displays all of the php directives. If I make an
>> alteration to the php.ini file and run it again you can see the change.
>>
>> So, why does a simple file with phpinfo() work and an html page with an
>> include "xyz.php" NOT render the page as desired in the browser???? It just
>> ignores the include.

HTML does not have an "include" directive.
Please don't confuse PHP with HTML.

>> When I restart apache, this is what is entered in the error.log file.
>>
>> [Sat Jul 30 13:14:04 2011] [notice] caught SIGTERM, shutting down
>> [Sat Jul 30 13:14:05 2011] [notice] Apache/2.2.17 (Debian) PHP/5.3.6-13 with
>> Suhosin-Patch configured -- resuming normal operations
>>
>> Output of uname -a
>> Linux roblaptop 2.6.39-2-686-pae #1 SMP Wed Jun 8 11:33:14 UTC 2011 i686
>> GNU/Linux
>>
>> When I run apachectl -M it shows php5_module (shared).

None of this is relevant, really - the fact that a php file gets 
executed is also proof of all of the above.


-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] PHP files not being parsed in HTML pages

Posted by Darryle Steplight <ds...@gmail.com>.
Trying adding this in your vhost, config file or .htaccess file

addHandler x-httpd-php5 .php .htm .html

On Sat, Jul 30, 2011 at 12:20 AM, Rob Stone <ro...@mira.net> wrote:
> Hello,
>
> I have a working domain on a free LAMP hosting service. I thought it would
> be a *good idea* if I set up a development environment on my Debian laptop.
> Followed all the Debian specific stuff about setting it up and copied all my
> files (html, php, js, css, etc.) into the /var/www directory. I also created
> a new project and entered the appropriate lines into my httpd.conf file.
> I can access my home page but NONE of the php is executed. It all works fine
> on the host server.
> I created a three line file to call phpinfo(), placed it into the new
> project's directory and it displays all of the php directives. If I make an
> alteration to the php.ini file and run it again you can see the change.
>
> So, why does a simple file with phpinfo() work and an html page with an
> include "xyz.php" NOT render the page as desired in the browser???? It just
> ignores the include.
>
>
> When I restart apache, this is what is entered in the error.log file.
>
> [Sat Jul 30 13:14:04 2011] [notice] caught SIGTERM, shutting down
> [Sat Jul 30 13:14:05 2011] [notice] Apache/2.2.17 (Debian) PHP/5.3.6-13 with
> Suhosin-Patch configured -- resuming normal operations
>
> Output of uname -a
> Linux roblaptop 2.6.39-2-686-pae #1 SMP Wed Jun 8 11:33:14 UTC 2011 i686
> GNU/Linux
>
> When I run apachectl -M it shows php5_module (shared).
>
>
> I've searched various sites for some clue as to what might be the problem.
> I need some guidance as to where to look or which directive should be set to
> render php include files whilst running via a localhost.
>
> Thanks,
> Rob
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



-- 
----------------------------------------------
"May the Source be with you."

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org