![]() |
Including a php file
Hello, I include a php file via plugin using this code:
Code:
ob_start(); Code:
$includedphp Quote:
|
This is not an error with the plugin, but an error with the file you are including. Does it work stand-alone?
|
It should.. what can I try to do?
|
Fix the errors in the file... It tells you what and where they are. It looks like you've used an absolute URL as an include. A lot of server configurations prevent this. You should use absolute filesystem references (ie. /home/user/file.php).
|
This is the content of my test/includes/dbar.php file:
Code:
<!-- Start Dbar --> Code:
Warning: Unknown(): open_basedir restriction in effect. File(/var/www/virtual/mysite.com/htdocs/test/includes/dbar.php) is not within the allowed path(s): (/var/www/virtual/community.mysite.com/:/var/www/virtual/community.mysite.com/htdocs/:/usr/share/php/:/tmp/) in [path]/global.php(384) : eval()'d code on line 3 |
Do you have the file inside your web folder, open_basedir suggests you don't have it in a folder your own/associated with your site.
|
That's on the same server my site is.
|
not just server, but folder
for example including the following on username1's site will work. /home/username1/public_html/phpinclude.php Including the following on username1's site won't work, as username1 doesn't own/have permission to the file. /home/username2/public_html/phpinclude.php Probably not the best explanation, but its the best i've got :D |
Yup, I understand. But I'm sure that's the same site folder.
For security I have also retrieved the directory path using this: PHP Code:
|
Probably better using cURL since you only want the content of the page, and it'll allow you to use URLs to specify the location of the file assuming your PHP setup allows for it.
Code:
$curl_handle = curl_init(); |
All times are GMT. The time now is 08:51 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|