| | |
fopen problem
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 25
Reputation:
Solved Threads: 1
Hi,
For some reason I can't make fopen work. It worked fine on my server, however upon putting the script on my clients server it started giving this error:
From this call:
According to phpinfo() the server is:
Windows NT B-SERVER-01 5.2 build 3790
PHP Version 4.4.7
And safe mode is off if it makes a difference.
I assume that its something to do with permissions but how do I go about fixing it. I don't really do a lot of php development only small things like this script
For some reason I can't make fopen work. It worked fine on my server, however upon putting the script on my clients server it started giving this error:
PHP Syntax (Toggle Plain Text)
Warning: fopen(test.jpg) [function.fopen]: failed to open stream: Permission denied in <long path> on line 5
PHP Syntax (Toggle Plain Text)
$File = "test.jpg"; $Handle = fopen($File, 'wb');
Windows NT B-SERVER-01 5.2 build 3790
PHP Version 4.4.7
And safe mode is off if it makes a difference.
I assume that its something to do with permissions but how do I go about fixing it. I don't really do a lot of php development only small things like this script
Yes, it is a permission problem. You need to chmod the the in question.
http://en.wikipedia.org/wiki/Chmod
Or if the problem is ownership, chwon:
http://en.wikipedia.org/wiki/Chown
http://en.wikipedia.org/wiki/Chmod
Or if the problem is ownership, chwon:
http://en.wikipedia.org/wiki/Chown
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
•
•
Join Date: Jul 2008
Posts: 25
Reputation:
Solved Threads: 1
I was under the impression that Chmod and Chown are unix system commands, and that windows does not have them?
•
•
•
•
I was under the impression that Chmod and Chown are unix system commands, and that windows does not have them?
Which version of windows?
Make sure the file is not set to read only, or being used by another process (program).
eg: Right click, properties.
Vista has group access control to files similar to unix. Make sure the PHP user can access that file. I don't have much experience with this however.
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
Similar Threads
- Problem with ACE file operation append mode in ACE_OS::fopen function (C++)
- problem with freeing memory (C)
- Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' (PHP)
- FindNextFile() problem (C++)
- encryption speed problem (C#)
- Reading a file line by line problem (C)
- file pointer problem (C)
- C++ problem... (C++)
- List <char *> Problem (C)
- Multithreading problem (C)
Other Threads in the PHP Forum
- Previous Thread: Saving mage in a path instead of storing the real image in mysql
- Next Thread: FAQ: "Supplied argument not valid resource"
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube






