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
https://forums.phpfreaks.com/topic/103536-include-problem-in-the-https-server/
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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.