# how to fix myphpadmin?



## beesatmsu (Aug 31, 2010)

My phpmyadmin was working fine before on 2 servers...then I updated png, tiff, mDNSResponder etc. and now I get blank pages on both servers...I did `portsnap fetch update` recently, deinstalled the phpmyadmin port, reinstalled (no errors)...and still just get a blank page in the root or in /setup/ ..

php was not changed since last time:

```
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Apr  4 2010 11:58:20) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
```

firefox gave a blank page, but actually if I go to the server by ssh, lynx would give me an error of connecting to it. also, there is no log at all in error log or access log. 

where do I start looking for what is wrong? it would be easier to use myphpadmin to manage the mysql tables and backup wordpress files. 

Thanks.


----------



## User23 (Aug 31, 2010)

beesatmsu said:
			
		

> where do I start looking for what is wrong?



Search in /var/log/ for the error logfile of the apache. It should be /var/log/httpd-error.log.
Make a 
	
	



```
tail -f /var/log/httpd-error.log
```
 and reload the phpmyadmin in your browser. Now you should see if any error with the apache happens.


----------



## pbd (Aug 31, 2010)

Is Apache (or other http daemon) running and listening on port 80?

`% sockstat -4lp 80`

Does this return some error?


```
cd [I]directory_where_is_phpmyadmin_installed[/I]
php index.php
```


----------



## beesatmsu (Aug 31, 2010)

Thanks, User23 and pbd. Apache is working fine, so is php. I am serving pages from wordpress right now.. so mysql, php and apache are all working correctly.
sockstat gives no error:


```
drone# sockstat -4lp 80
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
www      httpd      1900  3  tcp4 6 *:80                  *:*
www      httpd      1882  3  tcp4 6 *:80                  *:*
www      httpd      1862  3  tcp4 6 *:80                  *:*
www      httpd      1860  3  tcp4 6 *:80                  *:*
www      httpd      1854  3  tcp4 6 *:80                  *:*
www      httpd      1852  3  tcp4 6 *:80                  *:*
www      httpd      1851  3  tcp4 6 *:80                  *:*
www      httpd      1850  3  tcp4 6 *:80                  *:*
www      httpd      1849  3  tcp4 6 *:80                  *:*
www      httpd      1847  3  tcp4 6 *:80                  *:*
root     httpd      1130  3  tcp4 6 *:80                  *:*
```

but php index.php did get me an error:


```
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613-debug/gd.so: Undefined symbol "zend_parse_parameters_none"
```
nothing in the /var/log/http-error.log though, neither in the virtual host specific log.


----------



## beesatmsu (Aug 31, 2010)

it seems to be related php-extensions not updated, but i never updated php or its extensions since April (when I first installed everything). 

I de-installed and re-installed php5, no problem.

but in re-installing php5-extensions, I get

```
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:527: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:527: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:528: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
```

the error is not specific enough for me to continue...maybe I will try php52 (the default is php5.3.3)


----------



## beesatmsu (Aug 31, 2010)

trying php52-extensions gave me a bunch of different errors:


```
In file included from /usr/ports/textproc/php52-simplexml/work/php-5.2.14/ext/simplexml/simplexml.c:38:
/usr/local/include/php/ext/spl/spl_sxe.h:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/textproc/php52-simplexml.
*** Error code 1

Stop in /usr/ports/devel/php52-spl.
*** Error code 1

Stop in /usr/ports/textproc/php52-dom.
*** Error code 1

Stop in /usr/ports/lang/php52-extensions.
*** Error code 1

Stop in /usr/ports/lang/php52-extensions.
```


----------



## beesatmsu (Aug 31, 2010)

I tried a couple of different things, pkg_delete -xf php, and reinstalling, no go.

then I turned on "debug" in the options, still I got these errors from php5-extensions:

```
cell# make install
===>   php5-extensions-1.4 depends on file: /usr/local/include/php/main/php.h - found
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626-debug/bz2.so - not found
===>    Verifying install for /usr/local/lib/php/20090626-debug/bz2.so in /usr/ports/archivers/php5-bz2
===>   Returning to build of php5-extensions-1.4
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626-debug/ctype.so - not found
===>    Verifying install for /usr/local/lib/php/20090626-debug/ctype.so in /usr/ports/textproc/php5-ctype
===>   Returning to build of php5-extensions-1.4
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626-debug/dom.so - not found
===>    Verifying install for /usr/local/lib/php/20090626-debug/dom.so in /usr/ports/textproc/php5-dom
===>   Returning to build of php5-extensions-1.4
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626-debug/exif.so - not found
===>    Verifying install for /usr/local/lib/php/20090626-debug/exif.so in /usr/ports/graphics/php5-exif
===>   Returning to build of php5-extensions-1.4
===>   php5-extensions-1.4 depends on file: /usr/local/lib/php/20090626-debug/filter.so - not found
===>    Verifying install for /usr/local/lib/php/20090626-debug/filter.so in /usr/ports/security/php5-filter
===>  Building for php5-filter-5.3.3_1
/bin/sh /usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/libtool --mode=compile cc  -I. 
-I/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/
php5-filter/work/php-5.3.3/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/main 
-I/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main 
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/
date/lib  -DHAVE_CONFIG_H  -pipe -fno-strict-aliasing -O0   -c /usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c -o logical_filters.lo
 cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter
/work/php-5.3.3/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/main -I/usr/ports/
security/php5-filter/work/php-5.3.3/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local
/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib 
-DHAVE_CONFIG_H -pipe -fno-strict-aliasing -O0 -c /usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/
logical_
filters.c  -fPIC -DPIC -o .libs/logical_filters.o
In file included from /usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
In file included from /usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:25:
/usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre'
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp':
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:411: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:411: error: (Each undeclared identifier is reported only once
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:411: error: for each function it appears in.)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:411: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:412: error: 'pcre_extra' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c: In function 'php_filter_validate_email':
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:527: error: 'pcre' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:527: error: 're' undeclared (first use in this function)
/usr/ports/security/php5-filter/work/php-5.3.3/ext/filter/logical_filters.c:528: error: 'pcre_extra' undeclared (first use in this function)
*** Error code 1
1 error
*** Error code 1

Stop in /usr/ports/security/php5-filter.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
cell#
```


----------



## acheron (Aug 31, 2010)

try to update/install devel/pcre


----------



## beesatmsu (Aug 31, 2010)

acheron, thanks.

I tried deinstall and reinstall that port. no errors.

I got exactly the same errors as my last post when I tried to do php5-extensions...


----------



## acheron (Aug 31, 2010)

since you have upgrade from php 5.2 to 5.3 have you follow the instruction in UPDATING, see entry 20100409


----------



## DutchDaemon (Aug 31, 2010)

Why is */usr/ports/UPDATING* still such an obscure file to most, I wonder. Reading it would prevent 100 topics each month, I think.


----------



## beesatmsu (Aug 31, 2010)

I thought [CMD=""]pkg_delete -xf php[/CMD]would have deleted everything...indeed, 

pkg_info |grep php shows only phpmyadmin there now.

php it self wont load due to an error:


```
cell# php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626-debug/pdf.so' - Cannot open "/usr/local/lib/php/20090626-debug/pdf.so" in Unknown on line 0
PHP 5.3.3 with Suhosin-Patch (cli) (built: Aug 31 2010 12:09:12) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
```


----------



## beesatmsu (Aug 31, 2010)

my other server (where phpmyadmin also does not work, but no updating yet to php5.3 yet), it seems to have everything...but phpmyadmin does not work either:


```
drone# pkg_info |grep php
php5-5.2.12_1       PHP Scripting Language
php5-bz2-5.2.12_1   The bz2 shared extension for php
php5-ctype-5.2.12_1 The ctype shared extension for php
php5-dom-5.2.12_1   The dom shared extension for php
php5-exif-5.2.12_1  The exif shared extension for php
php5-extensions-1.4 A "meta-port" to install PHP extensions
php5-filter-5.2.12_1 The filter shared extension for php
php5-ftp-5.2.12_1   The ftp shared extension for php
php5-gd-5.3.2_1     The gd shared extension for php
php5-gettext-5.2.12_1 The gettext shared extension for php
php5-hash-5.2.12_1  The hash shared extension for php
php5-iconv-5.2.12_1 The iconv shared extension for php
php5-imap-5.2.12_1  The imap shared extension for php
php5-json-5.2.12_1  The json shared extension for php
php5-mbstring-5.2.12_1 The mbstring shared extension for php
php5-mcrypt-5.2.12_1 The mcrypt shared extension for php
php5-mysql-5.2.12_1 The mysql shared extension for php
php5-openssl-5.2.12_1 The openssl shared extension for php
php5-pcre-5.2.12_1  The pcre shared extension for php
php5-pdo-5.2.12_1   The pdo shared extension for php
php5-pdo_sqlite-5.2.12_1 The pdo_sqlite shared extension for php
php5-posix-5.2.12_1 The posix shared extension for php
php5-session-5.2.12_1 The session shared extension for php
php5-simplexml-5.2.12_1 The simplexml shared extension for php
php5-spl-5.2.12_1   The spl shared extension for php
php5-tokenizer-5.2.12_1 The tokenizer shared extension for php
php5-xml-5.2.12_1   The xml shared extension for php
php5-xmlreader-5.2.12_1 The xmlreader shared extension for php
php5-xmlwriter-5.2.12_1 The xmlwriter shared extension for php
php5-zip-5.2.12_1   The zip shared extension for php
php5-zlib-5.2.12_1  The zlib shared extension for php
phpMyAdmin-3.3.4    A set of PHP-scripts to manage MySQL over the web
```


----------



## gilinko (Aug 31, 2010)

If it gives a blank page, then something has gone wrong and an error will have been written to an error log. Somewhere. 

Once you have deleted php you need to reconfigure it so it picks up the changes from the makefile and not simply run with the old configuration. With portmaster this is easily done by including the _--force-config_ option when rebuilding lang/php[5|52] and all ports that depend on it. 

Also if you delete ANY php extensions, be sure to remove them from the /usr/local/etc/php/extensions.ini file to, which is the most common source of start-up errors.


----------



## beesatmsu (Aug 31, 2010)

firefox gave a blank page, but if I view source, it has nothing. 
I tried lynx and it says 


```
lynx: Can't access startfile http://xxx.com:8818/
```

but xxx.com works fine, I have mapped 8818 to myphpadmin. 

it worked fine before...so nothing with with httpd.conf file.


----------



## beesatmsu (Sep 1, 2010)

I did successfully install php5-extensions, after

```
138  16:02   pkg_delete -f kdelibs-4.3.1_5
   140  16:03   portupgrade -rf kdelibs-4.4.5
   141  16:03   portupgrade -aRv
   142  16:04   portupgrade -aRv -O
```

and 4 hrs. 

now [CMD=""]php index.php[/CMD]gives no error, 

but accessing the myphpadmin directory is still blank, and DOES give an error in the log:

```
[Tue Aug 31 20:01:27 2010] [notice] child pid 83026 exit signal Segmentation fault (11)
```

but my wordpress site was now also blank, it used to say php was not compiled with apache module turned on, even it was on.


----------



## beesatmsu (Sep 1, 2010)

making progress..after restarting apache (I thought I did),

now the login screen shows up for phpmyadmin, but there is a message below
that says:

```
Cannot load mcrypt extension. Please check your PHP configuration.
```

probably need to tweak the php configuration...did not see this option though.


----------



## beesatmsu (Sep 1, 2010)

I put the mcrypt line in 


```
/usr/local/etc/php/extensions.ini
```

restarted apache, still the same error...


----------



## beesatmsu (Sep 1, 2010)

ok, I deinstalled php5-extensions, reconfigure it, and reinstalled...now the error message is gone.

but I cannot log in as root. I thought the password should be same as the mysql root.


----------



## beesatmsu (Sep 1, 2010)

now it is a matter of configuring it right so I can log in....last time the configuration was minimal..(not as complicated as this version)...


----------



## beesatmsu (Dec 3, 2010)

did setup on the server and now phpmyadmin is working...

doing the same thing now on the main server {the same problem...then remembered I "figured" it out before but totally forgetten! good these posts are still here...

do not even know what "portupgrade -aRv -O" is doing...

but it shuts down my wordpress but html pages are working...it started last night at 6 pm and still going...(was 4 hours last time)...


----------



## codeWarrior (Dec 3, 2010)

If you want *REAL* control of your database development -- I suggest something other than phpPgAdmin... 

If you are interested in a postgreSQL desktop application that is NOT web-based -- and behaves like Microsoft's SQL Server Management Studio, MySQL WorkBench or most of the other SQL database admin interfaces you should take a look at PgAdmin III http://www.pgadmin.org/visualtour12.php

I've been using postgreSQL for 9 years now and IMHO: this is the *BEST* way to do your database development and maintenance.


----------

