Page 1 of 1
PHP off of CD's in an offline environment
Posted: Wed Sep 24, 2003 1:17 pm
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 ...
Posted: Wed Sep 24, 2003 2:18 pm
by mudkicker
possible but not useful i think...
Posted: Wed Sep 24, 2003 3:33 pm
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.
Posted: Wed Sep 24, 2003 4:01 pm
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)
Posted: Wed Sep 24, 2003 5:45 pm
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.
Posted: Wed Sep 24, 2003 5:53 pm
by McGruff
Since you can't do anything dynamic with a read-only CDrom, page caching might be another option.
Posted: Wed Sep 24, 2003 11:43 pm
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.
Posted: Thu Sep 25, 2003 3:37 am
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
Posted: Thu Sep 25, 2003 10:29 am
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).
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!
Posted: Thu Sep 25, 2003 11:43 am
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!
