Unix Technical Forum

Apache & PHP

This is a discussion on Apache & PHP within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I can't visualize my php files correctly - for instance, index.php contains: " <html> <head> <title>Teste</title> </head> <body> Test: ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 11:07 AM
Pedro Amaral Couto
 
Posts: n/a
Default Apache & PHP

I can't visualize my php files correctly - for instance, index.php
contains:
"
<html>
<head>
<title>Teste</title>
</head>
<body>

Test:

<?php
echo "ok";
?>

</body>
</html>
"
but the output ( with a WebBrowser - e.g. lynx ) is :
"
Test:
"

Trying "php /var/www/htdocs/index.php > test.htm; lynx index.php":
"
Content-type: text/html X-Powered-By: PHP/4.3.1 Test: ok
"

I'm using Slackware9.0.

What should I do ?

Pedro Amaral Couto
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 11:07 AM
Bilbo
 
Posts: n/a
Default Re: Apache & PHP

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In article <pan.2003.09.08.13.18.02.20680@AmC.netcabo.pt>, Pedro Amaral Couto wrote:
> I can't visualize my php files correctly - for instance, index.php
> contains:


What you should do is open the php file via a webserver. It is the
webserver which parses the php code to a valid html file.

In short
make sure apache has php support (look at the bottom of the file
/etc/apache/httpd.conf)
place the file in the webroot (/var/www/htdocs or such)
open the file with a URL like http://localhost/index.php

Pretty sure this has nothing to do with Slackware though.

- --
If life is a stage, I want some better lighting.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/XH/sqV1uRRMUN/wRAmuSAJ9qH7ZxImt3la8tCJmesNY7NU7p9QCfTH0O
r0ILtFbkJ59TfyxIXOPoCVU=
=K+KV
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com