PDA

View Full Version : Fresh Install, Can't Login as Admin


ricwash2
16-11-04, 06:16 AM
I just freshly installed dotProject from the CVS download. I tried installing it several times.

The trouble I am having is that the login keeps telling me the login failed. I am using the defaults for login. I have tried going into the backend and changing the user record for Admin directly, even deleting the password to make it blank.

Nothing has worked for me. I understand the CVS is unstable, but it seems others have installed it and can login.

I recreated the DB in MySQL, re-run the dotproject.sql, many times.

What should I try next?

Environment:
MacOS X 10.3.6 (all latest updates)
CompleteApache2 (2.0.52)
CompleteMySQL (4.0.21)
CompetePHP4 (4.3.9)

This is a clean OS, newly installed and updated. dotProject 1.0.2 install works fine.

Thanks,
Ric

ajdonnison
16-11-04, 09:56 AM
You need to run db/upgrade_permissions.php. This requirement will likely go away before the first release candidate, but for now it is a requirement.

ricwash2
16-11-04, 03:13 PM
I did try that, since I saw it in another thread. Figured is was for an upgrade only, not a fresh install. But I tried it and it errored saying things already existed or something. I will try it in the morning when I get to work.

-ric

You need to run db/upgrade_permissions.php. This requirement will likely go away before the first release candidate, but for now it is a requirement.

ricwash2
17-11-04, 12:56 AM
I get the following:

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 1
STR:

SQL-query:

MySQL said:

#1064 - You have an error in your SQL syntax.**Check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php

echo "<pre>\n"' at line 1

ajdonnison
17-11-04, 02:47 PM
It isn't an SQL, it is a PHP file. Point your browser to the file, don't try and get MySQL to process it.

ivansb
19-11-04, 05:18 AM
You need to run db/upgrade_permissions.php. This requirement will likely go away before the first release candidate, but for now it is a requirement.

I have a operational 1.0.2 version. I installed the 2.0 alpha from the cvs files today, created a DB called "dotproject2", configured all I needed, but I canīt login with admin/passwd.

I Tried to run update_permissions, it returned the success messages, but Iīm still not logging in.

Could you help me, please?

I did not looked at the source yet, because I want first to know the resources of this new release. Talking about it, where can I find the current to-do list to contribute?

Thanks,

Ivan Br.

ricwash2
20-11-04, 01:31 AM
It isn't an SQL, it is a PHP file. Point your browser to the file, don't try and get MySQL to process it.

Well, felt very stupid about the .php vs .sql file thing.

Ran the upgrade_permissions.php file from a web browser, it never got to "success", tried it twice.

However, after running that, I was able to log into v1 that was running on the same system, change the URL to the v2 version and got in bypassing the login, then I created another account with Admin Privs in the v2 installation. From then on, everything is up and running on my dotProject v2 install.

-Ric

vncoder
29-12-04, 03:15 PM
I ran from command and got this instead:
Content-type: text/html
X-Powered-By: PHP/4.3.9
<pre>
Starting Upgrade
Loaded base classes
PHP Fatal error: Call to undefined function: dpgetconfig() in /var/www/html/dotproject/classes/ui.class.php on line 340

vncoder
29-12-04, 03:29 PM
Installed from CVS snapshot downloaded on 29 December 2004 00:00 UTC.
Ran the dotproject/db/dotproject.sql
Set all directories to be readable/executable
Changed the ower of dotproject directory tree to apache:apache

Pointed at http://&lt;IP>/dotproject/index.php?m=install

Entered default admin user id/password (admin/passwd), but still get "Login Failed".
Tried destroying the database and install from fresh again, multiple times, but same error as above.
Traced the error to (dotproject/classes/ui.class.php):
if ( ! $GLOBALS['acl']->checkLogin($row->user_id)) {
dprint(__FILE__, __LINE__, 1, "Permission check failed");
return false;
}

It seems like checkLogin failed for some reason.

After that I got lost among the code.

Anyone got any ideas on what is happening???


I've tried to run the "upgrade_perssion.php" but doesn't seem to work.


Environment:
----------------------------------
Fedora 3 - Kernel 2.6.9-1.667
php-4.3.9-3
mysql-3.23.58-13
apache httpd-2.0.52-3.1
---------------------------------

cyberhorse
29-12-04, 09:16 PM
You need to run db/upgrade_permissions.php.

have you done this? before you do it, you can't login because of the new permission system, which is not setup in the db/dotproject.sql script yet.

vncoder
30-12-04, 08:30 AM
Yes, I've already ran that script but it's crashed as described above.

dbova
07-01-05, 10:16 AM
I'm having the exact same problem. I too have a working 1.2 DP and installed the CVS snapshot using a new database and directory.
I've ran the db/upgrade_permissions.php. I guess that script is working, all I see is:

Starting Upgrade
Loaded base classes
Confiugured environment
Upgrading system ...

cyberhorse
07-01-05, 09:04 PM
Ok people - here are the steps you normally have to do. If you get any errors on any of them, post the exact errors and lets go from there.

Fresh 2.0alpha install:
Download code (via cvs checkout)
create your dotproject database
insert the content of db/dotproject.sql file into that database
copy your includes/config-dist.php file to includes/config.php file and make the settings inside it
point your browser or otherwise execute the file db/upgrade_permissions.php
login with admin (default admin:passwd)

Upgrade from 1.0.2
cvs update your code to latest version
you might need to have a look through the includes/config-dist.php file and make any needed changes to your own config.php file
point your browser or otherwise execute the file upgrade_latest.php (which will run all other 3-4 upgrade scripts for you)
login with admin and the password you had for it before the upgrade
redo the permissions for users (they will be inactive if they were not admins), each user has to belong to a group...

Both of these sequences have been tested many times now and they work. Since cvs changes, at any time there might be a problem with them from time to time, but chances are they work or soon after will, because the developers have to install and upgrade versions all the time and they make sure there is a way to do this.

As I said before, if you run into troubles with these steps, please let us know the exact details of your hardship - enable all debugging information, look through your logs, copy exact error messages, etc.

digitalmouse
07-01-05, 09:44 PM
well then cvs is broken at the moment- got the same login error as others, found this thread, ran the db/upgrade_permissions.php as mentioned, yet it produces

Starting Upgrade
Loaded base classes


Fatal error: Call to undefined function:
dpgetconfig() in /www/htdocs/dotproject2/classes/ui.class.php on line 340

a peak inside ui.class.php *and* permissions.class.php does not show dpgetconfig() defined anywhere, though there are several calls for it.

will check back later to see if it has been fixed. since my CVS copy of dotproject is about 2-3 days old, maybe i need to download it all again?

(edit) and this is a fresh 2.0alpha install from cvs.

digitalmouse
08-01-05, 12:16 AM
ok, may have solved the problem: i found that main_functions.php is called after ui.class.php (who is looking for the dPgetconfig() function). i reversed the two include lines, and then was able to complete the permission upgrade and login with the default password. relevant code snippet follows:


// moved main_functions.php *above* ui.class.php - digitalmouse 07.Jan.2005

echo "Starting Upgrade\n";
require_once "../includes/config.php";
require_once "../includes/main_functions.php";
require_once "../classes/ui.class.php";
echo "Loaded base classes\n";

cyberhorse
08-01-05, 07:07 PM
Thanks for the suggestion - you are right. I actually just found that bug yesterday about six hours ago and by the time you posted this, it was already fixed in cvs :)


Revision 1.3
Fri Jan 7 11:14:57 2005 UTC (21 hours, 49 minutes ago) by cyberhorse
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
Diff to previous 1.2

fixed order of includes