with a MySQL database

264 views
Skip to first unread message

Raghul

unread,
Nov 14, 2012, 6:00:54 AM11/14/12
to phundam...@googlegroups.com
Iwant to install Phundament 3 with a MySQL database

app README says

"If you want to install Phundament 3 with a MySQL database, you have to update your config first."

which file?main.p3 o rmain?

then "You may skip the --dev and --prefer-source options on production systems."

please give me some example am new in yii also

When i edit mainp3 got this error(database name=p3)


The table "p3_widget" for active record class "P3Widget" cannot be found in the database.

I think this is because of no database table, please help me with this

Raghul

unread,
Nov 14, 2012, 7:05:27 AM11/14/12
to phundam...@googlegroups.com
   got error with this cmd "php composer.phar install --dev --prefer-source"  
  sh: hg: not   installed ,
my question is that how can I install in local machine?can u give sql dump

            
  [RuntimeException] 
  Failed to e    
  xecute hg c        
  lone 'https        
  ://bitbucke        
  t.org/Crisu        
  83/yii-less        
  ' '/var/www        
  /phundament        
  /protected/        
  extensions/        
  crisu83/yii        
  -less' && c        
  d '/var/www        
  /phundament        
  /protected/        
  extensions/        
  crisu83/yii        
  -less' && h        
  g up '045c7        
  9d2943e'           
                     
           
                     

             


schmunk

unread,
Nov 14, 2012, 8:39:14 AM11/14/12
to phundam...@googlegroups.com
Hi,


You either need to install mercurial (hg) or skip the --prefer-source option.

Best regards,
schmunk

schmunk

unread,
Nov 14, 2012, 8:44:00 AM11/14/12
to phundam...@googlegroups.com
If you want to use MySQL, update your config file - before installation, otherwise you'll have to run php composer.phar install again.

Comment the SQLite part and uncomment the MySQL part and adjust the values here: https://github.com/phundament/app/blob/master/config/main.php#L203

Raghul

unread,
Nov 15, 2012, 1:40:18 AM11/15/12
to phundam...@googlegroups.com
please help me to find what am wrong!!

1.extracted the zip file .
2.edited "cinfig" files
3. run the cmd  php composer.phar install
4.go to url in browser  http://localhost/phundament/
   get this error "The table "p3_widget" for active record class "P3Widget" cannot be found in the database. "

Is this all for installation with Mysql (in local machine)?

Schmunk

unread,
Nov 15, 2012, 3:13:57 AM11/15/12
to phundam...@googlegroups.com
Yes, should be everything.

Did you run the migration command at the end of the installation? You can also try to run

./yiic migrate

manually.

Can you also post the complete output of the installation command?

Raghul

unread,
Nov 19, 2012, 7:50:56 AM11/19/12
to phundam...@googlegroups.com
raghul@islet50:/var/www/phundament-app-6a471ad$ php composer.phar install --dev
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
Welcome to Phundament Installation 3 via composer

This setup script will download all packages specified in composer.json. It will also trigger the creation of an Yii web application, please answer the upcoming confirmation questions with [y]es.

Install Phundament 3 now? [yes|no] y
Installing dependencies from lock file
Nothing to install or update
Installing dev dependencies
  - Installing crisu83/yii-less (0.0.1)
    Downloading: 100%         

  - Installing twitter/bootstrap (2.0.3)
    Downloading: 100%         

  - Installing phundament/lessii (dev-master)
    Cloning 44a7777a602a97a1f86a96f10f1deccab46d2b47

Generating autoload files


Installation completed.

Thank you for choosing Phundament 3!


this is what i get ,p
no file generated in migration folder, I relay  need Phundament.
lease correct me what is wrong!!,

schmunk

unread,
Nov 19, 2012, 8:26:58 AM11/19/12
to phundam...@googlegroups.com
Please try the following:
  • setup a MySQL database for Phundament
  • double-check your Yii db component settings for MySQL in config/main.php
  • run ./yiic migrate ;this command is invoked by php composer.phar install and update
Could you also post the output of the migrate command?

Raghul

unread,
Nov 19, 2012, 11:13:03 PM11/19/12
to phundam...@googlegroups.com
my main.php is attached,please check ,
is their any other file I need to config? like "main.p3,console.p3".

out put of ./yiic migrate
------
raghul@islet50:/var/www/phundament-app-6a471ad/protected$ ./yiic migrate

Yii Migration Tool v1.0 (based on Yii v1.1.10)

Creating migration history table "tbl_migration"...done.
No new migration found. Your system is up-to-date.
------

No table generated in configured database!!!!  ,
main.php

Schmunk

unread,
Nov 20, 2012, 3:21:53 AM11/20/12
to phundam...@googlegroups.com
This is an older version, about 6 months see https://github.com/phundament/app/commit/6a471ad227d7934e66184698de5903f2de7c3c60

Can you try the latest one from here: https://github.com/phundament/app/tags ?
Or is this an existing project?
> <main.php>

Raghul

unread,
Nov 21, 2012, 5:02:38 AM11/21/12
to phundam...@googlegroups.com
Take your link and follow the steps but at the end  got error  please check attached file 


shows has error 
PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) 

Am just beginner of  Yii , my purpose is that , create app/site using  phundament,
like crete my own controllers, views,model,module,etc,etc so please give me suitable link for me     
I really appreciate your help,  

Thanks ,
error.txt

schmunk

unread,
Nov 21, 2012, 10:09:51 AM11/21/12
to phundam...@googlegroups.com


On Wednesday, November 21, 2012 11:02:38 AM UTC+1, Raghul wrote:
Take your link and follow the steps but at the end  got error  please check attached file 


shows has error 
PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)

Your MySQL installation is not running correctly. Could you verify your PHP-MySQL connection.
 


Am just beginner of  Yii , my purpose is that , create app/site using  phundament,
like crete my own controllers, views,model,module,etc,etc so please give me suitable link for me     
I really appreciate your help,  

Thanks ,

Please try php composer.phar update

Sorry about that, but Github has changed its URLs and so I had to update the package repo URLs.
When you're using composer.phar intsall composer wants to retrieve the packages from the outdated URLs still specified in the composer.lock file.

Raghul

unread,
Nov 22, 2012, 12:44:08 AM11/22/12
to phundam...@googlegroups.com
Hi, sorry to disturb you ,
Got error in "php composer.phar update" command

supports-Mac-mini:app-master preetha$ php composer.phar update

Welcome to Phundament Installation 3 via composer

Updating your application to the lastest available packages...
Loading composer repositories with package information
Updating dependencies
  - Installing yiisoft/yii (1.1.12)
    Downloading: 100%        


                                                                                                                          
  [UnexpectedValueException]                                                                                              
  '/Library/WebServer/Documents/app-master/vendor/yiisoft/yii/bdf91db8b5b90d9e51d8439d29f1d61c.zip' is not a zip archive. 
                                                                                                                          


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-custom-installers] [--no-scripts] [-v|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

Schmunk

unread,
Nov 22, 2012, 9:04:50 AM11/22/12
to phundam...@googlegroups.com
Hi,

no need for you to be sorry :)
But I've no clue about the error, yet, sorry.


I ran composer update without problems:

$ php composer.phar -v update
Welcome to Phundament Installation 3 via composer

Updating your application to the lastest available packages...
Loading composer repositories with package information
Updating dependencies
- Installing yiisoft/yii (1.1.12)
Downloading: 100%
Unpacking archive
Cleaning up

- Installing crisu83/yii-rights (0.0.1)
Downloading: 100%
Unpacking archive
Cleaning up

- Installing mishamx/yii-user (0.0.1)
Downloading: 100%
Unpacking archive
Cleaning up

...

You may try to remove vendor/yiisoft/yii and run update again, or post your question here:
https://groups.google.com/forum/?hl=de_US&fromgroups#!forum/composer-dev

Since the error message states that this is not a zip archive, maybe there were problems with the downloaded package, was it incomplete?


Best regards,
schmunk
--
#Contact
sch...@usrbin.de
skype://schmunk23
http://usrbin.de

#Social
http://www.facebook.com/schmunk42
http://twitter.com/schmunk42
https://www.xing.com/profile/Tobias_Munk
http://www.linkedin.com/pub/tobias-munk/20/a67/380

#OpenSource
https://github.com/schmunk42
http://phundament.com/
http://lithron.de/

#Music
http://www.lastfm.de/user/schmunk42

Raghul

unread,
Nov 28, 2012, 2:39:01 AM11/28/12
to phundam...@googlegroups.com
hai,


I used phundament with default settings ,then I decide to convert  to mysql  changed main.php,and run "php composer.phar update" got these error can u help me with it?


supports-Mac-mini:app-master preetha$ php composer.phar update
Welcome to Phundament Installation 3 via composer

Updating your application to the lastest available packages...
Loading composer repositories with package information
Updating dependencies
Nothing to install or update
Generating autoload files

Yii Migration Tool v1.0 (based on Yii v1.1.12)

extended with EMigrateCommand by cebe <ma...@cebe.cc>

The following modules are disabled: admin, anOtherModule, core

PHP Error[2]: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)
    in file /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/db/CDbConnection.php at line 422
#0 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/db/CDbConnection.php(422): PDO->__construct()
#1 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/db/CDbConnection.php(374): CDbConnection->createPdoInstance()
#2 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/db/CDbConnection.php(331): CDbConnection->open()
#3 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/db/CDbConnection.php(309): CDbConnection->setActive()
#4 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/base/CModule.php(388): CDbConnection->init()
#5 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/cli/commands/MigrateCommand.php(443): CConsoleApplication->getComponent()
#6 /Library/WebServer/Documents/app-master/vendor/yiiext/migrate-command/EMigrateCommand.php(365): EMigrateCommand->getDbConnection()
#7 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/cli/commands/MigrateCommand.php(483): EMigrateCommand->getMigrationHistory()
#8 /Library/WebServer/Documents/app-master/vendor/yiiext/migrate-command/EMigrateCommand.php(348): EMigrateCommand->getNewMigrations()
#9 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/cli/commands/MigrateCommand.php(85): EMigrateCommand->getNewMigrations()
#10 /Library/WebServer/Documents/app-master/vendor/yiiext/migrate-command/EMigrateCommand.php(265): EMigrateCommand->actionUp()
#11 unknown(0): EMigrateCommand->actionUp()
#12 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/console/CConsoleCommand.php(173): ReflectionMethod->invokeArgs()
#13 /Library/WebServer/Documents/app-master/vendor/yiisoft/yii/framework/console/CConsoleCommandRunner.php(68): EMigrateCommand->run()
#14 /Library/WebServer/Documents/app-master/config/ComposerCallback.php(162): CConsoleCommandRunner->run()
#15 /Library/WebServer/Documents/app-master/config/ComposerCallback.php(108): runHook()
#16 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Script/EventDispatcher.php(120): postUpdate()
#17 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Script/EventDispatcher.php(99): Composer\Script\EventDispatcher->executeEventPhpScript()
#18 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Script/EventDispatcher.php(72): Composer\Script\EventDispatcher->doDispatch()
#19 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Installer.php(230): Composer\Script\EventDispatcher->dispatchCommandEvent()
#20 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Command/UpdateCommand.php(80): Composer\Installer->run()
#21 phar:///Library/WebServer/Documents/app-master/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(238): Composer\Command\UpdateCommand->execute()
#22 phar:///Library/WebServer/Documents/app-master/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(193): Composer\Command\UpdateCommand->run()
#23 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Console/Application.php(99): Composer\Console\Application->doRun()
#24 phar:///Library/WebServer/Documents/app-master/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(106): Composer\Console\Application->doRun()
#25 phar:///Library/WebServer/Documents/app-master/composer.phar/src/Composer/Console/Application.php(72): Composer\Console\Application->run()
#26 phar:///Library/WebServer/Documents/app-master/composer.phar/bin/composer(37): Composer\Console\Application->run()
#27 /Library/WebServer/Documents/app-master/composer.phar(15): require()

Schmunk

unread,
Nov 28, 2012, 4:40:28 AM11/28/12
to phundam...@googlegroups.com
There's a problem with your MySQL database.
Can you connect from another PHP Application?

Or see here: http://stackoverflow.com/questions/4219970/warning-mysql-connect-2002-no-such-file-or-directory-trying-to-connect-vi

Raghul

unread,
Nov 29, 2012, 7:32:41 AM11/29/12
to phundam...@googlegroups.com
All problems solved , phundament woks fine for me now ,Thanks for valuable helps, 


Reply all
Reply to author
Forward
0 new messages