image
image

Go Back   macosx.com > Community > Opinions, & Open Letters

Reply
 
LinkBack Thread Tools
  #9  
Old June 17th, 2005, 01:36 PM
andehlu's Avatar
this modern love
 
Join Date: Feb 2004
Location: torontoCANADA
Posts: 244
Thanks: 0
Thanked 0 Times in 0 Posts
andehlu is on a distinguished road
elander...obviously safari is not capable of rendering php on its own. What i was saying is that somehow I had safari open php files directly and use the php module to render. And pls dont tell my I am not remembering properly. The whole reason I made this post was cuz I KNOW i was doing this, and tried to see if anyone knew how to do this.
__________________
site | blog | garageband experiments
Reply With Quote
  #10  
Old June 18th, 2005, 10:23 AM
Registered User
 
Join Date: Jul 2002
Posts: 381
Thanks: 0
Thanked 1 Time in 1 Post
elander will become famous soon enough
Something close perhaps...

Here is a link to a page describing one way of previewing php code in the browser: http://tinyurl.com/dkg5e

This is as close as I can come to what you're looking for. I've never heard of a way to route php through the php parser via the file:-protocol as you (andehlu) suggest in your post. I haven't ever heard of a plugin that would let you do it either, and I have searched pretty hard for it.

[EDIT] Maybe you could try this: use terminal to send the document to php, and pipe the result to Safari? Maybe use a droplet (AppleScript or Automator perhaps) to do it for you? [/EDIT]

As for not telling you your memory is deceiving you: I've been working with php for almost eight years now (since the betas of PHP/FI 2.0), and I've never even heard of anything remotely similar to what you describe. I've consulted with a bunch of colleagues on the matter also, and I'm afraid they all come down on my side of the fence...

However, it is entirely feasible to create a plugin for Safari that will do what you want. If you really think it is worth it, you might want to try that.
__________________
/elander
website: http://www.scribus.se/

Last edited by elander; June 18th, 2005 at 10:26 AM. Reason: A thought...
Reply With Quote
  #11  
Old June 18th, 2005, 12:35 PM
andehlu's Avatar
this modern love
 
Join Date: Feb 2004
Location: torontoCANADA
Posts: 244
Thanks: 0
Thanked 0 Times in 0 Posts
andehlu is on a distinguished road
I was using the Server Logistics binaries of apache/php/mysql when I was able to do this..... does anyone run these binaries still that could test this?
__________________
site | blog | garageband experiments
Reply With Quote
  #12  
Old June 18th, 2005, 09:17 PM
Person that uses a Mac
 
Join Date: Nov 2003
Location: Berea, Ohio
Posts: 402
Thanks: 0
Thanked 0 Times in 0 Posts
btoth is on a distinguished road
You can do "PHP filename.php" on the command line to have PHP parse the script properly. You'd have to either output that to a file or pipe it to the browser... not sure how to do that in OS X just yet. Some editors probably do this (BBEdit doesn't though).

Directly accessing a PHP script from any browser will just result in the text of the file in the web browser. Browsers only understand the client-side aspects of a page, not the server-side scripts. (Unless, like someone mentioned, there's a plugin or something that does the parsing for it.)

Regardless of which PHP package is installed, the only way to get Apache to parse and serve the PHP scripts to the browser is to access the page using http:// which would require going either through localhost or a virtual host setup to point to the folder that contains the files. Any reference using file:// does not go through the web server.
__________________
Mac Software by Me - ImageReel, Google Maps Address Book Plugin.
Reply With Quote
  #13  
Old June 19th, 2005, 10:04 PM
TommyWillB's Avatar
Registered User
 
Join Date: Mar 2001
Location: ol' Gay San Francisco
Posts: 2,020
Thanks: 0
Thanked 0 Times in 0 Posts
TommyWillB is on a distinguished road
First of all, browsers don't "execute" php... ever. the Apache web server and PHP engine work together to do that.

By accessing the file directly from the filesystem you are skipping Apache... thus no execution and rendering. Yes there are tricks to execute the code, but why %^#$%^ bother?

Why not just make your life 10,000% easier and run it through Apache via http://localhost/ or http://127.0.0.1/ ?
__________________
TommyWillB
Intel iMac "early 2006" core duo
TommyWillB.com hosted on Mac OS X 10.5.x / Apache 2.2.x / PHP 5.x
Reply With Quote
Reply

Bookmarks

Thread Tools

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 On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 09:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.