Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 910

PostPosted: Wed Nov 05, 2008 6:21 pm Reply with quote

It is time for an upgrade for me...So I set up a testing server. The stuff in "Tools To Do The Job" were close...but no cigar. So I thought I would outline it here. If nothing else so I can use it later....
(If someone makes this a sticky I will try to keep it up to date)

I am NOT an expert on any of this....but this worked for me!

To start with I created my own space for my sites. I did it on G drive in a folder called HTTP. And In http I created a folder called html. I have one folder per site. G:\http\html\siteA and G:\http\html\siteB

1. Download Xamp Only registered users can see links on this board! Get registered or login!

2. Run The exe file...
IF you are on VISTA...be sure to install at C:\XAMP not C:\program files/XAMP

3. Once the installer is finished...Run through the Examples to make sure everything worked...
Only registered users can see links on this board! Get registered or login!

4. If you wish to change from PHP5 to PHP4....turn off Apache in the XAMP Control Panel.

Run c:\xampp\php-switch.bat

Turn on Apache make sure everything works

Turn off Apache

5. Go to C:\Windows\System32\drivers\etc\hosts

at the end of the file add.....

127.0.0.1 yoursiteA
127.0.0.1 yoursiteB
127.0.0.1 localhost

6. Open C:\xampp\apache\conf\httpd.conf

Around line #176 Change
DocumentRoot "C:/xampp/htdocs"
to
DocumentRoot "G:/http" (or whatever location you want to use for your local sites

Around line #203

Make this match above.....

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "G:/http">

Around line 498 make sure
Include conf/extra/httpd-vhosts.conf does not have a # in front of it....

#7 Open c:\XAMP\apache\conf/extra/httpd-vhosts.conf

At tthe bottom add this....

NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot G:/http/html/
<Directory G:/http/html/>
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName siteA
DocumentRoot G:/http/html/siteA
<Directory G:/http/html/siteA>
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName siteB
DocumentRoot G:/http/html/siteB
<Directory G:/http/html/siteB>
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Restart Apache with the XAMP Control panal.

Go to Only registered users can see links on this board! Get registered or login! <-Should be site A
Go to Only registered users can see links on this board! Get registered or login! <-Should be site B

To open phpmyadmin (MySQL) go to....
Only registered users can see links on this board! Get registered or login!

If you have any problems be sure to look in
c:\xamp\apache\logs/error.log


There you have it.
 
View user's profile Send private message
Dawg
PostPosted: Thu Nov 06, 2008 6:32 am Reply with quote

I woke up this morning with a Host file that had reverted....SOOOOoooo... Only registered users can see links on this board! Get registered or login!
You cannot modify the Hosts file in Windows Vista
View products that this article applies to.
Article ID : 923947
Last Review : February 7, 2007
Revision : 2.5
SYMPTOMS
When you try to change the Hosts file or the Lmhosts file in Microsoft Windows Vista, you may receive an error message that resembles either of the following.
Error message 1
Access to C:\Windows\System32\drivers\etc\ hosts was denied
Error message 2
Cannot create the C:\Windows\System32\drivers\etc\hosts file.
Make sure that the path and file name are correct.
This issue occurs even though you log on by using an account that has administrative credentials.
WORKAROUND
To work around this issue, follow these steps: 1. Click Start, click All Programs, click Accessories, right-click Notepad, and then click Run as administrator.

If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.
2. Open the Hosts file or the Lmhosts file, make the necessary changes, and then click Save on the Edit menu.
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Thu Nov 06, 2008 12:00 pm Reply with quote

Quote:
To work around this issue, follow these steps:


1. Dump Microsoft
2. Repeat #1 until complete

killing me
 
View user's profile Send private message
Dawg
PostPosted: Thu Nov 06, 2008 12:19 pm Reply with quote

Now Raven.....

Why ya want to pick on a POOR OL'Dawg like that??

Dance-Y
 
hicuxunicorniobestbuildpc
Life Cycles Becoming CPU Cycles


Joined: Aug 13, 2009
Posts: 967
Location: Netherland

PostPosted: Sun Apr 18, 2010 6:27 pm Reply with quote

Quote:
Access to C:\Windows\System32\drivers\etc\ hosts was denied


Hi Dawg

Dont worry any more about permission deny on Windows Vista or Seven

Take this trick

Code:
Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\*\shell\runas]
@="Grant Admin Full Control"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\exefile\shell\runas2]
@="Grant Admin Full Control"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Grant Admin Full Control"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"


Make a new document
Copy and paste it
and save as
GrantAdminFullControl.reg

Run the file in order to install it on your registry.

Now when u wanna give some permission to a special folder, just need to right click on the specifi folder and click on Grant Admin Full Control

That's all, let me know if you like it Wink
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©