0

Problem:

I'm writing a custom module, and everything is output just fine when there are no errors/exceptions. But as soon as I experience an error, nothing is displayed in the command line (using SSH via PuTTY to a shared host). It just executes the command, outputs nothing, and returns to the prompt.

Also, nothing is being written to any of the usual server logs within "/var/logs".

I'm basically flying blind. I don't know why things fail when they do, and I'm not sure how to proceed.

Example:

sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list
sharedhostingname@sharedhost [~]#
0

You need to run the command with the verbose flag

-v
-vv 
-vvv
-vvvv

Depending on the level of verboseness (not a real word) you need.

  • I just tried this with no luck. Any other ideas? sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list -v sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list -vv sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list -vvv sharedhostingname@sharedhost [~]# php /home/sharedhostingname/public_html/bin/magento --list -vvvv sharedhostingname@sharedhost [~]# – PhilaPhan80 Mar 5 '17 at 3:28
  • the next thing to check would be clearing everything in the var folder. I use this rm -rf var/cache/*; rm -rf var/di/*; rm -rf var/generation/*; rm -rf var/page_cache/*; to for a clean of these folders. – circlesix Mar 5 '17 at 4:09
  • Unfortunately, same result. For example, I've placed a tiny bit of bad code in one line of my PHP file. It should be telling me that some kind of exception occurred on line X, but I get no output at all, not even partial up to the point that it breaks. – PhilaPhan80 Mar 5 '17 at 14:18
  • 1
    Thanks for your help. Much appreciated. I'll try that when I get some time. – PhilaPhan80 Mar 6 '17 at 1:13
  • 1
    I had the same issue and I discovered that there was a code that caught the exception and passed to the messageManager but in the CLI environment it couldn't show the error so the exception was hided. I think you have maybe the same kind of problem. – István Döbrentei Jan 22 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.