Questions tagged [phpsh]

phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation.

phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source and released under a modified BSD license.

If you don't have --with-readline and --with-libedit compiled into your PHP binary but you do have Python2.4 installed, you may find this useful. If your PHP binary includes the readline module, you may prefer one of the pure PHP alternatives you can find by searching the Internet. The source code for phpsh is now available on github at http://github.com/facebook/phpsh.

If you use git, you can clone the source repository by doing:

git clone git://github.com/facebook/phpsh.git

You can also download a snapshot of the latest version as either a zip or gzipped tarball.

(from: http://www.phpsh.org/ )

14 questions
10
votes
2 answers

REPL/interactive shell with proper PHP 5.3 support?

I've been using phpsh for a while now, and it's worked great in the past. But its namespace support still isn't very good and this can be pretty frustrating. Things like \Somespace\Someclass::someStaticFunction() don't work without disabling the…
Marlies
  • 927
  • 1
  • 5
  • 18
4
votes
2 answers

How to do multiline input in phpsh?

Can I something like: php>multline start; .... $a =<<< EOF .... hello hi how are you this is phpSH .... hello there its test line .... EOF; .... multiline end; in phpsh?
mko
  • 21,334
  • 49
  • 130
  • 191
3
votes
4 answers

Installing phpsh on linux, Python error

I'm trying to install phpsh on Ubuntu and I did everything on the install guide, but I am getting this error: Starting php Traceback (most recent call last): File "/usr/local/bin/phpsh", line 47, in verbose=opts.verbose) File…
3
votes
1 answer

Install phpsh on Windows

Has anyone had success installing phpsh on Windows? I have Php 5.2 and Python 2.7 on my Windows 7 machine. When I try to run setup.py, I get a NameError: name '__init__' is not defined. I found someone had forked the project here, but I ran into…
JellicleCat
  • 28,480
  • 24
  • 109
  • 162
2
votes
1 answer

Propel in PHP Interactive with Database Timeout

How to make the MySQL Database always available during use the PHP Interactive Shell? I have the problem that I connect to DB at the beginning and it timeout in shortly. System Admin set the timeout of MySQL database to 10 seconds (idle) and I am…
scalopus
  • 2,640
  • 3
  • 19
  • 32
1
vote
0 answers

How to install phpsh on windows 8

Ive been download Python 2.7.6 recently.and olso ive been download phpsh(http://www.phpsh.org/) . My Question Is 1.Where i can place the phpsh files into the python 2.By following the instructions manual from there…
Nadeem Akram
  • 195
  • 1
  • 1
  • 7
1
vote
1 answer

phpsh not found

I am having problems with phpsh after I upgraded to mountain lion I installed php5.4 with the php-osx and got that playing nice with mysql. So when I followed the directions to install phpsh and got the phpsh not found in ZSH shell, It didn't make…
pixel 67
  • 1,530
  • 18
  • 22
0
votes
0 answers

phpsh installation problems on ubuntu latest version

I've been found an error, when i install phpsh on ubuntu. nadeem@nadeem-Inspiron-5521:~/Downloads/phpsh$ phpsh Starting php Traceback (most recent call last): File "/usr/local/bin/phpsh", line 47, in verbose=opts.verbose) File…
0
votes
1 answer

PHP Overwrite file on other server

I have a file called updateServer.php that has the following code: $myfile = fopen("http://173.XXX.XXX.XXX/myurl/demo/path.txt", "w") or die("Unable to open file!"); I want to use this file to edit the path.txt file that is placed on another…
Jiteen
  • 429
  • 2
  • 6
  • 23
0
votes
2 answers

How to install phpsh on windows machine?

I'm trying to install phpsh on my windows machine but i get this error message Traceback (most recent call last): File "setup.py" , line 8, in (module) from phpsh import __version__ File "src/phpsh.py", line 1, in (module) …
nklenta
  • 21
  • 2
0
votes
1 answer

Installing phpsh on Turnkey Linux and cannot built setup.py

I've got a virtual machine running a Turnkey Linux lamp stack and I've been trying to install phpsh for testing out bits of php development. I've downloaded the source from github like so git clone git://github.com/facebook/phpsh.git But then when…
0
votes
1 answer

Run phpsh with specific php script

By default phpsh uses system's default PHP, my system it's /usr/local/bin/php, which is php 5.2. How can I run phpsh with my custom php path — /srv/bin/php?
Hong Truong
  • 821
  • 7
  • 11
0
votes
0 answers

Why does phpsh not show structured information about variables?

I have just installed phpsh shell as described here: http://vocecommunications.com/blog/2010/12/how-to-setup-an-interactive-wordpress-shell/ Normally, the shell should show introspection of returned variables as here: php> =…
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
-4
votes
1 answer

Obfuscating script in WordPress

One of my clients using WordPress got hacked with some malicious code like below, There are lots of file like this in all over her public_html. Though I told her to delete everything and re-upload all and update framework, plugins etc but I also…
farness
  • 369
  • 2
  • 11