This topic is locked

chmod() [function.chmod] error

8/6/2007 1:10:18 PM
PHPRunner General questions
Allenh author

v4.0 - build 265

I've got a table that writes to the DB correctly, but only if file file attachment field is utilized.
If the attachment field is left empty, I get the following error "chmod() [function.chmod]: Operation not permitted." - but when I go back to the list page, all the data is written.
There is nothing filled in that makes the attachment a requirement - I've created new tables to be sure.
Why, why, why?
A.

Sergey Kornilov admin 8/6/2007

Allenh,
post your app to demo account and contact me directly at support@xlinesoft.com.

A
asimha 8/7/2007

v4.0 - build 265

I've got a table that writes to the DB correctly, but only if file file attachment field is utilized.
If the attachment field is left empty, I get the following error "chmod() [function.chmod]: Operation not permitted." - but when I go back to the list page, all the data is written.
There is nothing filled in that makes the attachment a requirement - I've created new tables to be sure.
Why, why, why?
A.


Exactly the same issue here! Error is displayed, data is updated. If you refresh, record is created twice ...

J
jetacera 9/13/2007

Did this problem get solved? I'm having the same problem as well...
I used the add page to add a record to the database and after submitting received this error:
"PHP error happened

Error type 2

Error description chmod() [function.chmod]: Operation not permitted"
I checked the line number on the add page for the error, and this is the code around it (error line in bold):
// move files

if(!$error_happened)

{

foreach ($files_move as $file)

{

move_uploaded_file($file[0],$file[1]);

if(strtoupper(substr(PHP_OS,0,3))!="WIN")

chmod($file[1],0777);

}
$message="<div class=message><<< "."Record was added"." >>></div>";
The php file is chmod to 777 so that isn't the problem.
I go back to the list page and the data has saved... Is there a fix for this so that the error doesn't show up? The only thing I've done differently than what I normally do is including an upload field in the record that doesn't create thumbnails on the fly (I wanted to be able to upload files other than images (i.e. pdf or doc)). I might try removing that field and seeing if the error goes away, but any advice would be appreciated.

Alexey admin 9/14/2007

Hi,
this bug is fixed in PHPRunner 4.1

Either install the latest version or modify edit.php and add.php in C:\Program Files\PHPRunner4.0\source folder.

Replace

chmod($file[1],0777);



with the following:

@chmod($file[1],0777);


Then rebuild your project.