Re: [PHP] redirecting output for a spawned child process..

2009-02-23 Thread Alpár Török
You can use a PHP workarround. Install a custom ob_handler, that has a static file descriptor, and writes all output to the file. In order to also see everything, you need to also activate implicit flush. i know that there would be lots of elegant ways to do this on linux in C, but AFAIK php

Re: [PHP] redirecting output for a spawned child process..

2009-02-21 Thread Per Jessen
bruce wrote: hi... got a situation where i have a parent app that spawns children. trying to figure out how to get the output of the spawned/forked children to be written to an external file... Normally I would use freopen() on stdout and stderr, but that's not available in PHP :-( can't

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Richard Heyes
... Really, for URLs that don't exist you should be showing a 404, This way the user doesn't falsely believe that the URL is a valid one and keep using it. By using the ErrorDocument directive like Per suggested, you can customise it to be distinct helpful, like this:

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Per Jessen
Richard Heyes wrote: ... Really, for URLs that don't exist you should be showing a 404, This way the user doesn't falsely believe that the URL is a valid one and keep using it. By using the ErrorDocument directive like Per suggested, you can customise it to be distinct helpful Apache also

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Morris
What if the file exists, but it's kinda file to update database, like // get request $_REQUEST // execute sql statement to update database // redirect to the other page, showing results? in this case 404 approach does not mean to do correctly, so what else is suggested? 2009/1/22 Per Jessen

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Richard Heyes
What if the file exists, but it's kinda file to update database, like GET requests shouldn't really modify data. -- Richard Heyes HTML5 Graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.org (Updated January 17th) -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Per Jessen
Morris wrote: What if the file exists, but it's kinda file to update database, like // get request $_REQUEST // execute sql statement to update database // redirect to the other page, showing results? in this case 404 approach does not mean to do correctly, so what else is suggested? I

Re: [PHP] Redirecting from unreachable page on website

2009-01-22 Thread Jochem Maas
Richard Heyes schreef: ... Really, for URLs that don't exist you should be showing a 404, This way the user doesn't falsely believe that the URL is a valid one and keep using it. if the invalid URL (which outputs a 404 header) then automatically redirects to another URL then I think it's

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Kyle Terry
On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g www.domain.com/nonexistingpage.php) to main page www.domain.com on website? thnx, Dusan -- made by Dusan --

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Kyle Terry
2009/1/21 Kyle Terry k...@kyleterry.com: On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g www.domain.com/nonexistingpage.php) to main page www.domain.com on website?

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Dušan Novaković
apache :-) 2009/1/21 Kyle Terry k...@kyleterry.com: 2009/1/21 Kyle Terry k...@kyleterry.com: On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Kyle Terry
On Wed, Jan 21, 2009 at 10:40 AM, Dušan Novaković ndu...@gmail.com wrote: apache :-) 2009/1/21 Kyle Terry k...@kyleterry.com: 2009/1/21 Kyle Terry k...@kyleterry.com: On Wed, Jan 21, 2009 at 10:12 AM, Dušan Novaković ndu...@gmail.com wrote: Hi, Is there some elegant solution how to

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Per Jessen
Dušan Novaković wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g www.domain.com/nonexistingpage.php) to main page www.domain.com on website? See Apache ErrorDocument directive. /Per Jessen, Zürich -- PHP General Mailing List

Re: [PHP] Redirecting from unreachable page on website

2009-01-21 Thread Jochem Maas
Per Jessen schreef: Dušan Novaković wrote: Hi, Is there some elegant solution how to redirect if someone try to open some non existing page (e.g www.domain.com/nonexistingpage.php) to main page www.domain.com on website? See Apache ErrorDocument directive. ai, ErrorDocument 404

Re: [PHP] Redirecting STDERR to a file?

2008-02-04 Thread Daniel Brown
On Feb 3, 2008 10:08 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, February 1, 2008 10:58 pm, js wrote: Hi, I was trying to write a script in PHP that takes a program name as an argument and invoke it as a daemon. PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask,

Re: [PHP] Redirecting STDERR to a file?

2008-02-03 Thread Richard Lynch
On Fri, February 1, 2008 10:58 pm, js wrote: Hi, I was trying to write a script in PHP that takes a program name as an argument and invoke it as a daemon. PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask, so it was easy. However, I couldn't find a way to redirect STDERR a

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread Per Jessen
js wrote: I was trying to write a script in PHP that takes a program name as an argument and invoke it as a daemon. PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask, so it was easy. However, I couldn't find a way to redirect STDERR a file. I like to have the daemon write its

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread js
nohup would work in some ways, but that's not a real daemon because the process will have tty, in a session and has a process group. I like to have a real daemon. On Feb 2, 2008 5:25 PM, Per Jessen [EMAIL PROTECTED] wrote: js wrote: I was trying to write a script in PHP that takes a program

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread Per Jessen
js wrote: nohup would work in some ways, but that's not a real daemon because the process will have tty, in a session and has a process group. I like to have a real daemon. Well, it depends on what you're after. Are you solving a problem or are you doing an exercise because you can? If

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread js
Hi Per, nohup would work in some ways, but that's not a real daemon because the process will have tty, in a session and has a process group. I like to have a real daemon. Well, it depends on what you're after. Are you solving a problem or are you doing an exercise because you can? Not

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread Per Jessen
js wrote: C would be the last resort. I suppose it would be easily done in Perl, but most of my colleagues prefer PHP. I love to make taking over the code easy, so PHP is more preferable to me. That makes perfect sense, but sometimes PHP is not the best/right answer. What I think you need

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread js
C would be the last resort. I suppose it would be easily done in Perl, but most of my colleagues prefer PHP. I love to make taking over the code easy, so PHP is more preferable to me. That makes perfect sense, but sometimes PHP is not the best/right answer. What I think you need to do

Re: [PHP] Redirecting STDERR to a file?

2008-02-02 Thread Richard Heyes
C would be the last resort. I suppose it would be easily done in Perl, but most of my colleagues prefer PHP. I love to make taking over the code easy, so PHP is more preferable to me. That makes perfect sense, but sometimes PHP is not the best/right answer. What I think you need to do is:

Re: [PHP] Redirecting to a parent page

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 11:12 pm, Yamil Ortega wrote: Lets say that I have the next structure on my web directory /file1.php /procces/file2.php /file3.php So, when I see the file1.php on the browser I see the page in this route http://localhost/apache2/file1.php I have a button that

Re: [PHP] Redirecting (after output has started)

2007-04-25 Thread Philip Thompson
On Apr 25, 2007, at 8:25 AM, Don Don wrote: Hi all, whats the best way to perform a redirect after out put has started ? using header:location will not work unless theres been no output. I usuall use the method below, however am concerned for browsers that do not support

Re: [PHP] Redirecting (after output has started)

2007-04-25 Thread tedd
At 6:25 AM -0700 4/25/07, Don Don wrote: Hi all, whats the best way to perform a redirect after out put has started ? using header:location will not work unless theres been no output. I usuall use the method below, however am concerned for browsers that do not support javascript.

Re: [PHP] Redirecting (after output has started)

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 8:25 am, Don Don wrote: Hi all, whats the best way to perform a redirect after out put has started ? using header:location will not work unless theres been no output. The BEST way is to re-structure your code logically, with the heavy lifting calculations done

Re: [PHP] Redirecting in a PHP script

2007-03-15 Thread clive
Larry Bradley wrote: I need to goto different PHP pages in my web site depending on what happens within some PHP code. For example, if the user is not logged in when he goes to a page, I want to send him to a LOGIN page. I've have everything working fine, using the following Javascript

Re: [PHP] Redirecting in a PHP script

2007-03-15 Thread tedd
At 11:28 PM -0500 3/14/07, Richard Lynch wrote: On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote: Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast? I think we

Re: [PHP] Redirecting in a PHP script

2007-03-15 Thread Satyam
- Original Message - From: tedd [EMAIL PROTECTED] At 11:28 PM -0500 3/14/07, Richard Lynch wrote: On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote: Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Tijnema !
On 3/14/07, Chris Shiflett [EMAIL PROTECTED] wrote: Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast? I think we both remember browsing before that feature was invented.

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Ben Ramsey
On 3/13/07 4:50 PM, Tijnema ! wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast?? Browsers have buttons in them? Next thing, you'll be telling me I can see images and color in my

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 3:41 pm, Chris Shiflett wrote: Robert Cummings wrote: I've found clicking really fast can get you back :) I, too, have successfully used this technique. :-) +1 Sometimes back button followed at just the right time by top so I get the HTML, but no JS runs. -- Some

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 3:50 pm, Tijnema ! wrote: On 3/13/07, Chris Shiflett [EMAIL PROTECTED] wrote: Robert Cummings wrote: I've found clicking really fast can get you back :) I, too, have successfully used this technique. :-) Chris Did you guys ever noted that little arrow down just

Re: [PHP] Redirecting in a PHP script

2007-03-14 Thread Richard Lynch
On Tue, March 13, 2007 11:54 pm, Chris Shiflett wrote: Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast? I think we both remember browsing before that feature was invented.

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Eric Butera
On 3/12/07, Larry Bradley [EMAIL PROTECTED] wrote: I need to goto different PHP pages in my web site depending on what happens within some PHP code. For example, if the user is not logged in when he goes to a page, I want to send him to a LOGIN page. I've have everything working fine, using

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Dave Goodchild
If you do want to use the header function after html has been output, you can always look at using output buffering (ob_start()).

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Robert Cummings
On Tue, 2007-03-13 at 21:50 +0100, Tijnema ! wrote: On 3/13/07, Chris Shiflett [EMAIL PROTECTED] wrote: Robert Cummings wrote: I've found clicking really fast can get you back :) I, too, have successfully used this technique. :-) Chris Did you guys ever noted that little arrow down

Re: [PHP] Redirecting in a PHP script

2007-03-13 Thread Chris Shiflett
Tijnema wrote: Did you guys ever noted that little arrow down just right of the back button, where you can go back 2 steps at once, so you don't have to click very fast? I think we both remember browsing before that feature was invented. Chris -- Chris Shiflett http://shiflett.org/ -- PHP

Re: [PHP] Redirecting in a PHP script

2007-03-12 Thread Tijnema !
On 3/12/07, Larry Bradley [EMAIL PROTECTED] wrote: I need to goto different PHP pages in my web site depending on what happens within some PHP code. For example, if the user is not logged in when he goes to a page, I want to send him to a LOGIN page. I've have everything working fine, using

Re: [PHP] Redirecting in a PHP script

2007-03-12 Thread Robert Cummings
On Mon, 2007-03-12 at 22:43 +0100, Satyam wrote: The only way to actually go back in those is to open the dropdown list for the back button and skip over one item. I've found clicking really fast can get you back :) That does not happen when using the header() PHP function. That is my

Re: [PHP] redirecting some values from one page to other in php

2005-07-22 Thread Richard Lynch
On Wed, July 20, 2005 1:04 pm, Matt Darby said: babu wrote: It will become a big mess up for me if i combine all the files as they are large files. Scenario #1: Use include/require to suck in the files, when needed. Scenario #2: Use header(Location: ) to re-direct the browser to another file.

Re: [PHP] redirecting some values from one page to other in php

2005-07-20 Thread Mikey
babu wrote: I am using header method for redirecting to another php file.I also want to pass some variables to the redirected file. for example: file1.html where i have a dropdown menu. the user selects the options... this form has a action to file2.php file2.php--- i get the values of

Re: [PHP] redirecting some values from one page to other in php

2005-07-20 Thread babu
It will become a big mess up for me if i combine all the files as they are large files. Matt Darby [EMAIL PROTECTED] wrote: babu wrote: I am using header method for redirecting to another php file.I also want to pass some variables to the redirected file. for example: file1.html where i

Re: [PHP] redirecting some values from one page to other in php

2005-07-20 Thread Matt Darby
babu wrote: It will become a big mess up for me if i combine all the files as they are large files. Matt Darby [EMAIL PROTECTED] wrote: babu wrote: I am using header method for redirecting to another php file.I also want to pass some variables to the redirected file. for example:

Re: [PHP] redirecting some values from one page to other in php

2005-07-20 Thread babu
does session.auto_start should be set to 1 for sessions to work. Mikey [EMAIL PROTECTED] wrote:babu wrote: I am using header method for redirecting to another php file.I also want to pass some variables to the redirected file. for example: file1.html where i have a dropdown menu. the user

Re: [PHP] redirecting some values from one page to other in php

2005-07-20 Thread Matt Darby
babu wrote: does session.auto_start should be set to 1 for sessions to work. Mikey [EMAIL PROTECTED] wrote:babu wrote: I am using header method for redirecting to another php file.I also want to pass some variables to the redirected file. for example: file1.html where i have a

Re: [PHP] redirecting to a success page

2004-11-22 Thread Randy Rinehart
You can send a header to redirect like below. ?php header(location: successpage.php); ? Or you can print out some javascript location.href='successpage.php'; -randy rinehart - Original Message - From: Judson Vaughn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 22,

RE: [PHP] redirecting to a success page

2004-11-22 Thread Jay Blanchard
[snip] I have a create_login.php page, which works (it inserts data into the database), but I need for the script once executed to redirect to a success.php page. [/snip] http://www.php.net/header header(Location: success.php); exit(); -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] redirecting to a success page

2004-11-22 Thread Robby Russell
On Mon, 2004-11-22 at 09:13 -0500, Judson Vaughn wrote: Group, I have a create_login.php page, which works (it inserts data into the database), but I need for the script once executed to redirect to a success.php page. It doesn't do this and I can't figure out how to do it. I've

Re: [PHP] redirecting to a success page

2004-11-22 Thread Richard Davey
Hello Judson, Monday, November 22, 2004, 2:13:13 PM, you wrote: JV The original script, created by Dreamweaver, gives an error that says JV header has already been sent. I tried different options to no avail. I JV realize this script is now seriously hosed but thought I would include JV it

Re: [PHP] redirecting to another page

2004-09-25 Thread Jason Davidson
eh hem,,, that is a great question to consult the manual... but as for a hint, search for header() Jason AMC [EMAIL PROTECTED] wrote: Hi, What code do I use to redirect a user to a different page in php? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] redirecting to another page

2004-09-25 Thread Chris Shiflett
--- AMC [EMAIL PROTECTED] wrote: What code do I use to redirect a user to a different page in php? There are several methods, but my favorite is to use a Location header which also changes the response status code. This method is transparent to the history mechanism, so users can still click the

Re: [PHP] redirecting to another frame using php header function

2004-08-11 Thread John Nichel
bruce wrote: hi... can anyone point me to a way to do a page redirect using the php 'Header' function to another frame. I have a page in one frame, when the user does a submit, i want to have the app do a redirect using the 'Header' function, with the subsequent page being displayed in another

Re: [PHP] redirecting to another frame using php header function

2004-08-11 Thread John Holmes
bruce wrote: can anyone point me to a way to do a page redirect using the php 'Header' function to another frame. No. Use Javascript. -- John Holmes php|architect - The magazine for PHP professionals - http://www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] redirecting to another frame using php header function

2004-08-11 Thread Matthew Sims
hi... can anyone point me to a way to do a page redirect using the php 'Header' function to another frame. I have a page in one frame, when the user does a submit, i want to have the app do a redirect using the 'Header' function, with the subsequent page being displayed in another frame.

Re: [PHP] redirecting

2004-02-17 Thread - Edwin -
On Wed, 18 Feb 2004 17:19:03 +1100 ajay [EMAIL PROTECTED] wrote: snip i want the user to have say 5s to read that page and then be redirected to another page. /snip 'Not sure if it's only me but I think I've seen this recently ;) http://marc.theaimsgroup.com/?t=10769831404r=1w=2

Re: [PHP] redirecting

2004-02-17 Thread John Nichel
ajay wrote: hi! after having trawled through many google articles, i've been told that the best way to redirect a person is using header(Location:url); the problem is, i have form that is posted to another php script. This script then processes the form and then writes up a html page and includes

Re: [PHP] redirecting

2004-02-17 Thread Ian Firla
Stick something like this in your html head/head: meta HTTP-EQUIV=REFRESH CONTENT=5; URL=blah.php Location won't work because you've already sent output to the browser. Ian On Wed, 2004-02-18 at 07:19, ajay wrote: hi! after having trawled through many google articles, i've been told that

Re: [PHP] Redirecting and get length problems

2004-01-07 Thread Chris Shiflett
--- Chris W [EMAIL PROTECTED] wrote: 3 of the fields in this form are to store various URL's so if they are long URL's it is easy to see how I could go over the limit of the max url length. So my question is what is the best alternative? Is there a way to redirect and use a post instead of a

Re: [PHP] Redirecting and get length problems

2004-01-07 Thread John W. Holmes
Chris W wrote: In this application I am working on, if there is a problem with the data, I use a redirect to go back to the form and send the data with an error message in a get. That way the user doesn't need to retype everything. Most errors can be caught with java script before they post

Re: [PHP] redirecting to a url..

2003-07-20 Thread Louie Miranda
yes, got it working. thanks a lot.. i did use header -- Thank you, Louie Miranda ([EMAIL PROTECTED]) - Original Message - From: Chris Shiflett [EMAIL PROTECTED] To: Louie Miranda [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:45 PM Subject: Re: [PHP] redirecting

RE: [PHP] redirecting to a url..

2003-07-20 Thread Ow Mun Heng
, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 11:46 PM To: Louie Miranda; [EMAIL PROTECTED] Subject: Re: [PHP] redirecting to a url.. --- Louie Miranda [EMAIL PROTECTED

Re: [PHP] redirecting to a url..

2003-07-18 Thread Louie Miranda
My solution.. echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\; Or you may have other more advance alternatives? -- Thank you, Louie Miranda ([EMAIL PROTECTED]) - Original Message - From: Louie Miranda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 18, 2003

Re: [PHP] redirecting to a url..

2003-07-18 Thread Curt Zirzow
Louie Miranda [EMAIL PROTECTED] wrote: I have this form with 2 values under 1 name ColTemplate. I was hoping if i can redirect it to another url? on the ?? if templateone or templatetwo. header('Location: http://domain/file'); Curt -- -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] redirecting to a url..

2003-07-18 Thread Louie Miranda
thanks, this is much better. -- Thank you, Louie Miranda ([EMAIL PROTECTED]) - Original Message - From: Curt Zirzow [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 18, 2003 2:29 PM Subject: Re: [PHP] redirecting to a url.. Louie Miranda [EMAIL PROTECTED] wrote: I have

Re: [PHP] redirecting to a url..

2003-07-18 Thread Chris Shiflett
--- Louie Miranda [EMAIL PROTECTED] wrote: echo meta http-equiv=\REFRESH\ CONTENT=\0; URL=us/index.php\; Or you may have other more advance alternatives? You can use a protocol redirect rather than relying on HTML: header('Location: http://yoursite.org/us/index.php'); Chris = Become a

RE: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Ralph
?php if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){ header(Location: http://www.mydomain.com/moz4_page.php;) } elseif(strstr = ($HTTP_USER_AGENT, MSIE)){ header(Location: http://www.mydomain.com/ie_page.php;) } etc... ? HTML HEAD TITLEMy Page/TITLE /HEAD etc.. -Original

Re: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Michael
If I use this on index.html, it does nothing. If I use it on index.php I get: Parse error: parse error, unexpected '=' in /path/to/file_named/main.php on line 3 What am I doing wrong On Tuesday 17 June 2003 02:11 pm, Ralph wrote: ?php if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){

RE: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Jay Blanchard
[snip] If I use this on index.html, it does nothing. If I use it on index.php I get: Parse error: parse error, unexpected '=' in /path/to/file_named/main.php on line 3 What am I doing wrong On Tuesday 17 June 2003 02:11 pm, Ralph wrote: ?php if(strstr = ($HTTP_USER_AGENT, Mozilla/4)){

Re: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Michael
With that I get: Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php on line 4 Michael On Tuesday 17 June 2003 02:50 pm, Jay Blanchard wrote: [snip] If I use this on index.html, it does nothing. If I use it on index.php I get: Parse error: parse error,

RE: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Ralph
] Sent: Tuesday, June 17, 2003 1:12 PM To: Jay Blanchard; Ralph; [EMAIL PROTECTED] Subject: Re: [PHP] Redirecting to index.php from index.html With that I get: Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php on line 4 Michael On Tuesday 17 June 2003 02:50 pm, Jay

Re: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Tue, 17 Jun 2003 at 22:27, lines prefixed by '' were originally written by you. Oops. Typos. Try this: if(strstr($HTTP_USER_AGENT, Mozilla/4)){ header(Location: http://www.mydomain.com/moz4_page.php;); elseif(strstr($HTTP_USER_AGENT,

Re: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Michael
Parse error: parse error, unexpected T_STRING in /path/to/file_named/main.php on line 4 Here is my actual code so you can look at it and see what I am doing something wrong. I know I must be, since I don't see how php could become so popular for site development when it appears to be so

RE: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread Ralph
Well it does appear to be working because according to this error, the problem is with main.php on line 4. -Original Message- From: Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 2:27 PM To: Ralph; 'Jay Blanchard'; [EMAIL PROTECTED] Subject: Re: [PHP] Redirecting

Re: [PHP] Redirecting to index.php from index.html

2003-06-17 Thread David Otton
On Tue, 17 Jun 2003 12:41:34 -0600, you wrote: I'm a relative newbie to PHP coming from the Zope/Python/DTML world. Does anyone know of a good way, short of a javascript, to redirect from index.html to index.php. Also, can I use PHP to test for browsers, then redirect them to the

Re: [PHP] Redirecting STDOUT to a file pointer

2003-02-28 Thread Jeff Bearer
Argh, I was thinking about the problem backwards, redirect the fp to stdout is the way to do it. if(!$argv[1]) $argv[1] = php://stdout; $fp = fopen($argv[1], w); fputs($fp,blah\n); fclose($fp); On Fri, 2003-02-28 at 15:11, Jeff Bearer wrote: I'm working on a shell script in php. The script has

Re: [PHP] Redirecting to PHP

2003-02-05 Thread John Nichel
You can do it with JavaScript or a Meta refresh, but why? If both the pages are the same, why even use the HTML one? Alberto Brea wrote: Dear list, My home page is index.html, that doesn't run PHP. I also have index.php which shows the same content with PHP. Can I do to automatically redirect a

Re: [PHP] Redirecting to PHP

2003-02-05 Thread Jonathan Pitcher
There are three ways to do this that I can think of. 1.) The first is the most effective but also requires access to the apache config file: Find the line that reads: DirectoryIndex index.html Change it to read DirectoryIndex index.html index.php As always when working with a config file.

Re: [PHP] Redirecting to PHP

2003-02-05 Thread John Nichel
Put a .htaccess file in your document root for your website with this line DirectoryIndex index.php Alberto Brea wrote: My ISP tells me that the home page must be index.html. However, I cannot make PHP scripts run on this page, so I made an index.php page with the same content, and thought

Re: [PHP] Redirecting errors

2003-02-05 Thread Leif K-Brooks
Because apache has the same access when a user requests it as when a page requests it. Try putting it outside of the web root... Brad Esclavon wrote: I have written a script that validates a username/pwd input and if usr/pwd is correct, includes the protected page, or if usr/pwd is wrong,

Re: [PHP] Redirecting errors

2003-02-05 Thread Chris Shiflett
--- Brad Esclavon [EMAIL PROTECTED] wrote: the secured page is viewable from the internet if i explicitly enter the url. I have set the secured page's permissions to 700 and the input page to 755. even though my permissions disallow outside access, why can you get to the secured page? Your

Re: [PHP] Redirecting

2003-01-16 Thread Andrew Brampton
php.net/header check out the examples Andrew - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: PHP general list [EMAIL PROTECTED] Sent: Thursday, January 16, 2003 4:21 PM Subject: [PHP] Redirecting Hello friends. I want ot redirect users to another page after successful

Re: [PHP] Redirecting

2003-01-16 Thread Chris Shiflett
--- Denis L. Menezes [EMAIL PROTECTED] wrote: I want ot redirect users to another page after successful login. Can someone please help me with the PHP code for redirecting? You have many options: 1. After a successful login, display the proper page to the user instead of redirecting. This is

Re: [PHP] Redirecting - here is the code

2003-01-16 Thread Jason Wong
On Friday 17 January 2003 01:07, Denis L. Menezes wrote: I tried. But I get an error as follows : Warning: Cannot add header information - headers already sent by (output Try searching the archives on the above error. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source

Re: [PHP] Redirecting - here is the code

2003-01-16 Thread Denis L. Menezes
:10 AM Subject: Re: [PHP] Redirecting - here is the code On Friday 17 January 2003 01:07, Denis L. Menezes wrote: I tried. But I get an error as follows : Warning: Cannot add header information - headers already sent by (output Try searching the archives on the above error. -- Jason

Re: [PHP] Redirecting - here is the code

2003-01-16 Thread Mike Morton
PROTECTED] Sent: Friday, January 17, 2003 1:10 AM Subject: Re: [PHP] Redirecting - here is the code On Friday 17 January 2003 01:07, Denis L. Menezes wrote: I tried. But I get an error as follows : Warning: Cannot add header information - headers already sent by (output Try searching

Re: [PHP] Redirecting - here is the code

2003-01-16 Thread Joci
Hi! From manual (http://www.php.net/manual/en/function.header.php): Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank linek in a file, or from PHP. You need to start with header()... Example: ?php header('Location:

RE: [PHP] Redirecting - here is the code

2003-01-16 Thread Marios Adamantopoulos
I think your problem is with the meta tag meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 -- header Also I'm not sure but the !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN might cause problems too Try the if statement at the top of the document. One more thing.

Re: [PHP] Redirecting after changing server's IP address!

2002-11-27 Thread Marek Kilimajer
Is the connection still valid after changing the IP? I think this should work: You should run your perl script from within shutdown function, so it is run after the connection is closed and any output is sent to the browser. Send header('Refresh: 5; url=http://NEW_IP/next_page.php'); to redirect

Re: [PHP] Redirecting - header location - sometimes not work

2002-09-18 Thread Marek Kilimajer
Try direct connection to the server to see the response it sends, you may also try to send header(HTTP/1.0 302 Found) and see if that helps. What browsers does it happens to? jana konickova wrote: I have the php script with the command Header(Location: https://$SERVER_NAME$path;); which

Re: [PHP] Redirecting - header location - sometimes not work

2002-09-17 Thread Kevin Stone
It's curious that it should be working some times and not others. This may be overkill but you might try a double redundent redirect where if the Header() function does not do the job then the script falls down into a Javascript which attempts the same thing. ? .. rest of script..

Re: [PHP] redirecting after login

2002-07-23 Thread Tim Thorburn
Once they've been redirected, can they just bookmark the resulting page and never have to log in again? Actually, yes - after a couple hours of playing around with the login and finally getting the Meta tags to work for me, I found that if the person were to simply type in the URL of the

RE: [PHP] redirecting after login

2002-07-23 Thread Peter
] Subject: Re: [PHP] redirecting after login Once they've been redirected, can they just bookmark the resulting page and never have to log in again? Actually, yes - after a couple hours of playing around with the login and finally getting the Meta tags to work for me, I found

RE: [PHP] redirecting after login

2002-07-23 Thread David Freeman
what doesn't work is after they login to Page 1, the redirect sends them to Page 2 and right back to Page 1 because the global session isn't staying registered. Are you putting session_start() at the top of each page where you want to be able to use the session stuff you've set?

RE: [PHP] redirecting after login

2002-07-23 Thread John Holmes
why don't u do something like if (!username) { you can not access this page } else { //page content } ? that's a quick fix but might be all you need to do.. Umm...I hope register_globals is off... www.yourdomain.com/yourpage.php?username=a_bad_user ---John Holmes... -- PHP

Re: [PHP] redirecting after login

2002-07-23 Thread Bas Jobsen
Umm...I hope register_globals is off... And if not. form action=http://www.yourdomain.com/yourpage.php; method=post input type=text name=username input type=submit /form Can be used from every server to login. Op dinsdag 23 juli 2002 12:42, schreef John Holmes: why don't u do something

RE: [PHP] redirecting after login

2002-07-23 Thread Jay Blanchard
[snip] A site I'm working on requires a login screen where various individuals will log into the site and add information for their various departments. Rather than setup a different script for each department, I was hoping to create one script that would either accept or deny a login based on

RE: [PHP] redirecting after login

2002-07-22 Thread Martin Towell
using header() should work if you don't output anything before it. If you can restructure your code so that you can remove any output until after the header(), then that'd be the way to go. You said the meta refresh didn't work - did you get the syntax right? Since I don't use it much, it's one

Re: [PHP] redirecting after login

2002-07-22 Thread Miguel Cruz
On Mon, 22 Jul 2002, Tim Thorburn wrote: A site I'm working on requires a login screen where various individuals will log into the site and add information for their various departments. Rather than setup a different script for each department, I was hoping to create one script that would

  1   2   >