Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Apache 2.4.41 & PHP 7.3.10 Problem |
|
Author |
|
harry2011
Joined: 04 Jan 2016 Posts: 5 Location: UK, Sevenoaks
|
Posted: Thu 03 Oct '19 13:49 Post subject: Apache 2.4.41 & PHP 7.3.10 Problem |
|
|
Hi All,
I've been testing my application on Windows 2016 Server.
I've installed Apache 2.4.41 x64 & PHP7.3.10 x64 & MySQL Server 5.7.
Application works fine but one serious problem for me. I have 2 databases installed - Live & Test.
My URLs are test.local & live.local. If I use either of these the application launches but I cannot login to it.
However if I use the URL 'localhost' the default application launches (first one in vhosts file) and I can login to it and it works fine.
When I use test.local or live.local the correct application page is being launched. I have proved this by changing the MySQL username for each and getting the correct errors, so I know the correct system is being launched.
I have also done a separate installation on another Win 2016 Server but using PHP5.6.40 & Apache 2.4.38 and it works fine.
So are there different settings in Apache when using PHP7 to allow virtual hosts to work ok?
Any suggestions gratefully received. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 04 Oct '19 22:59 Post subject: |
|
|
Please post your vhost configs |
|
Back to top |
|
harry2011
Joined: 04 Jan 2016 Posts: 5 Location: UK, Sevenoaks
|
Posted: Mon 07 Oct '19 15:09 Post subject: |
|
|
James Blond wrote: | Please post your vhost configs |
Here you go:
Code: |
<VirtualHost *:80>
ServerAdmin admin@rbperformance.com
ServerName pmqatest.local
DocumentRoot "C:/PMQA/Test/htdocs"
ErrorLog "C:/PMQA/Test/logs/error.log"
CustomLog "C:/PMQA/Test/logs/access.log" common
DirectoryIndex index.html index.htm
Redirect /index.html /index.php?mode=timesheets_view
SetEnv CONFIG_FILE C:/PMQA/config/settings.ini
SetEnv ZEND_PATH C:/PMQA/Test/library
SetEnv APPLICATION_ENV test
# The BASE_PATH variable must end with a /
SetEnv BASE_PATH C:/PMQA/Test/
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
#RewriteEngine on
</Directory>
Alias /stats C:/PMQA/Test_Data/stats
Alias /reports/generated C:/PMQA/Test_Data/generated_reports
Alias /appraisals C:/PMQA/Test_Data/appraisals
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@rbperformance.com
ServerName pmqalive.local
DocumentRoot "C:/PMQA/Live/htdocs"
ErrorLog "C:/PMQA/Live/logs/error.log"
CustomLog "C:/PMQA/Live/logs/access.log" common
DirectoryIndex index.html index.htm
Redirect /index.html /index.php?mode=timesheets_view
SetEnv CONFIG_FILE C:/PMQA/config/settings.ini
SetEnv ZEND_PATH C:/PMQA/Live/library
SetEnv APPLICATION_ENV production
# The BASE_PATH variable must end with a /
SetEnv BASE_PATH C:/PMQA/Live/
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
#RewriteEngine on
</Directory>
Alias /stats C:/PMQA/Live_Data/stats
Alias /reports/generated C:/PMQA/Live_Data/generated_reports
Alias /appraisals C:/PMQA/Live_Data/appraisals
</VirtualHost>
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 07 Oct '19 18:31 Post subject: |
|
|
The <Directory /> is wrong it has to match the document root.
example
Code: |
<Directory "C:/PMQA/Live/htdoc0s">
Options FollowSymLinks
AllowOverride None
Require all granted
#RewriteEngine on
</Directory>
|
|
|
Back to top |
|
|
|
|
|
|