Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
On Mon, Sep 14, 2009 at 2:05 AM, tedd wrote: > At 10:49 PM +0200 9/13/09, Andrea Giammarchi wrote: > >> I was expecting somebody that develop massive Ajax application, not a link >> with 3 pages and zero point about the reply. >> > > You asked if anyone did any ajax? So, I replied and provided you with an > example. > > Who cares if my example only has three pages? It could be hundreds -- the > technique scales. > > In all fairness Tedd, your example is a bit of a joke. Send some JSON back and forth, do some database queries, and use a webservice all at the same time. Your AJAX calls won't be so simple then. I think the point of Andrea's project is to make debugging easier. Just like firebug and Charles do in their own respect. Is it something you can do without? Yes, especially if you have a great development environment set up. Is is something that could make inspecting what is getting thrown around in your AJAX calls and the PHP errors that occur easier? Yes, especially when sending JSON or remote object calls. Charles is a great tool when doing Flash and Flex remoting, and AJAX. I have the impression that Andrea's tool is perhaps doing something similar, but taking it a step further. Maybe not everyone's cup of tea, but I think it is difficult to write off as useless. In any event, I provided you an example that does not need your debugger -- > it works and works good. > > But then you get all testy because I did not read your documentation. I > never said I did AND there was never any requirement for me to do so before > posting. I was simply replying to your question. > > But instead of establishing a constructive line of communication, you start > off my criticizing me because I didn't read your documentation. > > You ask not to be treated as a noob, but you come in here telling others > where to get off and bragging about your credentials (as if the rest of us > can't do better) -- I'm not sure who you think you are, but you sure act > like an noob. > > If nothing else, you have a lot to learn about making a point. > > > tedd > > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com >
Re: [PHP] get an object property
Tom Worster wrote: On 9/13/09 3:21 AM, "Lars Torben Wilson" wrote: On 9/12/09 9:50 AM, "Tom Worster" wrote: but let me give you a more different example: $a and $b are normally both objects, each with various members including a prop q, but sometimes $a is false. i want the q of $a if $a isn't false, otherwise that of $b. ($a ? $a : $b)->q // is not php, afaik before you suggest one, i know there are simple workarounds. You're right, that isn't PHP syntax. One workaround that came to mind which does a similar thing (although using a different mechanism) is this: ${$a ? 'a' : 'b'}->q i would not have thought of that. interesting... and while i'm at it, and using my original error, how come... function o() { return (object) array('q'=>7); } echo o()->q; // is ok syntax, but function a() { return array('q'=>5); } echo a()['q']; // isn't? I'm afraid I can't answer that right now--it does perhaps seem inconsistent at first glance, although I can't say I've ever missed it or felt that using syntax like that would make my life any better. Maybe it would. Then again, I can also see an argument being made for allowing the object syntax but not the array syntax: in the case of objects, you can have a clean class declaration which is pretty much self-documenting, and later users of the class can have a clear idea of which properties are available and which are not, and they can thus be sure that o()->q will not result in uninitialized property problems. Using the array syntax you could never be sure that the index requested actually exists. Of course, this holds true only for people like me who don't really like the idea of creating objects on the fly in PHP unless there's a very good reason to. Usually in PHP such tasks are better handled by arrays anyway. the dbms abstraction library i use delivers rows, by default, as objects. so i commonly handle dynamically generated data in the form of objects, though it's not my code generating those objects. i think that's one reasons why i often find i would use objects as data structures. and because i find the dynamic objects in js convenient. Yeah. . .never been a fan of the libs which return objects, although such a model does perhaps have its uses. but i think you're preference reflects more closely was probably the concept of php's version of oop: an object is an instances of a static class. Yes, I'd say the same thing, except I'd replace the term 'static' with 'declared'. If an object is created on the fly, in someone else's code, and I have to maintain that code, then either that code must be well-documented or I have to go on a hunt through the source code to find out what might be available within that object. Not my idea of fun. Convenient for the original coder, perhaps, especially if they come from an automatic model background such as Javascript. And maybe one day I'll come to love it. So far I haven't seen enough of a benefit to convince me that it's worth the long-term maintenance headache it can (note that I say "can", not "does") cause. in any case, now that i've confirmed that i'm not merely unaware of the features i was hunting for, and that they don't exist by design, i can perhaps move on. on a related note, way back when xml was ascendant as "the most exciting new technology to hit the net since java", i was not impressed. what a horrid syntax for specifying and communicating data, i would argue. why not use the syntax from some sensible programming language instead? js, for example? easy to parse, less overhead, human readable (i find xml hard to read), etc. then eventually json happened, without all the hype and fanfare, just doing the job very conveniently. i love it. I also never found myself sold on the "XML everywhere" philosophy which seemed to spring up during its first few years. I have found it useful for certain things--usually involving documents. :) It's awesome for technical documentation such as working on the PHP manual; I've used it when writing books; and XML and the DOM can be a great help when constructing automatically validated XHTML. But there are also many other things which people insisted it would be perfect for which just end up being a waste of cycles and memory. It's a good tool for some tasks but completely ill-suited for others IMHO. I like the idea of json when working with Javascript. Years ago (before var_export()) I wrote something very similar to var_export() which would write out a human-readable and directly PHP-parseable string for structured data. Sort of like. . .er. . .pson (*cough*). ;) and to make that comment vaguely php related, i now use json to encode structured data that i want to write to the php error log. Interesting. For something like that I would just use var_export() and skip the overhead of parsing json back into PHP if I needed to do that. I'd use json when using Javascript, though. Bu
Re: [PHP] Question: Sorting through table headers?
--- On Sun, 9/13/09, Parham Doustdar wrote: > From: Parham Doustdar > Subject: [PHP] Question: Sorting through table headers? > To: php-general@lists.php.net > Date: Sunday, September 13, 2009, 6:55 AM > Hello there, > I've been asked to create something like the tables you > usually see, where the headers are actually links and when > you click the links, the table gets sorted based on the > header. Are there any classes that you know of that would do > the job? My current idea is to return an array of the colomn > which contains the data you want to sort on (like 'name') > then sort the array and do something like: > [code] > for (i = 0; i < length(array); i++) > mysql_query("select * from table where 'name' = > ${aray[i]}"); > [/code] Your code looks like you're filtering and not sorting. You should revisit the basics of SQL syntax. > Any better algorithms anyone? > Thanks! > -- > --- > Contact info: > Skype: parham-d > MSN: fire_lizard16 at hotmail dot com > GoogleTalk: parha...@gmail.com > Twitter: PD90 > email: parham90 at GMail dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question: Sorting through table headers?
Hello there, I've been asked to create something like the tables you usually see, where the headers are actually links and when you click the links, the table gets sorted based on the header. Are there any classes that you know of that would do the job? My current idea is to return an array of the colomn which contains the data you want to sort on (like 'name') then sort the array and do something like: [code] for (i = 0; i < length(array); i++) mysql_query("select * from table where 'name' = ${aray[i]}"); [/code] Any better algorithms anyone? Thanks! -- --- Contact info: Skype: parham-d MSN: fire_lizard16 at hotmail dot com GoogleTalk: parha...@gmail.com Twitter: PD90 email: parham90 at GMail dot com
Re: [PHP] server name that the user agent used
--- On Sun, 9/13/09, Tom Worster wrote: > From: Tom Worster > Subject: [PHP] server name that the user agent used > To: "PHP General List" > Date: Sunday, September 13, 2009, 8:21 PM > when using apache with one vhost that > responds to a few different hostnames, > e.g. domain.org, y.domain.org, x.domain.org, let's say the > vhost's server > name is y.domain.org and the other two are aliases, is > there a way in php to > know which of these was used by the user agent to address > the server? > Did you see what comes up with php_info() for $_SERVER["SERVER_NAME"] or $_SERVER["HTTP_HOST"] ? > -- > 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] get an object property
On 9/13/09 3:21 AM, "Lars Torben Wilson" wrote: >> On 9/12/09 9:50 AM, "Tom Worster" wrote: >> >> but let me give you a more different example: >> >> $a and $b are normally both objects, each with various members including a >> prop q, but sometimes $a is false. i want the q of $a if $a isn't false, >> otherwise that of $b. >> >> ($a ? $a : $b)->q // is not php, afaik >> >> before you suggest one, i know there are simple workarounds. >> > You're right, that isn't PHP syntax. One workaround that came to mind > which does > a similar thing (although using a different mechanism) is this: > > ${$a ? 'a' : 'b'}->q i would not have thought of that. interesting... >> and while i'm at it, and using my original error, how come... >> >> function o() { return (object) array('q'=>7); } >> echo o()->q; // is ok syntax, but >> >> function a() { return array('q'=>5); } >> echo a()['q']; // isn't? >> > I'm afraid I can't answer that right now--it does perhaps seem > inconsistent at first glance, > although I can't say I've ever missed it or felt that using syntax like > that would make my > life any better. Maybe it would. Then again, I can also see an argument > being made for > allowing the object syntax but not the array syntax: in the case of > objects, you can have > a clean class declaration which is pretty much self-documenting, and > later users of the > class can have a clear idea of which properties are available and which > are not, and they > can thus be sure that o()->q will not result in uninitialized property > problems. Using the > array syntax you could never be sure that the index requested actually > exists. > > Of course, this holds true only for people like me who don't really like > the idea of creating > objects on the fly in PHP unless there's a very good reason to. Usually > in PHP such tasks > are better handled by arrays anyway. the dbms abstraction library i use delivers rows, by default, as objects. so i commonly handle dynamically generated data in the form of objects, though it's not my code generating those objects. i think that's one reasons why i often find i would use objects as data structures. and because i find the dynamic objects in js convenient. but i think you're preference reflects more closely was probably the concept of php's version of oop: an object is an instances of a static class. in any case, now that i've confirmed that i'm not merely unaware of the features i was hunting for, and that they don't exist by design, i can perhaps move on. on a related note, way back when xml was ascendant as "the most exciting new technology to hit the net since java", i was not impressed. what a horrid syntax for specifying and communicating data, i would argue. why not use the syntax from some sensible programming language instead? js, for example? easy to parse, less overhead, human readable (i find xml hard to read), etc. then eventually json happened, without all the hype and fanfare, just doing the job very conveniently. i love it. and to make that comment vaguely php related, i now use json to encode structured data that i want to write to the php error log. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache's mod_dbd connection pool
Hi, Has anyone used Apache Httpd's mod_dbd connection pool in any of your PHP app/project? Do you notice a performance increase from the overhead of establishing/closing a connection? TIA, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sun, Sep 13, 2009 at 9:38 PM, Phred White wrote: > > On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: > >> On Sun, Sep 13, 2009 at 8:29 PM, Phred White >> wrote: >>> >>> On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: >>> On Fri, Sep 11, 2009 at 1:02 PM, Phred White wrote: > > Hey folks.. > > Anybody ever use APC to show upload progress? > > It sounds really cool, but apc_fetch always returns false a value for > uploads. I can apc_add something and fetch it, but not for uploads : ( > (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) > > There is little info to google on this, and I've been through it. > > I was hoping some hard core, tireless, php programmer just knew the > answer. > > With high anxiety, Phred > > > > I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) >>> >>> Dang! You are exactly right - that isn't what I wanted to hear! : ( >>> But better to know now, then when my timeline is already used up. >>> >>> Did you write your own flash based solution, or use an canned one? >>> >>> Thanks, Phred >>> >>> >> >> I actually wound up using swfupload because of a friend's >> recommendation and also because there's a nifty jQuery plugin for it. >> >> The project's main site: http://swfupload.org >> The jQuery plugin I'm using: >> http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ >> >> The *only* issue I could find with a flash based uploader (I don't >> regard flash installation as an issue because we're a video based site >> and well, if you're using our site to watch videos...) was there's an >> as-of-yet unresolved bug in linux flash clients that locks a browser >> until upload is completed. Adobe's bug tracker seems to be down for >> me at the moment, but if you really want the bug, let me know offlist >> and I'll supply it later. :) >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > Hey Eddie: > > One more question... > I have an existing form that provides other data that need to be linked to > the file upload. It looks like swfupload, just uploads all by its lonesome. > I also need the javascript form validator to be triggered before any > uploading occurs. Is this possible? You don't have to tell me how (though I > wouldn't mind a few clues). I just want to know if it will meet my needs > once i dig in. > > Thanks > > That should all be possible. I'd take a look at http://demo.swfupload.org/v220/featuresdemo/index.php as that has most of that happening on the page and you can bootleg some of their example code :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 8:29 PM, Phred White wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White > wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to google on this, and I've been through it. I was hoping some hard core, tireless, php programmer just knew the answer. With high anxiety, Phred I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) Dang! You are exactly right - that isn't what I wanted to hear! : ( But better to know now, then when my timeline is already used up. Did you write your own flash based solution, or use an canned one? Thanks, Phred I actually wound up using swfupload because of a friend's recommendation and also because there's a nifty jQuery plugin for it. The project's main site: http://swfupload.org The jQuery plugin I'm using: http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ The *only* issue I could find with a flash based uploader (I don't regard flash installation as an issue because we're a video based site and well, if you're using our site to watch videos...) was there's an as-of-yet unresolved bug in linux flash clients that locks a browser until upload is completed. Adobe's bug tracker seems to be down for me at the moment, but if you really want the bug, let me know offlist and I'll supply it later. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hey Eddie: One more question... I have an existing form that provides other data that need to be linked to the file upload. It looks like swfupload, just uploads all by its lonesome. I also need the javascript form validator to be triggered before any uploading occurs. Is this possible? You don't have to tell me how (though I wouldn't mind a few clues). I just want to know if it will meet my needs once i dig in. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] server name that the user agent used
when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 8:29 PM, Phred White wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White > wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to google on this, and I've been through it. I was hoping some hard core, tireless, php programmer just knew the answer. With high anxiety, Phred I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) Dang! You are exactly right - that isn't what I wanted to hear! : ( But better to know now, then when my timeline is already used up. Did you write your own flash based solution, or use an canned one? Thanks, Phred I actually wound up using swfupload because of a friend's recommendation and also because there's a nifty jQuery plugin for it. The project's main site: http://swfupload.org The jQuery plugin I'm using: http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ The *only* issue I could find with a flash based uploader (I don't regard flash installation as an issue because we're a video based site and well, if you're using our site to watch videos...) was there's an as-of-yet unresolved bug in linux flash clients that locks a browser until upload is completed. Adobe's bug tracker seems to be down for me at the moment, but if you really want the bug, let me know offlist and I'll supply it later. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanks Eddie. I will look into it. I agree, if you don't have Flash use your telegraph or something. Sheesh! (iPhone users excepted - they morn their lack of Flash) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sun, Sep 13, 2009 at 8:29 PM, Phred White wrote: > > On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: > >> On Fri, Sep 11, 2009 at 1:02 PM, Phred White >> wrote: >>> >>> Hey folks.. >>> >>> Anybody ever use APC to show upload progress? >>> >>> It sounds really cool, but apc_fetch always returns false a value for >>> uploads. I can apc_add something and fetch it, but not for uploads : ( >>> (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) >>> >>> There is little info to google on this, and I've been through it. >>> >>> I was hoping some hard core, tireless, php programmer just knew the >>> answer. >>> >>> With high anxiety, Phred >>> >>> >>> >>> >> >> I recently had to do roughly the same thing (visual upload progress) >> and I had done some research into APC. What I learned was that the >> upload tracking didn't work with FastCGI (which would have prevented >> our switch to nginx, but not a deal breaker) and what broke the deal, >> though, was the fact that APC's upload progress is apparently not >> thread safe, so if person A is uploading a file and person B starts an >> upload, you get a silent failure. Which brings me to another point, >> it seems to silently fail. >> >> Ultimately, I went with a flash based solution because the APC >> solution had way too many problems to be really useful. It's a nice >> thought, but I wouldn't recommend it. I know this isn't exactly what >> you wanted, but I had a similar experience and thought I would share >> :) > > Dang! You are exactly right - that isn't what I wanted to hear! : ( > But better to know now, then when my timeline is already used up. > > Did you write your own flash based solution, or use an canned one? > > Thanks, Phred > > I actually wound up using swfupload because of a friend's recommendation and also because there's a nifty jQuery plugin for it. The project's main site: http://swfupload.org The jQuery plugin I'm using: http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ The *only* issue I could find with a flash based uploader (I don't regard flash installation as an issue because we're a video based site and well, if you're using our site to watch videos...) was there's an as-of-yet unresolved bug in linux flash clients that locks a browser until upload is completed. Adobe's bug tracker seems to be down for me at the moment, but if you really want the bug, let me know offlist and I'll supply it later. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 11, 2009, at 4:01 PM, tedd wrote: At 2:17 PM -0400 9/11/09, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White wrote: Hey folks.. > Anybody ever use APC to show upload progress? Nope, I choose not to complicate my life. :-) Instead, I give the user one of these: http://webbytedd.com/bb/wait/ Besides, what does the user have to know anyway that makes it so important that they see a progress bar? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com those are SWEET! That page is going to become one of my favorite pages just to look at for therapeutic purposes : ) Unfortunately, my folks will be uploading a gig at a crack, so the really need to know what is actually going on! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to google on this, and I've been through it. I was hoping some hard core, tireless, php programmer just knew the answer. With high anxiety, Phred I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) Dang! You are exactly right - that isn't what I wanted to hear! : ( But better to know now, then when my timeline is already used up. Did you write your own flash based solution, or use an canned one? Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
At 10:49 PM +0200 9/13/09, Andrea Giammarchi wrote: I was expecting somebody that develop massive Ajax application, not a link with 3 pages and zero point about the reply. You asked if anyone did any ajax? So, I replied and provided you with an example. Who cares if my example only has three pages? It could be hundreds -- the technique scales. In any event, I provided you an example that does not need your debugger -- it works and works good. But then you get all testy because I did not read your documentation. I never said I did AND there was never any requirement for me to do so before posting. I was simply replying to your question. But instead of establishing a constructive line of communication, you start off my criticizing me because I didn't read your documentation. You ask not to be treated as a noob, but you come in here telling others where to get off and bragging about your credentials (as if the rest of us can't do better) -- I'm not sure who you think you are, but you sure act like an noob. If nothing else, you have a lot to learn about making a point. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
> No, display_errors should be turned off (with log_errors turned on) > and error_reporting should be set to whatever standard you're coding > to (preferably, E_ALL | E_STRICT, but a lot of people like to ignore > E_NOTICE's). yep, it should be a production environment > So it's not zero configuration, then? it is, described in the Security page inside the wiki, zero config means no extensions, no code to change except a single require ... we can call it zero config compared with everything else, specially something to compile or able to change the env as your solution does > And I wasn't > aware that a 1:1 development:production environment was a desirable > thing. sure, PHP 4 on production and 5 as dev then is desiderable, right? What about specific PHP version, extensions, and other specific env problems/bugs? I hope you are not following errors that could appear only because of your plugns/extensions ... that would be a massive waste of time, isn't it? > Things like xdebug, display_errors, inclued, etc. should be > disabled for production and enabled for development. 1:1 is about what is running and where it is running ... you have an extension which is not official and which could cause false positives or could have other problems. I prefer same extensions in both dev/prod environments in order to be sure behaviors will be the same, got it? > Run "tail -f /path/to/your/php/error.log" and watch the error logs as > they're appended, if you need instant error notification. on windows dev env? and with at least two monitors to maintain a decent application size for client side testings? checking both logs and errors without a red line easily "surfable" with entire stack rather than pure text to analyze? I prefer Formaldehyde here > Honestly, I'm sure it sounds like this by now but I'm not trying to > trash your application, but you've not done a very good job selling > it. It looks like you took some keywords ("ajax", "zero > configuration", "portable", etc. etc.) and tried to apply them to your > project, without actually seriously describing what your project is. did you describe xdebug? I had a read, I got what it is, and I am replying ... > As best I can tell, your project doesn't do much other than facilitate > php debugging with Firebug, which is a very niche thing to do and any > development cycle that I've been a part of has had no need to do such > things, so I'm still failing to see Formaldahyde's usefulness. 'cause you have tail habit ... I do exactly what you do except I spot it quicker and I can isntantly red Errors expanding and contracting stack traces without any extra effort. This is the difference. If you think Formaldehyde is useless, I can say your way is useless as well, since the purpose is the same, the way logs/errors are showed is different. You had no choice before, and you'll probably never go for Formaldehyde, but you kinda confirmed there was nithing similar before, and I can tell you I am using it and I will do, so this project is not going to die soon, that is for sure, as xdebug will hopefully be maintained (as FirePHP or others) I call them alternatives, and I am an open minded person, I'll give xdebug a try indeed, maybe I can integrate some feature. Of course every of us developed Ajax application 'till now, does it mean the debug process is death as is? Can we try to improve it somehow? That is what I have done but everybody is free to choose his way, this is just a new one, and you already said why (facilitate php debugging). The fact you had no need is also because you had not this option, now you do. Regards P.S. Firebug is just one of compatible consoles, the best so far though, but not because Formaldehyde is for Firebug, client side does not matter, it will work with IE as well for those behind "legacy companies" (me right now, as example) _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
> Right, errors should never be exposed, and error_reporting should be 0 in > production but log function and the fact you can move Formaldehyde with the > application means it does not require extra effort. No, display_errors should be turned off (with log_errors turned on) and error_reporting should be set to whatever standard you're coding to (preferably, E_ALL | E_STRICT, but a lot of people like to ignore E_NOTICE's). > In few words, if in production Formaldehyde constant is false, and it must be > false, nothing will be exposed. So it's not zero configuration, then? > You do not need to change your code if you configure properly the defined > constant while you can use what logs have to offers plus you'll have 1:1 > production/development application How do I configure a constant without changing code? And I wasn't aware that a 1:1 development:production environment was a desirable thing. Things like xdebug, display_errors, inclued, etc. should be disabled for production and enabled for development. > That simplicity is not offered so far by your suggested one as well, and > please tell me how quick could be an instant PHP error "on screen" during > tests or debug rather than a log analysis but in any case, thanks for the > feedback. Run "tail -f /path/to/your/php/error.log" and watch the error logs as they're appended, if you need instant error notification. Honestly, I'm sure it sounds like this by now but I'm not trying to trash your application, but you've not done a very good job selling it. It looks like you took some keywords ("ajax", "zero configuration", "portable", etc. etc.) and tried to apply them to your project, without actually seriously describing what your project is. As best I can tell, your project doesn't do much other than facilitate php debugging with Firebug, which is a very niche thing to do and any development cycle that I've been a part of has had no need to do such things, so I'm still failing to see Formaldahyde's usefulness. Maybe I've missed something? > > This is the only serious analysis so far, and I am looking forward for > others, if any. > > Best Regards > >> The thing is, in a properly configured development environment, it's >> local, so I can immediately read the logs, or just fire the script up >> with xdebug, or the errors will get caught in the editor. And I would >> NEVER imagine publicly exposing error messages in a production >> environment, so I'm just really confused as to what this offers, other >> than some seemingly small benefit in readability, specifically in >> firebug (and some other cruft that you really ought to remove, like >> the X-Formaldehyde header). And furthermore, this requires code >> changes from development -> production, which is a problem I've always >> had with FirePHP, too, as that information does not belong in a >> production environment. As far as support for shared hosting is >> concerned, I've stated on this list several times that my firm opinion >> is shared hosting is shooting yourself in the foot (especially as a >> good VPS isn't that much more expensive, I'm paying $20/mo for mine). >> >> I think you best summed up why so many on this list think Formaldehyde >> isn't a very useful product yourself: the errors are shown on the >> client side. In theory, a good development environment already >> exposes this information to the developer and things should fail a lot >> more gracefully than error output for the user. You said that this >> project is something that doesn't already exist, perhaps you should >> consider that it doesn't exist because a sane development cycle >> precludes Formaldehyde's usefulness? >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > _ > Show them the way! Add maps and directions to your party invites. > http://www.microsoft.com/windows/windowslive/products/events.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Sorry, I meant environment > ... plus you'll have 1:1 production/development application _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Right, errors should never be exposed, and error_reporting should be 0 in production but log function and the fact you can move Formaldehyde with the application means it does not require extra effort. In few words, if in production Formaldehyde constant is false, and it must be false, nothing will be exposed. You do not need to change your code if you configure properly the defined constant while you can use what logs have to offers plus you'll have 1:1 production/development application Finally, locally, and at least for me, I find extremely useful the runtime debug, rather than keep logs under control, since specially Ajax interactions needs to be performed runtime via emulators (Selenium) or not (We testing) and other applications I know do not offer this simplicity that you call "useless" but which is the reason I have created Formaldehyde. That simplicity is not offered so far by your suggested one as well, and please tell me how quick could be an instant PHP error "on screen" during tests or debug rather than a log analysis but in any case, thanks for the feedback. This is the only serious analysis so far, and I am looking forward for others, if any. Best Regards > The thing is, in a properly configured development environment, it's > local, so I can immediately read the logs, or just fire the script up > with xdebug, or the errors will get caught in the editor. And I would > NEVER imagine publicly exposing error messages in a production > environment, so I'm just really confused as to what this offers, other > than some seemingly small benefit in readability, specifically in > firebug (and some other cruft that you really ought to remove, like > the X-Formaldehyde header). And furthermore, this requires code > changes from development -> production, which is a problem I've always > had with FirePHP, too, as that information does not belong in a > production environment. As far as support for shared hosting is > concerned, I've stated on this list several times that my firm opinion > is shared hosting is shooting yourself in the foot (especially as a > good VPS isn't that much more expensive, I'm paying $20/mo for mine). > > I think you best summed up why so many on this list think Formaldehyde > isn't a very useful product yourself: the errors are shown on the > client side. In theory, a good development environment already > exposes this information to the developer and things should fail a lot > more gracefully than error output for the user. You said that this > project is something that doesn't already exist, perhaps you should > consider that it doesn't exist because a sane development cycle > precludes Formaldehyde's usefulness? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
[PHP] looking through old posts/emails
enclosed is a php for oracle that worked on Windows AND Fedora 9 Oracle User Name: Oracle Password: LOGIN HTML; $_SESSION['userx'] = $_POST[$user] ; $_SESSION['passwordx'] = $_POST[$password] ; } //...function loginOracle() function loginOracle(){ global $connection; $db = "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = LANDON)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = LMKGDN) ) )"; $_SESSION['userx'] = $_POST['user']; $_SESSION['passwordx'] = $_POST['password']; $connection=oci_pconnect($_POST['user'], $_POST['password'], $db); if ($connection) { echo "Successfully connected to Oracle.\n"; //default action displayDeleteForm(); } else { $err = OCIError(); echo "Oracle Connect Error " . $err['message']; } } //...function displayDeleteForm() function displayDeleteForm(){ //get $fields into the function namespace global $fields; global $connection; /* Create and execute query. */ // Loop through each row, outputting the actype and name echo << checked rowID fdate actype acid nlandings nhours HTML; //get log_book_id table information $user = "select * from log_book_id order by log_id"; $result = oci_parse($connection, $user); $r = oci_execute($result); //display log_book_id information while ($newArray = oci_fetch_assoc($result)) { foreach ($fields as $field){ $fieldx = strtoupper($field); ${$field} = $newArray[$fieldx]; } $rowID = $newArray['LOG_ID']; echo << Check to select record $rowID $fdate $actype $acid $nlandings $nhours HTML; }// while echo << HTML; }//close function // . function timeInType() // function timeInType() { global $connection; $query = "select actype,sum(nhours) from log_book_id group by actype"; $statement = oci_parse ($connection, $query); oci_execute ($statement); // Loop through each row, outputting the actype and name echo << A/C Type Time in Type HTML; while ($row = oci_fetch_array ($statement, OCI_ASSOC)) { $actype = $row['ACTYPE']; $sum = $row['SUM(NHOURS)']; echo << $actype $sum HTML; } // while $query = "select sum(nhours) from log_book_id"; $statement = oci_parse ($connection, $query); oci_execute ($statement); // Loop through each row, outputting the actype and name while ($row = oci_fetch_array ($statement, OCI_ASSOC)) { $sum = $row['SUM(NHOURS)']; echo << Total Hours =$sum HTML; } // while echo << HTML; } // . function deleteRecords() // function deleteRecords() { global $connection; // Loop through each log_book_id with an enabled checkbox if (!isset($_POST['checkbox'])){ displayDeleteForm(); return true; } //else foreach($_POST['checkbox'] as $key=>$val){ $toDelete[] = $key; } //expand the array for an IN query $where = implode(',', $toDelete); $query = "DELETE FROM log_book_id WHERE log_id IN ($where)"; $result = oci_parse($connection, $query); $r = oci_execute($result); // Commit transaction $committed = oci_commit($connection); // Test whether commit was successful. If error occurred, return error message if (!$committed) { $error = oci_error($connection); echo 'Commit failed. Oracle reports: ' . $error['message']; } // Should have one affected row if ((oci_num_rows($result)== 0) ) { echo "There was a problem deleting some of the selected items.".oci_error().''; //exit(); } else { echo "The selected items were successfully deleted."; } //direct the user back to the delete form displayDeleteForm(); } //end function //...function insertRecord() function insertRecord() { // global $rowInsert; global $connection; global $dFields; // Retrieve the posted log book information. global $fields; // $messages = array(); //add some very crude validation foreach ($fields as $field){ if (empty($_POST[$field])){ $messages[] = "You must complete the field $field \r\n"; } else { // $dFields[$field] = mysql_real_escape_string(trim($
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
On Sun, Sep 13, 2009 at 5:01 PM, Andrea Giammarchi wrote: > > Hosting support, since it is 100% php with zero dependencies and zero config > effort plus the ability do debug directly via console, unit testing via > Selenium and/or others, and it does not require manual error catch after the > generic problemi, since it will simply be showed on the client side. > > On the other hand, xdebug could offer a bit more such memory allocation, > something could require APD if integrated with Formaldehyde (and it could be > interesting, so I am not excluding I won't do it next release) > > Best Regards > > P.S. for others ... these kind of answers, questions, opinions, that IS what > I was expecting > >> Date: Sun, 13 Sep 2009 13:52:11 -0400 >> From: oorza...@gmail.com >> To: pa...@quillandmouse.com >> CC: php-general@lists.php.net >> Subject: Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error >> Debugger >> >> What does this offer that a real debugger, like xdebug, doesn't? >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > _ > Share your memories online with anyone you want. > http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 The thing is, in a properly configured development environment, it's local, so I can immediately read the logs, or just fire the script up with xdebug, or the errors will get caught in the editor. And I would NEVER imagine publicly exposing error messages in a production environment, so I'm just really confused as to what this offers, other than some seemingly small benefit in readability, specifically in firebug (and some other cruft that you really ought to remove, like the X-Formaldehyde header). And furthermore, this requires code changes from development -> production, which is a problem I've always had with FirePHP, too, as that information does not belong in a production environment. As far as support for shared hosting is concerned, I've stated on this list several times that my firm opinion is shared hosting is shooting yourself in the foot (especially as a good VPS isn't that much more expensive, I'm paying $20/mo for mine). I think you best summed up why so many on this list think Formaldehyde isn't a very useful product yourself: the errors are shown on the client side. In theory, a good development environment already exposes this information to the developer and things should fail a lot more gracefully than error output for the user. You said that this project is something that doesn't already exist, perhaps you should consider that it doesn't exist because a sane development cycle precludes Formaldehyde's usefulness? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fixing the path
On Sat, 12 Sep 2009 00:43:50 -0400 Paul M Foster wrote: > (Or maybe I've completely misread what you're trying to do.) Yes you did, but never mind :) > Paul > > -- > Paul M. Foster > > -- > 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] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Hosting support, since it is 100% php with zero dependencies and zero config effort plus the ability do debug directly via console, unit testing via Selenium and/or others, and it does not require manual error catch after the generic problemi, since it will simply be showed on the client side. On the other hand, xdebug could offer a bit more such memory allocation, something could require APD if integrated with Formaldehyde (and it could be interesting, so I am not excluding I won't do it next release) Best Regards P.S. for others ... these kind of answers, questions, opinions, that IS what I was expecting > Date: Sun, 13 Sep 2009 13:52:11 -0400 > From: oorza...@gmail.com > To: pa...@quillandmouse.com > CC: php-general@lists.php.net > Subject: Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger > > What does this offer that a real debugger, like xdebug, doesn't? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
> Hello Andrea, > > I am developing with PHP since now 12 years (did a couple stuff in > Zend Core), and was one of a few guy using and sharing about php when > it was only an THE Apache mode in the world C++ CGI, I am not Zend > Certified, I won't :), anyway those things make me smarter or give me > the "truth" or the right to be a jerk?, Which part is jerk, people starting replying without even looking for 1 minute the project page? People saying: what's wrong with set_error_handler, ignoring it does not catch all errors? Or people saying: if nobody did before it means it should not be done, as if the programming world and all ideas ended years ago? I wrote my skills summary just to tell you: hey guys, I am not the last arrived here, so do not threat me as a noob please, OK? I prefer answers such: I am using this other program, application, strategy, and I do not need it rather then people writing unrelated stuff or linking pages that perfectly represent the Formaldehyde scenario but they did not even spend a minute to read what Formaldehyde is so proud of theirself and their intuition ... right? They confirmed they did not read, so WTF? I was expecting somebody that develop massive Ajax application, not a link with 3 pages and zero point about the reply. > you came here to claim that you were right not to discuss, what did > you expect?, if you want to discuss we can, but I can tell you I don't > share your points at all, it is not my way to code in scripting > language. back to silence. > > Best I never discuss if I do not know what I am discussing about, this is my only point. Best _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
[PHP] PDO with text in BLOB's
I'm having fun with a project that has moved exclusively to PDO, and I'm now trying to restore firebird as an alternative database. The problem I am having is with text fields in firebird which are BLOB SUB_TYPE TEXT. These are essentially TEXT in other databases, and I'm used to ADOdb simply loading them with text strings what ever the database is using behind them. On PDO it would seem that these fields can only be connected to streams? How does one load a simple long string into one of these fields? -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Hello Andrea, I am developing with PHP since now 12 years (did a couple stuff in Zend Core), and was one of a few guy using and sharing about php when it was only an THE Apache mode in the world C++ CGI, I am not Zend Certified, I won't :), anyway those things make me smarter or give me the "truth" or the right to be a jerk?, you came here to claim that you were right not to discuss, what did you expect?, if you want to discuss we can, but I can tell you I don't share your points at all, it is not my way to code in scripting language. back to silence. Best, On Sun, Sep 13, 2009 at 4:33 AM, Andrea Giammarchi wrote: > > I can only say if these are our prespective about innovation and > technologies, we need to thanks silly people like me moving further than what > is already there and common convention. > > This ML is a bit different from what I was expecting, fortunately who > understood the project and gave it a try to test it has been happy with it. > > Finally, I am working with FirePHP developer for a FirePHP + Formaldehyde > natural integration in FirePHP and obviously he liked Formaldehyde, since > there's nothing like that inside FirePHP - they are simply different, and > FirePHP does not manage Fatal Errors and other crucial one. > > The good part is that at least you know there is that possibility, so the day > you'll realize that your set_error_handler could be useless in certain > circumstances you'll probably re-evaluate Formaldehyde ;-) > > Thanks to those who tried or tried to understand. > > Regards > > P.S. I am certified Zend Engineer with 10 years of experience with PHP and > dunno how many innovation awards in phpclasses.org ... so it was not just to > waste my time guys, and it is open source, maybe next time I'll keep for me > >> From: jasdeb...@gmail.com >> Date: Sat, 12 Sep 2009 22:37:01 +0200 >> To: php-general@lists.php.net >> Subject: Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error >> Debugger >> >> On Sat, Sep 12, 2009 at 8:47 PM, Jim Lucas wrote: >> >> > Andrea Giammarchi wrote: >> > >> >> something I cannot find in any other library or framework. >> >> >> > >> > This should tell you something then... >> > >> > If something like Formandehyde isn't useful, then why is Charles so popular >> (note: popular from my perspective. I wouldn't dare think that it is popular >> with anyone on this list unless they expressly told me so) >> http://www.charlesproxy.com/ . I can't say anything about the responses >> Andrea has gotten without sounding rude and likely starting an internet >> fight, so I won't say anything. Except for this. Tedd, the ajax example you >> linked to does not need any debugging, that is for sure. >> >> >> > -- >> > Jim Lucas >> > >> > "Some men are born to greatness, some achieve greatness, >> > and some have greatness thrust upon them." >> > >> > Twelfth Night, Act II, Scene V >> > by William Shakespeare >> > >> > >> > -- >> > PHP General Mailing List (http://www.php.net/) >> > To unsubscribe, visit: http://www.php.net/unsub.php >> > >> > > > _ > With Windows Live, you can organize, edit, and share your photos. > http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
What does this offer that a real debugger, like xdebug, doesn't? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
On Sun, Sep 13, 2009 at 01:33:49PM +0200, Andrea Giammarchi wrote: > > This ML is a bit different from what I was expecting, > > P.S. I am certified Zend Engineer with 10 years of experience with PHP and > dunno how many innovation awards in phpclasses.org ... so it was not just to > waste my time guys, and it is open source, maybe next time I'll keep for me Yeah, we people on this list just don't get it. So, you're gonna leave the list now, right? Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading files in PHP 5.3.0
At 12:32 AM -0400 9/13/09, Paul M Foster wrote: On Sat, Sep 12, 2009 at 10:22:10AM -0400, tedd wrote: At 6:02 PM -0400 9/11/09, Paul M Foster wrote: I typically use us2.php.net, which is hosted by Hurricane Electric. Paul Paul: I wouldn't use Hurricane Electric if their accounts were provided for free! The following is an experience I had with Hurricane Electric and support for my opinion as to their "service". You see, many years ago Hurricane Electric hosted (IMO with complicity) a porn site that sent out over 2000 porn spams to AOL using MY email address as the person to contact. That incident caused me a great deal of trouble. In an attempt to understand and resolve the problem, I sent several emails to Hurricane Electric; I called them numerous times via telephone; and I even sent them letters via the US mail. But unfortunately they refused to answer ANY of my correspondence. Their lack of communication provided support for my opinion of their complicity with what had happened. A few years back they contacted me (again more spam) soliciting my interest in hosting with them. Normally, I would have just reported such spam to spamcop, but because of the incident I replied and told them what had happened. Later I was contacted by one of their technicians who looked thorough their records and confirmed/admitted the incident. However, he told me that they could not be held responsible for they clients they host. Furthermore, they have no intention of screening their clients. He said that they will provide hosting to whomever they want, including porn and spam sites. If their clients do anything wrong per "their standards", then they will deal with it internally. Otherwise they don't care about any harm done to anyone by them hosting such sites. In short, they want the money but not the responsibility. > Now, maybe Hurricane Electric has changed its ways, but they can't change their past. In my opinion, there are more than enough hosting companies who care about the damage they might cause and take steps to reduce the about spam and porn on the net. My advice, seek hosts other than Hurricane Electric. I don't know much about HE, other than the fact that they run ads in Linux Journal. But they're a real hosting company, like Rackspace or 1and1. Yahoo (who hosts www.php.net) isn't a company I think of as a hosting company. And they're an internet behemoth, like Godaddy or Microsoft. So I'd personally steer away from them. Just my bias. It sounds like HE's real problem is their TOS. I've hosted with a lot of companies who will drop accounts where they find porn, spam and warez; it's part of their TOS. The other problem I can see is that they are apparently unwilling to even mediate a problem between two of their accounts. "We just host 'em. Other than that, we don't care." Typical. I expect the porn company paid them a *lot* more money than you did, so they simply looked the other way. A shame. The lesson, I suppose, is to look at the terms of service before you sign up with a hosting company. You may still end up being a victim, but at least you know what you're getting yourself into. If they don't specifically disavow porn, spam and warez, then they allow (and in effect, condone) it. Paul Paul: Good advice, but you assumed that I was one of their clients -- I wasn't. I was just an innocent bystander who found his email address being used as a return address for porn spam. It wasn't until after I started receiving hate email that I discovered who/what Hurricane Electric was. Imagine that suddenly out of the blue you started receiving hate mail from hundreds of AOL users telling you what a low-life you are because you sent porn to their children -- what would you do? I imagine you would: a) find out who was behind it; b) contact them and ask for an explanation; c) and try to restore your good name. One might think that suing them would be a good idea, but the last suit I was in cost me over $20k and I won! I didn't have that spare change laying around at the time to go after a company in another state. I just wanted an explanation, but Hurricane Electric wouldn't do anything. In my opinion, they are an example of what a hosting company should not be. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
I can only say if these are our prespective about innovation and technologies, we need to thanks silly people like me moving further than what is already there and common convention. This ML is a bit different from what I was expecting, fortunately who understood the project and gave it a try to test it has been happy with it. Finally, I am working with FirePHP developer for a FirePHP + Formaldehyde natural integration in FirePHP and obviously he liked Formaldehyde, since there's nothing like that inside FirePHP - they are simply different, and FirePHP does not manage Fatal Errors and other crucial one. The good part is that at least you know there is that possibility, so the day you'll realize that your set_error_handler could be useless in certain circumstances you'll probably re-evaluate Formaldehyde ;-) Thanks to those who tried or tried to understand. Regards P.S. I am certified Zend Engineer with 10 years of experience with PHP and dunno how many innovation awards in phpclasses.org ... so it was not just to waste my time guys, and it is open source, maybe next time I'll keep for me > From: jasdeb...@gmail.com > Date: Sat, 12 Sep 2009 22:37:01 +0200 > To: php-general@lists.php.net > Subject: Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger > > On Sat, Sep 12, 2009 at 8:47 PM, Jim Lucas wrote: > > > Andrea Giammarchi wrote: > > > >> something I cannot find in any other library or framework. > >> > > > > This should tell you something then... > > > > If something like Formandehyde isn't useful, then why is Charles so popular > (note: popular from my perspective. I wouldn't dare think that it is popular > with anyone on this list unless they expressly told me so) > http://www.charlesproxy.com/ . I can't say anything about the responses > Andrea has gotten without sounding rude and likely starting an internet > fight, so I won't say anything. Except for this. Tedd, the ajax example you > linked to does not need any debugging, that is for sure. > > > > -- > > Jim Lucas > > > > "Some men are born to greatness, some achieve greatness, > > and some have greatness thrust upon them." > > > > Twelfth Night, Act II, Scene V > >by William Shakespeare > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > _ With Windows Live, you can organize, edit, and share your photos. http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
That I created some fresh air or something new? Sure, thanks > Date: Sat, 12 Sep 2009 11:47:27 -0700 > From: li...@cmsws.com > To: an_...@hotmail.com > CC: pa...@quillandmouse.com; php-general@lists.php.net > Subject: Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger > > Andrea Giammarchi wrote: > > something I cannot find in any other library or framework. > > This should tell you something then... > > -- > Jim Lucas > > "Some men are born to greatness, some achieve greatness, > and some have greatness thrust upon them." > > Twelfth Night, Act II, Scene V > by William Shakespeare _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
Re: [PHP] get an object property
Tom Worster wrote: On 9/12/09 9:50 AM, "Tom Worster" wrote: On 9/12/09 1:32 AM, "Lars Torben Wilson" wrote: Tom Worster wrote: if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it without setting another variable? to illustrate, here's something that doesn't work, but it would be convenient if it did: $o = array( (object) array('a'=>1), (object) array('a'=>2) ); if ( end($o)->a > 1 ) { // can't use -> like this! ... } What version of PHP are you using? Your example should work. Torben 5.2.9. what version does it work in? i shamefully beg your pardon, lars. i was sure i tested the example but it's clear to me now i either didn't or i made a mistake. end($o)->a IS php syntax! so -> may follow a function (or method, i guess) call. No need for apologies. :) but let me give you a more different example: $a and $b are normally both objects, each with various members including a prop q, but sometimes $a is false. i want the q of $a if $a isn't false, otherwise that of $b. ($a ? $a : $b)->q // is not php, afaik before you suggest one, i know there are simple workarounds. You're right, that isn't PHP syntax. One workaround that came to mind which does a similar thing (although using a different mechanism) is this: ${$a ? 'a' : 'b'}->q but mine is a theoretical question about syntax, not a practical one. i'm exploring php's syntactic constraints on the -> operator in contrast to, say, the + or . operators. and in contrast to other languages. I can respect that. This kind of exploration is often quite illuminating. for example, the . in js seems more generally allowed than -> (or, for that matter, []) in php. programmers (especially using jquery) are familiar with using . after an expression that evaluates to an object, e.g. My x class number is document.getElementById('num').innerText = ( ( document.getElementById('optional') || document.getElementById('mandatory') ).appendChild(document.getElementById('thepara')) .className.match(/x(\d+)/) || [0,'absent'] )[1] which shows . after objects, method calls and expressions (as well as the [] operator applied to an expression). do we just live without in phpville or am i missing something? We live without, just like we live without $foo =~ s/bar/baz/i; . . .and without: cout << "Hello " << world << endl; . . .and without: #define FOO(bar, baz) ((bar) * (baz)) . . .and so on. It's just syntax from other languages which isn't part of the PHP syntax. and while i'm at it, and using my original error, how come... function o() { return (object) array('q'=>7); } echo o()->q; // is ok syntax, but function a() { return array('q'=>5); } echo a()['q']; // isn't? I'm afraid I can't answer that right now--it does perhaps seem inconsistent at first glance, although I can't say I've ever missed it or felt that using syntax like that would make my life any better. Maybe it would. Then again, I can also see an argument being made for allowing the object syntax but not the array syntax: in the case of objects, you can have a clean class declaration which is pretty much self-documenting, and later users of the class can have a clear idea of which properties are available and which are not, and they can thus be sure that o()->q will not result in uninitialized property problems. Using the array syntax you could never be sure that the index requested actually exists. Of course, this holds true only for people like me who don't really like the idea of creating objects on the fly in PHP unless there's a very good reason to. Usually in PHP such tasks are better handled by arrays anyway. This is of course just random thinking and perhaps it's just because nobody has added that syntax to the scanner. :) Anyway, good luck with your language comparison. Like I said before, that kind of thing is often fun (and always instructional). Regards, Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php