Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Why BaseController & public/index.php file is loaded again & again in a single call?
Post: RE: Why BaseController & public/index.php file is ...

MGatner Wrote: (08-07-2021, 04:41 AM) -- We would need line numbers to be able to follow this trace in a meaningful way. I would say this definitely doesn’t seem normal. -- Its very easy to reprodu...
1,052 Views
2 Replies
08-07-2021, 06:46 AM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

MGatner Wrote: (08-06-2021, 04:56 AM) -- I really do not like static access from object instances, it always gets confusing (as is the case here). My advice would be to keep using the Config as you a...
3,881 Views
17 Replies
08-06-2021, 06:43 AM
myo
  Star Thread: Why BaseController & public/index.php file is loaded again & again in a single call?
Post: Why BaseController & public/index.php file is load...

Hi, I was trying to dig into an issue & during that I observed that if I call the following URL, the files & classes: AdminController, BaseController & public/index.php are loaded and/or called multi...
1,052 Views
2 Replies
08-05-2021, 04:09 AM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-04-2021, 07:20 PM) -- If you have your own initController() method in AdminController, then you need to call the parent initController first. PHP Code: -- class AdminContr...
3,881 Views
17 Replies
08-05-2021, 03:57 AM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-04-2021, 07:18 AM) -- Thanks. I think I know now. 1. You are not defining the $config in your BaseController. This means you are dynamically creating the property. Why is t...
3,881 Views
17 Replies
08-04-2021, 09:03 AM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-04-2021, 02:41 AM) -- I think I have a guess on the problem but needs some confirmation. Can you share the code of your My_config? [hr] Class objects are saved by reference...
3,881 Views
17 Replies
08-04-2021, 02:52 AM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-03-2021, 10:15 PM) -- Ok. I meant how you define it in your class? PHP Code: -- class BaseController {     protected $config; # here what is the visibility you set for $...
3,881 Views
17 Replies
08-03-2021, 10:37 PM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-03-2021, 09:36 PM) -- What is the visibility of $this->config in BaseCOntroller? If set to private, AdminController can't access it. Needs to be at least protected or public. ...
3,881 Views
17 Replies
08-03-2021, 09:56 PM
myo
    Thread: Config Static Variables Not Working
Post: RE: Config Static Variables Not Working

paulbalandan Wrote: (08-03-2021, 07:20 PM) -- Do not call `config` again in AdminController -- Then how to access config in Admin Controller?  I tried calling     PHP Code: -- parent::$users_ar...
3,881 Views
17 Replies
08-03-2021, 08:08 PM
myo
  Star Thread: Config Static Variables Not Working
Post: Config Static Variables Not Working

Hi, I am using a custom Config file. I populate its static variables by calling a method & then use those variables in BaseController. Its working fine in BaseController but when I try to use those s...
3,881 Views
17 Replies
08-03-2021, 06:08 AM
myo
    Thread: Unnecessary Files Loaded in Production Environment - Codeigniter 4.1.1
Post: RE: Unnecessary Files Loaded in Production Environ...

ojmichael Wrote: (02-21-2021, 08:48 PM) -- Assuming you're using Docker, the composer commands listed above should be part of your Dockerfile, and you don't need to include the vendor folder in the i...
2,894 Views
9 Replies
02-21-2021, 10:35 PM
myo
    Thread: Unnecessary Files Loaded in Production Environment - Codeigniter 4.1.1
Post: RE: Unnecessary Files Loaded in Production Environ...

iRedds Wrote: (02-20-2021, 09:25 PM) -- Code: -- composer install --no-dev composer update --no-dev composer require package/name --update-no-dev -- -- It means PRODUCTION environment optio...
2,894 Views
9 Replies
02-21-2021, 06:06 AM
myo
  Star Thread: Unnecessary Files Loaded in Production Environment - Codeigniter 4.1.1
Post: Unnecessary Files Loaded in Production Environment...

Hi, Mostly I have been using CI without composer by directly downloading. Today I wanted to add TWIG so I decided to use composer.  To my surprise the number of loaded files increased by 25 even in ...
2,894 Views
9 Replies
02-20-2021, 12:40 PM
myo
  Star Thread: PHP 8 Readiness - Codeigniter 4
Post: PHP 8 Readiness - Codeigniter 4

Hi Seniors, When we can expect working version of Codeigniter 4 for PHP 8 ? Regards
711 Views
0 Replies
12-05-2020, 08:19 AM
myo
  Star Thread: API Exceptions & Detailed Errors Shown in Production Environment CI 4.04
Post: API Exceptions & Detailed Errors Shown in Producti...

Hi, I am using version. 4.04 I created some restful APIs and was checking the exception handling by using wrong controller names etc in PRODUCTION environment. To my surprise its showing detaile...
722 Views
1 Replies
11-22-2020, 10:46 AM
myo
  Star Thread: How to use all methods of PHP Redis with Codeigniter 4
Post: How to use all methods of PHP Redis with Codeignit...

Hi all I am trying to use redis cache in Codeigniter 4 with PECL PHP REDIC .  Codeigniter 4 documentation (https://codeigniter.com/user_guide/libraries/caching.html) shows only few methods like ...
1,112 Views
0 Replies
10-21-2020, 06:05 AM
myo
    Thread: How to use Minify in Codeigniter 4 - Namespace Issues
Post: RE: How to use Minify in Codeigniter 4 - Namespace...

Thanks captain, its working fine now. I already had path converter. Issue was in namespace.
2,255 Views
5 Replies
10-21-2020, 03:58 AM
myo
  Star Thread: How to use Minify in Codeigniter 4 - Namespace Issues
Post: How to use Minify in Codeigniter 4 - Namespace Iss...

Hi, I am trying to use matthiasmullie/minify (https://github.com/matthiasmullie/minify) in Codeigniter 4. But so far I am getting errors due to wrong namespacing. Following is what I did so far: ...
2,255 Views
5 Replies
10-20-2020, 04:59 AM
myo
  Star Thread: PECL Extension Solr PHP extension with Codeigniter 4
Post: PECL Extension Solr PHP extension with Codeigniter...

Hi, I tried to use Solr PHP extension. I downloaded 7.4 Thread Safe (TS) x64 (https://windows.php.net/downloads/pecl/releases/solr/2.5.1/php_solr-2.5.1-7.4-ts-vc15-x64.zip) and placed php_solr.dll ...
974 Views
1 Replies
09-20-2020, 02:24 AM
myo
  Star Thread: Using Solarium PHP Solr client with Codeigniter
Post: Using Solarium PHP Solr client with Codeigniter

Hi, I was trying to use Solarium PHP Solr client with Codeigniter 4 but having issues. I used composer to download all dependencies at my desktop & then copied whole folder in app/ThirdParty. Th...
904 Views
0 Replies
09-19-2020, 10:50 AM
myo

Theme © iAndrew 2016 - Forum software by © MyBB