Search code examples
phpormwamppropelpropel2

how to install and run propel2 in windows with wamp or ampps


I would like to use propel 2, using the .zip file in windows but I can't make it work according the docs1 (I use wamp and ampps, different servers) so I unzipped the file inside my WWW folder in my (wamp) server
I try to call http://server/test/propel/bin/propel.php and i get a 500 error page; watching the php log file I see:

  • PHP Fatal error: Class 'Symfony\Component\Finder\Finder' not found in ...\bin\propel.php on line 16
  • PHP Stack trace:
  • PHP 1. {main}() ...\propel.php:0

then i tried use the command line; and I set the PHPBIN variable to my php folder ('cause that one didn't exists in my environment) run the propel.bat and I get:

..\php5.5 is not reconigzed as a internal or external command ...

but then the docs didn't mention how to proceed afterwards for configure the connection

please, did anybody try this? what should I do??

thanks in advance!


Solution

  • Did you install it via composer? It's heavily recommanded as propel2 have a lot of dependancies, and it's a kinda complicated setup. http://propelorm.org/documentation/01-installation.html#via-composer https://getcomposer.org/doc/00-intro.md

    Anyway, once installed (in your project, you have a vendor/bin/propel file), open console in your project root directory and use :

    vendor\bin\propel init
    vendor\bin\propel sql:build
    

    I guess without composer, you have no bin in your vendor folder. If so, and you installed it via zip, you might need to go to folder vendor/propel directly and then in console :

    bin\propel init
    bin\propel sql:build
    

    Good luck, I remember not figuring it out right away either despite using composer.