Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: How to access to limesurvey database in PHP

How to access to limesurvey database in PHP 3 years 10 months ago #88093

  • wjzwjh
  • wjzwjh's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
I just want to access to LimeSurvey database. However, in my PHP code first line, I put require_once '/application/config.php' as a way to load up the LimeSurvey DB Information. But the page always return("No direct script access allowed"). And I check config.php file, and only when basepath is not defined can generate this problem.(if (!defined('BASEPATH')) exit('No direct script access allowed');) So how and where to set the basepath. Thanks for everyone in advance here.
The administrator has disabled public write access.

How to access to limesurvey database in PHP 3 years 10 months ago #88097

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
Hello,

Just :

define ('BASEPATH', '');

before include.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
Time to create page: 0.502 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form