473,804 Members | 3,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3194
joe
session_start() must be called before any data is sent to the
browser.....jus t 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*******@gmai l.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.u k :: 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
21710
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 such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\session.php on line 3
1
2809
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 some reaqson when I add the line "$plaintext = mcrypt_decrypt(..." etc Apache crashes. I'm using: - PHP 4.3.2
0
1340
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 which works on Windows without any problems. As soon as I log in to the application and it tries to create a session I get an error message which says:
3
2212
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 client. MySQL works perfectly. I have created and queried databases with no problem. Apachie 2 appears to work with no problem. I can call up web pages in the expected maner.
19
7929
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 limiter - headers already sent in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/CommandStartSession.php on line 14
5
1729
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 you need to run it more than once, and I get those as well, but none are working for me. Here's a mockup of what I have: index.php info.php lib/common.php
3
1853
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 on line 104 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\Care2x\installer\Installer.php:104) in C:\Program Files\Apache...
3
6843
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 (allocated 786432) (tried to allocate 32768 bytes) SERVER CHARACTERISTICS: * Windows 2008 Enterprise Server * PHP 5.2.6 * Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e
10
6982
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 of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10308
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10073
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.