Monthly Archives: März 2011

Typo3: indexed_search and external files (like pdf, doc …)

I’ve tried to get indexed_search in Typo3 to work. If you try to do this the first time it isn’t really easy.

After the basic setup the normal search was fine. However external documents like pdf and winword were not being indexed. Of course I’ve installed the needed tools and checked the path to them many times. Sure I’ve check if that these tools (pdftotext, catdoc) are running fine on command line.

But it took me hours to realize why it wasn’t running after all. The open_basedir restriction of php!
The extension indexed_search first checks if the program exists via the is_file method. If you installed the programs to the default path /usr/bin you are in trouble now. It’s no problem to execute the program via php but the function is_file will fail. So indexed_search thinks it’s not install and will not index pdf or any other external files.

Now you’ve several options. First of all you could add /usr/bin to the open_basedir path. Not a good idea at all! Second you could modify the extension not to check the files but just run the programs. Not so good either since it will break after an update of your Typo3 installation. Third of all you could copy the programs to your existing open_basedir path. Then adjust the configuration of indexed_search where to find the programs and it’s working like a charm …

Typo3 and log_setTSlogMessage

While trying to get indexed_search in Typo3 to work I’ve discoverd a lot of log_setTSlogMessage functions in the code. I ask myself where to find the output of these function. I digged around and found a reference to $GLOBAL['TT']. Ok. Not much better. Again I had to dig around. Finally I got a simple answer: The Admin Panel! 🙂
So just enable the admin panel and go to TypoScript and enable Display messages. Reload the page and you’ll the logs.