Welcome Guest, Not a member yet? Register   Sign In
Firefox doesn't like my CI-based URL
#1

[eluser]Jay Jennings[/eluser]
Firefox (both on Windows and Mac) is having a problem with this URL:

http://sonictoolkit.com/ssp/go.php/go/index/10002/

IE and Safari have no problem with it, the page requested shows up like normal, but with Firefox it just shows a blank page.

Can anyone point me in the direction of a solution?

Thanks.

Jay Jennings
#2

[eluser]jkevinburton[/eluser]
im on Mac Firefox - i went to your URL but it sent me somewhere else...
it took me to : http://action.jayjennings.com/action.htm

ope that helps
#3

[eluser]Jay Jennings[/eluser]
Yes, that's where it's supposed to take you (it's a split-tester), but on my Mac Firefox and Windows Firefox, it goes to that URL I posted -- and just sits.

I know it's not just me because I've received dozens of emails this morning from people who are having the same problem. =Sad

Jay Jennings
#4

[eluser]CI Lee[/eluser]
I get a blank white page in FF on Mac as well
#5

[eluser]Derek Allard[/eluser]
You made me fire up IE just to test this Smile

try putting an exit; statement after your redirect. If that doesn't work, post your controller so we can poke at it.
#6

[eluser]Michael Wales[/eluser]
http://action.jayjennings.com/action.html

Forwarded me to a lame get quick rich scheme it appears (Note: I didn't read it because in real-life I wouldn't read it, it looks like a get rich quick website).
#7

[eluser]Jay Jennings[/eluser]
[quote author="Derek Allard" date="1187662665"]try putting an exit; statement after your redirect. If that doesn't work, post your controller so we can poke at it.[/quote]

Putting an exit(); after the header didn't do anything.

Following is the index() part of the controller:
Code:
function index()
    {
        /*
         * find out of the split[cid] cookie is in the house
         */

        if (get_cookie('split' . $this->uri->segment(3)))
            {
                // user has been here, so save some info and send him to correct URL
                $cookie = explode("|", $_COOKIE['split' . $this->uri->segment(3)]);

                $cid = $cookie[0];
                $numhits = $cookie[1];
                $redirnum = $cookie[2];
                $redir = $cookie[3];
                $numhits++;

                //--------------------------------------------------------------------------------
                // see if autoset is on and adjust things accordingly
                //--------------------------------------------------------------------------------
                //    load page table and look at nexturl to see which redirect to use
                $sql = "SELECT autoset, asurl FROM split_pages WHERE splitid = ? LIMIT 1";
                $query = $this->db->query($sql, array($cid));
                if (! $query->num_rows())
                    $errmsg = "::campaign not found::";    
                $row = $query->row();

                if ($row->autoset > 0 && $row->asurl != "")
                    $redir = $row->asurl;


                //    add record to hits table
                $this->db->set('splitid', $cid);
                $this->db->set('redir', $redir);
                $this->db->set('ipaddr', $this->input->ip_address());
                $this->db->set('referer', $this->agent->referrer());
                $this->db->insert('split_hits');
                
                //--------------------------------------------------------------------------------
                // increment the number of hits for the given URL
                //--------------------------------------------------------------------------------
                $this->incnumhits($cid, $redirnum);
                
                //--------------------------------------------------------------------------------
                // set the cookie with new info
                //--------------------------------------------------------------------------------
                
                setcookie("split".$cid, $cid."|".$numhits."|".$redirnum."|".$redir, time()+60*60*24*365, "/", ".sonictoolkit.com");
                
            }
        else
            {
                // first time user!
                
                //    load page table and look at nexturl to see which redirect to use
                $sql = "SELECT * FROM split_pages WHERE splitid = ? LIMIT 1";
                $query = $this->db->query($sql, array($this->uri->segment(3)));
                if (! $query->num_rows())
                    $errmsg = "::campaign not found::";    
                    
                $row = $query->row();
                
                $cid = $row->splitid;
                $myurlpos = $row->nexturl;

                switch ($row->nexturl) {
                case 1:
                    $redirnum = 1;
                    $redir = $row->url1;
                    break;
                case 2:
                    $redirnum = 2;
                    $redir = $row->url2;
                    break;
                case 3:
                    $redirnum = 3;
                    $redir = $row->url3;
                    break;
                }
                
                //--------------------------------------------------------------------------------
                // see if autoset is on and adjust things accordingly
                //--------------------------------------------------------------------------------
                if ($row->autoset > 0 && $row->asurl != "")
                    $redir = $row->asurl;
                
                $maxnext = 0;
                
                if ($row->url1 != "")
                     $maxnext++;
                if ($row->url2 != "")
                     $maxnext++;
                if ($row->url3 != "");
                     $maxnext++;
                
                //    inc nexturl
                $nexturl = $row->nexturl;
                $nexturl++;
                
                //        if nexturl > num urls for this record, set nexturl to 1
                if ($nexturl > $maxnext)
                    $nexturl = 1;

                //--------------------------------------------------------------------------------
                // update the vallue of the nexturl so whomever comes in next knows where to go
                //--------------------------------------------------------------------------------
                $this->db->set('nexturl', $nexturl);
                $this->db->where('splitid', $cid);
                $this->db->update('split_pages');
                //--------------------------------------------------------------------------------
                // increment the number of hits for the given URL
                //--------------------------------------------------------------------------------
                $this->incnumhits($cid, $redirnum);
                
                
                //    store cookie on user computer
                //        cid|numhits|redirnum|redirurl
                $numhits = 0;    // track how many times this user came back before they bought
                setcookie("split".$cid, $cid."|".$numhits."|".$redirnum."|".$redir, time()+60*60*24*365, "/", ".sonictoolkit.com");
                
                //    add record to hits
#8

[eluser]Jay Jennings[/eluser]
Okay, the forum told me I wasn't over the limit, but here's the last of the function that got cut off in the previous post:
Code:
//    add record to hits table
                $this->db->set('splitid', $cid);
                $this->db->set('redir', $redir);
                $this->db->set('ipaddr', $this->input->ip_address());
                $this->db->set('referer', $this->agent->referrer());
                $this->db->insert('split_hits');
                
            }
            
            //    redirect user to correct url
            header('Location: '. $redir);
            exit();
    }
#9

[eluser]Jay Jennings[/eluser]
[quote author="walesmd" date="1187665408"]http://action.jayjennings.com/action.html

Forwarded me to a lame get quick rich scheme it appears (Note: I didn't read it because in real-life I wouldn't read it, it looks like a get rich quick website).[/quote]

Thanks for checking it out.

Looks can be deceiving. =Wink

Jay Jennings
#10

[eluser]Derek Allard[/eluser]
I have 2 thoughts.

1) PHP errors are suppressed and that's why you're getting the blank screen. The error is causing output and thus not able to redirect. That seems unlikely given it only affecting 1 browser.

2) read this note on the URL helper's redirect function
Quote:The second parameter allows you to choose between the "location" method or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. Example:

Any chance you're on a windows box? I know you aren't using the URL helper here, but it could be the same issue.




Theme © iAndrew 2016 - Forum software by © MyBB