I apologize if this is a silly question, but I am fairly new to Litespeed, and am not sure exactly how it all comes together.
So, what I am trying to do, is execute a php script from my servers CLI (eventually to become a cron job). Currently, I can run it fine using the php command. (php /home/scripts/script.php)
When I type 'which php' I get:
When I type 'php -v' I get:
So going by this information, I am not sure if I am using the litespeed in this or not. From what I have found through google searches, is that there should be a php found within my servers lsws directory.
As for the details of the script;
When I run the full version of the script (meaning including all html, headers, etc) on the web browser it takes about 1.11 seconds to complete the script.
When I run the short version (meaning just the script that handles my objectives, no bells and whistles) through the CLI, it takes anywhere between 3.5-5 seconds to complete.
I also posted this on the php forum, but it doesn't seem to have much activity on it. So, posting it here to see if a response comes soon. I will remove whichever one gets no attention.
I would imagine that the cli should be equally as fast, or faster, as it is only executing the script, without including all the non-related stuff that the website uses for doing all that it does on load...
Any helpful information is appreciated.
I would like to request that I do not get any "ego-stroking" responses. Please keep your responses related to my question, as inflating it with useless banter about how smart you are, will only hinder future google searches for others.
thank you.
So, what I am trying to do, is execute a php script from my servers CLI (eventually to become a cron job). Currently, I can run it fine using the php command. (php /home/scripts/script.php)
When I type 'which php' I get:
Code:
/usr/local/bin/php
Code:
ea-php-cli Copyright 2017 cPanel, Inc.
PHP 5.6.33 (cli) (built: Feb 7 2018 02:53:19)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
As for the details of the script;
When I run the full version of the script (meaning including all html, headers, etc) on the web browser it takes about 1.11 seconds to complete the script.
When I run the short version (meaning just the script that handles my objectives, no bells and whistles) through the CLI, it takes anywhere between 3.5-5 seconds to complete.
I also posted this on the php forum, but it doesn't seem to have much activity on it. So, posting it here to see if a response comes soon. I will remove whichever one gets no attention.
I would imagine that the cli should be equally as fast, or faster, as it is only executing the script, without including all the non-related stuff that the website uses for doing all that it does on load...
Any helpful information is appreciated.
I would like to request that I do not get any "ego-stroking" responses. Please keep your responses related to my question, as inflating it with useless banter about how smart you are, will only hinder future google searches for others.
thank you.
Last edited by a moderator: