Previous Thread
Next Thread
Print Thread
Rate Thread
#245158 05/02/2003 4:18 PM
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.

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
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
Offline
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.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)