Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: $rooturl

$rooturl 1 year 5 months ago #87371

  • quaint
  • quaint's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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: 1 year 5 months ago by quaint. Reason: typo
The administrator has disabled public write access.

Aw: $rooturl 1 year 5 months ago #87535

  • meux
  • meux's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 1
: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:
        '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: 1 year 5 months ago by meux.
The administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87537

  • quaint
  • quaint's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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: 1 year 5 months ago by quaint. Reason: New thought to answer another users' question
The administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87853

  • quaint
  • quaint's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87858

  • quaint
  • quaint's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
Right, so if you change the code to read:
'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 administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87912

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87943

  • dawnslayer
  • dawnslayer's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 1
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 administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87962

  • quaint
  • quaint's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87985

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Last Edit: 1 year 5 months ago by c_schmitz.
The administrator has disabled public write access.

Re: Aw: $rooturl 1 year 5 months ago #87992

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5845
  • Thank you received: 715
  • Karma: 222
And for https/http : it's in LS setting, not in config.php

Denis
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.232 seconds
Donation Image