понеділок, 2 квітня 2012 р.

PHP Warning php strtotime file_put_contents permission denied Joomla "Возникла ошибка! Не могу открыть конфигурационный файл на запись!"

PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /var/www/vhosts/site.com/html/libraries/joomla/utilities/date.php on line 56, referer: http://www.site.com/administrator/index.php?option=com_config

[Mon Apr 02 11:42:40 2012] [error] [client ...] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Helsinki' for 'EEST/3.0/DST' instead in /var/www/vhosts/site.com/html/libraries/joomla/utilities/date.php on line 250, referer: http://www.site.com/administrator/index.php?option=com_config

Допомогло

/etc/php.ini

Було
[Date]
; Defines the default timezone used by the date functions
;date.timezone = ""

Стало
[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/Helsinki"

service httpd restart

[Mon Apr 02 11:46:46 2012] [error] [client ..] PHP Warning: file_put_contents(/var/www/vhosts/site.com/html/configuration.php): failed to open stream: Permission denied in /var/www/vhosts/site.com/html/libraries/joomla/filesystem/file.php on line 304, referer: http://www.site.com/administrator/index.php?option=com_config

1 find -type d -exec chmod 777 {} \;
   find -type f -exec chmod 777 {} \;

Не допомогло.Міняємо назад

find -type d -exec chmod 755 {} \;
find -type f -exec chmod 644 {} \;

2. chown -R apache:apache httpdocs

не допомогло

3. Дивимося SELinux який ключ має директорія /var/www/html

ls -Z /var/www/

drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 html


Дивимося ключ нашої папки

ls -Z /var/www/vhosts/site.com/

drwxr-xr-x. wwwuser wwwuser unconfined_u:object_r:public_content_rw_t:s0 html

міняємо на потрібний і в підлеглих директоріях -R

chcon -R -t httpd_sys_content_t /var/www/vhosts/site.com/html/

Допомогло. Доступ по ftp також лишився.



Немає коментарів:

Дописати коментар