3

Background: I have my website (http://www.gymandspajobs.com) code hosted on a linux server . My website allows new registrations for members. The filled-up forms are verified by javascripts in the folder "/javascript" and if the information is found ok, the data is submitted via javascript HTTP request object and the php file "somefile.php" kept in the folder "/somefolder" under the root directory does the database inserts.

Problem : When a new user tries to register using firefox (I tested in WinXP SP2, Firefox - v3.5.2), the HTTP response I get ( which I tapped in my javascript file) is "You don't have permission to access /somefolder/somefile.php on this server." .

Surprisingly, the same functionality works perfectly well in IE7 and Chrome.

Please help.

Thanks and Regards,

Rupak Kharvandikar

2
  • Your Australian flag is backwards... Aug 10, 2009 at 23:22
  • I bet the Dutch flag is as well, but it's a little harder to tell. :) Aug 11, 2009 at 0:47

10 Answers 10

3

I'd try clearing the cache etc in your browser. PHP is server side code and should not behave differently when being requested from different front end clients.

1

You might want to try changing user agents and masquerade as IE when you connect with Fx (the User Agent Switcher addon lets you do this quickly and easily). This will tell you if it's code on the server side preventing Fx, or if it's something else.

0

Did you check your Apache logs?

1
  • Dear Sir, I do not have access to the apache logs
    – Rupak Kharvandikar
    Aug 10, 2009 at 11:07
0

Do you get any errors in Firefox's error logs related to your Javascript, or any kind of security type errors?

Firefox's log is accessed via Tools -> Error Console

If you've had your browser open for a bit then its probably full of all sorts of messages, Clear it and then try the action again on your site and see if anything shows up in the log as you go through the process.

3
  • Dear Sir, Thank you for the suggestion. The firefox error console shows No error. I came across the following discussion wherein the problem sounds similar to my problem. Kindly suggest if this will solve my problem. nabble.com/… Thanks.
    – Rupak Kharvandikar
    Aug 10, 2009 at 13:01
  • The article you've linked seems to be a purely server side issue that happens irrespective of the client attaching? I've just tried registering for your site using Firefox 3.5.2 on Vista SP1 and had no problems and no errors. Are you sure this is a general problem, and not just a weird thing on your PC?
    – GAThrawn
    Aug 10, 2009 at 23:10
  • Another thought on this: it might be that some JavaScript code isn't behaving as expected in Fx - the code could be parsing cleanly, but executing differently due to differences in Fx and IE semantics. Instead of looking for errors, it might be worth adding trace to your JS (maybe even alert()s) in an attempt to locate the last line before error, then trace that last line...
    – atk
    Aug 11, 2009 at 2:42
0

Is JavaScript allowed in your firefox installation? (Tools->Options...->Content)

Did you also try to clear the cache and cookies of your Firefox installation? You can empty it with Ctrl+Shift+Delete.

0

It might be an included file (CSS, JPG, or even a PHP include) with bad permissions that's being ignored by IE and other browsers. In other words, when the browser requests index.php, all the files included in index.php (graphics, CSS, external JavaScript files, etc.) are also automatically requested by the browser. If one of those files returns something other than an HTTP 200 (OK) response, other browsers may ignore it, but Firefox might throw the error you're seeing. You need to check paths and permissions for all included files.

0

Your somefolder contains national characters?

0

Thank you everybody for all your insights. Really appreciated.

In the meanwhile, I had posted the link ( http://www.nabble.com/You-don%27t-have-permission-to-access--typo3-alt_doc.php-on-this-server.-td11212357.html ) to the web hosting guys and my problem seems to have been solved after I received this reply from the web hosting guys.

We have disabled mod_security for your domain to fix it. We have entered the below lines to the .htaccess file under the httpdocs directory for your domain. We have also verified and successfully able to submit the Employer registration without any issues. ~~~~~ SecFilterEngine off ~~~~~

What is "SecFilterEngine" and What happens when SecFilterEngine is turned off ? Please guide.

Thanks and Regards,

-- Rupak Kharvandikar --

0

I was about to suggest you desactivate mod_security after looking at the HTTP response headers, but it seems it has been done already.

Mod Security check transactions between clients and Apache, it is rule based and the rules define what should be done in case of a match. Clearly at least one rule match when submitting with FF and result in a 403. You should ask your provider a log of rules matching for your website so that you could correct your code or disable mod_security when accessing this one file (through .htaccess).

0

Though the problem has got solved, I think making "SecFilterEngine off" may not be the best solution to this problem as it compromises security. Hence I asked the hosting guys if there is a way to keep mod_security ON and yet get my functionality to work...... here is their reply.....

[ Q. is there any way my code can work yet keeping mod_security ON?

Ans. It is possible. But it is not easy. You have to modify the code in the file in such a way that the URI should not have the pattern "!(^application/x-www-form-urlencoded$|^multipart/form-data;)" because we found this entry in the apache error logs -

mod_security-action: 403

mod_security-message: Access denied with code 403. Pattern match "!(^application/x-www-form-urlencoded$|^multipart/form-data;)" at HEADER("Content-Type") ]

Please guide me as to how to achieve this for my registration form ?

You must log in to answer this question.