PHPJasper / phpjasper-laravel

MIT License
32 stars 17 forks source link

connection with mysql having special characters in password breaks the jasperstarter command #16

Open savankaneriya opened 5 years ago

savankaneriya commented 5 years ago

I have connected my Laravel app with jasper report having mysql as connection. Locally it worked fine but in live it shows the error like this screen shot 2018-12-19 at 11 45 10 am After investigating 2 days i found my server had special characters ** at last in mysql password. I changed password and worked fine. hope this issue be fixed soon.

ryangp commented 5 years ago

hi @savankaneriya, did you manage to work with PHPJasper with parameters?

I get error having parameter in me. what do you think the reason ?

            ```

$jasper = new PHPJasper;

            $jasperinput = public_path().'/jasperinputs/EmployeeData.jrxml';
    $jasperoutput = public_path().'/jasperoutputs/'.$bio_num;
    $pdfreports = public_path().'/pdfreports';
    $outputoption = [
        'format' => ['pdf'],
        'locale' => 'en',
        'params' => ['bio_num' => $bio_num],
        'db_connection' => [
            'driver' => 'mysql',
            'username' => 'root',
            'password' => '',
            'host' => 'localhost',
            'database' => 'hris_db',
            'port' => '3306'
        ]
    ];
    $jasper->process(
        $jasperinput,
        $jasperoutput,
        $outputoption
    )->execute();


by the way, what version of laravel and php are you using?
Thanks.