PHP problem

Hi frnds

         I installed phpmyadmin for OTRS but when ever i tried to open the phpMyAdmin-2.6.2/index.php page i m getting the following error


       "    urldecode the db name if \(isset\($lightm_db\)\) \{ // no longer urlencoded because of html entities in the db name // $db = urldecode\($lightm_db\); $db = $lightm_db; unset\($lightm_db\); \} $url_query = PMA\_generate\_common_url\(isset\($db\) ? $db : ''\); header\('Content-Type: text/html; charset=' . $GLOBALS['charset']\); require_once\('./libraries/relation.lib.php'\); $cfgRelation = PMA_getRelationsParam\(\); if \($cfg['QueryHistoryDB'] && $cfgRelation['historywork']\) \{ PMA_purgeHistory\($cfg['Server']['user']\); \} $phpmain_hash = md5\($cfg['PmaAbsoluteUri']\); $phpmain\_hash_js = time\(\); ?>  0\) \{ PMA_availableDatabases\(\); // this function is defined in "common.lib.php" \} else \{ $num_dbs = 0; \} if \($num_dbs > 1\) \{ if \($cfg['LeftFrameLight']\) \{ $query\_frame_height \+= 20; \} \} if \($cfg['QueryFrame']\) \{ /* Will we show list of servers? */ if \($cfg['LeftDisplayServers'] && $cfg['DisplayServersList'] && count\($cfg['Servers']\) > 1\) \{ $query\_frame_height \+= \(count\($cfg['Servers']\) \+ 1\)*15; \} if \($cfg['QueryFrameJS']\) \{ echo '' . "\\n"; echo "\\n"; echo '  ".


     can any one help me out for solving the problem.

                                     Mit

Does your Web server run other PHP scripts correctly? Seems like it doesn't, because it outputs PHP code. Or did you corrupt the config.inc.php so syntax errors occur?

Ya u r write non of my php scripts is working.But my config.inc.php is working fine what else i had to do.

            Mit

Except PHP code, are there any error messages? The text you quoted did not have any error messages.

hi bro

    this is the error message i m getting for the file config.inc.php i m running this message in the Mozilla browser i.e "  file:///home/mit/phpMyAdmin-2.6.2/config.inc.php "

"
= 4.3.0) $cfg['Servers'][$i]['controluser'] = 'otrs'; // MySQL control user settings // (this user must have read-only $cfg['Servers'][$i]['controlpass'] = 'otrs'; // access to the "mysql/user" // and "mysql/db" tables). // The controluser is also // used for all relational // features (pmadb) $cfg['Servers'][$i]['auth_type'] = 'http'; // Auethentication method (config, http or cookie based)? $cfg['Servers'][$i]['user'] = 'root'; // MySQL user $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only // this db is displayed in left frame // It may also be an array of db-names, where sorting order is relevant. $cfg['Servers'][$i]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname $cfg['Servers'][$i]['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features // (see scripts/create_tables.sql) // - leave blank for no support // DEFAULT: 'phpmyadmin' $cfg['Servers'][$i]['bookmarktable'] = ''; // Bookmark table // - leave blank for no bookmark support // DEFAULT: 'pma_bookmark' $cfg['Servers'][$i]['relation'] = ''; // table to describe the relation between links (see doc) // - leave blank for no relation-links support // DEFAULT: 'pma_relation' $cfg['Servers'][$i]['table_info'] = ''; // table to describe the display fields // - leave blank for no display fields support // DEFAULT: 'pma_table_info' $cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF schema // - leave blank for no PDF schema support // DEFAULT: 'pma_table_coords' $cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf // - leave blank if you don't want to use this // DEFAULT: 'pma_pdf_pages' $cfg['Servers'][$i]['column_info'] = ''; // table to store column information // - leave blank for no column comments/mime types // DEFAULT: 'pma_column_info' $cfg['Servers'][$i]['history'] = ''; // table to store SQL history // - leave blank for no SQL query history // DEFAULT: 'pma_history' $cfg['Servers'][$i]['verbose_check'] = TRUE; // set to FALSE if you know that your pma_* tables // are up to date. This prevents compatibility // checks and thereby increases performance. $cfg['Servers'][$i]['AllowRoot'] = TRUE; // whether to allow root login $cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults = array(); $i++; $cfg['Servers'][$i]['host'] = ''; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['compress'] = FALSE; $cfg['Servers'][$i]['controluser'] = ''; $cfg['Servers'][$i]['controlpass'] = ''; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['only_db'] = ''; $cfg['Servers'][$i]['verbose'] = ''; $cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql $cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark' $cfg['Servers'][$i]['relation'] = ''; // 'pma_relation' $cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info' $cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords' $cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages' $cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info' $cfg['Servers'][$i]['history'] = ''; // 'pma_history' $cfg['Servers'][$i]['verbose_check'] = TRUE; $cfg['Servers'][$i]['AllowRoot'] = TRUE; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] = array(); $i++; "

    for calender.php i m getting this error msg      "      ' . "\\n"; \} ?>   "
 and for some files its displaying nothing that is blank page is opening.
 thanking u for the support.

                                      Mit

Hey ... you don't load PHP scripts this way. Using a URL with the file:// scheme simply means opening them, but PHP scripts in this case won't run. No wonder they don't run at all.

You need to set up a Web server. Put your scripts somewhere where the Web server will find it and enable PHP at the Web server. Finally you need to use a URL at the browser like

http://localhost/~user/phpMyAdmin/index.php

(This is just an example)

The script will load if the Web server is set correctly (and your PHPMyAdmin correctly configured)

Hi bro,

  Now my phpmyadmin has started as u have written it and its showing me the login page.But the problem is whenever 

i click on the links it is showing me this error.

Not Found

1.The requested URL /PhpMyAdmin-2.6.2-pl1/server_variables.php was not found on this server.
Apache/2.0.46 (Red Hat) Server at 192.168.10.20 Port 80

The requested URL /PhpMyAdmin-2.6.2-pl1/left.php was not found on this server.
Apache/2.0.46 (Red Hat) Server at 192.168.10.20 Port 80

Thanks for the Help.

 Mit

I remember there is a setting in the phpMyAdmin config.inc.php which you need to modify to specify the absolute URL. Go and update it. It seems to be incorrectly set.

hi bro

thanks for the help. My phpmyadmin is working fine. thanks for the support.Now i m trying OTRS instance. Lets see hoping for the best.

    Mit