|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Cache not within the allowed path(s):
Hello,
I'm developing a directory website and have everything in place database etc., and everything seems to work as it should, but when I enable the cache feature in my admin section I get errors such as the following once a page is accessed the second time or the page is refreshed. Code:
Warning: fopen(): open_basedir restriction in effect. File(/cache/-default-Reference.txt) is not within the allowed path(s): (/home/httpd/vhosts/webestate.ws/httpdocs:/tmp) in /home/httpd/vhosts/webestate.ws/httpdocs/includes/templates.inc.php on line 44 Warning: fopen(/cache/-default-Reference.txt): failed to open stream: Operation not permitted in /home/httpd/vhosts/webestate.ws/httpdocs/includes/templates.inc.php on line 44 Warning: fread(): supplied argument is not a valid stream resource in /home/httpd/vhosts/webestate.ws/httpdocs/includes/templates.inc.php on line 45 Warning: fclose(): supplied argument is not a valid stream resource in /home/httpd/vhosts/webestate.ws/httpdocs/includes/templates.inc.php on line 46 I've left the cache feature enabled at this time so you may experience the problem first hand at: URL. Click on any category > then refresh the page quickly (as the cacheRefresh time is set for 15 seconds to keep the site somewhat operational). I've tried the PHP in safe mode and without safe mode enabled and get the same results. I've attempted to have the script developer help me with this but they do not provide much in the way of support. The developers latest email simply stated: "Your PHP configuration does not allow us to write to the cache directory so open_basedir will need to have the cache directory or a parent directory of it in it's settings ." Which really doesn't help me much as I'm not familiar with the inner workings of a server or open_basedir. It is appears that the script needs to follow a correct path in order for the cache to function properly. I believe this can be done by editing the php.ini file but I don't know what directives to use or how to implement them. Server Type Linux Webserver Apache/2.0.50 (Fedora) PHP Version 4.3.11 MySQL Version 4.1.12 System test utilities can be checked online at: URL Thanks for any suggestions on this project. Regards, Dale T. |
|
#2
|
|||
|
|||
|
RE: Cache not within the allowed path(s):
basedir is a setting in php.ini that prevents people from accessing directories above what the server wants them to. it would prevent someone from accessing the web root directory of another site on the same computer. the caching program you are using is trying to save to the "/cache/" directory which is above your allowed directory. what you need to do is change the directory for the cache program, probably something like "cache/" (no beginning slash) or include the full path like "/home/httpd/vhosts/webestate.ws/cache/"
|
|
#3
|
|||
|
|||
|
RE: Cache not within the allowed path(s):
Hello IAmALlama,
It took a bit of detective work to find the cache php files but I think I've got things corrected now. Any cache referenced within the script was coded "/cache/" with the beginning forward slash. I recoded any reference I found to read "cache/" and it appears that the cache now works as it should. You prompt attention to this matter and knowledgeable input is greatly appreciated indeed. Best regards, Dale T. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Cache not within the allowed path(s): |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|