PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > External Binaries

Reply
 
Thread Tools
Old 11-13-2004, 06:43 AM   #1
lelectronique
Green Mole
 
Join Date: Nov 2004
Posts: 5
Unhappy Problem PDF indexing

Hello,

Excuse me for my english, i'm french.

Config :
Server : IIS Windows XP Pro
Php : 4.3.8
Phpdig : 1.8.3

file config :
define('PHPDIG_INDEX_PDF',true);
define('PHPDIG_PARSE_PDF','C:\\Progra~1\\Ghostgum\\pstotext\\pstotxt3.exe') ;
define('PHPDIG_OPTION_PDF','');
define('PHPDIG_PDF_EXTENSION','.txt');


I wish to index the repertory containing http://localhost/gesdosi/fichier/verif files pdf "/"and here the result:

SITE : http://localhost/
Chemins exclus :
- @NONE@
1:http://localhost/gesdosi/fichier/verif/
(temps : 00:00:05)
Pas de liens dans la table temporaire

--------------------------------------------------------------------------------

liens trouvés : 1
http://localhost/gesdosi/fichier/verif/
Optimizing tables...
Indexation terminée !
--------------------------------------------------------------------------------

Thanks for your help
Best regards
Ludo
lelectronique is offline   Reply With Quote
Old 11-14-2004, 11:21 PM   #2
mleray
Orange Mole
 
Join Date: Sep 2004
Location: Nantes (44) FRANCE
Posts: 31
as-tu essayé d'indexer uniquement un document pdf
ex : http://localhost/gesdosi/fichier/verif/machin.pdf ?

Sinon je te conseille de lire le post Readme de ce forum et de faire ce qui y est proposé.
mleray is offline   Reply With Quote
Old 11-15-2004, 02:52 AM   #3
lelectronique
Green Mole
 
Join Date: Nov 2004
Posts: 5
je viens d'essayer avec un fichier pdf en direct voici ce que j'obtiens :

SITE : http://localhost/
Chemins exclus :
- @NONE@

Warning: exec(): Unable to fork [C:\Progra~1\Ghostgum\pstotext\pstotxt3.exe ../admin/temp/11748322.tmp] in D:\Site\gesdosi\recherche\admin\robot_functions.php on line 1057
1:http://localhost/gesdosi/fichier/ver...4_Chartres.pdf
(temps : 00:00:06)
Pas de liens dans la table temporaire

--------------------------------------------------------------------------------

liens trouvés : 1
http://localhost/gesdosi/fichier/ver...4_Chartres.pdf
Optimizing tables...
Indexation terminée !


As-tu une petite idée ?
Merci de ton aide
Bonne journee
lelectronique is offline   Reply With Quote
Old 11-15-2004, 03:29 AM   #4
lelectronique
Green Mole
 
Join Date: Nov 2004
Posts: 5
Unhappy

en appliquant le readme comme indiqué j'obtiens l'erreur suivante

SITE : http://localhost/
Chemins exclus :
- @NONE@


Is result test http an array: 1
What is result test http status: PDF

Is result test an array: 1
What is result test status: PDF
Use is executable is set to: 0
Index the pdf is set to: 1
Parse the pdf is set to: C:\Progra~1\Ghostgum\pstotext\pstotxt3.exe
Does parse pdf exist: 1

Fatal error: Call to undefined function: is_executable() in D:\Site\gesdosi\recherche\admin\robot_functions.php on line 964
lelectronique is offline   Reply With Quote
Old 11-15-2004, 04:31 AM   #5
mleray
Orange Mole
 
Join Date: Sep 2004
Location: Nantes (44) FRANCE
Posts: 31
J'ai moi même eu pas mal de problèmes avec les pdf.
J'ai dû installer php en cgi et j'utilise maintenant pdftotext (sur le site xpdf) car je n'ai jamais réussi avec pstotxt...

Sinon ton erreur fatale est juste due Ã* un echo utilisant la fonction is_executable(), j'ai remplacé la ligne par
if (USE_IS_EXECUTABLE_COMMAND==1)
echo "Is parse pdf executable: " . is_executable(PHPDIG_PARSE_PDF) . "<br>";
au cas où...

Je ne te donne pas vraiment de solution lÃ* mais tiens nous au courant de l'avancée de ton projet...

Ah oui et aussi, vérifie les droits de tes fichiers pdf, on ne sait jamais...
mleray is offline   Reply With Quote
Old 11-15-2004, 06:20 AM   #6
lelectronique
Green Mole
 
Join Date: Nov 2004
Posts: 5
oki pour la ligne Ã* modifier en cherchant j'avais vu que c'était un echo donc je l'avais désactivé.

Vu que je me bat toujours j'ai décidé de me tourner vers ce que tu utilise, en me disant cela devrait marcher et bien non
Voila l'erreur que j'obtiens :

SITE : http://localhost/
Chemins exclus :
- @NONE@


Is result test http an array: 1
What is result test http status: PDF

Is result test an array: 1
What is result test status: PDF
Use is executable is set to: 0
Index the pdf is set to: 1
Parse the pdf is set to: D:\Site\gesdosi\recherche\pdftotext.exe
Does parse pdf exist: 1

Warning: exec(): Unable to fork [D:\Site\gesdosi\recherche\pdftotext.exe ../admin/temp/57188672.tmp 2>&1] in D:\Site\gesdosi\recherche\admin\robot_functions.php on line 1069

Command is: D:\Site\gesdosi\recherche\pdftotext.exe ../admin/temp/57188672.tmp 2>&1
Result contains:
Return value is: -1

1:http://localhost/gesdosi/fichier/ver...4_Chartres.pdf
(temps : 00:00:05)
Pas de liens dans la table temporaire

--------------------------------------------------------------------------------

liens trouvés : 1
http://localhost/gesdosi/fichier/ver...4_Chartres.pdf
Optimizing tables...
Indexation terminée !



PAs beaucoup de changement donc, ceci dit je ne suis pas sur de mon coup dans l'installtion du CGI c'est la premiere fois, en passant j'ai installé la nouvelle version de PHP Ã* savoir la 4.3.9.
Est ce que cela peut être due Ã* mon serveur web ? (IIS5)

Je vais encore creuser car je veux a tout prix que cela fonctionne

Je te tiens au courant
@+
Ludo
lelectronique is offline   Reply With Quote
Old 11-15-2004, 06:57 AM   #7
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
http://fr.php.net/manual/fr/ref.exec.php
http://bugs.php.net/bug.php?id=29001


Note on XP users: XP-Home edition does not allow to set rights directly on files and folders. You should use cacls command-line utility to do this.

For example:

cacls c:\windows\system32\cmd.exe /E /G IUSR_ADMIN2003:F

gives IIS user full access to cmd.exe (potential security hole!), so PHP can fork and execute external programs.

__________________

MORE ON THE UNABLE TO FORK MESSAGES IN WINDOWS:

I would like to confirm that this issue relates to permissions on %SYSTEMROOT%\SYSTEM32. The user (usually the anonymous login) must have execute permissions on cmd.exe

This is unlike most other programming languages. For example, in C the spawn and exec functions do not try to open a shell, they create the new process directly. PHP creates the new process via cmd.exe (or command.com) much like the C system() function. This is good for those of you who are trying to run batch files but this is very ineffecient for running other .exe files.

I feel uneasy about lifting permissions in my system32 directory but you can get around this by copying cmd.exe to your PHP directory. Windows will look there first and if it is not there it will check the path. Note: I mean the directory where php.exe is, not your script directory.

I have confirmed this by running filemon.exe while trying to execute a script, and you can see it trying to start the cmd.exe process.

__________________

This is not a problem in the PHP.
The problem is related to the execution permissions over the CMD to the
IUSR_machine and the ZIP exe file.

I do fork to GPG.exe in ISAPI/CGI modes. Using popen and proc_open.

According to the mode ISAPI/CGI the IWAM_/IUSR_ user must have read &
execute permissions over the CMD and the EXE file that you try to call.

This sentence put the needed permissions:

cacls cmd.exe /E /G MACHINE\IUSR_MACHINE:R
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 11-15-2004, 08:02 AM   #8
lelectronique
Green Mole
 
Join Date: Nov 2004
Posts: 5
Merci beaucoup Charter, cela fonctionne impeccable maintenant



C'est vraiment superbe, je vais pouvoir continuer le développement de mon intranet, vraiment génial ce script je vais le recommander autour de moi

Merci Ã* tous les deux pour votre aide et bonne continuation

Bonne soirée
@+
Ludo
lelectronique is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with PDF indexing Phantom External Binaries 2 07-25-2005 02:26 AM
problem with .pdf and .doc files mleray External Binaries 11 12-09-2004 10:26 PM
indexing pdf Hoek External Binaries 9 02-25-2004 02:42 AM
indexing pdf philippeguerind External Binaries 11 02-21-2004 10:50 AM
PDF indexing lelandv External Binaries 15 12-08-2003 04:23 PM


All times are GMT -8. The time now is 08:18 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.