Author Topic: MOD Request: open_basedir restriction  (Read 11992 times)

0 Members and 1 Guest are viewing this topic.

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
MOD Request: open_basedir restriction
« on: December 27, 2005, 05:28:16 AM »
below

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: MOD Request: .htacess optional
« Reply #1 on: December 27, 2005, 07:29:49 AM »
4images does not require .htaccess at all...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: MOD Request: .htacess optional
« Reply #2 on: December 27, 2005, 05:31:13 PM »
oo sorry.

well, t35.com has a open_basedir restrictions. meaning that you can't open a file in another folder using php.

e.g
Code: [Select]
<?php include("http://gogole.ca/folder/file.txt"); ?>
so when i go to the admin section. you can imagine what happens.

Warning: main(): open_basedir restriction in effect
Warning: main(./../global.php): failed to open stream Operation not permitted in
Fatal error: main(): Failed opening required './../includes/sessions.php'

is their a way to bybass the open_basedir restriction?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #3 on: December 27, 2005, 06:00:37 PM »
Quote

open_basedir restriction in effect


How rude. Did you ever considered to look at other web hosting services due to this unwanted restriction (also if your ISP will not remove that restriction) ?   :o

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #4 on: December 27, 2005, 06:39:16 PM »
sorry Oracle for anything that i did that offended you.
it's just that i've uploaded all my content and i've just got things grounded and i don't want to move because that'll scew me over.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #5 on: December 27, 2005, 06:56:02 PM »
Not offended at all. ;)

but ...

Quote

i don't want to move because that'll scew me over.


might even save you from this trouble actually. ;)

The definite response would be that 4images operates with PHP and mySQL. If your web hosting cannot provide you, at least, this functionnality - I don't really see how it can be done ...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: MOD Request: open_basedir restriction
« Reply #6 on: December 28, 2005, 02:44:36 AM »
Why exactly do you need include that file from a remote location?
Simply download that file to your server and include the local copy of it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #7 on: December 28, 2005, 04:33:57 AM »
I'm sorry V@no. i don't really understand what your saying (sorry for being such a php n00b  :D)

T35 does support php but it uses safe mode with the open_basdir restriction in effect and i do have access to mysql.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: MOD Request: open_basedir restriction
« Reply #8 on: December 28, 2005, 08:12:41 AM »
well, in your example
Code: [Select]
include("http://gogole.ca/folder/file.txt"); file.txt is located on remote server, well, atleast http:// is used.
Why not simply download that file to your server and use
Code: [Select]
include("file.txt"); instead?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #9 on: December 30, 2005, 08:50:23 PM »
Well, I've uploaded it onto my server.

Code: [Select]
<?php include("includes/functions.php"); ?>
I can't do that. Meaning, I'd have to put all the files in ONE 1 folder and change all the php includes.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: MOD Request: open_basedir restriction
« Reply #10 on: December 31, 2005, 12:32:00 AM »
I think you are not completly understanding what is happening here.
If setting allow_url_fopen turned off in php, then you wont be able use remote files in include and some other php functions.
even if you find a way to avoid such restriction without .htaccess, it would require updating any files that currently include remote files with the changes. So I dont see why what I suggested above would not work.
In fact, if you include (execute) a remote file, you are not in control on what kind of code in the file, so your server become vurnable. Even if its a trusted host, they could get hacked by someone and your server could get compromized as well.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kuruparan_paran

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: MOD Request: open_basedir restriction
« Reply #11 on: January 04, 2006, 03:27:11 AM »
OK, but the files i'm talking about are on my server, their just in a different folder.
Code: [Select]
<? include('http://mydomain.com/4images/admin/index.php'); ?> won't work
Code: [Select]
<? include('admin/index.php');?> won't work

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: MOD Request: open_basedir restriction
« Reply #12 on: January 04, 2006, 03:44:13 AM »
Code: [Select]
<? include('admin/index.php');?> won't work
Ok, you have 4images/example.php file on your server with the code above.
Now, does 4images/admin/index.php file actualy exists?
What about if you use the "proper" php code formating:
Code: [Select]
<?php
include('admin/index.php');
?>
:?:
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)