Unable to save to htdocs

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Unable to save to htdocs

Postby douglaspneill » 07. October 2009 18:11

I'm having a problem that may be more mac related than xampp related. I've got everything downloaded fine but I am unable to save files directly to Application/XAMPP/htdocs because the htdocs folder cannot be modified. I can save the file somewhere else, then drag it in but it asks for my admin password every time to do this, and is a hassle in general. Any ideas on how to make htdocs modifiable?
douglaspneill
 
Posts: 1
Joined: 07. October 2009 18:06

Re: Unable to save to htdocs

Postby Nobbie » 07. October 2009 22:03

douglaspneill wrote:Any ideas on how to make htdocs modifiable?


Grant appropriate permissions to the folder for your UserID.

See manual for "chmod" command.
Nobbie
 
Posts: 7017
Joined: 09. March 2008 13:04

Re: Unable to save to htdocs

Postby sili » 10. October 2009 11:35

Or just right-click on the htdocs directory and choose Information. There you can change the permissions.
sili
 
Posts: 67
Joined: 15. March 2003 16:05

Re: Unable to save to htdocs

Postby Lawson » 13. October 2009 18:41

Let me know how this goes. My situation was similar. It was early enough, so I just deleted and started over. When I first installed XAMPP, I put an empty folder into htdocs and named it. All was as usual. After I started XAMPP I ran into what you have going on. I just deleted the install, put all my folders in htdocs ahead of time, and then started the program. This was after I played the permissions game every time. Got old quickly. I am setting up multiple Joomla sites in my root folder htdocs. That was the plan anyway.

My concern is that I am required to install folders through XAMPP for a reason? Perhaps me short cutting the process by doing it ahead of time will cause problems later. If we just put in a new folder, simple stuff. My hesitation surround the concept that what if the creation of a new folder requires some other references to be made as well, and I am missing those links because of my process?

Still mid installation as I do a lot of reading. Trying to get my head around as much as possible in the next two days before I have to actually get to work on a website. The install is simple, and it ran fine. Just had the same problem you did with permissions. You're right, it was no fun. Did you just change permissions in the "get info" window? You can just choose the whole XAMPP folder and have permissions changed for ALL subfolders as well, but I questioned whether that would create a security problem in the future? When I have to force something, past experience makes me consider the consequences of my actions. Good luck.

Lawson
Lawson
 
Posts: 5
Joined: 13. October 2009 17:59

Re: Unable to save to htdocs

Postby sili » 14. October 2009 15:43

Lawson: I personally would not change the permission of the XAMPP directory. Did you ever read about virtual hosts? With them you could build multiple websites in different directory (outside of the XAMPP directory). If that sounds good to you, you can read the small how-to in my signature :)
sili
 
Posts: 67
Joined: 15. March 2003 16:05

Re: Unable to save to htdocs

Postby Lawson » 15. October 2009 00:02

Interesting making virtual hosts on a local computer. One term that I was unsure about was the following:

Open "/xamppfiles/etc/httpd.conf" and un-comment the following line:
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

What does un-comment mean? Delete? Looks like the change is to add -vhosts in the appropriate space. Other than that everything seemed straight forward. I always hate things I can revert back to with a single key stroke. No Apple Z for this little fix. I'll see how things go with permissions. If things don't go well, I'll try your solution.

By the way, another little detail had to do with Joomla 1.1.14 not supporting the latest PHP 5.3. The discussion I was following was hoping for a Joomla 1.1.15 fix. Nothing official yet, but there was a patch posted earlier in the year. Seems like PHP5.3 will run on Joomla with the patch. See if I can find the link.

Here is the page: http://community.joomla.org/blogs/commu ... p-530.html
Lawson
 
Posts: 5
Joined: 13. October 2009 17:59

Re: Unable to save to htdocs

Postby Lawson » 15. October 2009 05:59

Answered my own question, for others, to un-comment means:

This is a comment:
// uncomment the next few lines to display number of comments!
The two slashes // in front of any text makes a comment in PHP. Comments are just text messages that programmers write as notes to themselves or other programmers.
When PHP comes across text that is commented, it skips them.
When you create a comment, some nerds will describe it as: commenting out something.
What does uncomment mean?
Basically, you just remove the two slashes from in front of a line to text - this will cause PHP to process that text as code ... instead of skipping over it.
Another way to create comments:
Another way to create comments in PHP is like so:
/*
This is a comment ..
This is another comment ...
*/
Lawson
 
Posts: 5
Joined: 13. October 2009 17:59

Re: Unable to save to htdocs

Postby sili » 15. October 2009 10:19

Lawson wrote:Open "/xamppfiles/etc/httpd.conf" and un-comment the following line:
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

What does un-comment mean?

Thanks for the feedback. I should rewrite this section.

In this case "un-comment" means to change the line
Code: Select all
#Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf

into
Code: Select all
Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf


Your right about the comments in PHP, but in an Apache configuration file comments are marked with a "#".

I hope that helps :)
sili
 
Posts: 67
Joined: 15. March 2003 16:05

Re: Unable to save to htdocs

Postby carpediem930 » 24. October 2009 00:41

I am having the same problem as the original poster. When trying to move the Joomla files into the htdocs folder, it says it cant be moved because the folder can't be modified. I can find where to change the permissions (mac OSX). it didn't ask me my permission to move the files into htdocs. what can i do?
carpediem930
 
Posts: 2
Joined: 24. October 2009 00:37

Re: Unable to save to htdocs

Postby carpediem930 » 24. October 2009 01:04

i figured it out, but it looks like the joomla install video skips a step or two, so i have to dig around for answers. grr
carpediem930
 
Posts: 2
Joined: 24. October 2009 00:37

Re: Unable to save to htdocs

Postby RamblingCloud » 23. June 2013 14:17

Hi everyone :)

i faced the same problem, and i hope you found the solution to this as well, anyways I'm putting a brief reference on how to go about fixing this issue, I'm a linux newbie and this will be a li'l extented post, and its very simple :)

I'm using fedora-18, and have installed XAMPP-1.8.1 on it under /opt.
I've one user besides root on my machine, the regular account is named kerberos (very funny, but i was looking for a fancy name :P :P)

ok, lets roll -

1. open your terminal and login using su .
2. start your xampp by firing
Code: Select all
 /opt/lampp/lampp
start in the terminal.
3. then open your browser, type in the address bar
Code: Select all
http://localhost
this is to check if the xampp is properly installed and is working fine (just a li'l reminder, by typing in http://localhost in the address bar, we actually access the htdocs directory which resides inside /opt/lampp).
4. so, now we want to be able to save our files into the htdocs folder for that follow the underwritten lines
    a. change the permission of users on the machine who can access the folders, from the terminal fire the command,
    Code: Select all
    chown -R kerberos /opt/lampp
    .
    b. second go to /opt/lampp/etc and open the httpd.conf file in your text editor
    c. in the conf file find

    <Directory />
    AllowOverride none
    Require all denied
    </Directory>
    and

    DocumentRoot "/opt/lampp/htdocs"
    <Directory "/opt/lampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # http://httpd.apache.org/docs/trunk/mod/core.html#options
    # for more information.
    #
    #Options Indexes FollowSymLinks
    # XAMPP
    Options Indexes FollowSymLinks ExecCGI Includes

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    #AllowOverride None
    # since XAMPP 1.4:
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
    </Directory>


    c. in
    <Directory />
    AllowOverride none
    Require all denied
    </Directory>
    change the
    Code: Select all
    AllowOverride none
    to
    Code: Select all
    AllowOverride All
    and also change
    Code: Select all
    Require all denied
    to
    Code: Select all
    Require all granted


    the other set of lines can be modified if you wish to place your project files in some other directory then htdocs, (i've not figured it out how, i will definitely appreciate any help :) )

    d. now save your httpd.conf file.
5. now go back to the terminal stop and start the lampp.

now you will be able to save your files in the htdocs folder directly :) :)

NOTE: this is not the safest approach if you are willing to use this xampp for actual site hosting, but it works for production purpose. Kindly help in improving the answer :) :) thanks :) :)
RamblingCloud
 
Posts: 2
Joined: 23. June 2013 13:31
XAMPP Version: 5.6.3
Operating System: fedora-18

Re: Unable to save to htdocs

Postby Altrea » 23. June 2013 16:22

RamblingCloud wrote:c. in
<Directory />
AllowOverride none
Require all denied
</Directory>
change the
Code: Select all
AllowOverride none
to
Code: Select all
AllowOverride All
and also change
Code: Select all
Require all denied
to
Code: Select all
Require all granted


CAUTION: This is a change that has direct influence to the overall security of your Apache!
This <Directory>-Block represent the default behaviour how Apache has to act if no other more specific Access rule matches.
I can not recommend to do that change for any reason
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6829
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: Windows 10 Pro x64

Re: Unable to save to htdocs

Postby RamblingCloud » 23. June 2013 16:34

Altrea

can you please suggest a way.... i'm stuck real bad if not for this....
RamblingCloud
 
Posts: 2
Joined: 23. June 2013 13:31
XAMPP Version: 5.6.3
Operating System: fedora-18


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests