librelist archives

« back to archive

[Patch] improve PATH compatiblity

[Patch] improve PATH compatiblity

From:
Thomas Keller
Date:
2011-02-26 @ 01:05
could not decode message

Re: [photon.users] [Patch] improve PATH compatiblity

From:
Mehdi Kabab
Date:
2011-02-26 @ 09:52
could not decode message

Re: [photon.users] [Patch] improve PATH compatiblity

From:
Loic d'Anterroches
Date:
2011-02-26 @ 19:30
Hello,

I applied this sh variant as it keeps the ability to force the path to a
given version of PHP and photon.php. In development, this is practical.

thanks both of you.
loïc

On 2011-02-26 10:52, Mehdi Kabab wrote:
> Hi!
> 
> Thx Thomas for this patch.
> I was also prepared, which still uses sh.
> 
> Mehdi.
> 
> 2011/2/26 Thomas Keller <me@thomaskeller.biz <mailto:me@thomaskeller.biz>>
> 
> 
>     Hi!
> 
>     Attached is a small patch for your consideration. It helped me getting
>     `hnu` running on OSX with a MacPorts PHP / ZMQ installation.
> 
>     Thomas.
> 
>     --
>     GPG-Key 0x160D1092 | tommyd3mdi@jabber.ccc.de
>     <mailto:tommyd3mdi@jabber.ccc.de> | http://thomaskeller.biz
>     Please note that according to the EU law on data retention, information
>     on every electronic information exchange might be retained for a period
>     of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
> 
> 
> 
> 
> -- 
> Mehdi Kabab
> Développeur Web / Auteur
> 
> CV : http://mehdi.kabab.name/
> Livre : http://gimp4you.eu.org/livre/
> Code : http://pioupioum.fr/
> Twitter: http://twitter.com/piouPiouM
> 

-- 
Dr Loïc d'Anterroches
Founder Céondo Ltd

w: www.ceondo.com       |  e: loic@ceondo.com
t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124

Céondo Ltd
Dalton House
60 Windsor Avenue
London
SW19 2RR / United Kingdom

Hints on getting the chat demo up and running

From:
Devon Weller
Date:
2011-02-26 @ 18:22
Until there is a full tutorial on getting the chat demo, here are some 
hints that may help users get the chat demo up and running.


Here is my config.php:

return array(
             // Once your work is completed, you must switch the flag
             // to false as in case of errors in debug mode, a lot of
             // data are printed on screen.

             // The main debug flag will set the logging to debug
             // mode, but also the handling of errors.
             'debug' => true,

             'urls' => include __DIR__.'/urls.php',
             
             'secret_key' => '',
             'admins' => array(array('1st Admin Name', 'admin1@example.com')),
             
             // Only one simple application is installed in project,
             // the 'helloworld' application.
             'installed_apps' => array('helloworld'),

             // The templates are compiled as .php files and are
             // stored in the tmp folder.
             'tmp_folder' => '/tmp',

             // The template folders are where your templates are stored.
             'template_folders' => array(__DIR__.'/templates'),

             );
             

Here is urls.php

return array(
    array('regex' => '#^@chat$#',
           'sub' => include __DIR__ . '/apps/photonchat/urls.php'),
);


Here is apps/photonchat/urls.php

return array(array('regex' => '##',
                   'view' => array('\photonchat\views\Chat', 'chatbox'),
                   'name' => 'photonchat_chatbox',
                   ),
             );






Here is my mongrel2 config:

handler_chat = Handler(send_spec='tcp://127.0.0.1:9997', 
send_ident='34f9ceee-cd52-4b7f-b197-88bf2f0ec378', 
recv_spec='tcp://127.0.0.1:9996', recv_ident='')

main = Server(
    uuid="f400bf85-4538-4f7a-8908-67e313d515c2",
    access_log="/logs/access.log",
    error_log="/logs/error.log",
    default_host="localhost",
    chroot="./",
    name="test",
    pid_file="/run/mongrel2.pid",
    port=6767,
    hosts = [
        Host(name="localhost", routes={
            '/chat/': Dir(base='chat/static/photonchat/', 
index_file='index.html', default_ctype='text/plain'),
            '/static/': Dir(base='chat/static/photonchat/', 
index_file='index.html', default_ctype='text/plain'),
            '@chat': handler_chat
        })
    ]
)
settings = { "limits.content_length": 2097152000, "upload.temp_store": 
"/tmp/mongrel2.upload.XXXXXX" }

servers = [main]




Notes: 
- I named my app folder "chat" and put it inside my the mongrel2 directory.
- Important: Be sure to run your server with one child, otherwise the 
memory store doesn't work correctly.  Use this command:  "hnu server start
--children 1"



Good luck!

Re: [photon.users] Hints on getting the chat demo up and running

From:
Loic d'Anterroches
Date:
2011-02-26 @ 19:25
Hello,

this is nice, thanks a lot. I will get a "chat" tutorial up and running
next week. Basically starting from a bare installation of Ubuntu 10.10
up to something fully functional. This is relatively easy to do (thanks
to all the VM we have now, it is not that hard to start from a fresh setup).

loïc



On 2011-02-26 19:22, Devon Weller wrote:
> 
> Until there is a full tutorial on getting the chat demo, here are some 
hints that may help users get the chat demo up and running.
> 
> 
> Here is my config.php:
> 
> return array(
>              // Once your work is completed, you must switch the flag
>              // to false as in case of errors in debug mode, a lot of
>              // data are printed on screen.
> 
>              // The main debug flag will set the logging to debug
>              // mode, but also the handling of errors.
>              'debug' => true,
> 
>              'urls' => include __DIR__.'/urls.php',
>              
>              'secret_key' => '',
>              'admins' => array(array('1st Admin Name', 'admin1@example.com')),
>              
>              // Only one simple application is installed in project,
>              // the 'helloworld' application.
>              'installed_apps' => array('helloworld'),
> 
>              // The templates are compiled as .php files and are
>              // stored in the tmp folder.
>              'tmp_folder' => '/tmp',
> 
>              // The template folders are where your templates are stored.
>              'template_folders' => array(__DIR__.'/templates'),
> 
>              );
>              
> 
> Here is urls.php
> 
> return array(
>     array('regex' => '#^@chat$#',
>            'sub' => include __DIR__ . '/apps/photonchat/urls.php'),
> );
> 
> 
> Here is apps/photonchat/urls.php
> 
> return array(array('regex' => '##',
>                    'view' => array('\photonchat\views\Chat', 'chatbox'),
>                    'name' => 'photonchat_chatbox',
>                    ),
>              );
> 
> 
> 
> 
> 
> 
> Here is my mongrel2 config:
> 
> handler_chat = Handler(send_spec='tcp://127.0.0.1:9997', 
send_ident='34f9ceee-cd52-4b7f-b197-88bf2f0ec378', 
recv_spec='tcp://127.0.0.1:9996', recv_ident='')
> 
> main = Server(
>     uuid="f400bf85-4538-4f7a-8908-67e313d515c2",
>     access_log="/logs/access.log",
>     error_log="/logs/error.log",
>     default_host="localhost",
>     chroot="./",
>     name="test",
>     pid_file="/run/mongrel2.pid",
>     port=6767,
>     hosts = [
>         Host(name="localhost", routes={
>             '/chat/': Dir(base='chat/static/photonchat/', 
index_file='index.html', default_ctype='text/plain'),
>             '/static/': Dir(base='chat/static/photonchat/', 
index_file='index.html', default_ctype='text/plain'),
>             '@chat': handler_chat
>         })
>     ]
> )
> settings = { "limits.content_length": 2097152000, "upload.temp_store": 
"/tmp/mongrel2.upload.XXXXXX" }
> 
> servers = [main]
> 
> 
> 
> 
> Notes: 
> - I named my app folder "chat" and put it inside my the mongrel2 directory.
> - Important: Be sure to run your server with one child, otherwise the 
memory store doesn't work correctly.  Use this command:  "hnu server start
--children 1"
> 
> 
> 
> Good luck!
> 

-- 
Dr Loïc d'Anterroches
Founder Céondo Ltd

w: www.ceondo.com       |  e: loic@ceondo.com
t: +44 (0)207 183 0016  |  f: +44 (0)207 183 0124

Céondo Ltd
Dalton House
60 Windsor Avenue
London
SW19 2RR / United Kingdom