Questions tagged [chromephp]

ChromePhp is a PHP library for the Chrome Logger Google Chrome extension that allows to log variables to the Chrome console.

12 questions
3
votes
6 answers

Setting Up ChromePhp For Wordpress Using Xampp

I found ChromePhp to help with my PHP debugging woahs and installed the related Chrome plugin but I can't seem to get it to work. I originally put it in a folder in my redirected htdocs and added that to my PHP path in php.ini of xampp using: ;…
mtpultz
  • 17,267
  • 22
  • 122
  • 201
3
votes
1 answer

How to log arrays with ChromePhp Logger

Hi all I have the ChromePhp logging extension set up with PhpConsole and it's working fine. But the usual ChromePhp::log("Variable value: ".$variable) doesn't like having $variable as an array. It throws an array to string conversion error. Is there…
Kyohei Kaneko
  • 932
  • 2
  • 8
  • 25
2
votes
1 answer

Log from inside php functions using ChromeLogger and ChromePHP

I'm making a foray into php (wordpress) and have set up ChromeLogger (http://craig.is/writing/chrome-logger) and ChromePHP (https://github.com/ccampbell/chromephp). I can now log ok from my templates, but i'd really like to be able to log to the…
Max Williams
  • 32,435
  • 31
  • 130
  • 197
1
vote
1 answer

recursion detected in json encode

In Chrome PHP, objects are converted to json via json_encode before being sent to the response header. This does not work with objects that contain recursions - calling json_last_error_msg() says recursion detected and the output is empty. Is there…
Lokomotywa
  • 2,624
  • 8
  • 44
  • 73
1
vote
1 answer

Warning: Cannot modify header information - headers already sent when using ChromePhp.php

I wish to peek into my PHP code to see what is going on to help me rectify some issues. The PHP code is for processing the data from a form. I have tried Chrome Logger http://craig.is/writing/chrome-logger but I can't get it to send me any…
user1558796
  • 293
  • 4
  • 19
0
votes
0 answers

$_SERVER won't read certain system variables (And ignoring specifically CHROME_PATH)

I am trying to follow the guide of chrome-php/chrome and add an environment variable called CHROME_PATH but it doesn't detect it: https://github.com/chrome-php/chrome#using-different-chrome-executable. When I dd($_SERVER); it shows a list of all the…
pileup
  • 1
  • 2
  • 18
  • 45
0
votes
2 answers

How to directly output PDF from a Blade view to the browser using chrome-php/chrome?

I am trying to use chrome-php/chrome to load a Blade view and then output it to the browser instead of saving it. However using the docs in their GitHub I could not construct a working code that does that. I tried: public function createPdf(Request…
pileup
  • 1
  • 2
  • 18
  • 45
0
votes
0 answers

Running tabs concurrently chrome-php

I'm trying to open 20 concurrent tabs in chrome browser using php and chrome-php library. Each tab navigates to the URL, evaluates some js code, and gets the data from the page. foreach ($urls as $url) { $page = $this->browser->createPage(); …
crafter
  • 54
  • 7
0
votes
0 answers

How can I get headers of the URL from chrome-php

I am using chrome-php I want to get the header from the response Is there any way I can get it? Here is how I am trying to implement the functionality ... $browserFactory = new BrowserFactory('chromium-browser'); // starts headless chrome $browser…
0
votes
0 answers

How to block the urls during navigation to a page

Using the chrome-php library https://github.com/chrome-php/chrome I'm trying to block some URLs during navigation to a web page. From chromedevtools I've decided to use Network.setBlockedURLs method $page->getSession()->sendMessageSync( new…
crafter
  • 54
  • 7
0
votes
2 answers

Laravel 5.6 Monolog to output in Chrome console

I recently switched from Laravel 5.5 to 5.6 Everything's working fine except I can't seem to get logging to the Chrome console to work. I used to do this in AppServiceProvider.php $monolog = Log::getMonolog(); if (config('app.env') ===…
Kirk Olson
  • 554
  • 8
  • 16
0
votes
1 answer

Remove FirePHP headers with Varnish

I've got a line in my Varnish default.vcl that successfully clears the ChromePHP headers: sub vcl_fetch { remove beresp.http.X-ChromeLogger-Data; } I'm trying to do the same thing for FirePHP, but the data for FirePHP is spread out over many…
cmenning
  • 630
  • 5
  • 10