Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Php error, Rename and open_basedir

Featured Replies

This is the last bit i need to do with my upload section of the site, but i think my host is restricting it.

 

Warning: rename() [function.rename]: open_basedir restriction in effect. File() is not within the allowed path(s):

 

$id = mysqli_insert_id($dbc);//gets print id
rename ($temp,"../../upload/$id");

 

Its the rename line that is causing the problem.

 

Is this an actual host restriction and would i need to get in contact with my host?

 

Many Thanks

 

Ben

This is the last bit i need to do with my upload section of the site, but i think my host is restricting it.

 

Warning: rename() [function.rename]: open_basedir restriction in effect. File() is not within the allowed path(s):

 

$id = mysqli_insert_id($dbc);//gets print id
rename ($temp,"../../upload/$id");

 

Its the rename line that is causing the problem.

 

Is this an actual host restriction and would i need to get in contact with my host?

 

Many Thanks

 

Ben

 

Yes, they may be able to disable it on your account, but make sure to be aware of the consequences that can have.

 

 

 

  • Author

Yes, they may be able to disable it on your account, but make sure to be aware of the consequences that can have.

I'm Still learning php, so.. what problems can this cause?

 

Would there be a way to activate it from the file that needs it, then disable it again after it has finished?

 

I'll contact my host and see what can be done.

I'm Still learning php, so.. what problems can this cause?

 

Would there be a way to activate it from the file that needs it, then disable it again after it has finished?

 

I'll contact my host and see what can be done.

 

PHP's open_basedir protection prevents users from opening files outside of their home directory with PHP. If this is disabled on your account, and you have vulnerable PHP code, someone may be able to include an exploit remotely hosted on another server and compromise your account.

 

 

However, Open_basedir is flawed in my opinion anyway, see here.

  • Author

PHP's open_basedir protection prevents users from opening files outside of their home directory with PHP. If this is disabled on your account, and you have vulnerable PHP code, someone may be able to include an exploit remotely hosted on another server and compromise your account.

 

 

However, Open_basedir is flawed in my opinion anyway, see here.

Reading through it now mate, you know of any work arounds? I need to so that when my database is updated it gets the newly added row, gets its id, renames the image with it, then that image is unique and co-insides with that id.

 

Ben

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.