Im trying to deploy laravel 4 on a shared host. When I do so and trying to run the site I get an error saying :
Class 'Illuminate\Database\DatabaseServiceProvider' not found
I guess this has something to do with composer, I have read a lot and some say that I should run 'composer dump-auto' on the server, I can't do that because I have no shell-access.
Other say I should run composer update locally and then upload it and it should all be fine. That does not work either.
Any ideas how I should approach this?
Related
Whenever I try to run any command related to php artisan or composer this error shows up:
PHP Fatal error: Interface 'Monolog\ResettableInterface' not found in path\to\project\root\vendor\monolog\monolog\src\Monolog\Logger.php on line 28
I open the file, and it points me to :
class Logger implements LoggerInterface, ResettableInterface
I try to find the Logger interface and it's there.
I really can't find any other solutions and the ones recommended here by SO are outdated.
I use laravel 5.7 running composer version 1.8.0 on a xampp server with PHP 7.2.10 on Windows 10
Please feel free to ask more questions and I'll try to answer them without ruining my NDA.
Update: it works now thanks to that one person who answered.
If anyone needs this solution, you can do what Saumini Navaratnam suggested; removing the vendor folder and running composer update on the root folder. I, myself found another solution that might work and it is: running composer update --no-dev as the ResettableInterface came from a dev dependency. Weird, but it works fine now.
Again this works only on Laravel 5.7, at least for now.
I've been working in ruby/rails for a while now and just recently switched up to PHP Laravel for my new work position.
In rails, when I would run my server it would show me very useful things such as: which route is getting hit, what queries ran for that controller and so on.
On Laravel when when I run a server all it says
Laravel development server started: <http://127.0.0.1:8000>
and it just sits there.
Is there some composer package or something I don't know about that I have to switch on in the config to show some kind of relevant information while routes are being hit???
I've been googling up 'laravel live log' and stumbled across this package
https://packagist.org/packages/mic/log-like-rails
But I can't seem to install it correctly.
Laravel Framework 5.6.22
PHP 7.1.18-1+ubuntu16.04.1+deb.sury.org+1
i just cloned a project from bitbucket with sourcetree. Now i am trying to run it with laravel. I started my cmd with administrator rights and i am in the right directory of the project. Now when i try to do the 'composer update' command i get this error in my command line :
i know this topic was been discussed before but i couldn't find the answer in them for me. This must have something to do with the fact that me and my friend are making this laravel project together and we are using source tree with bitbucket as a version control system , he can run the project on his computer but when i pull it , it stopped working. Is there annything i need to keep in in mind when using laravel with git ?
I had the same problem when i cloned the repository from github.
what id did is
Composer Install
using the terminal in my app directory. It worked A1!
hope this helps
You may have to use composer install because laravel by default exludes the following directories from git:
/vendor
/node_modules
.env
Which could be causing your error
Another similar question was asked here covering the same error: Laravel 4: Fatal error: Class 'Patchwork\Utf8\Bootup' not found in autoload.php
I'm trying to make a simple rest client for my android app. I would like to do than in TDD way, but for that I need simple working configuration for all actions (GET, POST, and so on). After some struggling I was able to make test work with get requests. Unfortunately with Post routes things didn't go well. When testing (netbeans 8.0.2 + phpunit) on local server (xampp 5.6.3) all I get is 404 error. Same thing if I run method being tested with Advanced Rest Client Application (chrome extension). When I send my rest files to live hosting then method in question works as it should.
After searching for some days (read about everything with 404 errors on Slim Framework) I decided to start with something which should work right of the box. Slim framework comes with simple demo app and some tests. Here I have another error which prevents start of tests:
Fatal error: Class 'Slim\Middleware' not found in C:\xampp\htdocs\web\local\codeguy-Slim-04958a1\tests\MiddlewareTest.php on line 3
As far I can tell I have something wrong with my xampp server but I don't have any more ideas how to fix this. So If somebody could show me correct way to setup Netbeans, Xampp, Slim and phpunit(I'm running it from IDE (ALT + F6)) then I would be able to build my rest api on top of that.
I just tried the following, maybe it might suggest a different route to try?
git clone https://github.com/codeguy/Slim.git
cd Slim
// Edit composer.json to include "phpunit/phpunit": "4.3.*"
curl -sS https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
A few tests failed for me, surprisingly - so that would need digging into. But all classes were found.
Everything should work though, as the project seems to be building OK over on Travis CI.
I've found out what was wrong with my tests and with test provided with framework. I didn't know that I had to set bootstrap.php file in Project configuration of Netbeans.
I have a Symfony2 project that uses quite a few 3rd Party bundles. I use Sonata Admin Bundle for the application admin. I am almost finished with my project development and I'm trying to get it live on Amazon EC2. I am using GIT to deploy my application, I have managed to get everything setup but I am coming across a very weird problem. The project is running just fine on the local server but when I get it live I get the error:
InvalidArgumentException: Unable to load class "Sonata\AdminBundle\Admin\Admin"
While trying to run app/console commands I get the Error:
PHP Fatal error: Class 'Sonata\BlockBundle\SonataBlockBundle' not found in /var/www/html/candulifestyle.com/app/AppKernel.php on line 25
Fatal error: Class 'Sonata\BlockBundle\SonataBlockBundle' not found in /var/www/html/candulifestyle.com/app/AppKernel.php on line 25
I'm having a real hard time tracing the problem here. The project is running perfectly on my local system. Has anyone come across a problem like this. Please let me know if anyone has any insight on such a problem.
I had the same very strange problem (PHP Fatal error: Class 'Sonata\BlockBundle\SonataBlockBundle' not found although it was present in the right folder) on a DigitalOcean server (running Ubuntu 12.04), whereas I didn't have the problem on my Ubuntu 12.04 VM instance.
I finally found the solution to the problem.
I just had to update Composer as I should have already done before:
composer self-update
And then run again this:
composer install
And everything was fine again.