session_start failed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rupract
Forum Newbie
Posts: 3
Joined: Tue Mar 15, 2005 7:50 pm
Location: Canada

session_start failed

Post by rupract »

I've read through all the topics about this error, but what I'm getting is slightly different.

When I try to load the phpadmin/test.php file I get this at the top:
Warning: session_start(): open(C:\temp\sess_e1b4066226c4002e50b47dab02acb002, O_RDWR) failed: No space left on device (28 ) in c:\inetpub\wwwroot\phpadmin\test.php on line 3
and at the bottom of the page after all the phpinfo output I get:
Warning: Unknown(): open(C:\temp\sess_e1b4066226c4002e50b47dab02acb002, O_RDWR) failed: No space left on device (28 ) 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:\temp) in Unknown on line 0
My php.ini file contains:
session.save_path = "C:\temp"
I have verified that all users on this system have read and write access to this folder, and there is approx 55gb of free disk space.

My system specs are:
PHP 4.3.10
IIS 6.0
Windows Server 2003 for Small Business

This happens with the scripts I write as well as the phpadmin test script. My other system, runninga Apache, has no problems running the same script, so I know its likely a problem with IIS or the Windows server.

If anyone has had a similar problem or has any suggestions, it would be greatly appreciated.

Thanks[/quote]
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Most likely the Window's Server: it's not built to handle PHP. I'm not absolutely sure, but it may have to do with a discrepancy between Apache and Window's Server when they handle Sessions.

If you want to develop PHP, you should use Apache. I think ASP is for Window's Server.

EDIT There's not much on the web about this quirk, but I got this from somewhere:
http://www.chipmunk-scripts.com/board/index.php?forumID=10&ID=2125 wrote:I'm going to guess your on a windows server, in which case this script would probably generate that kind of error, there something about the settings of many windows servers temporary files not want to work.
This link might help too: http://us3.php.net/manual/en/install.windows.php

Although the most hassle-free way is just to use Apache, :wink:
rupract
Forum Newbie
Posts: 3
Joined: Tue Mar 15, 2005 7:50 pm
Location: Canada

Post by rupract »

Unfortunately switching to Apache is not an option. I personally do all of my development on Apache, but this is a subcontract job and the client is already using Windows Server 2003 and IIS. The application is going to run on their intranet.

The strange thing is that this was working on the test server. But the guy who I'm doing the subcontracting for made some changes to the server (that he can't remember all of) and it stopped working. Earlier today he removed his anti-virus program and the sessions worked until he closed his browser and tried to restart it. So it seems like a really strange problem to me.

Thanks for the input.
rupract
Forum Newbie
Posts: 3
Joined: Tue Mar 15, 2005 7:50 pm
Location: Canada

Post by rupract »

I'm still hoping someone out there has run into this problem. Has anyone out there successfully set up PHP running on IIS 6.0 and Windows Server 2003 for Small Business?

Any help would be really appreciated.

PS, in the future I will not take on a contract that is running IIS, OMG what a hassle.
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

hi,

I assumed your temp folder is still in C:\temp

Could you please try opening up the Windows Explorer and browse to C:\ drive?
- Right click on the folder called "temp", select "properties", under the "Weg sharing" tab, make sure the selection for "Share this folder" is selected.
- then select button "Add..."
-then select "read" and "Write" permission for this folders.

Last thing, make sure the IUSR_[machinename] has permission to read/write to the php session data directory (the temp folder). To find out if the IUSR_[machinename] has the permssion....in windows explorer, right click on the temp folder, click Properties --> security, if you don't see the IUSR_[machinename] there, go to "add" --> "find now" --> then locate the IUSR_[machinename], and add it .

I have IIS version 5.1 which is a bit different from your version. The instructions to add permission for my version; I would go to start -> control panel ->Administrative tools --> and do those things there.

I have nver run PHP with IIS before, but for your version, that was what my friend told me, so hope it works for you.

Good luck!
Post Reply