Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] API give a...
 
Notifications
Clear all

[SOLVED] API give a 500 error

3 Posts
2 Users
0 Reactions
2,255 Views
(@antoine1003)
Posts: 36
Active Member
Topic starter
 
[#6525]

Hey,
I need to use the API to retrieve some global parameters from a js custom file. I tried to put your sample code in a php file :

    $fullUrl="localhost/ipmp_new/api/Parameter/list/all"; 
    $curl = curl_init($fullUrl);
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($curl, CURLOPT_USERPWD, "projeqtor:projeqtor");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $curl_response = curl_exec($curl);
    echo $curl_response;
    curl_close($curl);

But this give me a HTTP 500 error and I don't see any log in the project log file :'(

Do you have any idea why?


 
Posted : 26 Feb 2020 17H27
(@antoine1003)
Posts: 36
Active Member
Topic starter
 

I found the proble the link to the htpasswd wasn't good


 
Posted : 26 Feb 2020 18H49
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

I thin you'll find explanation in apache error log file.
Most common issue is that .htpassword is not correctly defined (it is not by default to avoid security issue)


 
Posted : 01 Mar 2020 23H38
Share:

Scroll to Top