Jump to content

Apache server 403 Error when $_SERVER['PHP_SELF'] is called


Lefteris

Recommended Posts

Hello all.

 

I have a problem. Up to now the call to $_SERVER['PHP_SELF'] call worked like a charm in any form in my website. Now I made something like ... a dynamic form generation. I am making the various forms by use of Javascript.

LAter the javascript function is called inside a php script.

Example of code :

 

function fillSetArt(div)
{
//we load the XML file into xmlAudioObj
xmlArtObj = loadXML(xmlArtObj,'artsoft.xml');

//this will be the function which will read the file and extract the data we need!
xmlArtObj.onreadystatechange = function() 
		{	
			var text = '<form name="userSkills" id="userSkills" action="<?php echo $_SERVER[\'PHP_SELF\']; ?>" method="POST">';

 

I added the form's declaration and well .. everything inside a javascript script which edits the inner html attribute of the DIV which I want to contain the various forms. The problem is that when I do it this way I get :

 

Access forbidden!

 

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

 

If you think this is a server error, please contact the webmaster.

Error 403

localhost

06/18/08 11:23:07

Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

 

And in the browser I can see that the error is thrown due to the PHPSELF call. Any idea how to get around this error?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.