Good idea to ignore errors? [closed] - php

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I found out that on my system "error_reporting" was turned off. So I turned it on (E_ALL) and now I have quite a lot errors.
if you're interested in my mistakes:
Notice: Undefined index: page in …path/file.php on line 22
Notice: Undefined offset: 1 in …path/file.php on line 49
Notice: Undefined offset: 2 in …path/file.php on line 57
Notice: Undefined offset: 3 in …path/file.php on line 58
Notice: Undefined variable: out in …path/file.php on line 85
Notice: Undefined variable: out in …path/file.php on line 109
Notice: Use of undefined constant M_DESCRIPTION - assumed 'M_DESCRIPTION' in …path/file.php on line 181
Notice: Use of undefined constant GA_TRACKER - assumed 'GA_TRACKER' in …path/file.php on line 291
Notice: A session had already been started - ignoring session_start() in …path/file.php on line 12
Notice: Undefined variable: attributes in …path/file.php on line 86
Notice: Undefined variable: li in …path/file.php on line 129
Notice: Undefined index: breakafterlabel in …path/file.php on line 175
Notice: Undefined index: afterlabel in …path/file.php on line 167
Notice: Undefined index: attributes in …path/file.php on line 188
Notice: Undefined index: value in …path/file.php on line 191
Notice: Undefined index: for in …path/file.php on line 163
Notice: Undefined index: attributes in …path/file.php on line 249
Notice: Undefined index: value in …path/file.php on line 299
Notice: Undefined variable: out in …path/file.php on line 109
Notice: Undefined offset: 0 in …path/file.php on line 418
Notice: Undefined index: maxlength in …path/file.php on line 368
Notice: Undefined index: accept in …path/file.php on line 372
Notice: Undefined variable: out in …path/file.php on line 93
Notice: Undefined index: accept in …path/file.php on line 378
Notice: Undefined index: title in …path/file.php on line 379
Notice: Undefined index: accept in …path/file.php on line 402
Notice: Undefined index: fp in …path/file.php on line 624
Notice: Undefined variable: alert_msg in …path/file.php on line 246
Notice: Undefined variable: returner in …path/file.php on line 87
Notice: Undefined index: body in …path/file.php on line 309
Notice: Undefined variable: out in …path/file.php on line 81
Notice: Undefined variable: defaults in …path/file.php on line 121
First I thought "Oh you better turn it off again", but I'm not sure about the consequences!
So the very simple question is: Does it matter if I ignore all the errors or not?

In a development environment it's best to work with error_reporting(E_ALL), so you can see notices as well. This encourages you to have a higher coding standard.
When running a live site, you MUST have display_errors off, but log your errors (just like you're doing).
This way, you will only see errors that have meaning, and not only "Notice: Undefined ...". If the website is already done, you should spend a bit of time refactoring your code, the long-term benefits will be worth it.

If you just want to hide temporarily some message errors, use an # :
echo #$undefined;
#session_start;
This will not solve your error, but make your error listing clearer while you are fixing it.

The answer is: no!
Ignoring errors might cause unexpected behaviors. In addition it may slow down the execution of your program / script. So you better not ignoring but fix them.
Do be more detailed: Where the Undefined offset errors are unproblematic in most cases, a Use of undefined constant constant or a failed session_start may be dangerous.

You should pay attention to the errors and warnings.
They are you saying that you have done something wrong in .
The errors are very useful in a a development environment.
But when you release the code, it's best to disable them.

Related

Notice: Undefined index: host in White Screen of Death

I have tested plugins & checked PHP versions. So far I've not been able to fix the issue(s):
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 461
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 462
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 462
Notice: Undefined index: scheme in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 482
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 461
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 461
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 463
Notice: Undefined index: host in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 465
Notice: Undefined index: scheme in /home/f2drufxgri7b/public_html/wp-includes/canonical.php on line 482
I finally fixed it by Updating the Wordpress manually and using PHP 5.6 to access the WPAdmin. Later I updated to latest PHP version and updated all Plugins from WP Admin.
It seems that the error was due to PHP, Wordpress and Plugins Updates wish created the WhiteScreen of Death.
I stronlgly reccomend Updating PHP and Wordpress versions before migrating the website.

Php undefined index notice when reading array from cookie

OK I have a rather odd problem and I have been sitting on it for some time without success. My page structure is roughly as follows:
<?php
ob_start();
error_reporting(E_ALL);
then I create an array with user info like:
$USER = array('ID' => md5(uniqid(rand(),1)),
'referrer' => $_SERVER['HTTP_REFERER'],
etc.
);
This will have like 10 entries or so.
Then I check whether the user already has my cookie set, and if they don't, I do (still before anything is output, i.e. before the <html> tag):
$data = base64_encode(serialize($USER));
setcookie('cookiename', $data, time()+86400*30, '/','mydomain.com',1,1);
So far so good. Now say the user then navigates to another page on my site. Now the cookie will already be set, so if the check returns true, I read the cookie with:
$DUMMY = unserialize(base64_decode($_COOKIE['cookiename']));
So now $DUMMY should have the same array structure that was written to the cookie previously. The really baffling thing is that when I try to access:
$uid = $DUMMY['ID'];
I get a warning in my error_log saying that:
PHP Notice: Undefined index: ID
Which is really weird because (1) it will only read the cookie if the cookie exists, and if it exists, it should have the 'ID' element as it was written to it in the first place (and I do have double and triple checked this with print_r($DUMMY); for instance, and all the elements are there). In addition, when I then try to use $uid I can, i.e., it does have the value it should. So everything seems OK, except that my error_log file gets 1000s of these PHP warning messages. Any ideas?
I do the ob_end_flush(); at the very end of the page footer btw.
Thanks.
P.S.: Some more odd things are going on.
OK for testing purposes, I have added some IP filter, so the cookie script is only loaded if I am the one visiting the page. It seems to work, because no further entries have been made in the database. Nevertheless, the error messages keep ticking away in the error_log file. I am providing an excerpt:
[13-Dec-2017 01:04:34 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:04:35 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:05:06 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:05:07 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:05:38 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:05:39 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:06:10 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:06:11 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:06:42 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:06:43 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:07:14 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:07:15 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:07:46 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:07:47 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:08:18 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:08:20 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:08:50 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:08:51 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:09:22 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:09:23 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:09:54 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:09:55 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:10:26 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:10:27 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:10:58 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:10:59 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:11:30 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:11:31 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:12:03 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:12:03 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:12:35 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:12:35 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:13:07 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:13:07 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:13:39 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:13:39 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:14:11 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:14:11 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:14:43 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:14:43 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:15:15 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:15:15 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:15:47 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:15:47 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:16:19 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:16:19 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:16:51 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:16:51 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:17:23 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:17:23 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:17:55 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:17:55 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:18:27 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
[13-Dec-2017 01:18:27 Europe/Berlin] PHP Notice: Undefined index: ID in /home/xxxxxxxx/public_html/include/usertrack.inc.php on line 51
Two things strike me as odd there:
1) Why am I seeing them in the first place since the script is only included with my IP, and
2) there is some odd regularity about these messages. 2 hits about every 30 seconds.
What is this? Some kind of hack attack? But even if it was some weird DDoS, why would the attacker see the cookie script? My IP filter is this:
if ($_SERVER['REMOTE_ADDR'] == 'xxx.xxx.xxx.xxx') { // the x's would be my IP
require 'include/usertrack.inc.php';
flush();
}
This is an absolute mistery to me.
oh man ... I feel bad. I just solved it.
OK, I did some recent changes to my directory structure and I am running my own cloud server (using owncloud). Due to the change in directory structure, owncloud no longer found the directory it was supposed to sync with. So basically, every 30 seconds it tried to contact the server to locate the directory. Since it came from my machine, the owncloud request did have my IP number so passed the IP filter but since it could not locate the directory it must have triggered some 404 or something.
I am not sure what kind of request owncloud makes but it must have triggered the cookie script, maybe even accepted the cookie but maybe did not allow my script to read out the cookie or deleted it the same second it was set or something. Either way, now that I pointed owncloud to the correct directory again, the error messages stop appearing and the error_log is clean .
man ... 2 days of my life I'll never get back!
Sorry about this.

trouble installing vtiger crm 6.4.0 on xampp

I have downloaded Vtiger CRM from https://sourceforge.net/projects/vtigercrm.
After downloading, I tried to install in my localhost XAMPP server.
I extracted the tar.gz file.
I couldn't find any database file inside the folder
While I ran the vtiger crm folder in localhost, many errors are coming. No installation page appears.
These are the error messages. Which settings to change in my XAMPP server can somebody tell.
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 17
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 18
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 19
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 20
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 21
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 22
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 23
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 24
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 25
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 26
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 27
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 28
Notice: Undefined variable: mod_strings in C:\xampp\htdocs\vtigercrm\modules\CustomView\CustomView.php on line 29
Notice: Undefined index: authenticated_user_id in C:\xampp\htdocs\vtigercrm\includes\main\WebUI.php on line 44
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: current_language in C:\xampp\htdocs\vtigercrm\includes\runtime\Globals.php on line 21
Notice: Undefined property: Install_Index_view::$viewer in C:\xampp\htdocs\vtigercrm\includes\runtime\Controller.php on line 117
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: theme in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Installation Wizard
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Welcome
Help-Icon
Vtiger Logo
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Welcome to Vtiger CRM 6 Setup Wizard
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
This wizard will guide you through the installation of Vtiger CRM6
<br /><b>Notice</b>: Undefined index: language in <b>C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php</b> on line <b>31</b><br /><br /><b>Notice</b>: Undefined index: action in <b>C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php</b> on line <b>670</b><br /><br /><b>Notice</b>: Undefined index: file in <b>C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php</b> on line <b>670</b><br />Install
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: in C:\xampp\htdocs\vtigercrm\includes\runtime\LanguageHandler.php on line 157
Powered by vtiger CRM 6.4.0 © 2004 - 2016 vtiger.com |
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: in C:\xampp\htdocs\vtigercrm\includes\runtime\LanguageHandler.php on line 157
Read License |
Notice: Undefined index: language in C:\xampp\htdocs\vtigercrm\includes\runtime\BaseModel.php on line 31
Notice: Undefined index: action in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: file in C:\xampp\htdocs\vtigercrm\include\utils\ListViewUtils.php on line 670
Notice: Undefined index: in C:\xampp\htdocs\vtigercrm\includes\runtime\LanguageHandler.php on line 157
To disable this error message just add one line in top of index.php file and run again CRM to install it.
error_reporting(0);
After successful installation you can remove that line.
Did you check the prerequisites are met?
MYSQL Requirements
Please make sure to review MySQL configuration (my.cnf or server start parameters)
SQL_MODE Should not have STRICT_TRANS_TABLE
ENGINE=InnoDB Should be available. (Turn off –skip-innodb)
PHP Extensions
Following extensions should be enabled for your PHP setup
GD Mandatory Charts and graphs generation are dependent on this library.
IMAP Mandatory Webmails Module is dependent on this library.
Zlib Mandatory
OpenSSL Optional Imap with OpenSSL should be enabled in case Mail server needs to be connected via SSL
Curl Optional
After installing XAMPP stop all services and using notepad configure PHP.ini (inside php folder xampp installation) with the following values:
PHP Configuration
Make sure to verify if your PHP configuration meets the recommended values.
Variable Value
allow_call_time_pass_reference on
error_reporting E_WARNING & ~E_NOTICE & ~E_DEPRECATED
safe_mode off
display_errors on
file_uploads on
max_execution_time 600
memory_limit 64M
log_errors off
output_buffering on
short_open_tag On
allow_call_time_pass_reference on
register_globals off
You should also check the permissions of files.
Regards
These are just warning and notices so search in your php.ini file in xampp->php->php.ini for error_reporting=On and turn it off as error_reporting=Off. Then restart your xampp server and once restart your system also. Then try hope it will work . The same problem i had and i solved it in above way.
in php.ini error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

Opencart Undefined index Errors in product

I am using OpenCart 1.4.9 and I have been dealing with Undefined index Errors in product.php recently, I suspect it happens every time the user is creating/input a new product on the dashboard.
How to fix these errors because it makes the server resource overload, my site resource usage peaked at 91% sometimes 100% on the cPanel?
Here is the model file.
Here is the controller file.
Here are the errors I am getting:
PHP Notice: Undefined index: model in /home/xxx/public_html/admin/controller/catalog/product.php on line 651
PHP Notice: Undefined index: sku in /home/xxx/public_html/admin/controller/catalog/product.php on line 659
PHP Notice: Undefined index: location in /home/xxx/public_html/admin/controller/catalog/product.php on line 667
PHP Notice: Undefined index: keyword in /home/xxx/public_html/admin/controller/catalog/product.php on line 687
PHP Notice: Undefined index: image in /home/xxx/public_html/admin/controller/catalog/product.php on line 703
PHP Notice: Undefined index: image in /home/xxx/public_html/admin/controller/catalog/product.php on line 710
PHP Notice: Undefined index: manufacturer_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 723
PHP Notice: Undefined index: shipping in /home/xxx/public_html/admin/controller/catalog/product.php on line 731
PHP Notice: Undefined index: date_available in /home/xxx/public_html/admin/controller/catalog/product.php on line 739
PHP Notice: Undefined index: quantity in /home/xxx/public_html/admin/controller/catalog/product.php on line 747
PHP Notice: Undefined index: minimum in /home/xxx/public_html/admin/controller/catalog/product.php on line 755
PHP Notice: Undefined index: subtract in /home/xxx/public_html/admin/controller/catalog/product.php on line 763
PHP Notice: Undefined index: sort_order in /home/xxx/public_html/admin/controller/catalog/product.php on line 771
PHP Notice: Undefined index: stock_status_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 783
PHP Notice: Undefined index: price in /home/xxx/public_html/admin/controller/catalog/product.php on line 791
PHP Notice: Undefined index: cost in /home/xxx/public_html/admin/controller/catalog/product.php on line 799
PHP Notice: Undefined index: status in /home/xxx/public_html/admin/controller/catalog/product.php on line 807
PHP Notice: Undefined index: tax_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 819
PHP Notice: Undefined index: weight in /home/xxx/public_html/admin/controller/catalog/product.php on line 827
PHP Notice: Undefined index: weight_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 841
PHP Notice: Undefined index: length in /home/xxx/public_html/admin/controller/catalog/product.php on line 851
PHP Notice: Undefined index: width in /home/xxx/public_html/admin/controller/catalog/product.php on line 859
PHP Notice: Undefined index: height in /home/xxx/public_html/admin/controller/catalog/product.php on line 867
PHP Notice: Undefined index: length_class_id in /home/xxx/public_html/admin/controller/catalog/product.php on line 881
The following are some possibilities:
The fields (listed in your errors) don't exist in your database.
There might be some problem with your product_form.tpl template file.
Check whether the values are getting inserted correctly to the product tables while adding a product.
Comparing the admin product files with a fresh unedited OpenCart 1.4.9 admin product files will help you to find out the issue.
These simply occur when $product_info['variable mentioned in error is not specified'], a simple, and complete fix is to edit the query like below:
elseif (isset($product_info)) {
$this->data['location'] = $product_info['location'];
}
Into:
elseif (isset($product_info['location'])) {
$this->data['location'] = $product_info['location'];
}
And do so for each of the cases, furthermore you can do this for all $product_info[] data to avoid future errors like that.
In case of when just some of the indexes undefined, the reason for it may be very simple: if the properties are not set in the admin panel (like in my case for Length, Weight and in stock).

Executing a shell in CakePHP

I am executing a shell on a Fedora 8 32 bit server with php 5.2.6 and Cakephp 2. I am getting these errors :
PHP Notice: Undefined index: tag in path/lib/Cake/Console/ConsoleOutput.php on line 202
PHP Notice: Undefined index: emergency in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: alert in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: critical in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: error in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: warning in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: info in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: debug in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: success in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: comment in path/lib/Cake/Console/ConsoleOutput.php on line 217
PHP Notice: Undefined index: question in path/lib/Cake/Console/ConsoleOutput.php on line 217
and so on.
This works fine when I try it locally. Any idea ?
It could be because you use an old PHP version. CakePHP 2 requires at least PHP 5.2.8, see http://book.cakephp.org/2.0/en/installation.html#requirements

Categories