Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I Need solution for Error 500 " File does not exist".

Status
Not open for further replies.

kijkij

Programmer
Jul 13, 2007
5
PK
I am working on a php script. I have to use paypal payment in my script but when paypal call to my server for certain php file, my server responses to paypal with the following error:

[Wed Jul 11 23:53:49 2007] [error] [client 66.135.197.164] File does not exist: /home2/user/public_html/500.shtml

I have tried all possible solutions but the situation is there, I always get this error. I tested this script on a free server, there its working ok but not on my server. I searched all over the net but could not find a solution, please help me to solve it. I asked to my server admin but he did not answer me back, its looking he also dont know the problem.

My server is:
Apache 1.3.34
PHP 4.3.11 as Apache module
Edit/Delete Message
 
If the server is running on a linux platform, you need to make sure that you use caps if they are used. Paths in linux are case sensitive. Do you have access to your logs? That would help a great deal. Does ssl play a part in this? Are you trying to reach the script with http protocol when you should be using https?
 
Yes, the system is linux and I have access to logs file, the error I gave got from log file. I use http not https. I dont know much about https. I gave the paypal url in http not in https. But idont know how paypal call to my server. But the url I gave to paypal is working in my own browser but not when paypal calls to it.
 
I don't know the exact solution but I hope I can get you pointed in the right direction. The error is somewhat confusing because it is saying "file does not exist" whis is a 404 error code. The file it can't find is a custom error page which would indicate a 500 status code which is an "internal server error". My guess is that something in your script caused the server to not be able to fulfill the request. With php it could be something as simple as using short tags when the servers php.ini file is not configured for them. For example, if you are using <? instead of <?php this can cause the error. If you have access to php.ini then you can edit it to use short tags or else you will need to edit your scripts. This may not be the exact problem but it is very close. Your script will work fine on some configurations and not on others. Sometimes you can run phpinfo() to compare the configurations of the two servers.
 
As 404 is for "Page not found" but I always see 500 in my log file. I always use <?php not <? in my PHP scripts.500 is occur when server dont know how to process the request. There are no errors in my script. To test I used a very simple script but that also did not work.When I tested on free server everything was fine. The difference is on free server PHP is running as CGI and on my server as Apache module. My file exists and have no any errors. I have tested it with different methods.The real problem is Apache configuration.
 
I'll try this again.

You say:
As 404 is for "Page not found" but I always see 500 in my log file.

Error log says: "file does not exist"

What file doesn't exist?

Error log says "/home2/user/public_html/500.shtml"

You then need to ask yourself why is apache looking for that file?

Logical answer: apache came across a request it could not fulfill which resulted in a 500 status code.

Conclusion: You have apache configure to use custom error pages. It looked but could not find /home2/user/public_html/500.shtml.

My point was you have two problems.

1. apache could not fulfill a request (internal server error).

2. 500.shtml was not where you told apache it was.

I dealt with the first issue. I suspect the problem is with php's configuration. If you are using the apache module, then you need to make sure it is installed and working correctly. Since it won't even run a simple script, I'd say that is a very safe bet.


 
1. apache could not fulfill a request (internal server error).

My main question is this that why Apache is not fulfilling the request? Paypal server calls to my server but my server produces internal server error. How can I solve this? My file has no errors!
 
To test I used a very simple script but that also did not work.


Sorry to go backwards but you never told us if you got even the simple script to work. If not, then we need to get php to work. If you are using mod_php, I think mod_perl also needs to be used. The name of the php module depends on the version you are using. It may be mod_php4 in your case. If php is working hit and miss, you may want to run it in debug mode. You can have the errors and warnings displayed on the page while you are trying to find the problem.



 
On my server PHP is working. My all other PHP scripts are working fine at this time. Now I am working on script to sell digital products.Ans I have to use egold and paypal as payment options.Egold and paypal function is almost same. Egold is working but not paypal.Each egold and paypal calls to my server after completing payment.My gives response to egold 200 OK but on paypal turns it produces internal server error. Paypal post values to my server just like egold.So the problem is Apache in handling request not PHP. NOW??????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top