phpjasper-laravel icon indicating copy to clipboard operation
phpjasper-laravel copied to clipboard

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

Open savankaneriya opened this issue 6 years ago • 1 comments

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.

savankaneriya avatar Dec 19 '18 09:12 savankaneriya

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.

ryangp avatar Oct 24 '19 02:10 ryangp