Comments on: 12 Useful PHP Commandline Usage Every Linux User Must Know https://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 06 Aug 2015 06:18:49 +0000 hourly 1 By: Avishek Kumar https://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/comment-page-1/#comment-638658 Thu, 06 Aug 2015 06:18:49 +0000 http://www.tecmint.com/?p=14602#comment-638658 In reply to Yoander.

Thanks for the feedback @Yoander,
We have already mentioned it in the first part of this post. You may find it here: http://www.tecmint.com/run-php-codes-from-linux-commandline/

]]>
By: Avishek Kumar https://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/comment-page-1/#comment-638654 Thu, 06 Aug 2015 06:08:51 +0000 http://www.tecmint.com/?p=14602#comment-638654 In reply to MaQ.

Dear MaQ,
As I am able to understand, you have an application that you want to start at boot automatically. You may run as root
# update-rc.d Application_name defaults [Replace Application_name with the name of Application]

To start something after reboot, open file /etc/crontab as root and enter the below line. Save and exit.

@reboot /path/to/script

Don’t forget to replace /path/to/script with original path.

If you are unable to fix the issue yourself, you may forward me your SSH credentials with complete detail on OS and Application on my email id – avishek1210[at]gmail.com, for better assistance.

]]>
By: MaQ https://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/comment-page-1/#comment-638547 Thu, 06 Aug 2015 03:01:48 +0000 http://www.tecmint.com/?p=14602#comment-638547 Hello,

I have an application that runs on localhost fine starting from terminal ex: ‘root@debian:/usr/local/lib/file# php -S localhost:8000’. I’m trying to get it to execute on boot and have no idea how to format for startup, it won’t execute in pm2, nor know how to add properly formated to rc.local, etc. I’ve looked for hours on end around net to no avail. Writing scripts is quite beyond my skill-set at this point. Most advice seems to center around either a complicated script or adding a simple command to cron, init.d or rc.local. I’m a cut and paste guy and usually need highly relevant concrete examples per instance. Any ideas?

]]>
By: Yoander https://www.tecmint.com/execute-php-codes-functions-in-linux-commandline/comment-page-1/#comment-625079 Thu, 16 Jul 2015 03:21:19 +0000 http://www.tecmint.com/?p=14602#comment-625079 Sometimes i used php -r to execute some simple php code for example simple php calculator php -r ‘echo 2**8+10;’

]]>