Where to put include?

I need a safe palce to store my Authorize.net payment gateway keys outside of my VPS’s webroot.

I tried private but my code is crashing.

All I need is a way for…

[INDENT]httpdocs/secure/checkout.php
[/INDENT]
… to be able to include “auth_config.php” located somewhere outside of my web root.

Is there another standard Linux directory that would serve my purpose?

(I don’t know SSH, so I’m looking to just use some directory that already exists with the proper file permissions - assuming that is my issue?!)

Thanks,

Debbie

httpdocs, that’s cPanel right?
I’ve never been able to find a nice spot to park files outside the public area in that setup (granted, I never looked very hard).
I always end up creating a directory like “private” in the httdocs and put this .htaccess in it


deny from all

which will show a “forbidden” for all direct requests to the directory (recursively, so also for all files, subdirectories, their subdirectories, etc)

Not the best solution in the world I’m afraid but I haven’t been able to come up with something better.

Interesting approach.

Well, I have a real problem on my hands. (Another day from my life wasted…)

I’ve put my “auth_config.php” in private and cgi-bin and I can see it in Plesk and Filezilla, but this code…


var_dump( is_readable( '/var/www/vhosts/MyWebsite.com/cgi-bin/auth_config.php' ) );
var_dump( file_exists( '/var/www/vhosts/MyWebsite.com/cgi-bin/auth_config.php' ) );

yields…

bool(false) bool(false)

Guess, I need a Linux guru handy before I delve into a long explanation. sigh

Debbie

cgi-bin is meant for perl scripts and nothing else. Why other files don’t “work” there I don’t know, but I’ve never got them to work either :-/

I found the problem, but would need an expert Linux person to fix it.

It deals with Plesk and open_basedir.

Debbie

Ah the joys of plesk.
In the conf directory for the domain, there is a vhost.conf file. You can override basedir restrictions there, then you need to manually from the command line update plesk to read this new setting:
/usr/local/psa/admin/sbin/websrvmng -u –vhost-name=MyWebsite.com