Title: Error when allow_url_fopen=0
Last modified: November 8, 2023

---

# Error when allow_url_fopen=0

 *  Resolved [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/)
 * Hello,
 * My server doesn’t allow the php command **allow_url_fopen** for security reason.
 * I’ve updated today your plugin to the latest version available on [github](https://github.com/Florent73/send-pdf-for-contact-form-7)(
   v. 1.0.1.2) and this error is displayed in the admin and in the frontend (even
   if my wp-config file has the constant WP_DEBUG defined on false).
 * > **Warning**: copy(): https:// wrapper is disabled in the server configuration
   > by allow_url_fopen=0 in …**wp-content/plugins/send-pdf-for-contact-form-7/classes/
   > send-pdf.php** on line **617**
 * Note that your plugin is fully functionnal, everything works has intended but
   the error message on the frontend…
 * Is there a way to fix that? I saw it’s related to a conditionnal upload of the
   onepixel.png image if it doesn’t already exist in the $createDirectory…
 * Thanks again for your support.
    -  This topic was modified 2 years, 6 months ago by [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/#post-17206122)
 * Problem fixed in v1.0.1.3, Thank you!
 *  Thread Starter [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/#post-17231974)
 * In fact the problem was not solved and is still present in the last release (
   v1.01.6) on [github](https://github.com/restezconnectes/send-pdf-for-contact-form-7).
 * I’ve added a new condition in the if statement in /classes/send_pdf.php on line
   606 in order to check if **allow_open_url **is enabled:
 * before:
 *     ```wp-block-code
        if( file_exists($createDirectory.'/onepixel.png')===FALSE) {
       ```
   
 * after:
 *     ```wp-block-code
        if( filter_var( ini_get('allow_url_fopen'), FILTER_VALIDATE_BOOLEAN ) && file_exists($createDirectory.'/onepixel.png')===FALSE) {
       ```
   
 * [@florent73](https://wordpress.org/support/users/florent73/) Could you please
   implement this for a next release? 
   Thank you very much!
 *  Plugin Author [Florent Maillefaud](https://wordpress.org/support/users/florent73/)
 * (@florent73)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/#post-17232444)
 * Hi!
 * I have implement on 1.0.1.6 version.
 * Thanks
 *  Thread Starter [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/#post-17232478)
 * Thank you very much Florent!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error when allow_url_fopen=0’ is closed to new replies.

 * ![](https://ps.w.org/send-pdf-for-contact-form-7/assets/icon-256x256.png?rev=
   2194770)
 * [Send PDF for Contact Form 7](https://wordpress.org/plugins/send-pdf-for-contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/send-pdf-for-contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/send-pdf-for-contact-form-7/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/error-when-allow_url_fopen0/#post-17232478)
 * Status: resolved