SunQuest
           PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
IBM developerWorks
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old January 11th, 2007, 08:32 PM
DaleT DaleT is offline
DaleT
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Canada
Posts: 2 DaleT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 46 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old January 11th, 2007, 10:12 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 962 IAmALlama User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 5 h 35 m 26 sec
Reputation Power: 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/"

Reply With Quote
  #3  
Old January 12th, 2007, 12:47 AM
DaleT DaleT is offline
DaleT
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Canada
Posts: 2 DaleT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 46 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Cache not within the allowed path(s):


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway