: PHP 5.6.6 loading but not interpreting in Apache2.4 64 bit Windows I have installed Apache 2.4.12 (Win64) VC11 from Apache Lounge. Typing httpd -M tells me that php5_module is loaded and shared.
I have installed Apache 2.4.12 (Win64) VC11 from Apache Lounge. Typing httpd -M tells me that php5_module is loaded and shared.
I have PHP 5.6.6 win32 VC11 Thread Safe installed.
The Apache server starts just fine, but when I type in the location of a local phpinfo file, it comes up blank. Adding any generic HTML to the file works just fine, but anything between the PHP tags is ignored. The Apache log is logging server starts and stops, but not noting any errors. The access log shows a server code 200 or 304 for any access to the phpinfo file.
Does anyone have suggestions on where to look for any addition errors?
More posts by @Rambettina238
3 Comments
Sorted by latest first Latest Oldest Best
The clue is in the comment, interestingly enough.
I am using long format tags, and the tags and the phpinfo(); function call do appear when viewing the source.
This means that the page is not being handled as PHP.
You do not need to reinstall
You do not need to downgrade
You do not need to panic
You do need however to get PHP being handled.
There may be a missing AddHandler php5-script .php in your config file. You can also add this to your .htaccess file (assuming your windows system is st up to acknowledge them). For example:
AddHandler php5-script .php .html .CustomExt .stuff
This would have all four of those endings sent to the PHP engine. The first one makes snese, the second is a matter of debate and the other two are doubtfull.
stackoverflow.com/questions/7856825/what-does-htaccess-with-line-addhandler-php5-script-php-do
According to php.net other problems can be needing to add a mime type handler:
AddType application/x-httpd-php .php
This needs to be added to one of:
the global properties
the properties of the VirtualDomain you want to have PHP support added to
Read More: php.net/manual/en/faq.installation.php#faq.installation.processing
The issue is, there is a missing AddHandler php5-script .php in the config file.
First, check for your php.ini file, and if you don't have one, try to reinstall PHP then you'll have one created. Normally at that point, php will work properly. If not, then modify the short_open_tag and asp_tags values, and defintely make sure engine=on is listed in the same section.
[PHP]
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; php.net/short-open-tag short_open_tag = Off
; Allow ASP-style <% %> tags.
; php.net/asp-tags asp_tags = Off
If apache still stops and starts, then either php5_module requires more memory than what your system has left, or its damaged.
You may also want to change the memory_limit setting. In most cases a value of 32M is ok.
Also, check the error logs and make sure error reporting is turned on. With a fresh installation of PHP, many options are explained in the php.ini file.
Another option is to check your system for disk corruption, and possibly reinstall both apache and PHP to rule out any damages to the files themselves especially if apache reports a segmentation fault. If other tasks on your computer abnormally freeze (especially the windows startup) then you might want to replace your RAM (memory chips).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.