| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Comments:
<0> Owner: I was looking at CPCart, there's no download for it <0> GregVernon: error 500... you stealing OSC source? <1> actually, give me 2minutes, i'll upload the latest version <2> a database abstraction library that only works with mysql, wtf <3> OSC customization is so fun. <0> SDE: actually, I've had little trouble <4> kog: how do you build under freebsd? <1> error 500? seriously? <1> ugh, wtf did my host do? <2> SDE, go to line 322 of file foo.php, replace with this! <0> SDE: except for uh, no ****ing userland editing of orders <3> it's not hard, it's ungly as crap to work in their source though. <0> Owner: and then there was VI and Diff <2> anyway, I consider it a sign of bad design or bad goals when a goal for a project reads "Use more objects" <2> dum dum dum!!!!! <2> :P
<0> Owner: switching OSC to a better OO design is a great idea though <0> because right now... it makes me want to stab myself <2> true, but the goal is wrong <0> Owner: speaking of XML, they should use my XML language packs <5> most php scripts i've seen have no concept of what OO is. <0> Owner: I wrote a util for devising language packs for apps, using a proprietary grammar (w/ included DTD) <2> it shouldn't be to use more objects, it should be to refactor the design to be more modular and loosely decoupled <2> caffinated, EXACTLY! <0> Owner: that's probably what they think they mean <0> sorry, they... rather - HPDL <0> he lost at least 1/3 of his dev team a few years back <2> look at anyInventory... the cl***es have a global called $html scattered throughout their methods used to but output together <2> Kog, heh, that guy with the Simposons avatar hates my guts for suggesting using an existing open source database abstraction layer and template system <0> Owner: open source db... why the hell not just use PEAR DB <0> heh <5> Owner: the biggest problem with decoupling in php scripts from what I've seen is that people don't build their cl***es in the right order. <0> caffinated: the big problem is most people are ****ty w/ OO <5> Owner: so, what they get are circular dependancies <0> caffinated: it's not neccessarily the easiest paradigm <2> I believe it's stupid to have such expansive subprojects like template systems and data abstraction layers when they should focus more on the domain <5> Kog: actually, it's quite simple. it's just not very easy to see it at first. <6> What would be the IF Statement for a page to check the URI? <6> I want my header.php to do something if the page being viewed is "blah". <5> part of the problem is that PHP has no viable way (that I have seen) to properly mock objects <3> Capso: you just want the script name, or the query string too? <6> SDE: Just the script name. <0> caffinated: I'll stick by the idea that procedural is much easier for the average "coder" to follow <1> sorry kog: directory is writable by others, so unfortunatly, I can't show you my cart <3> $_SERVER['PHP_SELF'] <5> Kog: it's easier, but that doesn't always mean better <2> caffinated, wtf!? I use mock objects in my unit tests all the time <6> SDE: Thanks. <0> caffinated: notice I use the term "coder" with scorn ;) <3> np <6> SDE: How reliable is that? <6> SDE: Will it always be correct? <0> caffinated: I never said anything about better... I happen to agree w/ Parnas <3> 100% .. echo it. <5> Owner: using which library? <2> caffinated, simpletest has great support for mock objects and partial mocks <0> GregVernon: that's a damn shame <7> hi what means $this->first_name; <6> SDE: Alright, thanks. <5> Owner: I'll keep that in mind if I ever get around to writing more php .. we've pretty much moved to ruby at work. <2> caffinated, http://www.lastcraft.com/mock_objects_documentation.php <0> caffinated: I've started w/ RoR <2> yeah, I work strictly with J2EE and oracle myself <0> caffinated: I'm still a little confused as to how to build my controllers... I've been writing procedural pages for sooooo long, I need to take a breather <0> caffinated: then contemplate <2> and once in a while get to poke my head in PLI and DCL on the VMS mainframes ;) <0> caffinated: I think I only need two controllers - userland, and admin <8> How can I disable "mysqli_sql_exception" cl*** in PHP/5.1? <0> Ci-Dev: disable an exception...? why would you want to do something like that <8> The PHP Manual doesn't give any information about it, except that it exists. <7> what's difference between cl***->getMethod and cl***::getMethod ??? <0> caffinated: most of the documentation for RoR is trivial, sadly enough... unless you want to buy a book heh <8> mysqli_query() raises that exception, but I check the return value already. <0> Ci-Dev: it's a generic exception, there's not much TO say about it <8> ...as it worked in any PHP prior 5.1. <2> caffinated, heh, speaing of Ruby, I'll get a chance to meet Dave Thomas this weeend <3> you just don't want it to report the error?
<8> How can it be disabled, so that it doesn't get raised anymore? <3> @mysqli_query() <9> !+@ <10> [@] The PHP error control operator that suppresses errors (@foo()), see: http://php.net/operators.errorcontrol - Don't use it. Think I'm wrong? Ask me about "GO". <0> SDE: that's a bad idea <3> although your code should be good enough to know <8> SDE: That would just hide the error message, but as it is fatal, the script will halt. <3> yeah, but i answered his question. <9> SDE Dont give bad advice <3> fatal error? <0> SDE: the proper advice is to catch and do nothing <0> SDE: not to surpress error messages <8> Fatal error: Uncaught exception 'mysqli_sql_exception' <0> Ci-Dev: so catch it <3> kog, u r too quick for me. <3> look 1 line below my advice <9> !+u <10> Surely you mean 'you', not 'u'? The letter 'u' is not a personal pronoun. Talking like this in ##php may get you silenced. For details, /msg php-bot aolbonics <0> SDE: one sec <8> But it won't work in PHP 5.0 then. <0> SDE: yeah <0> but surpressing exceptions is NEVER a good idea <0> in ANY language <3> i need to supress for fopen sometimes. <2> using @ suggests you are doing something wrong <8> But mysqli_query() return false for any error already, so why do I need an exception additionally to that return value, which gets evaluated by the application logic. <3> not with fopen when you're depending on an external resource. <2> either you don't care enough about your errors, or you need to implement correct error handling <0> Owner: using @ can be ok in very few situations <0> PHP is used as a language to solve a variety of wierd *** issues <2> SDE, then you should check the value fopen returns and act appropriately <3> fopen will generate an error before you can check it. <0> Owner: I had a boss that was using an include on a URL for a advertising banner <8> But I then wonder why mysqli_query() returns a boolean instead of a void then? <8> If error handling is supposed to be done using exceptions? <3> show me an example of how to handle that without an error printing tot he screen. <7> could someone explain me what's difference between using "cl***->getMethod" and "cl***::getMethod" ?? I'm confused now... <2> Ci-Dev, read the documentation <0> Owner: in that situation his **** broke if his server went down... so I surpressed the error, and changed it from require to include <2> piclez, the 2nd one is a static call <8> Owner: There is no documentaion to that exception. <3> cl***:;getMethod does not require you to instanciate the object. it's for static methods of the cl***. <8> At least Google returns nothing on php.net, except two places where it just got mentioned. <0> Owner: I was wondering how you used static calls... not that it matters since I'm stuck on 4.4 :( <3> cl***->getMethod is used after the object is instanciated. <2> koehala, you can have static calls in 4 <2> KOG <7> Owner: thanks a lot... the sabe if using this->var1 and this->$var1 ??? <2> no <2> for an instance, you can use $this->var1 <2> for a static, in php5 it would be self::$var1; <11> SDE, cl***-> ? err. $object->foo <0> oh... yeah, gotcha <2> php4 has no support for static vars <2> except within functions <0> but since there's no modifiers for ANYTHING in php4... it's all static <3> damn OO nazis.. yes, object-> <0> or rather, public <7> oh thanks a lot, I'm using 4 ;) thanks! <0> so you can't really tell <0> I hate OOPHP4 quite a bit <2> so, in php4, you're best chance is to provide setters/getters for static vars and use a method that contains a static that fakes it <8> I might ask a little different: How is one supposed to use a script written for PHP/5.0 in PHP/5.1 without modifying it? <0> php4 has a static keyword <0> ? <2> yup <3> <-- did not know that. <12> Ci-Dev: There isn't much significant change between 5.0 and 5.1, you'll likely be fine. <13> Ci-Dev: just move it onto a server that has 5.1 <2> function foo() { static $counter; return $counter++ } <2> call that a few times and echo the result, you will see <2> however, references get tricky... you have to use an array <0> but only on vars <0> no wait, there'd have to be static methods too
Return to
#php or Go to some related
logs:
wget won't fire #perl greasemonkey replace string dont solotion math python m4a samsung SEC 1024
#debian xml-parser gnu-gcc error gentoo #debian fedora 5 + install tomcat
|
|