Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does the error message 'Operation now in progress' mean?

Tags:

php

fopen

When trying to open a file using this command:

$fd = fopen('majestic_files/majestic_record.txt','w');

I get the following error message:

<b>Warning</b>:  fopen(majestic_files/majestic_record.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Operation now in progress in

What does it mean, and how do I fix it?

like image 387
Benubird Avatar asked Jun 02 '11 20:06

Benubird


2 Answers

Not directly related to the question of the OP, but if you are getting this error using the Laravel framework (or any other project using composer), chances are that the autoloader can't find one of the classes. For example this tends to happen if you move a class to a different directory without dumping the autoloader.

To fix this, try composer dumpautoload.

like image 176
Lupinity Labs Avatar answered Nov 16 '22 08:11

Lupinity Labs


This occurs when there is an outstanding blocking operation.

In this context, the error implies that another process has a lock on the file, most likely due to the file being open and written to by whichever process holds the lock.

like image 12
Jon Cram Avatar answered Nov 16 '22 09:11

Jon Cram