flatpressblog / flatpress

FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.
https://flatpress.org
GNU General Public License v2.0
181 stars 58 forks source link

When trying to run the setup, Error 500 | chmod | cPanel #386

Open Fraenkiman opened 4 months ago

Fraenkiman commented 4 months ago

Hello @RoopeshKharvi,

https://github.com/flatpressblog/flatpress/issues/371#issuecomment-2082344806

It's not work for me. I have modified these 2 files (https://github.com/flatpressblog/flatpress/commit/ba890f33c6981e7e9171d849f6fef9bcbbcf17f9) Screenshot 2024-04-30 231602

https://github.com/flatpressblog/flatpress/issues/371#issuecomment-2084955466

both works in docker (https://github.com/flatpressblog/flatpress/commit/ab1a9df6d37be2db464e8fd86dd203e3affd6754 and https://github.com/flatpressblog/flatpress/archive/refs/heads/master.zip)
but not work in c panel.

if possible, please provide us with relevant portions of the error log of your webserver or PHP. Or another output or log file that may contain more details.

With best regards Frank

RoopeshKharvi commented 3 months ago

I have tested the master branch manually, and it shows a console log error (500) after setup.php I have attached a screenshot. flatpress

Fraenkiman commented 3 months ago

Hello @RoopeshKharvi,

Thank you for your feedback. I had hoped for server logs to be able to identify a possible cause more specifically. Do you use a web host service or do you host yourself? If you can submit server logs later, please do so. That would make it easier to track down the cause.

Otherwise, we will have to work together to narrow down the cause.

I have created five additional branches for you. These branches differ in the scope of features. In other words: I have selectively switched off one or the other feature.

  1. Only http:// possible

  2. only https:// possible

We also need the information as to whether you accessed the setup via http:// or https://. It is best to test both.

  1. Without language recognition based on the browser or server. English only.

  2. Without trying to set file and directory permissions

  3. Smarty 4.3.1 instead of Smarty 4.4.1

Which PHP version is running on the web server?

Please test all five branches and let us know which of the five you were able to set up successfully.

With best regards Frank

RoopeshKharvi commented 3 months ago

Thank you so much Sir, for your response @Fraenkiman 4th one is worked, (4. https://github.com/Fraenkiman/flatpress/archive/refs/heads/no-attempt-to-set-file-and-directory-permissions.zip ) but the remaining 4 are failure, I have tested all in PHP 7.4, 8.0, 8.1 and 8.2

Fraenkiman commented 3 months ago

Hello @RoopeshKharvi,

Thank you very much for testing. We seem to have an issue with the chmod_r function in the main.php file. Strange, I can't get the problem to reproduce. Possibly BASE_DIR is not returning a consistent, absolute path from the defaults.php file.

https://github.com/flatpressblog/flatpress/blob/beb6172a7e98e3597574aec652dbb654f7bc3a5a/setup/main.php#L5

https://github.com/flatpressblog/flatpress/blob/beb6172a7e98e3597574aec652dbb654f7bc3a5a/defaults.php#L39

I have created a branch for this. Please test this branch and let us know shortly, as we are planning the 1.3.1 release for this Saturday.

With best regards Frank

@azett, can you please test this branch as well? cPanel is used by some webhosters. I would therefore quickly find a solution for this.

RoopeshKharvi commented 3 months ago

Sir, Fraenkiman I have tested https://github.com/Fraenkiman/flatpress/archive/refs/heads/file-and-dir-perms-by-setup.zip in c panel with PHP 7.1 to 8.2, all are failed.

Fraenkiman commented 3 months ago

Hello @RoopeshKharvi ,

strange, we're not really getting any closer to the cause. cPanel is a web-based configuration tool for web servers, as far as I remember. Is that correct? Similar to Webmin. Or do you mean something else by c panel?

Do you have the possibility to post the error logs here?

If you are actually using cPanel, please go through the instructions on this website. There may be a misconfiguration.

Best regards Frank

RoopeshKharvi commented 3 months ago

Ok, Thanks.