In current master (af1a674d255ec45615d373e6e632a3601c314498), a permission problem on the directory defined in $cfg['SaveDir'] is not detected. Works fine in 4.2.5.
Hi,
It seems that following global vars are not in scope because include is inside the function causing the redirect to home page by some scripts (libraries/db_common.inc.php, libraries/db_table_exists.lib.php):
Hi Chirayu,
good catch. It's a good idea to add "global $cfg". For db and table, it's better to pass them as parameters to the function. For url_query, I'm not sure, because at the point of calling the function, it's not defined, so it does not seem necessary. For userlink, I tried without and it worked; any particular reason you want to declare this global?
Also, do you want to prepare a final patch or do you want me to complete the work, following my suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Marc,
For url_query I get a missing parameter error (See attachment) & for userlink, I get a undefined variable message, both at server level export if I dont declare it.
Caused by https://github.com/phpmyadmin/phpmyadmin/commit/cff38db7f2b2dcf96b197be275005ee353342d54
Hi,
It seems that following global vars are not in scope because include is inside the function causing the redirect to home page by some scripts (libraries/db_common.inc.php, libraries/db_table_exists.lib.php):
Adding the above line will fix this issue (see https://github.com/D-storm/phpmyadmin/commit/13a13dd483e547ed683770ba04156e701a23fb00) but I am not sure whether its a good solution or not.
Hi Chirayu,
good catch. It's a good idea to add "global $cfg". For db and table, it's better to pass them as parameters to the function. For url_query, I'm not sure, because at the point of calling the function, it's not defined, so it does not seem necessary. For userlink, I tried without and it worked; any particular reason you want to declare this global?
Also, do you want to prepare a final patch or do you want me to complete the work, following my suggestions?
Hi Marc,
For url_query I get a missing parameter error (See attachment) & for userlink, I get a undefined variable message, both at server level export if I dont declare it.
And yes, I can prepare a final patch.
Ok, so it seems that declaring url_query as global is the best thing to do.
For userlink the error is:
maybe we can replace userlink with $GLOBALS['userlink'] at that line.
Good idea to use $GLOBALS['userlink'], this is what we are supposed to do anyway, plus it clarifies its origin.
Here is the PR with suggested changes: https://github.com/phpmyadmin/phpmyadmin/pull/1259