Skip to content

[Filesystem] filemtime(): stat failed #9339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andreybolonin opened this issue Oct 18, 2013 · 4 comments
Closed

[Filesystem] filemtime(): stat failed #9339

andreybolonin opened this issue Oct 18, 2013 · 4 comments

Comments

@andreybolonin
Copy link
Contributor

PHP Error[2]: filemtime(): stat failed for http://r-ec.bstatic.com/images/hotel/840x460/127/12733275.jpg
in file /home/andreybolonin/parsers/vendor/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php at line 45
#0 /home/andreybolonin/parsers/vendor/symfony/filesystem/Symfony/Component/Filesystem/Filesystem.php(45): filemtime()
#1 /home/andreybolonin/parsers/protected/models/Hotel.php(247): Symfony\Component\Filesystem\Filesystem->copy()
#2 /home/andreybolonin/parsers/protected/models/Hotel.php(56): Hotel->saveResult()
#3 /home/andreybolonin/parsers/protected/commands/HotelWorkerCommand.php(51): Hotel->getHotel()
#4 unknown(0): HotelWorkerCommand->hotel()
#5 /home/andreybolonin/parsers/protected/commands/HotelWorkerCommand.php(30): GearmanWorker->work()
#6 unknown(0): HotelWorkerCommand->actionIndex()
#7 /home/andreybolonin/parsers/vendor/yiisoft/yii/framework/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#8 /home/andreybolonin/parsers/vendor/yiisoft/yii/framework/console/CConsoleCommandRunner.php(71): HotelWorkerCommand->run()
#9 /home/andreybolonin/parsers/vendor/yiisoft/yii/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#10 /home/andreybolonin/parsers/vendor/yiisoft/yii/framework/base/CApplication.php(180): CConsoleApplication->processRequest()
#11 /home/andreybolonin/parsers/vendor/yiisoft/yii/framework/yiic.php(33): CConsoleApplication->run()
#12 /home/andreybolonin/parsers/protected/yiic.php(7): require_once()
#13 /home/andreybolonin/parsers/protected/yiic(4): require_once()

Hello!
I get this error.
What can be done about it?
Thanks.

@stof
Copy link
Member

stof commented Oct 18, 2013

why is it trying to do a stat call for an HTTP url when copying the folder ?

@andreybolonin
Copy link
Contributor Author

I don`t know. I run this code:

$fs = new Symfony\Component\Filesystem\Filesystem();
$fs->copy($photo, DIR . '/../..' . $path);

@hacfi
Copy link
Contributor

hacfi commented Oct 21, 2013

I previously had similar errors popping up and it was related to APC. Which PHP and APC version are you using? Try restarting the webserver (or php if you’re using php-fpm) or run php -r "apc_clear_cache();" and see if that changes anything.

@hacfi
Copy link
Contributor

hacfi commented Oct 21, 2013

Oops..didn’t read the code properly and oversaw the comment @stof . Ignore my last comment.

fabpot added a commit that referenced this issue Dec 30, 2013
… (cordoval)

This PR was merged into the 2.3 branch.

Discussion
----------

[Filesystem | WCM] 9339 fix stat on url for filesystem copy

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9339
| License       | MIT
| Doc PR        | na

supersedes #9863

Commits
-------

4fba412 adjusted behavior to always copy override on url files
@fabpot fabpot closed this as completed Dec 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants