Coder Social home page Coder Social logo

Comments (12)

trevorgehman avatar trevorgehman commented on May 14, 2024 4

I actually discovered my issue was I had to clear the route cache with

php artisan route:cache

from clockwork.

hannesvdvreken avatar hannesvdvreken commented on May 14, 2024 1

Is the app.debug config option set to true?

from clockwork.

thinksaydo avatar thinksaydo commented on May 14, 2024 1

Clockwork will not work with the internal PHP web server because by default it reads the ID with periods as a file name and fails to route into Laravel. To fix, add this to the top of your Laravel public/index.php file:

// Allow PHP Web Server requests that resemble file requests
if (file_exists(__DIR__ . $_SERVER["REQUEST_URI"])) return false;

That will allow the web server to return actual file requests while allowing Laravel to route other requests that only resemble file requests. Enjoy!

Then start the web server like:

php -S 127.0.0.1:8000 index.php

Pointing the PHP web server to a specific file makes that file act as a router for all requests.

from clockwork.

itsgoingd avatar itsgoingd commented on May 14, 2024

Hey, sorry for the many hours of frustration. :\

What happens when you access "/__clockwork/1392079506.9878.449334262" in your browser (make sure the data file exists for that id) ? If you receive the json data can you please post it here or send it to me via email (remove personal information first) ?

The version was actually reported wrong in v1.4.3 and v1.4.4, sorry. I've just released v1.5, you might try updating before trying again as well.

from clockwork.

itsgoingd avatar itsgoingd commented on May 14, 2024

Tested with PHP web server without problems, if problem still exists in latest version please reopen.

from clockwork.

xixo1983 avatar xixo1983 commented on May 14, 2024

Issue still exists

from clockwork.

xalloa avatar xalloa commented on May 14, 2024

In my case it was a problem with the mod_rewrite rule. I mention that just in case.

from clockwork.

trevorgehman avatar trevorgehman commented on May 14, 2024

@xalloa How did you correct the mod_rewrite issue you had?

from clockwork.

xalloa avatar xalloa commented on May 14, 2024

@trevorgehman in my case a colleague had "installed" the web app at a subdir ( webform.int ) so I wrote a rule specific to the clockwork path like that:

RewriteRule ^.*__clockwork/(.*)$ /webform.int/index.php/__clockwork/$1 [L] 

hope this helps though it is a workaround and not the solution (i.e. I have not fixed the original rule that caused the problem since i didn't had the time to).

from clockwork.

xalloa avatar xalloa commented on May 14, 2024

Nice, I'll give it a try, however or other reasons we are running on nginx now so I have left mod_rewrite alone 😄

from clockwork.

bcalik avatar bcalik commented on May 14, 2024

I have the same problem.

I have several laravel websites with same nginx configuration, all is working well but one of them does not work (which was actually working well previously. A lot of development is going on this project, so I don't know what caused Clockwork to stop working.)

Interesting thing is, clockwork-cli is working well, but the chrome extension does not work for this project. It just doesn't show anything.

Edit: Screenshots attached.

screen shot 2015-11-20 at 14 04 21
screen shot 2015-11-20 at 14 04 32

Edit: Latest clockwork json file added.

{"id":"1448021374.7071.350238989","time":1448021374.6205,"method":"GET","uri":"\/","headers":{"content-type":[""],"content-length":[""],"host":["arsiv.dev"],"connection":["keep-alive"],"cache-control":["max-age=0"],"accept":["text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,*\/*;q=0.8"],"upgrade-insecure-requests":["1"],"user-agent":["Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/46.0.2490.86 Safari\/537.36"],"referer":["http:\/\/arsiv.dev\/inventory"],"accept-encoding":["gzip, deflate, sdch"],"accept-language":["en-US,en;q=0.8,tr;q=0.6,es;q=0.4"],"cookie":["cartalyst_sentry=eyJpdiI6Ik9pTnIwK2duXC84V1lcL244MjhIXC9PRUE9PSIsInZhbHVlIjoiSEkxTGt0RjY5RDdtUTZpc3hxSnREZHZiT1JiTWRZNm1WSzlmZEoxOTNHKzZcL2ZlcjlRUHlsZFpRaG1wZDJzNUNlVUt3NEZlVUJORzhOdUdtSHp4SFpTN3pWdkQ4eVVQRk9cL0RJNFpoTzl2REtpdUhcLzV6VElCZFhwallqeVpFVHciLCJtYWMiOiIzNTNlMzJhYjk3OTgxZjFiMDRlODNlMDAwMDNhN2IzZGRmMTgwM2U1MTY0YWVkOTQ5MWUyODEwYmJkOGNhYzBjIn0%3D; laravel_session=eyJpdiI6IjM0b1BNZVwvWTZ1Z1ZrMjM2UHNqNjhRPT0iLCJ2YWx1ZSI6IldvWUt5VFcxYUdOeFV6SklWMU9FZHAxSkt2eUdYeUJOS09lcUFXOVFIa255TkphcytmZVp2elwvQlBKM0llTnd2UlJxTkUwXC9Da3NUVzRnQ3VISkZnb0E9PSIsIm1hYyI6IjVjODhkZDMxMjk0M2Y4NjcxYjAwODVhYjVmOGM5Nzg2ZTE2MDI4N2EwOTBlODRiOWNiOWQxYWIyNWRiYjJlNTIifQ%3D%3D"]},"controller":"HomeController@getIndex","getData":[],"postData":[],"sessionData":{"_token":"cydeMdVkzhOe4DHipWlS4MAIB5vYxvHltFH4vziq","flash":{"old":[],"new":[]}},"cookies":{"cartalyst_sentry":"eyJpdiI6Ik9pTnIwK2duXC84V1lcL244MjhIXC9PRUE9PSIsInZhbHVlIjoiSEkxTGt0RjY5RDdtUTZpc3hxSnREZHZiT1JiTWRZNm1WSzlmZEoxOTNHKzZcL2ZlcjlRUHlsZFpRaG1wZDJzNUNlVUt3NEZlVUJORzhOdUdtSHp4SFpTN3pWdkQ4eVVQRk9cL0RJNFpoTzl2REtpdUhcLzV6VElCZFhwallqeVpFVHciLCJtYWMiOiIzNTNlMzJhYjk3OTgxZjFiMDRlODNlMDAwMDNhN2IzZGRmMTgwM2U1MTY0YWVkOTQ5MWUyODEwYmJkOGNhYzBjIn0=","laravel_session":"eyJpdiI6IjM0b1BNZVwvWTZ1Z1ZrMjM2UHNqNjhRPT0iLCJ2YWx1ZSI6IldvWUt5VFcxYUdOeFV6SklWMU9FZHAxSkt2eUdYeUJOS09lcUFXOVFIa255TkphcytmZVp2elwvQlBKM0llTnd2UlJxTkUwXC9Da3NUVzRnQ3VISkZnb0E9PSIsIm1hYyI6IjVjODhkZDMxMjk0M2Y4NjcxYjAwODVhYjVmOGM5Nzg2ZTE2MDI4N2EwOTBlODRiOWNiOWQxYWIyNWRiYjJlNTIifQ=="},"responseTime":1448021374.7076,"responseStatus":200,"responseDuration":87.081909179688,"databaseQueries":[{"query":"SELECT * FROM `users` WHERE `users`.`deleted_at` IS NULL and `users`.`id` = '1' LIMIT 1","duration":0.32,"connection":"mysql"},{"query":"SELECT * FROM `throttle` WHERE `user_id` = '1' LIMIT 1","duration":0.2,"connection":"mysql"},{"query":"SELECT *, COUNT(*) as count, MAX(created_at) as latest_date FROM `notifications` WHERE `user_id` = '1' and `status` = '0' GROUP BY `status`, `name` ORDER BY `created_at` DESC LIMIT 10","duration":1.32,"connection":"mysql"},{"query":"SELECT * FROM `throttle` WHERE `user_id` = '1' LIMIT 1","duration":0.23,"connection":"mysql"},{"query":"SELECT count(*) as aggregate FROM `doc_types`","duration":0.24,"connection":"mysql"},{"query":"SELECT count(*) as aggregate FROM `folder_types`","duration":0.14,"connection":"mysql"},{"query":"SELECT `groups`.*, `users_groups`.`user_id` as `pivot_user_id`, `users_groups`.`group_id` as `pivot_group_id` FROM `groups` inner join `users_groups` on `groups`.`id` = `users_groups`.`group_id` WHERE `users_groups`.`user_id` = '1'","duration":0.32,"connection":"mysql"}],"databaseDuration":2.77,"timelineData":{"total":{"start":1448021374.6205,"end":1448021374.7088,"duration":88.293075561523,"description":"Total execution time.","data":[]},"initialisation":{"start":1448021374.6205,"end":1448021374.6577,"duration":37.149906158447,"description":"Application initialisation.","data":[]},"boot":{"start":1448021374.6577,"end":1448021374.6578,"duration":0.14495849609375,"description":"Framework booting.","data":[]},"run":{"start":1448021374.6577,"end":1448021374.7088,"duration":51.140785217285,"description":"Framework running.","data":[]},"dispatch":{"start":1448021374.67,"end":1448021374.7067,"duration":36.699056625366,"description":"Router dispatch.","data":[]},"controller":{"start":1448021374.6904,"end":1448021374.7067,"duration":16.26181602478,"description":"Controller running.","data":[]}},"log":[],"routes":[],"emailsData":[],"viewsData":[],"userData":null}

@itsgoingd @JasonMortonNZ please re-open the issue.

from clockwork.

bcalik avatar bcalik commented on May 14, 2024

Ok I have found the issue.

I have created a singleton named 'app'. Which causes the Clockwork error like this:
`Argument 1 passed to Clockwork\Support\Laravel\Controllers\LegacyController::__construct() must be an instance of Illuminate\Foundation\Application, instance of stdClass given``

Here is the code caused the issue:

  App::singleton('app', function(){
    $app = new stdClass;
    ...
    return $app;
  });
  $app = App::make('app');

from clockwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.