stupeur Posted November 14, 2017 Share Posted November 14, 2017 Hi everybody, I have some code that is incompatible with php 5.5 and above, so I found myself stuck to php 5.4 which causes come other trouble an some other incompatibilities i my site here is the problematic code : <section class="full-width-bg gray-bg normal-padding get-in-touch-overlay"> <div class="row"> <div class="col-lg-6 col-md-6 col-sm-8 col-lg-push-3 col-md-push-3 col-sm-push-2"> <h2><span style="color: #ffffff;"><?php _e('Contact Form', 'marine'); ?></span></h2> <form class="get-in-touch contact-form" method="post"> <?php wp_nonce_field('contact_form_submission', 'contact_nonce', true, true); ?> <input type="hidden" name="contact-form-value" value="1" id=""/> <div class="iconic-input"><input type="text" name="name" placeholder="<?php _e('Name*', 'marine'); ?>"> <i class="icons icon-user-1"></i></div> <div class="iconic-input"><input type="text" name="email" placeholder="<?php _e('E-mail*', 'marine'); ?>"> <i class="icons icon-mail-4"></i></div> <textarea name="msg" placeholder="<?php _e('Message', 'marine'); ?>"></textarea> <input type="submit" value="<?php _e('Send Message', 'marine'); ?>"> <div class="iconic-button"><input type="reset" value="<?php _e('Clear', 'marine'); ?>"> <i class="icons icon-cancel-circle-1"></i></div> </form> <div id="msg"></div> </div> </div> </section> please help thanks Quote Link to comment Share on other sites More sharing options...
Barand Posted November 14, 2017 Share Posted November 14, 2017 Do you have PHP's error reporting turned on? If so, what errors do you get? Just telling us that there is a problem is no use whatsoever. What, exactly is the problem you are experiencing? In future, when you post code, use code tags (the "<>" button on the toolbar). Quote Link to comment Share on other sites More sharing options...
stupeur Posted November 14, 2017 Author Share Posted November 14, 2017 Thanks for your reply, and sorry Yes the debug is on and actually I have no error message but the form submit button remains on sending message and the form is not submitted when I turn back to php 5.4 / 5.3 everything works fine Quote Link to comment Share on other sites More sharing options...
AzeS Posted November 15, 2017 Share Posted November 15, 2017 (edited) Which functions are accessed in this section? which code is behind it for example: _e (...)?And whats the code behind where the $_POST data is sent to ? Edited November 15, 2017 by AzeS Quote Link to comment Share on other sites More sharing options...
phpmillion Posted November 15, 2017 Share Posted November 15, 2017 I believe the problem is somewhere else in your code. The only PHP code snippet in your submit button is a basic function that displays title for submit button, so if it's displayed properly, you can safely eliminate it from debug list. If you view POSt headers (you can do that using a plugin like http live headers if your browser doesn't support this feature), does data actually get posted? Also, it looks you run WP. Is it the latest version (including plugins)? I somehow have a feeling the issue might be related to some antispam plugin, which might be out-of-date and cause problems with new versions of PHP. Quote Link to comment Share on other sites More sharing options...
maxxd Posted November 15, 2017 Share Posted November 15, 2017 What plugin are you using to send your email? WordPress recommends version 7 or greater, but very much works with 5.5 and up. Also, if the plugin you're using does ajax submissions open your console and check the networking. I know there were a couple issues with Ninja Forms until a recent update that would cause behavior that sounds like what's you're describing. Quote Link to comment Share on other sites More sharing options...
stupeur Posted November 16, 2017 Author Share Posted November 16, 2017 Thank you all Actually I am quite a newbie to all this, the contact form is featured with the template and not really customisable. I am running the latest version of wp and everything works fine, either with php mail or wp mail smtp ( for the other contact forms from CF7) I think I will get rid of this contact form once and for all Thanks Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 17, 2017 Share Posted November 17, 2017 the problem is likely in the form processing code, it's probably relying on register globals and is expecting program variables to be set that aren't. the php version change the OP made is probably, correctly, turning off register globals and the badly written code is no longer detecting that anything was submitted. Quote Link to comment Share on other sites More sharing options...
phpmillion Posted November 17, 2017 Share Posted November 17, 2017 mac_gyver, please correct me if I'm wrong, but I believe register globals feature was already removed in PHP 5.4?. So if script works on PHP 5.4 and stops working on 5.5, it can't be related to register globals. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 17, 2017 Share Posted November 17, 2017 Haven't register globals been off since version 4.0, about 15 years ago? Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 17, 2017 Share Posted November 17, 2017 i was off by one digit in the php version when writing the reply above Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.