Re: [PHP] What is wrong here?

2012-04-25 Thread ma...@behnke.biz


Karl-Arne Gjersøyen karlar...@gmail.com hat am 25. April 2012 um 06:45
geschrieben:

 Hello again.
 I can't figure out what is wrong here.

 move_uploaded_file() get error message from die() and can't copy/move
 temp_file into directory bilder

 I have try to chmod 0777 bilder/ but it did not help.
 Also I have try to chown www-data.www-data bilder/ since Ubuntu Server
 run apache as www-data user...

 Here is my souce code
 --
 // Temfil lagres midlertidig på serveren som
 // spesifisert i php.ini
 $tmp_fil = $_FILES['filbane']['temp_name'];

tmp_name not temp_name

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is wrong here?

2012-04-25 Thread Stuart Dallas
On 25 Apr 2012, at 09:45, ma...@behnke.biz wrote:

 Karl-Arne Gjersøyen karlar...@gmail.com hat am 25. April 2012 um 06:45
 geschrieben:
 
 Hello again.
 I can't figure out what is wrong here.
 
 move_uploaded_file() get error message from die() and can't copy/move
 temp_file into directory bilder
 
 I have try to chmod 0777 bilder/ but it did not help.
 Also I have try to chown www-data.www-data bilder/ since Ubuntu Server
 run apache as www-data user...
 
 Here is my souce code
 --
 // Temfil lagres midlertidig på serveren som
// spesifisert i php.ini
$tmp_fil = $_FILES['filbane']['temp_name'];
 
 tmp_name not temp_name

This indicates that you're developing with notices switched off. This is a very 
bad idea because it hides simple errors like this. See the manual for details: 
http://php.net/error_reporting.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is wrong here?

2002-11-24 Thread Leif K-Brooks
Are you using a relative url for the redirection?

Cesar Aracena wrote:


Hi all,

I'm making a site which will reside in a remote server and had several
problems... most of them where solved once I saw that register_globals
are OFF, but now I dont know which other settings are affecting my
scripts. I have trouble with header(Location... because the browser is
NOT redirected. If I set an echo statement after I detected that the
username and password using $_POST[], the echo goes OK but if I
comment the echo and un-comment the 

header(Location: http://www.domainname.com;);
exit;

nothing happens... and no, there isn't anything before that... what can
be wrong? Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




 


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What is wrong here?

2002-11-24 Thread Ernest E Vogelsinger
At 03:05 25.11.2002, Cesar Aracena said:
[snip]
I'm making a site which will reside in a remote server and had several
problems... most of them where solved once I saw that register_globals
are OFF, but now I don't know which other settings are affecting my
scripts. I have trouble with header(Location... because the browser is
NOT redirected. If I set an echo statement after I detected that the
username and password using $_POST[], the echo goes OK but if I
comment the echo and un-comment the 

header(Location: http://www.domainname.com;);
exit;

nothing happens... and no, there isn't anything before that... what can
be wrong? Thanks in advance,
[snip] 

What server are you running on? I once noticed redirection problems on IIS
where I had to resort to
header('HTTP/1.0 302 Moved');
header)'Location: blah');

Don't know if this helps in your case.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What is wrong here?

2002-11-24 Thread Kyle Gibson

I'm making a site which will reside in a remote server and had several
problems... most of them where solved once I saw that register_globals
are OFF, but now I don’t know which other settings are affecting my
scripts. I have trouble with header(Location... because the browser is
NOT redirected. If I set an echo statement after I detected that the
username and password using $_POST[], the echo goes OK but if I
comment the echo and un-comment the 

header(Location: http://www.domainname.com;);
exit;

nothing happens... and no, there isn't anything before that... what can
be wrong? Thanks in advance,

The headers for the page might have already been sent. If there is a 
space at the top of your PHP file like below, any type of header change 
wont work:

---top of file

?

header(Location: ...);
exit;

?

--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is wrong here?

2002-11-24 Thread Chris Shiflett
--- Cesar Aracena [EMAIL PROTECTED] wrote:

 I have trouble with header(Location... because the
 browser is NOT redirected. If I set an echo statement
 after I detected that the username and password using
 $_POST[], the echo goes OK but if I comment the echo
 and un-comment the 
 
 header(Location: http://www.domainname.com;);
 exit;
 
 nothing happens...

It is a good idea to always use a proper URL in conjunction with the
Location header, because this is required by the HTTP specification.
So, change your code to this:

header(Location: http://www.domainname.com/;);

However, I doubt this will solve your problem.

When you exchange the header() with an echo for debugging, you get
the output you expect, right? Is it possible that the echo is not the
only output, meaning that it would work fine whereas the header()
call would fail due to their being previous output somewhere else?
Depending on your HTML, errors might be hidden from the browser, so
you might have to glance through the source.

The only way to make sure PHP is properly changing the response
status code to 302 is to snoop the HTTP traffic surrounding this
transaction. Can you do that and show us the results? It might reveal
something.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] What is wrong here?

2002-11-24 Thread Cesar Aracena
In response to all of you wonderful people:

Leif, yes and no... I've tried all kind of URLs

Ernest, I think you're on the right track here... I'll try that.

Kyle, no... I made those errors in the past, so now I make sure I don't
(again :)

Chris, I tend to forget to append the / after the URL so thanks 4 that.
In the other hand, yes... the echo works fine. Now, I don't really know
what you mean by snoop the HTTP traffic but if it has something to do
with the server, then no I can't...

Thanks all of you... I'll try these things...

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


-Mensaje original-
De: Cesar Aracena [mailto:[EMAIL PROTECTED]] 
Enviado el: domingo, 24 de noviembre de 2002 23:06
Para: [EMAIL PROTECTED]
Asunto: [PHP] What is wrong here?

Hi all,

I'm making a site which will reside in a remote server and had several
problems... most of them where solved once I saw that register_globals
are OFF, but now I don’t know which other settings are affecting my
scripts. I have trouble with header(Location... because the browser is
NOT redirected. If I set an echo statement after I detected that the
username and password using $_POST[], the echo goes OK but if I
comment the echo and un-comment the 

header(Location: http://www.domainname.com;);
exit;

nothing happens... and no, there isn't anything before that... what can
be wrong? Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] What is wrong here?

2002-11-24 Thread Ernest E Vogelsinger
At 03:27 25.11.2002, Cesar Aracena said:
[snip]
what you mean by snoop the HTTP traffic but if it has something to do
with the server, then no I can't...
[snip] 

Make a
telnet www.mydomain.com 80
and transmit something like this:
---
GET /myredirurl.php HTTP/1.0
Host: www.mydomain.url
Accept: */*

---

Note the double newline at the end of the request header. Capture the
output and check if it properly returns

HTTP/1.x 302 Moved
Location: blah


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php