mits Posted February 1, 2011 Share Posted February 1, 2011 hi, i'm using the fpdf library to generate PDF's from form input. It all worked well on my local host, but now that i have transferred to a web server it displays the following error when trying to generate a PDF. Warning: require(/fpdf16/fpdf.php) [function.require]: failed to open stream: No such file or directory in /home/ddgq0o2n/public_html/quote_builder/pdf.php on line 2 Fatal error: require() [function.require]: Failed opening required '/fpdf16/fpdf.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ddgq0o2n/public_html/quote_builder/pdf.php on line 2 i have searched for "include_path", but can't find it anywhere. i'm thinking it's a server problem, where the library may not be compatible or something needs to be switched on, as it worked fine on my local host. any help and suggestions welcome thanks. Quote Link to comment https://forums.phpfreaks.com/topic/226339-the-fpdf-library-error-please-help/ Share on other sites More sharing options...
suma237 Posted February 1, 2011 Share Posted February 1, 2011 this the path error,unable to read the file . Give full path Quote Link to comment https://forums.phpfreaks.com/topic/226339-the-fpdf-library-error-please-help/#findComment-1168297 Share on other sites More sharing options...
BlueSkyIS Posted February 1, 2011 Share Posted February 1, 2011 i suspect you need to either add a . or remove the / in front of your require() require("fpdf16/fpdf.php"); Quote Link to comment https://forums.phpfreaks.com/topic/226339-the-fpdf-library-error-please-help/#findComment-1168316 Share on other sites More sharing options...
mits Posted February 2, 2011 Author Share Posted February 2, 2011 hi, thanks for that....i added the full path to the file and i get the following error; Warning: require() [function.require]: URL file-access is disabled in the server configuration in /var/www/sites/stage.demomedia.co.uk/html/quote_generator/pdf.php on line 2 Warning: require(http://www.demomedia.co.uk/quote_builder/fpdf16/fpdf.php) [function.require]: failed to open stream: no suitable wrapper could be found in /var/www/sites/stage.demomedia.co.uk/html/quote_generator/pdf.php on line 2 i think it's progress. any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/226339-the-fpdf-library-error-please-help/#findComment-1168935 Share on other sites More sharing options...
mits Posted February 2, 2011 Author Share Posted February 2, 2011 Problem Solved: Solution: http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration i used DOCUMENT_ROOT server variable within the require and it works fine. Quote Link to comment https://forums.phpfreaks.com/topic/226339-the-fpdf-library-error-please-help/#findComment-1168945 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.