php creates folder with 341 permissions -


didn't got luck finding answer on google , last try before trying other methods.

i have script this:

        // current year , month         $cur_year = date('y');         $cur_month = date('m');         $long_type = $this->getfile_longtype();          $folder = $_server['document_root']."/".folder_cms."/uploads/$long_type/$cur_year/$cur_month";          // check whether folder exists         if(!is_dir($folder)){              // try make folder recursively             if(!mkdir($folder,"0777",true)){                  logerror($message, __file__, __line__);                 throw new exception("failure creating proper directories");              }          } 

to make work , chmod'ed uploads directory , it's files , dirs 777 ( beter suggestion here? )

the long type evaluates 'images' , directory has been created on server.

now , script create folder named year permissions 341. not wat want because terminates recursive folder buildup or blocks it's content me.

any or suggestions?

php version : 5.2.5

configure command : './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mssql=/usr/local/freetds' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'

don't use string "0777", use 0777.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -