473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

session_start causes Apache to crash (Win32, PHP 5.1.1)

Hello,

Does anyone have a problem with Apache2 crashing after executing a PHP
script with session_start()? I notice if session_start() is placed
anywhere except at the start of the file, APache will crash. Can anyone
explain to me why? I don't want session_start to be at the start of the
file because I need to override some session methods. So session_start
has to happen after the declaration of custom session methods.

Can anyone please help? Thanks.

Vincent

Dec 20 '05 #1
4 3160
joe
session_start() must be called before any data is sent to the
browser.....just like header() or setcookie().

Dec 20 '05 #2
joe
if you're using cookie based sessions, session_start() must be called
before any data is sent to the browser....but in testing on a similar
setup (win2003/php 5.0.5/apache 2.0.55) I could not crash apache by
breaking that rule. your apache error logs might provide some help...

Dec 20 '05 #3
On 20 Dec 2005 12:20:59 -0800, "Vincent" <vi*******@gmail.com> wrote:
Does anyone have a problem with Apache2 crashing after executing a PHP
script with session_start()? I notice if session_start() is placed
anywhere except at the start of the file, APache will crash.


Is it Apache or PHP crashing?

What are the symptoms - error messages?

Do you mean a real full-blown crash, such as a segmentation fault and core
dump, or is it just an error?

What platform are you on?

There are instructions on http://bugs.php.net for getting a stack trace, which
you'd need to get to the bottom of a core dump:

http://bugs.php.net/bugs-generating-backtrace.php
http://bugs.php.net/bugs-generating-backtrace-win32.php

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Dec 20 '05 #4
Thanks for the replies.

The thing is Apache error log has nothing that indicates the crash.
It's Apache that crashs (with the standard Window error message that
Apache has terminated). I am on Windows XP.

I want to override my session methods to use my own database for
session handling instead of the default cookie handling. But after
declaration of those methods, and then run session_start, Apache
crashes.

Thanks for the suggestion on getting a stack trace. I will be doing
that shortly.

Vincent

Dec 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sky2070 | last post by:
session_start(); $_SESSION++; print 'You have visited here '.$_SESSION.' times.'; returned: Warning: session_start() : open(/tmp\sess_c8bf2007256f6e15a938c0254adb21e4, O_RDWR) failed: No...
1
by: M Wells | last post by:
Hi All, I'm trying to implement encryption to protect data in my database. I started by experimenting with the following code, just to make sure I know how to encrypt and then decrypt but for...
0
by: Andoni | last post by:
Hello, I would like to know if anyone has come across a problem when getting programs to work on PHP. I am running a free webmail client called Squirrel that I downloaded from the web and...
3
by: Trogdor | last post by:
I set up a server on an AMD 650 machine running gentoo linux. I installed Apachie 2, MySQL 4.1 and PHP 4.3.11 I use another computer on my local net (192.168.0.x) to access the server as a...
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
5
by: paladin.rithe | last post by:
I'm running into an issue with session_start(). I see that you can't run it twice, otherwise it causes an issue. That's fine, and makes sense. I also saw some ideas on how to get around this if...
3
by: sudhakarsh | last post by:
Warning: session_start(): open(/tmp\sess_bd6e0da1ed76c6b86f102376e2efb508, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.php...
3
by: solinem | last post by:
Hi: I am trying to find a solution for an error that consequentially leads to Apache Server crash. Following is the message, as seen in the error.log file: PHP Fatal error: Out of memory...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.