PDA

View Full Version : php error? - Source Code being displayed



pamlong
03-30-2009, 10:38 PM
I am having trouble with the upgrade that I just purchased and installed on a clients website.

I was running zoom 4.x on a unix server with php. the site was migrated to a windows server which is running php 5.2.6. I purchased the new professional version, 6.0 and am trying to get this to work with no luck.

I have PHP test setup at:
http://www.synergis.com/search2/search.php
I get the search page ok but enter something and run a search and you'll see a ton of errors in the results page

suggestions?

THanks
Pam

wrensoft
03-30-2009, 11:52 PM
The search function actually works OK. Here is an example.
http://www.synergis.com/search2/search.php?zoom_query=autodesk

It is your search.shtml script that calls the search function that has the problem.

Your search.shtml file is including the search.php as a text file. So the PHP script is not being execute by the server. Instead you just get PHP code being displayed in the browser.

If you need to wrap our script in your own script, then see this page for details on how to do it (http://www.wrensoft.com/zoom/support/faq_ssi.html).

pamlong
03-31-2009, 12:10 AM
thanks for the quick response. I had already looked at this page for wrapping scripts.
I am using an .shtml file and calling the php script as an include.
I am using <!--#include file="search.php?${QUERY_STRING}" -->
is this correct?

wrensoft
03-31-2009, 12:23 AM
The instructions on the page are,
<!--#include virtual="search.php?${QUERY_STRING}" -->
and not "include file" if you are using SHTML.

But what works in terms of server side includes somewhat depends on how your server is configured.

pamlong
03-31-2009, 12:33 AM
normally I would use "include virtual" however this is a windows server and if I use "include virtual" I get an ssi file not found error. I've had to change all the ssi calls throughout the website to "include file" to work within the windows setup.
how do I get the ssi call to work in this environment?

wrensoft
03-31-2009, 01:14 AM
This is really a server configuration issue that you should talk to your hostng company about. It is not a Windows / Unix issue, but a web server issue.

To start with you need to work out if you are using IIS or Apache.

You might also want to consider using PHP instead of server side includes for your wrapping script.