Zoom Search Engine FAQ - Troubleshooting PHP
Q. "Fatal error: Allowed memory size of 33554432 bytes exhausted..."
Depending on your host, the error might be 8388608 bytes exhausted, or 67108864 bytes exhausted (or some other number).
This is due to the memory limits set on your web server for PHP scripts being too low. The quantity of RAM required depends on the size of your index files. You can fix this by editing the PHP config file for your webserver (php.ini), as follows:
Change from (default limits can be 8M or 16M in older versions of PHP),
Alternatively, if you do not have access to your web server's global PHP settings, you can add the following lines to the .htaccess file located in the same directory as your PHP search files. You might have to create this file with a text editor if it doesn't already exist.
This might not work on all servers either (it depends on what has been allowed by your hosting company). Refer to your web host or PHP Users Guide for more information.
There is also a 3rd alternative, if neither of the above two options work. Edit the search.php script and add the following PHP code to the search.php script on the 2nd line (just after the first " <?php" line).
ini_set ( "memory_limit", "128M");
Note: For some very large sites, the above memory limit of 128 MB may still not be enough. Increase this value as appropriate if you continue to get a similar error message. Current versions of PHP have a default memory limit of 128 MB, but larger values like 256MB can be used. You may also want to consider using the CGI version for better performance on large sites.
It is also worth noting that A) The RAM is only used while a search being being performed. Typically totally just a few minutes of use per day and B) Typical web servers have 16GB+ of RAM, so 128MB is not even 1% of the machine's resources.
Q. "Warning: Cannot modify header information - headers already sent..." or similar error message
This is most likely because you are embedding the search script within your own PHP page (as described in this FAQ), or you have modified the search script by adding HTML or PHP code.
This error is due to the search script attempting to specify a HTTP header with an explicit Content-Type to ensure that the correct charset is used for your search page. However, if you have HTML sent before the start of the search script, then this will not work as a HTTP header would have already been sent.
You can prevent this problem by selecting the "Disable charset enforcing on search script" option (under the "Advanced" tab of the Indexer Configuration window). This will stop the search script from sending out the redundant HTTP header.
Q. "Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION..." or similar error message
This is most likely because you have the old PHP 4 release installed on your server. PHP 4.0 was released in 1999 and discontinued in 2007. PHP5 has been available since 2003.
Zoom V6 only supports PHP5.0 and above.
If you really must continue with PHP4, then consider using the old V5 release of Zoom.
In some cases, a few hosting companies provide both PHP4 and PHP5. And you can rename the search.php file to search.php5 to get PHP5 to execute the file. In other cases you can add entries to the .htaccess file to make PHP5 the default version. But you should check with your hosting company if PHP5 is available if you see this error.
Q. "Warning: date(): It is not safe to rely on the system's timezone settings..." or similar error message
Your web server configuration is lacking a timezone setting. Check with your web admin or hosting company to fix this. If your admin has only just added the line to the .ini file, make sure they have since restarted PHP or Apache for it to take effect.
Please do not change "search.php" to address this, unless you are prohibited from fixing the setting on the server (which would be poor form on your hosting company's part). Changing the PHP script would be akin to just applying a band-aid to the problem instead of actually fixing it.
Return to the Zoom Search Engine Support page