it was 2 weeks i got confused with this, so far my script run well before my hosting company disable many function at php.ini and it was so crap for me, all their reason for security and security

here my code

$url = "http://www.mydomain.com/get.php";
$postdata['memberid'] = $memberid; 
$postdata['name'] = $name;
$postdata['name'] = $address; 
$useragent= "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" ;

$ch = curl_init();

curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_URL,$url); 
curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata); 
$result= curl_exec ($ch);
curl_close ($ch); 

so all my script not run because of this disable_function.

pack,escapeshellarg,escapeshellcmd,exec,shell_exec,system,ini_alter

i was try fopen, fputs and bla bla bla, but not run that cause of disable function

there is a way to post data to remote server with to many disable function like that?

    I'm confused... none of the functions you used in your code snippet above are listed in the list of disabled functions.

    EDIT: What's the exact PHP error message you're getting?

      bradgrafelman;10948449 wrote:

      I'm confused... none of the functions you used in your code snippet above are listed in the list of disabled functions.

      EDIT: What's the exact PHP error message you're getting?

      $url = "http://www.mydomain.com/get.php";
      $postdata['memberid'] = $memberid;
      $postdata['name'] = $name;
      $postdata['name'] = $address;
      $useragent= "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" ;
      
      $ch = curl_init();
      
      curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
      curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
      curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_URL,$url);
      curl_setopt($ch, CURLOPT_POSTFIELDS,$postdata);
      $result= curl_exec ($ch);
      curl_close ($ch); 
      

      the script run well before disable_function was activated
      but now that script not run because that disable_function was disable curl_exec

      try your self by put that disable function at php.ini, then you will know what i mean

      pack,escapeshellarg,escapeshellcmd,exec,shell_exec,system,ini_alter 
      

      there is a way to post data to remote server with to many disable function like that?

      i was try with fopen, fputs, fsockopen and bla bla bla, was not run

        What's the exact PHP error message you're getting?

          build5264;10948456 wrote:

          try your self by put that disable function at php.ini, then you will know what i mean

          Okay... I'll bite.

          I copied the line you posted and pasted it into the "disable_functions =" in my php.ini file and restart Apache. I confirmed the change by doing a phpinfo() and saw this:

          disable_functions pack,escapeshellarg,escapeshellcmd,exec,shell_exec,system,ini_alter

          I then copy-and-pasted your code above into a test script and.... cURL worked as expected.

          Like I said, none of the disabled functions in that list appear in your code snippet, so the value of disable_functions does not affect your code in any way.

            Write a Reply...