Re: [PHP] Problem with inserting numbers...
when $num++; executed $num will never be '1'; you may change the while loop to while ($num 1) { while ($row = ... 2011/8/11 Jason Pruim pru...@gmail.com On Aug 10, 2011, at 9:36 PM, MUAD SHIBANI wrote: Basically you can increase time limit for this file to handle your request by using set_time_limit function ... Hi Maud, Looked into set_time_limit and even tried running it with a value of 120 but it didn't help... I'm affraid I have a problem with the way the 2 while loops are interacting and creating a infinite loop... BUT... I'm thinking there must be a better way... Maybe a while with a foreach? Now I'm just thinking outloud :) Jason Pruim pru...@gmail.com
Re: [PHP] Doctrine madness!
2011/6/17 Nathan Nobbe quickshif...@gmail.com On Thu, Jun 16, 2011 at 3:58 PM, Eric Butera eric.but...@gmail.com wrote: On Thu, Jun 16, 2011 at 5:37 PM, Daevid Vincent dae...@daevid.com wrote: -Original Message- From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Thursday, June 16, 2011 9:51 AM To: php-general@lists.php.net Subject: [PHP] Doctrine madness! Hi gang, If anyone out there has some experience w/ Doctrine now would be a great time to share it! Yeah, I've used Doctrine as part of Symfony. Both suck balls and are a perfect example of why you should NEVER use frameworks. Lesson learned the hard way. Re-write with your own MySQL wrappers and for the love of God and all that is holy do NOT make it an ORM wrapper. some of the functionality doctrine has is amazing and it is a big time saver for sure. sf is also one of the smoothest frameworks ive used in php. i think this goes to show you that frameworks don't to *everything* perfectly, nor can they. what i find more painful is the fact that 130+ ppl on the doctrine irc channel can't offer anything but a shoddy workaround that they assume i'm too dumb to have already thought of myself. when in reality, it's like 'no, your crappy library has a bug in it, could you please address that...' what is even more disheartening is that through php itself, i have no way of deciphering which variable is holding this memory or any way to go about freeing it, even with the magic circular reference handling of 5.3. that bodes badly for php, plain and simple. what it really amounts to is php is good at doing 1 thing and 1 thing only, generating web pages. for anything else, including command line scripts that run for more than 30 seconds, choose an actual programming language or be prepared to deal w/ hacky, disgusting workarounds. it is sad to be acknowledged that php still has no significant progress in orm libraries. but i would still be confident in that php is good for web programming and it does not one thing but many good comparing to the other many languages such as python, ruby etc. it is simple to start, easy to control, extensive to integration, mature for profiling and performance tuning, low cost in learning etc. although the language its self is not every good in a manner of structured, object-oriented, etc. i think i see none language in such a manner. and you? -nathan
[PHP] what kind of features would you like in php orms?
and how to design such an orm in current state of php language?
Re: [PHP] what kind of features would you like in php orms?
thanks, how about the abstraction of different databases? it seems PDO is still lack of functions of importance. I'm currently trying to design a automated model like django or activeRecord. it should be quiet simple and automated, i have managed to possibly create the whole database only once. but the abstraction of the database and subsequent manipulation seem far more complicated than the previous part i'm currently only support mysql and only support whole query at once. 2011/6/17 jean-baptiste verrey jeanbaptiste.ver...@gmail.com - defining the mapping schema in an alternate method than using meta data (I HATE them, I would prefer an XML file with a DTD so you could use autocompletion with IDE like NetBeans) java's hibernate instead of python's exlir or ruby 's rail style ? mean no ActiveRecord? - clear keywords in the schema - OQL can do UPDATEs - one and only one configuration file with everything in it (and with why not the schema) - to not forget to KEEP IT SIMPLE, specialised ORM that does everything already exists so there's no point in writing one! that's it for me (at least at the moment) Of course I would suggest to use PHP 5.3 specially for late static binding (and for people that love namespaces) On 17 June 2011 07:42, 李白|字一日 calid...@gmail.com wrote: and how to design such an orm in current state of php language?
Re: [PHP] Re: about php comet
is there an efficient way to hold the requests while loop is an expensive way in most cases. and i don't know how to notify the holding connections if the change need to be notify to the holding requests? writing extension to php is also a very expensive way for me:( 2011/6/3 Adam Richardson simples...@gmail.com On Fri, Jun 3, 2011 at 1:50 AM, 李白|字一日 calid...@gmail.com wrote: any idea? 2011/5/25 李白|字一日 calid...@gmail.com hello, I am every interested in comet applications recently, and sadly found php is very weak in this area. i am just wondering if it is possible to write an extension to extend the ability of the php to easy the way to comet applications? if it possible for php to hold the connect from the client when it is in fast cgi mode or apache mod php mode? Comet can use one of several techniques for low-latency data ( http://cometdaily.com/about/), with the long-polling mechanism to simulate the realtime pushing of data from the server being a popular option: http://cometdaily.com/2007/11/15/the-long-polling-technique/ http://en.wikipedia.org/wiki/Comet_(programming) http://en.wikipedia.org/wiki/Comet_(programming)To my understanding, PHP itself can accommodate this quite nicely. Merely start an infinite loop that breaks and returns new data when available. You'll probably have to adjust your web server settings and php.ini configuration to allow reasonably long requests for this particular need. However, when requests do time out, it's not a big deal as the javascript should be set up to reinitiate a new request if that happens, just as it would if the request returned new data and closed, giving the appearance of a continuous stream of pushed data. This all said, if you wanted to write an extension to facilitate long polling, you could, but given the natural latencies for these requests, I'm not sure you'd find a significant benefit. Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com
Re: [PHP] Re: about php comet
2011/6/3 Adam Richardson simples...@gmail.com On Fri, Jun 3, 2011 at 3:43 AM, 李白|字一日 calid...@gmail.com wrote: 2011/6/3 Adam Richardson simples...@gmail.com On Fri, Jun 3, 2011 at 2:20 AM, 李白|字一日 calid...@gmail.com wrote: is there an efficient way to hold the requests while loop is an expensive way in most cases. You can call sleep(number_of_seconds_to_sleep) within the while loop to lower the cost, so to speak. yes, an interrupt will be a better way. currently libevent is in beta state, and i don't know if the libevent extension can be used in mod_php to implement comet applications. Oh, I see. Yes, I'm not sure I'd try using that extension yet. and i don't know how to notify the holding connections if the change need to be notify to the holding requests? Sorry, I'm not sure what you mean here. please forgive my poor english, i mean we may have projects need interaction with mulitple users and the state changes of one user should be send to the users involved, like online games chatting rooms. I believe I understand you, now. This could get costly in terms of resources, and I now better understand your interest in the libevent extension. I'd be tempted to write custom C extensions for a web server like nginx, which naturally handles asynchronous IO. And, in this case, you could even make use of fast polling instead of long polling, due to the performance of nginx, such as demonstrated in the this example: http://amix.dk/blog/post/19414 thanks for the advice, but i don't know if it can be integrated into web pages. where in web pages, browsers will stop the requests to different ports even when the url having the save domain name. if i want to host more pages, add more interactions, it would be every difficult. so it would be better to have php solutions to make it easier :) And, don't worry about your English too much. My Chinese stops after ni hao ;) ni hao is a good start:) Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com
[PHP] Re: about php comet
any idea? 2011/5/25 李白|字一日 calid...@gmail.com hello, I am every interested in comet applications recently, and sadly found php is very weak in this area. i am just wondering if it is possible to write an extension to extend the ability of the php to easy the way to comet applications? if it possible for php to hold the connect from the client when it is in fast cgi mode or apache mod php mode? thanks.
[PHP] PHP 5.3.3 operator problem
hi, all i currently have a project which using operator on creating a new object. like: $class = new Class(); it works properly in php 5.1.6, but not in php 5.3.3 and it gives offset errors to me. is there anyone knows why and how to fix this problem?
Re: [PHP] PHP 5.3.3 operator problem
both php 5.1.6 and php 5.3.3 are php 5. but it seems they are different in processing operator. 2011/6/2 Simon J Welsh si...@welsh.co.nz On 2/06/2011, at 2:44 PM, 李白|字一日 wrote: hi, all i currently have a project which using operator on creating a new object. like: $class = new Class(); it works properly in php 5.1.6, but not in php 5.3.3 and it gives offset errors to me. is there anyone knows why and how to fix this problem? In PHP 5, objects are always assigned by reference, you do not need to make it explicit. --- Simon Welsh Admin of http://simon.geek.nz/
[PHP] about php comet
hello, I am every interested in comet applications recently, and sadly found php is very weak in this area. i am just wondering if it is possible to write an extension to extend the ability of the php to easy the way to comet applications? if it possible for php to hold the connect from the client when it is in fast cgi mode or apache mod php mode? thanks.