Forum Moderators: coopster

Message Too Old, No Replies

Php script works on one server and not on the other

Php script works on one server and not on the other

         

nextnet

7:40 am on May 24, 2007 (gmt 0)

10+ Year Member



Hey guys here's a problem I have with a php script. All suggestions are welcome and deeply appreciated. I have tried everything to solve this but my knowledge is limited.

I have a php script that calculates the chinese horoscope of website visitors based on their birth details.

I have installed the script in two different Apache servers with different php versions. The script works with the older version of php and doesn't work with the newest version:
------
1st server (PHP Version 4.3.10)
<snip>
Here's the <snip> file for this server
------
------
2nd server (PHP Version 4.4.6)
<snip>
Here's the <snip> file for this server
------

If you run the script on the 1st server (click the submit button) the script will successfully tell you your chinese horoscope. If you run the script on the 2nd server the page will just refresh and nothing else will happen.

Here's the <snip> for the script.

I've tried everything within my powers but I can't get the script to work properly in the second server. In my humble opinion there must be something wrong either with the syntax of the php code (that is somehow not supported by the newer php version), or a server configuration that must be changed in the second server (perhaps enabling an option or something). Maybe the solution is simple but I cannot figure it out. So I'm handing it to you!

[edited by: dreamcatcher at 8:47 am (utc) on May 24, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]

barns101

7:54 am on May 24, 2007 (gmt 0)

10+ Year Member



Hello and welcome to Webmaster World!

Your second server has register_globals set to OFF, which means that any posted data must be accessed through $_POST['whatever'] rather than getting automatically set as $whatever. You need to edit the script so that any variables are referenced through the $_POST array.

(As an aside, you aren't allowed to post links to your websites on Webmaster World :) )

nextnet

9:28 am on May 24, 2007 (gmt 0)

10+ Year Member



Ok thanx guys.. Sorry for the links. I was just trying to give you as much info as I could so that you can help me! Thanx!