Skip to main content

Questions tagged [php-cli]

PHP CLI is the command-line interface for PHP.

1 vote
2 answers
54 views

I'm running Ubuntu 22.04 LTS server (plus Plesk Obsidian 18.0.77 Update #1) Despite Plesk updates being up to date, and Ubuntu updates being up to date (sudo apt update && sudo apt upgrade), ...
src's user avatar
  • 11
0 votes
1 answer
63 views

i have a PHP script that has ran correctly up to about 3 or 4 days ago, also from crontab. it fetches RSS news items and puts them into a db. the problem i have at the moment is that this script will ...
NicerApp_WebOS's user avatar
1 vote
1 answer
14k views

I have multiple PHP versions (8.1/8.2/8.3) installed on my Ubuntu 22.04 system. I'm trying to switch between them using the sudo update-alternatives --config PHP command. However, I'm facing an issue ...
Zahirabbas's user avatar
1 vote
1 answer
10k views

Apparently package php8.1 is available for Ubuntu 22.04 but not available for 20.04. php7.4-sqlite is, however, available for 20.04. In particular I'd like to use PDO with sqlite on PHP8.1 on 20.04. ...
Dennis 's user avatar
  • 183
-2 votes
2 answers
581 views

Goal: Insert a new line into a PHP file via CommandLine. Problem: I have a PHP file with an array. I want to append a new value (hello folks) to this PHP array using a bash script. Starting point: <...
Maik Lowrey's user avatar
24 votes
5 answers
90k views

How can I change the PHP version used in console on Ubuntu 20.04? I have all versions in the /etc/php folder, but I don't know where the configuration for the command line version is.
Čamo's user avatar
  • 779
1 vote
1 answer
3k views

I've made a stupid mistake on a live webserver and need some help to recover. While logged in as root ( mistake #1 ) I did a wget of a file to /usr/bin/php which created the directory /usr/bin/php ...
dean winsbury's user avatar
1 vote
2 answers
2k views

I am a web developer. I have created projects in Windows OS, but now I have completely switched to Ubuntu 20.04. I have installed PHP and composer. But when I want to create a Laravel project in ...
m.i. shad's user avatar
1 vote
1 answer
708 views

I have this code in a bash script: #!/bin/bash php -f email_processor.php 'Corgi Boy' https://www.domain.com/corgi-boy/ domain.com https://www.domain.art Site Title As a test, I ran it from the ...
dwest100's user avatar
1 vote
0 answers
2k views

I am on Ubuntu 18.04 and I want to make my php -v match my phpinfo page. php -v from the command line: PHP 7.3.13 (cli) (built: Jan 8 2020 14:07:34) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend ...
CodeConnoisseur's user avatar
2 votes
1 answer
842 views

I’ve installed Mautic (email program). It needs 3 cronjobs to run properly. php /var/www/mydomainname/htdocs/app/console mautic:segments:update php /var/www/mydomainname/htdocs/app/console mautic:...
Lex's user avatar
  • 21
2 votes
2 answers
28k views

When I try some code it says: bash: /usr/bin/php: No such file or directory I think It happened because of some codes I tried for a previous error of my laravel project. These codes are: mv /usr/...
Pasan Jayawickrama's user avatar
3 votes
1 answer
5k views

Environment Variables are used to set up the PHP application and the application runs smoothly. The issue that I'm facing is when I'm trying to reference the application's database connection file and ...
Navaneeth Mohan's user avatar
0 votes
2 answers
829 views

I've uninstalled php5.6 on my PC then I upgrade to PHP7.2 but when I checked php cli php -v, it's show me like this, it's still show me PHP 5.6 Anyone can help me out ?
Roby Firnando Yusuf's user avatar
2 votes
1 answer
3k views

I have a little development environment with a PHP script that only contains the following: whichuser.php <?php var_dump( exec('whoami') ); ?> When I try to execute this "script" via CLI the ...
Peter A's user avatar
  • 31

15 30 50 per page