Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
500 when trying to save settings
#1
I have a website that works fine on localhost, and works fine on my old host.

I'm now trying to move it to a new host like this (per the docs):
* Install a clean copy of GSCMS
* copy /data, /plugins /themes, gsconfig, and .htaccess from my localhost copy
* login, and set the website url.

But I'm failing at the last stage. I'm getting a 500 when I try and submit the new url (or in fact, try and save that page in general, even if nothing has changed).

I don't seem to be able to find a log anywhere which indicates what the actual error is.

The new host is HostPapa, accessed via cPanel and FTP.

GSCMS 3.3.13
Apache Version 2.4.27
PHP Version 5.6.31

I've confirmed all the files in the root of the directory are 755

Does anyone have any thoughts?
Reply
#2
(2017-09-26, 07:28:23)choccyness Wrote: But I'm failing at the last stage. I'm getting a 500 when I try and submit the new url (or in fact, try and save that page in general, even if nothing has changed).

can you post the .htaccess-file?

Alex
Reply
#3
(2017-09-26, 16:57:49)Alexander_ Wrote: can you post the .htaccess-file?
Sure:



Code:
#
# GetSimple CMS htaccess ROOT file
# apache 2.4
#

# The following require certain allow overrides, if getting 500 error comment them out one by one
# can be resolved in apache httpd.conf to ensure security alternatives

# override charset
AddDefaultCharset UTF-8

# prevent directory listings
Options -Indexes

# Follow symbolink links, This is required for rewrites on some hosts
Options +FollowSymLinks

# Set the default handler.
DirectoryIndex index.php

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    <IfModule !mod_authz_core.c>
        Deny from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Deny from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all denied
        </IfModule>
    </IfModule>    
</Files>

<Files sitemap.xml>
    <IfModule !mod_authz_core.c>
        Allow from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Allow from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all granted
        </IfModule>
    </IfModule>    
</Files>

# handle rewrites for fancy urls
<IfModule mod_rewrite.c>
    RewriteEngine on

    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /example.com/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>
Reply
#4
The error is in your host logs, and is usually an illegal options directive in htaccess.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2017-09-27, 06:36:58)choccyness Wrote:
Code:
    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /example.com/
I guess /example.com/ isn't the correct subdirectory.

Alex
Reply
#6
(2017-09-28, 18:17:17)Alexander_ Wrote:
(2017-09-27, 06:36:58)choccyness Wrote:
Code:
    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /example.com/
I guess /example.com/ isn't the correct subdirectory.

Alex

Yep. It's... well an example domain stand-in for my real-domain which was the subdirectory on localhost (though there is no subdirectory on the machine I'm trying to put it on). :-)
(if you didn't know, there's an RFC reserving example.com for exactly these purposes ;-) )
Reply
#7
(2017-09-27, 22:41:48)shawn_a Wrote: The error is in your host logs, and is usually an illegal options directive in htaccess.

I've posted my entire htaccess above, and even if I delete the one in the parent directory, I still get the error. I've tried uninstalled and re-installing a few times in a few ways, but to no effect.

The only thing I can find in any of the logs when I make the request is:
Code:
999.999.999.999 - - [28/Sep/2017:22:27:20 +0100] "POST /admin/settings.php HTTP/1.1" 500 - "http://www.example.com/admin/settings.php" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0"

edit1: The host looked in the log for me (HostPapa is actually fairly pro-active it seems!) and this is what's in it:

Code:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: https://www.example.com/admin/settings.php

Any ideas what might be causing it?
There are no redirects behind the page to the best of my knowledge.

edit2: I've also tried culling the .htaccess of everything that might cause it, leaving just the below, but to no avail.
Code:
# override charset
AddDefaultCharset UTF-8


# Set the default handler.
DirectoryIndex index.php

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    <IfModule !mod_authz_core.c>
        Deny from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Deny from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all denied
        </IfModule>
    </IfModule>    
</Files>

<Files sitemap.xml>
    <IfModule !mod_authz_core.c>
        Allow from all
    </IfModule>
    <IfModule mod_access_compat.c>
        Allow from all
    </IfModule>
    <IfModule mod_authz_core.c>
        <IfModule !mod_access_compat.c>
            Require all granted
        </IfModule>
    </IfModule>    
</Files>
Reply
#8
Put a real site url in your settings
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
(2017-09-29, 10:43:51)shawn_a Wrote: Put a real site url in your settings

What do you mean?
Are you referring to the example.com? Because I've replaced my real domain with example.com for the posts here to retain privacy and security. Example.com is not in any of my actual files. Apologies if that wasn't clear.

If you mean "change the settings page in the admin console" - well I can't, that's my problem. Any time I try and save those settings, I get a 500. :-(
Reply
#10
(2017-09-29, 03:13:46)choccyness Wrote: Yep. It's... well an example domain stand-in for my real-domain which was the subdirectory on localhost (though there is no subdirectory on the machine I'm trying to put it on).  :-)

If there is no subdirectory, why did you set it in the .htaccess file?

change it to
Code:
RewriteBase /
Reply
#11
On my localhost (where it was developed) it is here:
localhost/example.com

Although re-reading the migration instructions I see now that I should have manually changed this line. Unfortunately, having changed this, the problem (500 courtesy of infinite redirects when trying to save settings) remains.

-----
Below is the output of the "website health check" page. All green as best I can see:

Code:
GetSimple

GetSimple Version    3.3.13
Latest version installed
GSLOGINSALT    No
GSUSECUSTOMSALT    No
Server Setup

PHP Version    5.6.31 - OK
cURL Module    Installed - OK
GD Library    Installed - OK
ZipArchive    Installed - OK
SimpleXML Module    Installed - OK
chmod    chmod - OK
Apache Web Server    Apache - OK
Apache Mod Rewrite    Installed - OK
For more information on the required modules, visit the requirements page.

Data File Integrity Check

/data/pages/consultancy.xml    XML Valid - OK
/data/pages/contact.xml    XML Valid - OK
/data/pages/data-visualisation.xml    XML Valid - OK
/data/pages/fme.xml    XML Valid - OK
/data/pages/index.xml    XML Valid - OK
/data/pages/portfolio.xml    XML Valid - OK
/data/pages/training.xml    XML Valid - OK
/data/other/404.xml    XML Valid - OK
/data/other/authorization.xml    XML Valid - OK
/data/other/components.xml    XML Valid - OK
/data/other/pages.xml    XML Valid - OK
/data/other/plugins.xml    XML Valid - OK
/data/other/website.xml    XML Valid - OK
/data/other/logs/failedlogins.log    XML Valid - OK
/backups/users/adminy.xml    XML Valid - OK
Directory Permissions

File Name: /data/other/plugins.xml    0644 Writable - OK
/data/pages/    0755 Writable - OK
/data/other/    0755 Writable - OK
/data/other/logs/    0755 Writable - OK
/data/thumbs/    0755 Writable - OK
/data/uploads/    0755 Writable - OK
/data/users/    0755 Writable - OK
/data/cache/    0755 Writable - OK
/backups/zip/    0755 Writable - OK
/backups/pages/    0755 Writable - OK
/backups/other/    0755 Writable - OK
/backups/users/    0755 Writable - OK
.htaccess Existence

/data/    Good 'Deny' file - OK
/data/uploads/    Good 'Allow' file - OK
/data/users/    Good 'Deny' file - OK
/data/cache/    Good 'Deny' file - OK
/data/thumbs/    Good 'Allow' file - OK
/data/pages/    Good 'Deny' file - OK
/plugins/    Good 'Deny' file - OK
/data/other/    Good 'Deny' file - OK
/data/other/logs/    Good 'Deny' file - OK
/theme/    No file - OK
Reply
#12
Make sure you copied the index.php file

I would do a fresh install and test
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#13
(2017-09-30, 23:58:59)shawn_a Wrote: Make sure you copied the index.php file

I would do a fresh install and test

I've already wiped and re-installed my site multiple times in multiple ways to no avail. (the index.php was definitely copied - my home-page worked to some degree, it just couldn't load external assets as it was looking at localhost).

So I've now uploaded a fresh clean install of GSCMS 3.3.13. Followed the instructions per: http://get-simple.info/wiki/installation
But it fails at step 6. When I go to the example.com/admin page for the first time I get a 500 error. :-(

Per step 4, I have recursively set all content in the /data/ directory to 755, and spot-confirmed this.

So it seems the problem is fairly fundamental to the admin pages.
Reply
#14
That step is not required but could be required on some hosts.
Does your host error log still say too many redirects?

Are you installing in a subfolder?

Might there be a higher directory htaccess redirect?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#15
(2017-10-01, 08:04:18)shawn_a Wrote: That step is not required but could be required on some hosts.
Does your host error log still say too many redirects?

Are you installing in a subfolder?

Might there be a higher directory htaccess redirect?

Not in a subfolder. It's in the main /public_html.
No higher .htaccess (at least that I can get to). I removed that a while back.

But it seems the problem is fixed in whatever version downloading straight from gitlab is. That version runs fine. Both the installation page, and the settings problem.
So there's something buggy in the 3.3.13 release here: (http://get-simple.info/download) - that isn't broken in the "gitlab" version.

The downside of course being I now have an "alpha" version of GSCMS installed on a production site. Undecided
Reply
#16
Nothing here is bugged, everything works well. You have just destroyed your installation by damaging your .htaccess file.
Reply
#17
Hmm yeah not sure you can try the stable branch on github its the 3.3.x release should match the zip though.
Did you have any plugins or anything changed from default install?

Was it the login that 500 or the settings only?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#18
(2017-10-02, 04:05:10)Bigin Wrote: Nothing here is bugged, everything works well. You have just destroyed your installation by damaging your .htaccess file.

No. I replaced the .htaccess more times than I could count.
In the end there were two fresh, clean installs of GSCMS installs:

/public_html/master = git = works
/public_html/new = official release = broken

Both were extracted (7zip) and uploaded (filezilla) using the same method. The only difference was the content of the releases.
Reply
#19
(2017-10-02, 04:51:25)shawn_a Wrote: Did you have any plugins or anything changed from default install?

Was it the login that 500 or the settings only?

No plugins. As myreply to Bigin just above this one, both were straight up extracts of the zips.

Broken (release) version the following URL's broke (but both work fine for the git version):

example.com/admin/ - for the fresh install this should give the install config page, but it gives a 500.

example.com/admin/settings - having "migrated" my site up, when I tried to save this page it resulted in a 500.

Conclusion to me is that there's something about the admin page that simply doesn't work for me in the official relase.
Reply
#20
Hmm, hard to say when you can't see it directly, have you tried to exchange the .htaccess files between installations? I've had no issues with any of them so far.

Can you please tell who is your hosting provider?
Reply
#21
(2017-10-04, 08:04:06)choccyness Wrote: example.com/admin/ - for the fresh install this should give the install config page, but it gives a 500.

example.com/admin/settings - having "migrated" my site up, when I tried to save this page it resulted in a 500.

Conclusion to me is that there's something about the admin page that simply doesn't work for me in the official relase.

Would you post again the .htaccess of the installation that doesn't work? Can you post the URL of the site?

Alex
Reply
#22
(2017-10-04, 17:33:24)Bigin Wrote: Hmm, hard to say when you can't see it directly, have you tried to exchange the .htaccess files between installations? I've had no issues with any of them so far.

Can you please tell who is your hosting provider?

It's in two posts already, but HostPapa
Reply
#23
(2017-10-04, 18:14:43)Alexander_ Wrote:
(2017-10-04, 08:04:06)choccyness Wrote: example.com/admin/ - for the fresh install this should give the install config page, but it gives a 500.

example.com/admin/settings - having "migrated" my site up, when I tried to save this page it resulted in a 500.

Conclusion to me is that there's something about the admin page that simply doesn't work for me in the official relase.

Would you post again the .htaccess of the installation that doesn't work? Can you post the URL of the site?

Alex

The .htaccess is the one that comes with the install here: http://get-simple.info/latest

I'm afraid I can't post the url of the site (but it's working now anyway, because I've left the github alpha up).
Reply
#24
(2017-10-07, 07:42:06)choccyness Wrote: The .htaccess is the one that comes with the install here: http://get-simple.info/latest

Surely not. The one that comes with the install contains
Code:
    RewriteBase **REPLACE**

And that would cause an 500 error.

Alex
Reply
#25
( the htaccess gets modified during install by the install script with your path )

sometimes the permissions are different in the github zip files, other than that I dont know.

What version of apache what version of php ?

back on stable,
Enable debug in gsconfig.

Goto admin/index.php
what is in GS error log ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels