Skip to content

Tag: command-line

CHange php 5.4 to 5.5 on Hostgator

Currently on composer install I get the error need 5.5.9 but using 5.4 but on Hostgator cpanal it’s set as 5.5 On php -v I get On php –ini I get When going into /opt/ There is a php54, php55 and php56 How do I change my version to 5.5 I saw the following example on this link But when

How do I write this in a batch file

I am trying to convert a shell script into a batch file but I am stuck at this place. I am not quite sure how to convert this line into my batch file. I tried but I am not sure if I am right! Answer You can’t do command chaining like this in Batch. If I see that correctly, you

Can’t run PHP exec() on command line

Hoping someone can help me out here. Trying to run any command using exec() returns 126 and displays the same error message. I’ve narrowed it down to this pretty minimal test case. SELinux and PHP safe mode are not enabled permissions are fine on /, /bin/, and /bin/ls asterisk is a system user created w…

grep usage for date in a text file

I have some data in a text file like below: Now i want to fetch CPU Usage/Timestamp pair at a time like below: And, Memory Usage/Timestamp pair at a time like below: I tried grep -i “CPU Usage” testFile.txt | grep -i “Timestamp”, but it fetched the complete data irrespective of CPU Usa…