I need assistance for my project. I created the chmod <?php chmod("../database.php",0777); ?>
<?php chmod("../database.php",0777); ?>
that is in inside install folder then the dabase.php is in the root. I am using godaddy. I tried to use Filezilla and input 777 or 755 to set the permission, I got some error from ftp filezilla:
Command: CWD /
Response: 250 CWD command successful.
Command: SITE CHMOD 777 install
Response: 500 'SITE CHMOD 777 install': command not understood
Status: Retrieving directory listing of "/"...
Status: Directory listing of "/" successful
Status: Set permissions of '/install/1.php' to '777'
Command: CWD /install
Response: 250 CWD command successful.
Command: SITE CHMOD 777 1.php
Response: 500 'SITE CHMOD 777 1.php': command not understood
And there is no options in Godaddy file manager for privacy setting for page to setup the the permission. and I also set permission to the folder on which the chmod are in.
Here is the code in database file:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$db['default']['username'] = "usernamedb";
$db['default']['password'] = "mypassword";
$db['default']['database'] = "mydb";
$db['default']['hostname'] = "localhost";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
$active_group = "default";
$active_record = TRUE;
Note: the information of the code is not the actually for password and username etc for my privacy.
and Here's the error I got:
Warning: chmod() [function.chmod]: Permission denied in D:\\Hosting\\11924492\\html\\install\\1.php on line 2
Hope anyone can help me.
Thank you
Oldskool is right, you really shouldn't use 777. However, the crux of your issue is that you are attempting to use chmod
on a windows environment (the clue is the path to your PHP file: D:\\Hosting\\11924492\\html\\install\\1.php
). chmod
is a unix command.
It does look like GoDaddy offers a way for you to edit file permissions on their windows machines through their console: https://www.godaddy.com/help/set-directory-permissions-windows-6481
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.