FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP Fatal Error (Issue Resolved)





Ghost900
I have a small PHP problem in my PHPBB forum that just appeared recently and I havn't done anything so I am assuming it is due to the server move. Let me know if I am crazy.

Here is my error:

Quote:
Code:
Fatal error: Not able to open ./cache/data_global.php in /home/ghost900/domains/guildwarstemple.com/public_html/forum/includes/acm/acm_file.php on line 112


Here is what line 112 looks like:

Quote:
Code:
trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);


Here is the small portion of the code: (Error is almost at the bottom of this chunk of code.)
Quote:
Code:
   /**
   * Save modified objects
   */
   function save()
   {
      if (!$this->is_modified)
      {
         return;
      }

      global $phpEx;

      if ($fp = @fopen($this->cache_dir . 'data_global.' . $phpEx, 'wb'))
      {
         @flock($fp, LOCK_EX);
         fwrite($fp, "<?php\n\$this->vars = " . var_export($this->vars, true) . ";\n\n\$this->var_expires = " . var_export($this->var_expires, true) . "\n?>");
         @flock($fp, LOCK_UN);
         fclose($fp);

         if (!function_exists('phpbb_chmod'))
         {
            global $phpbb_root_path;
            include($phpbb_root_path . 'includes/functions.' . $phpEx);
         }

         phpbb_chmod($this->cache_dir . 'data_global.' . $phpEx, CHMOD_WRITE);
      }
      else
      {
         // Now, this occurred how often? ... phew, just tell the user then...
         if (!@is_writable($this->cache_dir))
         {
            trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR);
         }

         trigger_error('Not able to open ' . $this->cache_dir . 'data_global.' . $phpEx, E_USER_ERROR);
      }

      $this->is_modified = false;
   }


As far as I can tell everything seems right, I checked and the file is in that directory so it should be opening.
Fire Boar
Make sure that cache/data_global.php is a writable file. You have a check to see if the directory cache is writable, but not to see if data_global.php is writable.
Ghost900
The file has a permission of 620 and the folder permissions are 777. Is that what it should be?
rvec
if the owner of the data is something like "apache" or "www-data" 620 should be right. If the owner is you, the permission should be 777.
Ghost900
I wasn't able to find what the issue was so I am reinstalling my board.

I guess I need an upgrade anyway. Smile
Related topics
Fatal error: Cannot instantiate non-existent class:
Fatal error: Allowed memory size of 8388608 bytes exhausted
fatal error
Fatal error in chat
Fatal error: Cannot instantiate...
[help]fatal error eso dice mi web
fatal error in Joomla installation "index.php"
Ca't retreive email via webmail (Fatal error:Allowed memory)
PHP SOAP error
Fatal Error in frihost please help me
" Fatal error: Allowed memory size of 52428800" bl
Fatal error!
Fatal error Allowed memory size of 268435456 bytes exhausted
Getting Fatal Error in php mysqli
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.