doubledee Posted May 13, 2011 Share Posted May 13, 2011 I have to store my Authorize.net Payment Gateway values somewhere safe. (i.e. Outside of the Web Root) I tried this code but my checkout page that formerly worked with local values in Test Mode is crashing. // Include Authorize.net Values. require_once('/var/www/vhosts/MyWebsite.com/private/auth_config.php'); I think the issue is that private maybe can't be read or included by other files? Would using another Linux directory solve my problem? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/ Share on other sites More sharing options...
lastkarrde Posted May 13, 2011 Share Posted May 13, 2011 You could, or chmod that file so the user running apache (or your webserver) can read it. Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215166 Share on other sites More sharing options...
doubledee Posted May 13, 2011 Author Share Posted May 13, 2011 You could, or chmod that file so the user running apache (or your webserver) can read it. I don't follow you... I though this was a Directory Permissions issue... Debbie Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215173 Share on other sites More sharing options...
KevinM1 Posted May 13, 2011 Share Posted May 13, 2011 You could, or chmod that file so the user running apache (or your webserver) can read it. I don't follow you... I though this was a Directory Permissions issue... Debbie chmod is a *nix (linux, Unix) command for changing file and directory permissions. http://en.wikipedia.org/wiki/Chmod Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215177 Share on other sites More sharing options...
doubledee Posted May 13, 2011 Author Share Posted May 13, 2011 You could, or chmod that file so the user running apache (or your webserver) can read it. I don't follow you... I though this was a Directory Permissions issue... Debbie chmod is a *nix (linux, Unix) command for changing file and directory permissions. http://en.wikipedia.org/wiki/Chmod I know that, but that doesn't answer my original question... Why is my include not working? Is this a Directory Permission issue? A File Permission issue? Both a Directory and File Permission issue? Something else? Debbie Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215180 Share on other sites More sharing options...
KevinM1 Posted May 13, 2011 Share Posted May 13, 2011 You could, or chmod that file so the user running apache (or your webserver) can read it. I don't follow you... I though this was a Directory Permissions issue... Debbie chmod is a *nix (linux, Unix) command for changing file and directory permissions. http://en.wikipedia.org/wiki/Chmod I know that, but that doesn't answer my original question... Why is my include not working? Is this a Directory Permission issue? A File Permission issue? Both a Directory and File Permission issue? Something else? Debbie It could be anything. Do you have shell access to your environment, or a FTP program which can modify permissions? Running ls -l in the shell, or taking a look at the permissions in a FTP program should tell you if you have a permissions issue. Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215183 Share on other sites More sharing options...
doubledee Posted May 13, 2011 Author Share Posted May 13, 2011 It could be anything. Do you have shell access to your environment, or a FTP program which can modify permissions? Running ls -l in the shell, or taking a look at the permissions in a FTP program should tell you if you have a permissions issue. I have SSH access but don't know how to do that, so I'm hoping I can just use what I have in Plesk (i.e. choose a directory with the needed permissions). Here is what Plesk tells me... private rwx --- --- private/auth_config.php rw- r-- r-- httpdocs rwx r-x --- I am thinking that private needs *Group* or *Other* READ access?? Or is this an issue with "auth_config.php" File Permissions? (An Include/Require should only require a file to be READABLE, right??) Debbie Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215185 Share on other sites More sharing options...
doubledee Posted May 13, 2011 Author Share Posted May 13, 2011 I just commented out my Require_Once code and my Check Out form runs properly but displays the message: Sorry! An error occurred. If you need further assistance, please contact Customer Service Without the Require_Once, my code had no Authorize.net keys so it couldn't submit the payment, however, my code correctly caught that and displayed an error to the Customer. What that tells me is that the problem is my Require_Once line of code or something related to it like Permissions. This can't be that hard to fix?! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/236352-where-should-i-put-my-include/#findComment-1215198 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.