logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Cant get PHP working
Author
gomezcas1285



Joined: 19 Oct 2026
Posts: 4
Location: España, Madrid

PostPosted: Sun 15 Nov '26 14:27    Post subject: Re: A Fast, Reliable and Proven Setup :: Apache PHP MySQL Reply with quote

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: 7491
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 16 Nov '26 16:43    Post subject: Reply with quote

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: 4
Location: España, Madrid

PostPosted: Tue 17 Nov '26 1:43    Post subject: Reply with quote

Thanking you James Blond.
The result of the "httpd -S" command was:
"
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:

"

# 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
Back to top


Reply to topic   Topic: Cant get PHP working View previous topic :: View next topic
Post new topic   Forum Index -> Apache