MantisBT - ATutor
View Issue Details
0005016ATutorInstallationpublic2012-07-06 09:292012-07-26 09:59
greg 
cindy 
normalmajoralways
closedfixed 
2.1 
2.1 
SVN
69f3a338d9d51c13c507ae689046a008f7f45a67
0005016: Failed write mysql pwd to config.inc
On completion of the install and clicking the Login button on the last screen of the installer, ATutor opens with a "Cannot connect to database error". This appears to be because the db password is not written into the config.inc.php file.
No tags attached.
related to 0005017closed cindy addslashes fails when magic_quotes off 
Issue History
2012-07-06 09:29gregNew Issue
2012-07-09 14:18gregNote Added: 0005622
2012-07-09 15:59gregNote Added: 0005623
2012-07-09 16:11gregNote Added: 0005624
2012-07-10 12:52gregRelationship addedrelated to 0005017
2012-07-10 13:20gregAssigned To => cindy
2012-07-10 13:20gregStatusnew => assigned
2012-07-25 11:51cindySVN Revision# => 69f3a338d9d51c13c507ae689046a008f7f45a67
2012-07-25 11:51cindyNote Added: 0005695
2012-07-25 11:51cindyStatusassigned => resolved
2012-07-25 11:51cindyFixed in Version => 2.1
2012-07-25 11:51cindyResolutionopen => fixed
2012-07-26 09:59gregNote Added: 0005710
2012-07-26 09:59gregStatusresolved => closed

Notes
(0005622)
greg   
2012-07-09 14:18   
Tested on my Mac dev env, seems to write the mysql pwd to config.inc.php okay.
(0005623)
greg   
2012-07-09 15:59   
The problem originates with the $addslashes() function, which seems to dislike the mysql_real_escape_string() function. If addslashes() is removed, everything installs fine.

The problem occurs on my Unbuntu machine, using php 5.3.5-1ubuntu7.8 but not with PHP 5.3.6 on Mac.
(0005624)
greg   
2012-07-09 16:11   
same problem occurs with mysqli_real_escape_string()
(0005695)
cindy   
2012-07-25 11:51   
The error is caused by undefined var $addslashes. Fixed by removing $addslashes as it's unnecessary if the data is not to be inserted into db.

Affected: include/install/install.inc.php
(0005710)
greg   
2012-07-26 09:59   
close for ATutor 2.1