phpMyAdmin on GAE - Authentication

I have setup phpmyadmin on GAE using the tutorial provided @ https://gaeforphp-blog.appspot.com/2013/05/26/setting-up-phpmyadmin-on-app-engine/

The version of the app (phpmyadmin) can be accessed without problems, but I cannot seem to authenticate against my Cloud SQL instance.

I have tried both cookie and config type authentication without success. However I have discovered, with cookie auth, after submitting the username password, the page just reloads without errors.

If I use config auth, I get the following error on the page:

2002 - Unable to find the socket transport "tcp" - did you forget to enable it when you configured PHP?

The server is not responding (or the local server's socket is not correctly configured).

All google searches point me to ssl library in php. Has anyone been able to get phpmyadmin to work on GAE?

Would have preferred if the actual blog entry (@ gaeforphp-blog.appspot.com) would support comments to ask the question to the Author, unfortunately thats not the case.

Answers


So you're seeing this error because the connection string you're using is not correct, and we don't know you're trying to connect to CloudSQL.

If you're using mysql make sure you have the ':/cloudsql/' in front of the instance name.

Didn't know that blog didn't accept comments - i'll fix that.


This were the lines o changed on my phpMyAdmin 4.1.6.0 config.inc.php file:

$cfg['Servers'][$i]['host'] = ':/cloudsql/<project-id>:<cloudsql-instance>';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['AllowRoot'] = true;

And then I added the following lines:

$cfg['McryptDisableWarning'] = true;
$cfg['PmaNoRelation_DisableWarning'] = true;
$cfg['ExecTimeLimit'] = 60;
$cfg['CheckConfigurationPermissions'] = false;

Considerations:

  • By changing $cfg['Servers'][$i]['AllowNoPassword'] to true you are allowing anyone to login as root with no password. So you might want using this just for the first login to create a new user/password with limited privileges and then change it to false again (or you might use the Could Console and do not change this at all).
  • The $cfg['Servers'][$i]['extension'] = 'mysql' actually did the trick for me. I do not know why, but seems mysqli was not enabled on my php config file.

Links I used:


The only thing that worked for me is the following configuration.

$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['socket'] = '/cloudsql/project-id:db-instance';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['AllowRoot'] = true;

$cfg['McryptDisableWarning'] = true;
$cfg['PmaNoRelation_DisableWarning'] = true;
$cfg['ExecTimeLimit'] = 60;
$cfg['CheckConfigurationPermissions'] = false;

All other configurations failed with all kinds of error messages. From socket not found to gethostbyaddr errors etc. Good luck!


Need Your Help

how to configure smtp settings?

c# asp.net smtp

I wanted to recover password using PasswordRecovery control in asp.net .but when I clicked on submit button .I have got this message that :

Free jqGrid 4.8.0 - How to get the gridId from within the field formatter

jquery jqgrid free-jqgrid

Is there a way to extract the gridId from within the formatter, unformat functions on the colModel?