Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#12 | install_31.patch | 3.12 KB | Gábor Hojtsy |
#10 | install.patch | 1.24 KB | Jax |
#3 | install_notices.patch | 1.5 KB | blackdog |
PHP_Notice_pass.patch | 723 bytes | scor | |
Comments
Comment #1
Pasquallecan't reproduce this on XAMPP
Comment #2
Crell CreditAttribution: Crell commentedDuplicate: http://drupal.org/node/193891
Comment #3
blackdog CreditAttribution: blackdog commentedNo, 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.
Comment #4
PasqualleI 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?
Comment #5
scor CreditAttribution: scor commentedPasqualle: MAMP doesn't display the errors in your browser by default. try to type
tail /Applications/MAMP/logs/php_error.log
in a terminal.Comment #6
Pasqualleok, 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...
Comment #7
Pasquallethe patch works
Comment #8
Gábor HojtsyThanks, committed.
Comment #9
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
Jax CreditAttribution: Jax commentedThe 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.
Comment #11
Jax CreditAttribution: Jax commentedWell, 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.
Comment #12
Gábor HojtsyActually, 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.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.