• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Disable notices

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
I am getting an error like this on my website when trying creating an account

Code:
Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\ajax\check_account.php on line 49

I found that i shouold replace a line in php.ini but that didnt work or i did it wrong...

here's the line 49:

PHP:
$sqlitefile = $server_config['sqliteDatabase'];

it tried to remove but didnt work ;p


So i thought, why not try to disable notices, but the problem is I dont remember how so... do you know?
 
Last edited:
index.php
PHP:
error_reporting(E_ALL & ~E_NOTICE | E_STRICT);
ini_set( 'display_errors', 1 );

SQL:
CREATE TABLE IF NOT EXISTS `tiles` (
  `id` int(10) unsigned NOT NULL,
  `world_id` tinyint(4) unsigned NOT NULL DEFAULT '0',
  `house_id` int(10) unsigned NOT NULL,
  `x` int(5) unsigned NOT NULL,
  `y` int(5) unsigned NOT NULL,
  `z` tinyint(2) unsigned NOT NULL,
  UNIQUE KEY `id` (`id`,`world_id`),
  KEY `x` (`x`,`y`,`z`),
  KEY `house_id` (`house_id`,`world_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
Last edited:
index.php
PHP:
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE); 
ini_set( 'display_errors', 1 );

SQL:
CREATE TABLE IF NOT EXISTS `tiles` (
  `id` int(10) unsigned NOT NULL,
  `world_id` tinyint(4) unsigned NOT NULL DEFAULT '0',
  `house_id` int(10) unsigned NOT NULL,
  `x` int(5) unsigned NOT NULL,
  `y` int(5) unsigned NOT NULL,
  `z` tinyint(2) unsigned NOT NULL,
  UNIQUE KEY `id` (`id`,`world_id`),
  KEY `x` (`x`,`y`,`z`),
  KEY `house_id` (`house_id`,`world_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Dno if im doing it right but im getting this now when starting to type a name:

Code:
Notice: Uninitialized string offset: 1 in C:\xampp\htdocs\ajax\check_name.php on line 81

Notice: Uninitialized string offset: -1 in C:\xampp\htdocs\ajax\check_name.php on line 87

Notice: Undefined index: sqliteDatabase in C:\xampp\htdocs\ajax\check_name.php on line 121

this is what i have before i replaced it with yours...

Code:
error_reporting( E_ALL & ~E_NOTICE );
 

Similar threads

Back
Top