The command line interface of the PHP programming language. It can be used as an alternative to shell script, perl script and so on.
1
vote
2answers
249 views
PHP based server using PHP CLI SAPI
Is it possible (and practicable) to develop a (simple) server software using the PHP CLI SAPI? Is there some usable way of (real) multi-threading in PHP so the server is able to handle several request ...
0
votes
2answers
39 views
Unexpected notice: undefined index when null
I've written a little script that is supposed to create an array that looks something like this:
array(1 => array( 'month' => 'Jan',
'salary' => '01/31/2013',
...
1
vote
1answer
29 views
optimal way of passing multiple callback functions as arguments?
I have a function that could be used in CLI or web application, that being said, there is a little difference in the process; for example: if I'm using this function for CLI it'll use a text progress ...
2
votes
6answers
3k views
How to use the php command line interactively?
Are there any howtos for using the php command line interactively? I found a lot about running sripts that are in text-files, but not really about the shell with the prompt where I type in commands:
...
0
votes
2answers
51 views
Running a PHP script on email arrival in an IMAP Server
I'm trying to implement a webmail in PHP. I would like to write a PHP CLI script which is run on every email arrival to store some parts of (not all of) incoming email into database for search ...
0
votes
1answer
33 views
How to read Output of Console Command in Yii?
I am trying to build some cron jobs to do backup some critical data on my Yii WebApplication
I have built the the CConsoleCommand Class that needs to run. It runs fine and the command is executed
...
0
votes
1answer
20 views
STDIN is only working randomly [PHP CLI]
So I have this script that changes the color of the text in the console. The problem is that although it accepts a string from both STDIN and the -s argument, it will occasionally leave out STDIN in ...
0
votes
1answer
83 views
Change save path of PHP interactive shell history
I once found a way to disable session logging by php -a, php's interactive shell. How do I turn it back on? Is there a way to send logging to another, file besides ~/.php_history? I think I may have ...
1
vote
2answers
23 views
PHP script doesn't run when called by lookup in $PATH variable
I have a PHP script located in a folder in my $PATH variable. The first line of the script is as follows:
#!/usr/bin/php
When I execute this script in bash by supplying the path to the script (for ...
0
votes
2answers
563 views
Loading a .user.ini PHP conf file using the PHP 5.4 internal server?
How do you load a .user.ini PHP configuration file when using the built in web server?
My setup is like this:
site
│ include.php
│
├───bin
│ router.php
│ server.bat
│
└───public
...
0
votes
2answers
43 views
Cannot run PHP CLI on WAMP on Windows 8
I have been trying on this for hours
i Get the below error
'php' is not recognized as an internal or external command,
operable program or batch file.
Steps i have done
1- I have added to Windows ...
0
votes
1answer
301 views
What's new with PHP 5.4? [closed]
I've been using class traits and the shortened array syntax and haven't really done any more research beyond that point because they are the two main features I've seen and use daily, what else should ...
8
votes
2answers
377 views
Find available port for PHP server
PHP 5.4 comes with a built-in server for development purposes. This is the kind of thing I've been waiting for months, because up until now I've had to sort of hack together a PHP script that listens ...
2
votes
2answers
2k views
Symfony2 with PHP 5.4 built-in server
I'm trying to work with Symfony2 with the new PHP 5.4 and its built-in server.
I downloaded Symfony2 and unziped it on my server and added this router.php file like mentioned here:
<?php
if ...
-2
votes
1answer
50 views
Where can I download MySQL extension for windows and how can I make it work with php5.4's built in http server? [closed]
PHP 5.4 does not include mysql extension.
Does anybody know where can I download mysql extension for windows and how to configure php's built in http server to work with it?