This is a discussion on "file access problem" within the PHP Forum section. This forum, and the thread "file access problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
file access problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
I'm going through the example in the book 'PHP & MySQL Web Development' by Luke Welling & Laura Thomson, and I've hit a problem in chapter 2!
It's to do with accessing files, which is as yet something I know very little about. The code that was supplied with the book says this:
Warning: flock(): supplied argument is not a valid stream resource in /******/******/public_html/book/autoparts/02/processorder.php on line 67 Line 67 is the first flock. I appreciate this is really a UNIX problem, but at this point I just want something to make this code work, so I can carry on learning about PHP and MySQL, rather than a detailed tangent about UNIX, which I intend to learn about later as a separate project. Can anybody help, please? I am running this on a remote server, not my own machine. The PHP and HTML files are all in ~/public_html/book/autoparts/02/. |
|
|
|
|||
|
Re: file access problem
Makesure you have CHMOD the directory its talking about.
(Open ur ftp locate the directory right click CHMOD) It may be slightly different with assorted FTP programs. |
|
|||
|
Re: file access problem
Yes, it's likely to be file permissions. The fopen is probably failing, but the @ character at the start of that line tells PHP to supress the error message if it has a problem. If you remove the @ for a test run, you'll see the real error and not the aftereffect with is the error reported by flock.
-- Graham |
![]() |
| Tags |
| file, access, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] sql file problem | longstand | Databases | 1 | Oct 27th, 2007 17:09 |
| Access Denied Problem | EdwardA | Databases | 3 | Dec 27th, 2006 22:51 |
| can several people access a file and use it ! | rigidig | ASP.NET Forum | 2 | Jul 19th, 2006 20:49 |
| UPDATE information in access problem | KingIsulgard | Classic ASP | 1 | Jan 31st, 2006 13:09 |
| Access Problem | KingIsulgard | Classic ASP | 3 | Jan 30th, 2006 20:27 |