473,788 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

location??

wj
Hi all,

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

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

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

<?php

session_start() ;

header("Locatio n: 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 2466
-----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****@astrofot o.org Brooklyn, NY 11220

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

iQCVAwUBPwHl8uo W38lmvDvNAQE2pw P8DSb+LuJgQJiWS qssdQakDrCxlKtH 6Ef8
Fr3ARlnM3rNmzBv 3lYYTpLB9EKhDYI FtPgGAjcrArCPoo q5rt2qQGlM4UnyB E7IC
xg0EXn6eUXCtnal ypNQXdRAcLZVXh8 ZrGIVTFLkL3agNt rBLXR5eiDId1BBF PhCx
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
2791
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 is the month 01 to 12, with a leading 0 if required DD is the day 01 to 31, with a leading 0 if required
5
7545
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 IE. I link within a page and display individual divisions of that page, manipulating their visibility and display styles with an onClick function. As long as I explicitly click a link to progress, it works with browsers I've tried.
3
50431
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
8245
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) { document.location.href = document.location.href.substring(0, document.location.href.indexOf('#')) + '?' + newUrl; } else { document.location.href = document.location.href + '?' + newUrl; }
3
23009
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 alert messages) but nothing happens. FF acts like expected but i cant get it work in IE. What can be the problem here? here the code i use:
4
2976
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. *************************************************** <configuration> <system.web> <authorization> <deny users="?" /> </authorization> </system.web> <location path="default.aspx,addLogon.aspx,LogonForgot.aspx">
6
2888
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 -> /this/that/the.other.thing.html, then redirect.cgi?xyz results in the page /this/that... being sent. redirect.cgi is usually in another directory than the page it is to supply. This works fine as far as it goes. A problem arises when the actual...
1
9457
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 when the form is in its minimal size. However, when the form is maximized using the appropriate button the code that is supposed to set the location is ignored. When the form is switched back to the standard dimensions through the restore...
6
1586
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 Location and Size into a single text field, on I need 4 Field X,Y,Height and Width? If yes, how can convert Location and Size into String and then Back to a Location and Size to apply back to the form?
1
2905
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 further to the right of the form than the form's default width - which may take up the entire screen for some users). The form contains panels which will contain either textboxes or datagridviews. The button is located on the menustrip towards...
0
9656
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
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10370
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...
0
10177
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10113
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,...
1
7519
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
6750
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();...
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2896
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.