Skip to main content
New Participant
Nov 24, 2026 4:24 AM UTC
Question

Box Upload Fails When PHP File Contains curl_exec()

I'm experiencing an unusual upload issue with Box and have been able to narrow it down to a specific PHP function: curl_exec().

When I attempt to upload a PHP or TXT file containing the literal text curl_exec(), Box fails the upload with the following error:

  • "Oops! 1 file failed to upload."

  • "1 Error: Network Error."

I've done quite a bit of testing to isolate the problem:

  1. Other files upload successfully to Box.

  2. A PHP file without curl_exec() uploads successfully.

  3. A PHP file containing curl_exec() fails.

  4. Even a minimal test file containing only a basic function with curl_exec() fails.

  5. Removing curl_exec() from my original PHP file allows it to upload.

  6. The same file uploads successfully to Google Drive.

  7. I've tested Box.com and Box Drive, Chrome and Edge, two different computers, and both my home internet connection and a mobile hotspot.

  8. I've temporarily disabled NETGEAR Armor and Bitdefender's firewall and Online Threat Prevention features without any change.

This appears to be related to the contents of the file rather than the file size, extension, computer, browser, or network connection.

My question:

Does Box perform content inspection or security scanning during uploads that could be incorrectly flagging files containing certain PHP functions?

I'd like to determine whether this is an issue with Box's upload processing or a security rule that is incorrectly rejecting the file.

I can provide minimal test files that reproduce the issue if needed. The files contain no actual API credentials or sensitive information.

Thanks!

    5 replies

    New Participant
    Nov 24, 2026 4:49 AM UTC

    I ran a few more tests and here are the results.

    • Uploads fail with HTTP 403 whenever the file contains curl_exec, even without parentheses.
    • The same file uploads fine when about 10 KB of padding comes before the word. That shows a request-body inspection rule that only checks the first part of the upload.
    • It reproduces on different devices, browsers, networks and Box Drive.
    Translate
    New Member
    Nov 24, 2026 5:24 PM UTC

    I am experiencing the same problem with this code: 
    <?php
    execute();

    The file has no other lines, and it is 26 bytes.

    I have done extensive testing to narrow it down to this code, including renaming the file extension (txt or PHP), saving it as a ZIP file, and using Box Drive and the Web services; it still fails to upload. I’ve also tested uploading the file successfully to Dropbox, but Box rejects the file. 

    I can reproduce the issue if needed.

    The upload issue started recently, as I have another older file that was already on the Box Cloud service.  I suspect that recent Box changes to the DLP rule, a false positive, or an outright bug is the problem.

     

     

    Translate
    New Participant
    Nov 24, 2026 11:17 PM UTC

    This isn’t an ideal solution, but what I found is that adding 80 lines of the below comment to the beginning of the file allowed Box to upload the file. Seems to have something to do with Box’s WAF which scans roughly the first 8 KB of the payload of a POST request for malicious scripts and is apparently flagging certain PHP functions. This issue started recently for me too.

     

    // padding line - this file is a Box upload WAF test, no functional code above this point ......

    Translate
    New Member
    Nov 25, 2026 7:39 PM UTC

    It worked for me as well. Thank you! My workaround was to use a Windows command-line command to convert the file to Base64, which I then uploaded to Box Drive. 

    Here are the commands I used:

    To encode the file:
    certutil -encode filename.php filename_script.b64.txt

    To decode (restore the original file later):
    certutil -decode filename_script.b64.txt filename.php

     

    Translate
    New Member
    Nov 25, 2026 7:38 PM UTC

    It worked for me as well. Thank you! My workaround was to use a Windows command-line command to convert the file to Base64, which I then uploaded to Box Drive. 

     

    Here are the commands I used:

    To encode the file:
    certutil -encode filename.php filename_script.b64.txt
     

    To decode (restore the original file later):
    certutil -decode filename_script.b64.txt filename.php

     

    Translate