473,387 Members | 1,791 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,387 software developers and data experts.

location??

wj
Hi all,

I want to use 'location' to redirect to link to another page:

<?php
header("Location: http://localhost");

?>
works fine, but when i introduce start_session, all i get is a blank page:

<?php

session_start();

header("Location: http://localhost");

?>

Can anyone give me a hint, do I need to change my php.ini-file or something
like that?? I use apache and php 4.3.1, local installed.

Thanx!!

WJ

Jul 16 '05 #1
1 2451
-----BEGIN PGP SIGNED MESSAGE-----
> "wj" == wj <ww@nl.nl> writes:


wj> Can anyone give me a hint, do I need to change my php.ini-file
wj> or something like that?? I use apache and php 4.3.1, local
wj> installed.

Your first hint is to look at the HTML source of the blank page.
session_start() is most likely spitting out _something_.

Your second hint is to avoid session_start() until as late as you
possibly can. If you still have to call it before you know whether or
not you have to redirect, then...

Your third hint is to look at the ob_* functions (output buffering).
In particular, you may find ob_start() and ob_end_clean() of use in
throwing away output...

regards,

roland
- --
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
ro****@rlenter.com 6818 Madeline Court
ro****@astrofoto.org Brooklyn, NY 11220

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv
Comment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface

iQCVAwUBPwHl8uoW38lmvDvNAQE2pwP8DSb+LuJgQJiWSqssdQ akDrCxlKtH6Ef8
Fr3ARlnM3rNmzBv3lYYTpLB9EKhDYIFtPgGAjcrArCPooq5rt2 qQGlM4UnyBE7IC
xg0EXn6eUXCtnalypNQXdRAcLZVXh8ZrGIVTFLkL3agNtrBLXR 5eiDId1BBFPhCx
9l5kljiA+E0=
=AB4A
-----END PGP SIGNATURE-----
Jul 16 '05 #2

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

Similar topics

26
by: Nige | last post by:
I'm a complete novice to JS. I want to insert the date and time into a document in the format: WB-MMDDHHmm Where: WB- is a fixed string prefix (the whole string is a reference number) MM...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
3
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
3
by: Christian Hubinger | last post by:
Hi! I'm working on a page that uses javascript very much. My problem is now that i cannot redirect to another page in IE with window.location =<URL>; This command gets executed (proofed with...
4
by: tshad | last post by:
Can I set up multiple pages in the same Location tag? I thought I saw somewhere that I could. I tried the following, but it doesn't work. ***************************************************...
6
by: G*rd*n | last post by:
I have been using the HTTP "Location" reponse header to direct a symbolic request to a CGI program to an actual URL/file. For example, let us suppose the CGI program's table indicates xyz ->...
1
by: Marc the Demi-Programmer | last post by:
I am overriding WncProc to make sure my form's location stays within specified parameters. Basically, it has to stay at the top of the screen and not be off to either of the sides. All that works...
6
by: Marcolino | last post by:
Hi all, I have a simple problem but I don't know which is the best way to solve it. I need to savo into a table into access DB the location and the size of a form. Is there a way to save...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
I placed a button on a form menustrip for the purpose of causing the horizontal scrollbar of my form to appear so that I can access controls outside of the form's current view (the controls are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.