Alter Way does not open My Projects
Posted by: developer68 (---.pkbgcmtk01.res.dyn.suddenlink.net)
Date: June 22, 2015 06:11AM

go to wamp/scripts/refresh.php and change the following:

if (count($projectContents) > 0)
{
for($i = 0 ; $i < count($projectContents) ; $i++)
{
// Change this line to have your localhost:port so Alter Way can find your projects
$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "h t t p://localhost:12345/'.$projectContents[$i].'/"; Glyph: 5
';
}
}
$tpl = str_replace($myPattern,$myreplace.$myreplacesubmenuProjects,$tpl);

You will see after Parameters: it is only http:// ... add your localhost:port here and they your projects will open from the Alter Way sub menu item.

Cheers!



Edited 2 time(s). Last edit at 06/22/2015 06:13AM by developer68.

Options: ReplyQuote
Re: Alter Way does not open My Projects
Posted by: Otomatic (Moderator)
Date: June 22, 2015 09:31AM

Hi,

NO, NO and NO again, the only sustainable way and without problems is to use the VirtualHost.
Read and apply: WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Alter Way does not open My Projects
Posted by: developer68 (---.pkbgcmtk01.res.dyn.suddenlink.net)
Date: June 23, 2015 05:16AM

Oh wow thank you! Please ignore my hacky quick fix!!

Options: ReplyQuote
Re: Alter Way does not open My Projects
Posted by: developer68 (---.pkbgcmtk01.res.dyn.suddenlink.net)
Date: June 23, 2015 06:18AM

Umm it seems to only want to use port 80 instead of the one my server is listening on. Any help?

Options: ReplyQuote
Re: Alter Way does not open My Projects
Posted by: RiggsFolly (---.as43234.net)
Date: June 23, 2015 09:50AM

If you have chnaged your port number from 80 then you have to use the port number on all urls

i.e. `localhost:8080`

---------------------------------------------------------------------------------------------
(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: Alter Way does not open My Projects
Posted by: developer68 (---.pkbgcmtk01.res.dyn.suddenlink.net)
Date: June 24, 2015 10:57PM

So it looks like the overall objective is to replace ;WAMPPROJECTSUBMENU with ;WAMPVHOSTSUBMENU. Keep in mind that if you do not have a registered domain name and this is on some sort of home network, external clients will not be able to use your vhost name. They will need to use your IP address and a port other than 80 as your ISP is using port 80 for their stuff. I don't recommend this for a high volume site on a home network.

Add an entry to your windows dns host cache in C:\Windows\System32\drivers\etc

173.81.25.161 www.myFlightPlanner.com

enter console commands:

net stop dnscche
net start dnscache

Replace in C:\wamp\wampmanager.tpl

;WAMPPROJECTSUBMENU with ;WAMPVHOSTSUBMENU

Add to C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

<VirtualHost *:26105>
DocumentRoot "c:/wamp/www"
ServerName www.myFlightPlanner.com:26105 its this line here that has the port
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

and finally uncomment in hhtpd.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

I found that you still need the overall directory setting in httpd.conf

<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

This is what worked for me.

Options: ReplyQuote
Re: Alter Way does not open My Projects
Posted by: RiggsFolly (---.as43234.net)
Date: June 25, 2015 01:18PM

NO NO and thrice NO!


Quote

So it looks like the overall objective is to replace ;WAMPPROJECTSUBMENU with ;WAMPVHOSTSUBMENU.

1. NO!

-- The purpose is to ADD ;WAMPVHOSTSUBMENU so you have access to BOTH menus!

Quote

They will need to use your IP address and a port other than 80 as your ISP is using port 80 for their stuff.

2. NO!

-- Well not always
-- And if they do
---- its a better idea to leave Apache listening on port 80 and get your Router to forward external accesses on port 8888 to the internal ip address of the WAMPServer PC's port 80. Then when you are using it internally for development you dont have to worry about adding :8888 to all your urls.



Quote

I don't recommend this for a high volume site on a home network.

3. NO!.. Well yes actually but for these more specific reasons.

-- WAMPServer is not recommended to be used as any sort of LIVE webserver Its a developers tool.

-- Better reason!

-- If you are running any kind of server on a Windows Desktop OS then the OS can only accept 20 external connection on W7, less with earlier versions. So any kind of high volume site will NEVER actually be HIGH volume as Windows Desktop OS's are not configured to cope with that. And before you ask, they pretty much cannot be frigged into becoming a server OS. M$ are smarter than that.



Quote

I found that you still need the overall directory setting in httpd.conf

<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

4. NO!
-- This should not be changed from `Require local`. Do that in the Virtual Host definition for the sites that you actually want to be accessible from the universe, not your whole www folder.


Now you seem to have created a Virtual Hosts that points to \wamp\www if you only want to run one site then the Virtual Host mechanism is not really needed. If your site DocumentRoot is \wamp\www all is setup to use that by default.

Virtual Hosts should be used if you want to have more than one site or place a site in a subdirectory of \wamp\www like \wamp\www\site1 and \wamp\www\site2 OR if you want to place the site code in a totally different folder structure eg C:\websites\site1, C:\wabsites\site2


You made other mistakes but I ran out of steam.

Maybe you should tell us exactly what you are trying to do and we will suggest a reasonable solution for you.

---------------------------------------------------------------------------------------------
(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


Sorry, only registered users may post in this forum.