Apache is unable to parse PHP problem

Source: Internet
Author: User
Tags apache php php mysql vc9 microsoft c
After three or four days, almost crazy, the little woman here to ask you how to configure
The following is my modified configuration file, PHP directory is c:\php,php INI file also changed

Apache has also modified the
LoadModule php5_module "C:/php/php5apache2_2.dll"


DirectoryIndex index.php index.html



AddType application/x-httpd-php. php. phtml
AddType Application/x-httpd-php-source. Phps
Phpinidir "c:/php"


Reply to discussion (solution)

View:
Computer, properties--Advanced environment variables,
Is there a path to the PHP program?

C:\php has been added to the environment variables; C:\php\ext

How easy it is to install with an installation kit. Like XAMPP.

It's hard to get the Apache to run. I'm afraid I'm going to have to worry about the next thing. I'm win7, by the way.

Let's see if c:/php/php5apache2_2.dll this file exists.

There's this file.

httpd.conf file Modifications:

AddType application/x-httpd-php. php
...

DirectoryIndex index.php index.html

...
#BEGIN PHP INSTALLER edits-remove only on UNINSTALL
Phpinidir "C:/apache"
LoadModule php5_module "C:/apache/php5apache2_2.dll"
#END PHP INSTALLER edits-remove only on UNINSTALL

I don't have addtype application/x-httpd-php-source on this side. Phps this line.
You comment out and try again?

Must be restarted after the service is finished.

Is that all right? Any further questions?

Uninstall the original Apache and delete the original installed directory. Then under Http://windows.php.net/downloads/releases/archives/php-5.3.5-Win32-VC6-x86.msi install Apache install this PHP automatically write configuration information to config All day.

Look at the Mime.types file and search for "PHP" to see if there is
application/x-httpd-php PHP
Application/x-httpd-php-source Phps
These 2 lines.

It doesn't seem.
application/x-httpd-php PHP
Application/x-httpd-php-source Phps

Does it have to be added up?

If not, fill it up.

If you can reinstall, the 10 floor method is the most convenient.

I made it up, but it didn't work.

Open the Event Viewer, application, and see what it's doing wrong.
Application, Event Viewer, System Tools, computers, desktop, computer.

Just using Apache HTTP Server 2.2.22
Win32 Binary without Crypto (no mod_ssl) (MSI Installer): Httpd-2.2.22-win32-x86-no_ssl.msi
Http://mirror.bjtu.edu.cn/apache//httpd/binaries/win32/httpd-2.2.22-win32-x86-no_ssl.msi
+
PHP 5.2 (5.2.17)
VC6 x86 Thread Safe (2011-mar-22 13:29:30)
Http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.msi
Erection success.


Only 2 places were changed,
Home settings:

DirectoryIndex index.php index.html

...
End of file PHP load:
Phpinidir "C:/apache"
LoadModule php5_module "C:/apache/php/php5apache2_2.dll"

Apache installed in: C:/apache
PHP installed in: c:/apache/php
System environment variable added: C:\Apache\; C:\Apache\PHP\, .....

Application/x-httpd-php-source Phps

This is only used to parse Phps, no, it doesn't matter.
The key is LoadModule.

Sympathy, the problem cannot be debugged. It's like two people haven't picked up the top, let alone finished the task.
The only way is to try it over and over, try to do it differently than the last one. Search the Internet for "Apache PHP MySQL" and find out if you have missed the steps.

I compromised, installed a appserver, and I thought it might be my OS problem.

Next file Comparison tool (Beyondcompare,ultracompare, etc.),
Compare the Appserv directory with your Apache and PHP directories,
You can find the difference right away.

In addition, I provide a free installation of the green server, just hit the package,
In my resources:
http://download.csdn.net/detail/guilyn/4214864
You try Win7,:).

No, give Guilyn.

By the way, I'm Win7 's building.
A Win7 was installed after the festival and encountered the same problem.
Depressed for a few minutes, suddenly thought of a VC9 version,
Php-5.3.10-win32-vc9-x86.msi
http://windows.php.net/download/
Sure enough, the problem was solved after reloading.

Official Note:

Which version do I choose? If you is using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHPIF for the using PHP With IIS should use the VC9 versions of PHPVC6 versions is compiled with the legacy Visual Studio 6 compilerVC9 Versi ONS is compiled with the Visual Studio compiler and has improvements in performance and stability. The VC9 versions require to the Microsoft C + + runtime (x86) or the Microsoft C + + runtime (x64) Installe DDo not use VC9 version with apache.org binariesVC9 versions of Apache can is fetched at Apache Lounge. We use their binaries to build the Apache Sapis.

I am also this version, and then installed under XP, engaged in a half-day also appeared this problem. Check a lot of articles, including the landlord of this article. Still baffled. Later thought, since some people can be configured, it is likely that their own system problems. If other programs are running well, the system problem alone is not very similar. The most likely problem is the installation between Apache itself and PHP. Finally solved today. The crux of the problem is that before if you installed PHP MSI (that is, install version) must first uninstall clean, and then use the zip version of the decompression to modify the httpd.conf file, modify the method is above Guilyn on 18# said on the way. If you feel that it is not clean after uninstalling, search the registry to remove PHP (the installation version will write information in the registry, etc.). If PHP is a zip version, but also to set the system variables, environment variables according to the landlord on the second floor said on the line, the directory changes to their own PHP installation directory.

Although this information is far from the past, but some friends may still use this configuration to install Wamp, for reference. Celebrate yourself! :)

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.