how to set Online Offline settings
Posted by: darkfreak17 (---.84.146-45.dyn.dsl.cantv.net)
Date: October 31, 2014 02:10AM

I want to make a few settings for when i switch modes on the host

for offline host:
Allow from LAN
Deny from All

for online host:
Allow from All

i don't quite find where to make this settings, i thought it would be on the onlineoffline.php file with this configuration:

$onlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all";

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Allow from 192.168.0
Deny from all";

but it does not work, the server allows all connections in both modes and i don't know what to do in order to achieve this.

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 31, 2014 10:05AM

Which version of WAMPServer are you using? Can you answer the basic questions from this post please READ THIS BEFORE YOU ASK A QUESTION

You are in the right place, but if you notice it used a str_replace() to make the changes to httpd.conf, so the state you are changing from has to match the string it is using to match against.

So you have to set httpd.conf to match one of the states, and then change the other in OnlineOffline.php

Then to the switch, then change the other state. So it can actually match the from state again.

I hope this makes sence.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: darkfreak17 (---.genericrev.cantv.net)
Date: October 31, 2014 09:34PM

I once thought that would work, but it did not change the content of the file. and wamp version i'm using is 2.4,

the content of httpd.conf where i thought it has to be changed is like this:

# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 31, 2014 09:40PM

This is difficult to explain but easy to do.

Install TeamViewer and I will show you how to.

Install TV, then run it.

Send me a Private Message containing the TV ID and PASSWORD so I can connect.
Leave TV running as it will change the password each time you restart it.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: ciprianmp (---.210.53.43.getinternet.no)
Date: November 09, 2014 11:43AM

With the latest wamp 2.5, running on vhosts, the tray icon is green and everything works fine, locally.
When I mouse over the icon, it says WAMPSERVER - server Offline and the bottom left menu says Put online.
If I click, the server restarts all services, turning green again, no problem, but it still has the same statuses.
I haven't changed anything related to giving access from outside LAN (in httpd.config or php.ini).
Is that the reason Put online doesn't work? What should I do? (maybe a link to a different topic if it has been addressed before).
Thank you!

Ciprian M.

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: November 09, 2014 01:17PM

Your original bug was
$onlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all";

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Allow from 192.168.0
Deny from all";

Should have been

$onlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all";

$offlineText = "# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 192.168.0
";



But if you are now using Virtual Hosts the 'Put Online/Offline' process is of no use, as you now should have each sites access control within the Virtual Hosts definition for that site.

In that case you change ONE of your Virtual Host definitions to allow access from the internet, and therefore do not allow access to all of them. But you have to do it manually.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: how to set Online Offline settings
Posted by: ciprianmp (---.210.53.43.getinternet.no)
Date: November 09, 2014 09:37PM

ciprianmp Wrote:
-------------------------------------------------------
> With the latest wamp 2.5, running on vhosts, the tray icon is green and everything works fine, locally.
> When I mouse over the icon, it says WAMPSERVER - server Offline and the bottom left menu says Put online.
> If I click, the server restarts all services, turning green again, no problem, but it still has the same statuses.
> I haven't changed anything related to giving access from outside LAN (in httpd.config or php.ini).
> Is that the reason Put online doesn't work? What should I do? (maybe a link to a different topic if it has been addressed before).
> Thank you!

I am back with the bug fix for not seeing Online/Offline changes in the menu. refresh.php contains at least one typo.

Read this for the fix: [forum.wampserver.com] !

Ciprian M.

Options: ReplyQuote


Sorry, only registered users may post in this forum.