-1

I have WAMP installed on Windows 7 Home Premium

I am trying to install my Joomla Component locally on windows 7 but keep getting Permission errors.

Warning: file_put_contents(C:\PHP\workspace-php\Joomla_1.5.9\tmp\install_4c3c49163508c) [function.file-put-contents]: failed to open stream: Permission denied

Now I tried to change to change the permissions of the folder but this didn't seem to make any difference.

Can someone give me a rundown of how to change permissions in Windows 7 so that a PHP file has full control on a folder and it's subfolders?

2 Answers 2

1

If you don't see permissions at all in explorer go "Tools"->"Folder Options"->"View"-> scroll to the bottom in the advanced settings box and uncheck "Use Sharing Wizard(Recommended)".

Something to try is when you click on the folder and pull up the properties about half way down it says "Edit...". You should be able to edit at least your users permissions in there.

Also if the settings are inherited from a parent folder it wont let you change them til you uncheck the box in "Advanced"->"Change Permissions". I always choose "add" when it prompts what you want to do.

Let me know if it still doesnt work.

4
  • Ok, in the security tab every user has full permissions. As I understand, WAMP uses the SYSTEM user which already had full permissions. An interesting thing was that when I changed the permissions I got a few 'Access Denied' permissions for something the PHP installed earlier using the Joomla Install wizard. I am still getting the same Permission denied error. I have a feeling that this is to do with the PHP user that is being used. but this is just a guess.
    – jax
    Jul 13, 2010 at 12:55
  • Just to update I got it working another way. When Joomla (PHP) creates a file and uploads it to it's tmp directory, it appears the file has the default permissions which are kind of restrictive - Am I able to change the permissions of a file that is uploaded?
    – jax
    Jul 13, 2010 at 15:00
  • the file should inherit permissions from the tmp directory Jul 14, 2010 at 0:51
  • I am facing the same issue of folder permissions. I have changed all the users to have full control, but every time i get Read only checked in my folder properties.
    – codingbbq
    Dec 27, 2012 at 6:54
0

if you still can't work around this problem here is another work around, use Magento API:

$proxy = new SoapClient('http://Domian/api/soap/?wsdl');
$sessionId = $proxy->login('user', 'pass');
$newImage = array(
'file' => array(
    'name' => 'file_name',
    'content' => base64_encode(file_get_contents('your_pic.jpg')),
    'mime'    => 'image/jpeg'
),
'label'    => 'anylabel',
'position' => 2,
'types'    => array('small_image'),
'exclude'  => 0
);

$imageFilename = $proxy->call($sessionId, 'product_media.create', array('SKU',$newImage));

This will upload the image from any machine that can deal with SOAP, also remember to put the image file at the same directory with your code example: the code is at www/code.php image should be at www/image.jpg

Not the answer you're looking for? Browse other questions tagged .