Talk About Network

Google





Mac > Mac Programmer > Re: Getting emb...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 1024 of 1043
Post > Topic >>

Re: Getting embedded PHP to work with Apache on OSX

by Marko Vihoma <marko@[EMAIL PROTECTED] > Jul 4, 2008 at 11:46 AM

Hamad bin Turki al Salami wrote:
> I enabled apache web server and php on an OSX leopard server
> by:
> enabling Web Sharing in Preferences
> uncommenting
> LoadModule php5_module  ...
> in httpd.conf
> 
> I also created a php.ini file.
> 
> When I serve a file with .php extension, everything works fine. However,
> if I serve an .html file with embedded php tags, the tags aren't
> executed. For instance, serving a page with:
> 
> <html>
>  <head>
>   <title>PHP Test</title>
>  </head>
>  <body>
>  <?php phpinfo(); ?>
>  </body>
> </html>
> 
> 
> 
> gives a blank page.
> 
> 
> Is there something else I need to do to get embedded php tags to work?

See my response in comp.sys.mac.system.

Still, I must emphasize that enabling apache to process .html files
through mod_php[45] is not recommended. Just use .php when running PHP
scripts and leave .html for plain [X]HTML. It's a performance killer at
least if all static HTML pages are being processed through mod_php...

P.S. You should cross-post, not send individual messages to different
newsgroups on the same topic, so everyone on all newsgroups can follow :)

-- 
"If I can't smoke and swear I'm ****ed."

marko [dot] vihoma [at] pp1 [dot] inet [dot] fi
 




 2 Posts in Topic:
Getting embedded PHP to work with Apache on OSX
Hamad bin Turki al Salami  2008-07-03 19:21:39 
Re: Getting embedded PHP to work with Apache on OSX
Marko Vihoma <marko@[E  2008-07-04 11:46:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 19:58:44 PST 2009.