Nexology Community
 
     
 
   

Go Back   Nexology Community > Community Zone > PHP, MySQL, CGI, Perl and CF (Linux)

Reply
 
LinkBack Thread Tools Display Modes
Old 07-15-2010, 05:27 PM   #1
Registered User
 
Monotony's Avatar
 
Join Date: Jul 2010
Posts: 2
Question Cannot Read Flatfile in Private Directory

Hello all.

I am a pretty green student of PHP and ColdFusion and have just finished writing a session management system in PHP using a simple .txt document to store usernames and encrypted passwords. When I attempted to place this file in the "/private" directory above the site root, my application cannot seem to read from the file despite allowing all privileges. Placing the file in a directory inside the site root and dropping a .htaccess file to protect it allows the application to access it, though. The above-root arrangement works just fine on my local test server, I might add.

What actions need to be taken for the file to be read from the private directory on my server space here? I would be extremely grateful for any help with this issue. Thanks!
Monotony is offline   Reply With Quote
Old 07-15-2010, 08:35 PM   #2
HN Top Canine
 
NexDog's Avatar
 
Join Date: Jan 2002
Location: The Nexus
Posts: 13,347
In PHP it's probably a simple Open_Basedir restriction. The error would tell you. If so then just ask tech support to open it up to allow httpdocs to read from /private.
__________________
Laurence - [HostNexus Administrator]

- Need Support? Quickest reponses are found at the Support Helpdesk!
- Stay in touch! Make sure you are subscribed to our Lists.
NexDog is offline   Reply With Quote
Old 07-19-2010, 12:16 PM   #3
Registered User
 
Monotony's Avatar
 
Join Date: Jul 2010
Posts: 2
Thank you very much for the reply. Unfortunately, there is no error other than the fact that my site loses the ability to read from the file and thus is broken. I'll contact support and ask. Cheers!
Monotony is offline   Reply With Quote
Old 07-22-2010, 04:20 PM   #4
You and what a
 
RobbieLePommie's Avatar
 
Join Date: Aug 2002
Location: Sydney
Posts: 5,936
in the php, add the following lines:

error_reporting(E_ALL);
ini_set('display_errors', 'on');

This will dispaly the error message to you, andwillhelp with debugging.

(Take those off when the site goes live.)
__________________
Rob
----------------------------
For your information, there's a lot more to ogres than people think.
RobbieLePommie is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:27 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 RC1
Copyright ©2001 - 2009, HostNexus