0

I have a pterodactyl container running with a nginx and fpm egg (https://gitlab.com/tenten8401/pterodactyl-nginx) and am trying to get my sharex image uploader moved from my old site. However every time i try and access the site i get this error

2021/06/08 19:25:38 [error] 19#19: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function session_start() in /home/container/webroot/index.php:4
Stack trace:
#0 {main}
  thrown in /home/container/webroot/index.php on line 4" while reading response header from upstream, client: ip.address, server: , request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "ip.address:20004"
173.249.9.172 - - [08/Jun/2021:19:25:38 +0000] "GET / HTTP/1.0" 500 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ip.address Safari/537.36"

I have tried installing the package as found in this answer (Call to undefined function session_start()) but it just says opkg isnt found on the path as for the php -i once again says php isnt found on the path (both run inside the docker container). I have also tried apk add php7-mod-session but i get a permission error from the container.

I have tried a few things from adding php-mod-session to the apk add and some other stuff but nothing ever changes the error so i dont believe any of these are the right line of progress.

Any help or hints in the right direction would be great, me and my friend have been working on this for a week or so now but cant find the fix. I can also add config files and stuff if you feel they might help, just ask.

  • Does this answer your question? [Call to undefined function session\_start()](https://stackoverflow.com/questions/27428424/call-to-undefined-function-session-start) – AD7six Jun 08 '21 at 21:22
  • Like i said in my initial post i have tried many things including stuff from that post most of which just doesnt work or errors in many ways. – LostAndDead Jun 09 '21 at 12:34
  • Please demonstrate that by editing the question to add details - it seems quite clear the session extension is not loaded, so it won't work until you address that; the steps to do so are outlined in the linked question :). – AD7six Jun 09 '21 at 13:30
  • I tried adding it by executing the command inside my docker container (adjusted for php version) but i just get an error whenever i try it (https://hastebin.com/uhunomezud.apache) – LostAndDead Jun 09 '21 at 13:49
  • Please demonstrate that by **editing the question to add details** :). that link just shows calling a command that doesn't exist. – AD7six Jun 09 '21 at 13:50
  • If that command doesnt exist then how do i add the package? – LostAndDead Jun 09 '21 at 13:52
  • where are you picking `opkg` from? the docker file for the project you linked to uses alpine - so you need to search for 'how to install php session extension in alpine linux' and act accordingly. you need to effectively add `php7-session` here https://gitlab.com/tenten8401/pterodactyl-nginx/-/blob/master/Dockerfile#L4 - anyway, good luck ! – AD7six Jun 09 '21 at 13:54

0 Answers0