Page 1 of 1

Phpmyadmin not working after update to PHP5

Posted: Thu Jan 28, 2016 10:57 pm
by mhoffman13
Hello,
I have updated to php5 via this guide:
viewtopic.php?t=5061
After which apache and nginx were not able to start. I was able to get those running after deleting both old ip.conf files in the corresponding conf.d folders, thanks to another vesta forum post.

But now phpmyadmin is not accessible.

I'm running vestacp on Debian 7.9.
Mysql is working.

Any advice would be much appreciated.


Thanks in advance,
Mitch

Re: Phpmyadmin not working after update to PHP5

Posted: Fri Jan 29, 2016 8:02 am
by skurudo
Not accessible how? 404, 403?

Check your /etc/apache2/conf.d/phpmyadmin.conf
inside configShow

Code: Select all

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
        </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>
then /usr/share/phpmyadmin folder - ownership and permissions.

Re: Phpmyadmin not working after update to PHP5

Posted: Fri Jan 29, 2016 1:38 pm
by mhoffman13
Thanks for responding.

Heres the contents of/etc/apache2/conf.d/phpmyadmin.conf:

Code: Select all

root@vestalab:~# cat /etc/apache2/conf.d/phpmyadmin.conf
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
	Options FollowSymLinks
	DirectoryIndex index.php

	<IfModule mod_php5.c>
		AddType application/x-httpd-php .php

		php_flag magic_quotes_gpc Off
		php_flag track_vars On
		php_flag register_globals Off
		php_admin_flag allow_url_fopen Off
		php_value include_path .
		php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
		php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
	</IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory


I get neither 404, 403 just:
https://gofile.me/2fD3n/XBO0Xtyx


And the permissions for:
/usr/share/phpmyadmin:

Code: Select all

root@vestalab:~# ls -la /usr/share/phpmyadmin
total 1148
drwxr-xr-x   8 root root   4096 Nov  5 21:08 .
drwxr-xr-x 118 root root   4096 Nov  5 21:08 ..
-rw-r--r--   1 root root  11230 Aug 12  2012 browse_foreigners.php
-rw-r--r--   1 root root   1621 Aug 12  2012 bs_disp_as_mime_type.php
-rw-r--r--   1 root root   2060 Aug 12  2012 bs_play_media.php
-rw-r--r--   1 root root   3855 Aug 12  2012 changelog.php
-rw-r--r--   1 root root    363 Aug 12  2012 chk_rel.php
-rw-r--r--   1 root root   3746 Aug 12  2012 config.sample.inc.php
-rw-r--r--   1 root root   4060 Aug 12  2012 db_create.php
-rw-r--r--   1 root root  10137 Aug 12  2012 db_datadict.php
-rw-r--r--   1 root root   2876 Aug 12  2012 db_export.php
-rw-r--r--   1 root root    466 Aug 12  2012 db_import.php
-rw-r--r--   1 root root  22673 Aug 12  2012 db_operations.php
-rw-r--r--   1 root root   7331 Aug 12  2012 db_printview.php
-rw-r--r--   1 root root  31253 Aug 12  2012 db_qbe.php
-rw-r--r--   1 root root  13970 Aug 12  2012 db_search.php
-rw-r--r--   1 root root   1039 Aug 12  2012 db_sql.php
-rw-r--r--   1 root root  22783 Aug 12  2012 db_structure.php
-rw-r--r--   1 root root   8357 Aug 12  2012 db_tracking.php
lrwxrwxrwx   1 root root     26 Oct 28 14:48 docs.css -> ../doc/phpmyadmin/docs.css
lrwxrwxrwx   1 root root     36 Oct 28 14:48 Documentation.html -> ../doc/phpmyadmin/Documentation.html
-rw-r--r--   1 root root   3498 Aug 12  2012 enum_editor.php
-rw-r--r--   1 root root  28544 Oct 28 13:24 export.php
-rw-r--r--   1 root root  18902 Aug 12  2012 favicon.ico
-rw-r--r--   1 root root  16880 Oct 28 13:24 import.php
-rw-r--r--   1 root root   1058 Aug 12  2012 import_status.php
-rw-r--r--   1 root root   6701 Aug 12  2012 index.php
drwxr-xr-x   3 root root   4096 Nov  5 21:08 js
drwxr-xr-x  14 root root  12288 Nov  5 21:08 libraries
-rw-r--r--   1 root root    730 Aug 12  2012 license.php
drwxr-xr-x  43 root root   4096 Nov  5 21:08 locale
-rw-r--r--   1 root root  15962 Aug 12  2012 main.php
-rw-r--r--   1 root root  26742 Aug 12  2012 navigation.php
-rw-r--r--   1 root root    349 Aug 12  2012 phpinfo.php
-rw-r--r--   1 root root   1102 Aug 12  2012 phpmyadmin.css.php
drwxr-xr-x   5 root root   4096 Nov  5 21:08 pmd
-rw-r--r--   1 root root   9854 Aug 12  2012 pmd_common.php
-rw-r--r--   1 root root   1765 Aug 12  2012 pmd_display_field.php
-rw-r--r--   1 root root  35073 Aug 12  2012 pmd_general.php
-rw-r--r--   1 root root    948 Aug 12  2012 pmd_help.php
-rw-r--r--   1 root root   4539 Oct 28 13:24 pmd_pdf.php
-rw-r--r--   1 root root   3986 Aug 12  2012 pmd_relation_new.php
-rw-r--r--   1 root root   2165 Aug 12  2012 pmd_relation_upd.php
-rw-r--r--   1 root root   2061 Aug 12  2012 pmd_save_pos.php
-rw-r--r--   1 root root   2600 Aug 12  2012 prefs_forms.php
-rw-r--r--   1 root root  14904 Aug 12  2012 prefs_manage.php
-rw-r--r--   1 root root   1064 Aug 12  2012 print.css
-rw-r--r--   1 root root   7563 Aug 12  2012 querywindow.php
-rw-r--r--   1 root root   4405 Aug 12  2012 schema_edit.php
-rw-r--r--   1 root root   1608 Oct 28 13:24 schema_export.php
-rw-r--r--   1 root root   6802 Aug 12  2012 server_binlog.php
-rw-r--r--   1 root root   2645 Aug 12  2012 server_collations.php
-rw-r--r--   1 root root  10010 Aug 12  2012 server_databases.php
-rw-r--r--   1 root root   5192 Aug 12  2012 server_engines.php
-rw-r--r--   1 root root   2074 Aug 12  2012 server_export.php
-rw-r--r--   1 root root    477 Aug 12  2012 server_import.php
-rw-r--r--   1 root root 107511 Aug 12  2012 server_privileges.php
-rw-r--r--   1 root root   3606 Aug 12  2012 server_processlist.php
-rw-r--r--   1 root root  17282 Aug 12  2012 server_replication.php
-rw-r--r--   1 root root    581 Aug 12  2012 server_sql.php
-rw-r--r--   1 root root  39132 Aug 12  2012 server_status.php
-rw-r--r--   1 root root  58107 Aug 12  2012 server_synchronize.php
-rw-r--r--   1 root root   2777 Aug 12  2012 server_variables.php
drwxr-xr-x   4 root root   4096 Nov  5 21:08 setup
-rw-r--r--   1 root root    353 Aug 12  2012 show_config_errors.php
-rw-r--r--   1 root root  38451 Aug 12  2012 sql.php
-rw-r--r--   1 root root   7964 Aug 12  2012 tbl_addfield.php
-rw-r--r--   1 root root   7367 Aug 12  2012 tbl_alter.php
-rw-r--r--   1 root root  52368 Aug 12  2012 tbl_change.php
-rw-r--r--   1 root root   8171 Aug 12  2012 tbl_chart.php
-rw-r--r--   1 root root  15019 Aug 12  2012 tbl_create.php
-rw-r--r--   1 root root   2613 Aug 12  2012 tbl_export.php
-rw-r--r--   1 root root   1725 Aug 12  2012 tbl_get_field.php
-rw-r--r--   1 root root    624 Aug 12  2012 tbl_import.php
-rw-r--r--   1 root root   8156 Aug 12  2012 tbl_indexes.php
-rw-r--r--   1 root root   2312 Aug 12  2012 tbl_move_copy.php
-rw-r--r--   1 root root  31534 Aug 12  2012 tbl_operations.php
-rw-r--r--   1 root root  16369 Oct 28 14:26 tbl_printview.php
-rw-r--r--   1 root root  23680 Aug 12  2012 tbl_relation.php
-rw-r--r--   1 root root  16972 Aug 12  2012 tbl_replace.php
-rw-r--r--   1 root root   4684 Aug 12  2012 tbl_row_action.php
-rw-r--r--   1 root root  16484 Aug 12  2012 tbl_select.php
-rw-r--r--   1 root root    978 Aug 12  2012 tbl_sql.php
-rw-r--r--   1 root root  38529 Aug 12  2012 tbl_structure.php
-rw-r--r--   1 root root  26485 Aug 12  2012 tbl_tracking.php
drwxr-xr-x   4 root root   4096 Nov  5 21:08 themes
-rw-r--r--   1 root root   1355 Aug 12  2012 themes.php
-rw-r--r--   1 root root   2043 Aug 12  2012 transformation_overview.php
-rw-r--r--   1 root root   3611 Aug 12  2012 transformation_wrapper.php
-rw-r--r--   1 root root    391 Aug 12  2012 url.php
-rw-r--r--   1 root root   4879 Aug 12  2012 user_password.php
-rw-r--r--   1 root root   5354 Aug 12  2012 view_create.php
-rw-r--r--   1 root root   2802 Aug 12  2012 view_operations.php
-rw-r--r--   1 root root   1121 Aug 12  2012 webapp.php

Re: Phpmyadmin not working after update to PHP5

Posted: Mon Feb 01, 2016 1:33 pm
by skurudo
Looks fine, but on screen something else - unable to connect.

There are several versions:
- webserver not started
- webserver have errors when starts;
- or webserver just down;
- firewall don't have rule about 80/443 port (http/https);

Re: Phpmyadmin not working after update to PHP5

Posted: Tue Feb 02, 2016 6:00 pm
by mhoffman13
Ok Thanks.
The services are up and running and firewall rules are default. Accept on 80/443

Ill double check the services.

Re: Phpmyadmin not working after update to PHP5

Posted: Tue Feb 02, 2016 8:47 pm
by skurudo
Check your nginx -> conf.d/ip-address.conf
May be you or your admin close connect via IP?
(I do this on my own servers too)

Re: Phpmyadmin not working after update to PHP5

Posted: Wed Feb 03, 2016 5:05 pm
by mhoffman13
All that was in the conf.d folder was:
status.conf vesta.conf

the other conf files must have been removed after the upgrade maybe.

I recreated these:
192.168.1.7.conf phpmyadmin.inc phppgadmin.inc webmail.inc

And restarted the server:
Now i get this:
502 Bad Gateway

Thanks and I Appreciate your help with this