PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 29, 2022

[FIXED] PHP cli only works with "-n"

 January 29, 2022     composer-php, linux, php     No comments   

Issue

I'm stuck for days on a PHP CLI problem :

I have no ouptut, just a blank line and the cursor waiting for instructions when I run :

php -r "echo 1;"

But when I run this line with -n (No php.ini file will be used), everything works :

php -nr "echo 1;"

My real problem is that my composer shortcut (/bin/composer) doesn't work anymore and I have to write php -n /bin/composer every time now.

I work on Debian Wheezy and my PHP version is up to date (5.4.4-14).

I reinstalled php many times without success. Please, can you help me ?


Solution

Reinstall php5-cli and php5-common packages as well as any other dependencies that you need such as libssh2-php as you mentioned above.

sudo apt-get install --reinstall php5-common php5-cli


Answered By - Drew Hammond
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing