Welcome Guest, Not a member yet? Register   Sign In
Unable to install codeigniter4/appstarter
#1

(This post was last modified: 09-14-2023, 11:22 AM by DejaDingo.)

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
Copyright © Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\sherry> k:
PS K:\> Set-PHPVersion 82
PHP 8.2.7 (cli) (built: Jun  7 2023 10:25:38) (ZTS Visual C++ 2019 x64)
Copyright © The PHP Group
Zend Engine v4.2.7, Copyright © Zend Technologies
PS K:\> composer --version
Composer version 2.5.8 2023-06-09 17:13:21
PS K:\> cd sites
PS K:\sites> composer create-project codeigniter4/appstarter
Creating a "codeigniter4/appstarter" project at "./appstarter"
Info from https://repo.packagist.org: #StandWithUkraine
Installing codeigniter4/appstarter (v4.4.1)
  - Installing codeigniter4/appstarter (v4.4.1): Extracting archive
Created project in K:\sites\appstarter
Loading composer repositories with package information

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?
Reply
#2

I haven't worked with wamp, can you try xampp? Or look for how to solve the problem with ZIP
Reply
#3

(This post was last modified: 09-14-2023, 01:33 PM by DejaDingo.)

(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  ZIP
Thanks, 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.
Reply
#4

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 )
Reply
#5

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB