php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37466 FDF Module does not work for ISAPI
Submitted: 2006-05-16 21:17 UTC Modified: 2006-05-17 19:16 UTC
From: jotaylor at hightechinstitute dot edu Assigned:
Status: Closed Package: FDF related
PHP Version: 5.1.4 OS: Windows Server 2003
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
8 + 9 = ?
Subscribe to this entry?

 
 [2006-05-16 21:17 UTC] jotaylor at hightechinstitute dot edu
Description:
------------
PHP Scripts can't find the FDF Library functions when using the ISAPI modules.

Reproduce code:
---------------
function CreateNoticeMBCForm($id)
{
	$fdf = fdf_create();		
	fdf_set_value($fdf, 'Name', 'Name');
	fdf_set_file($fdf, GetCurrentPDF('NoticeMBC', $id));
	Header("Content-type: application/vnd.fdf");
	fdf_save($fdf);
	fdf_close($fdf);
}
//You have to create a PDF File and Insert it into the fdf_set_file function

Expected result:
----------------
A PDF file pops up with the text fields populated with the values contained within the FDF file.

Actual result:
--------------
Fatal error: Call to undefined function fdf_create() in C:\Inetpub\wwwroot\Test\FDFFileGen.php on line 599

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-16 21:44 UTC] tony2001@php.net
I must enable the module first to be able to use it.
And don't forget to read the docs:

Note to Win32 Users: In order to enable this module on a Windows environment, you must copy fdftk.dll from the DLL folder of the PHP/Win32 binary package to the SYSTEM32 folder of your windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32)
 [2006-05-16 21:50 UTC] jotaylor at hightechinstitute dot edu
The dll is enabled in the PHP.ini file and the dependent DLL, fdftk.dll is also in the system path.  I got this to work using the PHP-CGI.exe executable, but when I switch the system over to the ISAPI stuff, this is when it breaks.  Even when using the ISAPI stuff, I can use the command line PHP.exe and execute files with the FDF library functions with no problem.  It seems to only not work for the ISAPI PHP module.
 [2006-05-16 21:54 UTC] tony2001@php.net
It's obviously NOT enabled, otherwise you wouldn't get this message.
The reason could be different php.ini used.
 [2006-05-16 22:25 UTC] jotaylor at hightechinstitute dot edu
OK.  

A. There is only ONE and only ONE php.ini file for each of the three servers that this is happenning for.

B. The Extension is enabled on all three servers with the fdftk.dll in the windows System32 subdir.  I even checked that the fdftk.dll to make sure that it is from the latest version of php.

Also, let me clarify what exactly I'm doing.  I setup the webserver to run using the PHP-CGI.exe to execute the php scripts, and everything works like it should.  Then I go to the webserver and switch it to using the ISAPI module (php5isapi.dll) and then everything works (MSSQL, MYSQL, and CURL modules) but for some reason I can't determine, the FDF module doesn't load up for some reason.  I haven't messed with any of the configuration files (php.ini) or anything.
 [2006-05-16 22:31 UTC] tony2001@php.net
It's easy to see which php.ini ise used:
PHP tells that at the top of phpinfo().
Please check that the right php.ini is there and you've restarted the server. After that check your error log (Event Viewer or how do you call it..) to see if there are any errors related.
 [2006-05-16 23:15 UTC] jotaylor at hightechinstitute dot edu
Now here's an odd turn. I switched the web server back from the PHP-CGI to ISAPI and now it sees the FDF Module fine.  Unfortunately, it now doesn't load up the Curl library.  There isn't a max amount of libraries it can load, is there?
 [2006-05-16 23:19 UTC] tony2001@php.net
No.

Note to Win32 Users: In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.
 [2006-05-17 19:16 UTC] jotaylor at hightechinstitute dot edu
Thank you for solving this problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC