Demo RevMax Plugin for OpenX

Questions about openx adserver plugin RevMax?

RevMax OpenX Plugin Features

Author Topic: RE: Internal Server Error  (Read 1960 times)

Offline richtv

  • Newbie
  • *
  • Posts: 2
RE: Internal Server Error
« on: July 28, 2010, 11:05:02 PM »
I cannot access Rev Max from admin.  I am receiving internal server error.  Please advise.

Thank you.

Offline btdsoft

  • Administrator
  • Full Member
  • *****
  • Posts: 124
  • btdsoft.com Independant OpenX Consultant
    • btdsoft.com
Re: RE: Internal Server Error
« Reply #1 on: July 28, 2010, 11:16:25 PM »
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

Offline btdsoft

  • Administrator
  • Full Member
  • *****
  • Posts: 124
  • btdsoft.com Independant OpenX Consultant
    • btdsoft.com
Re: RE: Internal Server Error
« Reply #2 on: July 28, 2010, 11:21:15 PM »
OOPS! just realized that script only sets permissions for OpenX market.
Please use this code to fix all plugins files and folders permissions:

Code: [Select]
<?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

Offline versteckt

  • Newbie
  • *
  • Posts: 2
Re: RE: Internal Server Error
« Reply #3 on: October 05, 2011, 05:03:20 PM »
The script fixed my admin plugin in OpenX but I am still getting Internal Server Error for my /clients/ directory (like when I try to access advertisers.php). All the files and directories have the right permissions and ownership, too. Not sure what to do at this point. :\

Offline btdsoft

  • Administrator
  • Full Member
  • *****
  • Posts: 124
  • btdsoft.com Independant OpenX Consultant
    • btdsoft.com
Re: RE: Internal Server Error
« Reply #4 on: October 05, 2011, 06:14:31 PM »
Not sure how to help you there, if admin files are working, then ioncube is working.
The  clients files are not encrypted, and your server logs should tell you what the error is.

Perhaps turn on apache error logging and read the error line and see what it says ?

Offline versteckt

  • Newbie
  • *
  • Posts: 2
Re: RE: Internal Server Error
« Reply #5 on: October 05, 2011, 06:38:02 PM »
Wow! Talk about fast support!

And what a great idea, dunno why I didn't think to check Apache logs. Turns out my FTP client was reporting /clients/ as 755 but when I checked the logs it said that directory was group-writable and threw up the error. I set permissions via command line and voila! - for some reason they decided to stick. Everything works!

Thanks again! :-)