ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problems copying EE2 site and database

January 25, 2011 12:08pm

Subscribe [5]
  • #1 / Jan 25, 2011 12:08pm

    Rob Rightmyer

    9 posts

    We would like to copy an existing EE2 site (database and files) to a new directory on our server for development and testing. Files have been copied to the new directory and we’ve successfully exported the database from the existing site and imported to the development database. Everything seems to function properly with the “copied” site and control panel however a closer inspection reveals the navigation links (and possibly others) now end with the following: “?phpMyAdmin=KBASUSWbCkurd3gTklaCNOu3arf”

    We have repeated the process of exporting the “source” database and importing to the “development” database and yielded the same results. There appears to be something happening on the import via PHPMyadmin that is adding the additional code to the links. I know this because we opened the “exported” database file in a text editor and the “phpmyadmin” string did not appear.

    How can we solve this?

  • #2 / Jan 25, 2011 1:37pm

    Rob Rightmyer

    9 posts

    A follow-up to my previous post…

    Rechecked the database export file and “did” find the errant phpMyAdmin code at the end of all links. Used find/replace in my text editor to remove all occurrences of these and repeated the import procedure to the new database. The links all appear as they should now.

    So the errant code is being added it seems as I’m exporting the database via phpMyAdmin. We have phpMyAdmin version 2.8.2.4.

    1) Has it been proven that a newer version of phpMyAdmin solves this issue?
    2) What are the EE preferred export settings when using phpMyAdmin?
    3) Is there an preferred alternative to phpMyAdmin that would solve this?

  • #3 / Jan 25, 2011 2:55pm

    BigCItyShelts

    35 posts

    I have experienced this bug as well.  To answer question #3, I prefer either Navicat (for pay) or the command line (for free):

    mysqldump -u username -p dbname > dumpfile.sql

  • #4 / Jan 25, 2011 3:09pm

    Ingmar

    29245 posts

    1) Has it been proven that a newer version of phpMyAdmin solves this issue?
    2) What are the EE preferred export settings when using phpMyAdmin?
    3) Is there an preferred alternative to phpMyAdmin that would solve this?

    I think it’s an issue with certain version of phpMyAdmin and Plesk, actually. Either way, not an EE issue as such. You can certainly use some other program, even the built-in commandline tools thast ship with MySQL.

  • #5 / Jan 25, 2011 4:11pm

    Rob Rightmyer

    9 posts

    I think it’s an issue with certain version of phpMyAdmin and Plesk, actually. Either way, not an EE issue as such. You can certainly use some other program, even the built-in commandline tools thast ship with MySQL.

    Thanks for the reply. I failed to mention that I’ve performed the exact same export/import routine with phpMyAdmin to duplicate installations of Wordpress, eCommerce programs (Magento, X-Cart) and even a custom app designed with CodeIgniter. I’ve never experienced this bug with any of those. Our hosting provider had also not experienced this. Additionally, I’ve read where at least 3-4 others have experienced the same issue in their versions of EE. That being said, how can we be 100% certain EE is not partly responsible?

    Mainly we just want to be confident an SQL backup can be trusted to restore with if need be and if phpMyAdmin can’t be trusted with the EE database, we could work around it using the find/replace method or command line. Still a little curious why this only seems to happen with the EE database though.

  • #6 / Jan 25, 2011 4:31pm

    Aaron Waldon

    66 posts

    I have had this problem happen to me before too. I am not sure what causes it, but I don’t think PMA (phpMyAdmin) cares if the database is EE or not. It just seems to happen randomly, and is generally easy to fix with a find/replace like you pointed out.

    Strangely, the problem does not seem to replicate easily. If you try the backup again and search the resulting .sql file for ?phpMyAdmin= does the problem persist?

  • #7 / Jan 25, 2011 4:37pm

    Ingmar

    29245 posts

    ... the exact same export/import routine with phpMyAdmin to duplicate installations of Wordpress, eCommerce programs (Magento, X-Cart) and even a custom app designed with CodeIgniter. I’ve never experienced this bug with any of those.

    Was that on the same server, using the same software versions? As I’ve said, I seem to recall it only happens in connection with Plesk.

    That being said, how can we be 100% certain EE is not partly responsible?

    EE doesn’t add ?phpMyAdmin= to your data. That said, using phpMyAdmin to export your data doesn’t even have to involve EE, and it’s working fine with other software.

  • #8 / Jan 26, 2011 2:34pm

    Rob Rightmyer

    9 posts

    Strangely, the problem does not seem to replicate easily. If you try the backup again and search the resulting .sql file for ?phpMyAdmin= does the problem persist?

    Thanks for the reply Aaron. Unfortunately I have been able to reproduce the problem consistently on my end, having seen the errant code in our four most recent EE database exports. The most recent being this morning.

    Was that on the same server, using the same software versions? As I’ve said, I seem to recall it only happens in connection with Plesk.

    Thanks Ingmar. Yes, the other database exports mentioned in my previous post were done on the same server, same software versions.

    Plesk Version: 8.6 (psa v8.6.0_build86080910.19 os_CentOS 5)
    phpMyAdmin Version: 2.8.2.4
    MySQL Version: 5.0.45

    EE doesn’t add ?phpMyAdmin= to your data. That said, using phpMyAdmin to export your data doesn’t even have to involve EE, and it’s working fine with other software.

    That is true, I’ve checked and it does not appear EE is adding “?phpMyAdmin=” to our data. Still I maintain that it only seems to happen when we export our EE database which brings me back to my earlier questions.

    Is there a known combination of Plesk/phpMyAdmin that causes the issue?
    Is there a proven version of Plesk/phpMyAdmin that solves it?
    Should we avoid using phpMyAdmin altogether when dealing with our EE database?

    The main concern we have going forward is the ability to reliably export our EE database for backup purposes and know we can trust it in the event of restoring to one of those backups in the future.

  • #9 / Jan 26, 2011 3:29pm

    Aaron Waldon

    66 posts

    That is strange indeed Rob. You may be interested in purchasing Navicat for MySQL (it is a powerful application) or installing the latest version of PMA on your server (I’m assuming the version you are using is through your Plesk control panel). Sorry I could not be of more help.

  • #10 / Jan 27, 2011 4:54am

    John Henry Donovan

    12339 posts

    Rob,

    You could also just install a current version(3.3.9) of phpMyAdmin yourself. It is a fairly simple process but no guarantee that the issue might happen again

  • #11 / Jan 27, 2011 12:39pm

    Rob Rightmyer

    9 posts

    This issue has been solved with the help of our hosting company. They pointed out there is a known issue with the combination of Plesk 8 and phpMyAdmin 2.8 that causes the errant code to be added to href links stored in the database. Upgrading to a later version of phpMyAdmin should solve the problem and the upcoming release of Plesk should also fix this.

    See this article for a description and fix: http://kb.parallels.com/6213

  • #12 / Jan 27, 2011 3:47pm

    Ingmar

    29245 posts

    Very glad it turned out to be an issue with a certain version of phpMyAdmin and Plesk after all. Thanks for reporting back to us. Please post again in case there’s anything else.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases