Could someone take a look at my site and tell me what is wrong? I think it is PHP. I am using: http://www.000webhost.com/order.php to host my site. And I am trying to use http://proarcadescript.com/ with it to make an RSS feed flash gaming site. For some reason I am getting a bunch of PHP errors. Please help! Sorry. Here is the link for the website: http://thethoughttreasury.host56.com/ The PHP Errors are displaying on the page because I set error to show.
Sorry. Here is the link for the website: http://thethoughttreasury.host56.com/ The PHP Errors are displaying on the page because I set error to show.
Well, it clearly says what the error is --> is not within the allowed path. Change it so it actually is in a allowed path Well, it can't open it, probably because not within the allowed path...
You need to get 000webhost to enable open_basedir in there php.ini. I think this may be the issue here. I don't think they will though. Especially considering they are a free webhost. Thanks, VPSVolt.
it looked free account? you can either use free cpanel hosting with all features includes cgi access and much more May be it will solved your problem.
I emailed them about open_basedir and they said: The PHP open_basedir feature is enabled by default and can not be disabled for security reasons. So I guess it is not that the open_basedir is disabled. Any other ideas? Please help! Tell me if you need any more information. This is a link to my sites PHP info: http://thethoughttreasury.host56.com/test.php Someone said I should change: In your class.Cache.php file, there might be a code defining your document root. The document root defined in php configuration is '/usr/local/apache/htdocs', while your actual document root is '/home/account#/public_html' directory. So, you need to change your code something like: From: $doc_root= $_SERVER['DOCUMENT_ROOT']; To: $doc_root = dirname(_FILE_); Is this right? If so what do I change in this script? This is my Class.cache file: <?php /************************************************** ***************** / ProArcadeScript / File description: / Implementation of the CCache class / /************************************************** *****************/ //----------------------------------------------------------------------------------------- // helper function which recursively removes a directory // // to use this function to totally remove a directory, write: // remove_directory('path/to/directory/to/delete'); // to use this function to empty a directory, write: // remove_directory('path/to/full_directory',TRUE); //----------------------------------------------------------------------------------------- function remove_directory( $directory, $empty=FALSE ) { if(substr($directory,-1) == '/') $directory = substr($directory,0,-1); if(!file_exists($directory) || !is_dir($directory)) return FALSE; elseif(is_readable($directory)) { $handle = opendir($directory); while (FALSE !== ($item = readdir($handle))) { if($item != '.' && $item != '..') { $path = $directory.'/'.$item; if(is_dir($path)) remove_directory($path); else unlink($path); } } closedir($handle); if($empty == FALSE) if(!rmdir($directory)) return FALSE; } return TRUE; } //----------------------------------------------------------------------------------------- // Class CCache //----------------------------------------------------------------------------------------- class CCache { var $ttl = 2000; // Time to leave, seconds var $cache_root = ''; var $enabled = false; //----------------------------------------------------------------------------------------- function CCache() { $path = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['cSite']['sSiteRoot'] . 'cache'; $this->ttl = $GLOBALS['cSite']['cacheTTL']; if( !is_dir($path) ) { mkdir( $path, 0775 ); $file = fopen( $path . '/index.html', 'w' ); if( $file ) { fwrite( $file, ' ' ); fclose( $file ); } } $this->cache_root = "$path/"; $this->enabled = $GLOBALS["cSite"]["bCache"]; } //----------------------------------------------------------------------------------------- function get() { if( !$this->enabled ) return false; $name = $_SERVER['REQUEST_URI']; $ext = $_SESSION['user']; $hash = sha1($name); $hash_ext = sha1($ext); $cache_dir = substr( $hash, 0, 5 ); $cache_subdir = substr( $hash, 5, 5 ); $time = date( 'U' ); $cache_file = $this->cache_root . $cache_dir . '/' . $cache_subdir . '/' . $hash . '.' . $hash_ext; if( file_exists($cache_file) && ($time - filemtime($cache_file) < $this->ttl) ) { $file = fopen( $cache_file, 'r' ); if( $file ) { $data = fread( $file, filesize($cache_file) ); fclose( $file ); return unserialize( $data ); } else return false; } else return false; } //----------------------------------------------------------------------------------------- function write( $data ) { if( !$this->enabled ) return true; $name = $_SERVER['REQUEST_URI']; $ext = $_SESSION['user']; $hash = sha1($name); $hash_ext = sha1($ext); $cache_dir = $this->cache_root . '/' . substr( $hash, 0, 5 ); $cache_subdir = $cache_dir . '/' . substr( $hash, 5, 5 ); if( !is_dir($cache_dir) ) mkdir( $cache_dir, 0775 ); if( !is_dir($cache_subdir) ) mkdir( $cache_subdir, 0775 ); $file = fopen( $cache_subdir.'/'.$hash.'.'.$hash_ext, 'w' ); if( $file ) { $res = fwrite( $file, serialize($data) ); fclose( $file ); return $res; } return false; } //----------------------------------------------------------------------------------------- function delete( $what, $id, $title ) { switch( $what ) { case 'game': $name = GameURL( $id, $title ); $hash = sha1($name); $cache_dir = (substr($this->cache_root,-1) == '/') ? substr( $this->cache_root, 0, -1 ) : $this->cache_root; $cache_dir .= '/' . substr( $hash, 0, 5 ) . '/' . substr( $hash, 5, 5 ); remove_directory( $cache_dir ); break; case 'cat': $name = CategoryURL( $title ); $hash = sha1($name); $cache_dir = (substr($this->cache_root,-1) == '/') ? substr( $this->cache_root, 0, -1 ) : $this->cache_root; $cache_dir .= '/' . substr( $hash, 0, 5 ) . '/' . substr( $hash, 5, 5 ); remove_directory( $cache_dir ); case 'home': $name = $GLOBALS['cSite']['sSiteRoot']; $hash = sha1($name); $cache_dir = (substr($this->cache_root,-1) == '/') ? substr( $this->cache_root, 0, -1 ) : $this->cache_root; $cache_dir .= '/' . substr( $hash, 0, 5 ) . '/' . substr( $hash, 5, 5 ); remove_directory( $cache_dir ); break; case 'page': $name = $GLOBALS['cSite']['sSiteRoot'] . 'docs/' . $id; $hash = sha1($name); $cache_dir = (substr($this->cache_root,-1) == '/') ? substr( $this->cache_root, 0, -1 ) : $this->cache_root; $cache_dir .= '/' . substr( $hash, 0, 5 ) . '/' . substr( $hash, 5, 5 ); remove_directory( $cache_dir ); break; default: break; } } //----------------------------------------------------------------------------------------- function clear_cache() { // empty the cache dir remove_directory( $this->cache_root, TRUE ); } }//class ?>