search
HomeBackend DevelopmentPHP ProblemWhy can't php be opened?

Why can't php be opened?

Oct 22, 2019 am 09:30 AM
php

Why can't php be opened?

Why can’t php be opened?

If you want the machine with IIS installed to support PHP, you need to install a special PHP interpreter.

First you download php-4.3.4-Win32.zip.

The following are the configuration steps:

1) Unzip all files and folders in php-4.3.3RC4-Win32.zip and place them in C:\ \php4\\ folder, you did not create the folder yourself

2) Enter the php4 folder, check the root directory and subdirectories, copy and paste all .dll files to C:\\WINNT\\

3) Copy the php.ini-dist and php.exe files in the php4 folder to

C in system32 (WIN2K) or C:\\WINDOWS\\system32 (WINXP) :\\WINNT\\(WIN2K) or C:\\WINDOWS\\(WINXP), and change the php.ini-dist file to php.ini

4) Double-click php.ini to open the configuration file, make the following three modifications:

1> Change extension_dir = "C:\\php4\\extensions" to the path of the extensions folder where you installed php4

2> ;cgi.force_redirect = 1 Change to cgi.force_redirect = 0

3> Change register_globals = Off to register_globals = On

4> Find the ;Windows Extensions section, you should see the following Code

;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
;extension=php_zip.dll

The specifics depend on which .dll files you need to load, but you can change it as I did below. The main thing is to remove the semicolon ( ; ) in front of the .dll file you want to load:

;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
;extension=php_curl.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_domxml.dll
extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
;extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xslt.dll
;extension=php_yaz.dll
;extension=php_zip.dll

5) Open the Control Panel - Administrative Tools - Internet Services Manager again, right-click on "Default Web Site" and select "Properties"

6) Select "Default Web Site Properties" On the "Home Directory" tab of the window, click the "Configuration" button in the lower right corner. The "Application Configuration" window appears. Click the "Add" button under "Application Mapping" to add the following program mapping:

Executable file: C:\\php4\\php.exe %s %s (that is, your php4 folder path)

Extension: .php

Confirm to complete the configuration!

7) Switch to the "ISAPI Filter" tab of the "Default Web Site Properties" window, click the "Add" button on the right, and add the following filter:

Filter name : PHP

Executable file: C:\\php4\\sapi\\php4isapi.dll (that is, the sapi folder path of your php4 folder)

Close "Internet after confirmation" Service Manager"

8) Continue to switch to the "Document" tab of the "Default Web Site Properties" window, click the "Add" button on the right, and add the following "Enable Default Document":

index.php You can also add index.php3 index.php4, etc. It depends on your needs

Click the "↑" button on the left to raise the index.php document to the top

Now your IIS also supports PHP.

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of Why can't php be opened?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.