Jump to content
Larry Ullman's Book Forums

mtester

Members
  • Posts

    6
  • Joined

  • Last visited

mtester's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I believe you are misunderstanding how permissions are used in *nix systems. Setting the permission 6 (or rw) is not good in general on a directory. You want 5 or 7. So 755 or 775 or 777 are the most common ones. Why? This is taken from Wikipedia. There are numerous other sources available. Something else you may want to look at is the Umask being set. That controls the default permissions of new directories/files when they are created. This is usually set in ~/.bashrc as umask 022 # default files permissions are 644 and for directories, 755 or umask 027 # default files permissions are 640 and for directories 750 Finally, the last thing to check is in the Yii Framework itself in ./framework/web/CAssetManager.php. There are two settings there that determine how files and directories are created. public $newFileMode=0666; public $newDirMode=0777; I changed these to be 0664 and 0775, respectively for more security on the machine. Hope that helps.
  2. Sorry, this year has been crazy so far. I've been dropping the ball too. GoDaddy has this format: "home" path: /var/chroot/home/content/12/123456789/ webroot is then: /var/chroot/home/content/12/123456789/html Multiple domain names are like this: ~/html/domainone ~/html/domaintwo ~/html/domainthree My purpose is making a customer review site. The customer doesn't have their own hosting yet, so I'm just loading their site up on one of my domains, such as: ~/html/domainfive/customername/ <-- this should be what Yii thinks is the webroot. It's not a huge issue. I'm just turning off URL management for now. And when they go live, it'll have it's own hosting, so this shouldn't matter anyways. Just bugs me when things don't work and I'm not sure why.
  3. If it wasn't clear above, I modified my dev server to be like my real server. GoDaddy: /home/user/html/domainname/sitename/index.php Dev: /var/www/domainname/sitename/index.php I would have hoped this would result in identical environments for this, but GoDaddy is doing something different. I changed my urlmanager rules back to normal on my dev server: 'urlManager'=>array( 'urlFormat'=>'path', 'rules'=>array( '/' => 'site/index', 'home' => 'site/index', '<view:(about)>' => 'site/page', '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), // 'showScriptName'=>false, // 'urlSuffix'=>'.html', ), And my .htaccess file at the index.php level: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ /index.php? [L] On my Dev server, no problems. However, using these same settings on the live server still results in links being written as: h.t.t.p.:././domainname.com/domainname/sitename/index.php/site/login instead of h.t.t.p.:././domainname.com/sitename/index.php/site/login Ugh. I feel like I'm missing something simple and I will bang my head on a wall when I figure it out.
  4. No, not yet. Although to be honest, with the holidays, I haven't done much of anything the past few weeks. Right now, I'm playing with my development environment, setting it up to match GoDaddy's setup more so I can keep things in sync better once I find the answer. I've tried playing with urlManager rule settings, for example, changing: 'view:(about)>' => 'site/page', '<controller:\w+>/<id: \d+>' => '<controller>/view', to: 'view:(about)>' => 'sitename/site/page', '<controller:\w+>/<id: \d+>' => 'sitename/<controller>/view', but that doesn't work...probably because it's probably trying to go through the index.php first, which would fail. So if you have any quick ideas, that'd be great! Thanks, Malcolm
  5. Additional notes: With UrlManager turned off, links look correct, i.e.: domain.com/sitename/index.php?r=site/page&view=about With UrlManager turned on to the default settings, I get the above errors. Default Settings: 'urlManager'=>array( 'urlFormat'=>'path', 'rules'=>array( '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ), Interestingly enough, when this is malfunctioning, the main menu links are all incorrect, but the breadcrumb links are actually correct. I assume I just need to change the rules in UrlManager, but I'm not sure what the best way to do that is, as I'm not really familiar with this aspect. I was planning on using the "hide index.php" rules later before we go live, so if anyone has a way to fix my existing problem, and include that, that'd be perfect. Many thanks!
  6. Hi, I have a bit of an odd (for me) problem. I originally created a yii site on a production server to play around with, and it worked fine. (1.1.13) In earnest, I created a site on my local server recently, which is working fine. (1.1.14) I removed the old installation from my production server, installed 1.1.14, and zipped/uploaded my local yii site. On my local site, the path is /var/www/<sitename>/index.php On my production server (GoDaddy), the path is ~/html/<domainname>/<sitename>/index.php Now links are showing up on the production site as: domainname.com/domainname/sitename/index.php /domainname/ does not belong and is causing 401 errors. I had UrlManager turned on, but had not yet customized the paths, so they are the default ones, normally I would see (on my local server) domainname.com/index.php/site/index for example, and I expect in production to see domainname.com/sitename/index.php/site/index. Any ideas? I've tried setting homeUrl and BaseUrl and loginUrl directly, but none of it makes a difference. Thanks, Malcolm
×
×
  • Create New...