Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: andreea115 (---.range86-159.btcentralplus.com)
Date: May 16, 2014 11:22AM

Hello Everyone

Does Wamp have an equivalent Unix chmod Command to tell what permissions a directory has i.e

-rwxr-xr-x
-rw-rw-r--
-rw-rw-r--
-rw-r--r--
drwxrwxr-x
-rw-r-----
-rwxr-xr-x


The reason for the question is that i am using Wamp with windows 7 and i am trying to upload images to a directory but i keep getting this message;


move_uploaded_file failed to open stream and Permission denied error -wamp server with windows

i subsequently went into my apache and gave permission to the appropriate directory but still keep getting the same message. this is what i did:


<VirtualHost *:80>
ServerName Zend
DocumentRoot "C:\Users\zend\testingZend2\public"
SetEnv APPLICATION_ENV "development"
<Directory "C:\Users\zend\testingZend2\public">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /pictures "C:/Users/test/zend/module/guest/src/guest/pics/holdover"
<Directory "C:/Users/test/zend/module/guest/src/guest/pics/holdover">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


i now want to try and track where the problem is arising from. so, i wish to be able to check what permission each directory in my system has

thank you in advance for your help

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: Otomatic (Moderator)
Date: May 16, 2014 05:31PM

Hi,

PHP has chmod fonction
You can also use is_writable to check whether or not you should change the rights.

> DocumentRoot "C:\Users\zend\testingZend2\public"
> SetEnv APPLICATION_ENV "development"
> <Directory "C:\Users\zend\testingZend2\public">

Do not use "backslash \", even under Windows, use the "slash /"

"DocumentRoot" must not have a trailing slash, however "<directory" could have a trailing slash.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 05/16/2014 05:35PM by Otomatic.

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: andreea115 (---.range86-159.btcentralplus.com)
Date: May 16, 2014 05:47PM

HELLO Otomatic

Thank you so much for replying. i am a bit confused though. the instructions you gave are they to be run on the actual page script,the apache page or the command line?

where do i put this: SetEnv APPLICATION_ENV "development"

also where do i put this: <Directory "C:\Users\zend\testingZend2\public">


thank you

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: Otomatic (Moderator)
Date: May 16, 2014 06:10PM

Hi,

move_uploaded_file is a PHP function. Before executing this function, you must make sure that the destination folder has write permissions. If the destination folder is not "writable", only then you try to modify permissions by chmod. All this in the PHP script.

For the other question, see Apache Documentation, for example for setenv

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: andreea115 (---.range86-159.btcentralplus.com)
Date: May 16, 2014 06:17PM

HELLO Otomatic

thank you so much for your answer. i will read up on it and try again.

last question. the link that you just gave

Re: see Apache Documentation, for example for setenv

the link does not work ( i would very much like to read up on it, can you give me the link again.

thank you so much for your kind attention.

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: Otomatic (Moderator)
Date: May 16, 2014 06:38PM

Hi,

The general url for Apache documentation is: [httpd.apache.org]

It is true that when we do not know much about the organization of the documentation you put "some time" to find the desired information.
You have to see Run-time Configuration Directives: [httpd.apache.org]
Then setenv directive: [httpd.apache.org]

I think I'll add links on Apache, PHP and MySQL documentation in my signature. winking smiley
For more information, these links are on the home page of WampServer. smiling smiley
It is I who asked that this be added to WampServer 2.5

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Does Wamp have an equivalent Unix chmod Command to tell what permissions a diretory has
Posted by: andreea115 (---.range86-159.btcentralplus.com)
Date: May 16, 2014 07:02PM

HELLO Otomatic

Thanks so much for your help. i will read up on everything and give it a try.

my warmest gratitude for your advice.

warm regards

Paul

Options: ReplyQuote


Sorry, only registered users may post in this forum.