Archive for February, 2009
Max Allowed Packets Insanity
Been having issues trying to use PHPMyAdmin to re-import my whole Drupal installation. Was running into the Max Allowed Packets error. It is a MySQL configuration that you can’t edit through PHPMyAdmin. Could find no help on the MySQL site (no surprise there – horribly indexed in my opinion). Then I stumbled across this nugget of pure gold:
http://smokinggoat.wordpress.com/2008/12/09/max-allowed-packet-problem-with-mamp/
Go there to read the solution (give him the traffic he deserves)
In case it’s down…
1. Find “my-small.cnf” in Applications/MAMP/LIbrary/Share/MySQL/
2. Copy it to the regular MySQL folder in MAMP: Applications/MAMP/db/mysql/
3. Rename it to: “my.cnf”
4. Open it with a text editor and go hunting for Max Allowed Packets (Edit>>Find etc.)
5. Bump the 1M default a bit higher. My drupal sql file was 18MB (mostly taken up by huge node and user tables), and Max Allowed Packets at 2M was sufficient.
Add comment February 23, 2009
PhpMyAdmin export quirk?
Not sure if this is an issue wtih PhpMyAdmin, or MySQL, but I discovered today that I can no longer export my whole Drupal database in one shot (for backup purposes). Specifically: I can’t export to a zipped file. PhpMyAdmin gives me a warning:
“cannot file http://localhost/phpmyadmin/export.php”
I fiddled around in Apache’s confg file and discovered that the paths and aliases were all good. Tested a different db and it all worked fine. So I figured this error may not be what the error said it was. Tried changing the max queries way up – didn’t help.
Solution?
Selected tables from A->M and exported as one file. No probs.
Did N->Z (which I thought would be problematic since Node and Users are in that half). No probs.
Strange… But hey, it worked. Got my backup. *yay :S
2 comments February 12, 2009
Web typography and style
Just reading an awesome summary about web typography design standards. Don’t wanna forget it!
Add comment February 4, 2009
Input Filters and CCK
So it seems that input filters only intelligently work with information being extracted from the body column of node_revisions. Any information extracted from a CCK generated data table is strictly escaped. :s
Add comment February 4, 2009
Housekeeping
Wow – all the data is migrated.
Gotta remember that when I created the new profile fields, I did not ensure that certain “options” on lists conformed to available options in the sagro database. So where exisitng customers will have an “e” in their database, new ones will have “email.” I have to go change that.. Kay, and more’s coming back tome, so here’s a list:
- Clean up E’s to “email” etc. in profile_values.
- Make sure all nodes have teasers in node_revision
- All nodes in node have content types and “” for language.
- user PASSWORDS… temporary measure of some sort – php script? – find out where Drupal does this.
Add comment February 3, 2009
UREKA!
Thanks to this post: http://drupal.org/node/213714
I have discovered that migrating time information will be a breeze. In a nutshell:
MySQL timestamp is of the format yyyy-mm-dd hh:mm:ss
MySQL unix_timestamp() is of the form: xxxxxxxxxx where x is an integer (there are 10… currently). I believe this is a reference to the amount of seconds from the epoch time, which is some time in 1970. Drupal likes to store time in this format.
Converting from one to the other is as simple as these two rules (and functions – all in MySQL).
- unix_timestamp(MySQL timestamp) = xxxxxxxxxx
- from_unixtime(unix_timestamp()) = yyyy-mm-dd hh:mm:ss
If you have a date in the format of 2009-01-21 11:39:14 and you need that to be a 10 digit integer, just update the MySQL database with unix_timestamp(‘2009-01-02 11:39:14′). And if you have a 10 digit integer representing time, and you need a regular timestamp, wrap it in the function, from_unixtime(), like this: from_unixtime(‘1232566754′)
Add comment February 2, 2009
Node Import…
Don’t know why I thought that the current release DID support CCK content types when the project page makes it very clear that it doesn’t.
So… looks like I need to delve into the way Drupal sets dates in order to harness that into a PHP based database import. Youch. Big project for me, being pretty NEW to PHP. My hunch is that I need to:
- Make a db mysqli connection
- Write queries to draw from the correct tables, put the data into variables, and insert them into the destination tables, but with…
- .. .something that intercepts the date-based information and converts it to Drupal-happy date infor
What is Drupal-happy date info?
Add comment February 2, 2009