Apache Server configuration support - Problems with PHP

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > October 2006 > Problems with PHP





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problems with PHP
Robe

2006-10-31, 1:23 pm

Hi,

I've installed the last version of Apache on WinXP. When I try to run
a php page every thing outside the php tags appear in the browser but
the php do not.

Does any body know why?

Thanks,

Robe.

shimmyshack

2006-10-31, 1:23 pm


Things inside php tags should NOT appear, so things seem fine for you
at the moment

what does

<?php

echo '<hr><p>php stuff</p>';

?><html><body><hr><p>html stuff</p></body></html>

give you, if saved as a test.php and looked at in a browser?

should be

-----------------------------------
php stuff
----------------------------------
html stuff

if so all is fine.

Robe

2006-10-31, 1:23 pm


shimmyshack wrote:
> Things inside php tags should NOT appear, so things seem fine for you
> at the moment
>
> what does
>
> <?php
>
> echo '<hr><p>php stuff</p>';
>
> ?><html><body><hr><p>html stuff</p></body></html>
>
> give you, if saved as a test.php and looked at in a browser?
>
> should be
>
> -----------------------------------
> php stuff
> ----------------------------------
> html stuff
>
> if so all is fine.


That's the problem the "php stuff" doesn't appear in the browser.

Can you help with that?

lark

2006-10-31, 1:23 pm

Robe wrote:
> shimmyshack wrote:
>
> That's the problem the "php stuff" doesn't appear in the browser.
>
> Can you help with that?
>

two things you need to check
first check httpd.conf to make sure apache is loading apache. that's
this one:
LoadModule php5_module libexec/apache/libphp5.so

then check to see if apache is adding the module. that's this one:
AddModule mod_php5.c

then make sure you have the following directives somewhere in the bottom
of the file. these tell apache what do with files that have .php or
..phps extension. and that's these:


AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Mark Taylor

2006-10-31, 7:28 pm

"Robe" <vcrobe@gmail.com> wrote in news:1162309460.811990.168540
@e64g2000cwd.googlegroups.com:

> Hi,
>
> I've installed the last version of Apache on WinXP. When I try to run
> a php page every thing outside the php tags appear in the browser but
> the php do not.
>
> Does any body know why?
>
> Thanks,
>
> Robe.
>


This might be obvious to most but, have you installed php on XP yet?

----== Posted via webservertalk.com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.webservertalk.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com