Re: PHP -- using without installing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 February 2011 21:50, Steve Staples <sstaples@xxxxxxxx> wrote:
> On Mon, 2011-02-14 at 16:10 -0500, Paul M Foster wrote:
>> On Mon, Feb 14, 2011 at 12:32:51PM -0500, Steve Staples wrote:
>>
>> > Hi!
>> >
>> > I've been developing this stand alone application, found the webserver
>> > that I am going to use (it is written in php) and all is good... on
>> > windows.
>> >
>> > I can get the php.exe and php-cgi.exe running no issue on windows
>> > without "installing" them... even tested on 3 machines (developed on
>> > Vista, sent to my friend on W7, and my GF on XP Home) and they all work
>> > fine... now I was trying to port it over to linux, and I can't find
>> > anything that I can use :(
>> >
>> > Is there such a thing? Âor will I have to have a pre-req of "php and
>> > php-cgi must be installed on linux" disclaimer?
>> >
>> > Any help, or pointers to where my google-fu has failed me would be
>> > appreciated :)
>>
>> I don't know if there's a web server under Linux which is written in
>> PHP. But I imagine you'd be hard pressed to find a Linux distribution
>> which does not come with several web servers and PHP either already
>> installed or easily installable. After all, most of the web is running
>> on Linux servers.
>>
>> Paul
>>
>> --
>> Paul M. Foster
>> http://noferblatz.com
>>
>>
>
> it's not that I dont want to have a webserver installed, it is a
> standalone app, that doesn't require apache or any other httpd server
> running... for people who want to run this on their windows, or linux,
> or slackware servers and have no use for an "apache" server running for
> just this.
>
> i've got it working for windows, where i didn't have to install
> anything, was just looking for something for a "*nix" distribution that
> will do it too.
>
> the webserver i am using, is 'nanserv', which works perfectly for what I
> need it to do, and running under linux, it's very fast (windows is a bit
> slow, but that's windows for ya)
>
> I guess I am just going to have to say that having PHP installed is a
> pre-req for the app (i just dont want to go installing software on
> people's computers)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

What you are looking for is php cli.
http://docs.php.net/manual/en/install.unix.commandline.php contains
scant information about this.

But, a common mechanism (and as a windows only user, I'm 50% guessing
here) in getting a "file" to run it's handler is to add a line to the
top of the file which the shell you are running uses to determine the
program responsible for handling it.

On Windows, this is a combination of the extension and the registry
(controlled by assoc and ftype). On *nix, the line at the top of the
script seems to to a similar thing.

#!/usr/bin/php

http://articles.sitepoint.com/article/php-command-line-1 seems like a
good place to start.


There may be some issue with the line. The install may be in a
different location or have a different name (#!/usr/local/bin/php-cgi
for example).

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux