Actually I forgot to say, I also tried 'GET' (with out the mime type) and
got the same result.
Jeremy
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stijn
Sanders
Sent: 11 July 2008 18:30
To: Ararat Synapse
Subject: Re: [Synalist] Strange Problem with HTTP
mm, since you're using 'application/x-www-form-urlencoded', it looks like
you're using the post variable name:
sStr := TStringList.create;
sStr.add('dir=');
sStr.add(URLData);
to be on the safe side, URLData should be URLEncoded also
On Fri, Jul 11, 2008 at 7:35 AM, Jeremy Coulter <[EMAIL PROTECTED]>
wrote:
HI All.
I have a very strange problem that I can not work out.
I have created a PHP script on a linux server that uses the PHP "Rename"
funcion to rename a directory on this Linux box.
If I call the script from a browser, in this cas FireFox (latest release
version), it works find.
If however, I call this same function using the below function, it only
partially works.
When I look at the new renamed folder, only the directories that are in the
renamed folder are there, NOT the files.
I have also tried the linux "mv" function which seems to work much the same
as the PHP "rename' does, and from the command line or via the PHP script
(using the exec() function to run a shell command ) it works, from a browser
calling a PHP with the exec() in it works, but as soon as I call it from the
code below, it only does the folders NOT the files AND folders.....
Can anyone shed some light on this? I have also tried using the username and
password properites of the THTTPSend class, but these made no difference.
please help...... :-(
Jeremy
function ProcessHttpPost(const URL, URLData: string; const Data:
TMemoryStream): Boolean;
var
HTTP: THTTPSend;
sStr : TStringList;
begin
HTTP := THTTPSend.Create;
try
if Trim(URLData) <> '' then
begin
sStr := TStringList.create;
sStr.add(URLData);
sStr.savetostream(HTTP.Document);
sStr.free;
HTTP.Document.position:=0;
end;
HTTP.MimeType := 'application/x-www-form-urlencoded';
Result := HTTP.HTTPMethod('POST', URL);
HTTP.Document.position:=0;
HTTP.Document.savetostream(Data);
finally
HTTP.Free;
end;
end;
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public