# [CLOSED] phpMyAdmin - unable to read your configuration file

## Nossie

Hi,

I'm having a hell of a time getting phpmyadmin installed on my system.

software version used:

apache-2.0.54-r31

mysql-4.1.14

phpmyadmin-2.6.4_p3

I'm not using vhosts, so phpmyadmin is installed in /var/www/localhost/htdocs/phpmyadmin/

The problem:

If I point my browser to http://192.168.1.1/phpmyadmin I should get the phpmyadmin interface/page. Wat I am seeing is the following message:

 *Quote:*   

> 
> 
> phpMyAdmin - Error
> 
> phpMyAdmin was unable to read your configuration file!
> ...

 

If I click the link to the config.inc.php I get a blank page.

phpmyadmin should be able to parse the config.inc.php file, but it keeps giving me the error.

I noticed the problem after I upgraded mysql to version 4.1.14, it worked some time ago on the same box (I haven't used it for some time, so I don't know since when it is borked.)

If anyone has any idea what could be wrong, please let me know  :Smile: 

NossieLast edited by Nossie on Sun Nov 06, 2005 11:10 am; edited 1 time in total

----------

## nixnut

Moved from Portage & Programming to Networking & Security

Webserver stuff, therefore networking, thus moved here.

Make sure that the user that the apache server runs as (usually apache) has read access to the directory in which the phpmyadmin files are stored and to the files themselves of course.

----------

## Nossie

sorry, I thought I posted in Networking & Security   :Rolling Eyes: 

I have tried different access rights to the phpmyadmin dir, even apache:apache, chmod 0777 without success.

----------

## Nossie

I've made a test.php file with the following code:

```

<?php

$cfgfile_to_load = "config.inc.php";

$config_fd = fopen($cfgfile_to_load, 'r');

$result = fread($config_fd, filesize($cfgfile_to_load));

echo $result;

fclose($config_fd);

```

What you expect is to see if you open test.php is the content of the config.inc.php file.

Wat I am seeing is everything from line 65 of config.inc.php the the end of the file. For some reason the first 64 line are not displayed.

output start:

 *Quote:*   

> 
> 
> = 4.3.0) $cfg[\'Servers\'][$i][\'controluser\'] = \'pma\'; // MySQL control user settings // (this user must have read-only $cfg[\'Servers\'][$i][\'controlpass\'] = \'136175360253731585\'; // access to the \"mysql/user\" // and \"mysql/db\" tables). // The controluser is also // used for all relational // features (pmadb) $cfg[\'Servers\'][$i][\'auth_type\'] = \'config\'; // Authentication method (config, http or cookie based)? $cfg[\'Servers\'][$i][\'user\'] = \'root\'; // MySQL user $cfg[\'Servers\'][$i][\'password\'] = \'pop#123\'; // 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.
> 
> etc.
> ...

 

line 65 of config.inc.php:

```
// (requires PHP >= 4.3.0)
```

If I delete line 65 of config.inc.php (it's only a comment) the parsing starts on line 624

```
$cfg['GD2Available']          = 'auto';     // Is GD >= 2 available? Set to yes/no/auto. 'auto'
```

and the output starts with

 *Quote:*   

> = 2 available? Set to yes/no/auto. 'auto'

 

Looks like it starts reading after a '>' in the file.

I don't get it...   :Sad: 

Nossie

----------

## Nossie

I've given up.

I unmerged apache, mysql, phpmyadmin and mod_php, then I deleted all data dirs (like /va/lib/mysql) and then I emerged the packages again.

Now it works...

Nossie

----------

## ReesinG

I had the same problem. I think it is related to the magic_quotes_runtime setting.

To solve it, I have added a 

```
set_magic_quotes_runtime(0);
```

at line 87 of libraries/common.lib.php

Now phpmyadmin is working again

----------

