correct use of GIT for projects with codeigniter |
Good morning,
I tried to search around the web, but I couldn't find a solution. I tried many times, but I always end up with the same result. In one way or another, I always have errors. I'll try to explain the situation: I create a project in codeigniter via composer, I start creating controllers, models and views and I create several pages. everything works perfectly. Via a GIT server, I commit and then push, thus synchronizing my project in the GIT server. From another PC, I clone the git project and, without making any changes, I try to view it. errors upon errors and problems. from the second PC, if I create a new project and then launch: php spark serve, everything works. on the project cloned from GIT sometimes the php spark serve command doesn't even start. At this point I start to doubt my method. is there a procedure to follow to be able to use git with codeigniter correctly? are there any files that I need to add or remove from .gitignore? Thanks.
after clone the project you have to download the dependencies using composer install/update.
@xxxx[{::::::::::::::::::::::::::::::::>
What errors do you see? Do you save .env composer.lock? Maybe you have different environments.
Hello,
the version is the same. always 4.5.5 when I clone from git, the env file is not present, but I get a new one. The error I get now is this: Undefined constant "CodeIgniter\Database\MySQLi\MYSQLI_STORE_RESULT" The composer update or install command completes without any errors.
perfect,
following some of your advice I managed to solve it. The problem I was having was due to some php libraries that were not loading in windows. I restored the gitignore file and as soon as I cloned the project, I ran composer install. doing this, everything works perfectly. Thanks to everyone for the info and advice.
Great you sorted it out!
The best practices recommend don't share the .env file on GitHub...
yes, I read. Thanks for the advice.
I currently use a local GIT server, accessible only to our internal lan |
Welcome Guest, Not a member yet? Register Sign In |