I used deadlock version 1.0 stable on a brand new install of Apache 2.2.4, PHP 5, and MySQL 5.0.27 on Windows XP SP2. In PHP 5, the short tags are deprecated and turned off. I had to go to php.ini and turn them back on because short tags are used all over in the project. I'm new to all these tools, so I had to figure out that deadlock wasn't creating the DB file and then go create it from the mysql client. Finally, I got an out of range error on the 'id' field so I had to go into global.php and change add_dbuser to pass a non-null value for 'id' to mysql. After all these fixes (and the fun of getting mysql 5 working in PHP 5) I have a working system.
The short tags problem should be fixed since they're deprecated.
Having to create the DB manually may be a limitation you can't get around, I haven't gotten far enough into this to know whether that is the case. It would be good to have at least minimal installation documentation for this type of pre-requisite.
The out of range error needs some better fix than what I did. Going back to the record after it was created, I see that the value I passed in was ignored anyway. The first record got an id of 1. It seems likely that mysql 5 has added some error checking that wasn't in the release you developed against.
Logged In: YES
user_id=1407450
Originator: NO
I initially targeted the project towards PHP4, and I know there are problems like the ones you mentioned. I just have not had enough time nor demand to go back and fix all of these problems.
If you would like to fix them, I would be glad to give you access to the CVS.
Logged In: YES
user_id=1706212
Originator: YES
The simplest thing would be to add a note somewhere on your sourceforge page describing the problems/fixes for the PHP5/MYSQL5 combination. Maybe just leaving this bug open will help the next person avoid the problems I hit. I have no idea why my change in add_dbuser worked nor what the real fix should be. I just applied experience to get around it and got lucky. Do you know what a correct fix for that would look like?
Logged In: YES
user_id=1407450
Originator: NO
First, you said the DB file was not being created, I assume you meant db_config.php? In that case, the file probably was not writable. (this is why Deadlock is not compatible with Windows)
What exactly did you change in global.php?
Also, since you are using Windows, did you have to modify the enc_pass function in global.php to store the passwords in plain text? The encryption method that the script uses only works with Linux.
Logged In: YES
user_id=1706212
Originator: YES
Sorry for being unclear. In the install pages one of the fields is the name of the mysql database where deadlock will store all its user information. It wasn't clear to me whether deadlock could create this database and it turns out it did not or could not. When I went into the mysql client and created a database with the name I supplied to the deadlock installer everything got happier.
I had plenty of problems getting php and mysql happy and that led me to modify db_config.php to remove the line saying it was installed so I could start over. I did this several times, so I don't know if I inadvertently changed it to be writable. (BTW, the line added to this file saying the install is completed should be held off until the install is successful.) I don't recall having any problems with this file the first time through, but I'm also running as administrator on this machine. Being administrator can mask such problems just like being root does.
In global.php, I went to the add_dbuser function and changed the assignment of the query to the variable $sql such that the first value was \'0\' rather than \'\'. The out of range error suggested that the value was being passed incorrectly. When I found that it was being passed a null string I just stuck a random character into the string to make it happy.
I never touched enc_pass and was not even aware that it might be a problem. Perhaps PHP 5 has fixed that problem as a freebie :-)
Logged In: YES
user_id=1407450
Originator: NO
The reason you have to create the database manually is because most people do not have permission through their host to make a database via mysql. This is standard for most scripts you will download, it is very unusual that they actually create the database.
The enc_pass function will work, however, your users will be unable to login to the protected area since their passwords are encrypted incorrectly.
Logged In: YES
user_id=1706212
Originator: YES
With respect to the add_dbuser problem passing the value for `id`, I looked up the handling of this type of field in the MySQL manual. Their example shows the use of inserts that simply leave the autoincrement field out of the list of fields. I did a fresh install of deadlock and changed globals.php's add_dbuser to remove the `id` field from the insert statement and it was happy with this. I believe this is a correct fix that you could check into the primary sources.
With respect to enc_pass, I got a working system without even attempting to resolve this issue. The main thing I needed to do was to set AllowOverride in my httpd.conf file for Apache. Once I did that, it obeyed the .htaccess and .htpasswd files created by deadlock with no other changes required.