itsgoingd / clockwork Goto Github PK
View Code? Open in Web Editor NEWClockwork - php dev tools in your browser - server-side component
Home Page: https://underground.works/clockwork
License: MIT License
Clockwork - php dev tools in your browser - server-side component
Home Page: https://underground.works/clockwork
License: MIT License
After adding to composer and update ide-helper write this error on generating:
PHP Fatal error: Call to undefined method Illuminate\Support\Facades\Auth::driver() in PATH/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 205
When using codesleeve/asset-pipeline with Laravel 4 each asset is served up over a route provided through a service provider. While this might be nice for some users, for the most part it is something I'd like to have hidden so I only see controller requests from the application.
Perhaps Clockwork could ignore routes ending in asset filetypes (images, fonts, scripts, etc.) or provide an option to exclude certain routes, controllers or the like.
Hi,
I use my App::before Filter to check if the first segment of the requested URL is an available locale (e.g en or de) if it's not, it Redirects to a default -> because there is no Route set for this.
When i redirect it throws an error, on line 183 of LaravelDataSource.php (calling getAction() on a non Object)
here is my little fix:
protected function getController()
{
$router = $this->app['router'];
if (method_exists($router, 'getCurrentRoute')) { // Laravel 4.0
// $controller = $router->getCurrentRoute()->getAction();
$current = $router->getCurrentRoute();
$controller = (is_null($current)) ? null : $current->getAction();
} else { // Laravel 4.1
$controller = $router->current()->getActionName();
}
if(!is_null($controller))
{
if ($controller instanceof Closure) {
$controller = 'anonymous function';
} else if (is_object($controller)) {
$controller = 'instance of ' . get_class($controller);
} else if (is_array($controller) && count($controller) == 2) {
if (is_object($controller[0]))
$controller = get_class($controller[0]) . '->' . $controller[1];
else
$controller = $controller[0] . '::' . $controller[1];
} else if (!is_string($controller)) {
$controller = null;
}
}
return $controller;
}
Greetings :-)
Just a little heads up, some new changes in the Laravel 5 branch changes filters to middleware. And makes controllers plain objects that uses annotations to set middleware.
I'll try to take a look at it if I get the time, but just wanted to tell you what's up ;)
Hi, some applications might not use a database. I have only tried clockwork with Laravel 4 so I don't know if this is a general issue. Would it make sense to make database use optional by having some config variable that lets clockwork skip it's database profiling?
You can't drag the separator here (http://ep.d.pr/msbY/2LDoCsle) to widen or narrow either pane. Makes it hard to see what's going on in some cases.
Regards, and thanks for being working on this.
I want to extend the clockwork with custom tab from server side. Is that possible?
When using Clockwork and Laravel 4.0 I'm not able to thrust the Session::flash data. Sometimes it is still there, sometimes it is gone.
Anyone has the same issues there?
My current laravel project uses multiple database connections. Clockwork will only register one EloquentDataSource for the default connection, so you will only see queries for that connection in the logs. It would be nice to have an array with connection names in the package config file, so that a data source is created for all the connections in the array.
Hello,
can you publish a "reference" file for an example JSON response in the wiki ? Will be very usefull !
I ran into an issue where there was no output in Chrome coming from Laravel 4.1.
Using the methods in #3, I was able to see that the headers were correctly being sent.
Moving the router call to the Service Provider's boot()
method instead of the register()
method fixed the issue for me.
Let me know if you'd like PR. Or, maybe using the boot method would cause other issues?
Any idea why this is only showing profiling information for AJAX requests? I tried everything without luck. Thanks!
So after many hours of frustration here's where I'm at.
"itsgoingd/clockwork": "1.*"
to my composer.json file.'Clockwork\Support\Laravel\ClockworkServiceProvider'
to my providers array, and added 'Clockwork' => 'Clockwork\Support\Laravel\Facade',
to my aliases array.app/filters.php
file:App::before(function($request)
{
Event::fire('clockwork.controller.start');
});
App::after(function($request, $response)
{
Event::fire('clockwork.controller.end');
});
composer dump-autoload -o
for good measure.php artisan serve
and we're running on (localhost:8000).localhost:8000
in chrome, check the headers and here's where things get strange :)The headers read:
X-Clockwork-Id:1392079506.9878.449334262
X-Clockwork-Version:1.4.2
Note: Composer installed Clockwork v1.4.4 , which is weird?
This is from my composer.lock file:
"name": "itsgoingd/clockwork",
"version": "v1.4.4",
"source": {
"type": "git",
"url": "https://github.com/itsgoingd/clockwork.git",
"reference": "2d39c88ba507fde4bd21b11971e429762303224c"
}
I hit the clockwork tab in Chrome (Version 32.0.1700.107) and nothing appears.
I do at this point have .json' files in
app/storage/clockwork` containing all the correct data that should be being displayed by the Chrome extension.
A few points where I feel the issue could be laying are:
I've seen other's mention that white space has been an issue for them, but this isn't the case here. I'll be interested to see if there's a solution to this.
Class 'CI_Controller' not found
I use Laravel and my controller at path app/Mycontrol/fileuseclockwork.php
at fileuseclockwork.php
use Clockwork;
Clockwork::info('test']);
That error.
before that app/controller/fileuseclockwork.php
at fileuseclockwork.php
Clockwork::info('test']);
it use fine.
Why this error?
My guess is
when I click on an item on the clockwork tab, a request is sent to the same route and thus my app is executed and some session information is changed.
So my captcha doesnt work.
I use Laravel 4.0, captcha / mews / clockwork - latest.
disabling clockwork in chrome browser and restarting the page solves the issue..
A list of all routes would also be usefull. I might take a swing at this for L4.
Hello,
I installed Clockwork for Chrome and set the provider and alias in Laravel. I extended the Basecontroller too.
I see in the app/storage/clockwork folder json-files filling up. I read already the other closed issue "blank output". But disabling other profiler don't help me.
Trying this URL: http://my_host/__clockwork/1385391368.3305.1545016532
I get only a header, but no response:
Request URL:http://my_host/__clockwork/1385391368.3305.1545016532
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Cookie:laravel_session=eyJpdiI6IlplQ3BVbkd3dDVhcGRzb0xYaW8rWVhuMFFNTFppNFhJcThERHg5VDBZaEk9IiwidmFsdWUiOiJjSUNlZE1Nc3JMR1k2Ykw3d2JSdkpCaUdjYlIwVTBDMk9ubU5LSFdjdDNxMFRCWk1cL3ExWjkzTmVEYStwbGNNMldlYzkxc293NDgzVTFcL3R4Z21qeXNRPT0iLCJtYWMiOiJjOTcwMDFkNTBhOWFhZGQ4NGQzZDI4OWVjNGY3M2E4ZTJkODRmNDYwYWVjNjdmZTE3YTAzMzQxNmJhZWU4ZDMzIn0%3D
Host:my_host
Pragma:no-cache
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36
Response Headersview source
Connection:Keep-Alive
Content-Type:text/html
Date:Fri, 17 Jan 2014 07:56:57 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8y DAV/2 PHP/5.4.4
Transfer-Encoding:chunked
X-Powered-By:PHP/5.4.4
Can you help me please? I want to use your tool!
Just installed clockwork 1.*
in a fresh Laravel 4.2 project, as soon as I added the service provider config i get this error :(
PDOException thrown with message "SQLSTATE[HY000] [2002] No such file or directory"
Stacktrace:
#26 PDOException in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#25 PDO:__construct in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:47
#24 Illuminate\Database\Connectors\Connector:createConnection in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:20
#23 Illuminate\Database\Connectors\MySqlConnector:connect in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:59
#22 Illuminate\Database\Connectors\ConnectionFactory:createSingleConnection in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:47
#21 Illuminate\Database\Connectors\ConnectionFactory:make in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:127
#20 Illuminate\Database\DatabaseManager:makeConnection in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:63
#19 Illuminate\Database\DatabaseManager:connection in /Users/wayne/source/primedia-cms/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php:63
#18 Clockwork\Support\Laravel\ClockworkServiceProvider:Clockwork\Support\Laravel\{closure} in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Container/Container.php:498
#17 Illuminate\Container\Container:build in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Container/Container.php:425
#16 Illuminate\Container\Container:make in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:463
#15 Illuminate\Foundation\Application:make in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
#14 Illuminate\Container\Container:offsetGet in /Users/wayne/source/primedia-cms/source/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php:99
#13 Clockwork\Support\Laravel\ClockworkServiceProvider:Clockwork\Support\Laravel\{closure} in <#unknown>:0
#12 call_user_func_array in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:199
#11 Illuminate\Events\Dispatcher:fire in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:154
#10 Illuminate\Events\Dispatcher:until in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1244
#9 Illuminate\Routing\Router:callFilter in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Routing/Router.php:972
#8 Illuminate\Routing\Router:dispatch in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:738
#7 Illuminate\Foundation\Application:dispatch in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:708
#6 Illuminate\Foundation\Application:handle in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Session/Middleware.php:72
#5 Illuminate\Session\Middleware:handle in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php:47
#4 Illuminate\Cookie\Queue:handle in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php:51
#3 Illuminate\Cookie\Guard:handle in /Users/wayne/source/primedia-cms/source/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23
#2 Stack\StackedHttpKernel:handle in /Users/wayne/source/primedia-cms/source/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:606
#1 Illuminate\Foundation\Application:run in /Users/wayne/source/primedia-cms/source/public/index.php:49
#0 require_once in /Users/wayne/source/primedia-cms/source/server.php:19
Hi
I tried to install clockwork with slim 2 and the result is that I do not see anything in the Chrome DevTools panel.
I saw the issue #3 and I tried to the route http://your-host/__clockwork/ID
, but actually I do not see anything, even though I see in the folder configured the json files named with the correct ID that is passed into the headers of the page.
I've done something wrong? I have to apply some particular rule inside my .htaccess?
here's my .htaccess configuration
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
There's a $this inside the anonymous function.
line: 149 $this->replaceUnserializable
file: LaravelDataSource.php
This isn't allowed in php 5.3 only in 5.4 as php docs reference
http://www.php.net/manual/en/functions.anonymous.php
When the clockwork folder is created inside app/storage, a .gitignore file also needs creating containing the following:
*
!.gitignore
That way, the JSON files won't show up as unstaged changes in Git.
Cheers,
Dan
When calling Clockwork::info() to output debug information, the items show up in Chrome in a random order. They're probably sorted by the "time" column by default, but that is only accurate to the nearest second, so the debug information is displayed in an order that is essentially random.
This can be an issue if you need to know the actual sequence of events.
Hi,
trying to set this up with Laravel - I get the feeling I'm missing a step somewhere.
The json files are generated correctly, accessing them through /__clockwork/{id} works, but the Clockwork tab in the Chrome extension remains empty. I checked the response headers and it looks like X-Clockwork-Id and X-Clockwork-Path are not being set.
Any ideas what might be causing this? Clockwork is explicitly enabled in the published config file, and the start and stop events are being fired from my base controller's constructor.
I have a Slim 2.3.2 app installed in subfolder in dev.example.com/foo/
Nothing appears to Clockwork extension pane.
I can access the json data from dev.example.com/foo/__clockwork/id
. However I can see from the logs Clockwork extension is trying to retrieve the data from root.
dev.example.com ::1 - - [14/Oct/2013:22:37:19 +0300] "GET http://dev.example.com/__clockwork/1381779436.7567.898323514 HTTP/1.1" 404 235
Workaround is to have a hook which sends the correct path in X-Clockwork-Path header.
$app->hook("slim.before", function() use ($app) {
$app->response->headers->set("X-Clockwork-Path", "/foo/__clockwork/");
});
I am getting the above error from the FileStorage class
Not too sure what is causing it, it is reproducible by going to a specific page, it is only happening on one server but not the other, and there are no get, or post requests on this page.
Any ideas?
Currently there doesn't seem to be a way to clear the log of requests without closing/reopening the devtools. (Or am I missing something?)
Would it be possible to add a clear icon (like in the main Network tab) to clear all recent requests?
how can i turn it on only for development / my local env?
Upon updating to 4.2.10 I get this error when using the Laravel service provider.
Stack trace.
Illuminate\Container\BindingResolutionException thrown with message "Target [Psr\Log\LoggerInterface] is not instantiable." Stacktrace: #35 Illuminate\Container\BindingResolutionException in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:513 #34 Illuminate\Container\Container:build in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:428 #33 Illuminate\Container\Container:make in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:462 #32 Illuminate\Foundation\Application:make in /vagrant/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php:247 #31 Illuminate\Mail\MailServiceProvider:Illuminate\Mail\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:214 #30 Illuminate\Container\Container:Illuminate\Container\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:501 #29 Illuminate\Container\Container:build in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:428 #28 Illuminate\Container\Container:make in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:462 #27 Illuminate\Foundation\Application:make in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:806 #26 Illuminate\Container\Container:offsetGet in /vagrant/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php:102 #25 Illuminate\Mail\MailServiceProvider:Illuminate\Mail\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:214 #24 Illuminate\Container\Container:Illuminate\Container\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:501 #23 Illuminate\Container\Container:build in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:428 #22 Illuminate\Container\Container:make in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:462 #21 Illuminate\Foundation\Application:make in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:806 #20 Illuminate\Container\Container:offsetGet in /vagrant/vendor/laravel/framework/src/Illuminate/Mail/MailServiceProvider.php:38 #19 Illuminate\Mail\MailServiceProvider:Illuminate\Mail\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:214 #18 Illuminate\Container\Container:Illuminate\Container\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:501 #17 Illuminate\Container\Container:build in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:428 #16 Illuminate\Container\Container:make in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:462 #15 Illuminate\Foundation\Application:make in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:806 #14 Illuminate\Container\Container:offsetGet in /vagrant/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php:49 #13 Clockwork\Support\Laravel\ClockworkServiceProvider:Clockwork\Support\Laravel\{closure} in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:501 #12 Illuminate\Container\Container:build in /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php:428 #11 Illuminate\Container\Container:make in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:462 #10 Illuminate\Foundation\Application:make in /vagrant/vendor/itsgoingd/clockwork/Clockwork/Support/Laravel/ClockworkServiceProvider.php:26 #9 Clockwork\Support\Laravel\ClockworkServiceProvider:boot in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:585 #8 Illuminate\Foundation\Application:Illuminate\Foundation\{closure} in <#unknown>:0 #7 array_walk in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:585 #6 Illuminate\Foundation\Application:boot in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:743 #5 Illuminate\Foundation\Application:handle in /vagrant/vendor/laravel/framework/src/Illuminate/Session/Middleware.php:72 #4 Illuminate\Session\Middleware:handle in /vagrant/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php:47 #3 Illuminate\Cookie\Queue:handle in /vagrant/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php:51 #2 Illuminate\Cookie\Guard:handle in /vagrant/vendor/stack/builder/src/Stack/StackedHttpKernel.php:23 #1 Stack\StackedHttpKernel:handle in /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:641 #0 Illuminate\Foundation\Application:run in /vagrant/public/index.php:49
The title says it all. I have a project where the $application_folder and $system_path both are above CI's index.php like so:
$system_path = __DIR__.'/../framework/system';
$application_folder = __DIR__.'/../framework/application';
This causes the filepath for the hooks filepath variable to be something weird such as:
'{public html dir}/../../../..//vendor/itsgoingd/clockwork/Clockwork/Support/CodeIgniter'
The correct filepath should be:
'{public html dir}/vendor/itsgoingd/clockwork/Clockwork/Support/CodeIgniter'
Any suggestions for this? Maybe we could have a CI config file where we can manually define the composer vendor directory with respect to CI's APPPATH?
Installed Clockwork and using Laravel 4. When I check headers I get:
GET /__clockwork/1402170646.6961.2035025732 HTTP/1.1
Host: localhost
Accept: text/css,/;q=0.1
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Referer: http://localhost/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Length: 320
Content-Type: text/html; charset=iso-8859-1
Date: Sat, 07 Jun 2014 19:50:46 GMT
Keep-Alive: timeout=5, max=97
Server: Apache/2.4.9 (Win64) PHP/5.5.12
Using WAMP for local dev.
Hi,
I noticed that, when using Clockwork in Laravel, the storage/clockwork directory gets bloated pretty fast. I figured it would be nice to have a command to fix that. I added the code in case you'd like to add it to the package.
I also updated my composer.json so that the directory gets cleaned after every update:
"post-update-cmd": [
...
"php artisan clockwork:clean"
]
ClockworkCleanCommand.php:
<?
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClockworkCleanCommand extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'clockwork:clean';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Cleans the app/storage/clockwork directory';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return void
*/
public function fire()
{
$this->info('Cleaning app/storage/clockwork...');
$files = scandir(storage_path().'/clockwork/');
foreach($files as $file)
{
if(substr($file, -4) == "json")
unlink(storage_path().'/clockwork/'.$file);
}
$this->info('Done');
}
}
?>
When using
$dogs = ['Gunner', 'Shilo']; Log::info($dogs)
Seems Clockwork no longer outputs it as object (in clockwork console)
Instead it outputs as:
array(0 => 'Gunner', 1 => 'Shilo')
And is not an object
Am I missing something here?
After some local testing with Laravel for a new project I noticed that critical
, alert
and emergency
appear as error
, warning
and error
respectively in Chrome's dev tools. I found where this occurs in the code:
https://github.com/itsgoingd/clockwork/blob/master/Clockwork/DataSource/LaravelDataSource.php#L130
Is there a particular reason why? I only ask as for our purposes it would be useful for us to have these appear in the Clockwork Chrome app as their native error levels.
Apart from that the tool is really great, it's really helpful for us to test our app's bottlenecks ๐ ๐
When I do a functional test in Larvavel and use Route::enableFilter() I get an error message:
This is my testcode:
public function testRedirectedIfNotLoggedIn()
{
Route::enableFilters();
$this->auth->logout();
$response = $this->call('GET', 'rest/questionnaire/1');
$this->assertRedirectedTo('/');
}
and this is the error output in my console after I run phpunit:
{"error":{"type":"ErrorException","message":"Undefined index: REQUEST_METHOD","file":"\/Applications\/MAMP\/htdocs\/aletheio\/vendor\/itsgoingd\/clockwork\/Clockwork\/DataSource\/PhpDataSource.php","line":94}}
Do not have time at the moment to dig deeper. Just wanted to let you know.
Line:78
file: ClockworkServiceProvider.php
Changing methods isCollectingData() and isEnabled() from private to public fixes the problem.
I have clockwork actually setup and working in my local homestead environment, but on my production server it doesn't seem to work. The headers are coming through and the files are being generated, and if I navigate to them, they come back with valid json. Kind of don't know what else to do.
Just to note, even though this is a production server, I do have debug enabled for the time being (still technically in development).
Any Insight would be great
In laravel, If Exceptions are set to be caught in global.php file then nothing is logged by clockwork. This seems obvious, but I was hoping you can tell us what needs to be done there to get it working.
Hey,
Nothing is being logged in the Clockwork Chrome extension. I see the log files from clockwork in app/storage/clockwork but cannot nothing is returned via (as per the headers from Laravel)
mydomain.com/public/__clockwork/1388899685.2844.79942867
Any suggestions on this one? I've double and triple checked the steps you provided were followed to the T.
Any way to see a history of old request in a pretty interface?
Hi, Does anyone have info on how to implement Clockwork in a CakePHP v2.3.7 project?
thanks!
Enrique
In a old post I read of some people that have asked about Doctrine support. I use Laravel with Doctrine, so I was wondering if you are already thinking to add this Data Source.
Hi
I have installed the dependency and updated the service provider in Laravel.
I correctly see the headers being set for clockwork and json files filling up the storage/clockwork directory, but I don't see any ouput.
Any ideas? Tried on an Ubuntu virtual machine connected from 31.0.1650.57 for Mac and also tried the same from MAMP
Any ideas?
Thanks
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Cookie:laravel_session=uhefvq8o6tq7nt3klrd8ivd2s4
Host:local.research.designwerk
Pragma:no-cache
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Response Headersview source
Cache-Control:no-cache
Connection:Keep-Alive
Content-Encoding:gzip
Content-Type:text/html; charset=UTF-8
Date:Mon, 25 Nov 2013 15:06:34 GMT
Keep-Alive:timeout=5, max=100
Server:Apache
Set-Cookie:laravel_session=uhefvq8o6tq7nt3klrd8ivd2s4; expires=Mon, 25-Nov-2013 17:06:34 GMT; path=/; httponly
Transfer-Encoding:chunked
Vary:Accept-Encoding
X-Clockwork-Id:1385391994.24.2023036883
X-Clockwork-Version:1.1
X-Powered-By:PHP/5.4.4
Clockwork needs the ability to clean up after itself with a limitation.
We have clockwork:clean
but it would be great it we could have
clockwork:clean --age=300
which would clean any files that are older than 300 minutes (5 hours).
This shouldn't be too difficult to implement since the files begin with microtime(true)."."
you can just grab the first section (explode('.', $files)
) and check if microtime(true) - ($ageFromCommand*60) >= $fileMicrotime
if it is delete it, otherwise just skip the file.
The use case for this is an automated cleanup cron that runs every hour, we don't want to delete fresh data since we may need to analyze it if a user calls in with an error. but if it's older than 5 hours we presume it safe to delete.
It seems that getCurrentRoute() was re-added to the router for backwards compatibility, so the current check for Laravel 4.1 doesn't work anymore resulting in the above error mesage.
Integrating Clockwork with Monolog would be very interesting. FYI there is already a connector to FirePHP and ChromePHP in Monolog.
I have confirmed the parent directory has correct privileges but still receive error? This is working with Slim framework
var_dump result --> string '/requests/storage/path' (length=22)
Slim Application Error
The application could not run because of the following error:
Details
Type: ErrorException
Code: 2
Message: mkdir(): Permission denied
File: /Users/mikee/Documents/Projects/slim-clockwork/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php
Line: 26
Trace
#0 [internal function]: Slim\Slim::handleErrors(2, 'mkdir(): Permis...', '/Users/mikee/Do...', 26, Array)
#1 /Users/mikee/Documents/Projects/slim-clockwork/vendor/itsgoingd/clockwork/Clockwork/Storage/FileStorage.php(26): mkdir('/requests/stora...', 448, true)
#2 /Users/mikee/Documents/Projects/slim-clockwork/vendor/itsgoingd/clockwork/Clockwork/Support/Slim/ClockworkMiddleware.php(32): Clockwork\Storage\FileStorage->__construct('/requests/stora...')
#3 /Users/mikee/Documents/Projects/slim-clockwork/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Clockwork\Support\Slim\ClockworkMiddleware->call()
#4 /Users/mikee/Documents/Projects/slim-clockwork/vendor/slim/slim/Slim/Slim.php(1261): Slim\Middleware\PrettyExceptions->call()
#5 /Users/mikee/Documents/Projects/slim-clockwork/public/index.php(40): Slim\Slim->run()
#6 {main}
I've attempted to install Clockwork in a fresh copy of CodeIgniter 2.1.4, using Composer, and I'm unable to get it working correctly.
I've followed the instructions to the letter, but when I load a test controller, I get the message:
Fatal error: Class 'Clockwork\Support\CodeIgniter\Hook_Clockwork_Register' not found in /application/config/hooks.php
It's as if Composer isn't loading Clockwork correctly, but I've installed a separate Composer package under the same test site, and this works fine. I am new to Composer, though, so I may have missed an important step; do I have to manually load Clockwork anywhere, or is Composer (and the CodeIgniter hook) designed to do this for me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.