• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

php include - vars lost

O

obey

Guest
whilst coding my own site on a shared hosting plesk8 machine, i realized a very strange problem with including .php files.

if i include a file named blubb.php, i'm not able to access any defined variable inside of the included file. If i rename it to blubb.inc, everything works fine.

the files lie within the same paths, so this is no open basedir error.

is this a security issue, or just a misconfig?

i would appreciate any help, cause my head aches after a few days debugging without any result. ;)
 
You can include both local files and URLs. If you include a URL you are including the output of the script, if you include a local file you include the actual script itself (including the variables). Make sure you're including the local file, not the web accessible resource.

See http://www.php.net/include/
 
thx, that was it.

i didn't check the path-var which the include came over.
 
Back
Top