| Author |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Sun 15 Nov '26 14:27 Post subject: Re: A Fast, Reliable and Proven Setup :: Apache PHP MySQL |
|
|
Followin James Blond mail, posted Sat 12 Apr '08 17:13, responding to my request for help:
I installed:
. "VC_redist.x64.exe"
. "httpd-2.4.71-261112-Win64-VS18.zip"
. "php-8.5.12-1-Win32-vs17-x64.zip"
Then, I proceeded to make the indicated changes in httpd.conf, php.ini, and httpd-vhosts.conf.
Then, I tested index.html in the browser, which returns "It works."
However, it does not work in the same browser for `index.php`—which includes the `phpinfo()` function—as it triggers Notepad to open and displays the file's text.
I also tried the "php -v" command, resulting in the following response:
PHP 8.5.12 (cli) (built: Oct 26 2026 09:50:37) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Built by The PHP Group
Zend Engine v4.5.12, Copyright (c) Zend Technologies
with Zend OPcache v8.5.12, Copyright (c), by Zend Technologies
I’m not sure if it’s appropriate to attach the httpd.conf, php.ini, and httpd-vhosts.conf files in a separate email?
If anyone can help me identify where I went wrong, please let me know where I should send the relevant configuration files—or whatever else you deem most appropriate.
Thanking you in advance, I send my regards. |
|
| Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7492 Location: EU, Germany, Next to Hamburg
|
Posted: Mon 16 Nov '26 16:43 Post subject: |
|
|
Hello Gomez,
It seems your web server isn't using the PHP interpreter.
Use httpd -S to see if your vhost is working.
You can post the config of that vhost. |
|
| Back to top |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Tue 17 Nov '26 1:43 Post subject: |
|
|
Thanking you James Blond.
The result of the "httpd -S" command was:
| Code: |
c:\Apache24\bin>httpd -S
VirtualHost configuration:
*:1285 pepucom.com (C:/Apache24/conf/extra/httpd-vhosts.conf:39)
ServerRoot: "C:/Apache24"
Main DocumentRoot: "C:/Apache24/htdocs"
Main ErrorLog: "C:/Apache24/logs/error_log"
Mutex default: dir="C:/Apache24/logs/" mechanism=default
PidFile: "C:/Apache24/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: SRVROOT=C:/Apache24
c:\Apache24\bin>
|
and the full text of the "httpd-vhosts.conf" file is:
| Code: |
# Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot "${SRVROOT}/docs/dummy-host.example.com"
# ServerName dummy-host.example.com
# ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error_log"
# CustomLog "logs/dummy-host.example.com-access_log" common
#</VirtualHost>
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host2.example.com
# DocumentRoot "${SRVROOT}/docs/dummy-host2.example.com"
# ServerName dummy-host2.example.com
# ErrorLog "logs/dummy-host2.example.com-error_log"
# CustomLog "logs/dummy-host2.example.com-access_log" common
#</VirtualHost>
<VirtualHost *:1285>
ServerAdmin webmaster@pepucom.com
DocumentRoot "C:/Apache24/htdocs/pepucom.com"
ServerName pepucom.com
ServerAlias ://pepucom.com
ErrorLog "logs/pepucom-error.log"
CustomLog "logs/pepucom-access.log" common
<Directory "C:/Apache24/htdocs/pepucom.com">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
|
kind regards
José Gómez
Mod note: added code tags |
|
| Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7492 Location: EU, Germany, Next to Hamburg
|
Posted: Tue 17 Nov '26 11:44 Post subject: |
|
|
You need to add the fcgid part to your config
| Code: |
<VirtualHost *:1285>
ServerAdmin webmaster@pepucom.com
DocumentRoot "C:/Apache24/htdocs/pepucom.com"
ServerName pepucom.com
ServerAlias www.pepucom.com
ErrorLog "logs/pepucom-error.log"
CustomLog "logs/pepucom-access.log" common
DirectoryIndex index.php
<IfModule fcgid_module>
FcgidInitialEnv PHPRC "C:\\php85"
FcgidInitialEnv PATH "C:\\php85;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
FcgidInitialEnv SystemRoot "C:\\Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv windir "C:\\WINDOWS"
FcgidPassHeader Authorization
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "C:/php85/php-cgi.exe" .php
</Files>
</IfModule>
<Directory "C:/Apache24/htdocs/pepucom.com">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
|
Make sure mod_fcgid is loaded in your httpd.conf
LoadModule fcgid_module modules/mod_fcgid.so
Adjust the C:\php85 path to your needs.
Make sure that in the correct php.ini is
cgi.fix_pathinfo=1 |
|
| Back to top |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Wed 18 Nov '26 1:09 Post subject: Re: A Fast, Reliable and Proven Setup |
|
|
First I added the fcgi part to "httpd-vhosts.conf", next, I verify that the "mod_fcgid" module is loaded in the "httpd.conf" file, along with its corresponding directives ("<IfModule fcgid_module> . . . . . ."), and I confirm that "cgi.fix_pathinfo=1" is included in the "php.ini" file.
Then, I re-enter the "index.html" and "index.php" commands, but the ".html" version continues "to work", while the ".php" one does not.
Finally, the command "httpd -S":
c:\Apache24\bin>httpd -S
VirtualHost configuration:
*:1285 pepucom.com (C:/Apache24/conf/extra/httpd-vhosts.conf:39)
ServerRoot: "C:/Apache24"
Main DocumentRoot: "C:/Apache24/htdocs"
Main ErrorLog: "C:/Apache24/logs/error_log"
Mutex default: dir="C:/Apache24/logs/" mechanism=default
PidFile: "C:/Apache24/logs/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: SRVROOT=C:/Apache24
c:\Apache24\bin>
kind regards
José Gómez |
|
| Back to top |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Thu 19 Nov '26 10:42 Post subject: A Fast, Reliable and Proven Setup :: Apache PHP MySQL |
|
|
I have found the following error line in the "php_errors.log" file:
[17-Nov-2026 23:13:12 UTC] PHP Warning: Failed loading Zend extension 'php_opcache.dll' (tried: C:\php85\ext\php_opcache.dll (The specified module could not be found), C:\php85\ext\php_php_opcache.dll.dll (The specified module could not be found)) in Unknown on line 0
I don't see a way to download 'php_opcache.dll' and include it in PHP.
kind regards
José Gómez |
|
| Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1321 Location: Amsterdam, NL, EU
|
Posted: Thu 19 Nov '26 11:17 Post subject: |
|
|
| OPCache is statically compiled into PHP 8.5.x. Remove extension=opcache in your php.ini |
|
| Back to top |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Thu 19 Nov '26 14:57 Post subject: Apache PHP MySQL |
|
|
I did not find the line "extension=opcache" in the "php.ini" file, but I did find the following:
zend_extension=php_opcache.dll
opcache.enable=On
opcache.cli_enable=On
so I changed "opcache.enable" and "opcache.cli.enable" to "Off"
it's right?
Thanks Jan-E |
|
| Back to top |
|
gomezcas1285
Joined: 19 Oct 2026 Posts: 8 Location: España, Madrid
|
Posted: Thu 19 Nov '26 17:45 Post subject: Re: Apache PHP MySQL |
|
|
Could I have made a mistake in choosing the "PHP" version?
Upon reviewing the version of "PHP" that I downloaded and installed, I began to wonder whether I had chosen the right one from among those available.
Based on the options provided(https://www.php.net/downloads.php?os=windows&osvariant=windows-downloads&version=default), I selected the following:
I work with Windows ZIP Downloads, and use default PHP version for OS
I want to be unable to use multiple versions of PHP.
I don't want to compile everything from source code.
PHP 8.5 (8.5.12), VS17 x64 Thread Safe: Zip php-8.5.12-Win32-vs17-x64.zip
kind regards
José Gómez |
|
| Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1321 Location: Amsterdam, NL, EU
|
Posted: Thu 19 Nov '26 17:59 Post subject: Re: Apache PHP MySQL |
|
|
| gomezcas1285 wrote: | I did not find the line "extension=opcache" in the "php.ini" file, but I did find the following:
zend_extension=php_opcache.dll
opcache.enable=On
opcache.cli_enable=On
so I changed "opcache.enable" and "opcache.cli.enable" to "Off"
it's right? | That is a really old php.ini! |
|
| Back to top |
|
Otomatic

Joined: 01 Sep 2011 Posts: 373 Location: Paris, France, EU
|
Posted: Thu 19 Nov '26 19:08 Post subject: Re: Apache PHP MySQL |
|
|
| gomezcas1285 wrote: | I want to be unable to use multiple versions of PHP.
I don't want to compile everything from source code.
|
Hi,
Use Wampserver |
|
| Back to top |
|