Welcome Guest, Not a member yet? Register   Sign In
problem installing with composer
#1

Good afternoon,

 I have been using CI3 for years and now I want to switch to CI4. I am trying to install it with Composer and it is giving me problems:

* Mac Catalina 10.15.7
* MAMP 6.0.1
* PHP 7.4.9

Error:
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - codeigniter4/framework v4.0.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4].

I have looked in the /Applications/MAMP/bin/php/php7.4.9/conf/php.ini file for intl extensions, but they are not in the file.

I have added in the above file:
extension = intl.dll
extension = mbstring.dll

But it keeps giving the error. How can I solve and install it with composer?

Is composer mandatory? I have done the manual installation, but then it gives me an error in the bootstrap component, which is installed with composer ...


Thanks for your help
Reply
#2

(This post was last modified: 11-12-2020, 04:11 AM by captain-sensible.)

there are different approaches to this depending on your objective.

if it is mainly a case to Ci4 up and running play with it to learn, then.

you can Forget xampp, apache ,wamp,mamp and all others and simply install a dev app to your Desktop.

You can use either composer or download manually from github. Once on Desktop:


Using a terminal you just run command : php spark serve

Code:
php spark serve


CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-11-12 05:06:23am

CodeIgniter development server started on http://localhost:8080
Press Control-C to stop.
[Thu Nov 12 11:06:23 2020] PHP 7.4.1 Development Server (http://localhost:8080) started


your landing page will be seen by putting http://localhost:8080 in address bar of web browser.


Ok now we have the issue of using a Database ; you can't have a database out side of xampp can you ?
yes you can just put sqlite3 database as a file into writable and do configuration.

sqlitebrowser is a simple gui for creating sqlite databases ,adding fields and even data. https://sqlitebrowser.org/


Thats it you have a working system. Once you get to know it shift to MySQL maria if you like
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply
#3

Thank for your reply.

If i write php spark serve the error is : Could not open input file: spark.

Thank you
Reply
#4

The .dll ending on extensions is just for Windows, and even now, not required.

Have you tried removing that and just using the name?

E.g:

Code:
extension=intl

Another thing to check is the PHP version your command line is using; it could be different from the 7.4 - and so would be using a different .ini config file.

Run php -v to check.
Reply
#5

(11-12-2020, 08:51 AM)craig Wrote: The .dll ending on extensions is just for Windows, and even now, not required.

Have you tried removing that and just using the name?

E.g:

Code:
extension=intl

Another thing to check is the PHP version your command line is using; it could be different from the 7.4 - and so would be using a different .ini config file.

Run php -v to check.


Thanks craig,  the php version of terminal is 7.3.11,  so, the error must be that i am changed in php.ini of MAMP, but, the php of terminal is working from another.... where is the php.ini of macOs catalina 10.15.7.... Thanks.
Reply
#6

should be in /etc
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB