I've gotten this error:
JpGraph Error: Can't access PHP_SELF, PHP global variable.
You can't run PHP
from command line if you want to use the 'auto' naming of
cache or image files.
trying to access directly to stats_chart.php?plot=status
user priority etc
I have php 5.2.0 and apache 2.0.59
Looking at the source code I've found that the error is on
include/jpgraph/jpgraph.php
function GenImgName() {
global $HTTP_SERVER_VARS;
if(!$HTTP_SERVER_VARS) //added
$HTTP_SERVER_VARS=$_SERVER; //added
$supported = imagetypes();
if( $supported & IMG_PNG )
$img_format="png";
elseif( $supported & IMG_GIF )
$img_format="gif";
elseif( $supported & IMG_JPG )
$img_format="jpeg";
if( !isset($HTTP_SERVER_VARS['PHP_SELF']) )
JpGraphError::Raise("<b>JpGraph
Error:</b> Can't access PHP_SELF, PHP
global variable. You can't run PHP from command line
if you want to use the 'auto' naming of
cache or image files.");
$fname=basename($HTTP_SERVER_VARS['PHP_SELF']);
// Replace the ".php" extension with the image
format extension
return
substr($fname,0,strlen($fname)-4).".".$img_format;
}
Adding these two lines the problem gone.
FYI, Regards!
--
Eventum Developers Mailing List
For list archives: http://lists.mys
ql.com/eventum-devel
To unsubscribe: htt
p://lists.mysql.com/eventum-devel?unsub=nessto sharedlog.com
|