Laravel Error "Unable to load the "app" configuration file" after Windows file restore - laravel

Bad mistake this morning. I uninstalled WAMP Server which deleted the Wamp folder and all its projects.
I restored the wamp folder from backup. WAMP is up and running on upgraded PHP and settings as before, however:
Laravel projects won't start - getting blank whoops pages on any Laravel project. When I cd into any project folder and try to run php artisan, I get:
Unable to load the "app" configuration file.
The 'config/app.php' does indeed exist. And, all the restored files appear correct.
As a test, I installed a new Laravel project and it works correctly. I also am able to clone a project from a Git repo, npm update & composer install, and that works. So, I don't think the problem is with the WAMP stack.
I need some direction troubleshooting this. Thanks!

The problem is that Windows changes the case of some file names during restore. What a drag. There seems to be no reasonable answer except make the switch to Apple.
For example, in the Laravel config folder, Windows restored these files with proper case, App.php, Auth.php, Queue.php, and View.php. Everything else was left lowercase as they need to be.
Correcting the case of these files fixed the problem for now (until I find other mis-cased files).

Make sure this file exist
config/app.php

Related

My vsc code disappeared and I have no idea why or where it's gone

I was working with discord.js last night and I ran a few commands in the terminal. The last command I wrote caused the name of the file at the top of the screen to be crossed out and turn red and I followed the path to where the file was and it was gone. I've checked the recycling bin and nothing was there. The file has left no traces and the project is gone. Is there any way that I can get the code back?
The commands I ran were -
npm update,
npm audit,
npm audit fix (the one that caused the file to disappear)
My file was also within the node_modules folder which probably explains why it disappeared when I ran those.
Any help is appreciated, thanks.
Yes, apparently this happens sometimes, especially when there is update on restart (see here https://github.com/microsoft/vscode/issues/52855). For some reason the software is moved to
C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\_
where <user> is your username.
If you start from there it goes as always. I didn't try any move or rename, just reinstalled the last version and everything went back to normal. This is first time happening to me, and according to most reports it doesn't happen often enough to be a problem, however a few users report it to have happened tens of time, that I understand being an annoyance.
If the file that got removed was inside the node_modules folder there's no problem. You can just remove the node_modules folder and run npm install . That will fix the problem.
If there is not package.json file in your project, you can still remove the node_modules folder but then you need to install every dependency manually like this: npm install <module_name>.

Is there a way to fix missing files of laravel 5.6

Some guy made a site with laravel 5.6 and we at a different place need to change just some tags and the CSS, I have a git of the site but "vendor, .env" and many files that are also missing in the git, how can I open the site in my computer to adjust the style sheets I have no database backup and also installed laravel 5.6 and try to paste de missing files but there are still many errors.
Altough the original programmers excluded some files in the git repo using the ignoregit file I created a new laravel 5.6 project and copied the missing files to my original app folder, imported the missing packages using composer and finally used artisan to migrate the database using "php artisan migrate"

Cannot install packages in Joomla 3

I installed a Joomla 3.6.5 and now I cannot install any packages.
And this is the error I've got :
Unable to find install package
This happens when I click on 'Add "Install from Web" tab' button too!
I tried reinstalling and upgrading to 3.8.5 but nothing changed! I can install nothing!
Update:
Folder permissions:
Anything related to installation error, you should check
Your temp file location is correct or not
Your temp folder has appropriate permission or not.
You can attach screenshot of your folder permissions here.
I have two suggestions.
(1) The problem may be because upload_tmp_dir isn't set in your PHP config.
Look in SYSTEM > SYSTEM INFORMATION > PHP INFORMATION and check if upload_tmp_dir has been set. If not, you need to edit php.ini
On our servers (which use open base dir), the setting is:
upload_tmp_dir=/tmp
Depending on your server configuration, this value could be different for you.
(2) The other place to check is the value in SYSTEM > GLOBAL CONFIGURATION > SERVER
If you haven't already done so, try using the full server path to the tmp directory, rather than say a path relative to your home directory.
Good luck!
The temp folder is not where you have told Joomla it is.
I know this is an old topic, but maybe my solution might be helpful for someone...
Error: Unable to find install package (and other errors like that)
is nothing more than permissions error check... So, you have to give right permissions to yourself for:
/var/www/html/nameofyoursite/languages,
/var/www/html/nameofyoursite/tmp,
/var/www/html/nameofyoursite/administrator/languages,
/var/www/html/nameofyoursite/administrator/manifest/everythinginmanifestfolder,
/var/www/html/nameofyoursite/administrator/modules,
/var/www/html/nameofyoursite/administrator/logs.
That's it! Now you can install languages and everything else...
(I found this solution yesterday, and cp my answer from joomla's forum)

Laravel 4 class not found after doployment to production

Error:
Class 'App\Package\PackageServiceProvider' not found
After moving my laravel directories to my server. The app is under psr-0.
The same files are found and working locally without any errors.
I tried to update composer with and without dump but nothing changes.
Why does that happen?
By default, the vendor directory is not checked into your git repository. So, just run composer install on your server and it should take care of the rest.

Installing Zend Framework 2 on XAMPP in Windows

I know this question may have appeared few times here and in the internet. But still I feel it is not clear for somebody who wanted to enter into the world of frameworks. I have followed these links Rob Allens Tutorial, ZF Quick Tutorial.
But some how I feel it is not quite clear with the installation part. I have a windows system basically Vista with the newest version of XAMPP installed. I have downloaded the latest version of ZFSkeletonApplication from this link ZFSkeletonApp, extracted the skeleton contents, renamed the folder to zendframework and moved it to xampp folder i.e now ZF skeleton is in c:\xampp\zendframework.
So until here everything seems clear and easy, from here I am some how lost with the configurations. Can some one elaborate the things from here how to install the Zf and make it work, like changes in the include paths, .htaccess files and so on. Please do remember that I have windows with XAMPP on it. If some one can guide me exactly for this set up, it would be helpful.
P.S. It would be good if one can provide info about the changes which I need to make with examples consisting of paths, so that I am not lost, for example like you can find .htaccess file here(ex pathname), changes in .htaccess file should be so and so.
Thanks
For future references, i also made a big post on how to install ZF2 on a windows xampp environment right here Install ZF2 on Windows Xampp
OK, i have done this on multiple systems now. For a home system the following steps work quite well:
Download msysGit and install it to any directory
Run the git-cmd.bat from the msysGit-Folder
Move into the directory you want i.e. C:\xampp\htdocs\ (this is done via cd dirname or cd .. to go up a level, change partition with D: and hit enter)
Run the following command. The <OptionalFolderName> would be the name of a Sub-Directory of htdocs, if you skip this, the folder will get named ZendSkeletonApplication
git clone git://github.com/zendframework/ZendSkeletonApplication.git <OptionalFolderName>
Possible Trouble Scenario (fatal:unable to connect to github.com)
Once again at workplaces, pretty often the default port (9418) for the git-protocol is blocked. If this is the case for you, then you should try one of the following Commands
git clone https://github.com/zendframework/ZendSkeletonApplication.git <OptionalFolderName>
git clone git#github.com:zendframework/ZendSkeletonApplication.git <OptionalFolderName>
Now you are not done yet. The skeleton Application is installed, but the framework is still missing, here some people might run into the first problems, but this actually is quite easy.
We're still at the command line interface
cd <OptionalFolderName> or cd ZendSkeletonApplication depending on what you did earlier
php composer.phar self-update
php composer.phar install (this might take a while)
So, this is the part where lots of things can happen. I have two scenarios happened to me:
Scenario #1 No directory write permissions
This is easily handled by running the command line interface with administrator privileges
Scenario #2 Working behind a router (i.e. at work)
Personally i didn't have to do much to get this working, but the line might change depending on your proxy. Personally i did the following at the command line interface
SET HTTP_PROXY=http://proxy.domain.tld:8080 you might also be good with
SET HTTP_PROXY=proxy.domain.tld:8080 don't ask me why, but i needed the http://
With all those done, you should have an almost running ZendSkeletonApplication. The other part is how to set up your virtual host, but i won't go into detail on this, as that's even ZF1 Stuff and everyone should be familiar with that by now, if not, there's good resources to learn out there.
I hope i could be of help to you.
Setbacks have to install in Windows, but I ended up finding a solution. From ZF2 to install on windows via git, for this is the only use that simulates msysGit git linux on windows, for it is only access the tutorial: http://zf2.com.br/tutoriais/post/instalando-o-git-no-windows-para-fazer-a-instalacao-do-zf2-somente-no-comando-do-windows-via-composer
Since I had lot dependency extension problems (mostly .dll files) with old version of XAMPP, so first thing I did was made sure I uninstall all previous versions of PHP already present on my system as well as old XAMPP. Then installed latest XAMPP v3.2.2 (using latest XAMPP 3.2.2-32-bit on Win-7-64-bit). Then followed installation steps in XAMPP Documentation under title Start a New Zend Framework 2 Project.
I had issues while installing composer also with old-XAMPP, but somehow those errors didn't appear during composer installation this time. And, I successfully installed ZEND till I typed http://localhost:8081/myapp/ (I renamed my ZendSkeletonAppliction folder as myapp as per documentation) into my browser to access the same and met the error which said:
Fatal error: Uncaught RuntimeException: Unable to load ZF2. Run php composer.phar install or define a ZF2_PATH environment variable. in C:\xampp\apps\myapp\htdocs\init_autoloader.php:51
Stack trace:
#0 C:\xampp\apps\myapp\htdocs\public\index.php(18): require()
#1 {main} thrown in C:\xampp\apps\myapp\htdocs\init_autoloader.php on line 51
Composer.phar was not even present the first time I downloaded ZendSkeletonApplication‐master.zip from Github (there was only composer.json and composer.lock files present). Anyhow I didn't need them since I followed XAMPP Doc which doesn't call composer.phar in command line:
composer create‐project ‐s dev zendframework/skeleton‐application path/to/install
I am not that tech-savvy to know how to 'define a ZF2_PATH environment variable' correctly, so I wasted time looking for solution online, couldn't find any (which is when I stumbled on this forum which also turned out not to have a solution for my query). In the end, in a fit of depression and anxiety, serendipity happened. All I did was as per XAMPP's ZEND documentation I right-clicked inside C:\xampp\apps\myapp\htdocs folder and clicked 'Composer Install' which reinstalled the Zend files from cache. Then refreshed http://localhost:8081/myapp/ and the Zend intro page appeared.
I just did it like that:
D:\web_dev\zendapp>C:\PHP\php.exe composer.phar self-update
it worked perfectly

Resources