[GH-ISSUE #36] Need help with my self-hosting. #25

Closed
opened 2026-02-27 19:05:22 +03:00 by kerem · 2 comments
Owner

Originally created by @PeterStark000 on GitHub (Jan 24, 2024).
Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/36

I hosted the REST API on Vercel, configured the environment variable, everything is fine! But every time I try to search for a letter, I get this issue:

<br />
<b>Fatal error</b>:  Uncaught Error: Call to undefined function SpotifyLyricsApi\curl_init() in /var/task/user/src/Spotify.php:37
Stack trace:
#0 /var/task/user/src/Spotify.php(74): SpotifyLyricsApi\Spotify-&gt;getToken()
#1 /var/task/user/api/index.php(27): SpotifyLyricsApi\Spotify-&gt;checkTokenExpire()
#2 {main}
  thrown in <b>/var/task/user/src/Spotify.php</b> on line <b>37</b><br />

Would you know what this could be or how to fix it? Also, I don't know if it's related, but when I started the build, a warning message appeared in the console.

Warning: PHP Startup: Unable to load dynamic library 'mongodb' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb.so (libutf8proc.so.1: cannot open shared object file: No such file or directory)) in Unknown on line 
14:36:56.952 | Warning: PHP Startup: Unable to load dynamic library 'swoole' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole.so (libodbc.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0
Originally created by @PeterStark000 on GitHub (Jan 24, 2024). Original GitHub issue: https://github.com/akashrchandran/spotify-lyrics-api/issues/36 I hosted the REST API on Vercel, configured the environment variable, everything is fine! But every time I try to search for a letter, I get this issue: ``` <br /> <b>Fatal error</b>: Uncaught Error: Call to undefined function SpotifyLyricsApi\curl_init() in /var/task/user/src/Spotify.php:37 Stack trace: #0 /var/task/user/src/Spotify.php(74): SpotifyLyricsApi\Spotify-&gt;getToken() #1 /var/task/user/api/index.php(27): SpotifyLyricsApi\Spotify-&gt;checkTokenExpire() #2 {main} thrown in <b>/var/task/user/src/Spotify.php</b> on line <b>37</b><br /> ``` Would you know what this could be or how to fix it? Also, I don't know if it's related, but when I started the build, a warning message appeared in the console. ``` Warning: PHP Startup: Unable to load dynamic library 'mongodb' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/mongodb.so (libutf8proc.so.1: cannot open shared object file: No such file or directory)) in Unknown on line 14:36:56.952 | Warning: PHP Startup: Unable to load dynamic library 'swoole' (tried: /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole (/vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole: cannot open shared object file: No such file or directory), /vercel/path0/.vercel/builders/node_modules/@libphp/amazon-linux-2-v82/native/php/modules/swoole.so (libodbc.so.2: cannot open shared object file: No such file or directory)) in Unknown on line 0 ```
kerem closed this issue 2026-02-27 19:05:22 +03:00
Author
Owner

@akashrchandran commented on GitHub (Jan 25, 2024):

Hi,
The issue should be resolved with the commit 38bc05d3ee. My apologies for the error, and I appreciate your patience. Delete the olddeployment and proceed with re-deploying the project from start. To re-deploy you can click on the below button.

Deploy with Vercel

<!-- gh-comment-id:1910358618 --> @akashrchandran commented on GitHub (Jan 25, 2024): Hi, The issue should be resolved with the commit 38bc05d3ee841452a4cc03a00eba15453fa61ae2. My apologies for the error, and I appreciate your patience. Delete the olddeployment and proceed with re-deploying the project from start. To re-deploy you can click on the below button. [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fakashrchandran%2Fspotify-lyrics-api%2Ftree%2Fmain&env=SP_DC&envDescription=Want%20to%20host%20your%20own%20version%20of%20this%20API%2C%20then%20you'll%20first%20need%20SP_DC%20cookie%20from%20spotify.&envLink=https%3A%2F%2Fgithub.com%2Fakashrchandran%2Fsyrics%2Fwiki%2FFinding-sp_dc&project-name=spotify-lyrics-api&repository-name=spotify-lyrics-api&redirect-url=https%3A%2F%2Fgithub.com%2Fakashrchandran%2Fspotify-lyrics-api%23examples)
Author
Owner

@PeterStark000 commented on GitHub (Jan 26, 2024):

Thank you!

<!-- gh-comment-id:1912098496 --> @PeterStark000 commented on GitHub (Jan 26, 2024): Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-lyrics-api#25
No description provided.