Some Errors...

Russ

Well-known member
Moved directories recently, not sure if this caused it just noticed it afterwards.

I'm trying to create a new style and I get this error message:

Code:
Server Error
file_put_contents(/home/xxxxxx/public_html/internal_data/templates/S.10,L.1,resource_category_sidebar_list.php) [[URL='http://xxxx.com/function.file-put-contents']function.file-put-contents[/URL]]: failed to open stream: Permission denied
 
XenForo_Application::handlePhpError()
file_put_contents() in XenForo/Template/FileHandler.php at line 95
XenForo_Template_FileHandler->_saveTemplate() in XenForo/Template/FileHandler.php at line 50
XenForo_Template_FileHandler::save() in XenForo/Model/Template.php at line 1116
XenForo_Model_Template->compileAndInsertParsedTemplate() in XenForo/Model/Template.php at line 1029
XenForo_Model_Template->compileTemplateInStyleTree() in XenForo/Model/Template.php at line 983
XenForo_Model_Template->compileNamedTemplateInStyleTree() in XenForo/Model/Template.php at line 923
XenForo_Model_Template->compileAllTemplates() in XenForo/CacheRebuilder/Template.php at line 55
XenForo_CacheRebuilder_Template->rebuild() in XenForo/ControllerHelper/CacheRebuild.php at line 26
XenForo_ControllerHelper_CacheRebuild->rebuildCache() in XenForo/ControllerAdmin/Tools.php at line 78
XenForo_ControllerAdmin_Tools->actionCacheRebuild() in XenForo/FrontController.php at line 313
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
[*]XenForo_FrontController->run() in /home/xxxxxx/public_html/admin.php at line 1

Then tried running file health check:

Code:
Server Error
file_get_contents(install/data/style_properties.xml) [[URL='http://xxxx.com/function.file-get-contents']function.file-get-contents[/URL]]: failed to open stream: Permission denied
XenForo_Application::handlePhpError()
file_get_contents() in XenForo/Helper/Hash.php at line 66
XenForo_Helper_Hash::compareHashes() in XenForo/ControllerAdmin/Tools.php at line 154
XenForo_ControllerAdmin_Tools->actionFileCheck() in XenForo/FrontController.php at line 313
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/xxxxx/public_html/admin.php at line 13


Rest of the site seems to be running fine, help? :(


See it here:

http://xenforo.com/community/threads/error-rebuilding-templates.31451/

No answer was posted though, also data and internal_data is set to 777
 
It's probably a lack of permissions in the subdirectories inside of data and internal_data. You need to recursively set permissions for those directories.

If you have shell access then try running these commands to recursively set permissions in those directories:

Code:
chmod -R 777 data

chmod -R 777 internal_data

You might also try 755 permissions. Depending on how PHP is installed, 755 may still be writable. I have seen some server configurations throw errors with 777.

_____

If you are running APC then you might have to restart the server after moving the files to a new directory. The opcode cache sometimes fails to update which can create problems with internal paths. Restarting the server will clear the opcode cache.
 
Well we tried 777 for data/internal_data and all it's sub folders, as well as 755.

We also run APC which we rebooted as well :(, any other ideas the errors are still alive and kicking
 
In combination with the permission bits, the owner might be relevant. If the permissions are 777 then it doesn't matter. But with 755 permissions an incorrect owner can cause problems.

I use this command to set the owner bits. Find another file or directory with the correct owner and then copy its owner bits with this command:

Rich (BB code):
chown --recursive --reference=/path/to/correct/owner/ /path/to/target/dir/

It lets you copy the owner bits from one directory to another. And it does it recursively through all subdirectories.
 
Top Bottom