Monday, Jan 19, 2015
We ran into this error PHP Warning: Error while sending QUERY packet. PID=25016 the other day when trying to run an update query on a database with approximately 3.8 million records in it. New data had become available for 2.1 million of these records.
These were submitted using a PHP program which fetched and parsed enormous CSV files before using a PDO statement to insert or update the records into MySQL. Upon running the program, the PHP warning would appear.
...
Tuesday, Jan 6, 2015
All sorts of fun this week at Will Hall Online trying to use the Drupal Commerce Feeds module to import several hundred images on to a site. Initially our thoughts had been to manage file uploads via the IMCE module, but once the data requirements of our client became clear it was apparent that a more efficient solution was needed. Here’s what we did:
Created a new directory on our server to contain these images Moved the images across from their original location inside sites/default, then removed them from the standard file system, including thumbnails. Created an extra column on our product data CSV file containing the new URL for each product’s image. Mapped that column onto the product image field on the site. We then deleted all of the existing product data on the site to give us a fresh start and reimported the data. Products uploaded successfully. Images now present on the site’s filesystem. Less so on the site’s front-end. Those of you familiar with Commerce Feeds and in possession of a close attention to detail might be able to see why already.
...
Connect on LinkedIn. Follow me on Twitter. Grab the RSS Feed