Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #10203

Re: Hopiing for some leads as to what may be wrong in this code

From Twayne <nobody@spamcop.net>
Newsgroups comp.lang.php
Subject Re: Hopiing for some leads as to what may be wrong in this code
Date 2013-07-25 13:24 -0400
Organization Aioe.org NNTP Server
Message-ID <ksrn06$1rc$1@speranza.aioe.org> (permalink)
References <kspnth$vnb$1@speranza.aioe.org> <ksqnk7$cm8$1@news.albasani.net>

Show all headers | View raw


On 2013-07-25 4:28 AM, The Natural Philosopher wrote:
> On 25/07/13 00:27, Twayne wrote:
>> Hi all,
...
>>
>> Win 7, PHP 5.3.5, XAMPP local server, standard Unix remote server:
>>
...
>>
>> Complete form consists of three .PHP pages; no HTML. Entry form, check
>> page, mailto() page; pretty standard stuff in that way:
>>
>> ================
>> WORKING CODE ON REMOTE SERVER:
>>
>> Setting the code on landing page:
>>     $_SESSION["d"] = $d;
>> --------------------
>>
>>  $code= $_POST["code"];
>>  if($_SESSION["d"] !== $code) {
>>      echo "<br />You did not enter the correct code: Script halted,
>> ALL data destroyed.<br /> you'll have to go back to the website and
>> start over.<br />";
>>     die("Script HALTED, data destroyed");
>> session_destroy();
>> exit();
>> }
>> RESULT:
>> page throws no error either with local or remote server: Message is
>> sent successfully.
>>
>> ===============================
>>
>> NON-WORKING CODE ON REMOTE SERVER BUT WORKS ON LOCAL HOST:
>>
>> Setting the code on previous page:
>>     $_SESSION["d"] = $d;
>> ----------------------
>> Page with problem:
>>  $code= $_POST["code"];
>>  if($_SESSION["d"] !== $code) {
>>      echo "<br />You did not enter the correct code: Script halted,
>> ALL data destroyed.<br /> you'll have to go back to the website and
>> start over.<br />";
>>     die("Script HALTED, data destroyed");
>> session_destroy();
>> exit();
>> }
>>
>> RESULT:
>> [Gets stuck on the second page of the form where PHP
>> sanitize/validation happens; never makes it to last page with the
>> mail() function]:
>>
>>  using code : 487-535175 <----------- WHICH IS CORRECT CODE #
> I wonder if that's being evaluated as a numerical expression..
>> You did not enter the correct code: Script halted, ALL data destroyed.
>> you'll have to go back to the website and start over.
>> Script HALTED, data destroyed
>> ================
>>
>> Can you spot any differences there? The local server throws NO error,
>> notices or warnings. But the Remote Server stops cold on the second
>> page, indicating the code is wrong. But it's not; I can see the code;
>> it's correct. But it seems to never be seen as correct by my Remote
>> Server while my Local Server accepts it perfectly.
>>
>> What really gets me is it works on one site and not the one I'm trying
>> to perpetuate the code to. OH, and both sites are on the same Remote
>> Servers at Netfirms.com. Separate accounts of course.
>>    I'm not using rewrites, no php changes on the Remote Server; both
>> sites are on the same server.
>>    Any thoughts or ideas what I might be doing wrong or where else I
>> should be looking?
>>
>> TIA,
>>
>> twayne`
> When I have had similar issues running phpinfo() on both sites usually
> reveals a different php envoironment and gives a clue as to where it's
> being set as well.

I'm not very good at reading PHPinfo() but the two PHPinfo() displays 
(my local Apache server and Remote Server) are the same in all the areas 
that would seemingly have anything to do with PHP; same paths, same 
dates, same revs, etc. and in its entirety also. I purposely keep my 
local PHP version the same as my Servers.

Thanks ... I ran thru the effort again, just to be sure.

Twayne`


>
>

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-24 19:27 -0400
  Re: Hopiing for some leads as to what may be wrong in this code Jerry Stuckle <jstucklex@attglobal.net> - 2013-07-24 23:04 -0400
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-25 13:39 -0400
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-08-04 16:24 -0400
      Re: Hopiing for some leads as to what may be wrong in this code Jerry Stuckle <jstucklex@attglobal.net> - 2013-08-04 22:08 -0400
  Re: Hopiing for some leads as to what may be wrong in this code Scott Johnson <noonehome@chalupasworld.com> - 2013-07-24 20:42 -0700
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-25 13:37 -0400
  Re: Hopiing for some leads as to what may be wrong in this code The Natural Philosopher <tnp@invalid.invalid> - 2013-07-25 09:28 +0100
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-25 13:24 -0400
      Re: Hopiing for some leads as to what may be wrong in this code The Natural Philosopher <tnp@invalid.invalid> - 2013-07-25 19:18 +0100
  Re: Hopiing for some leads as to what may be wrong in this code Christoph Michael Becker <cmbecker69@arcor.de> - 2013-07-25 19:51 +0200
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-25 14:11 -0400
      Re: Hopiing for some leads as to what may be wrong in this code Christoph Michael Becker <cmbecker69@arcor.de> - 2013-07-25 20:31 +0200
      Re: Hopiing for some leads as to what may be wrong in this code Norman Peelman <npeelman@cfl.rr.com> - 2013-07-25 20:37 -0400
        Re: Hopiing for some leads as to what may be wrong in this code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-27 12:17 +0200
          Re: Hopiing for some leads as to what may be wrong in this code Fiver <numeralfive@gmail.com> - 2013-07-28 07:01 +0200
            Re: Hopiing for some leads as to what may be wrong in this code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-28 17:48 +0200
              Re: Hopiing for some leads as to what may be wrong in this code The Natural Philosopher <tnp@invalid.invalid> - 2013-07-28 19:17 +0100
    Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-25 14:24 -0400
  RESOLVED Re: Hopiing for some leads as to what may be wrong in this code Twayne <nobody@spamcop.net> - 2013-07-27 11:05 -0400

csiph-web