Download & Extend

PHP Notice: Undefined index: pass during installation

Project:Drupal core
Version:6.0-rc2
Component:install system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

using MAMP, PHP 5.2.3, MySQL 5.0.41

while installing drupal head, if I don't enter a database password, I get

PHP Notice:  Undefined index:  pass in includes/install.mysqli.inc on line 32

patch successfully tested on with and without db password.
AttachmentSizeStatusTest resultOperations
PHP_Notice_pass.patch723 bytesIgnored: Check issue status.NoneNone

Comments

#1

can't reproduce this on XAMPP

#2

Status:needs review» closed (duplicate)

Duplicate: http://drupal.org/node/193891

#3

Status:closed (duplicate)» needs review

No, this is not a duplicate, and still not solved. I tried to install HEAD just now, with E_ALL errors on, and the installer breaks in two places, both becaues I don't have a MySQL password on my local machine.

Attached patch fixes both notices.

AttachmentSizeStatusTest resultOperations
install_notices.patch1.5 KBIgnored: Check issue status.NoneNone

#4

I debugged, and can confirm that url[] does not have pass index defined when the database connection is without password
but I can't see the error message

so the question is: where is the message?
do you see it on page "Verify requirements", which page is skipped at install to me,
or do you use some special tool to track php notices,
or do you see it in some log file,
or is it displayed by MAMP?

#5

Pasqualle: MAMP doesn't display the errors in your browser by default. try to type tail /Applications/MAMP/logs/php_error.log in a terminal.

#6

ok, reproduced (I use XAMPP, so needed some tweaking, but learned something new)

Notice: Undefined index: pass in \install.php on line 158
Notice: Undefined index: pass in \includes\install.mysqli.inc on line 32

php.ini
error_reporting = E_ALL
log_errors = On
error_log = "E:\XAMPP\apache\logs\phperror.log"

restart apache

the key is the error_reporting = E_ALL, because drupal sets this variable after the notice

testing...

#7

Status:needs review» reviewed & tested by the community

the patch works

#8

Status:reviewed & tested by the community» fixed

Thanks, committed.

#9

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#10

Version:6.x-dev» 6.0-rc2
Status:closed (fixed)» needs review

The patch isn't ok. If you check for an isset you should set the value to the empty string in stead of NULL. Because else the next isset will trigger again. Moreover, this should be fixed for the other db's as well.

So I include a patch that converts the NULL to "" and does the isset for the other db types as well.

AttachmentSizeStatusTest resultOperations
install.patch1.24 KBIgnored: Check issue status.NoneNone

#11

Status:needs review» reviewed & tested by the community

Well, I've tested it myself and it works. So if you want to get rid of the notice on an empty password for mysql too, please commit.

#12

Status:reviewed & tested by the community» fixed

Actually, the same code was already present in the runtime versions of these files, just it was a bit more verbose. Now unified to use the same syntax, committed the attached patch.

AttachmentSizeStatusTest resultOperations
install_31.patch3.12 KBIgnored: Check issue status.NoneNone

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nobody click here