On 03/04/2011 01:03 AM, Cecil Yother, Jr. wrote:
I am getting this error on my QmailAdmin page.

*Notice*: Undefined index: oldpasswd in */usr/share/toaster/htdocs/admin/index.php* on line *81*

*Notice*: Undefined index: newpasswd in */usr/share/toaster/htdocs/admin/index.php* on line *81*

*Notice*: Undefined index: newpasswd2 in */usr/share/toaster/htdocs/admin/index.php* on line *81*

*Notice*: Use of undefined constant r - assumed 'r' in */usr/share/toaster/include/admin.inc.php* on line *10*

*Notice*: Undefined variable: html in */usr/share/toaster/include/admin.inc.php* on line *93

*Any ideas?**If more info is needed let me know what and I can provide it.

The undefined index notices are because the script has not checked if the $_POST variables in question had been set, and initialised them accordingly. It's quite common, and won't cause any problems.

Your php error reporting seems to include notices. Try changing it to error_reporting = E_ALL & ~E_NOTICE in your php.ini. Restart apache after that, and see if the errors still appear.

The notice on line 10 of admin.inc.php is to do with the fopen statement. It should read $fd = fopen ( $file, 'r' ) instead of $fd = fopen ( $file, r ). PHP has made the correct assumption in this case and literally translated it to 'r'. Again, not an issue in this case, but you can make the substitution if you desire.

Bharath

Reply via email to