I am trying to add an options page to my plugin and I am using a hook that calls a method of a class. How do I also make this callback reference the method inside this class. Here is the code that I have for it so far. class Wordpress_Admin_Config_Class { public function load_options_page() {…
I have just setup php-fpm to replace mod php with Apache on Centos 7. When i try to run the code, I am getting a permission denied error. What am I doing wrong?
I have switched from using mod PHP in Apache to using PHP-FPM. It was always done via restarting apache in the past, so this was never an issue for me. How do I restart the service now that it is running this way?
I was recently setting up PHP 5.6 on IIS 8.5 and hit an error. C:Program Files (x86)\PHP\v5.6\php-cgi.exe - The FastCGI process exited unexpectedly I had been following a guide and this one didn't make much sense. After trying to endlessly debug this I found out that it wasn't actually anything to do with PHP or…
There are a few ways to make a http request in PHP. The most robust way to do it is with curl and based on how complex the query is, maybe your only option. If you are just making a basic enough request, the amazingly simple file_get_contents() can be used. Yes, this function also opens…
There are various reasons that you might want to force a website to use SSL. In general, if you have an SSL cert setup for your website, you should probably force all users to https even if the page doesn't contain sensitive data. In an ideal world, you would do this on the server side…
When you have obtained a list of emails from a location that required little to no validation on whether it was a real email, you will be stuck trying to determine if the email address is real or not. You don't want to risk sending out an email to these users without checking as a…
This tutorial will show you how to take┬áthe media manager from Wordpress and use it on an external page with a stock version of TinyMCE. I saw some posts about this and people were calling the Wordpress editor to achieve this. Its an option, but it is not what this guide is for. If you…
When pulling comments from a database table, it can be very costly when you are performing a query that will automatically sort all of the comments into the parent child hierarchy. Every extra ms your SQL server spends performing calculations is time that is wasted. If you can easily move this logic to the programming…