Re: More problems with scripcase PDF (solved)
After almost giving up on Scriptcase (because so far you guys have given us no useful hint whatsoever and probably hundreds of developers have wasted thousands of hours on this, I am sure) we have finally solved the problem - at least for our servers.
Analyzing the error-logs and trying out endless variations of modifying the actual code scriptcase is generating the moment a PDF-request is triggered, the problem can be solved by simply changing the PDF-configuration in the production environment.
Log into your production environment, there is one parameter called PDF Server IP.
This label, unfortunately, is very misleading because we had always entered our servers IP-addresses as numeric values in this field.
Scriptcase uses this value to create a pathname to the html-output-file (which needs to be converted to pdf) as follows:
http://[PDF Server IP]/_lib/tmp/sc_grid_example_html
Now, this might work only if your server’s IP address resolves 1:1 to your actual domain and website, hence doesn’t use virtualization.
But if you have a server with multiple domains, the IP-address(es) are typically shared by more than one domain!
Even worse: if you use server management panels like Plesk or cPanel the IP-address almost NEVER resolves directly to the location of your scriptcase installation.
For example: If your server has the ip 91.92.93.94 and hosts four domains under Ubuntu/Plesk, the locations of your Scriptcase installations are as follows:
/var/www/vhosts/mywebsite1.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite2.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite3.com/httpdocs/[scriptcase]
/var/www/vhosts/mywebsite4.com/httpdocs/[scriptcase]
Obviously, the one ip 91.92.93.94 would never correctly point to the various Scriptcase installations.
So the trick is simply to NOT enter the numeric IP-address (e.g. 91.92.93.94) in the field PDF Server IP, but rather the full alphabetical domain name (e.g. www.mywebsite1.com).
Urgent advice for Scriptcase:
Please change the label from “PDF Server IP” to “PDF Server Domain / IP” and explain this more carefully in the manuals.