php-general Digest 21 Jun 2011 03:22:07 -0000 Issue 7368
php-general Digest 21 Jun 2011 03:22:07 - Issue 7368 Topics (messages 313613 through 313625): mysqlnd and LOAD DATA INFILE 313613 by: Marten Lehmann 313614 by: Shawn McKenzie 313616 by: Marten Lehmann 313617 by: Shawn McKenzie 313618 by: Marten Lehmann Re: Doctrine madness! 313615 by: Nathan Nobbe Updating to 5.3.6 313619 by: Bruno Coelho 313620 by: Sean Greenslade 313621 by: Bruno Coelho php 5.3.6 313622 by: Fatih P. 313623 by: Daniel Brown 313624 by: Fatih P. $B!Z(BN$B5i!"(B S$B5i!"(BAAA$B5i(B $B:bI[!"%P%C%0!*$B![!Z%V%i%s%I4[![ 313625 by: $B"!AwNAL5NA"!%V%i%s%I7c0B;T>l Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- --- Begin Message --- Hello, we recently updated our mysql client libs to mysql-5.5.13 and since it was impossible to rebuild PHP 5.2.x and PHP 5.3.x with this new mysql release, we rebuilt PHP with --with-mysql=mysqlnd and ---with-mysqli=mysqlnd. General mysql commands work fine, but one of our clients reported, that the command "LOAD DATA INFILE" isn't working any longer. As the setup of the mysql server hasn't changed and as on the webserver only PHP was rebuilt, I assume that the problem is in mysqlnd?! How does mysqlnd handle LOAD DATA INFILE? And if the problem is not in mysqlnd, what else could it be? Kind regards Marten --- End Message --- --- Begin Message --- On 06/20/2011 07:51 AM, Marten Lehmann wrote: > isn't working any longer What does that mean? It generates an error? It executes without error but the data isn't loaded? Try a test on the command line and see what you get. -- Thanks! -Shawn http://www.spidean.com --- End Message --- --- Begin Message --- Hello, What does that mean? It generates an error? It executes without error but the data isn't loaded? Try a test on the command line and see what you get. when calling mysql_error() the message "The used command is not allowed with this MySQL version" is returned. I thought maybe knows between this and mysqlnd? Because recompiling PHP with --with-mysql=mysqlnd is the only difference to the previous PHP build, where LOAD DATA INFILE worked. Kind regards Marten --- End Message --- --- Begin Message --- On 06/20/2011 10:53 AM, Marten Lehmann wrote: > Hello, > >> What does that mean? It generates an error? It executes without error >> but the data isn't loaded? Try a test on the command line and see what >> you get. > > when calling mysql_error() the message "The used > command is not allowed with this MySQL version" is returned. > > I thought maybe knows between this and mysqlnd? Because recompiling PHP > with --with-mysql=mysqlnd is the only difference to the previous PHP > build, where LOAD DATA INFILE worked. > > Kind regards > Marten This is a PHP list, but most likely run: mysql_fix_privilege_tables and then restart mysql. -- Thanks! -Shawn http://www.spidean.com --- End Message --- --- Begin Message --- This is a PHP list Exactly. And it is the switch from --with-mysql=/usr to --with-mysql=mysqlnd (the PHP native MySQL driver) during the build that caused the problem. And there is no alternative to building current PHP versions with mysql support than with mysqlnd, because the mysql 5.5.x libraries don't work against PHP 5.2 and PHP 5.3, although they are out for months. but most likely run: mysql_fix_privilege_tables and then restart mysql. As I said: The problem is not at the MySQL server, it must be at the client side. Kind regards Marten --- End Message --- --- Begin Message --- On Mon, Jun 20, 2011 at 5:16 AM, Ford, Mike wrote: > > -Original Message- > > From: Nathan Nobbe [mailto:quickshif...@gmail.com] > > Sent: 16 June 2011 17:51 > > [...] > > > Here's what's going on, I instantiate a model object for the product > > table > > from my application > > > > $newRecord = new Product(); > > > > at this point memory usage goes up noticeably. I don't really care > > though > > because I figure I can delete it, but look at this madness I have > > going > > (which *fails* to free up the memory) > > > > $newRecord->clearRelated(); > > $newRecord->free(); > > unset($newRecord); > > gc_collect_cycles(); > > > > after all of this memory consumption is still dramatically higher > > than prior > > to the first call creating the object above. This I've verified > > through > > memory_get_usage(). > > > > here's the output from the memory_get_usage() calls > > > > int(166461440) // before new Product() > > int(169345024) // directly after new Product() > > int(169345024) // after madness trying to free memory used by new > > Product() > > I know nothing a
php-general Digest 20 Jun 2011 11:17:13 -0000 Issue 7367
php-general Digest 20 Jun 2011 11:17:13 - Issue 7367 Topics (messages 313608 through 313612): Re: Submit Using An Image Form Processing 313608 by: Ashley Sheridan 313609 by: tedd 313610 by: Jason Pruim 313611 by: Shawn McKenzie Re: Doctrine madness! 313612 by: Ford, Mike Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- --- Begin Message --- tedd wrote: >At 6:34 PM -0500 6/18/11, Shawn McKenzie wrote: >> >>Get method is for retrieval only. It is not for anything that has a >>consequence (insert, update, delete, send email, etc.). Use only post >>for those. >> >>-- >>Thanks! >>-Shawn > > >Why? > >Cheers, > >tedd > >-- >--- >http://sperling.com/ > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php That's just the http spec. It's because browsers and servers know how to correctly handle the different types of connections. Some browsers make multiple connections for get, which is one of the main reasons for people having problems with multiple hits on a page being registered when only one was expected. Ashley Sheridan http://www.ashleysheridan.co.uk -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. --- End Message --- --- Begin Message --- At 11:54 AM -0400 6/18/11, Ron Piggott wrote: I am writing a shopping cart using the PayPal API. Shopping cart works. Just adding additional functionality. From the shopping cart contents I am trying to make it so the user may click on a picture of a trash can to delete the item. I wrote the following line of code: SRC="http://www.theverseoftheday.info/store-images/trash_can.png"; WIDTH="20" HEIGHT="20" style="float: right;boarder: 0;" alt="Remove Product From Shopping Cart" name="remove_product" value="1" /> But when I have do: echo $remove_product; I am not getting anything. Is there a correct way of passing a variable through an image? The value in this above example is the auto_increment value of the product. From this I could remove the item from the shopping cart. OR Is there a better way to pass a variable through a graphic? I am hoping for the shopping cart contents to be just 1 form where users will have several options (change quantities, delete specific items). I can't use a hidden field. Thank you for your help. Ron Ron: You don't need to pass a value. What you need is simply a trigger to do something. As such, you can use lot's of things. In this case, a button should work. http://www.htmlcodetutorial.com/forms/_BUTTON.html However, I would take all the styling (including dimensions) out of it and place those in a css sheet. Also, what's wrong with a hidden field? Cheers, tedd -- --- http://sperling.com/ --- End Message --- --- Begin Message --- On Jun 18, 2011, at 7:34 PM, Shawn McKenzie wrote: > On 06/18/2011 11:06 AM, Jason Pruim wrote: >> >> On Jun 18, 2011, at 11:54 AM, "Ron Piggott" >> wrote: >> >>> >> SRC="http://www.theverseoftheday.info/store-images/trash_can.png"; >>> WIDTH="20" HEIGHT="20" style="float: right;boarder: 0;" alt="Remove >>> Product From Shopping Cart" name="remove_product" value="1" /> >> >> I would wrap the image in a link like so: >> >> >> And then have a get look for that variable: >> >> $id=$_get[id]; >> >> If (isset($id)) { >> >> //delete code here >> } >> >> Check all that before you run it I'm writing from my smart phone and >> it's all untested. Hopefully it gives you a start though. >> >> Jason Pruim > > Get method is for retrieval only. It is not for anything that has a > consequence (insert, update, delete, send email, etc.). Use only post > for those. I've actually used $_GET in the way I described because then it doesn't require submitting a form to be able to delete something from a list. with $_POST you would have to submit the form, so you would need to build an array of check boxes to store what ones you want to delete, and then go through and process the array to remove all the proper items. But with the $_GET you can process it one at a time. I had a system up and working for maintaining a address database for quite awhile and it worked great for me.--- End Message --- --- Begin Message --- On 06/19/2011 07:26 AM, tedd wrote: > At 6:34 PM -0500 6/18/11, Shawn McKenzie wrote: >> >> Get method is for retrieval only. It is not for anything that has a >> consequence (insert, update, delete, send email, etc.). Use only post >> for those. >> >> -- >> Thanks! >> -Shawn > > > Why? > > Cheers, > > tedd > The convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an a