LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-07-2009, 10:52 AM   #1
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Rep: Reputation: 17
all i see is text when trying to login to phpmyadmin and squirelmail :?


Hi,

I installed phpmyadmin and squirelmail and configured it according to howtoforge perfect fedora server tutorial. When I try to access the web interface of phpmyadmin using http://192.168.1.10/phpMyAdmin all I get this bunch of codes not the interface :? here is what comes up:

Code:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * forms frameset
 *
 * @version $Id: index.php 12022 2008-11-28 14:35:17Z nijel $
 * @uses    $GLOBALS['strNoFrames']
 * @uses    $GLOBALS['cfg']['QueryHistoryDB']
 * @uses    $GLOBALS['cfg']['Server']['user']
 * @uses    $GLOBALS['cfg']['DefaultTabServer']     as src for the mainframe
 * @uses    $GLOBALS['cfg']['DefaultTabDatabase']   as src for the mainframe
 * @uses    $GLOBALS['cfg']['NaviWidth']            for navi frame width
 * @uses    $GLOBALS['collation_connection']    from $_REQUEST (grab_globals.lib.php)
 *                                              or common.inc.php
 * @uses    $GLOBALS['available_languages'] from common.inc.php (select_lang.lib.php)
 * @uses    $GLOBALS['db']
 * @uses    $GLOBALS['charset']
 * @uses    $GLOBALS['lang']
 * @uses    $GLOBALS['text_dir']
 * @uses    $_ENV['HTTP_HOST']
 * @uses    PMA_getRelationsParam()
 * @uses    PMA_purgeHistory()
 * @uses    PMA_generate_common_url()
 * @uses    PMA_VERSION
 * @uses    session_write_close()
 * @uses    time()
 * @uses    PMA_getenv()
 * @uses    header()                to send charset
 * @package phpMyAdmin
 */

/**
 * Gets core libraries and defines some variables
 */
require_once './libraries/common.inc.php';

/**
 * Includes the ThemeManager if it hasn't been included yet
 */
require_once './libraries/relation.lib.php';

// free the session file, for the other frames to be loaded
session_write_close();

// Gets the host name
if (empty($HTTP_HOST)) {
    if (PMA_getenv('HTTP_HOST')) {
        $HTTP_HOST = PMA_getenv('HTTP_HOST');
    } else {
        $HTTP_HOST = '';
    }
}


// purge querywindow history
$cfgRelation = PMA_getRelationsParam();
if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) {
    PMA_purgeHistory($GLOBALS['cfg']['Server']['user']);
}
unset($cfgRelation);


/**
 * pass variables to child pages
 */
$drops = array('lang', 'server', 'convcharset', 'collation_connection',
    'db', 'table');

foreach ($drops as $each_drop) {
    if (! array_key_exists($each_drop, $_GET)) {
        unset($_GET[$each_drop]);
    }
}
unset($drops, $each_drop);

if (! strlen($GLOBALS['db'])) {
    $main_target = $GLOBALS['cfg']['DefaultTabServer'];
} elseif (! strlen($GLOBALS['table'])) {
    $_GET['db'] = $GLOBALS['db'];
    $main_target = $GLOBALS['cfg']['DefaultTabDatabase'];
} else {
    $_GET['db'] = $GLOBALS['db'];
    $_GET['table'] = $GLOBALS['table'];
    $main_target = $GLOBALS['cfg']['DefaultTabTable'];
}

$url_query = PMA_generate_common_url($_GET);

if (isset($GLOBALS['target']) && is_string($GLOBALS['target']) && !empty($GLOBALS['target']) && in_array($GLOBALS['target'], $goto_whitelist)) {
    $main_target = $GLOBALS['target'];
}

$main_target .= $url_query;

$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];


// start output
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xml:lang="<?php echo $lang_iso_code; ?>"
    lang="<?php echo $lang_iso_code; ?>"
    dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin <?php echo PMA_VERSION; ?> -
    <?php echo htmlspecialchars($HTTP_HOST); ?></title>
<meta http-equiv="Content-Type"
    content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript">
// <![CDATA[
    // definitions used in common.js
    var common_query = '<?php echo PMA_escapeJsString(PMA_generate_common_url('', '', '&'));?>';
    var opendb_url = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['DefaultTabDatabase']); ?>';
    var safari_browser = <?php echo PMA_USR_BROWSER_AGENT == 'SAFARI' ? 'true' : 'false' ?>;
    var querywindow_height = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowHeight']); ?>;
    var querywindow_width = <?php echo PMA_escapeJsString($GLOBALS['cfg']['QueryWindowWidth']); ?>;
    var collation_connection = '<?php echo PMA_escapeJsString($GLOBALS['collation_connection']); ?>';
    var lang = '<?php echo PMA_escapeJsString($GLOBALS['lang']); ?>';
    var server = '<?php echo PMA_escapeJsString($GLOBALS['server']); ?>';
    var table = '<?php echo PMA_escapeJsString($GLOBALS['table']); ?>';
    var db    = '<?php echo PMA_escapeJsString($GLOBALS['db']); ?>';
    var token = '<?php echo PMA_escapeJsString($_SESSION[' PMA_token ']); ?>';
    var text_dir = '<?php echo PMA_escapeJsString($GLOBALS['text_dir']); ?>';
    var pma_absolute_uri = '<?php echo PMA_escapeJsString($GLOBALS['cfg']['PmaAbsoluteUri']); ?>';
    var pma_text_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable'])); ?>';
    var pma_text_left_default_tab = '<?php echo PMA_escapeJsString(PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable'])); ?>';

    // for content and navigation frames

    var frame_content = 0;
    var frame_navigation = 0;
    function getFrames() {
<?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
        frame_content = window.frames[1];
        frame_navigation = window.frames[0];
<?php } else { ?>
        frame_content = window.frames[0];
        frame_navigation = window.frames[1];
<?php } ?>
    }
    var onloadCnt = 0;
    var onLoadHandler = window.onload;
    window.onload = function() {
        if (onloadCnt == 0) {
            if (typeof(onLoadHandler) == "function") {
                onLoadHandler();
            }
            if (typeof(getFrames) != 'undefined' && typeof(getFrames) == 'function') {
                getFrames();
            }
            onloadCnt++;
        }
    };
// ]]>
</script>
<script src="./js/common.js" type="text/javascript"></script>
</head>
<frameset cols="<?php
if ($GLOBALS['text_dir'] === 'rtl') {
    echo '*,';
}
echo $GLOBALS['cfg']['NaviWidth'];
if ($GLOBALS['text_dir'] === 'ltr') {
    echo ',*';
}
?>" rows="*" id="mainFrameset">
    <?php if ($GLOBALS['text_dir'] === 'ltr') { ?>
    <frame frameborder="0" id="frame_navigation"
        src="navigation.php<?php echo $url_query; ?>"
        name="frame_navigation" />
    <?php } ?>
    <frame frameborder="0" id="frame_content"
        src="<?php echo $main_target; ?>"
        name="frame_content" />
    <?php if ($GLOBALS['text_dir'] === 'rtl') { ?>
    <frame frameborder="0" id="frame_navigation"
        src="navigation.php<?php echo $url_query; ?>"
        name="frame_navigation" />
    <?php } ?>
    <noframes>
        <body>
            <p><?php echo $GLOBALS['strNoFrames']; ?></p>
        </body>
    </noframes>
</frameset>
</html>


I get the same codes when trying to access webmail instead of showing the web gui interface it shows me the codes:

Code:
<?php

/**
 * index.php
 *
 * Redirects to the login page.
 *
 * @copyright &copy; 1999-2009 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: index.php 13549 2009-04-15 22:00:49Z jervfors $
 * @package squirrelmail
 */

// Are we configured yet?
if( ! file_exists ( 'config/config.php' ) ) {
    echo '<html><body><p><strong>ERROR:</strong> Config file ' .
        '&quot;<tt>config/config.php</tt>&quot; not found. You need to ' .
        'configure SquirrelMail before you can use it.</p></body></html>';
    exit;
}

// If we are, go ahead to the login page.
header('Location: src/login.php');

?>
Can anyone please help? would appreciate it.
 
Old 10-07-2009, 11:10 AM   #2
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Do you have PHP installed on your server? Apache appears to be running since you can get to it. What distro is on this server? If it's fedora try yum install php-common.
 
Old 10-07-2009, 01:04 PM   #3
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by adm1329 View Post
Do you have PHP installed on your server? Apache appears to be running since you can get to it. What distro is on this server? If it's fedora try yum install php-common.
apache, php, mysql, php-common all installed. its fedora 10 i got.
 
Old 10-07-2009, 01:44 PM   #4
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
In your httpd.conf do you have this?

Code:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
It may be in /etc/httpd/conf.d/php.conf
If it's in php.conf make sure httpd.conf is loading the files in the conf.d directory. If it's not there add it and restart apache.
 
Old 10-07-2009, 02:38 PM   #5
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by adm1329 View Post
In your httpd.conf do you have this?

Code:
LoadModule php5_module modules/libphp5.so
AddHandler php5-script .php
AddType text/html .php
It may be in /etc/httpd/conf.d/php.conf
If it's in php.conf make sure httpd.conf is loading the files in the conf.d directory. If it's not there add it and restart apache.
ok i done that but it still dont work

look:

Code:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

#
# 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:
#
"/etc/httpd/conf.d/php.conf" 24L, 560C
 
Old 10-07-2009, 02:39 PM   #6
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
does this have anything to do with ispconfig 3?
 
Old 10-07-2009, 03:06 PM   #7
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Quote:
Originally Posted by nibraz View Post
does this have anything to do with ispconfig 3?
I wouldn't think it would have anything to do with it but I'm not familiar with it either. I'm stumped on this one, I'm guessing you installed php and apache during the install, or with yum? The only other thing I can think of is try
Code:
yum install mod_php
 
Old 10-07-2009, 04:15 PM   #8
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by adm1329 View Post
I wouldn't think it would have anything to do with it but I'm not familiar with it either. I'm stumped on this one, I'm guessing you installed php and apache during the install, or with yum? The only other thing I can think of is try
Code:
yum install mod_php
Lol its already installed. I really dont know what else to do..
 
Old 10-07-2009, 10:14 PM   #9
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
can anyone of you help me? im really stuck.
 
Old 10-08-2009, 11:48 AM   #10
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
bump
 
Old 10-08-2009, 03:08 PM   #11
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Does /var/log/httpd/error_log give you any clues as to what's going on?
 
Old 10-08-2009, 03:38 PM   #12
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by nibraz View Post
can anyone of you help me? im really stuck.
The unanswered question is whether your server supports PHP pages. To answer this question, put the following content into a file named "phpino.php":

Code:
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- Created on Mar 11, 2003 4:30:01 PM -->

<html>
   <head>
      <title>
         PHP functionality test
      </title>
   </head>

   <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<?php phpinfo() ?> 

   </body>
</html>
Put the file "phpinfo.php" in a suitable location on your HTTP server and try to access it. If a long list of PHP characteristics is shown, then PHP is supported by your server, otherwise not.

If not, configure your server to support PHP. At least you will know where the problem lies.
 
Old 10-09-2009, 07:04 PM   #13
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by lutusp View Post
The unanswered question is whether your server supports PHP pages. To answer this question, put the following content into a file named "phpino.php":

Code:
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- Created on Mar 11, 2003 4:30:01 PM -->

<html>
   <head>
      <title>
         PHP functionality test
      </title>
   </head>

   <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<?php phpinfo() ?> 

   </body>
</html>
Put the file "phpinfo.php" in a suitable location on your HTTP server and try to access it. If a long list of PHP characteristics is shown, then PHP is supported by your server, otherwise not.

If not, configure your server to support PHP. At least you will know where the problem lies.
My server does support php. I got websites that are currently running under php. And no it doesnt show any errors or anything.
 
Old 10-10-2009, 02:16 AM   #14
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
Did you install the php-mysql module (the module that allows php to talking to mysql)? I would suggest trying the following.

yum install php-mysql

If this is installed, is mysqld actually running. what is the output of the following command

/etc/init.d/mysqld status

Last edited by r3sistance; 10-10-2009 at 02:18 AM.
 
Old 10-10-2009, 03:50 PM   #15
nibraz
Member
 
Registered: Oct 2008
Posts: 205

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by r3sistance View Post
Did you install the php-mysql module (the module that allows php to talking to mysql)? I would suggest trying the following.

yum install php-mysql

If this is installed, is mysqld actually running. what is the output of the following command

/etc/init.d/mysqld status
Its already installed. Here is the output: mysqld (pid 2538) is running...

btw in the perfect fedora server tutorial it asked me to disable SElinux.. could that be the reason?
 
  


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
phpmyadmin remote login M_C Linux - Server 3 04-28-2009 08:40 AM
can't login to phpmyadmin candyman123 Linux - Software 2 05-27-2006 09:18 PM
What is the defult phpmyadmin login badgerbox76 Linux - Newbie 2 01-08-2006 03:36 PM
phpmyadmin: can not login quarry_06 Linux - Software 1 04-27-2005 11:37 AM
phpmyadmin can't login vladimir@ares Linux - Software 2 12-31-2004 04:00 AM


All times are GMT -5. The time now is 11:52 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