I'm trying to install Codeigniter 4 on My dev machine running macOS Catalina
Right now I have developed applications using CI v3 but I would like to migrate to v4 so I'm testing stuff
I'm following the guide
https://codeigniter.com/user_guide/
my MAMP install (MAMP 5.7) have php 7.4.2 installed and phpinfo(); shows intl extension enabled
PHP Version 7.4.2
ICU version 56.1
Installing CI4 with composer gives me errors
composer create-project codeigniter4/appstarter test_ci4_2
output:
Installing codeigniter4/appstarter (v4.0.4)
- Installing codeigniter4/appstarter (v4.0.4): Loading from cache
Created project in /Users/filippoferrari/Documenti/MAMP/htdocs/test_ci4_2
Loading composer repositories with package information
Updating dependencies (including require-dev)
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].
so I switched to the "manual" install.
I have created a folder named TEST_CI4 under MAMP/htdocs folder and put CI4 files there
Under App/Config/app.php I set up public $baseURL = 'http://localhost:8888/test_ci4_2/'; (my apache runs on port 8888)
if I point my browser to http://localhost:8888/test_ci4/public/ I see the codeigniter Welcome page
but if I point my browser to http://localhost:8888/test_ci4/ I see the folder structure.
the problem is that, following the tutorial and creating the "Pages" controller when I open the browser with http://localhost:8888/test_ci4/pages/ I have the "404 not found" error.
Did I miss some steps that the composer installation would do automagically?
"Develop your app inside the app folder, and the public folder will be your document root" - CI user guide
Basicly on localhost you will always need to append public dir because thats your document root and files like index.php, css,javascript etc. will go into that folder.
On web servers they encouraging you to add app,system folders above document root and public or on webservers public_html will be your root folder. Also on webservers with domain you wont need to add public.
Related
Setup: Windows 10, PHP 8.0.2, composer 2.1.6
I cloned a project from bitbucket and ran composer install.
After Running the command I got the error bellow.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- ibericode/vat is locked to version 1.2.1 and an update of this package was not requested.
- ibericode/vat 1.2.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
Problem 2
- ibericode/vat 1.2.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
- craftcms/commerce 3.4.2 requires ibericode/vat ^1.1.2 -> satisfiable by ibericode/vat[1.2.1].
- craftcms/commerce is locked to version 3.4.2 and an update of this package was not requested.
To enable extensions, verify that they are enabled in your .ini files:
- C:\PHP\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I tried running composer update, but I was presented wit h a similar error.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ibericode/vat[1.1.2, ..., 1.2.1] require ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
- craftcms/commerce 3.4.2 requires ibericode/vat ^1.1.2 -> satisfiable by ibericode/vat[1.1.2, 1.1.3, 1.2.0, 1.2.1].
- Root composer.json requires craftcms/commerce 3.4.2 -> satisfiable by craftcms/commerce[3.4.2].
To enable extensions, verify that they are enabled in your .ini files:
- C:\PHP\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Steps that I tried:
enable soap extension in php.ini
confirm that php_soap.dll is in the php extension folder php/ext
restart the machine
But that didn't help.
Then I tried the answer provided in https://craftcms.stackexchange.com/a/30270
That didn't help either.
I have a Debian VM with a Magento 2.1.7 Installed. Now, in order to get the files in local and being able with the IDE (I use phpStorm from JetBrains) to sync the files from local to remote with a Save I need to have the Magento files too in local.
The truth is that the only path I have in sync is:
/opt/bitnami/apps/Magento/htdocs/app
But anyway, having all the files and the vendor in local gives me the ability to have changes in local and not in the VM and I get organized better.
The problem comes when I want to install the Magento 2 files. I used to do computer install in other computers where everything was set up and all the dependencies got installed without any problem.
But in the machine I'm setting up now and I will work from now on I need to set it up.
Basically when I run composer install where I need to install the dependencies it says:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for braintree/braintree_php 3.7.0 -> satisfiable by braintree/braintree_php[3.7.0].
- braintree/braintree_php 3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 2
- Installation request for magento/framework 100.1.9 -> satisfiable by magento/framework[100.1.9].
- magento/framework 100.1.9 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- Installation request for magento/magento2-base 2.1.9 -> satisfiable by magento/magento2-base[2.1.9].
- magento/magento2-base 2.1.9 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 4
- Installation request for magento/module-shipping 100.1.3 -> satisfiable by magento/module-shipping[100.1.3].
- magento/module-shipping 100.1.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 5
- Installation request for magento/product-community-edition 2.1.9 -> satisfiable by magento/product-community-edition[2.1.9].
- magento/product-community-edition 2.1.9 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 6
- braintree/braintree_php 3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- magento/module-braintree 100.1.6 requires braintree/braintree_php 3.7.0 -> satisfiable by braintree/braintree_php[3.7.0].
- Installation request for magento/module-braintree 100.1.6 -> satisfiable by magento/module-braintree[100.1.6].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
As far as I understand and I can read, I need a php.ini in the folder which tells the composer how to get the dependencies. I haven't found the file, i found two files:
php.ini-production
php.ini-development
I imagine these two files are the ones magento use once we change the mode, so, do I need to change these 2 eventually?
How can I fix this?
I managed to fix the problem by modifing the php.ini file that I had in C:\php.ini. I couldn't find it earlier but once found, just get rid of the comments on the sections you need.
I'm running the latest AMPPS with PHP 5.6 on my Mac (OS X El Capitan), and trying to run a CakePHP web app. When I run "composer install" under the web app's directory using Terminal, it returns the following errors:
Problem 1
Installation request for cakephp/cakephp 3.2.5 -> satisfiable by cakephp/cakephp[3.2.5].
cakephp/cakephp 3.2.5 requires ext-intl * -> the requested PHP extension intl is missing from your system. Problem 2
cakephp/cakephp 3.2.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
cakephp/debug_kit 3.2.7 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.2.5].
Installation request for cakephp/debug_kit 3.2.7 -> satisfiable by cakephp/debug_kit[3.2.7].
Then, I opened the php.ini under "/Applications/AMPPS/php/etc/" and found that all the extension are already un-commented.
I then run "php --ini", here is the outcome:
Configuration File (php.ini) Path: /etc
Loaded Configuration File: (none)
Scan for additional .ini files in: /Library/Server/Web/Config/php
Additional .ini files parsed: (none)
I then checked /etc, and changed the "php.ini.default" file to "php.ini".
Downloaded php_intl.dll and moved to "etc/ext", and changed the extension_dir to "/etc/ext".
After that, I restarted AMPPS's Apache and ran "composer install" again, and it returned the followings:
PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_intl.dll' - dlopen(./ext/php_intl.dll, 9): image not found
in Unknown on line 0 Loading composer repositories with package
information Installing dependencies (including require-dev) from lock
file Your requirements could not be resolved to an installable set of
packages. Problem 1
Installation request for cakephp/cakephp 3.2.5 -> satisfiable by cakephp/cakephp[3.2.5].
cakephp/cakephp 3.2.5 requires ext-intl * -> the requested PHP extension intl is missing from your system. Problem 2
cakephp/cakephp 3.2.5 requires ext-intl * -> the requested PHP extension intl is missing from your system.
cakephp/debug_kit 3.2.7 requires cakephp/cakephp >=3.1.0 <4.0 -> satisfiable by cakephp/cakephp[3.2.5].
Installation request for cakephp/debug_kit 3.2.7 -> satisfiable by cakephp/debug_kit[3.2.7].
I have tried running phpinfo(); and the loading path is different from the ones I got in Terminal:
Configuration File (php.ini) Path /Applications/AMPPS/php-5.6/etc
Loaded Configuration File /Applications/AMPPS/php/etc/php.ini
Scan this dir for additional .ini files /Applications/AMPPS/php-5.6/etc/php.d
"http://localhost/ampps/" is working.
Anyone has any idea why is this happening?
I want to use mongodb with yii framework for that i am trying to install mongodb extension. As per the documentation given at http://www.yiiframework.com/doc-2.0/ext-mongodb-index.html i have already added line ""yiisoft/yii2-mongodb": "~2.0.0"" in my composer.json file.
But whenever i issue command composer update to install this extension it gives me below error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- yiisoft/yii2-mongodb 2.0.4 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.3 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
- yiisoft/yii2-mongodb 2.0.2 requires ext-mongo >=1.5.0 -> the requested PHP extension mongo is missing from your system.
I search a lot on this issue and found one solution here https://github.com/yiisoft/yii2-mongodb/issues/18 and here http://www.yiiframework.com/forum/index.php/topic/57726-solved-yii2-mongodb/ that suggest to add line extension=mongo.so in my /etc/php5/cli/php.ini file . but even after adding line to php.ini file command composer update still gives the same error.
Please help
I forgot to install mongodb php extension. after installing this extension it works. here is the link to install mongodb extension http://us1.php.net/manual/en/mongo.installation.php
I am trying to setup the UserVoice PHP SDK in my local machine using Composer. I am following the manual specified at https://developer.uservoice.com/docs/api/php-sdk/. I have both oauth and mcrypt php extensions enabled.
The composer.js files contains the following,
{
"require": {
"uservoice/uservoice": ">=0.0.6"
}
}
But when I try php composer.phar install command, I am getting the following errors in terminal.
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- uservoice/uservoice 0.0.9 requires ext-oauth * -> the requested PHP extension oauth is missing from your system.
- uservoice/uservoice 0.0.8 requires ext-oauth * -> the requested PHP extension oauth is missing from your system.
- uservoice/uservoice 0.0.7 requires ext-oauth * -> the requested PHP extension oauth is missing from your system.
- uservoice/uservoice 0.0.6 requires ext-oauth * -> the requested PHP extension oauth is missing from your system.
- Installation request for uservoice/uservoice >=0.0.6 -> satisfiable by uservoice/uservoice[0.0.6, 0.0.7, 0.0.8, 0.0.9].
php.ini file is configured with the extensions. I have tried restarting the apache server after installation of these extension, still issue persists.
what is that am missing here?
If you are on Ubuntu you can use the Ondrej Sury PHP PPA. After adding this PPA to your system, you can install the oauth extension package with aptitude install php5-oauth.
Instructions for adding a PPA depend on which Ubuntu version you're on. For 12.04 you need to install python-software-properties and then you can use add-apt-repository command.