LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2010, 10:46 PM   #1
chobong
Member
 
Registered: Jan 2010
Posts: 90

Rep: Reputation: 15
Please help php 5.3.3 doesn't display phpmyadmin


Dear All,

I have updated my php from version 5.3.2 to version 5.3.3 on Centos OS.
And after updating, when click to phpmyadmin-URL, it displays a blank page. I tried updating phpmyadmin to latest version, it still doesn't display phpmyadmin page.
And when I clicked to http://mydomain.com/phpmyadmin/index.php, it downloaded automatically the file.

Please help me to solve this problem.
Thank you so much!
 
Old 11-23-2010, 12:17 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,643

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Hi,

You didn't say how did you upgraded and if it was working on php-5.3.2.
Anyway, I guess you miss:
Code:
AddType application/x-httpd-php .php
Regards
 
1 members found this post helpful.
Old 11-23-2010, 12:50 AM   #3
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks bathory,

PHP was working on 5.3.2 and it was upgraded with yum on Centos 5.4 when i installed php-imap
Code:
yum --enablerepo=remi install php-imap
Uhm, it's strange because other websites on the server still works fine, except phpmyadmin.
Here is my php.conf
Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
Best Regards
 
Old 11-23-2010, 01:15 AM   #4
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,498

Rep: Reputation: 90
Quote:
Originally Posted by chobong View Post
Dear All,

I have updated my php from version 5.3.2 to version 5.3.3 on Centos OS.
And after updating, when click to phpmyadmin-URL, it displays a blank page. I tried updating phpmyadmin to latest version, it still doesn't display phpmyadmin page.
And when I clicked to http://mydomain.com/phpmyadmin/index.php, it downloaded automatically the file.

Please help me to solve this problem.
Thank you so much!
What do you mean

Quote:
And when I clicked to http://mydomain.com/phpmyadmin/index.php, it downloaded automatically the file.
Do you mean you got a file download / Save Target As box, instead of the PHP generated HTML for the page?
 
Old 11-23-2010, 01:57 AM   #5
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Hi Stefan,

Yes, I got a file download / Save Target As box, instead of the PHP generated HTML for the page.
Code:
And when I clicked to http://mydomain.com/phpmyadmin/index.php, it showed a window to download index.php .
 
Old 11-23-2010, 02:25 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,643

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Hi,

So you mean that other php pages are parsed correctly except the phpmyadmin index.page? Are you sure about it? Clear your browser's cache and try to visit a simple php page to see if it works.
Because if you're prompted to save a php page, that means that the webserver does not know how to parse it.
BTW add index.php in the DirectoryIndex directive in httpd.conf, so you don't have to type index.php in the URL every time.

Re phpmyadmin, you can also check the apache error_log to see if you find any errors related to it.

Regards
 
Old 11-23-2010, 02:26 AM   #7
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,498

Rep: Reputation: 90
Ok.

What browser are you using?

If you're using IE, try Firefox or Chrome and see if the same thing happens. If it stops happening, and you see the PHP page, it probably means that the browser interprets the mime type of the file correctly.

You can also try setting the correct mime type in the directory the .php file exists in. Create a .htaccess file in the same directory as the file that is not executing "as" PHP. In this file put the following:

Code:
AddType application/x-httpd-php .xml
AddHandler application/x-httpd-php .xml
Save the .htaccess file, and see if something starts happening.

If it still misfires, also try

Code:
AddType x-httpd-php .php .htm .htm
in combination, or alone, as regards the lines above.

If you are not in a shared server environment online (e. g. you do have access to httpd.conf) you can also try putting this into httpd.conf (might be located in /usr/local/apache2/conf, or elsewhere, depending on your install):

Code:
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .html
AddType application/x-httpd-php-source .phps
</IfModule>
It sounds as if your problem most likely is that the directory you have your phpMyAdmin file in, is not considered as a directory "where" PHP should be parsed.

Have you also tried temporarily moving only the phpMyAdmin index.php file to another directory and see if starts up there? (It won't work, but if at least it starts up, it means the problem is directory based, and maybe the above approach will help - putting an .htaccess file in there with the correct statements inside it.)

Note though that since you use "upgrading" (I'm supposing this means using packages like yum or "emerging" or using .deb) the next time you upgrade you'll overwrite these changes most likely and you might have the same problem again (or different problems - this is why I -never- use yum or any form of package management if I can help it. Heard too many stories of exactly this happening what has happened to you - perfectly working things breaking suddenly after an "upgrade" for no reason at all. I do everything manually as far as I can.)

Last edited by rylan76; 11-23-2010 at 02:30 AM.
 
Old 11-23-2010, 02:33 AM   #8
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,498

Rep: Reputation: 90
Another idea - if it still doesn't work, try doing a chmod 777 on the files in the phpMyAdmin folder. E. g.

Code:
chmod -R 777 *
and see if it maybe starts parsing.
 
Old 11-23-2010, 04:12 AM   #9
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks All,

I tested with web-browsers : IE, FF, Chrome, Safari, Opera. All is not ok.
I tested with .htaccess and edit in php.conf, but the result is same.
I tried moving index.php to another folder, it shows some errors (so index.php file was parsed).
And chmod 777 for phpmyadmin, it shows
Quote:
Wrong permissions on configuration file, should not be world writable!
And there is a strange when I use this code on .php file (just testing)
Code:
$v_query = "$_REQUEST[a], $_REQUEST[b]";
...
The file .php will not display anything.

But when I modify it to
Code:
$v_query = $_REQUEST['a'];
$v_query .= $_REQUEST['b'];
...
It's OK @.@ . I don't know why... Maybe I have to set a parameter on php.ini ?

Quote:
Note though that since you use "upgrading" (I'm supposing this means using packages like yum or "emerging" or using .deb) the next time you upgrade you'll overwrite these changes most likely and you might have the same problem again (or different problems - this is why I -never- use yum or any form of package management if I can help it. Heard too many stories of exactly this happening what has happened to you - perfectly working things breaking suddenly after an "upgrade" for no reason at all. I do everything manually as far as I can.)
Thanks so much for your useful advice.

Last edited by chobong; 11-23-2010 at 04:17 AM.
 
Old 11-23-2010, 04:20 AM   #10
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Quote:
Re phpmyadmin, you can also check the apache error_log to see if you find any errors related to it.
There is not any error on error_log
 
Old 11-23-2010, 05:08 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,643

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Quote:
There is not any error on error_log
You can set:
Code:
display_errors = On
in php.ini, restart apache and see if you get any php errors on your browser.
 
Old 11-23-2010, 08:01 PM   #12
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Hi bathory

Thanks, here is the error in error_log file
Code:
[Tue Nov 23 19:13:38 2010] [notice] child pid 19725 exit signal Segmentation fault (11)
[Wed Nov 24 10:14:45 2010] [notice] child pid 19721 exit signal Segmentation fault (11)
[Wed Nov 24 10:14:46 2010] [notice] child pid 18440 exit signal Segmentation fault (11)
[Wed Nov 24 10:15:03 2010] [notice] child pid 19720 exit signal Segmentation fault (11)
[Wed Nov 24 10:15:10 2010] [notice] child pid 23475 exit signal Segmentation fault (11)
[Wed Nov 24 10:23:56 2010] [notice] child pid 19718 exit signal Segmentation fault (11)
[Wed Nov 24 10:24:05 2010] [notice] child pid 20899 exit signal Segmentation fault (11)
[Wed Nov 24 10:24:07 2010] [notice] child pid 23481 exit signal Segmentation fault (11)
[Wed Nov 24 10:38:19 2010] [notice] child pid 15172 exit signal Segmentation fault (11)
[Wed Nov 24 10:40:17 2010] [notice] child pid 19722 exit signal Segmentation fault (11)
 
Old 11-23-2010, 08:27 PM   #13
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Put a CoreDumpDirectory directive into httpd.conf to make Apache writes core files, after that try to debug with gdb. You also can start Apache like this `strace -o /tmp/apache.strace /etc/init.d/httpd start` and look at the strace file to see what happen.
 
Old 11-23-2010, 10:21 PM   #14
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks quanta

After I debug with gdb
Code:
(gdb) where
#0  0x043bf140 in zend_hash_find () from /etc/httpd/modules/libphp5.so
#1  0x0440e429 in ?? () from /etc/httpd/modules/libphp5.so
#2  0x04410b3f in ?? () from /etc/httpd/modules/libphp5.so
#3  0x043d7b7a in execute () from /etc/httpd/modules/libphp5.so
#4  0x043b1a2d in zend_execute_scripts () from /etc/httpd/modules/libphp5.so
#5  0x0435b088 in php_execute_script () from /etc/httpd/modules/libphp5.so
#6  0x0443e380 in ?? () from /etc/httpd/modules/libphp5.so
#7  0x002ada4d in ap_run_handler ()
#8  0x002b13f8 in ap_invoke_handler ()
#9  0x002bd50e in ap_process_request ()
#10 0x002ba2af in ?? ()
#11 0x002b592d in ap_run_process_connection ()
#12 0x002b5a2c in ap_process_connection ()
#13 0x002c1eb4 in ?? ()
#14 0x002c21c1 in ?? ()
#15 0x002c229a in ?? ()
#16 0x002c2dfb in ap_mpm_run ()
#17 0x00299157 in main ()
(gdb)
I really don't understand this output... The issue is libphp5.so ?
Should I reinstall php? Because I upgraded to a latest php version by yum.
 
Old 11-24-2010, 03:14 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,643

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Hi,

How did you get these errors? In a previous post you said there are no errors in error_log.
I've seen these segfaults whenever I update php, until I restart apache. I guess this is because the previous libphp5.so gets overwritten by the new one while apache is still running and using the old one. Not to mention that php in general works, except phpMyadmin!!!

Anyway, if this happens to you even after restarting apache, uninstalling and reinstalling php could work. I guess that every php extension you use (like php-imap) get also upgraded by yum
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL (phpMyAdmin) & PHP iWant2Know Programming 5 08-24-2010 03:44 PM
Konqueror and phpMyAdmin--opens in Kwrite, won't display PHP hindenbergbaby Linux - Software 20 06-27-2006 11:27 PM
Good PHP tools like phpmyadmin... wwnexc Linux - Software 4 10-09-2005 01:56 PM
mysql/php/phpmyadmin/utf8 kenji1903 Linux - Software 6 09-03-2005 06:36 AM
Can't get phpmyadmin to work, php works dfuse Linux - Networking 2 12-05-2003 02:22 AM


All times are GMT -5. The time now is 02:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration