[Red5] I'm thinking about embeding PHP5 into Red5, anybody interested?

Jason Lester jasonrlester at yahoo.com
Sat Mar 29 15:00:07 PST 2008


>From what I have read quercus is just a emulation of
php4. Thats not a bad idea, but I like the idea of
pure php, and that of php5. That way all modules are
supported, plus I know that I am dealing with a
scrutinized and trusted code base. historically, php's
security issues have mainly revolved around access to
the file system and database (such as injection and so
forth do to coding mistakes) rather then memory
issues, so the fact that it is in house rather then
opensource (possibility for errors in code) isn't
offset by the fact that it is java (less possibility
for memory exploits). Thats not to say that zends php
is without its flaws, but it is considered safe and
secure. any customizing that I have done only effects
the way that it compiles, so memory allocation,
garbage collection, and things like that are not
effected. I am also looking over easier ways to send
objects back and forth between Java and php to not
only simplify development, but to eliminate
possibilities of mishandled variables and to keep the
scope of the interface as simple as possible so that
things are easier to keep track of. For example, if I
was to use JSON, it would make things more easier by
simplifying access to objects, plus make it to where I
only have to keep track of two strings (one for JSON
going to php, and one for JSON coming from). It would
come with little overhead since JSON only cost you
around 1-4 additional characters per item encoded.

--- Paul Dhaliwal <subpaul at gmail.com> wrote:

> Quercus might help
> 
> http://www.caucho.com/resin-3.0/quercus/
> 
> Paul Dhaliwal
> 
> On Sat, Mar 29, 2008 at 8:58 AM, Jason Lester
> <jasonrlester at yahoo.com>
> wrote:
> 
> > >> Daniel Rossi
> >
> > Hi, I guess I need to explain this a little
> better.
> > First, it isn't used for web pages (HTTP/html) in
> any
> > way. It provides direct access to php functions
> within
> > Java. So flash will be able to access data though
> it
> > realtime and do countless other things. So, for
> > example, when a client enters a chat room you can
> use
> > php to check if he is an existing member of that
> > group. the function looks like this.
> >
> > fetch_array(php_file, php_function, args[])
> >
> > which would be used like this for the task above
> >
> > The java method would be something like
> > groups = php().fetch_array("members.php",
> > "get_groups", user_id);
> >
> > With the function above, Java will use php's
> include
> > function to include the file members.php and
> process
> > it... not to do a HTTP request...
> >
> > within members.php you would have a php function
> like
> > this
> >
> > function get_groups($user_id)
> > {
> >    $query = mysql_query("SELECT id FROM groups
> WHERE
> > user_id = '".$user_id."'");
> >
> >    for($i=0; $row = mysql_fetch_array($query ,
> > MYSQL_NUM);$i++){
> >        $return[i] = $row;
> >    }
> >
> >    return $return;
> > }
> >
> > which returns the array to php().fetch_array() in
> Java
> > and assigns it to the Java array groups ;)
> >
> > functions like echo() wont work unless Java
> accesses
> > php's output buffer with fetch_buffer() in which
> case
> > the function/script will return a string. This
> could
> > be useful in XML and a few other things. Other
> then
> > that, echo and normal output will be going the way
> of
> > /dev/null
> >
> > Need to go to bed, but I will get back in a few
> hours
> >
> >
> >
> > 
>
____________________________________________________________________________________
> > Looking for last minute shopping deals?
> > Find them fast with Yahoo! Search.
> >
>
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> >
> > _______________________________________________
> > Red5 mailing list
> > Red5 at osflash.org
> >
> http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> > _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the Red5 mailing list