View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] User exists but is unknown - ProjeQtOr
 
 

[SOLVED] User exists but is unknown

More
21 Jul 2021 12:29 #1 by Nedel
Hello,
I have been trying to use the api for some time, but I cant' get past this error:
{"error":"invalid API query", "message":""user 'projeqtor' unknown in database""}

The php file used to make the request:
<?php
        $fullUrl="http://MYSERVER/projeqtor/api/Project/all";
        $curl = curl_init($fullUrl);
        curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        curl_setopt($curl, CURLOPT_USERPWD, "projeqtor:PASSWORD");
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        $curl_response = curl_exec($curl);
        echo $curl_response;
        curl_close($curl);
?>

The .htaccess file located in WEBROOT/projeqtor/api/ :
<IfModule mod_rewrite.c>
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?uri=$1
</IfModule>

Here's an extract from projeqtor parameters.php file:
[code]
<?php
$paramDbType='mysql';
$paramDbHost='127.0.0.1';
$paramDbPort='3306';
$paramDbUser='projeqtor';
$paramDbPassword='PASSWORD';
$paramDbName='projeqtor';

AuthUserFile WEBROOT/projeqtor/api/.htpasswd
AuthName "ProjeQtOr"
AuthType Basic
Require user projeqtor
[/code]

So far I have checked:
- that the .htaccess file is correctly used by apache
- that projeqtor exists as a user in mariadb and has all required privileges on the database
- that the database was up and running
- that the modules auth_basic and rewrite were installed and enabled
- that the .htpasswd was where it needed to be with the right infos in it (generated via htpasswd command)

I am running out of ideas and would really appreciate if someone could figure out what is wrong.

Please Log in or Create an account to join the conversation.

More
22 Jul 2021 11:28 #2 by babynus
Replied by babynus on topic User exists but is unknown
User must exist in .htPassword, but must also exist in ProjeQtOr.
You will use the API key for this user, and API will have the rights defined for this user, so that you can control what the API call will be able to do (and not to do)

Babynus
Administrator of ProjeQtOr web site
The following user(s) said Thank You: Nedel

Please Log in or Create an account to join the conversation.

More
22 Jul 2021 11:39 #3 by Nedel
Replied by Nedel on topic User exists but is unknown
Thanks a lot, I though for sure that the message was referring to the user accessing the database and it didn't occur to me that there had to be an actual application user to access the api.

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.030 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.