Welcome, Guest
Username: Password: Remember me

TOPIC: The config.php file and $rooturl

The config.php file and $rooturl 2 years 7 months ago #77086

  • sequoia
  • sequoia's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 27
  • Karma: 0
This was the first thing I noticed when I initially install LimeSurvey 1.91+ and 1.92+.

In the URL box I have a set of double '//' after the domain. I went into the config.php file and found the following line of code (line 44) with a '/' at the end:
$rooturl            =   "http://{$_SERVER['HTTP_HOST']}/";
I went in and removed the '/' at the end and uploaded back in and seemingly no problems.

My concern is this; Is this meant to have the '/' in this particular line of code?

I ask this because I'm starting to have problems with the survey where a couple people testing have had problems with a question with only 1 option for an answer (instead of 5 in this instance) appears and it cuts off there. So as I troubleshoot I'm reviewing this edit in the .php file that I made.

Any input with this adjustment is greatly appreciated. Thanks
The administrator has disabled public write access.

Aw: The config.php file and $rooturl 2 years 7 months ago #77200

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Hello,

is there a good reason to remove the '/'? If not I don't see any reason not to add it to the rooturl. I don't know every part of the code and how the rooturl is used in different scripts, but in my opninion it's a good idea to use the '/'.

Can you please explain what you want to do, give us an example or add a screenshot so we might figure out what is wrong?
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Re: The config.php file and $rooturl 2 years 7 months ago #77204

  • sequoia
  • sequoia's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 27
  • Karma: 0
Sure here's a screen shot with LimeSurvey 'out of the box' before I took out the '/' (noted in previous post):



I've highlighted the area in question from a screen shot I took before I edited the config.php file.

And this is after I edit the config.php file:




Thanks for following up on this post :)
Last Edit: 2 years 7 months ago by sequoia.
The administrator has disabled public write access.

Re: The config.php file and $rooturl 2 years 7 months ago #77205

  • sequoia
  • sequoia's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 27
  • Karma: 0
Ok I think I've found the 'root' of the problem (sorry for the pun :side: ).

The LimeSurvey software was a quickinstall with the hosting service I use (HostGator).

I went and downloaded the recent version of 1.92+ from LimeSurvey.org and noticed a difference, that from LimeSurvey.org you have the following line of code in the config.php file:
$rooturl            =   "http://{$_SERVER['HTTP_HOST']}/limesurvey";

So in resolution to my own problem, it was an adjustment by the host server, NOT from our LimeSurvey contributors here. :ohmy:

Thank you very much for your response Steve.

And to anyone else wondering why they might have this similar problem, compare the config.php file downloaded from LimeSurvey.org if you make use of a quick install from your web host.
Last Edit: 2 years 7 months ago by sequoia.
The administrator has disabled public write access.

Aw: The config.php file and $rooturl 2 years 7 months ago #77210

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
The administrator has disabled public write access.

Re: The config.php file and $rooturl 2 years 7 months ago #77213

  • sequoia
  • sequoia's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 27
  • Karma: 0
Steve (and all the others who have been kind to assist) I just successfully submitted a donation.

Thanks again guys. ;)
The administrator has disabled public write access.

Aw: The config.php file and $rooturl 2 years 7 months ago #77214

  • Steve
  • Steve's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 494
  • Thank you received: 46
  • Karma: 17
Thank you very much! :)

This welcome post is just a standard post we use to mark a thread as answerd.
Mit freundlichen Grüßen/Best regards,

Stefan Gohlke
LimeSurvey Team
Last Edit: 2 years 7 months ago by Steve.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.193 seconds
Donation Image