Monday, June 21, 2010

Migrating PHP/SQL from MAMP to WAMP

1. Exported my database to a .sql file, using phpmyadmin. Created a new database with the same name in WAMP and left it empty. Then imported it within the phpmyadmin environment using the import function from within the empty database. Initially got error message because the database exceeded the 2MB size limit (it was 7.5MB) but followed the directions as prompted to change the php.ini file so that the max_filesize parameter was 8MB.

2. PHP scripts that ran in MAMP initially wouldn't run in WAMP. Got error messages saying I had to initiallize array variables before using them, and "undefined constant blah, assumed 'blah' " meaning put array component names in quotes, as in $array["blah"] not $array[blah].

3. Various allowable permutations of embedding SQL commands within PHP using different orders of double or single quotes behave erratically in WAMP, much testing and debugging necessary.

4. Default user/password to access mysql in MAMP ("root"/"root") changed to "root"/"" in WAMP.

No comments:

Post a Comment