Login with username, password and session length
Home Help Search Members Register

News: RevMax 4.0.3-pr1 Released | Demo RevMax | Purchase RevMax | Contact | About
Pages: [1]
  Print  
Author Topic: RE: Internal Server Error  (Read 141 times)
btdsoft
Administrator
Newbie
*****
Posts: 32


btdsoft.com Independant OpenX Consultant


WWW
« Reply #2 on: July 28, 2010, 10:21:15 AM »

OOPS! just realized that script only sets permissions for OpenX market.
Please use this code to fix all plugins files and folders permissions:

Code:
<?php
 error_reporting
(E_ALL);
  require_once 
'init.php';
 
     function 
oxMarketChmod($path$filePerm=0644$dirPerm=0755) {
      
// Check if the path exists
      
if(!file_exists($path))
      {
      return(
FALSE);
      }
      
// See whether this is a file
      
if(is_file($path))
      {
      
// Chmod the file with our given permissions
      
chmod($path$filePerm);
      
// If this is a directory...
      
}
 
      elseif(
is_dir($path))
      {
      
// Then get an array of the contents
      
$foldersAndFiles scandir($path);
      
// Remove "." and ".." from the list
      
$entries array_slice($foldersAndFiles2);
      
// Parse every result...
      
foreach($entries as $entry)
      {
      
// And call this function again recursively, with the same permissions
      
oxMarketChmod($path."/".$entry$filePerm$dirPerm);
      }
      
// When we are done with the contents of the directory, we chmod the directory itself
      
chmod($path$dirPerm);
      }
      
// Everything seemed to work out well, return TRUE
      
return(TRUE);
      }
     
$plugins oxMarketChmod(MAX_PATH.'/plugins/etc');
     
$admin oxMarketChmod(MAX_PATH.'/www/admin/plugins');
 
     if (
$admin == $plugins){
     echo 
"All Done, you can <a href='www/admin/'>login</a> now";
     }
     else {
     echo 
'Something has gone wrong... Perhaps oxMarket dosent exist?';
     }
?>



Just place it in your openx directory and call it in a browser.

Mike
Logged

OpenX Payment Plugin RevMax
http://www.btdsoft.com
btdsoft
Administrator
Newbie
*****
Posts: 32


btdsoft.com Independant OpenX Consultant


WWW
« Reply #1 on: July 28, 2010, 10:16:25 AM »

I cannot access Rev Max from admin.  I am receiving internal server error.  Please advise.

Thank you.

Hi
It is a permissions issue usually caused by server config.
Openx sets many folder permissions at 777 when in fact shared host,
cpanel, servers require 755 permissions.

There is a short article here http://btdsoft.com/openx-market-fix-for-cpanel-servers/
with a script you can place in your /openx/ directory to fix these permissions problems.

You will also have to modify:

/lib/ox/plugin/PluginManager.php
lines:
52: define('OX_PLUGIN_DIR_WRITE_MODE', 0755);
53: //define('OX_PLUGIN_DIR_WRITE_MODE', 0777);

so future plugins wont get the same errors on installation.
Un-comment 755 and comment (//) out 777 as shown.

Mike
Logged

OpenX Payment Plugin RevMax
http://www.btdsoft.com
richtv
Newbie
*
Posts: 2


« on: July 28, 2010, 10:05:02 AM »

I cannot access Rev Max from admin.  I am receiving internal server error.  Please advise.

Thank you.
Logged
Pages: [1]
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
[Sitemap]