Cannot log into phpmyadmin

Rodolfo Aramayo raramayo at gmail.com
Sat Jun 15 19:23:49 PDT 2013


Ryan,

I have found the origin of the problem
But I still remain puzzled...
See below...

n Sat, Jun 15, 2013 at 7:15 PM, Ryan Schmidt <ryandesign at macports.org>wrote:

>
> On Jun 15, 2013, at 11:21, Rodolfo Aramayo wrote:
>
> > I am having trouble figuring out the following:
> >
> >  Following the instructions posted in:
> http://trac.macports.org/wiki/howto/MAMP
> >
> > I was able to successfully install everything and get everything working
> perfectly
> >
> > Basically I was able to see:
> >
> > localhost
> > localhost/phpinfo.php
> > localhost/phpmyadmin
> > localhost/mywebsite1
> > localhost/mywebsite2
> >
> > Using phpmyadmin i was able to create databases and users correctly
>
> Ok, so at this point in time you knew a MySQL username and password that
> allowed you to log in.
>
> Indeed. Using the terminal I was able to log into any user/database in
MySQL5


> > I then activated Include conf/extra/httpd-vhosts.conf in the httpd.conf
> and in the httpd-vhosts.conf I configure a virtual host which works well
> >
> > Days later I tried to access phpmyadmin and while I can see phpmyadmin
> well but I cannot log into it using usernames and passwds I know are correct
> >
> > Using the same usernames and passwds I can successfully log into mysql
> via terminal
>
> I'm assuming your MySQL server is on the same machine as your web server
> and that you're therefore trying to talk to the MySQL server using a UNIX
> socket. If that's not so, let me know.
>
>
Yes. Same machine
Yes, UNIX socket
(mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock)



> Perhaps there is a mismatch between where the MySQL server stores its
> socket file and where you've configured PHP to look for it. Have you
> changed where MySQL stores its socket, by editing the my.cnf file? If so,
> make the same change in the php.ini and/or the phpmyadmin config file.
>
>
at php.in (development) I have:

mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock

I do not have my.cnf?? so I have not touched that file and at phpmyadmin I
have:

/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

this is related to mysql


> Which PHP port are you using: php5, php53, php54, php55?
>


The ports related to php I have are:

13# port installed php5*
The following ports are currently installed:
  php5 @5.3.26_0+apache2 (active)
  php5-gd @5.3.26_0 (active)
  php5-gdchart @0.2.0_0 (active)
  php5-mailparse @2.1.6_0 (active)
  php5-mbstring @5.3.26_0 (active)
  php5-mcrypt @5.3.26_0 (active)
  php5-mysql @5.3.26_0+mysqlnd (active)
  php5-openssl @5.3.26_0 (active)
  php5-zip @5.3.26_0 (active)
  php53 @5.3.26_0+libedit (active)
  php53-gd @5.3.26_0 (active)
  php53-gdchart @0.2.0_0 (active)
  php53-mailparse @2.1.6_1 (active)
  php53-mbstring @5.3.26_0 (active)
  php53-mcrypt @5.3.26_0 (active)
  php53-openssl @5.3.26_0 (active)
  php53-zip @5.3.26_0 (active)
  php54 @5.4.16_0+libedit (active)
  php54-apache2handler @5.4.16_0 (active)
  php54-gd @5.4.16_0 (active)
  php54-mbstring @5.4.16_0 (active)
  php54-mcrypt @5.4.16_0 (active)
  php54-mysql @5.4.16_0+mysqlnd (active)
  php54-zip @5.4.16_0 (active)



> Which variant of the php5*-mysql port is installed? If mysqlnd, have you
> followed the instructions, e.g.:
>
>   php5-mysql @5.3.26_0+mysqlnd (active)
  php54-mysql @5.4.16_0+mysqlnd (active)


>
> $ port notes php54-mysql
> php54-mysql has the following notes:
>


>   To use mysqlnd with a local MySQL server, edit
> /opt/local/etc/php54/php.ini and set mysql.default_socket,
> mysqli.default_socket and pdo_mysql.default_socket to the path to your
> MySQL server's socket file.
>
>   For mysql5, use /opt/local/var/run/mysql5/mysqld.sock
>   For mysql51, use /opt/local/var/run/mysql51/mysqld.sock
>   For mysql55, use /opt/local/var/run/mysql55/mysqld.sock
>   For mariadb, use /opt/local/var/run/mariadb/mysqld.sock
>   For percona, use /opt/local/var/run/percona/mysqld.sock
>
>
>
I believe then I am using:

mysql.default_socket=/opt/local/var/run/mysql5/mysqld.sock




>  > Similarly, I cannot access:
> >
> > localhost/phpinfo.php
>
> Why not? What happens?
>

Not Found!

Despite the fact that the phpinfo.php file is there in:

/opt/local/apache2/htdocs

BUT if I comment out the statement:

# Virtual
hosts

Include conf/extra/httpd-vhosts.conf

inside httpd.conf

then I can see phpinfo.php


>
> > If I turn conf/extra/httpd-vhosts.conf in the httpd.conf off I can now
> see the display of localhost/phpinfo.php,
>
> What strange directives are in httpd-vhosts.conf that are causing that?
>

What I have found is that when I comment out the directive:

# Various default
settings

Include conf/extra/httpd-default.conf

inside httpd.conf

Now everything EXCEPT being able to see phpinfo.php works.
This is I can now see phpmyadmin and log into it correctly but phpinfo.php
is not displayed correclty

Inside httpd-vhosts.conf I have the following active:
#######
NameVirtualHost *:80
Listen 80

<VirtualHost localhost 192.168.1.5 165.91.108.63 *:80>
ServerAdmin raramayo at gmail.com
DocumentRoot "/opt/local/www/aramayolab"
ServerName aramayolab.org
ServerAlias www.aramayolab.org
ErrorLog "/opt/local/www/aramayolab.logs/aramayolab.org.error.log"
CustomLog "/opt/local/www/aramayolab.logs/aramayolab.org.access.log" common
</VirtualHost>
######

Something tells me that I might be using different versions of php??

Thanks

--R



> > but still cannot log into phpmyadmin
> >
> > I tried re-installing phpmyadmin to no avail
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20130615/11c6b427/attachment.html>


More information about the macports-users mailing list