seldaek / php-console Goto Github PK
View Code? Open in Web Editor NEWPHP Debug Console
License: Other
PHP Debug Console
License: Other
I used the following input
<?php
$it = new APCIterator('user', 'll/[^/]{1,}');
and this results into a Error occured while posting your code.
error.
other input works as expected.. not sure whats going on, but it seems like the code doesn't get posted at all (therefore a client side issue).
Tested on FF24 and Chrome 28
Hi!
Maybe i am doing it wrong - but i get this error:
"Missing vendor/autoload.php file. Did you forget to run "composer install" ?"
I downloaded the zip file and did not use composer.
The manual says it should be possible.
What do i miss ?
Thanks!
why isn't this bundle availbale over packagist and therefore can be installed using composer?
lately I am testing a lot of scripts which handle data, which contains non-printable chars.
those lead to some weird output, because kumo says a string has 6 chars, but contains only 5 visible chars.
I am not sure if this is something which should be handled at php-console level, but it makes debugging sometimes really hard. would be great to get a hint from php-console which tells me that there are some control-chars in the game.. (maybe they could be highlighted with css?)
I try to install only making download/clone e uncompress but not have vendor.
I try to install with composer:
composer create-project --stability=dev --keep-vcs seld/php-console
Error:
[InvalidArgumentException]
Could not find package seld/phpconsole with stability dev.
Then I down package zip, uncompress and
cd /var/www/html/php-console
composer update
And works.
Thank you for your work.
Hi!
I get a "Script ended unexpectedly" error when running the following code :
$d = new DateTime();
$i = new DateInterval('P2W');
$p = new DatePeriod($d, $i, 5);
< $p;
php-console is running in the php 7 built-in web server (PHP 7.0.8-0ubuntu0.16.04.3).
Am I doing something wrong ?
Hi, Actually I like to change the theme of the editor. Where should I edit the code to get it work!
I tried
editor.setTheme("idle_fingers");
But its not working!
Hi!
I am fiddling arround how I could implement a way of binary data handling within the php-console.
e.g. I have code which open and streams a pdf, and I want the php-console to open and show the pdf in the browser when executing it..
simple example:
header('Content-Type: application/pdf');
readfile('my.pdf');
same use-case when creating images with e.g. GD and like to render them with the console.
What I tried already:
Make 'Content-Type' sending within php-consoles' index.php optional, so one can send the header from the eval'ed code. Now I get the data back from the server but I have not clue how I could put this give that binary string to the browser, to get it rendered/opened properly.
Any ideas how to achvie such thing?
Just checkout master branch, that's it. there is not directory for file for vendor or file autoload.php, they why are including it in index.php?
Warning: require(vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/php-console/index.php on line 47 Fatal error: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/html/php-console/index.php on line 47
config.php
<?php
return array(
// how many spaces to use for indention, 0 will make it use real tabs
'tabsize' => 4,
// whitelist of IPs which don't need to be authenticated
// use '*' to allow any IP
'ip_whitelist' => array('*'),
// bootstrap file, if defined this file will be included before
// the code entered by the user is evaluated. any variables and classes
// defined here will be accessible by the eval'd code
'bootstrap' => null,
);
error gone by following commands
mkdir vendor
touch vendor/autoload.php
Is there a way for u to make a code editor area resizable?
Something like on jsfiddle
what do you think about adding support for opening/reading/writing files with the php-console via Gaufrette[1] attached resources?
[1] https://github.com/KnpLabs/Gaufrette
so, if configured... one could e.g. edit files on the server where php-console is deployed or use it to edit files of a remote server (using remote adapters etc..)
I cloned the repository and php-console immediately failed at runtime due to this statement on line 47 of index.php:
require 'vendor/autoload.php';
This file is not included, nor is it immediately obvious where to acquire it. I commented out the line, which allowed php-console to actually load the console. I then attempted to test a simple code, but in the right column received error:
Fatal error: Class 'SensioLabs\Melody\Resource\ResourceParser' not found in MelodyPlugin.php on line 17
Are these prerequisite dependencies? README mentions nothing of this, so either the issue is that they are missing and should be bundled, or that the instructions omit the fact that they must be installed separately as dependencies.
Downloaded the zipped folder from here and tried to run it and it can't find the autoload.php file in the vendor folder. There's no vendor folder.
Sometimes you need to include/bootstrap a lib to run code within the debug console.
e.g. you like to try if an API of a certain library achieves what you want..
therefore it would be cool If I could somehow make a library which is distributed via composer/packagist available to the current source within phpconsole.
I think about something like http://composer.borreli.com/, so having a separate tab in which I can drop a composer.json and have everything available defined in this file at your fingertips.
I am using mamp pro php 5.3
and have this problem
Parse error: syntax error, unexpected '"', expecting T_STRING in /Users/Denis/Desktop/PHP/TempG/php-console/index.php(56) : eval()'d code on line 1
When I use date("Y") or date('Y')
I use this great tool to debug code or do some simple tests. sometimes when digging into code from legacy systems the charset/encoding also matters.
ATM php-console is always rendered in utf-8.
Would you accept a PR which adds a dropdown to toggle between charsets?
Running this PHP script in the addess bar.
i have this error::
ERR/401 Go Away
https://github.com/marijnh/CodeMirror
http://stackoverflow.com/questions/1619167/textarea-that-can-do-syntax-highlighting-on-the-fly
Now I need time to propose a PR ;-)
some parts of the posted code are processed and therefore line-numbers from the error on client side do not match with the origin input.
example input:
<?php
throw new Exception('lala');
outputs
Uncaught exception 'Exception' with message 'lala' in /home/COMPLEX/mstaab/htdocs/tools/php-console/index.php(64) : eval()'d code:1
but in fact the error is on line 2 in the origin code. The issue in this example is, that on server side <?php
is stripped from the source.
I will provide a PR which leaves a empty line for the origin <?php
tag (and remove the trim()
to get this aligned again.
Running this PHP script in the console fails.
( ! ) Fatal error: Uncaught exception 'Symfony\Component\Process\Exception\ProcessFailedException' with message 'The command "'[...]/php-console/composer.phar' 'config' '--global' 'vendor-dir' in [...]/php-console/vendor/symfony/process/Process.php on line 232
( ! ) Symfony\Component\Process\Exception\ProcessFailedException: The command "'[...]/php-console/composer.phar' 'config' '--global' 'vendor-dir'" failed. Exit Code: 1(General error) Working directory: [...]/php-console Output: ================ Error Output: ================ [RuntimeException] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly in [...]/php-console/vendor/symfony/process/Process.php on line 232
Call Stack
# Time Memory Function Location
1 0.0005 262600 {main}( ) .../index.php:0
2 0.0050 603208 MelodyPlugin->runScript( ) .../index.php:104
3 0.0056 633112 SensioLabs\Melody\Melody->__construct( ) .../MelodyPlugin.php:42
4 0.0100 971880 SensioLabs\Melody\Composer\Composer->getVendorDir( ) .../Melody.php:47
5 0.0134 1299576 Symfony\Component\Process\Process->mustRun( ) .../Composer.php:86
Script ended unexpectedly.
Ran on
Mac OS X 10.12.4
MAMP PRO 4.1 (Apache 2.2.31, PHP 5.2.68)
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.