Welcome, Guest
Username: Password: Remember me

TOPIC: PHP Include gives error

PHP Include gives error 2 years 6 months ago #76269

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
I have put the whole content of config.php in a directory above public_html and in the original config.php written:
<?php include("/home/mydirectory/copy-of-config.php"); ?>

But all of a sudden I just get a blank page when I try to go the the page for admin login.

This use to work, and I don't understand why it doesn't work anymore.

Any idea...?
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
The administrator has disabled public write access.

Re: PHP Include gives error 2 years 6 months ago #76277

  • waitz
  • waitz's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 171
  • Thank you received: 1
  • Karma: 3
Well, the blank page was because of a wrong path... :blush:

When I just try by putting the copy-config.php in the same directory as the original config.php so that I have:
<?php include("copy-of-config.php"); ?>
Everything works fine.

But when I put the copy-of-config.php in a directory above public_html, I get the error:
Can't connect to LimeSurvey database. Reason: Access denied for user 'root'@'localhost' (using password: NO)
Which is really strange.
Version 1.91+ Build 11232 | PHP 5.3.9 | MySQL 5.1.56 |
Last Edit: 2 years 6 months ago by waitz.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.201 seconds
Donation Image