1

Basically I upload files to the Messenger API with the php curl functions. The client sents the files with AJAX which are then uploaded to our server so the Messenger API can use the url to that file. The problem is when I send the request to the API with this url, the whole website is blocked and can't any accept requests until it gets the response from the API that the upload is finished. Is there any way to make cURL not block everything or at least not wait for response so code execution can continue?

  • Is your system using PHP sessions? Then those are likely to blame, and the solution is https://stackoverflow.com/questions/3371474/php-sessions-is-there-any-way-to-disable-php-session-locking – CBroe Jul 06 '21 at 12:04
  • You have to use promise or await for your Ajax request – Stefino76 Jul 06 '21 at 12:16
  • @Stefino76 the problem is not client-side but server-side. if two users use the site both have to wait for the response so they can continue using the site – harold jefferson Jul 06 '21 at 13:21
  • @CBroe oh my god thank you so much, i didn't know about session blocking. when i tried using the site with another session everything worked – harold jefferson Jul 06 '21 at 13:27

0 Answers0