2
Assuming you have an access log, each request will create or include values in the log file.
Simulating several requests via ajax, I found that there is always a problem. If you log into the browser console and run the code below, a request will be made within the loop.
setInterval(function()
{
$('div').each(function()
{
$.get( 'url interna' , function( data )
{
$('html').text( 'data' )
});
})
} , 100 )
Each request by ajax will be recorded a log file, but at a certain point a type error is triggered Permission denied or Invalid argument. I tried to see file_get_contents
, file_put_contents
, fopen
, fwrite
and always some error occurs.
The file manipulation works properly, I write and read without problems. I looped in 1000 and no errors occur during the recording.
for( $i = 1; $i <= 1000; $i++ )
{
$fp = fopen( 'file.txt' , 'w' );
fwrite( $fp , 'texto' );
fclose( $fp );
}
Have you checked the directory permissions?
– gmsantos
@gmsantos, Manipulate the files without problem, never gave error, only in ajax that hangs. It even records and overwrites, but at some point (I don’t know why) in the ajax loop returns
Invalid argument
– Papa Charlie
Only for testing, of a
chmod -R 777
in your directory– gmsantos
@gmsantos It did not help.
– Papa Charlie
I could not reproduce your problem. Here it worked without any problem.
– gmsantos
Let’s continue this discussion in chat
– gmsantos