Skip to content
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

Closed
bytedevzone opened this issue Aug 12, 2017 · 9 comments
Closed

Fatal error: Cannot use Config\Services as Services #674

bytedevzone opened this issue Aug 12, 2017 · 9 comments

Comments

@bytedevzone
Copy link

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;

@daylightstudio
Copy link
Contributor

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:
#582

@lonnieezell
Copy link
Member

@abldev What version of PHP are you using? Are you on Windows?

@bytedevzone
Copy link
Author

PHP Version 7.0.8

OS: OS X Yosemite, Ver : 10.10.5

@lonnieezell
Copy link
Member

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.

@bytedevzone
Copy link
Author

Its works after upgraded PHP version to 7.1.4.

I test after remove 'use Config\Services;' line and works for me.

@lonnieezell
Copy link
Member

Does it work without removing that line, though?

@bytedevzone
Copy link
Author

Yes, it work

@JakeAi
Copy link
Contributor

JakeAi commented Aug 14, 2017

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.

@lonnieezell
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants