October 10, 200917 yr 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
October 10, 200917 yr 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.
October 10, 200917 yr 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.
October 10, 200917 yr 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.
October 10, 200917 yr 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
October 11, 200917 yr Are you trying to move the image to outside of the home directory? If so this would cause the problem
Create an account or sign in to comment