What php settings effect the POST and remote file include

I have been facing strange problem
This code is not working in one server

echo $_POST['name'];
<form action="test.php" method="post">
<input type="text" name="name"/>
<input type="submit" value="submit"/>

$_POST array returns nothing on submit

i have checked php size limit it is 20mb
are there any other php setting or server setting that can make it not work

2)is require_once(‘remotesitefile.php’);
effected by any php/server setting OTHER THAN allow_url_fopen and allow_url_include?
may be cache or tmp file setting or any thing such

it has with php for many years but this server bug is driving me crazy
(both codes are working with out any problem in another server)

You can not call and run remote php files.

If you do, they will run on the REMOTE SYSTEM not the calling one. The calling system is seen by the REMOTE system as a browser (like Internet Explorer, Firefox etc) and so it passes the php code to php and then outputs the result as normal.

If you want to run code from a remote server it must be in a .txt file (or any other file that php won’t execute) and then run through the eval() function on the calling system.

i think you dont understood the whole situation or have not been to this sort of programming
for eg
if site 1 has www.site1.com/forex.php (table display)
we can do require_once('http://www.site1.com/forex.php) and get data in site 2 until the allow_url_fopen and allow_url_include are ON in site 2
so,i am much aware of the things…

but in my case,some setting of the server,is not making it work in one server and i have no idea what to do next…

any help will be great

and what can be cause of failure of that post…any one?

On the contrary, internet, socket communication and cross server communication have been my interest for many years and yes i have done this kind of programming.

You can get the html output yes. You cannot however get the php code and then run it on site 2 - which is what you were asking about in your original post as 2)

According to php.net:

If “URL fopen wrappers” are enabled in PHP

If you are trying to post data to site2 and then call the php code from site1 to run on site 2 it will not work. I thought you were aware of this?:

lets make this simplified.
I am not trying to get or run php code of site 1 in site with that code.
I am aware of that.

What i am trying to do is
get the html display of a file(in this case a forex table) of site1 in site 2
i know we can do
require_once(‘www.site1.com/forex.php’) in site 2 to get the html output.

i have learned that for that to work we need to have allow_url_fopen and allow_url_include ON in site 2

They are on in my case
but code is still not working and giving no error and no html output in site 2
(It is working fine in site1 and if i try same code from 3rd server it also works…so i guess it is server setting problem of site(server) 2 BUT problem is ,i dont what which setting)
that has been my problem.

ok i found this is working
echo file_get_contents(‘www.site1.com/forex.php’)
and this is not

i have finally solved the $_POST not working problem as somebody had inserted ‘=’ infront of post max 8M setting.
Every thing looked fine but it was something we easily missed.

The ini setting safe_mode can clash with some settings you may try and override yourself.

I was trying to find solution from anywhere possible thats why i posted it here.Any way it took me lots of hours to hunt it down but i did it myself :smiley:

The cause of POST not working was
‘=’ infront of value of post_max_size that is 8m in php.ini
what it did
when type casting may be ‘=’ was converted to 0 and nothing was being posted.
simple but hard to detect.

The cause of second problem was
php plugin called suhosin
if it is installed,even though remote_file_include and fopen is on in php.ini ,remote file include doesnt work

i finally got it but took lots of my hours scratching my head “oh it should work .why is it not working”.I had not used that suhosin earlier and had no idea about its connection my problem.
and that ‘=’ puzzled me a lot.
Just posted it here may be it will save some hours of some people some day.

thank you any way.