MAMP PRO - Trouble making hosts file accessible on Windows - windows

Today I've been starting to use MAMP PRO for Windows, it's in alpha right now.
But im trying to make Dynamic DNS work, which doesn't seem to work for me.
Every time I start up MAMP PRO, I get the following error:
MAMP PRO has detected that access to hosts file is blocked. MAMP PRO needs access to hosts file to work properly. It is probably blocked with Antivirus program or restricted user privillages. Please close MAMP PRO, set your Antivirus program or user privillages (so that access to hosts file is writable) and start MAMP PRO again.
I did try toggling my antivirus off, and I did set permissions to writable, executable, readable etc. to every user on my machine.
I also tried to run MAMP PRO as administrator.
Any ideas and/or suggestions?
Thanks!

Have you unchecked read-only on this file?
Make sure file is not read-only. Navigate to %systemroot%\system32\drivers\etc\ and right-click -> Properties on hosts, and un-check Read-only
Take ownership of the file (May be unnecessary, I did this first before finding Read-only). Right-click -> Properties -> Security -> Advanced -> Owner -> Edit, and then select your name and OK out of all prompts.
I also gave full permissions to all users on the system, as you mentioned.
I tested this on Windows 7 with MAMP Pro, after experiencing the same problem. This got me up and running, hope it helps.
References:
http://www.tomshardware.com/faq/id-1821155/edit-hosts-file-windows.html

Related

Windows: XAMPP install folder ini file permission error, Access denied upon configuration save

After installing XAMPP to Windows 10 (all default/recommended installation attributes), I now have an issue changing its configuration after opening it.
Error: Cannot create file "C:\xampp\xampp-control.ini".
Access is denied
Clicking Save to a change in Configuration of Control Panel:
This "Configuration of Control Panel" box opens after clicking the "Config" button at the top right of the running XAMPP app:
I've tried a suggestion to run the XAMPP app with Administrator (elevated) access… but that seems like a major security issue, considering I don't know exactly what XAMPP would or could do with my files that require that permission, whether intended by the people who run XAMPP or not.
I've tried re-installing to another folder, like to C:\Users\Me, or a sub-folder like Documents or a custom one, but I just got different permissions issues that I struggled to figure out.
If you know a solution that worked for you, that avoided running XAMPP with Admin privileges, please let me know. I've gone through a handful of seemingly-related questions here but they seem to be related to MySQL/PHP questions and not Windows file system permissions.
I found a solution after noticing that the file already existed from apparently a past workaround I tried with running XAMPP as Admin... based on the permissions of the file being different than its parent folder. I discovered this by right-clicking the xampp folder or the xampp-control.ini file then selecting Properties and clicking the Security tab, then clicking into each attached user account's permissions.
So, my C:\xampp folder has these permissions: for Admin, basically full access; for my user account, Read, Execute, and Write.
The xampp-control.ini file has only Admin permissions; my user account is not attached to it.
Adding my user account to the xampp-control.ini file's Security, and adding Write permission then allowed XAMPP's config panel to save my changes.
Note that I typed my username into the "Enter the object names to select" box, then clicked Check Names; this auto-populated my username reference (?), though I'm not sure how it would work if it finds multiple results. Then I could click OK to get back to the Permissions box to add "Modify" and "Write" for it. I'm completely OK giving my user account permission to modify and write to this file through the XAMPP app.
Now, that fixes that file for that scenario; now I'm wondering if there will be other permissions issues with other files, because I noticed some other files (that I checked randomly) don't all share the same permissions for my user account!
Maybe I should have instead modified the xampp folder's permissions recursively to give my user account Write and/or Modify access (I'm not sure of the difference, Windows permissions seem far more complicated to understand and use than Linux's and Mac's do).
I think the file permissions were all set by XAMPP during install; I don't know yet that expanding permissions on certain files will not create new problems...
I found a solution after noticing that error, here is my solution
go to xampp installation folder on the c drive
Xampp Destination
then find xammp control panel.exe
Xampp Control Panel
then right click and go to properties(or press ALT+ENTER)
Click Properties
then go to compatibility and enable Run this program as an administrator
Compatibility tab
Your Problem is now fixed

How to install xampp in mac

I am using MacBook Air. I installed the xampp but it's not working.
After some research, I found the URL http://localhost:8080/dashboard/ and I am getting the xampp. Now I am confused where should I get htdocs folder to add my code. Can anyone assist me?
Let's talk about in details
I downloaded the xampp from this link https://www.apachefriends.org/download.html
and I move it on the application. Now I am getting the xampp icon in application.
Then I open the xampp and I got a popup like and I click on start
I enable the 8080 port number.
Then I just I checked in the browser http://localhost:8080/dashboard/ and I found the xampp dashboard page.
Now I am not getting the htdocs folder. would you help me out in this?
I too have had lots of confusion setting up XAMPP on my Mac.
Things the docs said would work, just plain did not.
The short answer to your question: In MacOS X the htdocs dir of the virtual server is in:
/Users/<YOUR-USER-NAME>/.bitnami/stackman/machines/xampp/volumes/root/htdocs
More complete instructions for getting the server up:
Open up the XAMPP Application
Under General/Services start the XAMPP services
Under Network make sure to enable a port config (I chose localhost:8080->80)
In the Volumes "tab" click "Mount" beside /opt/lampp and then you can click "Explore" to open a finder window to the virtual server.
This will cause the virtual Network-Drive 192.168.xxx.yyy to show up in the Finder sidebar which has a single folder named lampp
Additionally a new external drive named lampp will also be available in Finder.
However you get to lampp, put your source-files in the htdocs folder.
Links that DID work for me on first launching:
http://localhost:8080/dashboard/
http://localhost:8080/phpmyadmin/
http://192.168.64.2/dashboard/
Links that did NOT work, in spite of docs claiming otherwise:
http://localhost/ or http://localhost/index.php
http://192.168.64.2/phpmyadmin/ <--Access Forbidden 403
A little late to the thread but I hit and solved this issue and I believe the OP had downloaded and installed the wrong version. At the time I am writing this, the link on the downloads page is for .dmg file is a VM file, or at least missing features of the full download. Instead of downloading that, go to the more downloads section
Once there, choose the version you need for your OS. This, and some mysql tweaks that are answered in multiple connected topics got me running.
Your XAMPP is working fine. You have to use Finder to go to htdocs.
Follow these steps -
Open the XAMPP application and hit "Start" button.
Make sure everything is proper by hitting "Go to Application".
Now you should see the dashboard on your browser, if not, restart the application and try again.
Go to Finder and on the sidebar you should see a volume labeled "192.168.64.2", go there and you will find a folder named "lamp".
See under the locations section
Inside lamp there will be htdocs, where you can place all the files you want the browser to access.Click on lamp

I couldn't change php.ini in Xampp

For some reason I should change some values in my php.ini but when I applied changes nothing happened.I Google that problem but I realized Apache need to restart but after restart my Apache nothing happened.
I really need to solve in this problem .I installed VMware before I installed xampp in my computer i tell that because i guess xampp and vmware are not working
well together.
have you opened the php.ini in and administration mode? Sometimes a simple notepad is not saving the file properly. Try installing Notepad++ and open the php.ini and while you're saving a prompt should pop-up asking for admin privilege and reopen the file.

Windows 10 and Netbeans: no write permissions

I've installed Netbeans 8.2. on my clean Windows 10 install. Now I want to set up a new project, but when I select my source folder I get the message 'Sources folder is not writable'.
Then I decided to just change my HTML code, but when I save I've got the message 'Cannot get exclusive access to: D:\Websites... (probably opened for reading)'.
I tried to open Netbeans as administrator, but nothing seems to work. Anybody who had the same problem and could solve it?
Thanks!
If the cause is same as me, check your Antivirus settings, and whitelist Netbeans.
I've experienced the same an hour ago, after checking the writing permissions and creating a new project all together, nothing worked. Then I remembered I have an antivirus (Bitdefender) with Ransomware protection for my documents folder, I went to the log (of Bitdefender) and yeah, it was blocked as suspicious software, just added it to the trusted list and it works fine now.
You might try running Netbeans as an administrator.
I solved the problem by allowing the "Netbeans.exe" file through Control folder access.
If someone finds it is not solved by the solution of #Osama Islam. Try to open the file like this:
Select the file in Projects window in netbeans --> right click on it --> Then select "Edit". ---> Now try to save the content.
I too faced the similar issue and not running any anti virus, the issue is mainly due to permission so I fixed it by giving full access to user for that particular folder, which fixed the problem
ICACLS "FolderPath" /INHERITANCE:e /GRANT:r username:(F) /T /C
Replace the FolderPath and username as per need
Reference: changing permission through command prompt
Just look for programs who have the file open. In my case I executed git diff myfile.js which was blocking the save process.
I faced such a problem today.
On windows 10, If you not installed any antivirus software, check your windows difender protection history. windows difender blocks the folder modification access. In protection history, find the relavent notification and select allow on device. now this error might be solved!

Can't add new Redirected Port in Windows 7 after installing RedMon

My operating system is Windows 7 32bit. I installed RedMon1.7, Ghostscript 8.71 and GSview 4.9; installations were successful.
I went to Add New Local Printer in Windows Devices and Printers, clicked on Create A New Port, and selected Redirected Port from the Type of Port list. Clicked Next and in the Add New Port window I named RPT1: and clicked OK but it says Specified port cannot be added. Operation could not be completed (error 0x00000001)
I tried giving different names to the port, RPT2:, RPT4:, VPport: etc but all gave same result. Disabled Windows Firewall and tried but it continues to give same error, Disabled the Antivirus (Avira) but no change.
What can be preventing windows 7 from adding redirected port?
BTW I was following instructions in this tutorial in order to create a postscript printer.
http://www.stat.tamu.edu/~henrik/GSPSprinter/GSPSprinter.html
Appreciate any ideas or suggestions. Thanks
Run cmd.exe as Administrator and then run:
rundll32 printui.dll,PrintUIEntry /il
from the elevated cmd.
Go to your Start Menu,
Type Print,
Right-Click "Print Management",
Select "Run as administrator",
In Print Management; Expand "Print Servers" and Select "Ports".
Right-Click in the "Ports" pane (on the right hand side) and Select "Add Port...".
I'd also recommend configuring a Port from Print Management, as opposed to trying to do it in a Printers Properties. ;)
Adam Reed describes a workaround in his blog:
http://borntoidentify.blogspot.com/2010/09/configuring-virtual-printer-using.html
Not very comfortable, but works for me ...
EDIT: This link appears broken, but here's the content:
https://web.archive.org/web/20120628120209/http://borntoidentify.blogspot.com/2010/09/configuring-virtual-printer-using.html
The gist is that under Win7, you need to run explorer with elevated rights. This can be done using another browser, or, as mentioned in the comments on the original post:
Open a CMD window by right clicking and running as administrator
Kill the process explorer.exe from the task manager
Run explorer.exe from the command prompt window, now as an administrator.
Be very careful when running explorer as an administrator.
You need to enable Admin mode OR log with the Admin account!
This is cause by the new Vista/Win 7 security system.
Try reseting the firewall (Windows 7)
(be warned tho, the firewall will reset to the default setting)
*go to Control Panel
*go to Windows Firewall
*on the left choice pick "Restore Defaults"
It works for me, i hope it works for you.
F3lix's rundll32 method works but after you've created the port you most probably would need to configure its settings. Elsewhere in the net there are instructions to open Port management as Administrator, but in Windows 7 Home that seems to be very much impossible. One can only view the virtual port settings. The only workaround I found is to edit registry directly with the Registry editor at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Redirected Port\Ports\RPT1:
(Replace your port name in the end.)
It seams to be tricky. In my case it only works, after creating an new User account with the name "admin" / group " Administratoren" (de).
Before with my real Nickname User "Nick.." / group "Administratoren" (de) it dosent work´.
Takes several hours to discover ...
Accepted solution did not work for me...I found an other command line that worked well (I'm on windows 10):
%systemroot%\system32\printmanagement.msc
It opens the print management in administrator mode, and I was able to create the port with no problems.

Resources