Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

$rooturl

  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #87371 by quaint
$rooturl was created by quaint
Hello,

I have recently gone through a few versions of V2.00+ (121011, 121017, 121024 and now 121025) and have no idea where $rooturl has disappeared to. In V1.92+ it was possible to specify the root URL through the flag $rooturl in config.php in the root LimeSurvey installation directory.

Since upgrade to 2.00+ I have been unable to find where to specify a root URL, and as a consequence all surveys are being listed with a root address of 80.194.xx.xx/limesurvey/index.php/survey

Unfortunately, IP-based URLs trigger many email services' spam/phishing filters, so it would be handy to find where it's based.

Poring through limesurvey/application/config/config-defaults.php I find publicurl and homeurl, however publicurl seems to be controlled by Yii::app. Using the "if" conditional to set the root URL doesn't seem to work.

Are there any hints as to where I should be looking?

Yes - I have got the servername variable set appropriately in apache.conf.

Thanks very much,

John
Last edit: 11 years 4 months ago by quaint. Reason: typo
The topic has been locked.
More
11 years 4 months ago - 11 years 4 months ago #87535 by meux
Replied by meux on topic Aw: $rooturl
:blink: Hello John,

i have a similar problem here. My Limesurvey is behind a HTTPS enabled apache server and the version 1.92 worked fine with $rooturl set. But with the new version 2.00 this does not work.
I added rooturl to the config.php under application/config/ but this does not help - the survey's work fine, but in the administration i am redirected to http and i have no idea why.
You can configure the rooturl in this way:
Code:
        'config'=>array(
        // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
        // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
        // on your webspace.
        // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
                'debug'=>1,
                'publicurl' => 'https://.../limesurvey',
                'rooturl' => 'https://.../limesurvey',
        )

Cheers

Reinhard
Last edit: 11 years 4 months ago by meux.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #87537 by quaint
Replied by quaint on topic Aw: $rooturl
Fantastic, thank you. I will try that as soon as I can.

The problem is the email invitations, I'm wondering if the problem reported here:

www.limesurvey.org/en/forum/installation...are-at-httplocalhost

Might also be fixed by this approach. I'm sorry, I'm unlikely to be able to test this for a few days but will report back as soon as possible.

Just out of interest, in your global settings screen, what's your setting for "Force HTTPS"?
Last edit: 11 years 4 months ago by quaint. Reason: New thought to answer another users' question
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago #87853 by quaint
Replied by quaint on topic Aw: $rooturl
Hello,

Have just gotten around to trying this; I get the error message displayed:

Parse error: syntax error, unexpected ''publicurl'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in C:\wamp\www\pineapple\application\config\config.php on line 68


Annoyingly, it seems that restoring the file to original doesn't actually fix the problem that it's caused; I get the error message

Page Not Found

The system is unable to find the requested action "login".


This has left me somewhat flummoxed.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago #87858 by quaint
Replied by quaint on topic Aw: $rooturl
Right, so if you change the code to read:
Code:
'config'=>array(
        // debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
        // then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
        // on your webspace.
        // LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
                'debug'=>1,
                'publicurl' => 'https://.../limesurvey',
                'rooturl' => 'https://.../limesurvey'
        )

(remove the trailing comma) then the error disappears, but the surveys are still listed as being at 80.194.xxx.xxx/ and the email invitations are still not being listed from my domain.

For further information regarding this query, phpinfo() reveals "hostname:port" to show the domain name & port as expected.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 4 months ago #87912 by Mazi
Replied by Mazi on topic Aw: $rooturl
At Limesurvey 2 the $rooturl is checked and registered during installation/update. You should still be able to change the setting (be careful!) at the config.php file.

If anything behaves weird or not as expectd, please open a ticket at our bugtracker.
Thanks!

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
11 years 4 months ago #87943 by dawnslayer
Replied by dawnslayer on topic Aw: $rooturl
Hello,

I've got the same problem of "quaint".

You said "You should still be able to change the setting (be careful!) at the config.php file."

How directive i can write in config.php for force new rooturl ?

Thanks very much.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago #87962 by quaint
Replied by quaint on topic Aw: $rooturl
Hello,

I have submitted a bug report for this; I have tried various combinations of 'rooturl' and '$rooturl' with and without trailing slashes; nothing seems to pass through as expected.

As mentioned in the original email, this is a problem as invitations are being emailed out with an IP address; not only does this look less appealing it can also trigger phishing filters.

Thanks
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 4 months ago - 11 years 4 months ago #87985 by Mazi
Replied by Mazi on topic Aw: $rooturl

Mazi wrote: At Limesurvey 2 the $rooturl is checked and registered during installation/update. You should still be able to change the setting (be careful!) at the config.php file.

I was wrong with this, sorry.

The correct approach is described here: docs.limesurvey.org/tiki-index.php#Wrong..._reminder_email_link :
Wrong domain in invitation/reminder email link

LimeSurvey automatically tries to determine the URL for the invitation link by looking at the URL by which you logged in to the LimeSurvey administration. However with some server (mis-)configurations this might now work properly and you will have to set this manually.
You can edit /path/to/application/config/config.php to change the default base URL value. Add the baseUrl property to the existing 'components' array:


'components' => array(
...
'request' => array(
'baseUrl' => ' www.example.com ',
),
)

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Last edit: 11 years 4 months ago by c_schmitz.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #87992 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl
And for https/http : it's in LS setting, not in config.php

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • quaint
  • quaint's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #88002 by quaint
Replied by quaint on topic Aw: $rooturl


'components' => array(
...
'request' => array(
'baseUrl' => ' www.example.com ',
),
)


Hi Mazi,

I've just added this in to the config.php file; however, when I input the hostname all css dies - see linked screenshot - and, worst of all, it doesn't seem to even resolve the issue.

If I use the hostname and the directory (adding ' surveys.northerndeanery.nhs.uk/pineapple ' then the formatting returns, but the problem still isn't fixed.

If I'm not missing something (in httpd.conf or config.php) then I'm a bit lost as to where to go next.

I can make a contribution to the project from my organisation to get this fixed; it worked just fine with 1.92+ and I'm a little lost as to why I'm having so much trouble with 2.00+
Last edit: 11 years 4 months ago by quaint.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 4 months ago #88004 by DenisChenu
Replied by DenisChenu on topic Aw: $rooturl
I think you have to set all url in config.php

Look at end of the config-default.php,
And set all url to your url.

Think actually,
In config-default:
$config is set to surveys.northerndeanery.nhs.uk/templates because Yii::app()->baseUrl are surveys.northerndeanery.nhs.uk/ at this time, and is modified only after in config.php.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose