[SOLVED] Warning: fopen and so on

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
screwcork
Forum Newbie
Posts: 16
Joined: Thu Apr 13, 2006 3:25 am
Location: Oslo - Norway

[SOLVED] Warning: fopen and so on

Post by screwcork »

Hi there! I'm in a major <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> ATM.

I'm trying to get this ecommerce script to work, but i get alot of errors when i run it.

Posting the code won't be of to much help i think since it's 700 lines in the file and theres like 30 other files..

anyway, here goes:

Warning: copy(./sessions/8e71a5489361355ff8014acc48bcee46.dat): failed to open stream: Permission denied in /home/prexide/public_html/screwcork/ecomm/testindex.php on line 109

Warning: fopen(./sessions/8e71a5489361355ff8014acc48bcee46.dat): failed to open stream: Permission denied in /home/prexide/public_html/screwcork/ecomm/phpcart.php on line 137

Warning: fclose(): supplied argument is not a valid stream resource in /home/prexide/public_html/screwcork/phpcart/testindex.php on line 138

Warning: fopen(./sessions/8e71a5489361355ff8014acc48bcee46.dat): failed to open stream: No such file or directory in /home/prexide/public_html/screwcork/ecomm/testindex.php on line 195

Warning: fgetcsv(): supplied argument is not a valid stream resource in /home/prexide/public_html/screwcork/ecomm/testindex.php on line 367

Warning: fclose(): supplied argument is not a valid stream resource in /home/prexide/public_html/screwcork/ecomm/testindex.php on line 421


and so on and so forth..

Anyone know what exactly is causing this errors?

In the folder "sessions" theres one file named "empty" Feel like something doesn't add up there, but i'm really blank on what to do here!

some help??

cheers
Last edited by screwcork on Sat Apr 22, 2006 6:53 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Looks like everything stems from permissions for the sessions directory being improperly set. Make sure that php's user has either write and read access or full (write, read, execute) in the sessions folder. The user it may go under can vary, but is often in the "everyone" category, which is unfortunate. Bad hosts, bad-bad-bad.
screwcork
Forum Newbie
Posts: 16
Joined: Thu Apr 13, 2006 3:25 am
Location: Oslo - Norway

Post by screwcork »

feyd wrote:Make sure that php's user has either write and read access
Thanx.. should have thought of this myself.. was a simple matter of good old CHMOD'ing!

cheers!
Post Reply