Posted by scor on November 22, 2007 at 3:51pm
6 followers
| 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 32patch successfully tested on with and without db password.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| PHP_Notice_pass.patch | 723 bytes | Ignored: Check issue status. | None | None |
Comments
#1
can't reproduce this on XAMPP
#2
Duplicate: http://drupal.org/node/193891
#3
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.
#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.login 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
the patch works
#8
Thanks, committed.
#9
Automatically closed -- issue fixed for two weeks with no activity.
#10
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.
#11
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
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.
#13
Automatically closed -- issue fixed for two weeks with no activity.