PHP off of CD's in an offline environment

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

PHP off of CD's in an offline environment

Post by Pyrite »

Was just wondering if any of you have ever or ever heard of using php in an offline method from a CD. Basically just want to run some php scripts from a CD to be used on Windows platforms. Was thinking I would burn the php.exe on the CD with my scripts and have them reference that exe.

And does PHP have to be run with a web server? If so, is there a way I could burn the apache onto the CD as well and basically have a php enabled webserver going after it Autoruns?

Just some thought ...
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

possible but not useful i think...
User avatar
Leviathan
Forum Commoner
Posts: 36
Joined: Tue Sep 23, 2003 7:00 pm
Location: Waterloo, ON (Currently in Vancouver, BC)

Post by Leviathan »

PHP is a standalone program. It takes a script, interprets the script, and outputs the results to standard output. If you're wanting the results to actually get interpreted as HTML, you need a web server or equivalent to do that for you. I wouldn't use PHP to write Windows apps, for example, unless you want to run them entirely in a web-based interface.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it is possible
e.g. the wampp distribution (if limited to apache/php) can be started from cd. only the httpd.pid and access.log file of apache have to be redirected somewhere (needs write-access)
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

No I do not want to use PHP for Windows apps.

Yes I do want to run php scripts, outputing HTML in an entire web based interface.

I have a site, that the same files can also be burned onto CD and viewed as the same site but offline off the CD. Taking this a step further, I want to add some php files that can be used both off a webserver online and off a CDROM. It will be very useful if it works, or can work somehow that way.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Since you can't do anything dynamic with a read-only CDrom, page caching might be another option.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Argh, look I don't need help with other options or alternatives. I already have stuff like that. I just want to know if it can be done, or if anyone has done it. I know this seems like re-inventing the wheel to some of you, but most of you have no clue what kind of complicated setup I'm doing this for.

one example: PHP has functionality to write to the local filesystem, my interactive cd's would have stuff like quizes and tests that we want to be able to save scores and answers to a end-users floppy drive etc. (You can't do that kind of stuff with HTML or really easilly in Javascript).

That is just one example.

Another example might be connecting to an embeded MySQL database that is also on the CDROM to simply gather stored data.

And yet another could be using internationalization methods with PHP, storing text in language files for inclusion in files.

Not everything in PHP has to be dynamic.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't get angry with people for offering suggestions, especially since you only offered a full explanation of your intentions in your third post.

I know that there have been recommendations in the past within the forum for software that allows you to run a PHP website off a CD, after a bit of a hunt around I found this link:
http://www.indigostar.com/microweb.htm

Mac
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

I'm not angry, just frusted with myself when I can't explain things easily (like some of us, I admit lacking social skills). :lol: :lol:

Dude, that is exactly what I was looking for, but hell they want 300 bones for it, wonder if I can do what they did on my own or something. At least now I know it can be done. Thanks!
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

What i am going to say now seems too classic to all especially you pyrite but nothing can't be done ;)

i hope you can make it! ;)
Post Reply