After install finish, I received error message Url rewrite is not working.Please ensure you have enabled and configured url rewriting on this webserver. Please help me
It seems that the rewrite is working. It might be an issue that your site_url paramater in cofnig.php is not set properly. Especially given the not normal port you woudl need to eensure that also the port is properly in the site_url.
We cannot check that since we have no root access to that system.
I already set ‘site_url’ => ‘http://mp-11.dyndns.org:8084/spicecrm’,
I checked rewrite and .htaccess is working
Thanks
I try to use on local server it is ok, but can not access from outsite
Maybe firewall did not open for rewrite service, I looking for solution to open firewall
Thanks
I’m also having this problem. I’ve tried reinstalling 3 times now. I have an SSL certificate so I wondered if that was a problem since on the installation the site_url in the config was http://site.name.org:443 … kinda dumb really. Installation should figure out if SSL is enabled.
I have tried with http and https in the site_url to no avail.
Once the install was finally done (after having to solve an nginx gateway timeout) I am getting
I’m using nginx 1.8.1 (which shows rewrite module is compiled in) and PHP FPM 5.6 on Debian Jessie
‘Url rewrite is not working. Please ensure you have enabled and configured url rewriting on this webserver.’
Installing the CE edition was nowhere near as problematic as this.
How do I actually get this to work?
Being annoyed by this, I simply edited modules/Users/Login.php
and changed these lines:
//if(!is_object($res) || empty($res->version)){
// $sugar_smarty->assign('REWRITE',false);
// $sugar_smarty->assign('REWRITE_ERROR','<h2 style="color:red">Url rewrite is not working. Please ensure you have enabled and configured url rewriting on this webserver.</h2>');
//}else{
$sugar_smarty->assign('REWRITE',true);
//}
Now I can log in and use it just fine.
Thank you for the solution. I also had a problem with this and your way works.
Hello,
I had the same issue hosting it in A2hosting. I checked everything, and they confirmed the URL-rewite is enabled. I also checked the site_url and it was set correctly but still having the same issue.
‘site_url’ => ‘http://www.encade.org/dev-spicecrm’,
Check it out. at this point, I do not know what to do, and even the hosting provider did everything they can to help, but some how I am still getting the same error.
Please help.
Faisal
Faisal,
do you have access to php error log on server?
A php error might be the problem.
Which Spicecrm version did you install and php version is in use?
Val
Hi Val,
Yes, I do have access to the PHP Log, and I am running PHP 7.0
I downloaded the latest version of your SpiceCRM that says release “20180425”, from Github.
Here is the log file content error, I got.
here is the link to the website where I am experiencing this error. www.encade.org/dev-spicecrm/
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: isREST in /home/encadeah/encade/dev-spicecrm/include/utils.php on line 1937
[28-May-2018 00:52:57 America/New_York] PHP Warning: Declaration of SugarEmailAddress::save($id, $module, $new_addrs = Array, $primary = ‘’, $replyTo = ‘’, $invalid = ‘’, $optOut = ‘’, $in_workflow = false) should be compatible with SugarBean::save($check_notify = false, $fts_index_bean = true) in /home/encadeah/encade/dev-spicecrm/include/SugarEmailAddress/SugarEmailAddress.php on line 1118
[28-May-2018 00:52:57 America/New_York] PHP Warning: Declaration of User::retrieve($id, $encode = true, $deleted = true) should be compatible with Person::retrieve($id = -1, $encode = true, $deleted = true) in /home/encadeah/encade/dev-spicecrm/modules/Users/User.php on line 44
[28-May-2018 00:52:57 America/New_York] PHP Warning: Declaration of MysqlManager::checkQuery($sql) should be compatible with DBManager::checkQuery($sql, $object_name = false) in /home/encadeah/encade/dev-spicecrm/include/database/MysqlManager.php on line 1497
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(/home/encadeah/encade/dev-spicecrm/modules/Administration): failed to open stream: No such file or directory in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(/home/encadeah/encade/dev-spicecrm/modules/Administration): failed to open stream: No such device in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(): Failed opening ‘modules/Administration/’ for inclusion (include_path=’/home/encadeah/encade/dev-spicecrm/include/…:.:/opt/alt/php70/usr/share/pear’) in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: KDeploymentMWs in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4143
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: totalquerytime in /home/encadeah/encade/dev-spicecrm/include/database/MysqliManager.php on line 141
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(/home/encadeah/encade/dev-spicecrm/modules/Administration): failed to open stream: No such file or directory in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(/home/encadeah/encade/dev-spicecrm/modules/Administration): failed to open stream: No such device in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Warning: include(): Failed opening ‘modules/Administration/’ for inclusion (include_path=’/home/encadeah/encade/dev-spicecrm:/home/encadeah/encade/dev-spicecrm/include/…:.:/opt/alt/php70/usr/share/pear’) in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4134
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: KDeploymentMWs in /home/encadeah/encade/dev-spicecrm/include/language/en_us.lang.php on line 4143
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined variable: pageArray in /home/encadeah/encade/dev-spicecrm/include/MVC/View/SugarView.php on line 699
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: allThemes in /home/encadeah/encade/dev-spicecrm/cache/smarty/templates_c/039d582db4801e74253d82a4dce789b518fc6d43_0.file._head.tpl.php on line 84
[28-May-2018 00:52:57 America/New_York] PHP Notice: Trying to get property of non-object in /home/encadeah/encade/dev-spicecrm/cache/smarty/templates_c/039d582db4801e74253d82a4dce789b518fc6d43_0.file._head.tpl.php on line 84
[28-May-2018 00:52:57 America/New_York] PHP Notice: Undefined index: SUGAR_DCJS in /home/encadeah/encade/dev-spicecrm/cache/smarty/templates_c/1537da1fb7d2b38cda6c3ac669d92c1c46bae5aa_0.file.header.tpl.php on line 39
[28-May-2018 00:52:57 America/New_York] PHP Notice: Trying to get property of non-object in /home/encadeah/encade/dev-spicecrm/cache/smarty/templates_c/1537da1fb7d2b38cda6c3ac669d92c1c46bae5aa_0.file.header.tpl.php on line 39
[28-May-2018 00:52:58 America/New_York] PHP Fatal error: Uncaught Exception: Authentication failed: auth data missing in /home/encadeah/encade/dev-spicecrm/KREST/KRESTManager.php:143
Stack trace:
#0 /home/encadeah/encade/dev-spicecrm/KREST/KRESTManager.php(115): KRESTManager->authenticationError(‘auth data missi…’)
#1 /home/encadeah/encade/dev-spicecrm/KREST/index.php(261): KRESTManager->authenticate()
#2 {main}
thrown in /home/encadeah/encade/dev-spicecrm/KREST/KRESTManager.php on line 143
[28-May-2018 00:52:59 America/New_York] PHP Notice: Only variables should be passed by reference in /home/encadeah/encade/dev-spicecrm/include/SugarTheme/SugarTheme.php on line 1322
ok. there is 1 fatal error.
Please make sure that display_errors is set to off in your php.ini
Thank you, I ran into this problem and this solution worked.
This issue occurs because module/Users/Login.php makes in curl GET request to the URL specified: /KREST/sysinfo.
GET /KREST/systeminfo
It seems that your server is not able to resolve the DNS name properly or that the port is not being passed to the curl request.
$ch = curl_init($url);
if(!is_object($res) || empty($res->version)){...
To resolve this issue:
- Update the site_url in config.php with the port number
‘site_url’ => ‘http://mp-11.dyndns.org:8084’
- OR Set your DNS records to point to your server properly
- OR Set your hosts /etc/hosts (linux) file and specify the domain as being internal
127.0.0.1 my-11.dyndns.org
The option to comment out the line of code works too. The way it’s written creates a false positive and not indicative of a bad rewrite configuration.