maintenance.php
<input type="button" class="button" value="Continue" onclick="window.location.href='<?= dirname($SERVER["REQUEST_URI"])."/index.php?language=en" ?>'" />
Apache2 supplies the $SERVER for me, Accepted below fix also suitable but less portable (In my case Apache2). A note in the read-me might might be nice. Thanks Raiwa for your reply.
Store Mode
$_SERVER should be $SERVER in my setup?? - Store Mode
$_SERVER should be $SERVER in my setup??
Last edited by MyGamesShop on Wed Apr 10, 2024 3:50 am
-
MyGamesShop
- Contributor
- Posts: 131
- Joined: Wed Mar 10, 2021 3:02 am
- Phoenix Version: v1.1.0.6
- Contact:
Re: $_SERVER should be $SERVER in my setup??
$_SERVER is correct. See:
https://www.php.net/manual/en/reserved. ... server.php
But in some server installation $_SERVER may not be defined or not allowed.
The workaround would be to use your domain like this:
https://www.php.net/manual/en/reserved. ... server.php
But in some server installation $_SERVER may not be defined or not allowed.
The workaround would be to use your domain like this:
Code: Select all
<input type="button" class="button" value="Continue" onclick="window.location.href='<?= "https://mydomain.com/index.php?language=en" ?>'" />
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
I was wrong. Re: $_SERVER should be $SERVER in my setup??
$_SERVER["REQUEST_URI"] should be $_SERVER["SERVER_NAME"] after reading that document you referred me to.
So you wont need to add a note.
I find a bug me tinks in 1.6.0 
So you wont need to add a note.
-
MyGamesShop
- Contributor
- Posts: 131
- Joined: Wed Mar 10, 2021 3:02 am
- Phoenix Version: v1.1.0.6
- Contact:
Re: $_SERVER should be $SERVER in my setup??
dirname($_SERVER["REQUEST_URI"]) is correct. It includes the complete path if the store is under subdirectory.
$_SERVER["SERVER_NAME"] only gives the domain.
What seems to produce problems in some installations is the slash: "/index.php". So for now I think the most stable and universal version (apart of the hardcoded URL) would be:
Can you try and confirm please.
Please try for both settings: online and offline.
$_SERVER["SERVER_NAME"] only gives the domain.
What seems to produce problems in some installations is the slash: "/index.php". So for now I think the most stable and universal version (apart of the hardcoded URL) would be:
Code: Select all
dirname($_SERVER["REQUEST_URI"]) . "?language=en"Please try for both settings: online and offline.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Contact:
Can you try and confirm please.
Yes that works well, thank-you Raiwa 
-
MyGamesShop
- Contributor
- Posts: 131
- Joined: Wed Mar 10, 2021 3:02 am
- Phoenix Version: v1.1.0.6
- Contact: