Atheos / Atheos

A self-hosted browser-based cloud IDE, updated from Codiad IDE
https://www.atheos.io/
482 stars 74 forks source link

Can't complete setup on nginx with php-fpm #292

Open crazy-logic opened 1 month ago

crazy-logic commented 1 month ago

Hey all,

bit of a weird one - have a host with Nginx and PHP8.3 (FPM) and i can't get past the Initial Setup page.

i've checked my php-fpm and nginx with some custom php scripts, i can create files and directories from php, so it's unlikely a file permission problem (i think).

when filling out and then pressing the install button i get the following in the address bar

"http://IP/a/?username=matt&password=xxx&validate=xxx&projectName=dev&projectPath=dev&domain=&development=true&analytics=true&timezone=Pacific%2FMidway"

and the page returns to a blank initial setup state. no DIR's are created in the workspace dir, and the config.php file contains no infomation/is blank.

Where should i go next to trouble shoot this?

HLSiira commented 1 month ago

That is indeed a weird one; sadly I don't have an nginx environment to tinker with, so you'll have to work with me a bit.

I'm assuming that you removed your IP address from that URL. Do you have have error or access logs that might have some clues?

Overall there shouldn't be anything in your address bar, the javascript should be catching any form submissions and redirecting them to ajax posts, so I'm curious if the browser console is showing you any missing scripts or resources.

crazy-logic commented 1 month ago

Bingo; console shows some 403's on some scripts and CSS, with them now accessible I get a 500 error in ".../components/install/process.php 500 (Internal Server Error)"

looking in the nginx log I get; FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string in /var/www/html/a/traits/helpers.php:23 Stack trace:

0 /var/www/html/a/components/install/process.php(88): Common::version()

1 {main}

thrown in /var/www/html/a/traits/helpers.php on line 23" while reading response header from upstream, client: x.x.x.x, server: _, request: "POST /a/components/install/process.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.3-fpm.sock:", host: "x.x.x.x"