You are not logged in.

#1 2012-12-10 12:54:43

oengelha
Member
Registered: 2012-12-10
Posts: 8

[CLOSED] Weird mysql/php issue.

Hi,
I am running an ArchLinux as my Server. It's a fresh install. I just configured nginx as my Webserver and then configured MySQL. I wanted to use phpMyAdmin as a manager. I installed it via wget and it worked fine. But all of a sudden it would not let me log in anymore. The log in screen just keeps on popping up, without any errors or anything. It tried reinstalling phpMyAdmin, I also tried the alternative chive. In chive I get the error "CDbConnection failed to open the DB connection." I really am at a loss here, has anyone else encountered a similar issue and can point me in the right direction?

Disclaimer: Please excuse my possibly poor english, as it is not my native language, also please excuse any questions that may sound noob-like, because I am quite new to Arch.

Last edited by oengelha (2012-12-15 17:40:09)

Offline

#2 2012-12-10 14:18:36

xpixelz
Member
From: Tunisia
Registered: 2012-02-29
Posts: 47
Website

Re: [CLOSED] Weird mysql/php issue.

Actually this is not an Arch related question. It seems like your mysql server is down, have you tried connecting from command line?

Offline

#3 2012-12-10 14:23:12

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

Yes, connecting to it from the command-line works just fine.

Offline

#4 2012-12-10 14:36:12

xpixelz
Member
From: Tunisia
Registered: 2012-02-29
Posts: 47
Website

Re: [CLOSED] Weird mysql/php issue.

What php version are you using? -> php -v
Which php.ini is used? -> php -i | grep php.ini
What's your php.ini tells about "extension_dir"? -> grep extension_dir path/to/your/php.ini
Are correct modules loaded? -> php -m |egrep "mysql|pdo"

Did your problem showed up after an upgrade?

Offline

#5 2012-12-10 14:53:44

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

It pretty much worked on the first few logins, but then suddelny stopped working. I did not really change anything, I maybe did a reboot.
My outputs are:
[root@netzmelone ~]# php -v
PHP 5.4.9 (cli) (built: Nov 23 2012 07:51:32)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

[root@netzmelone ~]# php -i | grep php.ini
Configuration File (php.ini) Path => /etc/php
Loaded Configuration File => /etc/php/php.ini

[root@netzmelone ~]# grep extension_dir /etc/php/php.ini
extension_dir = "/usr/lib/php/modules/"
; extension_dir = "ext"
;sqlite3.extension_dir =

[root@netzmelone ~]# php -m |egrep "mysql|pdo"
mysql
mysqli
mysqlnd
pdo_mysql

Last edited by oengelha (2012-12-10 14:54:40)

Offline

#6 2012-12-10 15:29:51

xpixelz
Member
From: Tunisia
Registered: 2012-02-29
Posts: 47
Website

Re: [CLOSED] Weird mysql/php issue.

Looks fine, may you pastebin your nginx logs please?

Offline

#7 2012-12-10 16:04:39

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

Okay, heres my logs: they are pretty fresh, since i did not enable them before. http://pastebin.com/XpkXKhy7 Additionally, I have once again trieb to install phpMyAdmin, but now i get this error:
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
and also this error:
The mysqli extension is missing. Please check your PHP configuration. <a href="Documentation.html#faqmysql" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a>

This cant't be right, since I do have the mysqli extension enabled in my php.ini also, my phpinfo shows it. http://oliverengelhardt.de/info.php

Offline

#8 2012-12-11 11:20:55

xpixelz
Member
From: Tunisia
Registered: 2012-02-29
Posts: 47
Website

Re: [CLOSED] Weird mysql/php issue.

I see no relevant info at these truncated lines!
If php -m lists mysqli then it should be enabled and the mysqli.so is under /usr/lib/php/modules/

Can't help much this way.

Offline

#9 2012-12-11 11:58:02

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

It php -m says mysqli is enabled. Well then I should probably just do a reinstall and hope for the best. Thanks for your help.

Offline

#10 2012-12-11 16:26:47

ackt1c
Member
From: Visalia, California
Registered: 2012-10-10
Posts: 215

Re: [CLOSED] Weird mysql/php issue.

are you running php-fpm.service with nginx.service?

/var/log/nginx/error.log

Offline

#11 2012-12-11 21:49:06

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

I tried loading both mannually, no change.

Offline

#12 2012-12-11 22:05:44

ackt1c
Member
From: Visalia, California
Registered: 2012-10-10
Posts: 215

Re: [CLOSED] Weird mysql/php issue.

maybe use pacman to install,

pacman -S phpmyadmin

Offline

#13 2012-12-12 15:01:40

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

How do I acces it when i installed it using pacman?

Last edited by oengelha (2012-12-12 15:07:25)

Offline

#14 2012-12-12 18:03:57

ackt1c
Member
From: Visalia, California
Registered: 2012-10-10
Posts: 215

Re: [CLOSED] Weird mysql/php issue.

config.inc.php should be in

/etc/webapps/phpmyadmin

but the installation symlinks that file to

/usr/share/webapps/phpMyAdmin

where the installation is.

You'll have to add this directive in open_basedir @

/etc/php/:/usr/share/webapps/

Also might need an alias in

/etc/nginx/nginx.conf

What I do is symlink

ln -s /usr/share/webapps /srv/http/.webapps

/srv/http being my www directory I can visit mysite.com/.webapps/phpMyAdmin to access.
This can be a security issue, maybe allow only local access or use another mean of accessing the installation.
Also symlinking just the installation directory to a hidden directory precursed with '.' won't float, like mysite.com/.phpmyadmin

Last edited by ackt1c (2012-12-16 17:44:01)

Offline

#15 2012-12-15 17:40:55

oengelha
Member
Registered: 2012-12-10
Posts: 8

Re: [CLOSED] Weird mysql/php issue.

Okay, this topic can be closed, I just resigned and reinstalled my sytem, now it works... Thanks for all your help. smile

Offline

Board footer

Powered by FluxBB