LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Existing configuration file (./config.inc.php) is not readable. (https://www.linuxquestions.org/questions/linux-newbie-8/existing-configuration-file-config-inc-php-is-not-readable-4175504469/)

RustyBon 05-09-2014 10:35 AM

Existing configuration file (./config.inc.php) is not readable.
 
Hi everyone would like some help with code to fix permissions php. I installed xampp everything fine checked in localhost could get into phpmyadmin. Then I followed some instructions for security now get this error Existing configuration file (./config.inc.php) is not readable. I am using Linux Mint 16.
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are secured by a password.
XAMPP: Do you want to change the password anyway? [no] no
XAMPP: MySQL is not accessable via network. Good.
XAMPP: MySQL has to run before I can check the security.
XAMPP: MySQL has to run before I can check the security.
XAMPP: MySQL has a root passwort set. Fine! :)
XAMPP: ProFTPD has a new FTP password. Great!
XAMPP: Do you want to change the password anyway? [no]

frankbell 05-09-2014 09:14 PM

Could you please provide more information. For example, what is the path to config.inc.php, how do you know it is not readable, what precise error messages have you received, and how have you tried to read the file?

I have XAMPP installed on this system with security enabled. I just checked the file /opt/lampp/phpmyadmin/setup/frames/config.inc.php. It is readable on my system.

Code:

$ cat config.inc.php
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Config file view and save screen
 *
 * @package phpMyAdmin-setup
 */

if (!defined('PHPMYADMIN')) {
    exit;
}

/**
 * Core libraries.
 */
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
check_config_rw($config_readable, $config_writable, $config_exists);
?>
<h2><?php echo __('Configuration file') ?></h2>
<?php display_form_top('config.php'); ?>
<input type="hidden" name="eol" value="<?php echo htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) ?>" />
<?php display_fieldset_top('', '', null, array('class' => 'simple')); ?>
<tr>
    <td>
        <textarea cols="50" rows="20" name="textconfig" id="textconfig" spellcheck="false"><?php
            echo htmlspecialchars(ConfigGenerator::getConfigFile())
        ?></textarea>
    </td>
</tr>
<tr>
    <td class="lastrow" style="text-align: left">
        <input type="submit" name="submit_download" value="<?php echo __('Download') ?>" class="green" />
        <input type="submit" name="submit_save" value="<?php echo __('Save') ?>"<?php if (!$config_writable) echo ' disabled="disabled"' ?> />
    </td>
</tr>
<?php
display_fieldset_bottom_simple();
display_form_bottom();
?>

"locate" returns nothing on permissions.php on my system. Could you provide more information about that file, also?

RustyBon 05-10-2014 12:39 AM

I got the error when I went clicked on tools phpmyadmin. the path is correct opt/lampp/phpmyadmin/setup/frames/
here is config file
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Config file view and save screen
*
* @package PhpMyAdmin-Setup
*/

if (!defined('PHPMYADMIN')) {
exit;
}

/**
* Core libraries.
*/
require_once './libraries/config/FormDisplay.class.php';
require_once './setup/lib/index.lib.php';
require_once './setup/lib/ConfigGenerator.class.php';

$config_readable = false;
$config_writable = false;
$config_exists = false;
PMA_checkConfigRw($config_readable, $config_writable, $config_exists);
echo '<h2>' . __('Configuration file') . '</h2>';

PMA_displayFormTop('config.php');
echo '<input type="hidden" name="eol" value="'
. htmlspecialchars(PMA_ifSetOr($_GET['eol'], 'unix')) . '" />';
PMA_displayFieldsetTop('config.inc.php', '', null, array('class' => 'simple'));
echo '<tr>';
echo '<td>';
echo '<textarea cols="50" rows="20" name="textconfig" '
. 'id="textconfig" spellcheck="false">';
echo htmlspecialchars(ConfigGenerator::getConfigFile($GLOBALS['ConfigFile']));
echo '</textarea>';
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td class="lastrow" style="text-align: left">';
echo '<input type="submit" name="submit_download" value="'
. __('Download') . '" class="green" />';
echo '<input type="submit" name="submit_save" value="' . __('Save') . '"';
if (!$config_writable) {
echo ' disabled="disabled"';
}
echo '/>';
echo '</td>';
echo '</tr>';

PMA_displayFieldsetBottomSimple();
PMA_displayFormBottom();
?>


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