Re: [PHP] RecursiveArrayIterator
This one time, at band camp, Jim Lucas [EMAIL PROTECTED] wrote: I don't get it, why not do this? foreach ( $array AS $row ) { foreach ( $row AS $k = $v ) { if ( ! is_array($v) ) { echo {$k} -- {$v}br/\n; } } } Maybe I am missing the point... ??? Indeed, whilst your method is simplistic it leaves many copies of the array dangling in memory. Every time you call foreach it creates a copy of the array internally. SPL iterators do things differently and know only one element at a time. More can be seen at http://phpro.org/tutorials/Introduction-to-SPL.html so the final solution was using a foreach, however, using a foreach on an SPL iterator object implicitly calls the inner iterator giving us all the SPL goodness in memory savings. Kind regards Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
This is sucks, Those publishers ripping the authors then they blame the pirates... Real steal was %95 of book prices Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Monday 23 July 2007 08:45, Ryan A wrote: Disagree again, if Adam uploads or not, there is a whole bunch of stuff out there that he cant hope to download in a lifetime. It was never mentioned *when* Adam uploaded his file, it could've been when the site first started out and uploads then were lacking. Even if you are member of a torrent site, you dont have to upload to download files once you finish your download you can continue to share (seed) the file to others (if you need to mantain your up/down ratio). Not everyone who downloads uploads new files.. Leechers would always outnumber the contributors, but apparently Adam is a responsible member of the community who gives as well as take. -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] #2003 - The server is not responding
okay. I'll check on that one. Thanks Daniel Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 7/16/07, Ryan Lao [EMAIL PROTECTED] wrote: I uninstalled my old versions of apache, mysql and php then installed wamp on my computer. everything seems to be working when i access localhost, except when i go to phpmyadmin. I get this error on screen MySQL said: #2003 - The server is not responding... so i updated the config.php file but still i get the same error. does this have to do with the old password or username that i used before with my old mysql? or is it something else entirely? some help would really be appreciated -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php That's actually a MySQL rather than PHP question, but the error message gives you the answer in context: The server is not responding 1.) Check to make sure it's installed properly. 2.) Check to ensure that MySQL starts and runs properly without quitting. 3.) Check the ports on which MySQL's daemon is set to listen. 4.) Attempt to connect via the shell to MySQL. 5.) Check your configure.inc.php (I think that's what phpMyAdmin uses) 5a.) Make sure the IP/hostname is correct 5b.) If not localhost, make sure the port number is correct 6.) If connecting to anything other than `localhost` check your firewall settings The username/password combination will have nothing to do with this particular error, but may become an issue once you've connected to the server. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can't open a file
On Monday 23 July 2007 12:23, Ken Tozier wrote: The permissions for the test folder is set to me in a WebServer subfolder on Mac OS X. What exactly does permission ... set to me mean? Do I need to set permissons to something else to get this to work? If so, what permissions should I use? If you wanted to be able to create a file in the directory: /a/b/c/d then you would need 'execute' permission on each of the directory: /a /a/b /a/b/c /a/b/c/d in addition you need 'write' permission for the directory that the file is created in, ie: /a/b/c/d -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
Sancar Saran wrote: Those publishers ripping the authors then they blame the pirates... Real steal was %95 of book prices No, the author gets 10% of what the publisher gets. If you look at prices on Amazon or other online bookstores, you'll see that 35-40% discount is common. So, a $40 book often sells for $26 or less. Delivery within the same country is frequently free, so that's a cost that gets deducted. Amazon also pays a commission to websites with affiliate links. So the publisher ends up with less than $20. Publishing a book involves a lot of people: not just the author, but at least one technical reviewer, editor, copy editor, indexer, compositor (who lays out the pages), designer, and printer. Printed books also need to be transported and stored. The costs quickly mount up. EBooks are cheaper to produce because there's no cost for printing or storage, but a professionally produced eBook still takes a huge amount of human effort. Unfortunately, an eBook is very easy for a pirate to rip off. The danger with piracy is that authors will be discouraged from writing, and in the end everyone will be worse off. David Powers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Monday 23 July 2007 12:20:50 David Powers wrote: Sancar Saran wrote: Those publishers ripping the authors then they blame the pirates... Real steal was %95 of book prices No, the author gets 10% of what the publisher gets. If you look at prices on Amazon or other online bookstores, you'll see that 35-40% discount is common. So, a $40 book often sells for $26 or less. Delivery within the same country is frequently free, so that's a cost that gets deducted. Amazon also pays a commission to websites with affiliate links. So the publisher ends up with less than $20. Publishing a book involves a lot of people: not just the author, but at least one technical reviewer, editor, copy editor, indexer, compositor (who lays out the pages), designer, and printer. Printed books also need to be transported and stored. The costs quickly mount up. EBooks are cheaper to produce because there's no cost for printing or storage, but a professionally produced eBook still takes a huge amount of human effort. Unfortunately, an eBook is very easy for a pirate to rip off. The danger with piracy is that authors will be discouraged from writing, and in the end everyone will be worse off. David Powers It was still ripping, They got 18 USD you got 2 USD. This is sucks. I'm not sure author of Harry Potter acceps same condition. You made everyone rich except yourself... Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
Sancar Saran wrote: It was still ripping, They got 18 USD you got 2 USD. Out of that $18, the publisher has to pay the editor, copy editor, technical reviewer, compositor, printer, etc, etc. Unless the book sells several thousand copies, the publisher normally makes a loss. I'm not sure author of Harry Potter acceps same condition. The Harry Potter books have sold an estimated 325 million copies. Even if the author gets only 10 cents a book, that adds up to $32.5 million. I'm sure she gets a lot more than 10 cents a book, but it's the number of books sold that makes the real difference, not the amount per book. Harry Potter also generates a lot of money through Hollywood movie rights. It's hard to imagine the same with a book about PHP. ;-) You made everyone rich except yourself... I don't mind others making money out of my books, as long as they have contributed to them in a positive way. Publishing books involves a lot of people. They all need to be paid. The publisher takes a gamble, paying everybody up front before a single copy is sold. Since most books make a loss, it's reasonable for the publisher to take a share of the profit of successful books. As far as an author is concerned, the deal lies in royalties. The more books you sell, the more you get. I also get a higher share of the profit if the book sells more than a specified amount. David Powers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
Hmmm PHP: Order of Objects PHP: Deadly functions Oh never mind. I think we still missing the point main purpose of those books spreading the information. The other things have to come second. Only editor was you. Without you all of them useless. I thing they set up good game here. You believe all this mumbo jumbo to generate and bring your content to people. Ironically publishers can't bring your content much more people than pirates. On Monday 23 July 2007 14:00:31 David Powers wrote: Sancar Saran wrote: It was still ripping, They got 18 USD you got 2 USD. Out of that $18, the publisher has to pay the editor, copy editor, technical reviewer, compositor, printer, etc, etc. Unless the book sells several thousand copies, the publisher normally makes a loss. I'm not sure author of Harry Potter acceps same condition. The Harry Potter books have sold an estimated 325 million copies. Even if the author gets only 10 cents a book, that adds up to $32.5 million. I'm sure she gets a lot more than 10 cents a book, but it's the number of books sold that makes the real difference, not the amount per book. Harry Potter also generates a lot of money through Hollywood movie rights. It's hard to imagine the same with a book about PHP. ;-) You made everyone rich except yourself... I don't mind others making money out of my books, as long as they have contributed to them in a positive way. Publishing books involves a lot of people. They all need to be paid. The publisher takes a gamble, paying everybody up front before a single copy is sold. Since most books make a loss, it's reasonable for the publisher to take a share of the profit of successful books. As far as an author is concerned, the deal lies in royalties. The more books you sell, the more you get. I also get a higher share of the profit if the book sells more than a specified amount. David Powers Regards Sancar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP not working after Mac 10.3.9 install
Greetings, I am a very novice user of PHP. I have run PHP 4 on my Powerbook for about three years. When I installed Mac OS 10.3.9, PHP does not work. I forgot how to get it running again. Can anyone help me with this? Thanks, -- Steve Marquez
Re: [PHP] Pirate PHP books online?
Sancar Saran wrote: I think we still missing the point main purpose of those books spreading the information. The other things have to come second. Everybody has to eat. If spreading information means I can't afford to eat, I'll stop writing books. It's as simple as that. Ironically publishers can't bring your content much more people than pirates. The same would happen if I did everything myself. Within days of self-publishing a eBook, it would be on a pirate site. At least with a publisher, legal copies do get sold, and I do get a return on the time invested, even though it's not as much as I would like. David Powers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RecursiveArrayIterator
the purpose of an iterator is to allow client code to access the various (aggregate) components of an object while concealing its underlying implementation. the client code only has to know about the iterators interface. thus 1 or more objects that all have a potentially different data profile internally can expose something like a getIterator() method. then client code can interact cleanly with all such objects, because it knows only 1 interface, the iterator interface. http://en.wikipedia.org/wiki/Iterator -nathan On 7/23/07, Kevin Waterson [EMAIL PROTECTED] wrote: This one time, at band camp, Jim Lucas [EMAIL PROTECTED] wrote: I don't get it, why not do this? foreach ( $array AS $row ) { foreach ( $row AS $k = $v ) { if ( ! is_array($v) ) { echo {$k} -- {$v}br/\n; } } } Maybe I am missing the point... ??? Indeed, whilst your method is simplistic it leaves many copies of the array dangling in memory. Every time you call foreach it creates a copy of the array internally. SPL iterators do things differently and know only one element at a time. More can be seen at http://phpro.org/tutorials/Introduction-to-SPL.html so the final solution was using a foreach, however, using a foreach on an SPL iterator object implicitly calls the inner iterator giving us all the SPL goodness in memory savings. Kind regards Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating a text file
On 7/20/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, July 19, 2007 8:33 am, Daniel Brown wrote: extract($_POST); You might as well just turn register_globals back ON (bad!) because you've just done a work-around on $_POST that does exactly what register_globals ON does to $_POST... This is bad. Don't do this. ONLY extract the variables you EXPECT to see in POST. In this case there were only two variables anyway... [shrug] -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? Yes, but keep in mind, it was a simple, cheap example just to get it to work Out Of The Box(R). I sure as heck don't expect that code to be used. It'll work, but it's well, it's ugly. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RecursiveArrayIterator
On Monday 23 July 2007, Kevin Waterson wrote: This one time, at band camp, Jim Lucas [EMAIL PROTECTED] wrote: I don't get it, why not do this? foreach ( $array AS $row ) { foreach ( $row AS $k = $v ) { if ( ! is_array($v) ) { echo {$k} -- {$v}br/\n; } } } Maybe I am missing the point... ??? Indeed, whilst your method is simplistic it leaves many copies of the array dangling in memory. Every time you call foreach it creates a copy of the array internally. SPL iterators do things differently and know only one element at a time. More can be seen at http://phpro.org/tutorials/Introduction-to-SPL.html so the final solution was using a foreach, however, using a foreach on an SPL iterator object implicitly calls the inner iterator giving us all the SPL goodness in memory savings. Isn't that what garbage collection is for? -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Monday 23 July 2007, David Powers wrote: Sancar Saran wrote: It was still ripping, They got 18 USD you got 2 USD. Out of that $18, the publisher has to pay the editor, copy editor, technical reviewer, compositor, printer, etc, etc. Unless the book sells several thousand copies, the publisher normally makes a loss. I'm not sure author of Harry Potter acceps same condition. The Harry Potter books have sold an estimated 325 million copies. Even if the author gets only 10 cents a book, that adds up to $32.5 million. I'm sure she gets a lot more than 10 cents a book, but it's the number of books sold that makes the real difference, not the amount per book. Harry Potter also generates a lot of money through Hollywood movie rights. It's hard to imagine the same with a book about PHP. ;-) So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? :-) I'd so go see that opening weekend... -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating a text file
On Monday 23 July 2007, Daniel Brown wrote: ONLY extract the variables you EXPECT to see in POST. In this case there were only two variables anyway... Yes, but keep in mind, it was a simple, cheap example just to get it to work Out Of The Box(R). I sure as heck don't expect that code to be used. It'll work, but it's well, it's ugly. I sure has heck don't expect that code to be used. That's been said about every Access database in the world, I wager. Then they get into production... -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RecursiveArrayIterator
On 7/23/07, Larry Garfield [EMAIL PROTECTED] wrote: Isn't that what garbage collection is for? well garbage collection will remove the copy of an array created by foreach, but what Kevin is saying is Iterators dont bother creating a copy of the array, which overall results in memory savings. -nathan On 7/23/07, Larry Garfield [EMAIL PROTECTED] wrote: On Monday 23 July 2007, Kevin Waterson wrote: This one time, at band camp, Jim Lucas [EMAIL PROTECTED] wrote: I don't get it, why not do this? foreach ( $array AS $row ) { foreach ( $row AS $k = $v ) { if ( ! is_array($v) ) { echo {$k} -- {$v}br/\n; } } } Maybe I am missing the point... ??? Indeed, whilst your method is simplistic it leaves many copies of the array dangling in memory. Every time you call foreach it creates a copy of the array internally. SPL iterators do things differently and know only one element at a time. More can be seen at http://phpro.org/tutorials/Introduction-to-SPL.html so the final solution was using a foreach, however, using a foreach on an SPL iterator object implicitly calls the inner iterator giving us all the SPL goodness in memory savings. Isn't that what garbage collection is for? -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem compile 5.2.3 souce under SUSE 10.1
Hello, I am not sure if this is the right mailing list or not, but here goes... I am attempting to compile php 5.2.3 from source under SUSE 10.1. The compile is fine, it is the 'make test' that is failing... When I run 'make test' I am getting: = FAILED TEST SUMMARY - double to string conversion tests [Zend/tests/double_to_string.phpt] Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt] = I have sent the automatic report, but have not heard anything back. Does anyone have any ideas on how to fix this? Regards, Jeff
Re: [PHP] RecursiveArrayIterator
On Mon, 2007-07-23 at 10:39 -0400, Nathan Nobbe wrote: On 7/23/07, Larry Garfield [EMAIL PROTECTED] wrote: Isn't that what garbage collection is for? well garbage collection will remove the copy of an array created by foreach, but what Kevin is saying is Iterators dont bother creating a copy of the array, which overall results in memory savings. Foreach doesn't bother creating a copy of the array either. It create COW handle. This wasn't true for objects in PHP4 but you're talking about arrays and if you're using iterators then you're also talking about PHP5 so no copy is being used. I don't know for certain, but I'd guess that Iterators are slower than foreach. Slower, but more convenient for some datatypes. Why do I think slower? Because if I'm not mistaken it invokes a userspace function/method on each iteration whereas foreach does not... don't quote me though, I don't use iterators since I write backward compatible scripts and so I haven't bothered to actually look at them. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Monday 23 July 2007 22:26, Larry Garfield wrote: So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? They've got to make Rasmus Lerdorf and the Order of the PHP first. -- Crayon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Mon, 2007-07-23 at 23:09 +0800, Crayon Shin Chan wrote: On Monday 23 July 2007 22:26, Larry Garfield wrote: So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? They've got to make Rasmus Lerdorf and the Order of the PHP first. But before that comes Rasmus Lerdorf and the Programmer's Stone. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Pirate PHP books online?
Hi Crayon, Monday, July 23, 2007, 4:09:57 PM, you wrote: On Monday 23 July 2007 22:26, Larry Garfield wrote: So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? They've got to make Rasmus Lerdorf and the Order of the PHP first. Or even Rasmus Lerdorf and the Order of Function Arguments :) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem compile 5.2.3 souce under SUSE 10.1
Jeff Lanzarotta wrote: Hello, I am not sure if this is the right mailing list or not, but here goes... I am attempting to compile php 5.2.3 from source under SUSE 10.1. The compile is fine, it is the 'make test' that is failing... When I run 'make test' I am getting: = FAILED TEST SUMMARY - double to string conversion tests [Zend/tests/double_to_string.phpt] Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt] = There are (almost) always _some_ tests that fail. It's normal :) I have sent the automatic report, but have not heard anything back. And you won't hear anything back, the report is sent to the QA mailinglist, collected there and if there are enough reports to warrant an investigation into what the cause of this problem is, it will be investigated. You won't hear anything back though. Does anyone have any ideas on how to fix this? Regards, Jeff There is nothing to fix, they are tests, they check if everything works as expected. Apparently a few tests failed (ie. did not return _exactly_ what was expected), this doesn't mean your php install isn't functioning, because (certainly in this case) it should work just fine. Ignore these few testresults. - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Problem compile 5.2.3 souce under SUSE 10.1
Oh, OK, thanks. - Original Message From: M. Sokolewicz [EMAIL PROTECTED] To: Jeff Lanzarotta [EMAIL PROTECTED] Cc: PHP General List php-general@lists.php.net Sent: Monday, July 23, 2007 11:32:17 AM Subject: [PHP] Re: Problem compile 5.2.3 souce under SUSE 10.1 Jeff Lanzarotta wrote: Hello, I am not sure if this is the right mailing list or not, but here goes... I am attempting to compile php 5.2.3 from source under SUSE 10.1. The compile is fine, it is the 'make test' that is failing... When I run 'make test' I am getting: = FAILED TEST SUMMARY - double to string conversion tests [Zend/tests/double_to_string.phpt] Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt] = There are (almost) always _some_ tests that fail. It's normal :) I have sent the automatic report, but have not heard anything back. And you won't hear anything back, the report is sent to the QA mailinglist, collected there and if there are enough reports to warrant an investigation into what the cause of this problem is, it will be investigated. You won't hear anything back though. Does anyone have any ideas on how to fix this? Regards, Jeff There is nothing to fix, they are tests, they check if everything works as expected. Apparently a few tests failed (ie. did not return _exactly_ what was expected), this doesn't mean your php install isn't functioning, because (certainly in this case) it should work just fine. Ignore these few testresults. - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Better way to store data in memory?
Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Better way to store data in memory?
Richard Davey wrote: I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) You could use a string, but I doubt that would be much quicker. Personally I'd be doing this with a temporary file, using fseek to get around. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Better way to store data in memory?
On Mon, 2007-07-23 at 17:50 +0100, Richard Davey wrote: Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? What kind of data? Can't you just store it in the image? Or a working copy of the image? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which Is it possible for you to just store the entires you use? or are you actually storing data for 307,200 elements? is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) Sure, store it in a string and treat the string as a binary chunk. Cheers, Rob. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Blackbird ESB released
Hello all, After 6 months of work (OK, maybe not entirely on this!) we're pleased to release Blackbird, an enterprise service bus for PHP. It's not meant to be a replacement for something like ServiceMix, but it is usable out of the box, and it's very easy to use. (Also, ahem, a lot more efficient on memory usage, especially out of the box!) You can get it at: http://www.blackbirdesb.org/ We've included a number of samples for things like setting up a SOAP server, sending e-mail messages, bridging topics, and performing XSL transformations on messages. Documentation is also on the project site - please pardon any thin areas. We're adding to it every day. We put it under the GPLv3 - hopefully that doesn't start any wars. Appreciate any feedback and comments, too. Please post them on the forum (on the site) so we don't clutter up this already-busy list! Regards, Chad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Better way to store data in memory?
Hi Robert, Monday, July 23, 2007, 6:00:50 PM, you wrote: What kind of data? Can't you just store it in the image? Or a working copy of the image? Afraid not, I'm performing deformation on the data that requires a temporary location before rendering to the final image. If this was a straight single pixel change I could do it directly to the canvas as you suggest. Is it possible for you to just store the entires you use? or are you actually storing data for 307,200 elements? The 307,200 comes from a 640x480 image. I'm storing all elements at the moment. I can implement RLE to save on space, and was about to start doing that before I posted to the list to find out if I could avoid using an array at the same time. Depending on the image RLE itself will help considerably. Sure, store it in a string and treat the string as a binary chunk. Looks like being the only way. It'd be nice to be able to create a memblock and literally poke/peek to it (safely of course, I'm not talking about arbitrarily writing to system memory or anything). I'll check Pear first, but if there's no pre-built lib for it then it might be time to create one. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Better way to store data in memory?
Perhaps, you can use Zend Cache which comes with Zend Framework to store your data, without sharing them, allowing to store them in files or memory (shared or not) in an easy way...I'm intersting on Zend cache for its roadmap and because its a Zend product, like php...best quality and best support. I'm using it to cache various php objects, build the first time from database query...later from cache...really good... - Original Message - From: Richard Davey [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, July 23, 2007 6:50 PM Subject: [PHP] Better way to store data in memory? Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- 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
[PHP] Re: Better way to store data in memory?
You might take a look at Imagemagic to see how they do it. Richard Davey wrote: Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) Cheers, Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strategy when working with designer(s)?
Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. Thank you kindly for any insight. - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strategy when working with designer(s)?
Steve Finkelstein wrote: I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. This is just my opinion. I have only ever worked with a limited set of professional designers...Your mileage may vary. Having worked with a designer I very much respect for almost two years now, my only real suggestion is to make sure you write very standards-compliant xhtml. Lay out your pages so that they flow from top to bottom without any formatting whatsoever (think extreme simplicity). Output data naturally - tabular data in tables, paragraphs in p tags, headings in hN tags, inputs with labels, etc. Conceptually different parts can be split into div tags too. (Like div id=headerPage Title/div, div id=contentPage data/div etc.) It should look something like: Global Header * Page 1 link * Page 2 link * Page 3 link * Page 4 link Page Data Here's why: - A good web designer can work absolute magic with CSS - they can turn a well written xhtml page into a beautiful page that looks consistent across all modern browsers. (I'm lucky enough to work day-to-day with an absolute design wizard.) - It's very accessible - even simple mobile browsers screen readers and will have no problems with it. - If you don't like the work the designer has done, you can hire another and plug-in different style sheets. Depending on the calibre of designer, I think that integration may be a bit of a headache in the end though. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strategy when working with designer(s)?
On 7/23/07, Steve Finkelstein [EMAIL PROTECTED] wrote: Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. Thank you kindly for any insight. - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I actually prefer to work this way. If you build markup that is meaninful then your designers should be able to work with what you've done, rather than you having to work with what they give you. Watch this: http://yuiblog.com/blog/2006/10/03/video-sweeney-hackday06/ If you have a well designed application, then it shouldn't matter to you what elements go on what page. If your shopping cart needs a sale price it should be easy for you to slap that into some template somewhere and put a few lines here and there within your app to make it work. It shouldn't require rewrites of the core of your application, but rather additions to it. As such, if you have your core application down you don't really need a design. It should be scaffolding that is able to function 100% as is without any pretty design. But all that rambling is my opinion. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strategy when working with designer(s)?
I have experience with designers. My suggestion. Don't code anything client-side until they are finished, you will most likely have to change everything. You can do your functionality (login mechanism, password change, listing, query with db, etc...) and be ready for when they give you their monster. I've worked in many ways like: 1) Programmer does the functionality 2) Designer gives the design 3) Integrator tries to make it work This one fails most of the time, gives headaches when it gets to work. And will most likely go back and forth #1 and #3 a couple of times! I recommend: 1) Designer does his whole job and shows the design when finished and approved 2) Integrator works on making the pages and html without func. 3) Programmer makes the whole thing work. This gives the best feeling to all people involved. All IMO! Simon On 7/23/07, Steve Finkelstein [EMAIL PROTECTED] wrote: Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. Thank you kindly for any insight. - sf -- 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] Pirate PHP books online?
Hey, clip The same would happen if I did everything myself. Within days of self-publishing a eBook, it would be on a pirate site. At least with a publisher, legal copies do get sold, and I do get a return on the time invested, even though it's not as much as I would like. /clip Also depends on how popular your site is... coz for example if your site is really popular... say 30k uniques a day, then making an ebook would be great as even though it would get pirated (by the way, check out the digital copies of harry potter if you're into that...(i'm not) how many days has it been since the release?) And as for not getting as much as you would like... thats just human nature, whatever you get wouldnt really be enough unless its some really crazy number. clip Unfortunately, an eBook is very easy for a pirate to rip off. The danger with piracy is that authors will be discouraged from writing, and in the end everyone will be worse off. /clip Discouraged...yes, stop writing...no. Coz looking at history... we still have movies and music dont we? In both normal and disc form. Lets face it, however much time and effort goes into getting a book from the authors first copy to a proper book cant compare (in $$) to what it takes to get a movie from script to screen. clip crayon Disagree again, if Adam uploads or not, there is a whole bunch of stuff out there that he cant hope to download in a lifetime. It was never mentioned *when* Adam uploaded his file, it could've been when the site first started out and uploads then were lacking. /clip crayon Time is irrelevant, because unless the site is Adam's site, or he is in some way connected to it... he can go to X number of sites and get more files than he could possibly see in a lifetime. clip kelvin Imagine that you're stealing a software from best buy or just walking out with tons of unpaid books from Barnes and noble. Piracy should be considered the same thing. If someone can't afford expensive corporate software I believe there are a lot of other similar open source software that can do just as good and useful. /clip kelvin The comparasion of stealing from a shop and taking digitally has been already done to death on this very thread so I'm not going to go there... start around july 20 in the archives if you're curious. As to your second point of when someone cant afford the software they should just switch to a similar one... from what i gather from my friends, they do it for the following reasons: 1. For the thrill, they are getting away with it 2. They are defying and hence hitting back at one of the big boys...like M$,Ad0be etc 3. They are not making any comprimises...getting exactly what they want. The question does arise of is it morally right...? but then again is it morally right for M$ / Ad0be to sell their software for USD 499 in the U.S and 499 pounds in the U.K? Or for a CD to sell for $14.99 in the US and the same CD to sell for 14.99 quid in the UK? Cheers! R -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out.
Re: [PHP] Pirate PHP books online?
On 24/07/07, Ryan A [EMAIL PROTECTED] wrote: Hey, clip The same would happen if I did everything myself. Within days of self-publishing a eBook, it would be on a pirate site. At least with a publisher, legal copies do get sold, and I do get a return on the time invested, even though it's not as much as I would like. /clip Instead of clip tags, I recommend that you configure your mail client to prepend a greater than sign to quotes. It's rather customary, if not standard. Also depends on how popular your site is... coz for example if your site is really popular... say 30k uniques a day, then making an ebook would be great as even though it would get pirated (by the way, check out the digital copies of harry potter if you're into that...(i'm not) how many days has it been since the release?) They were online _before_ you could buy the book. Dotan Cohen http://lyricslist.com/ http://what-is-what.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Strategy when working with designer(s)?
The way you have suggested is basicly the only way to do this in an efficient manor without building/running a templating engine. This is the method I use if I'm working with only myself or others design is submitted first and made the code to work with the design it makes for the cleanest code I've experienced yet Just my 2 cents --- Anton C. Swartz IV Phoenix Edge Network L.L.C. http://www.phpopenid.com - Owner PHPLogic Development Services http://www.phplogic.net - Co-Owner Necrogami http://www.necrogami.com - Personal Blog Based in Indianapolis, IN The Opposite of war is not Peace it is Creation. Don't let sin rule your body. After all, your body is bound to die, so dont obey its desires or let any part of it become slave to evil. Give yourselves to God, as people who have been raised from death to life. Make every part of your body a slavethat pleases God. Don't let sin keep ruling your lives.You are ruled by God's Kindness and not by the law. Romans 6:12-14 -Original Message- From: Simon [mailto:[EMAIL PROTECTED] Sent: Monday, July 23, 2007 5:22 PM To: Steve Finkelstein Cc: PHP General List Subject: Re: [PHP] Strategy when working with designer(s)? I have experience with designers. My suggestion. Don't code anything client-side until they are finished, you will most likely have to change everything. You can do your functionality (login mechanism, password change, listing, query with db, etc...) and be ready for when they give you their monster. I've worked in many ways like: 1) Programmer does the functionality 2) Designer gives the design 3) Integrator tries to make it work This one fails most of the time, gives headaches when it gets to work. And will most likely go back and forth #1 and #3 a couple of times! I recommend: 1) Designer does his whole job and shows the design when finished and approved 2) Integrator works on making the pages and html without func. 3) Programmer makes the whole thing work. This gives the best feeling to all people involved. All IMO! Simon On 7/23/07, Steve Finkelstein [EMAIL PROTECTED] wrote: Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. Thank you kindly for any insight. - sf -- 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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.14/912 - Release Date: 7/22/2007 7:02 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.14/912 - Release Date: 7/22/2007 7:02 PM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
Hey, Instead of clip tags, I recommend that you configure your mail client to prepend a greater than sign to quotes. It's rather customary, if not standard. Sorry about that, its driving me crazy too. I have to manually do it if I want it (like above). It used to work before... then suddenly it just does not... anybody have any idea which setting I should tinker with in yahoo, please give me a shout. by the way, check out the digital copies of harry potter if you're into that...(i'm not) how many days has it been since the release? They were online _before_ you could buy the book. Ouch, thats gotto hurt. Didnt know that..thanks for the fyi, like I said before, HP is not my sort of thing. Cheers! R -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more.
Re: [PHP] Pirate PHP books online?
At 12:00 PM +0100 7/23/07, David Powers wrote: The Harry Potter books have sold an estimated 325 million copies. Even if the author gets only 10 cents a book, that adds up to $32.5 million. I'm sure she gets a lot more than 10 cents a book, but it's the number of books sold that makes the real difference, not the amount per book. Harry Potter also generates a lot of money through Hollywood movie rights. It's hard to imagine the same with a book about PHP. ;-) Well.. I haven't purchased any Harry Potter books, nor do I plan to do so. But I have purchased scores of php books. The real secrete here is to find more people like me. 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[2]: [PHP] Pirate PHP books online?
At 4:21 PM +0100 7/23/07, Richard Davey wrote: Hi Crayon, Monday, July 23, 2007, 4:09:57 PM, you wrote: On Monday 23 July 2007 22:26, Larry Garfield wrote: So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? They've got to make Rasmus Lerdorf and the Order of the PHP first. Or even Rasmus Lerdorf and the Order of Function Arguments :) How about Rasmus Lerdorf, Lord of the Code I think we could go on and on with this. 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] Strategy when working with designer(s)?
Steve Finkelstein wrote: Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. OK, I'm a recent list subscriber so feel free to dump this straight to the bit bucket, but here's my 2c. We work with a lot of Web designers and it's always a challenge. We've been using content management systems heavily (we like MODx, but most are good depending on what you're looking for), and now that we have, we'll NEVER go back. We can have a designer working on a template and a developer adding functionality to that template at totally different times, with different goals. Changing the template doesn't hurt anything, provided the conceptual elements are all there. (For instance, you can't pull sidebar dynamic data into a page with no sidebar, obviously!) It really does help a lot when we work with both sides because we can define how we want things to work VERY closely, and we know that as long as the designers stay within those bounds, the sites will work no matter what we want to do with them. I suppose the answer would thus be 'yes, we have a skeleton', basically what's imposed by the limits of a CMS, but they aren't very significant. We have to be careful about what kinds of code elements we use, and where, and we have to make sure nobody tries to do silly things like using AJAX to pull CSS files on the fly for dynamic page data sets, or trying to embed large parts of the site's functionality in Flash files. However, we don't really feel restricted by those things, and it's made the quality of what we produce much higher, and much easier for customers to understand. Just my 2c. Regards, Chad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/MYSQL/XML Conversion
I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strategy when working with designer(s)?
On Monday 23 July 2007, Simon wrote: I recommend: 1) Designer does his whole job and shows the design when finished and approved 2) Integrator works on making the pages and html without func. 3) Programmer makes the whole thing work. This gives the best feeling to all people involved. All IMO! Simon That's our usual routine, too, except that the designer is outsourced and then we have our Developer (HTML/CSS guru) and Programmer (PHP/Javascript guru) both function as integrators of sorts. However, always make sure that the programmer is there and involved from day 0. The designers we work with frequently need to be told that 3 second feature you just suggested just added 300 hours to the project and destroyed 508 compliance, usually multiple times. That *must* happen before the client sees it, or you're screwed. It's never too early to get the programmer involved in the project, even if no coding happens until far later. -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] header( 'refresh' ), form data, and IE
Greetings. I have a data entry form that checks for valid input. If something's wrong, it should refresh back to the data entry form, and pass the existing fields back to this form, so the user doesn't have to enter everything again. This is working perfectly in Firefox. It doesn't work at all in Internet Explorer ( 6 ). I can do *simple* refresh operations, such as: header( 'REFRESH: 1; URL=http://www.google.com' ); If I do more complex things, such as append the form data to the URL, it breaks when a field is blank. For example: header( 'REFRESH: 1; URL=http://www.somesite.com/action.php' . '?description=' . $_POST['description'] . 'categoryid=' . $_POST['categoryid'] ); In the above, categoryid is always OK, because it comes from a combo ( select, whatever ), and at the least it has a default value of 0. However if nothing was entered in the 'description' field, I get a URL: http://www.somesite.com/action.php?description=categoryid=2 Firefox can handle the above perfectly. IE doesn't like the NULL description bit. What's the best way around this? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pirate PHP books online?
On Monday 23 July 2007, tedd wrote: At 4:21 PM +0100 7/23/07, Richard Davey wrote: Hi Crayon, Monday, July 23, 2007, 4:09:57 PM, you wrote: On Monday 23 July 2007 22:26, Larry Garfield wrote: So when does Rasmus Lerdorf and the Deathly Hallows open in theaters? They've got to make Rasmus Lerdorf and the Order of the PHP first. Or even Rasmus Lerdorf and the Order of Function Arguments :) How about Rasmus Lerdorf, Lord of the Code I think we could go on and on with this. Rasmus Lerdorf and the Half-Assed Coder? :-) (This is almost as much fun now as the brain teasers thread.) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/MYSQL/XML Conversion
certainly it is better to use the database, as it is designed for such a purpose. -nathan On 7/23/07, Kelvin Park [EMAIL PROTECTED] wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/MYSQL/XML Conversion
Kelvin Park wrote: I'm trying to convert joined multiple database table to one xml file. Is it more efficient to initially, join multiple (more that 4 tables) together to produce XML file, or convert every table in to XML file and use those XML files to relate data? I'd make the database do all the work. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: header( 'refresh' ), form data, and IE
Then validate the field obviously! $description = ; $categoryid = ; if(isset($_POST['description'])) $description = ?description=$_POST['description']; if(isset($_POST['categoryid'])) { if($description != ) $categoryid = ; else $categoryid = ?; // if a description has been entered you'll need an symbol otherwise a ? $category .= categoryid=$_POST['categoryid']; // append category to itself with the posted info } header('REFRESH: 1; URL=http://www.somesite.com/action.php' . $description . $categoryid); I didn't test this it's just off the top of my head, also you should sanitize the input before you do anythign with it really, but that's another issue. Also this is really something that you should be doing with ajax rather than having the page reloading, and passing variables back, etc. This is the EXACT purpose that Ajax as made for, validation of info. Check out XAJAX it's very simple to use but powerfull when you need it. - Dan Daniel Kasak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Greetings. I have a data entry form that checks for valid input. If something's wrong, it should refresh back to the data entry form, and pass the existing fields back to this form, so the user doesn't have to enter everything again. This is working perfectly in Firefox. It doesn't work at all in Internet Explorer ( 6 ). I can do *simple* refresh operations, such as: header( 'REFRESH: 1; URL=http://www.google.com' ); If I do more complex things, such as append the form data to the URL, it breaks when a field is blank. For example: header( 'REFRESH: 1; URL=http://www.somesite.com/action.php' . '?description=' . $_POST['description'] . 'categoryid=' . $_POST['categoryid'] ); In the above, categoryid is always OK, because it comes from a combo ( select, whatever ), and at the least it has a default value of 0. However if nothing was entered in the 'description' field, I get a URL: http://www.somesite.com/action.php?description=categoryid=2 Firefox can handle the above perfectly. IE doesn't like the NULL description bit. What's the best way around this? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Better way to store data in memory?
Is there nothing like streams or a data type that's meant to hold lots of binary data in PHP? - Dan Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] Better way to store data in memory?
This one time, at band camp, Richard Davey [EMAIL PROTECTED] wrote: Afraid not, I'm performing deformation on the data that requires a temporary location before rendering to the final image. you could use the pixel iterator in imagack extension Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: header( 'refresh' ), form data, and IE
Thanks for the response Dan. Us Dans have to stick together :) On Mon, 2007-07-23 at 17:37 -0700, Dan wrote: Then validate the field obviously! $description = ; $categoryid = ; if(isset($_POST['description'])) $description = ?description=$_POST['description']; if(isset($_POST['categoryid'])) { if($description != ) $categoryid = ; else $categoryid = ?; // if a description has been entered you'll need an symbol otherwise a ? $category .= categoryid=$_POST['categoryid']; // append category to itself with the posted info } H. Yeah I thought it would come to that. I was hoping for a quick nasty fix. I didn't test this it's just off the top of my head, also you should sanitize the input before you do anythign with it really, but that's another issue. Also this is really something that you should be doing with ajax rather than having the page reloading, and passing variables back, etc. This is the EXACT purpose that Ajax as made for, validation of info. Check out XAJAX it's very simple to use but powerfull when you need it. I will try to make some time for investigating ajax. I'm mostly developing in Perl, and doing nice GUI stuff ( ie no web stuff - this is a once-off maintenance thing ), so I'll a little out of my comfort zone ... Thanks again for your help. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with install php 5.2.3 on apache 2.2.4 in windows xp sp2
Arvin, You inserted the codes ?php phpinfo(); ? to your index.html file? arvin lee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] system: windows xp sp 2 apache: apache_2.2.4-win32-x86-no_ssl PHP: php-5.2.3-win32-installer.msi i try to install php on my computer so that i can finish my homework, but after download these files nightmare begins. Install apache with default settings, install php with default settings. Restart apache server .While I modify index.html add ?php phpinfo(); ? , open 127.0.0.1 , apache server default page pops up with no change. Creat a new file named as phpinfo.php, modify httpd.conf , add line AddType application/x-httpd-php .php then restart apache. open broswer key in address 127.0.0.1/phpinfo.php ,it show me nothing. is there anyone can help ? PS. I have reinstall my windows system, nothing change.( Now I am using Appserv to finish my homewhere.) one thing, after install php 5.2.3 on apache server, when I stop apache server ,windows system show my two error message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem compile 5.2.3 souce under SUSE 10.1
Jeff Lanzarotta wrote: Hello, I am not sure if this is the right mailing list or not, but here goes... I am attempting to compile php 5.2.3 from source under SUSE 10.1. The compile is fine, it is the 'make test' that is failing... When I run 'make test' I am getting: = FAILED TEST SUMMARY - double to string conversion tests [Zend/tests/double_to_string.phpt] Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt] = Post it to the -installs list, see what people there suggest. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Better way to store data in memory?
On 7/23/07, Dan [EMAIL PROTECTED] wrote: Is there nothing like streams or a data type that's meant to hold lots of binary data in PHP? introduced back in php4; every time you call include, youre invoking an underlying stream functions http://www.php.net/manual/en/ref.stream.php. the big feature is you can define custom wrappers and filters. also various streams can be chained together to process data. i havent worked with them directly, but these functions are supposedly considered optimal when dealing with large files because the data can be buffered. also, you should check out the functions pack http://www.php.net/manual/en/function.pack.php unpack http://www.php.net/manual/en/function.unpack.php these are designed for direct manipulation of binary data. i have never worked with modification of image files within code except to resize them w/ gd, so this is getting out of my experience, but im pretty confident these tools may be of some help. -nathan On 7/23/07, Dan [EMAIL PROTECTED] wrote: Is there nothing like streams or a data type that's meant to hold lots of binary data in PHP? - Dan Richard Davey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi php-general collective, I'm building up some image data in my PHP script (ready for output to the browser). Having to do some complex per pixel manipulation, which is fine - but I'm just wondering is there a quicker / more efficient way of storing the pixel data than in an array? At the moment I hold it in $array[$x][$y], which makes the drawing loop painless, but it's creating an array with 307,200 elements which is proving to be quite slow. As I'm only storing fixed width byte values is there an alternative method? For example the ability to read/write to a chunk of memory instead? (so I can read out whole strips of data rather than one by one?) I was looking at the Shared Memory functions, but that isn't exactly what I need (I don't want it shared, I want it process specific) Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk Never trust a computer you can't throw out of a window -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ��������� ����� ����������������� ������� �� ����
rfiyoaq mkgr aosj jihy