Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to run a php script on linux from the console, but I do not know the command. the equivalent on Windows is that there (START http://localhost/project/update.php).
I do not know if it is possible to run this script in the background
Yes off course it's possible.
php -f phpfile.php
Considering your phpfile.php contains -
<?php
$item = 3;
echo "item : $item";
It will print item : 3 on command line.
php -f filename.php
php -a #for all options to see
for more info.
php is the command to run php script .
php -f filename.php
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I own a site installed on my linux server but when I put PHP tags at the beginning of page, the source code appears..
How to avoid all the source code displayed ?
thank you in advance
This means that you are being served the file by Apache without it first being seen (processed) by PHP. Here are some troubleshooting tips as to why it isn't being processed by PHP:
Make sure that your file with the PHP tags ends in .php.
Make sure PHP is installed on your server. To install PHP on a debian server run sudo apt-get install php5
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm using the symfony2 framework,
and I need to run "php app/console" commands frequently,
however when I run "php app/console"
it says
The program 'php' is currently not installed. You can install it by
typing:
sudo apt-get install php5-cli
this is working though
/usr/local/php7/bin/php app/console
how can I make 'php' out of '/usr/local/php7/bin/php' for the command line? I'm on linux Mint/Ubuntu
you can put "/usr/local/php7/bin/" to $PATH or use shell alias command with writing following line to console:
alias php=/usr/local/php7/bin/php
after that you can use "php app/console"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Hi attached is the image showing MySQL Server is currently running and succesfully installed in Ubuntu 13.10, only problem is I cannot communicate with it via terminal so I can't create databases using terminal.
It say's mysql is not currently installed, so what am i missing?
below is that url that I used to install it.
https://serverfault.com/questions/516190/how-to-install-mysql-5-6-on-debian-7-wheezy
By default the current directory is not in your PATH, so it's not searched when you execute commands.
You can do any of the following:
Add /usr/local/mysql/bin to your path (probably best option)
From inside that directory, run ./mysql rather than mysql
Type /usr/local/mysql/bin/mysql instead of mysql
Create an alias
...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'd like to restrict using PHP-CLI for a user. I mean on the same server, I want to use PHP-CLI with my account and I want no other user to access PHP-CLI interface. Or choose which user can use it.
Is this possible?
Many ways. A simple one:
chmod 754 /usr/bin/php
chgrp php /usr/bin/php
Then add only the person you want to that php group
Of course, apache or the web user should also be in that group too.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Since I'm using komodo in ubuntu, I notice that there is no support for PHP's syntax checking. I'm asked to "enter the path to your PHP executable below" but I cannot find such file in my PHP folder...
Where can I find it?
On my Ubuntu system it's /usr/bin/php:
$ whereis php
php: /usr/bin/php
It's usually at /usr/bin/php or maybe /bin/php.