Skip to content

Tag: bash

Running php script (php function) in linux bash

How we run php script using Linux bash? php file test.php test.php contains: Answer From the command line, enter this: Make sure that filename.php both includes and executes the function you want to test. Anything you echo out will appear in the console, including errors. Be wary that often the php.ini for Ap…

netcat “Connection refused” on localhost

I’m trying to get a value from a netcat connection started at a php file, but it dies with: I don’t know why but it works well if I ssh it as apache user (www-data), this is what I’ve done: 1) Start an endless loop serving a date with a little delay: 2) Check if is working: 3) Create /var/ww…