Answer the question
In order to leave comments, you need to log in
With multiple simultaneous calls to the script, some queries return an empty page. What's wrong?
There is a PHP script:
/*
...
достаем нужный путь к файлу из базы по информации с реквеста
$name = 'етот путь';
...
*/
$fp = fopen($name, 'rb');
header('Pragma: public');
header('Cache-Control: max-age=86400');
header('Expires: '. gmdate('D, d M Y H:i:s \G\M\T', time() + 86400));
header("Content-Type: image");
header("Content-Length: " . filesize($name));
fpassthru($fp);
exit;
Remote Address:x.x.x.x:80
Request URL:http://...image/c0b7fbb39f425760b61eab96f53fee5a_53d7b7b513a9d.png
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:ru,en-US;q=0.8,en;q=0.6,uk;q=0.4
Connection:keep-alive
Cookie:PHPSESSID=7o1ouvllm0smad14s952dh5fq1; yii-debug-toolbar=hide; _ga=GA1.2.281170268.1406016085
Host:host.com
Referer:http://.../images
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Ubuntu 14.04.1 LTS
Apache/
2.4.7 PHP 5.5.9-1ubuntu4.3 (apache module)
Answer the question
In order to leave comments, you need to log in
By chance, there is no link to the session in the php script?
You can see the apache access + error logs.
I also thought about the lack of workers in apache, but it seems like the 200th status code ...
The erroneous response does not contain your headers, which are set by the script. Maybe something causes an error, content is being served, and the headers are no longer being sent.
I understand that there is another code before the specified code?
Is this a plain php script, outside of yii?
How many files are in your images folder?
Write the first line of the script (if there is no such line already):
And tell if your headers will start appearing in the browser in these erroneous downloads.
Add more before fpassthruob_end_clean();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question