PHP Install on IIS 7, no test results - php

I am trying to install PHP on my IIS web server running version 7.0. I downloaded the php-7.1.8 Non Thread Safe for Windows 64. I then procceded to follow the steps found here: https://www.howtogeek.com/50432/how-to-install-php-on-iis-7-for-windows-server-2008/.
I had no issues with the install but when it came to the last step of creating the test PHP page and launching, instead of getting the results, i'm being asked to Open or save the file??
I've also tried putting this into a live website and accessing it outside the web server. When I try this I receive a 500 - Internal Server Error.
I had tried this about a year or two ago and got frustrated, so I gave up and have retried today but experiencing about the same result. Don't know what other information would help, but i'm willing to provide what's necessary. Thank you for any help.

After continuing research I ended up using the Windows Installer version (https://www.microsoft.com/web/platform/phponwindows.aspx) and then went back through the configuration steps of the php.ini file.

Related

Php version differs between homebrew and localhost

I try to update my php to 8.0 using homebrew. The update worked fine. The “php -v” shows that the actual version is 8.0.14. However when I open my localhost and go to “phpinfo.php” it shows the old version 7.4.22. Obviously my server still uses the old one. How to fix this? How to update the server version. I saw several post about similar problem, but the solutions offered didn’t work for me… I’m using Mac.
Thanks
So after long searching I finally found this step-by-step tutorial.
https://getgrav.org/blog/macos-monterey-apache-multiple-php-versions
What I did:
I added apache to my server;
I added php to my server (now I no longer need XAMPP);
I followed the step by step configuration to connect apache to php (through updates in httpd.conf file).

How to update MySqli to php5-mysqlnd

I recently started coding with Codeigniter, so fairly new, even to php.
I built my first app, installed it on server after Xampp. I got this error
Message: mysqli::real_connect(): Headers and client library minor version mismatch. Headers:50542 Library:50626
After searching online I found that I need php5-mysqlnd. I found this nice article but don't know where all these processes are happening.
Is there a tool in Cpanel where all these codes for updating php5-mysqlnd are taking place?
All I know I have Linux hosting version 5.4.45 with Hostgator.
it looks like I found another way to do it (not like the way that link said).
I was going through my CPanel and found an option to change my PHP version. I clicked and on next page it asked what all components I want to include, I couldn't believe "Mysqlnd" was one of them.
I changed it to 5.6 from 5.4.45. That's all it took.
Thanks a lot.

Webmatrix - PHP - Wordpress (not working)

I have spent 2 days and have read multiple posts / articles re this subject with no resolution. I am running WebMatrix 2 on XP Pro with sp/3. WM works like a charm until I try to open Word Press through Web Gallery. Every time I get a message that the
"installation failed because php-cgi.exe is not available. Please rerun the Windows installer for PHP and enable either 'IIs FastCGI' or 'Other CGI'."
The PHP starter site also fails for the same reason.
Apparently all php files were installed by webmatrix (including php-cgi.exe) so I can't figure out why word press (and the PHP starter site) fails and keeps throwing this error.
I even tried a totally new install of WebMatrix on an unused laptop with no existing PHP or mySql files and got exactly the same result. Apparently, there is a flaw built in to the WebMatrix program regarding running PHP.
I have a hard time believing that MSFT would even release this with such a functionality problem. I am not knocking MSFT because I think WM is an awesome product. But, if there are known post installation steps which need to be taken, a heads up would have been nice. I hope WebMatrix 3 users are not encountering the same problem.
Has anyone been able to figure this out?
Any help to fix this would be greatly appreciated.
Thanks for your help.
Have you watched this video? and followed all the instructions?
Installing Wordpress on Webmatrix
php-cgi.exe is a file which IIS runs to emulate PHP. This error is todo with the configuration of you IIS server on Windows.
Also have a look at this, which shows you how to install fast cgi on IIS
Installing Fast CGI with IIS

PHP has encountered an Access Violation at 77FCAFF8

I am running a PHP site that uses Ajax and jQuery as well. The site will run fine for quite some time, and suddently my pages (and ajax-retrieved sub-pages) comes back with the message
PHP has encountered an Access Violation at 77FCAFF8
It seems that rebooting the server corrects the issue. Running PHP Version 5.1.6 (Windows NT 5.0 build 2195). I did a some searching on here and some other sites, and there seems to be no fix..
URL REMOVED
UPDATE:
I think I'm on to something.. will get back to you.
UPDATE
After reviewing the IIS setup, i noticed there was no Handler Mapping setup for the website. This, of course begs the question - how did it ever work in the first place, when it was originally setup this way!? I added the handler mapping and it seems to be Okay so far.
UPDATE
The problem popped its heads out again this morning after 36 hours without encounering it. Back to the drawing board.
UPDATE
We ended up just moving the site to a secondary web server where we were able to upgrade PHP without an issue.
This is a PHP issue somewhere. You could spend some time narrowing down which function you're using that is causing the problem. I would instead upgrade to a newer version of PHP. If still no luck, try a slightly older version. There have been significant changes with version 5.3.2.
After some research I think this may be the solution (Taken from http://bugs.php.net/bug.php?id=28929 ):
[2010-06-11 15:12 UTC] in2ishun at yahoo dot com
***************** SOLUTION!!!!
I realize this issue is AGES old, but it still manages to be the top hit on Google searches as of now (6/2010).
I fixed my own instance of seeing this error. W2k3, IIS6, PHP 5.2.6, MySQL 5.1.
The problem is in the pathing. When I used the MSI installer for MySQL without doing an "advanced" installation (where I could manage the install details), it added a path to the system environment that contained spaces. Even after changing the path environment to use the Windows short-name location of the mysql bin directory, it still didn't work.
The solution was for me to reinstall mysql and set the default installation path to just off the root (e.g. C:\mysql). Once I did that the error went away and my app started working.
There are a number of sites with a variety of potential solutions to this issue and several of them mentioned paths and the "libmysql.dll" file (in the "bin" directory of your mysql installation).
If this helps you solve your problem, consider leaving a comment here so others can see that it works.

PHP -> CLI has stopped working

I recently installed Windows 7 on my desktop and the following problem has begun occuring:
I regularly run some PHP scripts from the commandline that are now giving this error in a popup window:
CLI has stopped working.
I cancel this and my script terminates. Not good...
I've googled around and tried most of the few ideas suggested but still i am plagued by this annoyance. Right now it appears to regularly occur when I do a file_get_contents() of a url pointing to an image file. Only happens when the url is http protocol, works fine for ftp files. It also happens spuriously doing other things as well.
This is PHP 5.3.0 as distributed in a xampp 1.7.2 .zip. All exe's and dll's have been unblocked by copying thru FAT32 and back.
hints from anyone who's cracked this would be most helpful.
Try updating your PHP version bundled with xampp. You might have to update some php_XXX.dll extension files.
More info: http://web2.0entrepreneur.com/31/cli-has-stopped-working-on-windows-vista.html
PHP-CLI stops under these circumstances: Windows 7 64bit, PHP 5.6.8 64bit, only when Zend OpCache extension is ENABLED!!!
Just edit php.ini and comment zend_extension=php_opcache.dll (with ; in front of it)
I found that this happened to me when I had the APC extension enabled. I switched to using the Wincache for PHP extension instead.
If you receive this error after installing WAMP, most likely you have another installation of PHP on your machine. This may have been installed using the Microsoft Web Platform Installer or by other means. The first thing you should do is un-install PHP.
If this doesn't work, check to make sure that IIS and Apache are not trying to use the same port. WAMP starts out with Port 80 as standard and IIS usually will be the same. The easiest way to fix this is to turn off IIS while running WAMP, but you can set either of them servers to port 81 or another port.
If this doesn't work, my last suggest is to look for multiple copies of php.ini on your machine. You may find them in places like the Windows directory. Make a backup of the file just in case, and then remove them from all of the folders except the WAMP folder.
it happened to me in laravel 5.I searched every where but no solution that fix my problem then i debug my web application at different points and found that if you comment your php code in laravel comments in blade template like
{{--print_r($date_a);--}}
Now comment like this
//print_r($date_a);
works
The solution for me was to stop using PHP 5.3.0 and go back to 5.2.11. Once I did this the "CLI has stopped working" issue disappeared.
I have the same issue with Windows 7 Professional.
My Apache Server has no problem finding and executing PHP within my web application but the command line execution gives the infamous message "CLI has stopped working."
The User Account Settings seem to allow executions.
Perl has no problem.
I always have to take my code to an XP machine and run it there to debug it.
You didn't specify that you were using xdebug, but just in case you were, I may be able to help. I had this error for a long time. It turned out I was on a slightly older version of Xdebug (php_xdebug-2.2.0-5.4-vc9.dll).
I replaced that file with "php_xdebug-2.2.2-5.4-vc9.dll" and it magically started working immediately.
I'm on wamp, and I updated both php.ini files (one is for cli, one for normal use) with the latest filename.
"zend_extension = c:\wamp\bin\php\php5.4.3\ext\php_xdebug-2.2.2-5.4-vc9.dll"
Then dropped the new file into the php ext folder and instant success.
I had the same issue on Windows 7 (Home premium). I had a hunch that it is caused by one of the extensions I installed so I started commenting them out one-by-one.
Turned out it was caused by a non-compatible mongodb extension I was using
Edit php.ini and comment zend_extension=opcache.enable_cli=1 (with ; in front of it)
Try to use another php version instead.
It works perfectly for me.
Try to run scripts with php-cgi.exe instead of php.exe. For me it works.

Categories