FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 01-10-2008, 01:49 AM
Larry Hartman
 
Default PHP5 code within HTML/XHTML documents

This one is really wierd:

I installed LAMP server on clean install of Kubuntu 7.10 (Gutsy).

I posted following issue on Ubuntu forums 4 hours ago under the same title as
subject line in email message. I have not seen anyone with this particular
issue.


The install was very vanilla. No errors noted.

I changed Apache2 document root to /media/Abraham/01--ACADRC/
I also changed MySQL base directory to /media/Abraham/01--ACADRC/data/
I symlinked phpmyadmin to /media/Abraham/01--ACADRC/php/phpmyadmin/
I installed mediawiki 1.9 and symlinked to /media/Abraham.01--ACADRC/wiki/
I am able to view phpmyadmin properly, able to setup new databases, tables,
etc.
I am able to view the mediawiki start page properly
Here is output on bad URL:

Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.2 Server at home.acadrc.site Port 80

What I cannot do is properly run php scripts inside my html documents

The following line will not display output in firefox/konqueror when placed
within index.html:

<?php phpinfo(); ?>

When I run this line:

<?php echo '<p>Hello World</p>';?>

I get the following results when I view the page in Firefox/Konqueror:

Hello World'; ?>

These results show me that PHP is either not being processed/parsed or, if so,
only marginally.

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 01-10-2008, 01:56 AM
Ant Cunningham
 
Default PHP5 code within HTML/XHTML documents

On 1/9/08 9:49 PM, "Larry Hartman" <larryhartman50@vzavenue.net> wrote:

> The following line will not display output in firefox/konqueror when placed
> within index.html:


HTML documents (ie. *.html) don't process as php by default. You can either
change the filename to *.php or you can set .html files to be rendered as
php in your conf, your vhost container, or a .htaccess file. I believe the
directive you want is:

AddHandler php5-script .html

I could be wrong about that though... Consult the Apache docs if that
doesn't work... Really though id just use the proper extension if I were
you.

-ant



--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 07:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org