HI I am trying to configure IIS7 to run PHP on a windows 2008 server machine.
I have followed this guide, php running on IIS7
Everything went well and I am sure it was working!!
However now when I try and run phpinfo.php the browser wants to download the page rather than running the script.
The handler mapper is configured the same as the the example. fastCGI/CGI is installed and enabled.
a normal index.html open no problem.
I have checked permissions, created a new empty site apart from phpinfo.php
I developed the site on my pc in a xampp environment where everything work great. First time I have tried to convert a site from xampp to IIS.
Their is no entry in the MIME Types, I am wondering if the WEB.CONFIG file is the issue but I don't know enough about what the file should/shouldn't contain.
thanks for any help
you can use http://php.iis.net/ to install php into your IIS setup. It comes with a manager to help you easily implement php in to your iis server and is way easier then trying to configure it manually. Hope this helps.
Related
XAMPP has some error about ports I uninstall it but did not back up any information and now my project does not run on local host is there any way for me to restore my old project or I have to do it again on new XAMPP? another problem is after reinstalling XAMPP windows do not know PHP what should I do?
by the way I am a very beginner in this :)))
So, I will try to explain this:
Websites (i.e. with PHP) need a webserver. For example when you go to stackoverflow.com, you automatically call a webserver who then compiles the PHP scripts on the server to HTML code.
This principe does also apply to your local installation.
When you call localhost, you basically call yourself as the webserver. XAMPP is a tool that can "simulate" a webserver on your PC, thats why PHP sites do not work without it, because your browser doesn't know what to do with PHP code, it only understands HTML.
If you install XAMPP again you should be able to get it running.
If you have any questions/problems with the XAMPP installation, feel free to ask again.
I'm trying to set up a PHP server. We have an old server that runs a bunch of in house forms over an intranet that is coded in ASP, and I'm trying to rebuild that into a better system using PHP.
I'm starting fresh, as have been given a Win 2012 r2 server.
I first tried installing IIS 8. I installed downloaded the files for php (version 7). I was successful in being able to access index.html and any other files placed in the c/inetpub/wwwroot folder from a different PC via a browser (http://servername/file.php). However, I installed MariaDB and phpmyadmin. phpmyadmin gave the the message the mysqli extension is missing.
I ultimately uninstalled IIS, and PHP, and the MariaDB. I wanted to start from scratch, and tried with Apache
I was able to get Apache and PHP to work together, but I could not access files in the htdocs folder from a different PC (going to http://<servername>/file.php). I could only access it via localhost.
I had the same problems with phpmyadmin and mysqli.
I also noticed there was no php.ini file... rather I saw a php-ini-production and php-ini-development files.
How to I fix the phpmyadmin problem? Any advice for configuring apache so that I can access files place in the htdocs folder from a device other than the server itself (non-localhost)?
I recommend using XAMPP, then you'll have MySQL, and may be you could configure to use MariaDB as well.
If you use XAMPP, phpmyadmin is not available other than localhost, but that is configurable. If you want i can help you find a good video for that.
take the php-ini-production file and rename it to php.ini and find the line
;extension=php_mysqli.dll
and just remove the leading semicolon (;), save and restart apache.
Also you need to open the firewall on your machine to allow port 80 to accept all connections.
I think I'm having the same issue as this link: Apache is downloading php files instead of displaying them
I'm trying to install Roundcube on my Linode server but when I go to www.myurl.com/roundcube it downloads the php files.
I read through that link and I see people saying to add things to different files, but I don't know where to look.
I'm new to Linode, I'm used to hosts with cPanels and such. So, I need a bit of a point in the right direction.
With linode you have the raw server ie you need to ssh into it and configure it. Start with this guide.
https://www.linode.com/docs/websites/hosting-a-website
Once you have a basic site running then configure apache to use PHP.
I'm starting a new project using Linux and PHP, but for the early dev state i'm now, I'm trying to use XAMPP for now.
I'm Running Ubuntu 10.04 x64 on a laptop, And got everything I need. The site I should build is based upon CodeIgniter and some implementation of smarty, but I think this is not that important because the same site runs pretty well on windows (with XAMPP )
The Problem I have is, if I put some php file on the root (like foo.php) with phpinfo() on it, the server parsed it as it should be, but when I try to get the url for one CodeIgniter app (as http://localhost/site/site.php ), Firefox tries to download the file & Chrome alerts some server error.
Again, the site as it works perfectly on windows (I share code using mercurial, if that's important)
I have around 3 codeigniter apps sharing the same System folder, and those get pickup by the loader (as site.php, admin.php...), but anyone I pick I still getting the same msg.
Also, the server list all the files perfectly, and tried to rename the file and then asked for the same (to see if the problem is cache or something) but I get a 404.
I'm also a newbie on apache and linux in general, I don't know what to do...
Check your apache.conf and httpd.conf. There are configuration entries called AddHandler which assign a module to each file extension which should handle this. If no module is provided the apache will send the file as plain text to the client.
I am trying to get PHP working on my vista home machine but I am getting weird problems. First I had file permission problems for which I disabled Vista's UAC. Now I can't get the PHP interpreter working.
I have made all the necessary changes following some tutorial but I still can't get it working.
Tutorial was located here: http://www.tanguay.info/wamp/installPhp5.php5
Try XAMPP. I use that at home on a Vista machine and it worked nicely after the install.
WAMPServer is also a good option. You can easily enable/disable both PHP extensions and Apache 2 modules. Everything is set up somewhat securely (only local access to the serve), and you get phpMyAdmin already set up.
Only thing I've ever missed is Memcached, but that is fairly easy to set up on your own.
The only problem I have installing PHP and Apache on Vista is that you need to make sure that when you edit the httpd.conf that you are editing it as an admin, otherwise the file is saved in compatibility mode.
To overcome that problem just type notepad++ or whatever in your start menu, right click the item and run as administrator. Then open the file from the app.
You can use FastCGI for IIS 7. I'm using this also and it works perfectly!!
FastCGI
You can try Zend Core
It works on both IIS and Apache (it includes the installation of the Apache)
iis7 is one of the best web servers and especially for php, if you can't get it to work it means you need to google enough, because it isn't logical to blame Vista for php/apache issues