Jump to content
Larry Ullman's Book Forums

Yii- Version 1 -Cms-Ch22 Installation Composer ?


laurent vignaux
 Share

Recommended Posts

Hello Larry,

 

I read your book twice. Honestly I do not understand very well. 
 
I have already learned from your books, specially the e-commerce. I like the principle of explanation by example. In Yii, you go well in the way of doing your best and understand the subtle mechanisms of this framework.
 
So, I yii installs and works correctly.
 
I followed your chapters and wanted to better understand your example.
 
 
Now i would like test your example CMS.
 
I am unable to launch the application of Cms version of Chapter 22 of your book.
The window is hopelessly empty.
 
I notice in the index.php :
 
$compose = dirname (__ FILE __) '/ protected / vendor / autoload.php.';
 
I do not see a vendor folder in protected'folder and evidently no autoload.php 
 
I have  my composer.phar in protected folder.
 

 

Is the problem here?

 

Thanks for advice

 

cordialy

Link to comment
Share on other sites

Could you confirm if you're using Yii version 1 or Yii version 2? Yii version 2 uses Composer for everything. Yii version 1 only uses Composer for third part extensions. Ch 22 of the book, and that CMS example, was created for Yii version 1. I have not yet updated it for Yii version 2. 

Link to comment
Share on other sites

Hello Larry,

 

i work with the version 1 to yii as the  version 2 seems to be great. I wait with "impatience" the end of yours version 2's book.

 

There is no dossier "vendor" and "runtime" in example CMS ch22

 

I try to work on CH 22 of the book with version 1. 

require_once($yii);
$app = Yii::createWebApplication($config);

$composer = dirname(__FILE__).'/protected/vendor/autoload.php';
require_once($composer);

$app->run();

Ok test and i see that in the browser


Error 500
require_once(/Applications/MAMP/htdocs/yiicmsch22/protected/vendor/autoload.php): failed to open stream: No such file or directory

Thanks for advice

cordialy

Link to comment
Share on other sites

Hello Larry,

 

Yes, i read it and at first i try to install Composer and Elastic but i have a problem with Java' version on my mac.

 

For Composer it's ok, not for Elastic.

 

So i thinking that it will be so important.

 

Now, i understand my problem. i re-read the chap 20.

 

i try again and hope to win the match…

 

Ok it's right, Elastic with Composer is installed.

 

thanks for advice

 

cordialy

Link to comment
Share on other sites

 Share

×
×
  • Create New...