BliarOut Posted December 22, 2010 Share Posted December 22, 2010 Gah, can anyone help. We've written a web app, it was all tested and doing what it should and at the eleventh hour I've hit a snag. We use TCDPF to create printed reports from a MySQL database. It does what it should when accessed over the 'net however I've just been informed that their firewall won't allow Activ X content through and they won't (as opposed to can't) create an exception to trust our site. So, I need a workaround. Option 1) Host a complete copy on their internal network (exceptionally undesirable as it becomes unmanageable). Option 2) Split the printing components out and host that on a web server on their internal network. Option 3) Find another way of producing PDF output from a MySQL web app that can traverse a strict firewall. My preference is for option 2, but I'd like some opinions/thoughts on the best way to proceed before I code myself into a corner once more Thus far I've tried using an include to a different server but it is spitting it's dummy at the moment. Does anyone have any opinions on the *easiest* way to work around the problem? Thanks, Rob Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 22, 2010 Share Posted December 22, 2010 So, is your actual problem in producing the PDF document, serving the PDF document to the client/browser, or in printing the PDF document in the client/browser? Relevant code showing how the Active X comes into play would help. Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/#findComment-1150259 Share on other sites More sharing options...
BliarOut Posted December 22, 2010 Author Share Posted December 22, 2010 What I'm *trying* to do at the moment is test running TCPDF on a server we have inhouse with the rest of the code on our public webserver. session_start(); include('http://ourremoteurl.co.uk/tcpdf/config/lang/eng.php'); include('http://ourremoteurl.co.uk/tcpdf/tcpdf.php'); /* require_once('./tcpdf/config/lang/eng.php'); require_once('./tcpdf/tcpdf.php'); */ I can see the request coming in in our IIS logs, but I get the error from TCPDF Fatal: class TCPDF not found. TCPDF is working on our inhouse server and can serve up it's own examples without error. So I suppose my first question is what is the fundamental thing I don't understand about code running on two separate servers? Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/#findComment-1150283 Share on other sites More sharing options...
PFMaBiSmAd Posted December 22, 2010 Share Posted December 22, 2010 Using a URL in an include() statement causes a HTTP request to be made to the target file (the same as if you browsed to the file) and since php code is parsed and executed ON the server where the target file is located, you only receive and include any output that is sent from that file, not the php code. Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/#findComment-1150401 Share on other sites More sharing options...
BliarOut Posted December 23, 2010 Author Share Posted December 23, 2010 Thank you for that, it makes complete sense Is there a way to achieve the objective above? The other issues are that the content is dynamically pulled from a MySQL database that only allows access from localhost, the *main* server and I've also got a lot of variables, some of which are stored in sessions to contend with too. I did think of having the script that generates the PDF from TCPDF on the remote server too but I'm not sure how to share variables across more than one physical server. Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/#findComment-1150672 Share on other sites More sharing options...
PFMaBiSmAd Posted December 23, 2010 Share Posted December 23, 2010 Perhaps if you provided - a 'diagram/list' showing what different servers are involved; identify which server you have referred to as 'main' and 'remote'; where the fire wall is at and exactly what data it does not not permit that is relevant to this problem; which server has the database; which server does the client/browser connect to; WHY you don't have all the application code on the server where the database is at; someone could probably help you. Quote Link to comment https://forums.phpfreaks.com/topic/222370-php-active-x-pdf-printing-issue/#findComment-1150771 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.