So, I'm thinking I have two versions of drush installed but the weird thing is that when I type drush version on the terminal I get 9.5.2.

The php script is very simple, it checks for a user, and then displays different messages if it finds one or not.

   # Works on terminal 
   # $commandline = 'drush user:information user333 --format=list';

   # Works when called via HTTP ie. www.xxxx.com/test.php
   $commandline = 'drush user-information user333 --format=list'; 

   $result = exec($commandline);

   if (is_numeric($result)){
      echo "found record \r\n";
   } else {
      echo "No record found \r\n";

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.