Closed webal closed 11 years ago
Thanks, I'll have a look at this.
Hm, that's odd. Seems like there's a problme if the dynamic part of the uri is named {source}
, although I'm getting a different error than your's (not found exception). Changing the dynamic part to something else however works fine. I'll have to investigate this a little more.
There was a wrong where clause in the static routes' setup. Although this may apply to your issue, I'm not 100% sure as I'm not able to reproduce your error. Please grab the latest code from the master branch and have try. Cheers.
Thanks, If there's any more information you need from me please let me know...
Just updated the comment above. Can you try the latest commit on master?
Does this although occur when you use dynamic processing instead? Could be a windows related bug then.
Hi, that last commit seems to have fixed it :D thanks so much! It looks like a great package btw
I'm not planning to use the dynamic processing, but I did just try the following URL:
domain.dev/images/2/200/200/5/images/image.jpg
and I got a similar error (preg_match(): Compilation failed: nothing to repeat at offset 185 ):
protected function matchCollection($pathinfo, RouteCollection $routes)
{
foreach ($routes as $name => $route) {
$compiledRoute = $route->compile();
if ('' !== $compiledRoute->getStaticPrefix() && 0 !== strpos($pathinfo, $compiledRoute->getStaticPrefix())) {
continue;
}
if (!preg_match($compiledRoute->getRegex(), $pathinfo, $matches)) { // <-- error on this line
continue;
}
I'm happy to test a fix if you think there may be a bug there.
Thanks. What php version is running on your xampp?
It's WAMP not XAMPP, but the PHP is 5.4.3
hm, that's odd. Tested on windows7 with php 5.4.16 and it's all working well. I've spotted another but that wouldn't allow images to be directly in the public folder, but that's not related with your issue :(
strange, I'm not planning to use dynamic processing though so it's working great for me now.
hm, I'll try to setup a 5.4.3 version on my windows vm. Are you running the 32bit or the 64bit WAMP version?
Ok, can confirm this. It's a bug that occurs in php 5.4.3.
Guess it's time for me to update :/
It was the 64bit version btw
it's strange. The error is caused from a positive lookahead in my regexp here (the last part).
ok, guess I fixed it. Can you confirm?
That's working now - great job :)
I've done a basic install from the latest code and set up the provider/facade as per the docs. I have uploaded a file (public/image.jpg and another to public/images/image.jpg) to the public path of the app, and the important parts of the published config file are:
the recipes line is the only one I have changed.
When I look at my routes (php artisan route) I can see the thumbnail route defined as:
When I visit domain.dev/images/thumbs/image.jpg or domain.dev/images/thumbs/images/image.jpg I get th following error:
preg_match(): Compilation failed: nothing to repeat at offset 79
The stacktrace shows:
It may be that I'm doing something wrong, but I can't see how. I'm running it on WAMP as development (not production) environment locally if that makes any difference