I have installed composer on my cpanel(which has a global php version 5.6). Currently, i am in a subfolder which is under my sub-domain. My sub-domain has a php version 7. This subfolder contains my project. When i try to run my project, iget a 500 internal error
Looking in my error log in my cpanel, i see this error Call to undefined function SymfonyPolyfillMbstringiconv_strpos()
. I tried this in my terminal composer require symfony/polyfill-iconv
but i keep getting this
another error
This package requires php >=7.0.0 but your PHP version (5.6.32) does not satisfy that requirement.
I have upgraded the php version for my sub-domain but why is the composer not able to recognize that?
2
Answers
Type php -v in console. This command show php version. If it shows old php, you can change default php version just execute:
change to your php version number
You have to run composer in PHP7 mode for this like:
Or simply ignore PHP version requirement like: