-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Cannot use Config\Services as Services #674
Comments
I ran into a similar issue and it had to do with my PHP version. I updated to 7.15 and it fixed the issue: |
@abldev What version of PHP are you using? Are you on Windows? |
PHP Version 7.0.8 OS: OS X Yosemite, Ver : 10.10.5 |
I've seen that happen twice - once on a Windows setup where paths weren't configured properly (would have to scour the forums for the link), or as @daylightstudio said, for versions of PHP under 7.0.15. IIRC, the person with the previous issue was using 7.0.10. Please try upgrading and let me know if that works for you. |
Its works after upgraded PHP version to 7.1.4. I test after remove 'use Config\Services;' line and works for me. |
Does it work without removing that line, though? |
Yes, it work |
I was removing that line as well. Then I upgraded my PHP version to the newest I could for Wamp and it worked ever since. I was also getting errors with getenv accepting a 2nd argument. Again, updating fixed it. |
Sweet. Will update the readme's minimum PHP version to 7.0.15, then, unless someone has it working on Windows with an earlier build? |
Fatal error: Cannot use Config\Services as Services because the name is already in use in /system/CodeIgniter.php on line 38
Working after remove below line from /system/CodeIgniter.php
use Config\Services;
The text was updated successfully, but these errors were encountered: