Database setup for Cartalyst/Sentinel - php

https://cartalyst.com/manual/sentinel/2.0#sentinel-authenticate
I've followed the basic installation in the Sentinel documentation for Native usage as I don't have Laravel installed, I have installed all the packages via Composer and I'd like to start doodling with Sentinel to test it before using it into production. My problem is I don't know how to setup MySQL/MariaDB for tables Sentinel will use, in fact I got an Exception like this
SQLSTATE[42S02]: Base table or view not found
Some other packages give the basic SQL file to import, but I don't know how to deal with database setup for Sentinel, please help!

There is a schema folder here: https://github.com/cartalyst/sentinel/tree/2.0/schema
You can find a mysql.sql (or mysql5.6+.sql) script to create your tables.

Related

PHP script MYSQL database to migration in laravel 5.1

I have MYSQL database.
How can i convert database to migration on laravel 5.1
Any body have script?
In order to generate migration files based on existing database structure you can use one of available Laravel packages. I've used Xethron/migrations-generator in one of my projects - you can find it here: https://github.com/Xethron/migrations-generator.
There are some small issues running it with Laravel 5.1, but they are easy to solve - you can check the discussion here: https://laracasts.com/discuss/channels/general-discussion/laravel-5-migrations-from-existing-database?page=1 - one entry needs to be added to your composer.json.
Once you have the package properly installed and configured, make sure you have correct database credentials in your database.php config file and then run php artisan migrate:generate and migration files will be generated.

Zend Developer Tools Bluemix ZF2 throwing error 500

Have a question about zdt module. So I have looked at the documentation for Doctrine and ZF2 (also Marco Pivetti tutorial ), that's when I find out about zdt, and all is working like a charm on localhost, but when I transfer the project to IBM bluemix server, the module ZendDeveloperTools is throwing server error 500 (know that because when I comment this name in modules in application.config file it's working ok, but without the zdt).
I have installed it all via composer, and copy to autoload files, and all that is said in tutorials, but it's not working. Does anyone had this kind of problem on IBM's bluemix server ? I'm using the cloudfoundry/php buildpack with most of the modules enabled. Haven't worked with zdt so don't know where the problem might be.
Looked everywhere (even here in SO) but can't find the proper answer to my solution.
Any help would be much appreciated :)
according to what you specified in your comments, the error 500 is related to the DB Connection config you are using in Doctrine ORM:
your config is using PDO_MYSQL driver and it is not available by default on PHP runtime in Bluemix (you have to specify in composer.json dependencies if you want to use it in PHP runtime on Bluemix)
Regarding what you are looking for in your following comments, Doctrine 2 supports NoSQL ODM on MongoDB and CouchDB
Here you can find all the documentation for Doctrine ODM over MongoDB
http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/

How I can install and configure an existing Laravel Project? (Laravel 4)

I need to install and configure an existing Laravel 4 project.
I tried to do, but when I ran composer update or composer install a lot of issues appear.
I have the database too (with data) so I ran the migration but doesn't work because the console show me an issue about the "table doesn't exist".
Can anyone tell me the complete process to configure the App?.
I mean, what its first, second and so and so because maybe in some step I made a mistake
To install and configure an existing project, you'd typically
Check out its source code
Run composer install
Run php artisan migrate
Check the README for specific instructions on installing 3rd party assets, or any additional steps you'd need to take
If the above creates errors, its either because of something in your environment (installing over an old project?) or some problem with the way the Laravel developer created their project.
To install and configure an existing project, you'd typically check those things first :
You should goto app/config/database.php check file and verify username and password.
After check in Project Folder vendor folder and composer.json file exist then remove it (that remove old configuration now we going to fresh configuration).
Then after back to command prompt and fire command composer update and that download some dependent file download.
Now Run php artisan serve
that tricks work for me last time when I migrate another host.
Carlos, when using an existing DB you'll need to check the migrations table to see which migrations have run successfully. Typically when taking over a laravel project setting up a new db and running the migrations against it is a good idea because you never know what hacks were made to the database outside the migration system. One small change can throw the entire system into a useless state because it's looking for a table or column that doesn't exist or has been modified. If you run the migrations against a bare db you can also figure out which tables were manually created (which could very well be your issue) outside the system and add them in as necessary. Cobbling things together after a previous developer is tedious, hopefully there is decent documentation.
Note that if you are using Git with .gitignore, don't forget to copy .env variables in new location too.

Symfony CMF Sandbox mysql

I'm trying to install Symfony CMF with mysql database.
Can somebody tell me step after step how to do it ?
I've already downloaded project and i'm trying to migrate to mysql from sqlite but i don't know how.
There is a tutorial in the doc: http://symfony.com/doc/master/cmf/cookbook/editions/cmf_sandbox.html . look into the file app/config/phpcr.yml that you create in the configuration step.
The database is configured in app/config/parameters.yml. you will have to modify that file to use MySQL. you will then also have to reinitialize the database etc. note if you want to migrate the data from the sqlite install you should export your data to xml before you switch to mysql using app/console doctrine:phpcr:workspace:export /cms

Doctrine Deployment on test-environment without console-access

I developed an application with Zend Framework and Doctrine ORM. To test the application on another environment, I tried to install it on a Synology DiskStation. I exported the MySQL-database with phpMyAdmin and imported it to the DiskStation. But Doctrine doesn't detect the scheme either all login-credential are correct. So I tried to create the scheme with ssh-access:
DiskStation> ./doctrine-module orm:schema-tool:create
.../bin/doctrine-module: Permission denied
Do you have any idea to solve this problem?
Many thanks in advance!
Make vendor/doctrine/doctrine-module/bin/doctrine-module and vendor/bin/doctrine-module executabe. Than it works.

Categories