if(isset($_POST))
{
echo "<BR>Post works <BR>";
}
if(isset($_GET))
{
echo "<BR>Get works <BR>";
}
Indicates that $_POST, and the $_GET appear fine, just that the arrays are empty:(
Main Topics
Browse All TopicsI have
[me@p15162804 me]# rpm -q php
php-4.3.10-2.4
[me@p15162804 me]# rpm -q httpd
httpd-2.0.51-2.9
Installed on a Fedora Red hat system. This is a default install from OneandOne.co.uk, with Plesk Control Panel
I am trying to post (or get) information to another form:
------------------------8X
<html>
<body>
<form action="test.php" method="post">
<input type="text" name="name" value="">
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
------------------------8X
------------------------8X
<?php
global $_GET;
if(isset($_GET[name])){
$testvar=$_GET[name];
echo "X".$testvar."X";
} else {
echo "not set";
}
print_r($_GET);
print_r($_POST);
?>
------------------------8X
If I enter anything in the form and submit, I get:
------------------------8X
not set
Array ( ) Array ( )
------------------------8X
Likewise for:
http://......../test.php?n
I get exactly the same.
Effectively, I appear to be unable to pass POST or GET data:(
If this is potentially a configuration problem, then guidance please as we can get the httpd.conf, and php.ini altered if necessary.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
http://82.165.31.167/82.16
and the query sting always comes out as empty whatever I do with it :(
And this page:
http://82.165.31.167/82.16
POSTs information to the aforementioned page.
Duplicated phpinfo, under a more obvious name:
http://82.165.31.167/82.16
Hm the settings look ok, there are only one thing which looks bad.
At the end of the php-info-page all superglobals are listed, but the is an entry "PHP_SELF" without any superglobal name infront. There typical the $_POST, $_GET, $_REQUEST are listed.
Are you using mod_rewrite to adopt pathes on that system?
Also the query string is always empty.
I can see the bit that you are referring to, but I'd be grateful if you can give me any pointers to understand why, and how to correct it. (short of a sledge hammer ;))
mod_rewrite is set up all over the place in the httpd.conf.
I can understand how that might mess up a 'get', but not sure whether it would do any thing to a 'Post'.
As the mod_rewrite is set up by OneAndOne, (as a result of the Plesk Control Panel I would guess?)
Would this be something that needs altering in the php.ini from a security point of view, or perhaps the httpd.conf?
I also don't know why that part of the PHP-Variables is broken. On my box
http://ee.jojo.is-a-geek.n
looks very good and the php.ini-settings look the same.
Are the any Rewriterules defined on your side? I have no glue why the PHP-Variables are screwed up that way on your server. Maybe the used rpm for php 4.3.10 is screwd up and has a bug.
Many thanks hernst42 for your assistance - Problem eventually turned out to be that until the domain became live, there was a rewrite rule using a really spurious mess of slashes that I didn't have a hope of understanding. It also seemed to do something with a php base directory which didn't exist, so I created it.
As a result, I backed up the httpd.conf and replaced it with a nice straight forward one without the 'garbage' .
Thankyou for your overview - you kept me sane!...and the comment relating to rewrites did make me think about the relavent area, hence I've awarded you some of the points:)
Business Accounts
Answer for Membership
by: hernst42Posted on 2005-02-08 at 07:26:17ID: 13254883
There is no need to declare $_GET as global, as it's already a supeglobal.
Can you provide a link to a phpinfo-page, may be there is something screwed up with your php-settings?