Strange errors happening, hard to diagnose

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
bwv2
Forum Commoner
Posts: 83
Joined: Fri Jun 10, 2005 11:50 am
Location: AZ

Strange errors happening, hard to diagnose

Post by bwv2 »

I'm having some strange errors. The error I'm about to describe does not only happen on one computer; it's on all computers. That rules out the user's computer. Additionally, it's only on ONE page, not all pages. All pages have the same first few lines, but only this one has the error. The first few lines of code on the page are:

Code: Select all

<?
session_start(); 

//header stuff 
include('../design/sheets/calcIncludes/incLogged.php');
$pageTitle=The Site: Business Design Steps - Setup';
$xtra_path='../';
include('../header2.php');
Here's what happens:

--> Go to website, login, get to "welcome" page. Everything is fine.

--> Go to another page, then hit "back" to get back to "welcome.php", then the page format is gone. Writing and buttons still intact, but the top of the screen says:

Code: Select all

Warning: session_start(): open(C:\WINDOWS\Temp\sess_123, O_RDWR) failed: Permission denied (13) in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 1

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php:1) in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 1

Warning: main(design/sheets/calcIncludes/incLogged.php): failed to open stream: No such file or directory in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 3

Warning: main(): Failed opening 'design/sheets/calcIncludes/incLogged.php' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 3

Warning: main(header2.php): failed to open stream: Permission denied in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 6

Warning: main(): Failed opening 'header2.php' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 6
The bottom of the screen says:

Code: Select all

Warning: main(footer2.php): failed to open stream: Permission denied in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 28

Warning: main(): Failed opening 'footer2.php' for inclusion (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\thesite.com\httpdocs\welcome.php on line 28

Warning: Unknown(): open(C:\WINDOWS\Temp\sess_123, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\WINDOWS\Temp) in Unknown on line 0
--> I can hit "refresh" as many times as I want, the issue remains.

--> I have a broken link on the page, and when I click it, I get a "Not Found" page. So I hit "back" to get to the "welcome" page.

--> When I hit "refresh" now, it comes up correctly; no errors.

--> I can "refresh" as many times as I want, it stays good.

--> When I repeat the above steps (new page, then back, then refresh) it happens all over again.

--> If I close all windows and come back later, I get the error on the first try. I then have to do the page change/refresh trick to see it correctly.

Anyone have any ideas? The site is hosted on a dedicated server, Windows Server 2003 Web Edition.

Thanks.
Last edited by bwv2 on Fri Dec 08, 2006 10:27 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the errors are server configuration related. Particularly that the user underwhich your web server runs likely does not have permission to write to the temporary directory to which php is set to use.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

with everypage [like i say to everyone] do this. you avoid many errors:

Code: Select all

<?php 
ob_start();

// codes


ob_flush();
?>
ob_start(); starts a memory buffer
ob_flush(); cleanly ends the memory buffer (PHP automatically does this but its just better to call it)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Output buffering is not a solution to this problem, nor is it a solution for other header based issues.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yeah using ob_ is a bad workaround for header issues (not this issue!) akin to telling someone to turn error reporting off to "fix" errors. It also uses memory.
Post Reply