Apr 04, 2016 In this tutorial, you’ll learn how you can make your own WAMP server by installing Apache, PHP and MySQL server manually on Windows 10. Learn to install Apache, PHP and MYSQL on Windows 10 Machine step by step. It should get you up and running with a Apache/PHP/MySQL install in no time. You could even compare the WampServer config files with your own to see where you originally went wrong.
Active10 years, 11 months ago
I've updated php.ini and moved php_mysql.dll as explained in steps 6 and 8 here.
I get this error…
MySQL doesn't show up in my phpinfo; report.
I've updated the c:Windowsphp.ini file from
to
Result: no change.
I changed the php.ini value of extension_dir thusly:
Result: much more in the phpinfo; report, but MySQL still isn't working.
I copied the file libmysql.dll from folder C:php to folders C:WindowsSystem32 and C:Windows
Result: no change.
I stopped and restarted IIS.
Result: new, different errors instead!
I found several .php files in the website where I had to set variables:
Result: The site works!
Community♦
Zack PetersonZack Peterson
31.9k7676 gold badges196196 silver badges278278 bronze badges
4 Answers
As the others say these two values in php.ini are crucial.
I have the following in my php.ini: note the trailing slash - not sure if it is needed - but it does work.
Also it is worth ensuring that you only have one copy of php.ini on your machine - I've had problems with this where I've been editting a php.ini file which php isn't using and getting very frustrated until I realised.
Also if php is running as a module within apache you will need to restart the apache server to pickup the changes. Wise to do this in anycase if you're not sure.
![]()
a 'php -m' from the cmd prompt will show you the modules that are loaded from the ini file.
Richard HarrisonRichard Harrison
17.9k33 gold badges3434 silver badges6363 bronze badges
In the php.ini file, check if the extention path configuration is valid.
vIceBergvIceBerg
2,60455 gold badges3434 silver badges5151 bronze badges
You will need to enable the extension=php_mysql.dll option in the php.ini as well. Also, make sure that the file is in the extension_dir you set.
You can read more about it at:
Harrison FiskHarrison Fisk
6,38033 gold badges2020 silver badges1414 bronze badges
On a completely different note, might I suggest WampServer? It should get you up and running with a Apache/PHP/MySQL install in no time.
You could even compare the WampServer config files with your own to see where you originally went wrong.
leekleek
7,35577 gold badges3838 silver badges5959 bronze badges
Not the answer you're looking for? Browse other questions tagged phpmysqlwindows or ask your own question.-->
by Ruslan Yakushev
This article describes how to configure the FastCGI module and PHP to host PHP applications on IIS 7 and above.
Important
This article provides instructions on how to install and use the FastCGI component on Windows Server 2008 and Windows Vista SP1. SP1 is required on Windows Vista.
Overview
The FastCGI module in IIS enables popular application frameworks that support the FastCGI protocol to be hosted on the IIS Web server in a high performance and reliable way. FastCGI provides a high-performance alternative to the Common Gateway Interface (CGI), which is a standard way of interfacing external applications with Web servers that has been a part of the supported IIS feature set since the first release.
CGI programs are executable files that are launched by the Web server for each request to process the request and generate dynamic responses that are then sent back to the client. Because many of these frameworks do not support multi-threaded execution, CGI enables them to execute reliably on IIS by executing exactly one request per process. Unfortunately, it provides poor performance due to the high cost of starting and shutting down a process for each request.
FastCGI addresses the performance issues that are inherent in CGI by providing a mechanism to reuse a single process over and over again for many requests. Additionally, FastCGI maintains compatibility with non-thread-safe libraries by providing a pool of reusable processes and ensuring that each process handles only one request at a time.
Enable FastCGI Support in IISWindows Server 2008
Go to Server Manager > Roles > Add Role Services. On the Select Role Services page, select the CGI check box. This enables both the CGI and FastCGI services.
Windows Vista SP1
Go to Control Panel > Programs and Features > Turn Windows features on or off. In the Windows Features dialog box, select the CGI check box. This enables both the CGI and FastCGI services.
IMPORTANT: Install the Update for the FastCGI Module
The update for the IIS FastCGI module fixes several known compatibility issues with popular PHP applications. Install the update from one of the following locations:
Install the Administration Pack for IISMysql Module Php
Among other useful features, the Administration Pack for IIS has a convenient user interface for configuring FastCGI settings. The Administration Pack can be installed from the following locations:
Install and Configure PHP
It is recommended that you use a non-thread safe build of PHP with IIS FastCGI. A non-thread safe build of PHP provides significant performance gains over the standard build by not doing any thread-safety checks, which are not necessary, since FastCGI ensures a single threaded execution environment.
To install PHP
If PHP installed correctly and all its dependencies are available on the machine, this command will output the current PHP configuration information.
Configure IIS to Handle PHP Requests
For IIS to host PHP applications, you must add a handler mapping that tells IIS to pass all PHP-specific requests to the PHP application framework by using the FastCGI protocol.
Configure IIS to handle PHP requests by using IIS Manager
Configure IIS to handle PHP requests by using the command line
Download sound driver for hp. Alternatively, you can complete the steps above by using the command line tool A ppCmd.
Best Practices for Configuring FastCGI and PHP
This download contains a summary presentation on Best Practices for hosting PHP in a shared hosting environment.
Security Isolation for PHP Web Sites
The recommendation for isolating PHP Web sites in a shared hosting environment is consistent with all general security isolation recommendations for IIS. In particular, it is recommended to:
For more details about security isolation in a shared hosting environment, see Ensure Security Isolation for Web Sites.
PHP Process Recycling Behavior
Ensure that FastCGI always recycles the php-cgi.exe processes before the native PHP recycling kicks in. The FastCGI process recycling behavior is controlled by the configuration property instanceMaxRequests. This property specifies how many requests the FastCGI process will process before recycling. PHP also has a similar process recycling functionality that is controlled by the environment variable PHP_FCGI_MAX_REQUESTS. By setting instanceMaxRequests to be less than or equal to PHP_FCGI_MAX_REQUESTS, you can ensure that the native PHP process recycling logic will never kick in.
The FastCGI settings can be configured either by using IIS Manager or by using the command line tool A ppCmd.
Configure FastCGI recycling settings by using IIS Manager
Configure FastCGI recycling settings by using the command linePhp Windows Apache
Configure the recycling behavior of FastCGI and PHP by using AppCmd by running the following commands:
PHP Versioning
Many PHP applications rely on functions or features that are available only in certain versions of PHP. If these types of applications are to be hosted on the same server, different PHP versions must be enabled and running side-by-side. The IIS FastCGI handler fully supports running multiple versions of PHP on the same Web server.
For example, assume that on your Web server you plan to support PHP 4.4.8, PHP 5.2.1, and PHP 5.2.5 non-thread safe. To enable that configuration, you must place corresponding PHP binaries in separate folders on the file system (e.g.
C:php448 , C:php521 and C:php525nts ) and then create FastCGI application process pools for each version:
If you have three Web sites (site1, site2, site3) and each site must use a different PHP version, you can now define handler mappings on each of those sites to reference a corresponding FastCGI application process pool.
Note
Each FastCGI process pool is uniquely identified by a combination of fullPath and arguments properties.
PHP Security Recommendations
The following settings can be used to tighten the security of a PHP installation. To make the recommended changes, locate and open the php.ini file and edit the configuration settings as described below:
Enabling per-site PHP configuration
This section describes the recommended way of enabling per-site PHP configuration. This recommendation was discovered and validated by Radney Jasmin with hosting provider GoDaddy.com who now offers PHP hosting on Windows Server 2008 by using FastCGI.
Per-site PHP Process Pools
When each Web site has its own application pool, which is a recommended practice on IIS, it is possible to associate a dedicated FastCGI process pool with each Web site. A FastCGI process pool is uniquely identified by the combination of fullPath and arguments attributes. If you need to create several FastCGI process pools for the same process executable, such as php-cgi.exe, you can use the arguments attribute to distinguish the process pool definitions. With php-cgi.exe processes, you can also use the command line switch '-d' to define an INI entry for a PHP process. You can use this switch to set a PHP setting that makes the arguments string unique.
For example, if there are two Web sites 'website1' and 'website2' that must have their own set of PHP settings, the FastCGI process pools can be defined as follows:
In this example the PHP setting open_basedir is used to distinguish between the process pool definitions. The setting also enforces that the PHP executable for each process pool can perform file operations only within the root folder of the corresponding Web site.
Then website1 can have the PHP handler mapping as follows:
and website2 can have the PHP handler mapping as follows:
Specifying php.ini location
When the PHP process starts, it determines the location of the configuration php.ini file by using various settings. The PHP documentation provides a detailed description of the PHP startup process. One of the places where the PHP process searches for the php.ini location is the PHPRC environment variable. If the PHP process finds a php.ini file in the path that is specified in this environment variable, it will use it; otherwise, the PHP process will revert to using the default location of the php.ini file. This environment variable can be used to allow hosting customers to use their own versions of php.ini files.
For example if there are two Web sites 'website1' and 'website2' that are located at the following file paths:
C:WebSiteswebsite1 and C:WebSiteswebsite2 , you can configure the php-cgi.exe process pools in the <fastCgi> section of the applicationHost.config file as follows:
Install Mysql Module Php Windows Hosting 2008 R2
This way website1 can have its own version of the php.ini file that is located in the
C:WebSiteswebsite1 , while website2 can have its own version of the php.ini file that is located in C:WebSiteswebsite2 . This configuration also ensures that if a php.ini file cannot be found in the location that is specified by the PHPRC environment variable, then PHP will use the default php.ini file that is located in the same folder where the php-cgi.exe is located.
Provide URL Rewriting Functionality for PHP Applications
The majority of popular PHP applications rely on the URL rewriting functionality in Web servers to enable user-friendly and search engine-friendly URLs. IIS provide URL rewriting capabilities by using the URL rewrite module.
For more information about how to use the URL Rewrite module, see the following articles:
Install Php Mysql Windows
Related resources
For more information regarding hosting PHP applications on IIS refer to the following resources:
For certain products, a driver is necessary to enable the connection between your product and a computer. On this tab, you will find the applicable drivers for your product or in the absence of any drivers, an explanation of your product's compatibility with each operating system. Download driver printer canon mp 190.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |