php-general Digest 11 Sep 2010 04:53:31 -0000 Issue 6934

Topics (messages 307920 through 307944):

php cli question
        307920 by: J Ravi Menon

Re: logical AND assignments
        307921 by: David Harkness
        307923 by: a...@ashleysheridan.co.uk

Re: Zend framework
        307922 by: David Harkness
        307935 by: Daevid Vincent
        307936 by: Daevid Vincent
        307943 by: chris h

newbie question about code
        307924 by: Adam Williams
        307925 by: Joshua Kehn
        307926 by: Joshua Kehn
        307927 by: Joshua Kehn
        307928 by: Bob McConnell
        307929 by: Joshua Kehn
        307930 by: a...@ashleysheridan.co.uk
        307931 by: a...@ashleysheridan.co.uk
        307932 by: Joshua Kehn
        307933 by: tedd
        307934 by: Adam Richardson
        307937 by: chris h
        307938 by: Joshua Kehn
        307939 by: Adam Richardson

Standalone WebServer for PHP
        307940 by: Steve Staples
        307941 by: Steve Staples
        307942 by: Daniel Brown
        307944 by: Jim Lucas

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi,

I have some basic questions on running php  (5.2.x series on Linux
2.6) as a standalone daemon using posix methods (fork() etc..):

#!/usr/bin/php
<?php

require_once ('someclass.php');

// do some initializations
.

// main 'forever' loop - the '$shutdown'  will
// be set to true via a signal handler

while(!$shutdown)
{
  $a = new SomeClass();

  $a->doSomething()

}

// shutdown logic.

The 'someclass.php' in turn will include other files (via require_once).

The above file will be executed directly from the shell. The main loop
could be listening to new requests via sockets etc..

Few questions:

1) Does opcode cache really matter in such cli-based daemons? As
'SomeClass' is instantiated at every loop, I am assuming it is only
compiled once as it has already been 'seen'.
    I am not very clear on how apc (or eaccelerator) works in such cases.


2) What about garbage collection? In a standard apache-mod-php setup,
we rely on the end of a request-cycle to free up resources - close
file descriptiors, free up memory etc..
    I am assuming in the aforesaid standalone daemon case, we would
have to do this manually?  In the loop above, would it be better to
'unset($a)' explicitly at the end of it before
    it goes to the next iteration?

Note: I have written pre-forker deamons in php directly and
successfully deployed them in the past, but never looked at in depth
to understand all the nuances. Anecdotally, I have
done 'unset()' at some critical places were large arrays were used,
and I think it helped. AFAIK, unlike Java, there is no 'garbage
collector' thread that does all the magic?

Thanks,
Ravi

--- End Message ---
--- Begin Message ---
On Fri, Sep 10, 2010 at 8:22 AM, Robert E. Glaser <p...@icengineering.com>wrote:

> It's hard to wrap my mind around the concept that the assignment
> operator itself has an operator precedence.  Which means that one could
> write expressions without any assignment at all, and be syntactically
> correct.
>

You do this all the time without realizing it!

    echo "Hello, " . $name;
    $rect->setTopLeft(new Point(5 * 3, 2 / 3));

These expressions are eventually assigned to function parameters or passed
to the PHP engine in the case of echo, but there are no assignment operators
present. And all of the control structures--if, while, for, etc.--take
expressions. Expressions are all around us. You can feel them when you go to
work . . . when you go to church . . . when you pay your taxes. No wait,
that's the Matrix.

David

--- End Message ---
--- Begin Message ---
Stay off those red pills David!

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "David Harkness" <davi...@highgearmedia.com>
Date: Fri, Sep 10, 2010 18:54
Subject: [PHP] re: logical AND assignments
To: "Robert E. Glaser" <p...@icengineering.com>
Cc: <php-gene...@lists.php.net>


On Fri, Sep 10, 2010 at 8:22 AM, Robert E. Glaser <p...@icengineering.com>wrote:

> It's hard to wrap my mind around the concept that the assignment
> operator itself has an operator precedence.  Which means that one could
> write expressions without any assignment at all, and be syntactically
> correct.
>

You do this all the time without realizing it!

    echo "Hello, " . $name;
    $rect->setTopLeft(new Point(5 * 3, 2 / 3));

These expressions are eventually assigned to function parameters or passed
to the PHP engine in the case of echo, but there are no assignment operators
present. And all of the control structures--if, while, for, etc.--take
expressions. Expressions are all around us. You can feel them when you go to
work . . . when you go to church . . . when you pay your taxes. No wait,
that's the Matrix.

David

--- End Message ---
--- Begin Message ---
We use part of Zend MVC (the dispatcher, controllers, and view scripts) here
and a lot of the other facilities such as the autoloader, config, etc. and
are very happy so far. As long as you design your application with an eye
toward portability, you won't be tied to ZF. For example, put all of your
business logic in model classes instead of the controllers themselves. That
way if you ever need to move to a new presentation layer or use the business
logic outside it (e.g. in SOAP or RPC messages), you'll be ready.

David

--- End Message ---
--- Begin Message ---
http://www.php.net/manual/en/language.oop5.basic.php 

> -----Original Message-----
> From: David Harkness [mailto:davi...@highgearmedia.com] 
> Sent: Friday, September 10, 2010 10:59 AM
> To: rquadl...@googlemail.com
> Cc: chris h; PHP-General
> Subject: Re: [PHP] Zend framework
> 
> We use part of Zend MVC (the dispatcher, controllers, and 
> view scripts) here
> and a lot of the other facilities such as the autoloader, 
> config, etc. and
> are very happy so far. As long as you design your application 
> with an eye
> toward portability, you won't be tied to ZF. For example, put 
> all of your
> business logic in model classes instead of the controllers 
> themselves. That
> way if you ever need to move to a new presentation layer or 
> use the business
> logic outside it (e.g. in SOAP or RPC messages), you'll be ready.
> 
> David
> 


--- End Message ---
--- Begin Message ---
Sorry wrong thread. Damnit. I meant that link for the guy that didn't know
what the -> was for... 

> -----Original Message-----
> From: Daevid Vincent [mailto:dae...@daevid.com] 
> Sent: Friday, September 10, 2010 12:01 PM
> To: 'David Harkness'
> Cc: 'PHP-General'
> Subject: RE: [PHP] Zend framework
> 
> http://www.php.net/manual/en/language.oop5.basic.php 
> 
> > -----Original Message-----
> > From: David Harkness [mailto:davi...@highgearmedia.com] 
> > Sent: Friday, September 10, 2010 10:59 AM
> > To: rquadl...@googlemail.com
> > Cc: chris h; PHP-General
> > Subject: Re: [PHP] Zend framework
> > 
> > We use part of Zend MVC (the dispatcher, controllers, and 
> > view scripts) here
> > and a lot of the other facilities such as the autoloader, 
> > config, etc. and
> > are very happy so far. As long as you design your application 
> > with an eye
> > toward portability, you won't be tied to ZF. For example, put 
> > all of your
> > business logic in model classes instead of the controllers 
> > themselves. That
> > way if you ever need to move to a new presentation layer or 
> > use the business
> > logic outside it (e.g. in SOAP or RPC messages), you'll be ready.
> > 
> > David
> > 
> 


--- End Message ---
--- Begin Message ---
Thanks for the info everyone, this is pretty much what I was expecting to
hear about it.  I think I'll probably stick to using it as a toolkit.



Thanks,
Chris.



On Fri, Sep 10, 2010 at 3:01 PM, Daevid Vincent <dae...@daevid.com> wrote:

> Sorry wrong thread. Damnit. I meant that link for the guy that didn't know
> what the -> was for...
>
> > -----Original Message-----
> > From: Daevid Vincent [mailto:dae...@daevid.com]
> > Sent: Friday, September 10, 2010 12:01 PM
> > To: 'David Harkness'
> > Cc: 'PHP-General'
> > Subject: RE: [PHP] Zend framework
> >
> > http://www.php.net/manual/en/language.oop5.basic.php
> >
> > > -----Original Message-----
> > > From: David Harkness [mailto:davi...@highgearmedia.com]
> > > Sent: Friday, September 10, 2010 10:59 AM
> > > To: rquadl...@googlemail.com
> > > Cc: chris h; PHP-General
> > > Subject: Re: [PHP] Zend framework
> > >
> > > We use part of Zend MVC (the dispatcher, controllers, and
> > > view scripts) here
> > > and a lot of the other facilities such as the autoloader,
> > > config, etc. and
> > > are very happy so far. As long as you design your application
> > > with an eye
> > > toward portability, you won't be tied to ZF. For example, put
> > > all of your
> > > business logic in model classes instead of the controllers
> > > themselves. That
> > > way if you ever need to move to a new presentation layer or
> > > use the business
> > > logic outside it (e.g. in SOAP or RPC messages), you'll be ready.
> > >
> > > David
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message --- I'm looking at someone's code to learn and I'm relatively new to programming. In the code I see commands like:

$code->do_command();

I'm not really sure what that means. How would that look in procedural style programming? do_command($code); or something else?


--- End Message ---
--- Begin Message ---
Adam-

That is a function call. In Java:

class Code
{
    public static void function do_command(){ }
}

Code.do_command();

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:

> I'm looking at someone's code to learn and I'm relatively new to programming. 
>  In the code I see commands like:
> 
> $code->do_command();
> 
> I'm not really sure what that means.  How would that look in procedural style 
> programming?  do_command($code); or something else?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Adam-

That is a function call. In Java:

class Code
{
    public static void function do_command(){ }
}

Code.do_command();

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:

> I'm looking at someone's code to learn and I'm relatively new to programming. 
>  In the code I see commands like:
> 
> $code->do_command();
> 
> I'm not really sure what that means.  How would that look in procedural style 
> programming?  do_command($code); or something else?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Adam-

That is a function call. In Java:

class Code
{
    public static void function do_command(){ }
}

Code.do_command();

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:

> I'm looking at someone's code to learn and I'm relatively new to programming. 
>  In the code I see commands like:
> 
> $code->do_command();
> 
> I'm not really sure what that means.  How would that look in procedural style 
> programming?  do_command($code); or something else?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Did you mean to say "That is a method call."?

Bob McConnell

-------------------------
From: Joshua Kehn

That is a function call. In Java:

class Code
{
    public static void function do_command(){ }
}

Code.do_command();

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:

> I'm looking at someone's code to learn and I'm relatively new to
programming.  In the code I see commands like:
> 
> $code->do_command();
> 
> I'm not really sure what that means.  How would that look in
procedural style programming?  do_command($code); or something else?
> 

--- End Message ---
--- Begin Message ---
Bob-

Yes, yes I did.

And note that my Java code is incorrect, that should simply be public static 
void, no function.

This is what I get for taking a week to code everything in Node.js. 

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:32 PM, Bob McConnell wrote:

> Did you mean to say "That is a method call."?
> 
> Bob McConnell
> 
> -------------------------
> From: Joshua Kehn
> 
> That is a function call. In Java:
> 
> class Code
> {
>    public static void function do_command(){ }
> }
> 
> Code.do_command();
> 
> Regards,
> 
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
> 
> On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:
> 
>> I'm looking at someone's code to learn and I'm relatively new to
> programming.  In the code I see commands like:
>> 
>> $code->do_command();
>> 
>> I'm not really sure what that means.  How would that look in
> procedural style programming?  do_command($code); or something else?
>> 


--- End Message ---
--- Begin Message ---
It's object oriented code. $code is an instance of class, and do_command() is a 
method if that class. I'd advise reading up on oop php.

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Adam Williams" <adam_willi...@bellsouth.net>
Date: Fri, Sep 10, 2010 19:27
Subject: [PHP] newbie question about code
To: "PHP General list" <php-gene...@lists.php.net>

I'm looking at someone's code to learn and I'm relatively new to 
programming.  In the code I see commands like:

$code->do_command();

I'm not really sure what that means.  How would that look in procedural 
style programming?  do_command($code); or something else?


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


--- End Message ---
--- Begin Message ---
Node.js, wouldn't that be javascript rather than java?  :P

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -----
From: "Joshua Kehn" <josh.k...@gmail.com>
Date: Fri, Sep 10, 2010 19:32
Subject: [PHP] newbie question about code
To: "Bob McConnell" <r...@cbord.com>
Cc: "Adam Williams" <adam_willi...@bellsouth.net>, "PHP General list" 
<php-gene...@lists.php.net>


Bob-

Yes, yes I did.

And note that my Java code is incorrect, that should simply be public static 
void, no function.

This is what I get for taking a week to code everything in Node.js. 

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:32 PM, Bob McConnell wrote:

> Did you mean to say "That is a method call."?
> 
> Bob McConnell
> 
> -------------------------
> From: Joshua Kehn
> 
> That is a function call. In Java:
> 
> class Code
> {
>    public static void function do_command(){ }
> }
> 
> Code.do_command();
> 
> Regards,
> 
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
> 
> On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:
> 
>> I'm looking at someone's code to learn and I'm relatively new to
> programming.  In the code I see commands like:
>> 
>> $code->do_command();
>> 
>> I'm not really sure what that means.  How would that look in
> procedural style programming?  do_command($code); or something else?
>> 


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


--- End Message ---
--- Begin Message ---
Ash-

Correct, hence my typo and nomenclature slip. ;)

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:48 PM, a...@ashleysheridan.co.uk wrote:

> Node.js, wouldn't that be javascript rather than java?  :P
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> ----- Reply message -----
> From: "Joshua Kehn" <josh.k...@gmail.com>
> Date: Fri, Sep 10, 2010 19:32
> Subject: [PHP] newbie question about code
> To: "Bob McConnell" <r...@cbord.com>
> Cc: "Adam Williams" <adam_willi...@bellsouth.net>, "PHP General list" 
> <php-gene...@lists.php.net>
> 
> 
> Bob-
> 
> Yes, yes I did.
> 
> And note that my Java code is incorrect, that should simply be public static 
> void, no function.
> 
> This is what I get for taking a week to code everything in Node.js. 
> 
> Regards,
> 
> -Josh
> ____________________________________
> Joshua Kehn | josh.k...@gmail.com
> http://joshuakehn.com
> 
> On Sep 10, 2010, at 2:32 PM, Bob McConnell wrote:
> 
> > Did you mean to say "That is a method call."?
> > 
> > Bob McConnell
> > 
> > -------------------------
> > From: Joshua Kehn
> > 
> > That is a function call. In Java:
> > 
> > class Code
> > {
> >    public static void function do_command(){ }
> > }
> > 
> > Code.do_command();
> > 
> > Regards,
> > 
> > -Josh
> > ____________________________________
> > Joshua Kehn | josh.k...@gmail.com
> > http://joshuakehn.com
> > 
> > On Sep 10, 2010, at 2:27 PM, Adam Williams wrote:
> > 
> >> I'm looking at someone's code to learn and I'm relatively new to
> > programming.  In the code I see commands like:
> >> 
> >> $code->do_command();
> >> 
> >> I'm not really sure what that means.  How would that look in
> > procedural style programming?  do_command($code); or something else?
> >> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


--- End Message ---
--- Begin Message ---
At 2:27 PM -0400 9/10/10, Joshua Kehn wrote:
Adam-

That is a function call. In Java:

class Code
{
    public static void function do_command(){ }
}

Code.do_command();

Regards,

-Josh

Not just Java, but does I've seen this in several languages.

Javascript is one. But realize that Java is to Javascript as Ham is to Hamster. In other words, the two aren't related.

Cheers,

tedd
--
-------
http://sperling.com/

--- End Message ---
--- Begin Message ---
>
>
>
> This is what I get for taking a week to code everything in Node.js.
>
>

It is a Friday, so I'll let my curiosity get the best of me and ask a
follow-up on something non-PHP.  What insights/impressions do you have
regarding Node.js after a week of working with it?

Thanks,

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
I would check this out to give you a decent understanding of php's oop.

http://php.net/manual/en/language.oop5.php


Chris.


On Fri, Sep 10, 2010 at 2:27 PM, Adam Williams
<adam_willi...@bellsouth.net>wrote:

> I'm looking at someone's code to learn and I'm relatively new to
> programming.  In the code I see commands like:
>
> $code->do_command();
>
> I'm not really sure what that means.  How would that look in procedural
> style programming?  do_command($code); or something else?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Adam-

It is unique. I'm writing code that really can't be done any other way. How it 
handles events, sockets, etc is exceptional. The best part is everything now is 
JavaScript. The server (Node.js) is written in JavaScript. MongoDB is 
JavaScript. The frontend used to manage the WebSocket is entirely JavaScript. 

I have essentially replaced J2EE as the backend with Node and I couldn't be 
happier.

Of course standard JavaScript woes apply. Debugging is a royal pain in the ass. 
Your code can and will suddenly fail due to odd strange errors. There are 
stability concerns with Node, it is version 0.2 after all. 

It won't replace PHP or Java as an enterprise level solution, but it does fill 
in the gaps very nicely. 

Regards,

-Josh
____________________________________
Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Sep 10, 2010, at 2:53 PM, Adam Richardson wrote:

>> 
>> 
>> 
>> This is what I get for taking a week to code everything in Node.js.
>> 
>> 
> 
> It is a Friday, so I'll let my curiosity get the best of me and ask a
> follow-up on something non-PHP.  What insights/impressions do you have
> regarding Node.js after a week of working with it?
> 
> Thanks,
> 
> Adam
> 
> -- 
> Nephtali:  PHP web framework that functions beautifully
> http://nephtaliproject.com


--- End Message ---
--- Begin Message ---
On Fri, Sep 10, 2010 at 3:03 PM, Joshua Kehn <josh.k...@gmail.com> wrote:

> Adam-
>
> It is unique. I'm writing code that really can't be done any other way. How
> it handles events, sockets, etc is exceptional. The best part is everything
> now is JavaScript. The server (Node.js) is written in JavaScript. MongoDB is
> JavaScript. The frontend used to manage the WebSocket is entirely
> JavaScript.
>
> I have essentially replaced J2EE as the backend with Node and I couldn't be
> happier.
>
> Of course standard JavaScript woes apply. Debugging is a royal pain in the
> ass. Your code can and will suddenly fail due to odd strange errors. There
> are stability concerns with Node, it is version 0.2 after all.
>
> It won't replace PHP or Java as an enterprise level solution, but it does
> fill in the gaps very nicely.
>
> Regards,
>
> -Josh
>

Thanks for the insights, Josh.

I've been intrigued by Node.js and it's architectural implications, and your
feedback helps as I evaluate potential projects/experiments going forward.
 Excellent point about the debugging relative to other environments.  Palm's
inclusion of Node.js in webOS 2.0 does help provide more confidence in the
code-base, even if it is relatively early in the development cycle, so I
guess I'll have to start tinkering soon :)

Thanks again,

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com

--- End Message ---
--- Begin Message ---
Ok, here it goes...

I am building an app, that requires a web interface.  I am using PHP
becuase I am familiar with it.   Most of the app's i've been looking at,
use Python, Cherry.py and stuff, but what I was wondering, is is there a
way to create a php CLI app, that creates it's own "web server" even if
apache is installed.

i want to be able to run it on like port 8880 or something... just
looking out there fro something...  

TIA!

Steve


--- End Message ---
--- Begin Message ---
OH, i forgot to mention, if it ran on windows or linux, and required no
"install", just ran as an executable or something.

Steve.


On Fri, 2010-09-10 at 16:37 -0400, Steve Staples wrote:
> Ok, here it goes...
> 
> I am building an app, that requires a web interface.  I am using PHP
> becuase I am familiar with it.   Most of the app's i've been looking at,
> use Python, Cherry.py and stuff, but what I was wondering, is is there a
> way to create a php CLI app, that creates it's own "web server" even if
> apache is installed.
> 
> i want to be able to run it on like port 8880 or something... just
> looking out there fro something...  
> 
> TIA!
> 
> Steve
> 
> 


-- 

Steve Staples
Web Application Developer
519.258.2333 x8414


--- End Message ---
--- Begin Message ---
On Fri, Sep 10, 2010 at 16:37, Steve Staples <sstap...@mnsi.net> wrote:
> Ok, here it goes...
>
> I am building an app, that requires a web interface.  I am using PHP
> becuase I am familiar with it.   Most of the app's i've been looking at,
> use Python, Cherry.py and stuff, but what I was wondering, is is there a
> way to create a php CLI app, that creates it's own "web server" even if
> apache is installed.
>
> i want to be able to run it on like port 8880 or something... just
> looking out there fro something...

    I had written one about two years ago for a project, but the code
belongs to the client company, so it won't make it to open source.
However, not only can it be done, but there's even some in existence.
Check this one out:

        http://nanoweb.si.kz/

    I've never used it myself, but it may be worth a shot for you.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/

--- End Message ---
--- Begin Message ---
Daniel Brown wrote:
On Fri, Sep 10, 2010 at 16:37, Steve Staples <sstap...@mnsi.net> wrote:
Ok, here it goes...

I am building an app, that requires a web interface.  I am using PHP
becuase I am familiar with it.   Most of the app's i've been looking at,
use Python, Cherry.py and stuff, but what I was wondering, is is there a
way to create a php CLI app, that creates it's own "web server" even if
apache is installed.

i want to be able to run it on like port 8880 or something... just
looking out there fro something...

    I had written one about two years ago for a project, but the code
belongs to the client company, so it won't make it to open source.
However, not only can it be done, but there's even some in existence.
Check this one out:

        http://nanoweb.si.kz/

    I've never used it myself, but it may be worth a shot for you.


I use this as a mini web server on my XP workstation just for testing little things. I have no idea how well it will perform in real world use nor have I tried it on any *nix setup.

Just my experiences...

Jim

--- End Message ---

Reply via email to