php files wihtout a web server ? Possible ?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
bussifr1
Forum Newbie
Posts: 2
Joined: Fri Sep 27, 2002 4:00 am

php files wihtout a web server ? Possible ?

Post by bussifr1 »

Hello,

I'm trying to start a project that will come on a CD-ROM to the clients.
It will contain a lot of static pages but a little database which I would like to access with PHP script code.

I know that it is possible to run php files from the command line with something like c:\php\php.exe -f test.php which generates the HTML code, but how can the client execute them from an Internet Explorer window or something like that ?

Any idea ? :?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Saw a link to this in another forum where someone was asking for help to achieve the same thing. I've never used the program so I don't know if it's any good but you might want to try it out:

http://www.indigostar.com/microweb.htm

Mac
User avatar
phphead
Forum Newbie
Posts: 12
Joined: Tue May 28, 2002 11:03 pm
Location: California

Post by phphead »

assuming your using windows peice a cake...
simple just write a batch file like so...
-------------------------------------------
@echo off
cls
SET PATH=%PATH%;C:\php\or wherver php is..
php -q %1 > temp.html
start temp.html
del temp.html
cls
-------------------------------------------
then just create a Short Cut with the command "batch.bat script.php" and run it. You should see Internet Explorer humming away with your scripts output run.

If for some reason you hacked *nix till it ran Internet Explorer... try converting the batch file to SH.
for more on batch files goto
http://ericphelps.com/batch/
hey im only 12(Dont tell COPPA) what you expect me to be running on my computer.
662Corporation
Forum Newbie
Posts: 5
Joined: Thu Nov 21, 2002 5:20 am
Location: Glasgow, UK

Post by 662Corporation »

that solution would require that the client have php installed on their system, i know some php developers who don't even have it on their system nevermind the people who'll be seeing the work
Cogs
Forum Newbie
Posts: 17
Joined: Thu Mar 27, 2003 4:57 pm

Post by Cogs »

It would be overkill to have PHP on the cd.

Why not try another language?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This is kinda an old thread - original post Fri Sep 27, 2002 - not sure what resurrecting it achieves :wink: .

Mac
Cogs
Forum Newbie
Posts: 17
Joined: Thu Mar 27, 2003 4:57 pm

Post by Cogs »

OOps :oops:
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

i'm pretty interested in a solution to this if anyone else has found one...
User avatar
MrNonchalant
Forum Commoner
Posts: 29
Joined: Wed Jul 17, 2002 2:15 am

Post by MrNonchalant »

The easiest way to do this would be to have the contents of the CD launch a browser with your server URL. If you needed to do stuff on an individual basis you could have the URL include a GET with a unique userid, having the page set a cookie for future reference if the client tries to access the page minus the CD. This would also provide valuable feedback on click-throughs and usage.
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

The nicest solution is a php compiler that makes it a .exe ? or something like it, that can be still caled tru a webclient.
Straterra
Forum Regular
Posts: 527
Joined: Mon Nov 24, 2003 8:46 am
Location: Indianapolis, Indiana
Contact:

Post by Straterra »

Why would putting PHP on a cd be overload?
Post Reply