Re: [PHP] Re: php5 - website development - what next
Hi: good idea. I need assistance. lol, http://code.google.com/p/yafphp/ On 10/09/2010 09:22, Sharl.Jimh.Tsin wrote: how about woking on open source projects? Best regards, Sharl.Jimh.Tsin (From China) 2010/10/8 Nathan Rixham: Rakesh Mishra wrote: Hi All, I am PHP 4& PHP 5 developer for last 6 yrs. Last year also got Zend certification. Since now I have work on different CMS, Social Networking, telecome , horse racing domains. But now I am little bored with developing website. What other things I can do with PHP ? Even I believe my knowledge, interest,& market value with PHP 5 is getting saturated. Do you guys suggest me what other thing I can learn or work which help me to keep my lust for PHP alive and also boost my career. I suggest you concentrate less on the language and more on: - interesting / challenging projects - using PHP with other new interesting technologies - applying design / programming paradigms from other languages in PHP - contributing to PHP internals Status.net, GNU Social, DISO Project, lorea.cc and elgg all occupy a rather interesting project space with small but inspiring communities of people who like to push technical boundaries and merge technologies, particularly within the social space. http://www.ushahidi.com/platform is a thriving project which combines technical excellence and forward thinking with real world large scale community needs, being critical in several major world events, even if you don't get involved, their code bases for ushahidi + related on http://github.com/ushahidi is brilliant, likewise the swiftriver project http://swift.ushahidi.com/ doesn't look much on the face of it but is really good - just check out the SwiftRiver Research at the right. There are many interesting protocol based communities who often implement in PHP, and these can be rather interesting / challenging and active spaces - ActivityStreams, Salmon-Protocol, OneSocialWeb to name just a few. On the technology side of things, you may want to consider going down the NoSQL route for a while, http://nosql-database.org/ gives a good summary of database - I'd recommend CouchDB, MongoDB and Redis for a nice well supported start that will introduce you to new design paradigms and bring many performance increases to your applications. Alternatively you may find it refreshing to try some other languages, perhaps a functional language like Scala, OCaml or Haskell, or maybe in to a very active language such as ECMAScript (server side js) via something like http://node.js/ you may just find that you don't want to use PHP any more, or you may find that you want to apply the paradigms and lessons learned to PHP using the new features in 5.3 Hope that helps a little, I'll stop here because I could list projects till the end of time! Many Regards Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Laruence Senior PHP consultant http://www.laruence.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] code documentation
Hi: yep , I thinks so. On 10/09/2010 18:22, Tommy Pham wrote: Hi everyone, It's been a couple of years since I started a PHP project. Are there any other document formats other than phpDocumentor? Is phpDocumentor still the preferred format? TIA, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php . -- Laruence Senior PHP consultant http://www.laruence.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Need Help in Yaf spreading
CC to php-general. thanks On Mon, Aug 20, 2012 at 4:06 PM, Laruence wrote: > Hi: > Yaf (http://pecl.php.net/yaf) is a PHP MVC framework, which is > build as a PHP extension. > > It could be considered as the fastest PHP framework for > now(http://www.laruence.com/2011/12/02/2333.html), > > and it has already been used in a lots of productions in baidu, > sina. like weibo.com. > > we gain 76% performance boost while refactor weibo.com based on > yaf ( of course and some other improvements) > > so, I can say that Yaf is very popular in chinese world. but it > was a little hysteretic in english world. > > I asked for some help in sepreading Yaf in english world. any > recommends of Yaf (post, twitter, etc) will be appreciated. > > thanks > > -- > Laruence Xinchen Hui > http://www.laruence.com/ -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP frameworks
Hi: if you have high performance need, you can considering Yaf( a PHP framework which is build in PHP extension) http://pecl.php.net/package/Yaf thanks Best regards 惠新宸 Xinchen Hui http://www.laruence.com/ On 2011/7/22 20:38, Floyd Resler wrote: On Jul 22, 2011, at 8:33 AM, Richard Quadling wrote: On 22 July 2011 13:26, Floyd Resler wrote: On Jul 21, 2011, at 11:41 PM, Micky Hulse wrote: On Thu, Jul 21, 2011 at 6:44 PM, Shawn McKenzie wrote: A la CakePHP. Will automagically build controllers and views for the admin of your tables/models if you wish. Oooh, interesting! I will check out CakePHP! Thanks for tip! :) I actually use my own framework. I needed a very light weight, flexible framework. I designed it from the ground up to be very flexible and to use AJAX and jQuery on the client side. If you'd be interested in check it out, just let me know and I'll give you a link to the source code. Take care, Floyd http://www.brandonsavage.net/why-every-developer-should-write-their-own-framework/ Good article! I knew there was a reason why I never released mine but just offer it up on occasion to someone who might find it useful! :) Take care, Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php5-fpm segfault
Hi : could you file a bug at https://bugs.php.net/ this is the proper way to report a bug :) thanks -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP script won't run in the background
$ stty -tostop thanks On Sat, Nov 19, 2011 at 10:33 PM, richard gray wrote: > Hi all > > Hope someone can help me with a weird issue I have... > > I am trying to run a php CLI script in the background and it just won't run > - it has a status of Stopped SIGTOU (Trying to write output) - Here are the > details > > OS > Mac OS X Lion 10.7.2 > > PHP > PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep 8 2011 19:34:00) > Copyright (c) 1997-2011 The PHP Group > Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies > > I created a basic script test.php > > > > Here are the results of various tests:- > > Test 1) php -f test.php (Hello world gets displayed) > Test 2) php -f test.php >test.log 2>&1 (Hello world gets put into test.log) > Test 3) php -f test.php >test.log 2>&1 & --- I get [1]+ Stopped(SIGTTOU) > php -f test.php > test.log 2>&1 -- and the job just sits there doing > nothing nothing gets logged however lsof shows the log file is open > > It is something to do with php because a similar shell script gets executed > no problems in the background... > > This has me stumped ... any ideas? > > TIA > Rich > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP script won't run in the background
On Sat, Nov 19, 2011 at 11:27 PM, richard gray wrote: > >> Laruence, while that may be a helpful answer to a few people in the know, I think a clue is better, leave some space for the people to dance. :) >> just replying back with a single line like that isn't really going to help >> the people who are having this problem. At least explain why you suggested >> that, or what it does for those on the list that don't know, especially as >> it's not a PHP thing, it's a Unix command thing. >> >> Richard, some more info on the command Laruence mentioned can be found at >> http://docstore.mik.ua/orelly/unix/upt/ch12_07.htm which explains it in more >> detail. >> > not sure this is relevant as my script is not trying to write to the > terminal the >test.log 2>&1 is sending stdout and stderr to the log file not > the tty... did you run php with readline? try run the script without php-readline. thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP script won't run in the background
Hi: I mean, do you built your php with readline support, or do you load readline.so into PHP? if so, remove it, then try again. and you also can use: gdb --pid={the pid of the stopped php} then you will find where the php hangs. thanks On Wed, Nov 23, 2011 at 1:04 AM, richard gray wrote: > On 22/11/2011 05:51, Laruence wrote: >> >> did you run php with readline? try run the script without php-readline. >> >> thanks > > No - the script was just a basic string echo - no readline was involved. > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Yaf_Route
HI: Yaf designd a route statck to proviods the ability for extends route process. you can add new route into stack by calling Yaf_Router::addRoute(or addConfig), when a request coming , Yaf will call the top route in the stack at the first time, as pseudo codes like: while ($route = pop($stack)) { if ($route->route($request) == TRUE) { return FINISH. } } there are two routes defined by Yaf are always return TRUE, that are Yaf_Route_Simple and Yaf_Route_Static. so according your question, the easiest way is reigster a Yaf_Route_Simple route with no-sence parameters, then all the request will be routed to default controller and default action. and also you can use Yaf_Route_Regex, it is the most felixible route in Yaf: http://www.php.net/manual/en/yaf-route-rewrite.construct.php the first argument for Yaf_Route_Regex::__construct is used to match a uri, if the uri doesn't match this value, then the Yaf_Route_Regex will don't route this request, just simple return FALSE, so we can register a Regex route at the Bootstrap like: public function _initRoute(Yaf_Dispatcher $dispatcher) { $route = new Yaf_Route_Regex ( "#(.*)#", array( "controller" => "product", "action" => "info", ), array( 1 => "test", ) ); $router->addRoute('regex', $route); } see the code above, we set the first argument to Yaf_Route_Regex a value : "#(.*)#", which means this route will match any request-uri. then we can assign any controller/action pair for this route result in the second argument. the last argument means, the first captrue in the regex pattern will be named "test" in the $request::_$params, that is you can access this value by calling $request->getParam("test"). I have updates some new docs at php.net, but it need a little time to show up.and I will keep updating :) PS: I am going to cc this mail to php-generall list, then if any other people have the sampe question, they will find this :) thanks very much for you interesting of Yaf :) 2011/11/28 Moldován Eduárd : > Oh, I forgot something. An example of a complete application.ini and ways to > get the config values with YaF would be great! > Thx ahead, > edi > > > > 2011.11.27. dátummal, 14:49 időpontban Laruence írta: > > HI: > I have update some new docs into Yaf doc(php.net), but it will take a > little time to show up. > and sure, could you give me some specific questions? I will answer you > :) > also, I will add some new examples soon :) > thanks very much for your interesting of Yaf > :) > 2011/11/27 Moldován Eduárd >> >> Hey there, >> >> I started working a bit with YaF, but it looks like the documentation is >> very rare. Could you tell me please where any documentation can be found on >> routing? >> Any example maybe? >> I would actually welcome any kind of documentation, on any part of YaF >> (Except what I already found on php.net and code.google.com). >> >> Thx, >> edi >> >> -- >> Moldován Eduárd >> boxed.hu >> e...@boxed.hu >> +36 30 691 2 691 >> skype: edimoldovan > > > -- > Laruence Xinchen Hui > http://www.laruence.com/ > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Yaf_Route
Hi: Yaf_Router::addRoute is not a static method. you should do like: $dispatcher->getRouter()->addRoute("regex", $route); // http://www.php.net/manual/en/yaf-dispatcher.getrouter.php btw: when you in development environ, it is useful to keep error_reporting on and look at error_log when you get some problems :) thanks 2011/11/30 Eduárd Moldovan > Hey Laruence, > > I have tried the below example, but did not really get it work. > My code looks like this: > > public function _initRoute(Yaf_Dispatcher $dispatcher) { > > $route = new Yaf_Route_Regex ( > "#(.*)#", > array( > "controller" => "index", > "action" => "index", > > ), > array( > 1 => "test", > ) > ); > > Yaf_Router::addRoute ('regex', $route); > } > > Any ideas about what I am doing wrong? > > Thx, > edi > > 2011/11/28 Laruence > >> HI: >> Yaf designd a route statck to proviods the ability for extends route >> process. >> >> you can add new route into stack by calling >> Yaf_Router::addRoute(or addConfig), >> >> when a request coming , Yaf will call the top route in the stack at >> the first time, as pseudo codes like: >> >> while ($route = pop($stack)) { >> if ($route->route($request) == TRUE) { >> return FINISH. >> } >> } >> >> >> there are two routes defined by Yaf are always return TRUE, that >> are Yaf_Route_Simple and Yaf_Route_Static. >> >> so according your question, the easiest way is reigster a >> Yaf_Route_Simple route with no-sence parameters, then all the request >> will be routed to default controller and default action. >> >> >> and also you can use Yaf_Route_Regex, it is the most felixible >> route in Yaf: >> http://www.php.net/manual/en/yaf-route-rewrite.construct.php >> >> the first argument for Yaf_Route_Regex::__construct is used to match >> a uri, if the uri doesn't match this value, then the Yaf_Route_Regex >> will don't route this request, just simple return FALSE, so we >> can register a Regex route at the Bootstrap like: >> >> >>public function _initRoute(Yaf_Dispatcher $dispatcher) { >>$route = new Yaf_Route_Regex ( >>"#(.*)#", >>array( >>"controller" => "product", >>"action" => "info", >>), >>array( >>1 => "test", >>) >>); >>$router->addRoute('regex', $route); >>} >> >>see the code above, we set the first argument to Yaf_Route_Regex a >> value : "#(.*)#", which means this route will match any request-uri. >> >>then we can assign any controller/action pair for this route >> result in the second argument. >> >>the last argument means, the first captrue in the regex pattern >> will be named "test" in the $request::_$params, that is you can access >> this value by calling $request->getParam("test"). >> >> >>I have updates some new docs at php.net, but it need a little time >> to show up.and I will keep updating :) >> >>PS: I am going to cc this mail to php-generall list, then if any >> other people have the sampe question, they will find this :) >> >> thanks very much for you interesting of Yaf :) >> >> >> 2011/11/28 Moldován Eduárd : >> > Oh, I forgot something. An example of a complete application.ini and >> ways to >> > get the config values with YaF would be great! >> > Thx ahead, >> > edi >> > >> > >> > >> > 2011.11.27. dátummal, 14:49 időpontban Laruence >> írta: >> > >> > HI: >> >I have update some new docs into Yaf doc(php.net), but it will >> take a >> > little time to show up. >> >and sure, could you give me some specific questions? I will answer >> you >> > :) >> >also, I will add some new examples soon :) >> > thanks very much for your interesting of Yaf >> > :) >> > 2011/11/27 Moldován Eduárd >> >> >> >> Hey there, >> >> >> >> I started working a bit with YaF, but it looks like the documentation >> is >> >> very rare. Could you tell me please where any documentation can be >> found on >> >> routing? >> >> Any example maybe? >> >> I would actually welcome any kind of documentation, on any part of YaF >> >> (Except what I already found on php.net and code.google.com). >> >> >> >> Thx, >> >> edi >> >> >> >> -- >> >> Moldován Eduárd >> >> boxed.hu >> >> e...@boxed.hu >> >> +36 30 691 2 691 >> >> skype: edimoldovan >> > >> > >> > -- >> > Laruence Xinchen Hui >> > http://www.laruence.com/ >> > >> >> >> >> -- >> Laruence Xinchen Hui >> http://www.laruence.com/ >> > > > > -- > *Moldován Eduárd* > > boxed.hu > e...@boxed.hu > +36 30 691 2 691 > skype: edimoldovan > > -- Laruence Xinchen Hui http://www.laruence.com/
[PHP] Re: yaf modules and plugins
Hi: a database should be a model, module is another concept. :) pls refer to : http://www.php.net/manual/en/class.yaf-loader.php sorry for dealy :) thanks 2011/12/1 Moldován Eduárd > Hey Laruence, > > I have another more questions. > Modules and plugins. How do they work, how are they loaded? > In my current php framework database is a module, cache also. There are no > plugins there. > > Thx in advance, > edi > *Moldován Eduárd* > boxed.hu > e...@boxed.hu > +36 30 691 2 691 > skype: edimoldovan > > > -- Laruence Xinchen Hui http://www.laruence.com/
Re: [PHP] How to use a variable variable with an array
On Wed, Dec 14, 2011 at 9:27 AM, Nils Leideck wrote: > Hi Al, > > many thanks for your feedback. Unfortunately I don’t know the deepness of the > array so I can’t use the nested foreach() idea :-( Let me try to simplify my > question (which also helps myself to clarify my process ;-) > > I have a variable where the value is a string that is exactly the path to the > array value: > > [code] > $arrayPath = > "['user_interface’][‘design']['my_colors']['item_number_one’]”; > [/code] > > And I have an array that has all the details: > > [code] > $myArray = coolFunction(‘getArray’); > [/code] > > The question is, how can I use these both informations to return a value from > the $myArray? > > Examples I tried unsuccessfully: > > [code] > [...] > echo $myArray$arrayPath; > echo $myArray{$arrayPath}; > echo $myArray${arrayPath}; > echo $myArray${$arrayPath}; > echo $myArray.$arrayPath; > echo $myArray.$arrayPath; > [...] > [/code] > etc... > > your feedback is much much much appreciated!!! > > Cheers, Nils > -- > http://webint.cryptonode.de / a Fractal project for you quesion, try eval: array("b"=>array("c"))); $key = "['a']'['b]"; $value = eval("return \$arr". $key .";"); ?> ps: your requirement is a little odd :) thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php