PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Issues with .php4 files and templates

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issues with .php4 files and templates

    We've been using Zoom Search 4.2 Professional Edition for sometime now, and its been working fine mostly. However, there are a few issues that we've come up against.

    1) It appears you can't have a different 'search.php' file for each Configuration.

    Some of our clients web servers use the .php extension for PHP files. Some use the .php4 extension. This means we have to change the $SETTINGSFILE variable manually when switching between servers before indexing.

    2) The $TemplateFilename variable in the 'settings.php' file can't be changed from within the Zoom program.

    Although it says we shouldn't edit the 'settings.php' file, we need to - because our clients server expects .php4 files, not .php.

    Also, our search results page has other PHP code on it, which means we need a 'search_template.php4' file, not a 'search_template.html' file.

    3) There's no way to prevent Zoom from uploading the 'settings.php' file.

    Because our clients server expects PHP files to be named .php4, we've had to make a custom 'settings.php4' to make Zoom work. However, everytime we index and upload, Zoom reverts back to using the .php file.

    To get around this, I've had to edit the 'search.php' file to get its settings from 'settings.php4' so even though Zoom uploads the 'settings.php' file, it doesn't actually use it, and uses the existing 'settings.php4' file I made.

    Is there any way around these issue?

    Also, one other thing! If you make changes to a Configuration, the program does not alert you when quitting that the changes have not been saved. Either the program should automatically save the currently loaded Configuration upon quitting, or ask if you want the changes saved.

    Thanks,

    Julian Wright
    TurnRound Multimedia
    Last edited by TurnRound; Dec-05-2006, 02:42 PM.

  • #2
    Originally posted by TurnRound View Post
    1) It appears you can't have a different 'search.php' file for each Configuration.
    No, this is not true. You can have a different "search.php" script for each configuration by specifying a custom script source path on the "Advanced" tab of the Zoom Configuration window. This way you can associate a different customized "search.php" file per ZCFG file.

    Some of our clients web servers use the .php extension for PHP files. Some use the .php4 extension. This means we have to change the $SETTINGSFILE variable manually when switching between servers before indexing.
    It is rare for a server to require the ".php4" extension these days as the practice has been generally disregarded. Usually though, when such a restriction is in place, the normal ".php" extension is associated with the current/latest version of PHP installed and the ".php4" or ".php3" extensions are used to force an older version of PHP to be used for that script specifically for compatibility reasons. Since Zoom's search script works with the latest version of PHP available (5.0 and later), it should not be a problem running as a ".php" file in such cases and renaming the file to a ".php4" extension would not be necessary.

    2) The $TemplateFilename variable in the 'settings.php' file can't be changed from within the Zoom program.

    Although it says we shouldn't edit the 'settings.php' file, we need to - because our clients server expects .php4 files, not .php.
    I would think you should not need to change the "settings.php" file either way. Even if your server requires "search.php" to be named "search.php4", the settings file can stay named as "settings.php" because it is only called internally by the search script. Give it a try without renaming the settings file on your server first.

    Also, our search results page has other PHP code on it, which means we need a 'search_template.php4' file, not a 'search_template.html' file.
    Please see this FAQ in regards to using PHP code on your search page:
    http://www.wrensoft.com/zoom/support/faq_ssi.html

    The "search_template.html" filename should not be changed, and the above FAQ explains the recommended usage to create a search page which contains PHP code or other server-side scripting.

    3) There's no way to prevent Zoom from uploading the 'settings.php' file.

    Because our clients server expects PHP files to be named .php4, we've had to make a custom 'settings.php4' to make Zoom work. However, everytime we index and upload, Zoom reverts back to using the .php file.

    To get around this, I've had to edit the 'search.php' file to get its settings from 'settings.php4' so even though Zoom uploads the 'settings.php' file, it doesn't actually use it, and uses the existing 'settings.php4' file I made.
    See above. I don't think it is necessary to rename the settings file. Let us know otherwise, as server configurations can really vary. Although it would be a very odd server setup if it blocks internal access to files named ".php".

    Also, one other thing! If you make changes to a Configuration, the program does not alert you when quitting that the changes have not been saved. Either the program should automatically save the currently loaded Configuration upon quitting, or ask if you want the changes saved.
    Yes, that is something we're looking at adding in a future release. It would be helpful to remind the user to save their configurations, and it's something on our todo list.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...
    X