sarvan75 / yii-user-management

Automatically exported from code.google.com/p/yii-user-management
0 stars 0 forks source link

include(\modules\messages\models\YumMessage.php) ailed to open stream: No such file or directory #193

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. http://localhost/glp/index.php/friendship/friendship/invite

What is the expected output? What do you see instead?

should send invitation

What version of the product are you using? On what operating system?
include(C:\wamp\www\glp\protected\modules\messages\models\YumMessage.php) [<a 
href='function.include'>function.include</a>]: failed to open stream: No such 
file or directory

C:\wamp\www\yii_framework\framework\YiiBase.php(397)

385     }
386 
387     /**
388      * Class autoload loader.
389      * This method is provided to be invoked within an __autoload() magic 
method.
390      * @param string $className class name
391      * @return boolean whether the class has been loaded successfully
392      */
393     public static function autoload($className)
394     {
395         // use include so that the error PHP file may appear
396         if(isset(self::$classMap[$className]))
397             include(self::$classMap[$className]);
398         else if(isset(self::$_coreClasses[$className]))
399             include(YII_PATH.self::$_coreClasses[$className]);
400         else
401         {
402             // include class file relying on include_path
403             if(strpos($className,'\\')===false)  // class without namespace
404             {
405                 if(self::$enableIncludePath===false)
406                 {
407                     foreach(self::$_includePaths as $path)
408                     {
409                         
$classFile=$path.DIRECTORY_SEPARATOR.$className.'.php';
Stack Trace
#0  
+  C:\wamp\www\yii_framework\framework\YiiBase.php(397): YiiBase::autoload()
#1  
 unknown(0): YiiBase::autoload("YumMessage")
#2  
–  
C:\wamp\www\glp\protected\modules\friendship\models\YumFriendship.php(166): 
spl_autoload_call("YumMessage")
161             if($user = YumUser::model()->findByPk($this->friend_id))  {
162                 if(Yum::hasModule('messages')
163                         && $user->privacy 
164                         && $user->privacy->message_new_friendship) {
165                     
Yii::import('application.modules.messages.models.YumMessage');
166                     YumMessage::write($user, $this->inviter,
167                             Yum::t('New friendship request from 
{username}', array(
168                                     '{username}' => 
$this->inviter->username)),
169                             YumTextSettings::getText('text_friendship_new', 
array(
170                                     '{username}' => 
$this->inviter->username,
171                                     '{link_friends}' => 
Yii::app()->controller->createUrl('//friendship/friendship/index'),
#3  
+  C:\wamp\www\yii_framework\framework\db\ar\CActiveRecord.php(1008): 
YumFriendship->beforeSave()
#4  
+  C:\wamp\www\yii_framework\framework\db\ar\CActiveRecord.php(787): 
CActiveRecord->insert(null)
#5  
–  C:\wamp\www\glp\protected\modules\friendship\models\YumFriendship.php(46): 
CActiveRecord->save()
41         $this->updatetime = time();
42 
43         if($message !== null)
44             $this->message = $message;
45         $this->status = 1;
46         return $this->save();
47     } 
48 
49     // How many friendship requests have been made in month $month of year 
$year?
50     public static function countRequest($month = null, $year = null) {
51         $timestamp = mktime(0, 0, 0, $month, 1, $year);
#6  
–  
C:\wamp\www\glp\protected\modules\friendship\controllers\YumFriendshipController
.php(70): YumFriendship->requestFriendship("2", "3", "ewargtr")
65 
66         if(isset($_POST['message']) && isset($user_id)) {
67             $friendship = new YumFriendship;
68             if($friendship->requestFriendship(Yii::app()->user->id,
69                         $_POST['user_id'],
70                         $_POST['message'])) {
71                 Yum::setFlash('The friendship request has been sent');
72                 $this->redirect(array('//profile/profile/view', 'id' => 
$user_id));
73             }
74         } 
75 
#7  
 unknown(0): YumFriendshipController->actionInvite(null)
#8  
+  C:\wamp\www\yii_framework\framework\web\actions\CAction.php(107): 
ReflectionMethod->invokeArgs(YumFriendshipController, array(null))
#9  
+  C:\wamp\www\yii_framework\framework\web\actions\CInlineAction.php(48): 
CAction->runWithParamsInternal(YumFriendshipController, ReflectionMethod, 
array())
#10 
+  C:\wamp\www\yii_framework\framework\web\CController.php(309): 
CInlineAction->runWithParams(array())
#11 
+  C:\wamp\www\yii_framework\framework\web\filters\CFilterChain.php(134): 
CController->runAction(CInlineAction)
#12 
+  C:\wamp\www\yii_framework\framework\web\filters\CFilter.php(41): 
CFilterChain->run()
#13 
+  C:\wamp\www\yii_framework\framework\web\CController.php(1146): 
CFilter->filter(CFilterChain)
#14 
+  C:\wamp\www\yii_framework\framework\web\filters\CInlineFilter.php(59): 
CController->filterAccessControl(CFilterChain)
#15 
+  C:\wamp\www\yii_framework\framework\web\filters\CFilterChain.php(131): 
CInlineFilter->filter(CFilterChain)
#16 
+  C:\wamp\www\yii_framework\framework\web\CController.php(292): 
CFilterChain->run()
#17 
+  C:\wamp\www\yii_framework\framework\web\CController.php(266): 
CController->runActionWithFilters(CInlineAction, array("accessControl"))
#18 
+  C:\wamp\www\yii_framework\framework\web\CWebApplication.php(276): 
CController->run("invite")
#19 
+  C:\wamp\www\yii_framework\framework\web\CWebApplication.php(135): 
CWebApplication->runController("friendship/friendship/invite")
#20 
+  C:\wamp\www\yii_framework\framework\base\CApplication.php(162): 
CWebApplication->processRequest()
#21 
+  C:\wamp\www\glp\index.php(13): CApplication->run()

Please provide any additional information below.

Apache/2.2.21 (Win32) PHP/5.3.10 Yii Framework/1.1.10

Original issue reported on code.google.com by NGaga...@gmail.com on 29 May 2012 at 10:59

GoogleCodeExporter commented 9 years ago
Same here!

Original comment by marco.il...@gmail.com on 12 Dec 2012 at 8:42