Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

help \magento/media” must be writable
 
nikos katsikanis
Jr. Member
 
Total Posts:  17
Joined:  2007-09-05
Scotland
 

I have a Xampp Xp pro setup. When I try and install Magento I get the following message

Path “C:\xampp\htdocs\mag\magento/media” must be writable

Please can anyone tell me how do I go about fixing this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
winans_fred
Sr. Member
 
Total Posts:  83
Joined:  2007-09-06
 

Please review the install instructions here:

http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide

You’ll find that there are some directories you must CHMOD to 777 for Magento to install correctly.  Those directories are:

magento/app/etc
magento/var
and all the directories under magento/media

Also, make sure that
magento/var/.htaccess is writeable as well (Yes, CHMOD 777)

Good luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikos katsikanis
Jr. Member
 
Total Posts:  17
Joined:  2007-09-05
Scotland
 

I want to test locally with apache on windows. How can I do this CHMOD stuff in WIndows? Also I can’t find the directory /media/ on my magento directory.

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikos katsikanis
Jr. Member
 
Total Posts:  17
Joined:  2007-09-05
Scotland
 

So I take it Magento is not supposed to be run locally on Windows?

 
Magento Community Magento Community
Magento Community
Magento Community
 
WisdOMbooks
Sr. Member
 
Avatar
Total Posts:  144
Joined:  2007-08-31
Kolkata (Calcutta) - INDIA
 
nikos katsikanis - 15 November 2007 11:13 PM

So I take it Magento is not supposed to be run locally on Windows?

NO, of course!

Myself I am happily running locally
on a XAMPP-WinXProSP2 box,
as, I guess, MANY others.

You have to take it simply
as it has been specified in Quote # 1 above by dsgnfred,
and in MANY posts on the Installation Forum:
by implementing ALL the pre-requisites for Magento to run.

You get even a 4-pages mini-manual to follow step-by-step, if needed.

Perhaps, if possible, you can start the whole thing afresh
by re-installing your LAMPP solution and
by installing, on top of that, the latest Magento download.

Best of Luck smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikos katsikanis
Jr. Member
 
Total Posts:  17
Joined:  2007-09-05
Scotland
 

Thanks a lot for explaining that. however I get a 403 error when I try and go to http://www.nolimitclubbing.com/lib_php/php_pdo_mysql.dll

 
Magento Community Magento Community
Magento Community
Magento Community
 
allienato
Member
 
Total Posts:  35
Joined:  2008-06-10
Brescia, Italy
 

actually I have the same problem on my pc, while on the notebook all works..

First, I thought was a problem caused by having more than 1 user on Windows Xp OS.
But was just a suppose, because then I found that on either two computers there was only one user (so, also on pc).

I used the same installation process on the 2 systems, with same xampp,ecc…

so, what’s the problem?

(I would resolve it also on the pc..)

 
Magento Community Magento Community
Magento Community
Magento Community
 
allienato
Member
 
Total Posts:  35
Joined:  2008-06-10
Brescia, Italy
 

I “brutally” resolved the problem today editing a Mage core file in magento directory. This file is magento\app\code\core\Mage\Install\Model\Installer\Filesystem.php

at line 79 there is some code like this:

protected function _checkPath($path$recursive$existence$mode)
    
{
        $res 
true;
        
$fullPath dirname(Mage::getRoot()).$path;
        if (
$mode == self::MODE_WRITE{
            $setError 
false;
            if (
$existence{
                
if (!is_writable($fullPath)) {
                    $setError 
true;
                
}
            }
            
else {
                
if (file_exists($fullPath) && !is_writable($fullPath)) {
                    $setError 
true;
                
}
            }

            
if ($setError{
                $this
->_getInstaller()->getDataModel()->addError(
                    
Mage::helper('install')->__('Path "%s" must be writable'$fullPath)
                );
                
$res false;
            
}
        }

all you have to do is to set “false” the $setError var, two times, under if($existence) control, that it means:

if ($existence{
                
if (!is_writable($fullPath)) {
                    $setError 
false;
                
}
            }
            
else {
                
if (file_exists($fullPath) && !is_writable($fullPath)) {
                    $setError 
false;
                
}
            }

so the code of the entire function will be:

protected function _checkPath($path$recursive$existence$mode)
    
{
        $res 
true;
        
$fullPath dirname(Mage::getRoot()).$path;
        if (
$mode == self::MODE_WRITE{
            $setError 
false;
            if (
$existence{
                
if (!is_writable($fullPath)) {
                    $setError 
false;
                
}
            }
            
else {
                
if (file_exists($fullPath) && !is_writable($fullPath)) {
                    $setError 
false;
                
}
            }

            
if ($setError{
                $this
->_getInstaller()->getDataModel()->addError(
                    
Mage::helper('install')->__('Path "%s" must be writable'$fullPath)
                );
                
$res false;
            
}
        }

I think there aren’t no problems make this edit when workin locally on windows, it’s just a control needed for protection on the linux webserver (because chmod only exist on linux). And now it works on my other computer. Hope is usefull!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Remi Arntzen
Jr. Member
 
Total Posts:  3
Joined:  2013-09-02
 

This is an operating system issue.
My operating system uses selinux features, which were preventing php from gaining write permissions.

the solution is:
chown -R apache:apache /var/www/html/magento
chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/app/etc
chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/var
chcon -R -t httpd_sys_rw_content_t /var/www/html/magento/media

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top