I've been beating my head against a wall with this for a while now and I was wondering if anyone had an idea why I'm having this issue, because I'm about ready to pull my hair out. I've pulled in fpdi/fpdf through composer into my lumen application, everything is autoloaded and I get no errors in php storm. However when I create a new fpdi object to start manipulating pdfs I get a 502, there is nothing in my logs, nothing at all to point me to some sort of solution. Any input would be very much appreciated.
I'm getting this for the past few days as well. Are you on PHP 7.1 by any chance? I wonder if there are issues there. If anyone has a solution, please share! :)
Thaknks for the reply. I am using php 7.1, I'm going to try reverting to 7.0 and see if that helps. I'll let you know what happens. Oddly enough if I change something in fpdf class, save it and rerun it it works once.
What did you change? I tried dd() in the FPDF constructor (the base class) and it still errors, which makes me think it has to do with all the class_exists checking, etc., or some other ancillary non-PS4-adhering programming practices?
Yea that was my initial thought, I actually modified it into my own package and got rid off all that as well as modified the file and class names to meet psr-4 and it all autoloads fine now, the main issue though is php v 7.1 switch to 7.0 and you should be fine
I can see about uploading my modified fpdf/fpdi package to packagist if you'd like to check it out or use it. It does away with the bridging functionality so it won't work with tcpdf. It's all standardized and set up for psr-4 though.
Oh, yea ... I thought maybe you had a concrete indicator what was wrong. Yea, I rolled back to 7.0 and its working again. Was hoping for something specific we might be able to act on. :) I'll keep you posted if I find anything out.