500 error when making changes to site.

Discussion in 'General' started by Korsch, Feb 26, 2023.

  1. Korsch

    Korsch New Member

    Ive been in this thread alot in the past days sorry to be a bother, I keep getting a 500 error when I try to make a change to my site, reversing the change gets rid of the error. ive never had an issue with this on other platforms, more specifically this is what im trying to do.
    add
    Code:
    $config['removeThemeHouseBranding'] = true
    to my Xenforo forum config file to remove branding. I download the file over FTP then edit it on my desktop, save it and send it back over via FTP. this is my first time getting an error and is my first time doing it with ISPConfig so im curious about why this is happening.

    EDIT: the error only effects the /forum directory. the main site and control panel are not effected.
     
  2. remkoh

    remkoh Active Member HowtoForge Supporter

    500 is server error.
    So the server, I guess PHP, can't process something for whatever reason.
    Check the error log and find the corresponding entry.
    That most likely will give you a clue about what's going wrong and maybe can point you towards the solution.
     
  3. Korsch

    Korsch New Member

    Running
    Code:
    sudo cat /var/log/nginx/error.log
    didn't really show me and errors that were related to my forum. mainly just a couple
    Code:
    request: "GET /favicon.ico HTTP/2.0"
    what interests me is that from the save file putting the forum in developer mode with
    Code:
    $config['development']['enabled'] = true;
    doesnt present the 500 error, it simply enables dev mode, its only when removing branding.
     
    Last edited: Feb 26, 2023
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you are using ISPConfig? If yes, then that's the wrong log file. The access and error.log of the website is in the log folder of the website. E.g. /var/www/yourdomain.tld/log/error.log

    And as @remkoh mentioned, this is a server error, probably an error in the code of that theme or this theme needs an additional PHP module that is not installed on your system or you use a PHP version for that website that is not compatible with that theme. But the error.log of the site will show you what that error is.
     
  5. Korsch

    Korsch New Member

    these were the only error pertaining to the forum that were in my error.log
    Code:
    2023/02/26 01:48:42 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:48:42 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:48:43 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:50:49 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:50:49 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:52:41 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:52:41 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:17 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:17 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:18 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:18 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:19 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:20 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:52 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:52 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:57 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:55:29 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:55:29 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:57:03 [error] 491372#491372: *386 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file or>
    2023/02/26 01:57:03 [error] 491372#491372: *387 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No >
    2023/02/26 01:57:06 [error] 491372#491372: *400 openat() "/var/www/domain.ca/web/browserconfig.xml" failed (2: No such file or di>
    2023/02/26 02:01:44 [error] 491372#491372: *405 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 02:28:29 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:28:34 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:28:35 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
    2023/02/26 02:28:43 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:29:07 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
    2023/02/26 02:30:22 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You did not post the full lines, that's why ist not possible to see why the 500 error occurs. The likely lines are the ones with the parsing error. So there is either a typo in that script or you use a wrong PHP version or a PHP module is missing.
     
  7. Korsch

    Korsch New Member

    Sorry I through only info pertaining to the forum directory was important.
    here is the full error.log file...atleast all that shows for me in the file.
    Code:
    2023/02/26 01:30:09 [error] 491372#491372: *89 openat() "/var/www/domain.ca/web/hudson" failed (2: No such file or directory), cl>
    2023/02/26 01:30:25 [error] 491372#491372: *89 openat() "/var/www/domain.ca/web/config/getuser" failed (2: No such file or direct>
    2023/02/26 01:48:42 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:48:42 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:48:43 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:50:49 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:50:49 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:52:41 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:52:41 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:17 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:17 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:18 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:18 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:53:19 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/data/assets/logo/logo.png" failed (2: No s>
    2023/02/26 01:53:20 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:52 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:52 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:54:57 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:55:29 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:55:29 [error] 491372#491372: *147 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 01:57:03 [error] 491372#491372: *386 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file or>
    2023/02/26 01:57:03 [error] 491372#491372: *387 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No >
    2023/02/26 01:57:06 [error] 491372#491372: *400 openat() "/var/www/domain.ca/web/browserconfig.xml" failed (2: No such file or di>
    2023/02/26 02:01:44 [error] 491372#491372: *405 openat() "/var/www/domain.ca/web/forum/styles/uixclassic/basic/uix_logoSmall.png">
    2023/02/26 02:28:29 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:28:34 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:28:35 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
    2023/02/26 02:28:43 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:29:07 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
    2023/02/26 02:30:22 [error] 491372#491372: *603 openat() "/var/www/domain.ca/web/forum/i" failed (2: No such file or directory), >
    2023/02/26 02:31:51 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:31:52 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:00 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:00 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:08 [error] 491372#491372: *713 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:09 [error] 491372#491372: *713 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:28 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:32:30 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:33:12 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:33:15 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:33:15 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:34:13 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:35:54 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:36:00 [error] 491372#491372: *810 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No >
    2023/02/26 02:36:00 [error] 491372#491372: *810 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file or>
    2023/02/26 02:36:01 [error] 491372#491372: *811 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No >
    2023/02/26 02:36:01 [error] 491372#491372: *811 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file or>
    2023/02/26 02:36:06 [error] 491372#491372: *813 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:36:17 [error] 491372#491372: *813 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected >
    2023/02/26 02:36:44 [error] 491372#491372: *836 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No >
    2023/02/26 02:36:44 [error] 491372#491372: *836 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file or>
    2023/02/26 04:54:39 [error] 491372#491372: *1037 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 04:54:39 [error] 491372#491372: *1037 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 04:56:55 [error] 491372#491372: *1099 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 04:56:55 [error] 491372#491372: *1099 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 04:57:08 [error] 491372#491372: *1101 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 04:57:08 [error] 491372#491372: *1101 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 04:57:23 [error] 491372#491372: *1103 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 04:57:23 [error] 491372#491372: *1103 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 08:06:52 [error] 491372#491372: *1282 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 08:06:52 [error] 491372#491372: *1282 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 08:06:53 [error] 491372#491372: *1283 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 08:06:53 [error] 491372#491372: *1283 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 08:08:28 [error] 491372#491372: *1280 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected>
    2023/02/26 09:10:19 [error] 491372#491372: *1865 openat() "/var/www/domain.ca/web/apple-touch-icon-precomposed.png" failed (2: No>
    2023/02/26 09:10:19 [error] 491372#491372: *1865 openat() "/var/www/domain.ca/web/apple-touch-icon.png" failed (2: No such file o>
    2023/02/26 09:10:25 [error] 491372#491372: *1866 openat() "/var/www/domain.ca/web/apple-touch-icon-120x120-precomposed.png" faile>
    
    Im running PHP 8.0, Running the test requirement script for xenforo showed compatibility. Ive ran this set up lots on CloudPanel.io but made the move here because im using a dedicated server now and dont have to be stingy with resources like I did with a VPS(statistics ,mail etc). I really do appreciate all the help that you and the community have been offer!
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The error is clearly a syntax error in that file. But you still did not post the full error lines. See:

    The actual error is on the right side behind the > of the line, but you did not post this. Most likely, you used some kind of editor to view the file, which cuts the line. Use cat or grep command instead. e.g.

    grep "PHP Parse error" error.log

    and post the output you get in the terminal.
     
  9. Korsch

    Korsch New Member

    sorry I used nano to get the error.log file because originally using cat didn't lay it out nice when I pasted it here. I used "cat /var/www/domain.ca/log/error.log" and found I think there was a syntax error.
    Code:
    2023/02/26 02:28:43 [error] 491372#491372: *603 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected variable "$config" in /var/www/clients/client0/web2/web/forum/src/config.php on line 10PHP message: PHP Parse error:  syntax error, unexpected variable "$config" in /var/www/clients/client0/web2/web/forum/src/config.php on line 10" while reading response header from upstream, client: MY_IP_ADDRESS, server: domain, request: "GET /forum/admin.php?styles/ui-x-classic-child.3/style-properties/group&group=basic HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php7.4-fpm/web2.sock:", host: "domain.ca", referrer: "https://domain/forum/admin.php?styles/ui-x-classic-child.3/style-properties/group&group=basic"
    which I dont understand how, all I had done was copy and pasted the code, maybe I had a space in there somewhere, ive tired again this morning and it worked flawlessly. kinda confused but it is working now.
     
    ahrasis likes this.
  10. Chrix98

    Chrix98 New Member

    clearly a php syntax error ... Check the occurrences of $config in
    /var/www/clients/client0/web2/web/forum/src/config.php and then scroll left from that variable and check if the previous line has a semicolon...
     
    ahrasis likes this.
  11. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    not just the previous line, shouldn't the line he's adding:
    Code:
    $config['removeThemeHouseBranding'] = true
    
    end with a semi-colon?
     
  12. Korsch

    Korsch New Member

    yes it should end in a semi-colon. its possible I didn't copy that from the original source.
     
  13. remkoh

    remkoh Active Member HowtoForge Supporter

    So it's solved now or do you stil get 500 error?
     
  14. Korsch

    Korsch New Member

    I wrote Sunday that I had tried the code and it “worked flawlessly” solving the issue.
     
  15. remkoh

    remkoh Active Member HowtoForge Supporter

    Sorry, missed that.
    Good to hear it's solved.
     
    Korsch likes this.

Share This Page