PDA

View Full Version : Undefined index


cefn
04-08-2007, 03:57 PM
have looked through the forum but found no answers .... any help with this apache error?

PHP Notice: Undefined index: HTTPS in /var/www/html/forum/includes/class_core.php on line 1575, referer: http://www.bla-bla-bla.com/forum/index.php


line-1575 define('REQ_PROTOCOL', (($_SERVER['HTTPS'] == 'on' OR $_SERVER['HTTPS'] == '1') ? 'https' : 'http'));


vBulletin 3.6.5
PHP Version 4.3.9
Apache/2.0.52 (CentOS)
sql 4.1.20

many thanks

CyberAlien
04-09-2007, 05:08 AM
You forgot to check if variable exists at all.

define('REQ_PROTOCOL', (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' OR $_SERVER['HTTPS'] == '1') ? 'https' : 'http'));

cefn
04-09-2007, 07:19 AM
Thanks for your help ;)

that did the trick!

Marco van Herwaarden
04-13-2007, 10:24 AM
Add the following in the top of your script:
error_reporting(E_ALL & ~E_NOTICE);


This will make it not show warnings.

PS do you get this error in the default vB index.php file??

cefn
04-13-2007, 06:00 PM
Add the following in the top of your script:
error_reporting(E_ALL & ~E_NOTICE);


This will make it not show warnings.

PS do you get this error in the default vB index.php file??

the info CyberAlien supplied did the trick ... no more errors .... it came to light when i checked my "webmin" error logs after a reinstall ... im useing "Version 3.6.5" and standard files.
Many thanks for your comments .. im afraid i would not know were to put this code..

Add the following in the top of your script:
[php]error_reporting(E_ALL & ~E_NOTICE);

sorry?:rolleyes: