Yii Framework Forum: Application runtime path " " is not valid. - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Application runtime path " " is not valid. Rate Topic: -----

#1 User is offline   whoopass 

  • Advanced Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 27-May 09
  • Location:Ajax, Ontario, Canada

Posted 13 April 2010 - 12:04 PM

Ok this is driving me nuts and I'm down to the wire can't figure it out, so maybe someone around here has a clue that I'm missing haha.

Ok so here's the error:


[b]CException[/b]

[b]Description[/b]
Application runtime path "/var/www/vhosts/albern.to/subdomains/yii/httpdocs/albern/protected/config/runtime" is not valid. Please make sure it is a directory writable by the Web server process.


[b]Source File[/b]
/var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/base/CApplication.php(236)

00224:             $this->setRuntimePath($this->getBasePath().DIRECTORY_SEPARATOR.'runtime');
00225:             return $this->_runtimePath;
00226:         }
00227:     }
00228: 
00229:     /**
00230:      * @param string the directory that stores runtime files.
00231:      * @throws CException if the directory does not exist or is not writable
00232:      */
00233:     public function setRuntimePath($path)
00234:     {
00235:         if(($runtimePath=realpath($path))===false || !is_dir($runtimePath) || !is_writable($runtimePath))
00236:             throw new CException(Yii::t('yii','Application runtime path "{path}" is not valid. Please make sure it is a directory writable by the Web server process.',
00237:                 array('{path}'=>$path)));
00238:         $this->_runtimePath=$runtimePath;
00239:     }
00240: 
00241:     /**
00242:      * Returns the root directory that holds all third-party extensions.
00243:      * @return string the directory that contains all extensions. Defaults to the 'extensions' directory under 'protected'.
00244:      */
00245:     public function getExtensionPath()
00246:     {
00247:         return Yii::getPathOfAlias('ext');
00248:     }

[b]Stack Trace[/b]
#0 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/base/CApplication.php(224): CApplication->setRuntimePath('/var/www/vhosts...')
#1 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/logging/CFileLogRoute.php(55): CApplication->getRuntimePath()
#2 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/logging/CLogRouter.php(65): CFileLogRoute->init()
#3 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/base/CModule.php(357): CLogRouter->init()
#4 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/base/CModule.php(445): CModule->getComponent('log')
#5 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/base/CApplication.php(119): CModule->preloadComponents()
#6 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/YiiBase.php(112): CApplication->__construct('/var/www/vhosts...')
#7 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/yii/framework/YiiBase.php(85): YiiBase::createApplication('CWebApplication', '/var/www/vhosts...')
#8 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/albern/index.php(11): YiiBase::createWebApplication('/var/www/vhosts...')
#9 {main}


Now I've installed this exact application on my other server and it ran fine, but then found it's missing some GD support so it's no good, not to mention it's not meant for hosting other sites, just my own.

Here are the requirements that passed on my server:
http://www.sterlings...i/requirements/

And here they are for the server getting this error:
http://albern.to/yii...ments/index.php

The server is running Plesk 8.4

Here's the real kicker, both the application folder and the yii folder holding the framework have chmod 755, and I've tried 777 but no dice, still get this error.

If I chmod protected/runtime, server will hang (if group gets write priviledges)

My web partner and I are trying two final tricks to see if we can get something going but maybe his SELinux server is just locked too tight. Our plans are to revise the extensions and where they are installed, I caught eye of a php4 folder mention in the php.ini and then the other is to give the folder the apache user rights to own the file. Aside from that we're out of ideas.

Overall this has been a nice welcome back to the community, I can't wait to be done with school and stuff and get back on projects for this.

Hopefully someone can shed light before I shoot myself in the head! haha
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 13 April 2010 - 12:19 PM

In the error the directory "protected/config/runtime" is mentioned, but later you mention "protected/runtime"?
0

#3 User is offline   whoopass 

  • Advanced Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 27-May 09
  • Location:Ajax, Ontario, Canada

Posted 13 April 2010 - 12:22 PM

sorry meant protected/config/runtime. Whether it's chmod 755 or 777 doesn't matter, still does nothing.

I did however find out as well that the server hangs from protected/runtime if it has group write permissions.

It's just a slew of issues
0

#4 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 13 April 2010 - 02:05 PM

If that works on one server and not on the other then that's a server issue my friend not a framework issue. Best solution will be to either search for an answer regarding the server hang or use the framework with the server that does operate as normal.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

#5 User is offline   whoopass 

  • Advanced Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 119
  • Joined: 27-May 09
  • Location:Ajax, Ontario, Canada

Posted 13 April 2010 - 03:31 PM

View PostVince., on 13 April 2010 - 02:05 PM, said:

If that works on one server and not on the other then that's a server issue my friend not a framework issue. Best solution will be to either search for an answer regarding the server hang or use the framework with the server that does operate as normal.


I realize that, that's why I gave the information about both platforms to see if anyone has had the issue before.

The problem with hosting it on the working server is 2 things. 1 it's a small hosting setup, it's meant for my business site, nothing more - we do some test here and there but I can't run other companies off it specially when they plan on having lots of traffic and video uploads.

The other issue is I don't have full control over the settings and the GD settings are not correct to run some of the code I've done in the framework, so that went out the door or else I would have hosted it temporary on my server.

Wouldn't happen to know anything about centOS / plesk 8.4 and yii setups?

Y!! said:

In the error the directory "protected/config/runtime" is mentioned, but later you mention "protected/runtime"?


I found out why that actually happened too, in the basePath=> in the main config file, after the director seperator I had .'' instead of the '..' which skewed where it was pointing to. The error remains the same, it simply just removed the /config/ part in the link.
0

#6 User is offline   amejia 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-June 11

Posted 28 July 2011 - 03:30 PM

Solved!

I had the same problem and I fixed making the directory writable by the webserver (apache).

If you notice it says:
throw new CException(Yii::t('yii','Application runtime path "{path}" is not valid. Please make sure it is a directory writable by the Web server process.',


Solution:
To make it writable just execute:
# chown www-data -R <yii-directory> 

2

#7 User is offline   Irakli Janiashvili 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 01-August 11

Posted 01 August 2011 - 05:50 AM

# chmod -R 777 /var/www/vhosts/albern.to/subdomains/yii/httpdocs/albern/protected/runtime

1

#8 User is offline   frankey 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 18-September 11

Posted 18 September 2011 - 08:19 AM

hi there,

just know yii for a hour now, and wanted to get my hands dirty, due i got the same error. I was playing around a bit and noticed the following:

i upload a fresh yii packages, copied onserver the demo blog files to the root and set the index.php and main.php.

the error was thrown.



i upload a fresh yii packages, ftp the demo blog files to the root and set the index.php and main.php.

no error, it worked.
0

#9 User is offline   kebyang1511 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 01-June 13

Posted 12 June 2015 - 12:35 PM

View Postamejia, on 28 July 2011 - 03:30 PM, said:

Solved!

I had the same problem and I fixed making the directory writable by the webserver (apache).

If you notice it says:
throw new CException(Yii::t('yii','Application runtime path "{path}" is not valid. Please make sure it is a directory writable by the Web server process.',


Solution:
To make it writable just execute:
# chown www-data -R <yii-directory> 





it worked ... thanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users