Page 1 of 1

Disable FPDF?

PostPosted: 27. January 2009 20:22
by trendless
NOOB Alert:

I'm running XAMPP on Ubuntu JeOS 8.04 for the express purpose of running a NolaPro accounting package. NolaPro uses FPDF for report generation and invoice printing (among other things) and everytime I try to generate a PDF it gives me:

"Fatal error: Cannot redeclare class FPDF in /opt/lampp/lib/php/fpdf.php on line 13"

Now, apparently this is because XAMPP is loading fpdf.php on every page-load or somewhere there is an auto-prepend happening, so I'm told. Is there a way to disable the version of FPDF that came with XAMPP from running/loading (which will supposedly allow the version that comes with NolaPro to run properly)?

Re: Disable FPDF?

PostPosted: 27. January 2009 21:11
by Wiedmann
Is there a way to disable the version of FPDF that came with XAMPP from running/loading (which will supposedly allow the version that comes with NolaPro to run properly)?

Well, the main problem is:
Your script does not allways care about, if it's loading it's own fpdf, or any other which is in the includepath.

If you don't use the XAMPP one yourself, just delete it (or fill a bug at NolaPro).

Re: Disable FPDF?

PostPosted: 27. January 2009 21:19
by trendless
Ok, so I can just delete fpdf.php and that will stop it from loading. (Ignoring any special scripting etc in NolaPro, whom I have contacted about this issue), XAMPP itself won't choke just b/c I delete the fpdf.php file? Now will deleting fpdf.php mean that XAMPP no longer supports fpdf?

Re: Disable FPDF?

PostPosted: 27. January 2009 21:33
by Wiedmann
Now will deleting fpdf.php mean that XAMPP no longer supports fpdf?

Well, if you delete something, you can't use ist...

I guess you are not a PHP developer, and this script is only included in XAMPP, if you as developer want use this library in your own scripts. It's nothing other software depends on.

Re: Disable FPDF?

PostPosted: 27. January 2009 21:54
by trendless
Fair enough. Thanks for the answers so far. You are correct in assuming I'm not a developer. I haven't got a full understanding of how all the different files etc work together inside a web server, but you've helped me understand a little better. Thanks again.