Click to See Complete Forum and Search --> : Flat File database.....permission issues.
gshetty
02-27-2006, 12:34 PM
Hi,I'm running PHP Version 4.3.4 . I'm trying to get user-entered data, from an online web form ,into a text file on my server.The code seems to work fine on my private server....but gives me the message "Failed to open stream.Permission Denied on Line 48", on my Company server.
I guess I need Read/Write permissions for the folder in which the text file is located....but the System Administrator insists that this should be done WITHOUT these permissions as these could lead to Security Issues .
Could someone please suggest a way out :o ...i.e Flat files that do'nt need Permissions set or some such thing???
Thanks.
bokeh
02-27-2006, 12:37 PM
Why not use mysql?
gshetty
02-27-2006, 12:46 PM
You think I did'nt think 'bout that? :rolleyes:
Matter of fact I AM using MySQL (Control Center) too...and it works just fine,thank you.BUT....my boss insists that he needs the data to be entered into the Flat file as well....for the sake of redundancy.
So, hope you can help me out......
Thanks.
P.S: Not just this, I have the data posted in emails and sent to my bosses email id too.......he thinks of the flat file as "the last line of defense" or something, I figure.
Sheldon
02-27-2006, 12:49 PM
http://php.net/chmod
chomd the file(0777), write to it, then chmond (0644) back after use.
gshetty
02-27-2006, 12:53 PM
Thank you Sheldon!I'll run the script and let you guys know...... :D
aaronbdavis
02-27-2006, 02:03 PM
....my boss insists that he needs the data to be entered into the Flat file as well....for the sake of redundancy.
Tell your boss he is a moron. A flat file is no less succeptable to corruption than the database files are. That is why god invented system backups. Suggest to him that you set up a backup plan using a separate hard disk. If something happens, you can recover the database from backup. If he still refuses to listen, do it anyway. If he really wants to keep the flat file and the email, then keep providing him with them, but don't use them for the purposes of recovery.
It sounds like your boss knows next to nothing about computer systerms and such people have no right to have a say, let alone a veto in the data management plan. That is why he hired you.
edit: note: this is not meant to be hostile to you. I deal with a boss who understands computers almost not at all, so I have to deal with the same type of thing: We have 3 fields in our database which hold the exact same info, AND we backup our data nightly. I understand your pain.