Trouble getting PHP to run in Apache2

This is a discussion on Trouble getting PHP to run in Apache2 within the Apache Web Server forums, part of the Web Server and Related Forums category; I am running the ubuntu distribution (based on debian). I installed Apache2 and php. The web server is working. php ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-05-2005
Gil Grodsky
 
Posts: n/a
Default Trouble getting PHP to run in Apache2

I am running the ubuntu distribution (based on debian). I installed
Apache2 and php. The web server is working. php is working at the
command line with commands of the form
$ pnp -r 'phpinfo();'

But, pnp commands imbedded in html are not interpreted. For example,
the following line, imbedded in an otherwise good html file is just ignored
<?php phpinfo(); ?>

I seem to be so close, yet not there yet. What am I doing wrong?

Thanks,
Gil
  #2 (permalink)  
Old 03-05-2005
Big Dave
 
Posts: n/a
Default Re: Trouble getting PHP to run in Apache2

On Sat, 05 Mar 2005 14:17:48 -0800, Gil Grodsky <ggrodsky@charter.net>
wrote:

>I am running the ubuntu distribution (based on debian). I installed
>Apache2 and php. The web server is working. php is working at the
>command line with commands of the form
>$ pnp -r 'phpinfo();'
>
>But, pnp commands imbedded in html are not interpreted. For example,
>the following line, imbedded in an otherwise good html file is just ignored
><?php phpinfo(); ?>
>
>I seem to be so close, yet not there yet. What am I doing wrong?
>
>Thanks,
>Gil


You say its in a good html file, does this file have the file type
php? If is a .html, then apache won't recognise that.

If it is, have you modified the apache http.conf file to include a
type handler for the .php file types.

check here for specific details.

http://uk.php.net/manual/en/install.unix.apache2.php
  #3 (permalink)  
Old 03-06-2005
Terry
 
Posts: n/a
Default Re: Trouble getting PHP to run in Apache2

Gil Grodsky wrote:
> I am running the ubuntu distribution (based on debian). I installed
> Apache2 and php. The web server is working. php is working at the
> command line with commands of the form
> $ pnp -r 'phpinfo();'
>
> But, pnp commands imbedded in html are not interpreted. For example,
> the following line, imbedded in an otherwise good html file is just ignored
> <?php phpinfo(); ?>
>
> I seem to be so close, yet not there yet. What am I doing wrong?

If that is the actual line, try
<?php
phpinfo();
?>
TK

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
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 09:27 PM.


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