• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

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