Last modified: 2010-05-15 15:28:17 UTC
MediaWiki was running fine on my system. When I tried to customize the file templates/xhtml_slim.pt, I have the following error appears on the webpage no matter what I do. [pear_error: message="failed to open stream: Permission denied" code=0 mode=return level=notice prefix="" info=""] Here are the file permissions which shouldn't pose any problems, but something is causing the error: -rw-rw-r-- 1 mysql games 966 Oct 5 12:35 AdminSettings.sample drwx-w---- 2 mysql games 4096 Oct 19 17:31 config -rw-rw-r-- 1 mysql games 18009 Oct 5 12:35 COPYING drwxrwxr-x 3 mysql games 4096 Oct 5 12:35 docs drwxrwxr-x 4 mysql games 4096 Oct 5 12:35 extensions -rw-rw-r-- 1 mysql games 11622 Oct 5 12:35 HISTORY drwxrwxr-x 2 mysql games 4096 Oct 5 12:55 images -rw-rw-r-- 1 mysql games 4377 Oct 5 12:35 img_auth.php drwxrwxr-x 2 mysql games 4096 Oct 19 15:20 includes -rw-rw-r-- 1 mysql games 5779 Oct 19 15:42 index.php -rw-rw-r-- 1 mysql games 2965 Oct 5 12:35 INSTALL -rw-rw-r-- 1 mysql games 4174 Oct 5 12:35 install-utils.inc drwxrwxr-x 2 mysql games 4096 Oct 5 12:35 irc drwxrwxr-x 3 mysql games 4096 Oct 5 12:35 languages -rw-rw-rw- 1 mysql games 3184 Oct 19 16:08 LocalSettings.php -rw-rw-r-- 1 mysql games 7556 Oct 5 12:35 LocalSettings.sample drwxrwxr-x 4 mysql games 4096 Oct 5 12:35 maintenance drwxrwxr-x 2 mysql games 4096 Oct 5 12:35 math drwxr-xr-x 14 mysql games 4096 Oct 19 18:56 mediawiki-1.3.7 drwxrwxr-x 3 mysql games 4096 Oct 5 12:35 PHPTAL-NP-0.7.0 -rw-rw-r-- 1 mysql games 2819 Oct 5 12:35 README -rw-rw-r-- 1 mysql games 322 Oct 5 12:35 redirect.php -rw-rw-r-- 1 mysql games 91 Oct 5 12:35 redirect.phtml -rw-rw-r-- 1 mysql games 8012 Oct 5 12:35 RELEASE-NOTES drwxrwxr-x 8 mysql games 4096 Oct 5 13:04 stylesheets drwxrwxr-x 2 mysql games 4096 Oct 19 18:14 templates -rw-rw-r-- 1 mysql games 2016 Oct 5 12:35 UPGRADE -rw-rw-r-- 1 mysql games 220 Oct 5 12:35 Version.php -rw-rw-r-- 1 mysql games 88 Oct 5 12:35 wiki.phtml Any suggestion is greatly appreciated. Thank you!
PHPTal tries to compile xhtml_slim.pt to a .php file, which it tries to store in /tmp by default. Is your apache running in a chroot-environment? Did you enable safe-mode in PHP?
You're absolutely right. I've found that once I changed the temp directory in PHPTAL-NP-0.7.0/libs/PHPTAL.php to a new temp directory and make sure that the new temp directory has been chown-ed to the webuser and chmod-ed to 777, then the problem is gone. Thank you so much!!!