• My web hotel updated to php 7.2, since earlier php versions will stop working in late 2018. After that update I get the following error on top of my page:

    Warning: Use of undefined constant DC_MAX_ATTEMPTS – assumed ‘DC_MAX_ATTEMPTS’ (this will throw an Error in a future version of PHP) in /storage/content/63/182863/krydda-med-musik.se/public_html/wp-content/plugins/wp-download-codes/wp-download-codes.php on line 32 Warning: Use of undefined constant DC_ALLOWED_DOWNLOADS – assumed ‘DC_ALLOWED_DOWNLOADS’ (this will throw an Error in a future version of PHP) in /storage/content/63/182863/krydda-med-musik.se/public_html/wp-content/plugins/wp-download-codes/wp-download-codes.php on line 33 Warning: Use of undefined constant DC_FILE_TYPES – assumed ‘DC_FILE_TYPES’ (this will throw an Error in a future version of PHP) in /storage/content/63/182863/krydda-med-musik.se/public_html/wp-content/plugins/wp-download-codes/wp-download-codes.php on line 34 Warning: Use of undefined constant DC_CODE_CHARS – assumed ‘DC_CODE_CHARS’ (this will throw an Error in a future version of PHP) in /storage/content/63/182863/krydda-med-musik.se/public_html/wp-content/plugins/wp-download-codes/wp-download-codes.php on line 35 Warning: Use of undefined constant DC_HEADER_CONTENT_TYPE – assumed ‘DC_HEADER_CONTENT_TYPE’ (this will throw an Error in a future version of PHP) in /storage/content/63/182863/krydda-med-musik.se/public_html/wp-content/plugins/wp-download-codes/wp-download-codes.php on line 36

    • This topic was modified 6 years, 1 month ago by fankyartlab.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m trying to use this plugin and I’m having the same problem as the topic creator. Would love to see a solution to this.

    I’ve solved the issue. Lines 32-37 of wp-download-codes.php should be the following:

    define( “DC_MAX_ATTEMPTS”, 3 );
    define( “DC_ALLOWED_DOWNLOADS”, 3 );
    define( “DC_FILE_TYPES”, ‘zip, mp3’ );
    define( “DC_CODE_CHARS”, ‘ABCDEFGHIJKLMNPQRSTUVWXYZ123456789’ );
    define( “DC_HEADER_CONTENT_TYPE”, ‘Default (MIME Type)’);

    Thank you ekimgram!!!

                (o\>o</o)
                 ( , , )
           _,~~._(_(T)_)_,~~._
          | "--",-"-.-"-."--" |
          |    (  I love )    |
          |     ". YOU!."     |
          |   _,-."._.",-._   |
          '--(ooO )---( Ooo)--' hjw
             ((_) )   ( (_))
              "--"     "--"
    

    Thanks, now it’s possible to activate the plug in.
    But still there are other problemes with php 7.2
    For examplple: I can’t import existing Download Codes:

    Fatal error: Uncaught Error: Call to undefined function split() in …

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘not compatible with php 7.2’ is closed to new replies.