Unable to install codeigniter4/appstarter |
I have several working local installations of CodeIgniter 4, but wanted to setup a base project from which to test deployment to a shared server.
My local machine uses WAMP, so my path cannot include PHP, therefore it needs to be set in my PowerShell. Running the standard composer install for this package succeeds in creating the project directory and installing the appstarter pieces, but then it gets stuck trying to use composer to load the rest of the dependencies. Indeed trying to run an update on any of my other local projects suffers the same hang. Here is the transcript from the installation. Quote:Windows PowerShell UPDATE: This appears to be a problem with PHP 8.1 and PHP 8.2. The update works with PHP 7.4.33 and also with PHP 8.0.28, although the missing ZIP extension in PHP 8.0 is a problem. Any ideas why composer update does not seem to work in PHP 8.1 or PHP 8.2?
I haven't worked with wamp, can you try xampp? Or look for how to solve the problem with ZIP
(09-14-2023, 11:29 AM)ozornick Wrote: I haven't worked with wamp, can you try xampp? Or look for how to solve the problem with ZIPThanks, but I solved the problem with ZIP, by moving to PHP 8.1, as there were other issues with PHP 8.0. I only mention WAMP since the transcript shows setting the desired PHP version in the shell instead of relying on it being in my path. I have about 10 virtual hosts configured here, along with the necessary local SSL certificates, so switching to XAMPP is not feasible. The issue here really has nothing to do with WAMP. The problem is simply that composer cannot update the installed appstarter package when running under PHP 8.1 or 8.2. There are a number of packages I need to use which require PHP > 8, so I am having difficulty understanding why the update just hangs. No error message or warning that the in-place version of PHP is not usable. OK. This is a problem with Windows 10 Libraries, which have the unfortunate requirement that any/all library locations must be indexed. I have been having problems lately with the indexing service taking over my machine, so I just removed all the libraries defined on my machine and suddenly the composer update works again. For some reason, under PHP 8.1 and 8.2, the fact that these libraries are being indexed causes the update to just hang. I'll need to figure out some other way to organize/group/view my development/staging/production directories that does not require indexing. Microsoft Libraries are definitely not to be used with projects managed by composer. Thank you for your comments.
It could also be Windows Firewall causing the problems, I had the same happen awhile ago,
I had to go into the Windows 11 Firewall and exclude my project files from it. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Interesting. I have a hard-wired router and don't use the Windows Firewall.
I ended up having to disable the Windows search service entirely. It was not sufficient to exclude my web development drive from being indexed. As soon as I added a new project directory the problems started again. |
Welcome Guest, Not a member yet? Register Sign In |