Closed Thread Icon

Topic awaiting preservation: openbase directory, ongoing prob... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12097" title="Pages that link to Topic awaiting preservation: openbase directory, ongoing prob... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: openbase directory, ongoing prob... <span class="small">(Page 1 of 1)</span>\

 
Gynot
Bipolar (III) Inmate

From: Brooklyn, NY
Insane since: Jan 2002

posted posted 03-09-2002 00:04

I'm officially at my wits end. I'm still fairly new to the whole PHP thing. I love it so far, but I can't get an image uploaded for anything!! I constantly get the openbase directory error.
I have a directory named "tmp", that is used by my bulletin board program (Vbulletin) with no problem, however no other scripts I've tried have worked, nothing.

In the script that Pugzly posted in the File Trans thread, I've got it set to


$the_path = "/usr/local/psa/home/vhosts/citystylecreations.com/httpdocs/tmp";
$url_path = "http://www.citystylecreations.com/tmp/";

I changed the domain in end of script, I fixed the

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-09-2002 01:51

This is because you're attempting to access a file above the /usr/local/psa/home/vhosts/citystylecreations.com/httpdocs directory. When PHP is running in SAFE MODE, you can't have scripts accessing files above this parent folder (and /tmp is above it). In order for that script to work, you need to have access to the /tmp directory, which, as mentioned, is ABOVE your open_basedir folder. In order for that to happen, any one of these three things needs to be done:

1. PHP needs to be taken out of SAFE MODE - either for just your virtual host, or entirely (no difference to you). This isn't likely to happen, as it presents security concerns.
OR
2. You need to have Apache's HTTP.CONF file edited to enable you access to a folder above your root. This isn't likely to happen if you're a virtual host.
OR
3. You can create a file called vhost.conf - in that file, put these three lines:
<Directory /usr/local/psa/home/vhosts/citystylecreations.com/httpdocs>
php_admin_value open_basedir "/usr/local/psa/home/vhosts/citystylecreations.com/httpdocs:/tmp"
</Directory>


note the colon between the original and the added /tmp. You can add more, but I don't recommend it. Save the file, FTP it in ASCII mode to
/usr/local/psa/home/vhosts/citystylecreations.com/conf (you'll probably need root access to do that). Once that's done, restart Apache by issuing the following command via SSH (with root access):
/usr/local/psa/admin/bin/my_apci_rst

Check PHPINFO again. The open_basedir setting should now have the added :/tmp. Your script can now access files in the /tmp directory, which is where the uploaded file first goes.

Try the upload script.

<edit>Oh yeah, remove the /tmp from the
$the_path = "/usr/local/psa/home/vhosts/citystylecreations.com/httpdocs/tmp"; and
$url_path = "http://www.citystylecreations.com/tmp/";
</edit>





[This message has been edited by Pugzly (edited 03-09-2002).]

Gynot
Bipolar (III) Inmate

From: Brooklyn, NY
Insane since: Jan 2002

posted posted 03-09-2002 03:03

Oh my God, Pugzly, I love you!~LOL
You've just resolved a two month long issue for me!!
I had the wrong path set in the vhost.config, it read

/usr/local/plesk/apache/vhosts/citystylecreations.com/httpdocs

Thank you so much!!
If I ever have a child... Pugzly it is!! Geez.....I hope it's aboy!~LOL

~Peace~
Gary
City Style Creations

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-09-2002 04:02

You have to watch that. Depending on the method and version of Plesk, directory structures are different.


And if it's a girl, name it after my sister, Wednesday.

« BackwardsOnwards »

Show Forum Drop Down Menu