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), ...
21 votes
5 answers
212k views

I have installed XAMPP v1.8.3 for my PHP development. I am new to Ubuntu, so I don't know how to set environment variable for PHP which is located at /opt/lampp/bin/php. I can run PHP scripts from ...
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 ...
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 ...
1 vote
1 answer
1k views

I can manually go to terminal and write php filename.php and it will run it successfully for me. I just need to know how I can do it from Geany. Proof: gnome-terminal -e "php %f" is what I ...
1 vote
1 answer
6k views

I'm using Ubuntu Linux 14.04 LTS 64-bit OS on my machine. I just updated all the softwares and packages installed on my system by running following commands from the terminal : sudo apt-get update ...
2 votes
1 answer
4k views

I wrote a PHP-script to execute another PHP-file in the terminal and got an error. If I run: $output = shell_exec("/usr/bin/php -v 2>&1"); echo "<PRE>$output</PRE>"; then I get ...
16 votes
3 answers
38k views

I'm using Ubuntu 16.04 LTS amd64. I have installed LAMP (php5.6, apache2, mysql) and Composer. I downloaded my Laravel project from GitHub. I would like to update Composer to start the local server ...
2 votes
1 answer
1k views

In crontab, what does /usr/bin/php -f do? Specifically, the -f Not sure what that does, but I'm seeing it in a crontab I've came across.
0 votes
2 answers
5k views

I just recently installed Ubuntu, installed XAMPP, run it(Apache + MySQL working). Now I'd like to use shell to run some of the PHP files. On Windows, I simply run the XAMPP Control Panel and I'm able ...
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:...
6 votes
3 answers
6k views

Suppose I've a php file and I want to change text-colour of my output for a console based application... <?php $prompt = "What Is Your Name: "; echo $prompt; $answer = "You Entered: ...
2 votes
2 answers
773 views

I have the server running fine even after upgrade from 14.04. However, now that I need to perform a ISPConfig upgrade I found out that the PHP CLI is an older version. I've removed any other instances ...
1 vote
1 answer
7k views

I have installed and working PHP53 from source. PATH is set in ~/.profile like this: export PATH=$PATH:/usr/local/php53/bin $ php -v # works good BUT: $ sudo php -v # sudo: php: command not found I ...
6 votes
4 answers
21k views

Using Ubuntu 16.04. When I execute laravel new myapp, I am getting this: [RuntimeException] The Zip PHP extension is not installed. Please ...

15 30 50 per page