Tag Archives: php development

Three solutions to the appearance of notice: undefined index in PHP

This WARNING is a NOTICE or WARNING for a different version of PHP. It is not an ERROR. PHP works fine when variables are used undeclared in PHP, but in a PHP5 environment, the above warning or prompt will appear. After the search query, we conclude the following three methods to solve Notice: Undefined Index.

the first method: modify the PHP configuration file, to block such warnings and tips to modify the PHP. Ini configuration file, modify the error_reporting for error_reporting = E_ALL & amp; ~ E_NOTICE. Notice and WARNING in the program will be ignored, of course, this is not suitable for beginners, not only inconvenient to debug the program, and is not conducive to the formation of good code habits.

the second method: initialized for each variable assigned a null or any value, does not affect the operation. $blank = “; $blank = “; $blank = “; $price = “15” :$car = “Truck” :

price = “15” :$car = “Truck” :


modifier disallows warnings caused by function calls, but this modifier does not disallow the display of errors.

How to Fix ubuntu phpmyadmin error: “Connection for controluser as defined in your configuration failed”

Recently when Ubuntu 12.04 was developed with PhpmyAdmin, Connection for Controluser as defined in your Configuration failed after logging in
This tip, when I looked it up, was an extension to the new PHpmyAdmin version, and I didn’t enable it.
Now take a look at your own steps:
1. In the usr/share/doc/phpmyadmin/examples find create_table. SQL. Gz, decompression
Sudo Gzip create_table.sql.gz can then import the SQL file directly from phpmyAdmin
2. After successful import, go to the directory etc/phpmyadmin and modify config.inc. PHP
$dbuser = ‘phpmyadmin’;
$dbpass=’ password ‘;
$basepath=”;
$dbname=’phpmyadmin’;
$dbserver=”;
$dbport=”;
$dbtype=’mysql’;
// So I changed the next two lines
$dbuser = ‘phpmyadmin’;
$dbpass=’ password ‘; // change the password to the corresponding user
3. Restart apache server after modification
The error message will disappear,

Reference:
http://ckwsteven.pixnet.net/blog/post/27469170-phpmyadmin%E9%8C%AF%E8%AA%A4%E8%A8%8A%E6%81%AF%EF%BC%9A-connection-for-controluser-as-defi
http://www.rvdavid.net/how-to-fix-phpmyadmin-error-connection-for-controluser-as-defined-in-your-configuration-failed/
http://wiki.phpmyadmin.net/pma/pmadb