I am having issues with HTTPS. I have enforced HTTPS on my site at server level and within .htaccess. But when I edit a Workflow and then try to save it I get an http 500 error. It seems that it is trying to save it under http without using ssl for some reason. I have changed the “site url” in the config.php to have https in it but to no avail. I have also cleared out my cache.
Any help from you good folks would be appreciated.
Thank you for the reply, but no that is not the answer. It is only when I edit a record and then go to save that record that it kicks me out to an http page with a 500 error, (understandably) . I then have to log back in and I find that the record has been saved.
Any further suggestions would be appreciated. Don’t particularly wish to go back to http only.
I think that is simply going through SugarController.php Save action, and that it uses the normal redirect (after saving a an edit view, it redirects to the detail view). This relies on site_url.
What exactly do you have in site_url? Does it end with a slash?
I also have tried setting 'verify_client_ip => false and that has no effect either. I am just wondering if there is a hard coded http crept into the code somewhere that has not been noticed?
# BEGIN SUITECRM RESTRICTIONS
# BEGIN SUITECRM RESTRICTIONS
RedirectMatch 403 .*\.log$
RedirectMatch 403 /+not_imported_.*\.txt
RedirectMatch 403 /+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules|vendor)/+.*\.(php|tpl)
RedirectMatch 403 /+emailmandelivery\.php
RedirectMatch 403 /+.git
RedirectMatch 403 /+.cache/
RedirectMatch 403 /+tests
RedirectMatch 403 /+RoboFile\.php
RedirectMatch 403 /+composer\.json
RedirectMatch 403 /+composer\.lock
RedirectMatch 403 /+upload
RedirectMatch 403 /+custom/+blowfish
RedirectMatch 403 /+cache/+diagnostic
RedirectMatch 403 /+files\.md5$
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
Options -Indexes
Options -MultiViews
RewriteEngine On
RewriteBase /crm
RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&modulename=app_strings&lang=$1 [L,QSA]
RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&modulename=$1&lang=$2 [L,QSA]
# --------- DEPRECATED --------
RewriteRule ^api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^api/(.*?)$ lib/API/public/index.php/$1 [L]
# -----------------------------
RewriteRule ^Api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^Api/access_token$ Api/index.php/access_token [L]
RewriteRule ^Api/V8/(.*?)$ Api/index.php/V8/$1 [L]
</IfModule>
<IfModule mod_headers.c>
Header unset ETag
FileETag None
</IfModule>
<IfModule mod_headers.c>
Header unset X-Powered-By
Header always unset X-Powered-By
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 year"
# Data
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/ld+json "access plus 0 seconds"
ExpiresByType application/schema+json "access plus 0 seconds"
ExpiresByType application/geo+json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/calendar "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Favicon
ExpiresByType image/x-icon "access plus 1 week"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# JavaScript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
# Markdown
ExpiresByType text/markdown "access plus 0 seconds"
# Media files
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/bmp "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType image/webp "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# Fonts
ExpiresByType font/eot "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType font/otf "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/ttf "access plus 1 month"
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"
ExpiresByType application/font-woff2 "access plus 1 month"
ExpiresByType font/woff2 "access plus 1 month"
# Other
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
</IfModule>
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]
</IfModule>
# END SUITECRM RESTRICTIONS
Can;t see anything in there that is making this happen.
When the 500 error appears it is just on 9659.co.uk/crm/index.php the rest of the usl that should redirect back to the detail view of the record is missing.
To be honest, I don’t understand htaccess files. If you say that is the default, that is enough for me…
Maybe the “Network” tab in your browser will give you some additional details about the redirect. but if not, I am a bit lost, I don’t know what else to tell you…
Thank you for the suggestions. I hope that someone else will have some ideas as this is going to be difficult to use suitecrm with it doing this all the time we wish to save an edit.
This seems to be in all modules. “Create New” edit form “Save” leads to the 500 error. Log back into suitecrm and the entry has been saved. It is only when I go to save either a new entry or edit an entry and try and save it. Inline editing works fine.
Using the demo.suiteondemand.com and softaculous it works fine so don’t think it is browser related. Both of those are https.
I think it is about time that I did a re-install of suitecrm. But has anyone written down the procedure for doing it whilst preserving the data that already exists. I have added a lot of custom fields and it would be a great shame to have to add them all again. (Also time consuming.)
OK, just as an update, a new installation works as it should. Is there any way to transfer all the Custom fields from the old installation to the new one without having to add them all from scratch?
I have now followed one of your previous posts on transferring the Custom folder and pointed the new installation to the old database and it works!!! Repair and there it all is. Thank you for your time.
Regards, Chris.
Well, nearly! It was working this morning and now has stopped with the same problem. The “Save and Continue” button works. It saves the record and takes me to edit the next record. The “Save” button was working for about 4 edits correctly and now produces a blank 500 error screen again. The record is saved correctly but it does not take me back to the list of contacts as it should.
The following is the error we are seeing in the error log file:
2020-06-17 14:06:10 UTC [apache][suexec:error] [pid 42093] error: directory is writable by others, execution denied. cwd: /home/u147-faee9v5gdrt9/www/9659.co.uk/public_html/crm/themes/SuiteP/css
I have checked the permissions on the css directory and they were set to 775 as per the instructions in the installation manual. I have changed them to 755 with the same result.