$_GET vars dropped?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello;
I don't really want to do this but I am going around in circles.

I have been working on an app that manages zip files.
So far for the last two or three weeks it has been working
on the php side very reliably.

That ended to day when I started on the project.
NOW, the $_GET vars appear to be dropped and key
code is not run.

The server query is executed via async get request.
It has been working until yesterday when I add the postProc function definition.
The purpose of the postProc function is to copy extracted files to different directories.
(but it never gets a chance to be run, now. I took it out and retested. The problem is up stream
before the class method call).

But the extraction and other processing intended to be processed by this code is refusing to run.

In the following code is the list of $_GET vars, the
code to process the request and the added postProc function
definition.

It boils down to this line:
$_ret = (new _ZIP_MANAGER(''))->proc($_GET);

**** Simply put, the question is: Why would this problem suddenly appear
**** with no stated errors? 

$_test->sampler($_GET, true, true, true);
/*
$_GET vars presented:
type: async
tzo: 420
tzn: 1587262553797
opr: extra
name: ./target/testZip.zip
extractTo: ./dest
*/
   if($_GET['opr'])
     {
      $_ret = (new _ZIP_MANAGER(''))->proc($_GET);
      if($_ret['error'] === false)
        {
         if(isset($_ret['list']))
           {
            $_retStr = 'false:'.$_ret['list'];
           }
        else
           {
            $_retStr = $_GET['opr'].' complete';
           }
        }
      else
        {
         $_retStr = 'error:'.$_ret['error'];
        }
     header('Content_Type:text/plain');
     print $_retStr;
     exit;
    }

code I added to _ZIP_MANAGER class def
private function postProc()
               {
                $_errHead = self::$_className.' -> '.__FUNCTION__;
                $_out = [];
                $_copyFailed = [];
                $_unLinkFailed = [];
                $_cumulative = [];
                $_initial = explode('[', self::$_locaVars);
                for($_itr = 0; $_itr < count($_initial); $_itr++)
                  {
                   $_argSet = explode(':', $_initial[$_itr]);
                   $_src = $_argSet[0];
                   $_dest = explode('|', $_argSet[1]);
                   $_delete = false;
                   if(isset($_argSet[2]))
                     {
                      if($_argSet[2] == 'delete')
                        {
                         $_delete = true;
                        }
                     }
                   for($_it = 0; $_it < count($_dest); $_it++)
                     {
                      if(copy($_src, $_dest[$_it]) === false)
                        {
                         $_copyFailed[count($_copyFailed)] = $_src.' to '.$_dest[$_it].' failed';
                        }
                     }
                   if($_delete === true && count($_copyFailed) == 0)
                     {
                      if(unlink($_src) === false)
                        {
                         $_unLinkFailed[count($_unLinkFailed] = $_src.' not deleted';
                        }
                     }
                   if(count($_copyFailed) > 0)
                     {
                      $_cumulative[count($_cumulative)] = implode($_copyFailed, '|');
                      $_copyFailed = [];
                     }
                   if(count($_unLinkFailed) > 0)
                     {
                      $_cumulative[count($_cumulative)] = implode($_unLinkFailed, '|');
                      $_unLinkFailed = [];
                     }
                  }
                if(count($_cumulative))
                  {
                   $_out['error'] = implode($_cumulative, "[");
                   return $_out;
                  }
                $_out['error'] = false;
                return $_out;
               }




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux