Apache 2.4 + PHP 7.1 + MariaDB, pasta com permissao de escrita mas o apache ou php nao reconhece
Olá pessoal, estou tentando resolver esse problema faz dias e nada, já tentei mudar o proprietário e grupo da pasta, permissão 777, já tentei desativar o suEXEC, já fiz instalação lamp em 5 centos limpos pra ter certeza, tentei usar apache+php+mariadb em versões diferente e nada, no vertrigo e no xampp o site funciona sem erro!! apenas no httpd e nginx em linux nao funciona =(
aqui esta o problema:
Warning: fopen(data/tmp/ConfigServers.cache.php): failed to open stream: Permission denied in /var/www/html/lib/Flux.php on line 275
Critical Error
An error was encountered during the lifetime of the application.
This could be due to a variety of problems, such as a bug in the application.
However, normally it is caused by misconfiguration.
Exception Details
Error: Flux_Error
Message: Failed to write data/tmp/ConfigServers.cache.php permission error or data/tmp not exist in Flux::parseConfigFile()
File: /var/www/html/lib/Flux.php:236
File Line Function/Method
/var/www/html/lib/Flux.php 277 Flux::raise()
/var/www/html/lib/Flux.php 336 Flux::parseConfigFile()
/var/www/html/lib/Flux.php 121 Flux::parseServersConfigFile()
/var/www/html/index.php 69 Flux::initialize()
Exception Trace As String
#0 /var/www/html/lib/Flux.php(277): Flux::raise('Failed to write...')
#1 /var/www/html/lib/Flux.php(336): Flux::parseConfigFile('config/servers....')
#2 /var/www/html/lib/Flux.php(121): Flux::parseServersConfigFile('config/servers....')
#3 /var/www/html/index.php(69): Flux::initialize(Array)
#4 {main}
Parte do codigo do flux.php:
public static function parseConfigFile($filename, $cache=true)
{
$basename = basename(str_replace(' ', '', ucwords(str_replace(array('/', '\\', '_'), ' ', $filename))), '.php').'.cache.php';
$cachefile = FLUX_DATA_DIR."/tmp/$basename";
if ($cache && file_exists($cachefile) && filemtime($cachefile) > filemtime($filename)) {
return unserialize(file_get_contents($cachefile, null, null, 28));
}
else {
ob_start();
// Uses require, thus assumes the file returns an array.
$config = require $filename;
ob_end_clean();
// Cache config file.
$cf = self::parseConfig($config);
if ($cache) {
$fp = fopen($cachefile, 'w'); // <<< LINHA 275 onde esta o erro
if ( !$fp ){
self::raise("Failed to write ".$cachefile." permission error or data/tmp not exist in Flux::parseConfigFile()");
}
fwrite($fp, '<?php exit("Forbidden."); ?>');
fwrite($fp, $s=serialize($cf), strlen($s));
fclose($fp);
}
return $cf;
}
}Discussão (1)
Carregando comentários...