phpzend-frameworklucenezend-search-lucene

PHP Zend Framework: Internal Server Error 500 on localhost when trying to run "Lucene.php" on browser


I am running windows 7 and I have a fresh install of Zend framework. On a new php file called 'search.php' I am trying to build a search application using Zend_Search_Lucene with the first line being:

<?php require_once "C:...\Zend\Search\Lucene.php";?>

What I see on the browser when I run this code is internal server error 500..I then discovered that I get this error whenever I try to run some of the files in Zend library by itself and this is what caused the error I mentioned..i.e ERROR 500 on localhost/Zend/Search/Lucene.php, localhost/Zend.../blabla.php..

Some of the files however, did not display this 500 server error when run on the browser. ie: localhost/Zend/ProgressBar.php shows an empty page, which is fine since I assume there are not any 'echo'es in the code. This is actually what I expected when I ran lucene.php on the browser...

Can somebody experienced let me know how this can happen? Why do I get internal server error instead of exception? How do I check if my search application that uses "Lucene.php" file runs properly regardless of this internal 500 server error? thanks.


Solution

  • I have finally solved the problem :) After looking at the error traces, the internal server error is because the code <?php require_once "C:...\Zend\Search\Lucene.php";?> tries to access a particular code inside "Lucene.php" that contains a relative path to the Zend library folder =require_once('Zend\Search\Document\...'); and the server does not know the path to the file. What needed to be fixed was actually my php.ini file, on the include_path i added ;C:\php5\pear;C:\Server\www\.....\ZendFramework\library..Now it shows empty page instead of internal server error.

    +1 @Arend: The error reporting function is really useful! thanks