Jump to content

include problem in the HTTPS server


Recommended Posts

Hi,

We are using a HTTPS server and our main configuration file is : main.con.php. This file is included in the index.php page through::

 

define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']."/rpg");

require_once(DOCUMENT_ROOT . '/include/main.conf.php');

 

Now document root is /opt/www/admin_website. And also our configuration file is /opt/www/admin_website/include/main.conf.php

 

But still we cannot include this configuration file. Any Ideas?Please help me.

Thanks in advance.

 

Link to comment
Share on other sites

Did you step through the code you posted and figure out what it was doing?

 

If $_SERVER['DOCUMENT_ROOT'] is /opt/www/admin_website, then define('DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']."/rpg"); results in DOCUMENT_ROOT being /opt/www/admin_website/rpg

 

require_once(DOCUMENT_ROOT . '/include/main.conf.php'); results in require_once('/opt/www/admin_website/rpg/include/main.conf.php'); How is that going to match /opt/www/admin_website/include/main.conf.php

 

BTW, this has nothing to do with HTTPS as your require_once() is done through the file system.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.