[PHP] Re: [PHP-DEV] How expensive are function_exists() calls?

2009-03-04 Thread Jochem Maas
..not an internals question me thinks ... redirecting to generals mailing list mike schreef: I am trying to figure out a strategy for multiple output formats on a site, and it seems like I can have functions defined by default, but have them defined -after- I've included the targetted format

Re: [PHP] Re: compiling php with libjpg64

2009-03-04 Thread Jochem Maas
google is your friend (and with friends like that who needs enemies): try what's mentioned here: http://www.linuxquestions.org/questions/linux-software-2/compiling-php-on-rhel-5-64-bit-685606/ otherwise: http://www.google.com/search?q=compile+php+64+bit+libs Merlin Morgenstern schreef: Hi

Re: [PHP] Re: whoami explanation

2009-03-04 Thread Jochem Maas
Robert Cummings schreef: On Tue, 2009-03-03 at 11:27 -0500, PJ wrote: Shawn McKenzie wrote: PJ wrote: This really needs some explanation I found this on the web: ?php echo `whoami`; ? with it there was the comment the direction of those single-quotes matters (WHY ?) and it works

[PHP] Re: [PHP-DEV] How expensive are function_exists() calls?

2009-03-04 Thread Jochem Maas
mike schreef: On Wed, Mar 4, 2009 at 4:01 AM, Jochem Maas joc...@iamjochem.com wrote: ..not an internals question me thinks ... redirecting to generals mailing list Actually, I do think it is somewhat internals related. internals is about engine development. always ask on the generals list

Re: [PHP] Conclusion of use strict...

2009-03-04 Thread Jochem Maas
Hans Schultz schreef: Thanks for reply, I completely understood your answer even in previous thread, but you should understand few very simple things1. I am not working alone, so I can't make other people use tools I use (eclipse + PDT at the moment) 2. even if somehow I manage to do

Re: [PHP] A puzzler (well, for me at least)

2009-03-02 Thread Jochem Maas
Robert Cummings schreef: On Thu, 2009-02-26 at 15:50 +0100, Ondrej Kulaty wrote: Your answer is neither relevant nor funny. :-| It was very relevant. You cannot easily ascertain the time at which a particular line of script is processed. You especially cannot ascertain the specific time

Re: [PHP] Unexpected results using ksort on arrays in which the keys are mixed alphanumeric strings.

2009-02-24 Thread Jochem Maas
Clancy schreef: I have been experimenting using four character alphanumeric keys on an array, and when I generated a random set of keys, and then used ksort to sort the array, I was very surprised to find that if the key contained any non-numeric character, or if it started with zero,

Re: [PHP] File Write Operation Slows to a Crawl....

2009-02-24 Thread Jochem Maas
I read that you already got your script performance up, but I'd still like to suggest that you shouldn't be reading in a complete 18Mb file (especially given that you don't know in advance whether some day(s) this size might be much larger). instead you should be opening a handle to the file and

Re: [PHP] Zend Guard/Optimizer alternatives?

2009-02-20 Thread Jochem Maas
Brian Dunning schreef: I should mention that I did try the ionCube online encoder, which I think is a great idea... but its runtimes failed to load on both of my test systems, requiring editing of php.ini. That's over the top for my users. I need something that's rock-solid and that will never

Re: [PHP] Accessors

2009-02-19 Thread Jochem Maas
Philip Thompson schreef: Hi all. What are your thoughts? Does this seem like a reasonable implementation? Useful? Pointless? Hit me up - I can handle *constructive* criticism. But for now, it's late and past my bedtime. how do you set a property to null? Cheers, ~Philip

Re: [PHP] php cli memory leak error

2009-02-19 Thread Jochem Maas
Thodoris schreef: seems to work fine here. What are your php.ini (memory related) settings? run: /usr/local/bin/php --ini and get the location of the php.ini file that is getting used. Check our the memory settings in that file. Some general options: max_input_time = 60

Re: [PHP] Accessors

2009-02-19 Thread Jochem Maas
please keep replies on list. Philip Thompson schreef: On Feb 19, 2009, at 2:59 AM, Jochem Maas wrote: Philip Thompson schreef: Hi all. What are your thoughts? Does this seem like a reasonable implementation? Useful? Pointless? Hit me up - I can handle *constructive* criticism

Re: [PHP] php cli memory leak error

2009-02-19 Thread Jochem Maas
Lewis Wright schreef: 2009/2/19 Jochem Maas joc...@iamjochem.com: Thodoris schreef: seems to work fine here. What are your php.ini (memory related) settings? run: /usr/local/bin/php --ini and get the location of the php.ini file that is getting used. Check our the memory settings

Re: [PHP] PHP strategy -- pass complex parameters by value or by reference?

2009-02-18 Thread Jochem Maas
Clancy schreef: I have a function to process a data file. This process opens the file, and then calls another function to process each entry. This function in turn calls another function to process each line of the entry. A set of fairly complex arrays specifies how all the possible

Re: [PHP] Opinions Please, Describing PHP as Web Framework of C and C++

2009-02-18 Thread Jochem Maas
Robert Cummings schreef: On Tue, 2009-02-17 at 11:48 -0800, Michael A. Peters wrote: Robert Cummings wrote: I think what you all are missing is that physics is just a framework for reality. I think you are missing that reality is just a construct of strawberry fields forever. Carl Sagan

Re: [PHP] Re: Sorting times (SOLVED before tedds crappy SOLVED)

2009-02-17 Thread Jochem Maas
Shawn McKenzie schreef: tedd wrote: At 9:56 AM +0100 2/16/09, Jochem Maas wrote: for any reasonable number of items my tests show tedd's version pisses on McKenzies from a great height (note that I actually optimized Mckenzies variant by halfing the number of calls to strtotime()). ROTFLOL

Re: [PHP] Re: ssh2_tunnel

2009-02-17 Thread Jochem Maas
Colin Guthrie schreef: 'Twas brillig, and Gevorg Harutyunyan at 17/02/09 11:55 did gyre and gimble: lol. Could you please give me short sample of ssh2_tunnel usage. The only sample that I found was manual sample and I can not understood how it works. Not sure this is the right list for

Re: [PHP] Re: Sorting times (SOLVED before tedds crappy SOLVED)

2009-02-16 Thread Jochem Maas
Shawn McKenzie schreef: Shawn McKenzie wrote: ... Not tested: no shit. function time_sort($a, $b) { if (strtotime($a) == strtotime($b)) { return 0; } return (strtotime($a) strtotime($b) ? -1 : 1; } usort($time, time_sort); Well, I just thought, since the

Re: [PHP] Re: Sorting times (SOLVED in half the time, hey tedd get your new and improved variant here)

2009-02-16 Thread Jochem Maas
NOT TESTED :P might have minor mistakes but i doubt it :P.*/ ? Tim-Hinnerk Heuer http://www.ihostnz.com Fred Allen - California is a fine place to live - if you happen to be an orange. 2009/2/16 Jochem Maas joc...@iamjochem.com Shawn McKenzie schreef: Shawn McKenzie wrote

Re: [PHP] How can an elephant count for nothing?

2009-02-12 Thread Jochem Maas
Clancy schreef: While PHP has a lot of nice features, it also has some traps which I am forever falling into. One which I find particularly hard to understand is how mixed mode comparisons work. For instance $string = 'elephant'; If($string == 0) returns true; If($string != 0)

Re: [PHP] spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Jochem Maas
Nick Cooper schreef: I am having a problem with spl_object_hash() creating non unique hashes. I understand with MD5 it is possible to have the same hash for different strings but this doesn't seem like that problem. I have created a simple test below, should I report this as a bug or am I

Re: [PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Jochem Maas
Colin Guthrie schreef: 'Twas brillig, and Nick Cooper at 12/02/09 11:38 did gyre and gimble: Outputs: a1: 09d264fcececf51c822c9382b40e3edf a2: 45701af64172cbc2a33069dfed73fd07 a3: 09d264fcececf51c822c9382b40e3edf a4: 09d264fcececf51c822c9382b40e3edf Thanks let me know how I should proceed

Re: [PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Jochem Maas
Colin Guthrie schreef: 'Twas brillig, and Jochem Maas at 12/02/09 12:47 did gyre and gimble: Colin Guthrie schreef: 'Twas brillig, and Nick Cooper at 12/02/09 11:38 did gyre and gimble: Outputs: a1: 09d264fcececf51c822c9382b40e3edf a2: 45701af64172cbc2a33069dfed73fd07 a3

Re: [PHP] Re: spl_object_hash not hashing unqiue objects BUG

2009-02-12 Thread Jochem Maas
a5: 09d264fcececf51c822c9382b40e3edf 2009/2/12 Jochem Maas joc...@iamjochem.com: Colin Guthrie schreef: 'Twas brillig, and Jochem Maas at 12/02/09 12:47 did gyre and gimble: Colin Guthrie schreef: 'Twas brillig, and Nick Cooper at 12/02/09 11:38 did gyre and gimble: Outputs: a1

Re: [PHP] Securing suexec PHP against local attacks by the webserver user

2009-02-09 Thread Jochem Maas
Andrew schreef: Hi, As an example of the attack... $ whoami www-data isn't the whole point of suexec/PHP/FastCGI that the local user has no access to the www-data account ... suexec switches to the users account from the webserver account not the other way around. so the attack is

Re: Fwd: [PHP] Interface OOP

2009-02-09 Thread Jochem Maas
each class should focus on a single area of responsibility. therefore the login check doesn't belong in class A or B, instead it belongs in the code consuming the functionality of said classes. ?php $login = new login($pwd, $acc, $customerAcc); $bee = new b(); if ($login-validate())

Re: [PHP] Securing suexec PHP against local attacks by the webserver user

2009-02-09 Thread Jochem Maas
Andrew schreef: Jochem Maas wrote: Andrew schreef: Hi, As an example of the attack... $ whoami www-data isn't the whole point of suexec/PHP/FastCGI that the local user has no access to the www-data account ... suexec switches to the users account from

Re: [PHP] going blind for looking...need eyes

2009-02-06 Thread Jochem Maas
Daniel Brown schreef: On Fri, Feb 6, 2009 at 12:44, Terion Miller webdev.ter...@gmail.com wrote: - $sql = INSERT INTO admin (UserName, Password, Name, Email, Property, Department, AddWorkOrder, ; $sql .= ViewAllWorkOrders, ViewNewOrders, ViewNewArt,

Re: [PHP] Clarity needed

2009-02-06 Thread Jochem Maas
***RANT WARNING*** Shawn McKenzie schreef: Jochem Maas wrote: Daniel Brown schreef: On Thu, Feb 5, 2009 at 07:56, Jochem Maas joc...@iamjochem.com wrote: and the answer to you Q, like everyone else said: yup :-) PS - given you unlimited resources you might consider doing a charitable

Re: [PHP] Clarity needed

2009-02-06 Thread Jochem Maas
Shawn McKenzie schreef: ***FACT WARNING*** that would be funny if it wasn't so sad. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reg-ex help

2009-02-05 Thread Jochem Maas
Craige Leeder schreef: Hey guys, I'm trying to write a regular expression to match a tag for my frameworks template engine. I seem to be having some trouble. The expression should match: {:seg 'segname':} {:seg 'segname' cache:} What I have is... $fSegRegEx = #\{:seg

Re: [PHP] Clarity needed

2009-02-05 Thread Jochem Maas
tedd schreef: Hi gang: I need some fog removed. does HARPP have anything for that? what about this? : http://www.postcard.org/fog.mp3 and the answer to you Q, like everyone else said: yup :-) PS - given you unlimited resources you might consider doing a charitable donation to FoxNews

Re: [PHP] Clarity needed

2009-02-05 Thread Jochem Maas
Daniel Brown schreef: On Thu, Feb 5, 2009 at 07:56, Jochem Maas joc...@iamjochem.com wrote: and the answer to you Q, like everyone else said: yup :-) PS - given you unlimited resources you might consider doing a charitable donation to FoxNews aficionados :-) Or reminding you how

Re: [PHP] Preserving History

2009-02-05 Thread Jochem Maas
Dan Shirah schreef: Hi gang: To further the Garbage Collection thread on to another level (i.e., preserving history) please consider this: Okay, let's say we have a table containing all the instances of tutors teaching courses. A record might look like this: Course-to-Tutor table

Re: [PHP] How can I do the opposite of property_exists(), maybe a creat_property() in PHP5?

2009-02-03 Thread Jochem Maas
Edmund Hertle schreef: 2009/2/3 Daevid Vincent dae...@daevid.com Is there a way to create a new property via PHP 5.2.4? I get a hash back from an authentication server. I'm not guaranteed that someone in another department won't add new key/values to the returned hash/array. I'm trying to

Re: [PHP] Re: Switch statement Question

2009-01-30 Thread Jochem Maas
tedd schreef: At 4:43 PM -0500 1/29/09, Frank Stanovcak wrote: yes...that is legal. as long as the statment resolves to a boolean it will work. It's not technically correct, but it does work. There you go again. What's technically correct? hiya tedd, you mean to ask not technically

Re: [PHP] Switch statement Question

2009-01-29 Thread Jochem Maas
Boyd, Todd M. schreef: -Original Message- From: Alice Wei [mailto:aj...@alumni.iu.edu] Sent: Thursday, January 29, 2009 3:02 PM To: php-general@lists.php.net Subject: [PHP] Switch statement Question Hi, I have a code snippet here as in the following: //Switch statements

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Jochem Maas
Richard Heyes schreef: ... Really, for URLs that don't exist you should be showing a 404, This way the user doesn't falsely believe that the URL is a valid one and keep using it. if the invalid URL (which outputs a 404 header) then automatically redirects to another URL then I think it's

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jochem Maas
Paul M Foster schreef: On Wed, Jan 21, 2009 at 11:37:07AM -0600, Jay Moore wrote: This is a MySQL class I use and I wanted to get everyone's thoughts on how/if I can improve it. This is for MySQL only. I don't need to make it compatible with other databases. I'm curious what you all

Re: [PHP] Military - Standard times

2009-01-21 Thread Jochem Maas
tedd schreef: Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P What's the slickest way to go from standard to military times and back again? wouldn't the slickest way be to carry/store unixtimestamps and then output whatever version you need when you

Re: [PHP] Suggested diagramming package for php application

2009-01-21 Thread Jochem Maas
Anne Watelet schreef: Hi - we currently use visio for creating basic block diagrams and save these as images to our web site so others can view them. What we really would like to do is to have our php application be able to display the diagram and then upon clicking an edit button, allow the

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jochem Maas
Jay Moore schreef: Good ideas guys. The input is much appreciated. Jochem (and anyone else, I guess), as I am not 100% versed with Exceptions, the php5 version you suggested, are those Exceptions able to be handled outside the class? Do I need my try block to be within the class block,

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Jochem Maas
Per Jessen schreef: Dušan Novaković wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g www.domain.com/nonexistingpage.php) to main page www.domain.com on website? See Apache ErrorDocument directive. ai, ErrorDocument 404

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jochem Maas
Jay Moore schreef: I know it's very OO-y to use exceptions, but I hate them. They're like setjmp/longjmp calls in C, and they're a really headache to deal with. If you don't use default or predone handlers, you have to put all kinds of try/catch blocks around everything. They make for

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jochem Maas
Nathan Rixham schreef: c...@l-i-e.com wrote: there is an art to using them, they compliment 'traditional' error handling, and I agree they can hinder if used badly. I don't think I've ever seen Exceptions used well... Invariably, I end up having to write a wrapper function around every

Re: [PHP] Military - Standard times

2009-01-21 Thread Jochem Maas
tedd schreef: At 9:19 PM +0100 1/21/09, Jochem Maas wrote: tedd schreef: Hi gang: would you stop calling me that, I'll bet it means something rude in korean. :-P Hey, you called me schreef and that means an end of a stroke (Arrggg, that has all sorts of meanings). :-) which

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Jochem Maas
Chris schreef: Yea if you're only targeting 1 db, then why not use that class? At least then there's the php manual to figure out what something does. Because then to add query logging for the whole app, you just need to put it in the class :) (I've done that before to check what's being

Re: [PHP] Re: Opinions / Votes Needed

2009-01-18 Thread Jochem Maas
Per Jessen schreef: Nathan Rixham wrote: Per Jessen wrote: Nathan Rixham wrote: You can't have your cake and eat it. You can't/shouldn't have strong and loose typing in the same language. In my opinion. Instead of providing programmers with a black or white choice between static or

Re: [PHP] optional type hinting enhancements

2009-01-18 Thread Jochem Maas
Nathan Rixham schreef: Hi All, preface: Having discussed at great length previously and probably completely misnaming and thus misleading the conversation here goes again. question: Would anybody else like to see, or feel the need for, *optional* type hinting of variables and class

Re: [PHP] GD and Converting a Transparent PNG-8 to a Transparent GIF

2009-01-18 Thread Jochem Maas
Graham Anderson schreef: Hi I am having problems getting GD to convert a transparent PNG-8 to a transparent GIF The below WILL produce a GIF...but leaves a white background # Convert the PreExisting PNG Image to a GIF $img = imagecreatefrompng($pngPath); # Set the GIF to be

Re: [PHP] Opinions / Votes Needed

2009-01-17 Thread Jochem Maas
Nathan Rixham schreef: Afternoon all, I'd love to get some votes from my fellow developers on the following, and indeed some opinions (especially from those who disagree). Recently I've been running in to a lot of frustrations with PHP when dealing with Classes and Objects. Personally I

Re: [PHP] Re: Opinions / Votes Needed

2009-01-17 Thread Jochem Maas
Skip Evans schreef: Wow, Tony, do you think in the future you could try to express yourself with just a bit more civility and in a less condescending tone? going on past experience ... I doubt it. Nathan expressed some thoughts he had, politely, and when out of his way to come across in a

Re: [PHP] Re: Opinions / Votes Needed

2009-01-17 Thread Jochem Maas
Daniel Brown schreef: Well, since Nathan asked especially for the opinions of those who would disagree with him, I thought all was well On Sat, Jan 17, 2009 at 13:33, Tony Marston t...@marston-home.demon.co.uk wrote: If your feeble brain can't handle the differences then I suggest

Re: [PHP] Re: Opinions / Votes Needed

2009-01-17 Thread Jochem Maas
Nathan Rixham schreef: Tony Marston wrote: Nathan Rixham nrix...@gmail.com wrote in message a: Optional Static Typing I'm finding an ever increasingly need to be able to staticly type properties, parameters, return types etc (in classes) I know there is type hinting but it's just not enough

Re: [PHP] Re: Opinions / Votes Needed

2009-01-17 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Nathan Rixham schreef: ... try this snippet on for size: function test(stdClass $o) { var_dump($o); } $o = (object)1; test($o); ahh.. you miss the point, request: I want to type hint that my function can accept objects of any type

Re: [PHP] print a to z

2009-01-16 Thread Jochem Maas
paragasu schreef: i have this cute little problem. sounds more like a homework assignment. by now you know range(), by all means have array_map() too: array_map(print_r, range(a,z)); i want to print a to z for site navigation my first attempt work fine for($i = '65'; $i '91'; ++$i)

Re: [PHP] switch vs elseif

2009-01-13 Thread Jochem Maas
Ashley Sheridan schreef: On Mon, 2009-01-12 at 15:15 -0500, Frank Stanovcak wrote: I've googled, and found some confusing answers. I've tried searching the history of the news group, and only found info on switch or elseif seperately. :( Strictly from a performance stand point, not

Re: [PHP] switch vs elseif

2009-01-13 Thread Jochem Maas
Micah Gersten schreef: Jochem Maas wrote: switch (true) { case ($x === $y): // something break; case ($a != $b): // something break; case (myFunc()): // something break; case ($my

Re: [PHP] switch vs elseif

2009-01-13 Thread Jochem Maas
Robert Cummings schreef: On Tue, 2009-01-13 at 15:50 +0100, Jochem Maas wrote: Ashley Sheridan schreef: On Mon, 2009-01-12 at 15:15 -0500, Frank Stanovcak wrote: I've googled, and found some confusing answers. I've tried searching the history of the news group, and only found info on switch

Re: [PHP] switch vs elseif

2009-01-13 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Micah Gersten schreef: Jochem Maas wrote: switch (true) { should be switch(false) { :-) it could be either depending on your needs, no? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable as an index

2008-12-22 Thread Jochem Maas
MikeP schreef: Hello, I am trying to output the value of the following:($x is an int incremented by a for statement. echo tr td width='110' bgcolor='$row_color' nowrap '$users[$x][U]'/td /tr; I have tried putting the quotes all over and all I get is: 'Array[U]'. What

Re: [PHP] Require error

2008-12-20 Thread Jochem Maas
sean greenslade schreef: So, I have this code in a php file called testing.php: $incl = '/webs/www.zootboy.com/sl/sql.inc'; if(!is_readable($incl)) die('ERROR: MySQL Include file does not exist??!?'); require $incl or die('MySQL page not found. Unable to continue.'); your require line is

Re: [PHP] search for person by comparing his data with data in mysql

2008-12-20 Thread Jochem Maas
c...@l-i-e.com schreef: select first_name like '%$first_name%' + 3 * last_name like '%$last_name%' + 7 * email = '$email' as score, that works?? I guess the expressions (e.g. email = '$email') evaluate to bools and are auto-cast to ints. Im guess there needs to be some parenthesis in

Re: [PHP] Require error

2008-12-20 Thread Jochem Maas
Wolf schreef: Kyle Terry k...@kyleterry.com wrote: On Fri, Dec 19, 2008 at 9:43 AM, Wolf lonew...@nc.rr.com wrote: Bottom Post sean greenslade zootboys...@gmail.com wrote: No. The file is called testing.php and it is trying to include sql.inc On Fri, Dec 19, 2008 at 12:36 PM,

Re: [PHP] imagick raises error

2008-12-19 Thread Jochem Maas
vuthecuong schreef: Hi, Currently I'm reading below page: http://www.imagemagick.org/Usage/api/#php When I tried imagick example of it, php raised error about function : Imagick::readimage() . Fatal error: Non-static method Imagick::readimage() cannot be called statically in

Re: [PHP] Phpmyadmin password

2008-12-18 Thread Jochem Maas
VamVan schreef: .. May be u can do a bowl fish encryption ... Thanks, V LOL. 'bowl fish' ... 'fish bowl' ... I guess you meant to write 'blow' :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-17 Thread Jochem Maas
Robert Cummings schreef: On Wed, 2008-12-17 at 02:03 +0100, Jochem Maas wrote: or just: mysql_query(UPDATE test SET mykey=UUID()); can't see any reason to go down the 'loop the dataset and roll your own much less random, much more likely to collide, unique value' road. Not terribly

Re: [PHP] Re: Create unique non-autoincrement key for 700,000 records?

2008-12-16 Thread Jochem Maas
supp...@trafficregenerator.com schreef: On Monday, December 15, 2008 7:29 PM, gould...@mac.com wrote: ... ?php error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ini_set('display_startup_errors','1'); ini_set('display_errors','1'); function dec2base($dec) { $digits =

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent child processes. also note I said 'processes' - php is

Re: [PHP] how do i allow more than 2 threads of php to run?

2008-12-09 Thread Jochem Maas
Rene Veerman schreef: Jochem Maas wrote: Rene Veerman schreef: i'm getting freezes for the 3rd to Nth concurrent request on my homeserver (got root, on debian4 + apache2). how can i allow more threads? like 50 or so? probably need to fix the apache.conf to allow more concurrent

Re: [PHP] Include directive..

2008-12-08 Thread Jochem Maas
dele454 schreef: Hi, I am modifying the apache config file on my domain to include the path to the Zend Framework on a specified location outside the public folder. So in my http.conf file i simply include the path to where the includes file is to customise the virtual host: [CODE]

Re: [PHP] Last working day of a month

2008-12-04 Thread Jochem Maas
Angelo Zanetti schreef: Hi all, I am busy trying to figure out how to get the last working day in a month. I was wondering if there was a script already written, but this is what I imagine should work: Get the current day and see if it's the last day of the month. If its true check if

Re: [PHP] Using DateTimeZone

2008-12-04 Thread Jochem Maas
Lester Caine schreef: Lester Caine wrote: Lester Caine wrote: I'm looking to tidy up things a bit by clearing out a lot of old code and switching to using the internal DateTime functions. Information is stored in the databases UTC normalized, and we get around the problem of getting a real

Re: [PHP] COM and the PHP equivalent of ASP Currency data type

2008-12-04 Thread Jochem Maas
Alex Bovey schreef: Hi all, I am working with a COM interface and the specification which is wrtten for ASP calls for a Currency data type to be passed to a function. What is the equivalent in PHP? If I call com_print_typeinfo() I can see that the function has the following info:

Re: [PHP] Using DateTimeZone

2008-12-04 Thread Jochem Maas
Lester Caine schreef: Lester Caine wrote: ?php setlocale(LC_TIME, nl_NL.ISO8859-1); $d = new DateTime(); echo strftime(%A, %d %B %Y, strtotime($d-format(DATE_ATOM))), \n; ? Does not work! it does, only there is nothing setting the timezone in that example. Have to do

Re: [PHP] RSE in Ganymede + General Dev Talk

2008-11-26 Thread Jochem Maas
Nathan Rixham schreef: Evening all, Just wondered if anybody else had tranfer problems using the ftp connector of the RSE plugin for eclipse ganymede, I keep getting a no transfer and the export from project dialog telling me to pick a remote folder (Even though I have). Not looking for

Re: [PHP] Re: PHP causing Script: '/usr/www/...' in httpd-error.log?

2008-11-24 Thread Jochem Maas
robert arnesson schreef: A. There is no more to the log B. There are no calls to error_log() PHP is installed as CGI, I will check the ScriptLog dir (good tip!). I forgot to mention that this occurres on a few php-files only.. the rest is working fine. And there are no major differences

Re: [PHP] store class zithin session

2008-11-20 Thread Jochem Maas
Eric Butera schreef: On Thu, Nov 20, 2008 at 8:37 AM, Yeti [EMAIL PROTECTED] wrote: ... Autoload. Why on earth would you do such a thing? autoload ... your neighbourhood opcode cache performance killer, then again so is file based sessions (for ease of use I stick my session files on

Re: [PHP] fread() behaviour

2008-11-20 Thread Jochem Maas
Stut schreef: On 20 Nov 2008, at 01:29, Rene Fournier wrote: I'm trying to understand something about fread(). I'm using fread() on an incoming socket stream that will send, for example, 26630 characters: while ( ($buf=fread($read[$i], 8192)) != '' ) { $sock_data .= $buf;

Re: [PHP] while-question

2008-11-18 Thread Jochem Maas
Craige Leeder schreef: Jochem Maas wrote: just for laughs .. given the 'dabble' thread Cleeder is phonetically very very close to a dutch word meaning 'messing around' .. rather in the way a 2yo might mess around with a bowl of yogurt. Haha, now that does make me laugh. Out of curiosity

[PHP] Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Jochem Maas
please don't post this kind of question to internals. use [EMAIL PROTECTED] Christopher Vogt schreef: Hej, I use PHP 5.2.6. I am refactoring some code to use more object-orientation. I encounter a problem, where the new object-oriented version results in a fatal error, where the old

[PHP] Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Jochem Maas
Christopher Vogt schreef: Hej Jochem, I understand there are many PHP beginners flooding the wrong lists with the wrong questions, so I don't mind your harsh response. But I am not one of them. I disagree. this kind of thing belongs on php-general (and lets keep it on list please), if you

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Timo Erbach schreef: ...but for best performance you should do: $counter = count($array); for($i = 0; $i $counter; $i++){ echo $i . \n; } just for fun: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); ... gives an idea of the power and flexibility of a

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: $a = range(1,10); for ($i = 0, $c = count($a); $i $c; print($a[$i].\n), $i++); think the point of this is to count the items in an array without count mate :p no point in the above you could just: $c = count($a); I thought the point was to avoid

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Robert Cummings schreef: On Mon, 2008-11-17 at 14:54 +, Stut wrote: On 17 Nov 2008, at 14:31, Nathan Rixham wrote: if you really want a challenge try this one.. task: add the numbers 5 and 17 together, using php, without using the + operator. fill it in: function add($a , $b) {

[PHP] Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Jochem Maas
Christopher Vogt schreef: Hej Jochem, this kind of thing belongs on php-general (and lets keep it on list please), if you have a serious proposal/rfc and/or one develops from a discussion there then likely some of the old-hats will likely recommend escalating to internal. I'm sorry I

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people who've grabbed the

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: At 10:00 AM -0800 11/17/08, bruce wrote: curious qiestion to all on here who dabble in php... how many of you have actully gone to college, taken algorithm courses, microprocessor courses, design/architecture courses, etc.. or is the majority of the work here from people

Re: [PHP] while question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: Ashley Sheridan wrote: On Mon, 2008-11-17 at 17:47 -0500, Craige Leeder wrote: Only thing to note with the foreach is that you are actually working on a copy of the array, so if you intend to modify it, pass it by reference. - Craige Can you do that? I

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
tedd schreef: At 12:52 AM +0100 11/18/08, Jochem Maas wrote: Craige Leeder schreef: I'm 100% self taught for now. I'm just out of higschool, and hopefully going off to collage next year. must . resist I take you didn't score to hig on the spelling test? and collage

Re: [PHP] while-question

2008-11-17 Thread Jochem Maas
Craige Leeder schreef: Jochem Maas wrote: must . resist I take you didn't score to hig on the spelling test? and collage, is that the the cut-n-paste school of IT? dang it, failed. ;-) Haha! 'high' was just my 'h' key not pressing, and college is just one of those

Re: [PHP] PECL HTTP Extension

2008-11-13 Thread Jochem Maas
[EMAIL PROTECTED] schreef: try the full path like so: extension=/usr/lib/php/extensions/no-debug-non-zts-20060613/http.so Wishful thinking. For reasons beyond my ken, php.ini ONLY accepts paths relative to your extensions_dir setting. that's funny, because very often I've been stuck in

Re: [PHP] Strange results

2008-11-13 Thread Jochem Maas
Craige Leeder schreef: Micah Gersten wrote: I think you meant this: echo - $fpType - is equal to self::mciInput br /; to be echo - . $fpType . - is equal to . self::mciInput . br /; And this is how you know you've been doing too much ASP, lol yeah, I'm with Indiana Jones when it

Re: [PHP] mySQL query question

2008-11-13 Thread Jochem Maas
Michael S. Dunsavage schreef: okay I want to pull an integer from a database called confirm_number, add 1 and repost it back to the database here's the code I'm using. $queryconfirm=SELECT confirm_number from contacts ORDER BY contact DESC LIMIT 1; $confirmresult=$queryconfirm;

Re: [PHP] PECL HTTP Extension

2008-11-12 Thread Jochem Maas
Rui Quelhas schreef: Hi guys. I'm running PHP 5.2.6 (cli) on Mac OS X 10.5.5 and i've tried to install and configure the http pecl extension like the tutorial in your web site, i've used pecl to install it, i've also tried to compile it manually. Everything got installed correctly, there is

Re: [PHP] Managed VPS recommendations

2008-11-10 Thread Jochem Maas
Larry Garfield schreef: ... I believe that guy Dan Brown might have something up your alley, although he might fall over on the 'douchebag' requirement ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Image Manipulation

2008-11-09 Thread Jochem Maas
Ron Piggott schreef: Is there a way to find out the number of pixels wide and high an image is in PHP? Is there a way to resize an image using PHP? heh Ron, you've been around this list long enough to know that you should STFW and RTFM before posting questions.

Re: [PHP] It's Sunday, and I'm bored...

2008-11-09 Thread Jochem Maas
Govinda schreef: On Nov 9, 2008, at 12:28 PM, Richard Heyes wrote: Subversion, or svn for short. Helps you maintain code bases. Far better than regular backups (though by no means a replacement). I looked it over briefly and it looks smart for serious collaborated efforts.. but i ask -

Re: [PHP] PHP - Web/list Question...

2008-11-09 Thread Jochem Maas
Stut schreef: On 9 Nov 2008, at 20:30, Robert Cummings wrote: Agreed, but IMHO lack of URL-sharing is just one of many reasons to avoid sessions if possible. Taking further context though on my stream of responses... you did say: Seriously? You'd rather use sessions than explode,

Re: [PHP] object persistence within a session

2008-11-07 Thread Jochem Maas
Stan schreef: If this is the wrong forum, please point me at the correct forum. I am new to PHP but have 40 years experience programming. cool. we're you around when they programmed with Rocks[tm]? :-) (stick around a while and you'll get to know that inside joke) My initial effort includes

<    1   2   3   4   5   6   7   8   9   10   >