Solved

Indy HTTP Post gives error 404

Posted on 2013-01-25
6
1,083 Views
Last Modified: 2013-02-02
Hi

I have a delphi-program where I execute a php-file. It worked, and suddently I get the error 404 (page not found). entering the same link in the browser works and if I don't call it in a subdirectory it also works!

      IdHTTP1.Post('http://www.mysite.ch/tmp/EMail.php',vparam);

Open in new window

gives the error

      IdHTTP1.Post('http://www.mysite.ch/EMail.php',vparam);

Open in new window

is ok (I have a copy of that php in both directories to test it.

Where can be the problem? Thanks for every idea!
0
Comment
Question by:formi
  • 3
  • 2
6 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 38821621
did you check your web server configuration if /tmp is mapped somewhere else
(in apache with Alias, Location directives)
0
 

Author Comment

by:formi
ID: 38821638
I don't know exactly what you mean (I'm not the web-expert) but I think that you mean there is not a real folder but it's only an alias. No, it is a real folder and I just made another test: if I rename the folder from "tmp" to "tmpxx" I can access it. If I rename it again to "tmp" I get the error 404! Very strange behaviour!

This issue is valid for each php, working in tmpxx, not working in tmp!
0
 
LVL 26

Expert Comment

by:Sinisa Vuk
ID: 38823135
I check for /tmp folder in indy source and found that it is notified in: IdSSLOpenSSLHeaders.
My guess is that it is used in some web servers too for temporary reason and I think that it should not be used. Use 'tools' sub-folder for example.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 51

Expert Comment

by:ahoffmann
ID: 38823692
please  check your web server configuration again
0
 

Accepted Solution

by:
formi earned 0 total points
ID: 38826278
I got the the solution from my provider: they locked executing posts in /tmp-directory as security-reasons. Thanks anyway for your help.
0
 

Author Closing Comment

by:formi
ID: 38846345
Solution was not provided
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question