Welcome Guest, Not a member yet? Register   Sign In
CI4 Manual Installation
#1

(This post was last modified: 07-29-2020, 07:04 AM by pdos.)

While reading manual installation for CI4, link on the following URL isn't going to Codeigniter 3.

https://codeigniter.com/user_guide/insta...anual.html

I have xampp (7.4.8) installed on Windows 7 and already have few projects. It only has PHP and PERL.

/htdocs/website1
/htdocs/website2
/htdocs/website3 etc...

Installation questions:

1) Where or which folder to unzip the CI4 framework? I want to apply to a new website4 (not yet created under htdocs).

Tried multiple options but each one gives different errors; so want to find the BEST practice to start from the scratch.

2) In future, might decide to apply to existing websites; so best way to share the framework to multiple websites.

I was able to install CI3, but unable to do the same for CI4. Read about public folder etc. but still unclear on path where it is supposed to be copied to and config files that require modification.
Reply
#2

I have copied this to the pdos folder under /htdocs. Running as localhost/pdos works fine. It displays a directory structure, but when I click the public folder, it gives the following error:

Fatal error: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in C:\xamppnew\htdocs\pdos\system\CodeIgniter.php:184 Stack trace: #0 C:\xamppnew\htdocs\pdos\system\bootstrap.php(181): CodeIgniter\CodeIgniter->initialize() #1 C:\xamppnew\htdocs\pdos\public\index.php(36): require('C:\\xamppnew\\htd...') #2 {main} thrown in C:\xamppnew\htdocs\pdos\system\CodeIgniter.php on line 184

Anyone can guide on how to resolve the error?
Reply
#3

Gave up on Manual installation to find out if the composer one works, but unfortunately that didn't work either, see the see the attached screen shot.

That provided more information on ;extension=intl requirement. Un-commented the line in \xampp\php\php.ini and finally can see the Welcome page.

Although it has worked, still have few questions, if someone can help understand.

How or where the dependencies being used by Codeigniter (see second screen shot) and when we do manual how does these dependencies are carried over in the framework?

Attached Files Thumbnail(s)
       
Reply
#4

@pdos,
> Gave up on Manual installation to find out if the composer one works,

Don't give up, you're nearly there Smile

I have submitted and awaiting approval of a pull request to test to see if the optional international language library is installed.

https://ci4-strict.tk/bugs-fixed
Reply
#5

(07-29-2020, 05:47 PM)John_Betong Wrote: @pdos,
> Gave up on Manual installation to find out if the composer one works,

Don't give up, you're nearly there Smile

I have submitted and awaiting approval of a pull request to test to see if the optional international language library is installed.

https://ci4-strict.tk/bugs-fixed
Thanks for responding. In case, if this helps more in identifying the issue:

XAMPP installation with only PHP and PERL selected.
Version XAMPP 7.4.8
Windows 7 Home Premium
Reply
#6

(This post was last modified: 07-31-2020, 08:33 AM by jreklund.)

I don't use Windows.

The problem is the installation is forced to use an optional PHP International local language settings library. 

Solution is to either install the library or modify the following file:

Code:
File: ./system/CodeIgniter/CodeIgniter.php
    /**
   * Handles some basic app and environment setup.
*/
    public function initialize()
    {
    // Set default locale on the server
    // John ADDED FOLLOWING CHECK BECAUSE STILL TO BE SET ON MY SYSTEM 
            if( function_exists('locale_set_default' ) ) :    
           locale_set_default($this->config->defaultLocale ?? 'en');
    endif;
Reply
#7

(This post was last modified: 07-31-2020, 08:33 AM by jreklund.)

(07-30-2020, 11:45 PM)John_Betong Wrote: I don't use Windows.

The problem is the installation is forced to use an optional PHP International local language settings library. 

Solution is to either install the library or modify the following file:

Code:
File: ./system/CodeIgniter/CodeIgniter.php
    /**
   * Handles some basic app and environment setup.
*/
    public function initialize()
    {
    // Set default locale on the server
    // John ADDED FOLLOWING CHECK BECAUSE STILL TO BE SET ON MY SYSTEM 
            if( function_exists('locale_set_default' ) ) :    
           locale_set_default($this->config->defaultLocale ?? 'en');
    endif;

I will try this on a new machine and will post back here. On the current machine it is working by using Composer and moving forward with building Startup application.
Reply
#8

Tried again with FRESH install of xampp (same machine & configuration). Manually copied the files for CodeIgniter. Same error message as I was getting earlier.

Then changed \xampp\php\php.ini for ;extension=intl to extension=intl

The above change worked, without making a code change in File: ./system/CodeIgniter/CodeIgniter.php.

It is displaying the Welcome page correctly.

Thanks for all the help.
Reply
#9

Hi, I just want to chip in that intl are a required extension by CodeIgniter, so out of the blue there will be more functions utilizing it. So hacking it away aren't really the solution.

You can see all requirements in the user guide:
https://codeigniter.com/user_guide/intro...ments.html
Reply
#10

I agree. intl is NOT optional. intl is currently used in substituting placeholders in the lang() global function. Now it is also used in locale_set_default(). Disabling the line is only hackish.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB