It has instructions for Linux and other Unix systems, macOS, Windows, and more. In case you are administering your server yourself, you can follow the PHP installation guides in the official documentation. If that also fails, get in touch with your provider to have this sorted out. In that case, check your hosting provider’s back end if there is an option for you to enable it. If neither of these is working, it most likely means you currently don’t have PHP active on your server. If accessing the file through a web browser results in "Test" being displayed without the associated PHP code, this also means that PHP is working fine on your server. This will display the same information as above if you access the file via browser.įinally, you could also use a simple code snippet like. php extension to your document root with the contents. If not, and it shows any errors, this will also tell you something.Īlternatively, try uploading a file with a. If you have access to the command line, you can simply type in php -v to see if it returns the version information of your PHP installation. You can not execute anything written in PHP if the programming language is not even installed on the server. When PHP is not working on your server, the first thing to do is check if it’s even present and available. Make Sure PHP Is Installed and Running Properly When that is the case, you have a number of different ways of trying to address it. The latter case is even worse because it may pose a security risk to boot, besides being annoying.Įither way, what is supposed to happen is not happening, which is to run the PHP script. Maybe the PHP source code shows up directly in the browser window. Maybe when you try to open it in your browser, you get a download prompt instead. This can result in several different kinds of behavior. The first case we want to look at is when you have a PHP file that is not executing on an Apache server. Hopefully, we will be able to help you with your issue. We will look at a couple of cases that you might encounter in different circumstances and also provide solutions for how to get back on track. To help you get over this problem, in this tutorial we will go over common reasons why PHP might not be working for you as it should. Everything seems in place, you have done all you are supposed to do but still - nothing. “Why is my PHP not working!?” If you have ever found yourself in a situation where you needed to ask that question, you know how frustrating problems with PHP can be.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |