Page 1 of 1

Fatal error json.php when trying to export a db [SOLVED]

PostPosted: 20. December 2011 20:46
by some99
hi guys,

xampp is driving me craxy :(
i cant export databases on phpmyadmin because i get the following error everytime i click export

Fatal error: Call to undefined function __() in F:\xampp\phpMyAdmin\libraries\export\json.php on line 26

i checked phpinfo and json is enabled.

is there a solution to this ?

thnx!

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 20:49
by Sharley
Would you be so kind as to add your XAMPP version and Operating System to your profile as per these instructions:
viewtopic.php?f=16&t=48626
Thanks. :)

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 20:57
by some99
updated! thnx for replying :)

1.7.3
windows 7 64bit

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 21:04
by Sharley
Thanks for that as most things now in XAMPP are version specific. 8)


I am just wondering if phpMyAdmin has been corrupted in some way.

The solution may be to download the zip version of 1.7.3 from here:
SourceForge XAMPP File Repository

Then drag just the export folder from the archive and drop it over the one in your installation, overwriting when asked, so the files are then known to be fresh and try to export again after restarting Apache and MySQL.

Good luck. :)

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 21:20
by some99
didn't work :(

btw i noticed that import also doesn't work

Fatal error: Call to undefined function __() in F:\xampp\phpMyAdmin\libraries\import\ods.php on line 22

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 21:38
by Sharley
Well at least we now know it was not a corrupted file and we can move on.

Is this a new XAMPP installation?

If so or you don't mind uninstalling then try a different installation method by following these instructions:
viewtopic.php?p=179699#p179699
You can use the zip file you download previously if you wish.

This method often fixes issues as it is sometimes the installer that plays up with some Windows versions and will be replaced in the next release.

Re: Fatal error json.php when trying to export a db

PostPosted: 20. December 2011 21:43
by Sharley
Just to add that if you stop all the xampp components and uninstall any services in the control panel and then exit the control panel there is no need to delete the xampp folder, simply rename it to xampp_old.

Then extract the new xampp folder as described in the instructions.

This way you will still have your older installation to be able to copy over your own files etc. - sort of a sophisticated backup of your older installation.

Re: Fatal error json.php when trying to export a db

PostPosted: 21. December 2011 00:23
by some99
oke, now the export function works again but how do i transfer my website to the new xampp?

i moved htdocs/mysitefolder to the new htdocs folder

and i also moved \xampp_old\mysql\data\mysitename to the new mysql folder

but i get a billion errors when opening the website on localhost, did i mis something?

Re: Fatal error json.php when trying to export a db

PostPosted: 21. December 2011 01:22
by Altrea
some99 wrote:but i get a billion errors when opening the website on localhost, did i mis something?

Without knowing the error messages, nobody can know for sure but you.

Re: Fatal error json.php when trying to export a db

PostPosted: 21. December 2011 05:05
by Sharley
So did you install a fresh 1.7.3 version or did you install a newer version?

If you installed a newer version of XAMPP then MySQL will also be a newer version and so your database maybe having issues with new MySQL version.

Let me know what version you installed and I may be able to help with your issue.

Re: Fatal error json.php when trying to export a db

PostPosted: 22. December 2011 00:05
by some99
thank you for the help guys, i fixed it! thnx to your assistance! ^^
when i reinstalled xmapp i used a different version than the 1 i had installed.
so i redownloaded the zip of the same version and everything worked like a charm! i can sleep again ^^

Re: Fatal error json.php when trying to export a db

PostPosted: 22. December 2011 01:05
by Sharley
Thanks for the feedback and I am pleased you can now move forward. 8)

Good luck. :)