Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8352385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:56:54+00:00 2026-06-09T08:56:54+00:00

I have the folowing issue: I got a PHP file ( standards.php ) with

  • 0

I have the folowing issue: I got a PHP file (standards.php) with statements like these:

define('CONSTVAR', '/path/');

Now, I have another file called untitled.php, containing this:

include ('standards.php');
echo CONSTVAR;

This will result in a page saying /path/, the value of the constant.

It’s good so far.

But when I put the standards.php on another one of my websites and try to include it from there (using the include('http://mysite.eu/core/standards.php'); command), it doesn’t work. The constant remain empty, and I also get the following error

Warning: main(http://mysite.eu/core/standards.php) [function.main]: failed to open stream: Permission denied in /home/www/this.nl/core/untitled.php on line 28

Warning: main() [function.include]: Failed opening ‘http://mysite.eu/core/standards.php’ for inclusion (include_path=’.:/usr/local/php4/lib/php’) in /home/www/this.nl/core/untitled.php on line 28

allow_url_include is enabled and allow_url_fopen too. When I type the full URL of the standards.php into my browser, I get a page result, so it’s not an issue of not having access rights, right?

What could be the issue here? Why is the constant, which is supposed to be global, not “inherited” when including from a remote server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:56:58+00:00Added an answer on June 9, 2026 at 8:56 am

    Allow_url_include is enabled and allow_url_fopen too. When I type the
    full url of the standards.php into my browser, I get a page result, so
    its not an issue of not having access rights, right?

    allow_url_fopen and allow_url_include can only be set in php.ini or httpd.conf. It is the local server that is preventing the file from being included, which is different to typing the URL into the browser.

    Why is the constant, which is supposed to be global, not “inherited”
    when including from a remote server?

    Even if the external include worked, it won’t work as expected. Includes over HTTP are different to standard includes.

    You are including the output of the included file. The External PHP file is processed at the external server before being included.

    It would certainly be a security vulnerability if external PHP files could be read verbatim in this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got the following issue, my function appends code to a string $string
I have the following issue and I would like to know what exactly happens.
I have the following issue: I have a splash like window coming with my
I'm just starting with Object Oriented PHP and I have the following issue: I
I'm new to doctrine. I created an bootstrap file like the following one: require_once(dirname(__FILE__)./../conf/general.php);
I have got the following issue <a href= class=so title=Schuko></a> <a href= class=so title=French
I've got the following issue with a actionscript3 project. I have a group of
I have a weird issue with a php redirect script that does the following:
I am having this issue I have been struggling with for sometime and now
I have the following issue related to iterating over an associative array of strings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.