You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Warning: Undefined array key "SCRIPT_FILENAME" in /home/username/sitename/subdir/system/bootstrap.inc.php on line 141
I understand this is just a warning and i did try to post this on your forum but i was not able to register on your forum because i never got a verify email from the forum, so i am posting here.
First thanks for doing this script, i really like it... :)
This warning i believe is caused because server SCRIPT_FILENAME is not always populated on some servers, so it needs to be qualified first.
in bootstrap.inc.php you have the following code
public static function getScriptPath()
{
if ( defined( 'WI_SCRIPT_PATH' ) )
return WI_SCRIPT_PATH;
$path = $_SERVER[ 'SCRIPT_FILENAME' ];
$real = realpath( $path );
if ( $real )
$path = $real;
$path = str_replace( '\\', '/', $path );
return $path;
}
$path value needs to be wrapped inside an if statement to be sure that SCRIPT_FILENAME has a value. Im not sure what value (referrer) it should have or i would do the code for you and post it here. I just wanted to give you a heads up so you know this was causing a warning without the if statement. :)
I think this may work
public static function getScriptPath()
{
if ( defined( 'WI_SCRIPT_PATH' ) )
return WI_SCRIPT_PATH;
//dave mod
if(!empty($_SERVER[ 'SCRIPT_FILENAME' ]))
{
$path = $_SERVER[ 'SCRIPT_FILENAME' ];
}else{
$path = __FILE__;
}
//original code
//$path = $_SERVER[ 'SCRIPT_FILENAME' ];
//end mod
$real = realpath( $path );
if ( $real )
$path = $real;
$path = str_replace( '\\', '/', $path );
return $path;
}
The text was updated successfully, but these errors were encountered:
cPanel Version | 118.0 (build 12)
Apache Version | 2.4.59
MySQL Version | 10.6.18-MariaDB-cll-lve-log
Architecture | x86_64
Operating System | linux
Perl Version | 5.26.3
Kernel Version | 4.18.0-513.18.1.lve.el8.x86_64
PHP Version | 8.1
Just FYI, i have seen that warning come up with other processes as well from different files, so it appears it may be a php issue or some global issue.
Uh oh!
There was an error while loading. Please reload this page.
PHP Warning: Undefined array key "SCRIPT_FILENAME" in /home/username/sitename/subdir/system/bootstrap.inc.php on line 141
I understand this is just a warning and i did try to post this on your forum but i was not able to register on your forum because i never got a verify email from the forum, so i am posting here.
First thanks for doing this script, i really like it... :)
This warning i believe is caused because server SCRIPT_FILENAME is not always populated on some servers, so it needs to be qualified first.
in bootstrap.inc.php you have the following code
$path value needs to be wrapped inside an if statement to be sure that SCRIPT_FILENAME has a value. Im not sure what value (referrer) it should have or i would do the code for you and post it here. I just wanted to give you a heads up so you know this was causing a warning without the if statement. :)
I think this may work
The text was updated successfully, but these errors were encountered: