Page 1 of 1

[SOLVED] Warning: fopen and so on

Posted: Sat Apr 22, 2006 6:34 pm
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

Posted: Sat Apr 22, 2006 6:46 pm
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.

Posted: Sat Apr 22, 2006 6:51 pm
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!