Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 18,694
» Latest member: philfry
» Forum threads: 71,840
» Forum posts: 368,526

Full Statistics

Latest Threads
Connect using SQLSRV
Forum: General Help
17 minutes ago
» Replies: 0   » Views: 3
cookies and CI4
Forum: CodeIgniter 4 Support
34 minutes ago
» Replies: 3   » Views: 44
error log from exec?
Forum: General Help
36 minutes ago
» Replies: 0   » Views: 7
Error after installing on...
Forum: Installation & Setup
49 minutes ago
» Replies: 5   » Views: 33
Which web hosting to use
Forum: Lounge
52 minutes ago
» Replies: 43   » Views: 26,961
Integrate Codeigniter 4.0...
Forum: CodeIgniter 4 Support
4 hours ago
» Replies: 2   » Views: 216
Creating Queue and Worker...
Forum: General Help
5 hours ago
» Replies: 3   » Views: 101
Encrypter causing Failedt...
Forum: CodeIgniter 4 Support
7 hours ago
» Replies: 0   » Views: 17
How to integrate swoole a...
Forum: CodeIgniter 4 Discussion
8 hours ago
» Replies: 1   » Views: 67
Curlopt_proxy support
Forum: CodeIgniter 4 Feature Requests
8 hours ago
» Replies: 1   » Views: 41

 
  Database Seeder Error [SOLVED]
Posted by: InsiteFX - 07-09-2020, 09:26 AM - Forum: CodeIgniter 4 Support - No Replies

I' am placing this here because I' am not sure if it is a bug or not.

I have been trying for a day now to Seed Myth/Auth with the boilerplate Seed

php spark boilerplate:install

It does the migrations but it will not seed the tables and I think it has to do with the path

This is the error I' am getting look at the path.

The specified Seeder is not a valid file: C:\xampp\htdocs\admin\app\Database/Seeds/dbConfusedeed.php

This is a Windows 10 Pro x64 The path is mixed with back slashes and forward slashes.

[SOLVED]

There is something wrong with the way that Boilerplate is seeding using php spark boilerplate:install

I ran it from my home controller like below and it seeded the tables.

PHP Code:
    public function index()
    {
        
$seeder Database::seeder();
        
$seeder->call('agungsugiarto\boilerplate\Database\Seeds\BoilerplateSeeder');

        
//return view('welcome_message');
    


  PHP 7.4.8 Has been Released
Posted by: InsiteFX - 07-09-2020, 08:09 AM - Forum: Lounge - No Replies

PHP 7.4.8. Released
This is a security release impacting the official Windows builds of PHP.


  modules and language in codeigniter 4
Posted by: Ahmad Ali - 07-09-2020, 07:20 AM - Forum: General Help - Replies (1)

let assume that the structure of the files as the following
- App
  - Config
  ..... until
  - Modules
    - Admin (inside Admin folder will be controllers and views model config and language)
      - Language
        - en
            - home.php
        - ar
            - home.php

So, my problem is when I want to use lang function I will put the name of the file and then the key of the thing you want to retrieve. Therefore let's say I called the function like that
lang('home.title') home represents the file name and the title represents the key. But it does not retrieve anything from the file and it returns home.title so do I need to put all my translation files
in one folder which is the one inside the app folder? or there is a solution?


Lightbulb File uploading and validation error!
Posted by: dimitrisgan97 - 07-09-2020, 04:45 AM - Forum: CodeIgniter 4 Support - No Replies

Hello,

Im trying to validate a file (image) along with other data and for some reason a i get the following exception when i dd() CodeIgniter\HTTP\RedirectResponse.

If i do not include the file validation everything is working fine..

Does anyone have any clue that may help?

Also any other idea (without need to change redirect())...?


Thanks!

Screenshots:

https://ibb.co/2vV7tdV
https://ibb.co/N12dfbP


Controller:

PHP Code:
$rules = [
  'email' => [
    'rules' => 'required|valid_email|max_length[255]|is_unique[users.email]',
    'label' => 'Email Address',
  ],
  ...
  ...
 
'face_photo' => 'max_size[face_photo,1024]' //If i delete this row everything is fine!
];

if (!
$this->validate($rules)) {
  //Something is happening with RedirectRespone.
  // Validator has set the error for the face_photo fine.
  //Also withInput() & with() are not working

  return redirect()->back()->withInput()->with('validation'$this->validator); 


  Remove method and ID from URL
Posted by: eleumas - 07-09-2020, 04:23 AM - Forum: CodeIgniter 4 Support - Replies (2)

Hi, i have this url:

Code:
https://mydomain.com/article/39/being-part-of-the-riders-growth-is-worth-every-sacrifice

and i would like have:
Code:
https://mydomain.com/being-part-of-the-riders-growth-is-worth-every-sacrifice

I have tried with routes but i can't. Someone can help me please?


This is the route for article page:
Code:
$routes->add('article/(:num)/(:any)', 'Frontend/Main::article/(:any)');

With this i remove the controller from URL:
Code:
$routes->add('(:any)', 'Frontend/Main::$1');

Thanks.


  Curlopt_proxy support
Posted by: jjinkou2 - 07-09-2020, 03:45 AM - Forum: CodeIgniter 4 Feature Requests - Replies (1)

Hello
i would like to use the culr codeigniter4 library and set the proxy.

i added this line inside the system/curlRequest.php under the function setCurlOption for my code to work .

Code:
$curl_options[CURLOPT_PROXY] = array_key_exists('proxy', $config) ? $config['proxy'] : '';

please could you add something to handle the curlopt_proxy?

thank you.


  shared memory? How to share an array?
Posted by: richb201 - 07-09-2020, 12:05 AM - Forum: General Help - Replies (3)

My controller gets some data from DynamoDB into an array. I need to use that data in a MyReport.php file that is sitting in /assets. Is there anything analagous to "shared memory"?  My controller is loading up an array with data it got from dynamoDB. This array can be 1000 rows or more. If I make this array GLOBAL or push it into $_SERVER in my controller, will I be able to access it from /assets/MyReport.php? Any idea where to stick this array?


  Can't load pdf with using Mpdf in Codeigniter 4
Posted by: fajar - 07-08-2020, 06:27 PM - Forum: CodeIgniter 4 Support - Replies (6)

Excuse me , i need help .. why my code can't load pdf .? I'm using Mpdf .. how to load view if view made variable ??
this is my code

//CONTROLLER (app/controller)
<?php namespace App\Controllers;
use App\Models\PesertaModel;
use App\Models\KondisiModel;
use App\Models\UserModel;
use App\Models\GejalaModel;

use MPDF;
class Reporting extends BaseController
{
    public function cetakpdf()
    {
        $data['datapeserta'= $this->pesertaModel->getpeserta()->getResult();

        $sumber = view('test',$data);

        $mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8''format' => 'A4''margin_left' => 10'margin_top' => 10'margin_right' => 10'margin_bottom' => 1'orientation' => 'P' ]);

        $mpdf->WriteHTML($sumber);

        $this->response->setHeader('Content-Type''application/pdf');
        return redirect()->to($mpdf->Output('Cetak Peserta.pdf''I'));
    }
}




//AUTOLOAD (app/config/autoload.php)
$classmap = [
            'MPDF' => APPPATH .'Libraries/mpdf.php'
];



//LIBRARIES (app/libraries/mpdf.php)

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class mpdf {
    
    function m_pdf()
    {
        $CI = & get_instance();
        log_message('Debug', 'mPDF class is loaded.');
    }
 
    function load($param=NULL)
    {
        include_once APPPATH.'/third_party/mpdf60/mpdf.php';
         
        if ($params == NULL)
        {
            $param = '"en-GB-x","A4","","",10,10,10,10,6,3';          
        }
         
        return new mPDF($param);
    }
}


  Cache unable to write to {0}
Posted by: Kaoo31 - 07-08-2020, 04:32 PM - Forum: CodeIgniter 4 Support - No Replies

Hello!
I'm new at the forum and using the framework. 
And I'm stuck with this problem, I finished an app and now I'm trying to run it in Centos 7, and I'm getting this error.

Help Sad And thanks!

I already tried giving it the permissions
chmod 777 -R



Attached Files Thumbnail(s)
   

  Urgent help with ci4 on cpanel
Posted by: seunex - 07-08-2020, 02:15 PM - Forum: CodeIgniter 4 Support - Replies (2)

I was building this on localhost and working then anytime i finish a section i push to live to check out the functions now i am stuck with cookie problem on live server while i got my app working smooth on local host i have comment out every where i set cookie and and still not solved.
belo is my error pls

[Image: 3b6d521fbc419757a006e884898f3920.png]



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.