Keep plugin working on front end regardless of php version
-
Hello,
Thanks for your wonderful plugin!
I’ll start off explaining an overview of my situation, then asking my question, in order to prevent confusion about what I’m asking. Then I’ll dig deeper providing background information to my problem unrelated to your plugin, which might end up creating a serendipitous solution.
My situation overview: I think I’m stuck with using php version 5.2.17
My question: is there an easy way to keep this plugin active on the front end regardless of the php version I’m using?
Or do I have to hardcode the plugin in certain theme files? For example, on a movie page, I’m assuming I could hardcode something to retrieve movie info from my database.
I’m hoping my first question is possible. If not, I’m hoping you could tell me what files I need to edit in order to keep the plugin active regardless of my php version, so my movie pages aren’t blank.
———————————————————-
———————–
Background information:
———————–This plugin worked perfectly fine for a over a year. A few months ago, I performed a long over due update to wordpress (I’m using latest version). Oddly, a few days later after updating wordpress, I began noticing the following message:
WPMovieLibrary error: your environment does not meet all of the system requirements listed below.
PHP 5.3+ (You’re running version 5.2.17)
WordPress 3.6+ (You’re running version 4.2.2)At first, I thought it must be an error, because in godaddy I have the programming language set to php 5.4. Then I remembered that regardless of the php version I have set in godaddy, When I first installed this plugin, I needed to specify the php version within htaccess (the htaccess code worked perfectly before updating wordpress):
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress AddHandler x-httpd-php5-3 .php
So, I looked in my htaccess file, an noticed that the “AddHandler x-httpd-php5-3 .php” snippet had gotten removed somehow. I updated it back to normal. refreshed a page in the wordpress admin area, and your plugin was working (only for first page load). If I refreshed the page again, my htaccess would automatically revert back to the code without the php version snippet.
I don’t no exactly what is going on, but I do know that the process of visiting a page, causes my htaccess to revert. each time I fix my htaccess (I’ve done it a number of times), it gets rewritten back to exclude the said snippet. Oddly, in godaddy, the date of the “reverted” htaccess file (without the php version snippet), is an older date. Maybe the htaccess file is getting rewritten do to some permalink situation, but godaddy has this old date for the htaccess file, because the htaccess content is the same as it was during that date. I don’t know.
…I was determined to get this to work. I removed many plugins, installed extra security measures, etc. After hours (maybe days) of troubleshooting, I thought to reinstall wordpress from the admin panel, even though I was already using the most current version. It worked, but only for a few days. For the past month, the only way to keep the plugin active, is to perform the same procedure every few days: Reistall wordpress from the admin panel and update the htaccess afterwards…or use godaddy’s history veiw and revert the whole website to the time it worked.
I’m not hacked, even though I thought I was at first. Also, I have other websites with completely different plugins (and not using this plugin) that do the same thing with my htaccess with the updated version of wordpress.
It’s the weirdest thing. I have seen various people try to figure out what the problem is via questions in forums, and it seems to have to do with wordpress permalinks, even though there is no answer other than to contact your hosting provider. I almost forgot to mention that it doesnt matter if I set the htaccess file to read only, it still gets reverted every few days.
I plan on trying to get to the bottom of the problem with godaddy when I get more time, but for now, I just want the plugin to work regardless of htaccess file (php version). I probably wont do anything with the website using this plugin for several months, but I’d rest well knowing that the site is up and running.
Again, I’m sure I haven’t provided enough information to know what the issue is and the best thing to do is keep calling godaddy until I find someone who knows how to fix this. So, after all that, my question is still the same, I need to get this plugin working regardless of php version.
Also, I tried editing this plugin to throw off the “deactivation upon lower php version detection”, but it just caused a white screen on front and back end, so I reverted.
Thanks again!
- The topic ‘Keep plugin working on front end regardless of php version’ is closed to new replies.