- This topic has 15 replies, 4 voices, and was last updated 5 years, 4 months ago by
David.
-
AuthorPosts
-
August 26, 2018 at 4:53 pm #660640
Denise
Hello GP Friends,
The GP Elements create new hook page displays the message:
Unable to execute PHP as DISALLOW_FILE_EDIT is defined.My wp-config file is set at:
define( ‘DISALLOW_FILE_MODS’, FALSE );
define( ‘DISALLOW_FILE_EDIT’, FALSE );I have deactivated all plugins except Generate Press, including Gutenberg and ACF.
I read the support notes at: https://docs.generatepress.com/article/disallow-php-execution/
What steps do you recommend?Thanks,
DeniseAugust 26, 2018 at 8:18 pm #660731Tom
Lead DeveloperLead DeveloperInstead of defining those as false, try just removing them from
wp-config.php.Let me know 🙂
August 27, 2018 at 6:35 pm #661723Denise
Hi Tom,
I commented out the line define( ‘DISALLOW_FILE_EDIT’, FALSE );
in the wp-config file.
That worked!
I was able to create a hook and use PHP.Do you think this is an issue with WordPress?
I wonder if it will get over-written with the next upgrade?
My hosting vendor is WP Engine and they install the upgrades and patches.Thanks,
DeniseAugust 27, 2018 at 7:38 pm #661758Tom
Lead DeveloperLead DeveloperIt won’t be overwritten – you should be good to go now 🙂
June 8, 2020 at 7:39 am #1319192Margaret
Hello, I’m having the same issue with “Unable to execute PHP as DISALLOW_FILE_EDIT is defined.” when trying to setup Breadcrumbs.
Can you help me locate the wp-config.php file?
June 8, 2020 at 8:54 am #1319445David
StaffCustomer SupportHi there,
the wp-config.php is located in the root directory of your WordPress install. So you would need to have FTP or console access to your server. You’re host will be able to assist with that.
Alternatively if you want to enable PHP for your Hook elements then you can add this PHP function to your site:
add_filter( 'generate_hooks_execute_php', '__return_true' );This article explains how to add that:
https://docs.generatepress.com/article/adding-php/October 29, 2020 at 4:37 am #1509095Lisa
HI also having an issue with this.
I have this in my wpconfig.php
<?php
define(“WP_DEBUG”, false);
define( ‘DISALLOW_FILE_EDIT’, true );
define( ‘GENERATE_HOOKS_DISALLOW_PHP’, true );what do I need to do to allow a script hook in on a specific page.
(this is an unsubscribe form for Constant Contact)lisa
October 29, 2020 at 5:31 am #1509141David
StaffCustomer SupportHi there,
instead of editing your WP-config, try adding this PHP snippet to your site:
add_filter( 'generate_hooks_execute_php', '__return_true' );October 29, 2020 at 5:52 am #1509163Lisa
Thanks that did it.
October 29, 2020 at 7:42 am #1509276David
StaffCustomer SupportGlad to hear that
November 11, 2020 at 10:31 am #1527215Lisa
David hi,
Im still have an issue with this code.
I added the line you gave me in snippets.
And originally I saw the code working (it is an unsubscribe form from constant contact)
But it is no longer showing on the front end.
any suggestions?November 11, 2020 at 2:18 pm #1527472Tom
Lead DeveloperLead DeveloperHi there,
Are you still seeing the
DISALLOW_FILE_EDITerror in the Elements editor when building your hook?November 12, 2020 at 2:16 am #1527914Lisa
HI Tom
1. I pasted in elementor text area – not showing
2. I pasted in Elementor html widget – not showing
3. I added in GP elements Hook – to show only on this single page ;
placed ‘generate_inside_site_container’ – not showingI am seeing a blank page – nothing is showing
Lisa
November 12, 2020 at 5:08 am #1528091David
StaffCustomer SupportHi there,
can you raise a new topic where you can use the Private Information to share a link to your site, if you want you can provide temporary admin access login, we cant take a look at what the issue is.
November 12, 2020 at 5:43 am #1528125Lisa
ok. will do
-
AuthorPosts
- You must be logged in to reply to this topic.