Title: Fail on cf7_abd.class.php
Last modified: August 30, 2016

---

# Fail on cf7_abd.class.php

 *  [i5513](https://wordpress.org/support/users/i5513/)
 * (@i5513)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/)
 * Hello,
 * We are getting the next message, when triying to access to a blog (a domain in
   multisite wordpress):
 * unexpected T_FUNCTION in /srv/www/ws215/wp-content/plugins/contact-form-advanced-
   database/lib/cf7_adb.class.php on line 63
 * Do you know what can be happen there ?
 * Thank you
 * [https://wordpress.org/plugins/contact-form-advanced-database/](https://wordpress.org/plugins/contact-form-advanced-database/)

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

 *  Thread Starter [i5513](https://wordpress.org/support/users/i5513/)
 * (@i5513)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/#post-6391714)
 * The problem is that we are using php 5.2,
 * Can you support php 5.2 (minimum requisite for wordpress)? In this case I had
   to change your cf7AdbExportController code to no use anonymous functions:
 * Modifying cf7_adb.class.php :
 *     ```
       function empty_function ()      {
               }
   
               function add_header_function()  {
                               $id= $_GET['id'];
                               $filename = "contact_form_advanced_database_" . date('Ymd') . ".csv";
                               header("Content-Disposition: attachment; filename=\"$filename\"");
                               header("Content-Type: application/vnd.ms-excel");
   
                               require_once('display/export.php');
   
                       exit;
               }
   
               function cf7AdbExportController() {
                 // filename for download\
                 //    $hook = add_submenu_page(null, '', '', 'administrator', 'cf7-adb-export-xls', function(){});
                       $hook = add_submenu_page(null, '', '', 'administrator', 'cf7-adb-export-xls', 'empty_function');
                       add_action('load-' . $hook, 'add_header_function' );
   
               }
       ```
   
 * Thank you very much
 *  Plugin Author [Christian Bautista](https://wordpress.org/support/users/akosicb/)
 * (@akosicb)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/#post-6391970)
 * Hi i5513,
 * Sorry for not fixing this ASAP I got really busy these pass few months.
 * Thanks for the code I will check this and apply it on the plugin to support php
   5.2 version.
 * Thank you so much for the help!!
 *  [xCD7x](https://wordpress.org/support/users/xcd7x/)
 * (@xcd7x)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/#post-6392004)
 * I’m getting a “You do not have sufficient permissions to access this page.” error
   with the code from i5513 when I try to export.
 *  Plugin Author [Christian Bautista](https://wordpress.org/support/users/akosicb/)
 * (@akosicb)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/#post-6392024)
 * Hi xCD7x,
 * Hmmm, it is working fine on my end. What version of wordpress are you using? 
   Please update it to 1.0.6 and let me know if the issue is still there.
 * Thank you!

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

The topic ‘Fail on cf7_abd.class.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-advanced-database_d0d0d0.
   svg)
 * [Contact Form Advanced Database](https://wordpress.org/plugins/contact-form-advanced-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-advanced-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-advanced-database/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-advanced-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-advanced-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-advanced-database/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Christian Bautista](https://wordpress.org/support/users/akosicb/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/fail-on-cf7_abdclassphp/#post-6392024)
 * Status: not resolved