|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
I'm trying to include a small script I've written which calls main.inc.php in an html file via "include virtual" in Apache. But for just this script I only get garbage unless I remove the call to main.inc.php or print something above the call to main.inc.php. The script works perfectly when run stand-alone, so does any other script I've tried.
Does anyone know what my problem is and what I can do about it? It works at the moment, but it is a bit annoying to have to print something above the require.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Hmmmm ... I wonder if the Content-Type or Content-Encoding headers are failing to get set properly.
You don't happen to have Proxomitron installed on your PC, do you? It has an option for logging all the request and response headers, which is very useful for cases like this.
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
Never heard of Proxomitron and am an all Linux guy anyway. I've been thinking of installing some program to snoop headers, but haven't got around to it.
But the headers shouldn't be sent should they? ubbt.inc.php by itself doesn't do anything, and I only use the db object.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Unlike Perl, PHP automatically sends the headers when a script first sends output to the browser, unless the script has previously sent the headers explicitly. I haven't used PHP in conjunction with SSI before, so I don't know how it handles that situation. I'm just making a wild guess. This problem may have nothing to do with faulty headers. Do you have zlib compression enabled? (another wild guess)
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
But the strange thing is that I've never had a problem before, I use a lot of php scripts included via ssi. Also main.inc.php shouldn't do any output by itself, at least as far as I know.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|