I'm running a Laravel 5.8 project on PHP 7.2 and I use PhpStorm is my editor on Mac OS 10.15.4.
Since recent, when I write new code, most of the time in a Class, my changes do not take effect in the application itself. PhpStorm and other editors show my new or edited code, but nothing changes in my application. The only thing that solves this issue is a full reboot of my computer. Doing a full reboot and starting everything up again takes a lot of time and time is precious.
What I have tried other than a full reboot:
Restarting PHP
Restarting Nginx
Restarting PhpStorm
Restarting using valet restart
Removing the project and cloning from git repo again
Clearing my config > php artisan config:clear
Caching my config > php artisan config:cache
None of these had any successful results so far.
What could cause this weird bug and is there a way to fix this?
Any help or information regarding this is well-received.
You can add code
ini_set("soap.wsdl_cache_enabled", 0);
or manualy remove all wsdl* files in your /tmp folder on the server.
WSDL files are cached in your default location for all cache files defined in php.ini. Same location as your session files.
In PHP how can you clear a WSDL cache?
Related
What has been done to fix this issue:
composer, npm updated. --> didn't solved
new wamp server installed and tried. --> didn't solved
php version 7.4.9, since running artisan serve command on another laravel project, it is running fine without this issue.
config, cache, cookies all cleared and ok.
Also since after this issue when click on Login, it says LoginController not found but it there where it was.
No major changes on the code level.
Issue occurred all of sudden on running project.
I've got a real head-scratcher for you! I've been working on a Laravel 5.4 application for quite some time now and up until yesterday I had been able to:
develop on my local machine [still works flawlessly],
push my changes to my BitBucket repo [still okay here],
and would subsequently pull those changes to my shared hosting server (RedHat) [still running smoothly],
I then run my dependency managers (npm and composer) to get the project in place and functional
there is some matter with clearing various caches:
php artisan view:clear
php artisan route:clear
php artisan cache:clear
composer dump-autoload
and finally move my '/public' folder to the web root and update index.php to point back to the 'bootstrap/autoload.php' in main project structure,
I am aware there is likely another or several steps I am missing, but I am unsure what they are...
All that being said, I've attempted to deploy a number of applications using Laravel lately and I always seem to run into the same issue come time to deploy an application to production. I've read 30+ tutorials on the matter and nothing seems to explain the issue why my site isn't working any more.
I've checked the error log file maintained by Apache, it's empty.
Was wondering if it's a permissions issue, doesn't seem to be the case (all folders set to 775 and files set to 664 as specified by various sources and owned by serverName:userName)
Browser console simply shows a 500 server error.
All I see if "Whoops, looks like something went wrong." twice.
There must be some way to show better error details (config debug setting already set to true)
Any suggestions at this point would be beneficial to send me looking in the right direction!
======= UPDATES =======
For the sake of thoroughness, and that this save others from severe headaches, I'll be posting actions taken here.
Following tutorial mentioned by #user123456 (permissions applies)
Generate new key for application
Run php artisan config:clear
Off to the races, answer to come!
You need to ensure you have a working .env file.
Once done, run php artisan key:generate to create a key for your application after which you should clear your application's cache as follows php artisan config:clear
I would never recommend using shared hosting for Laravel application. You will face lots of issues for permissions, composer and external dependencies. Instead, you can use cloud servers like DigitalOcean, Linode, vultr and deploy laravel application on them. If you don't know about linux and creating Stacks you can use Cloudways to deploy laravel.
https://dev.to/rizwan_saquib/deploy-laravel-application-on-cloud-easily-with-cloudways
I'm a bit fresh to Laravel. I installed it via composer in the xampp/htdocs file. I installed the latest version 5.6.
The install works with no errors, and the file structure is as it should be.
When I run the php artisan serve command from inside the folder, it deletes the server.php file and therefore outputs the error:
This site can’t be reached.
localhost refused to connect.
So I thought why not just add a new file inside and it will work... Well, trying to add new file shows that I do not have permissions to add files to this folder.
I tried a new install a few times, but the situation is always the same.
Has anybody else encountered this problem?
So I realised it was some kind of server problem... well, removed the antivirus, chanhed my firewall settings and everithing works as it should.
My advice to avoid this in the future is to start creating Laravel applications in a folder inside of your My Documents folder in Windows or using /home/{your-username}/projects directory in Unix environments.
What likely happened is xampp has certain permissions that don't play nice with what you need in Laravel.
I'm using Laravel 5.4 on Windows 7 and Xampp 3.2.2. A few days ago Laravel started ignoring the changes I was making to the .env file. I couldn't find the solution so I reinstalled Laravel in a different directory and imported my app folder.
Now Laravel just stopped responding to the changes I am making to some PHP files. I added a function to the /vendor/illuminate/support/helpers.php but I could not access it in the view. I deleted the content of the whole file and I could still access the function previously declared in it.
I created a helpers file as instructed here but that too is being ignored.
Any changes to any views is immediately effected and php artisan cache:clear is not doing anything.
How is this happening? Does it even make sense?
Laravel caches config values to improve performance.
You need to run either (recommended)
php artisan config:cache
which will cache the new values you have, or
php artisan config:clear
which will turn off caching. I've had some experience with this causing errors though.
I know it might sound rather stupid, but have you remembered to restart the server because you've edited the .env file?
I am very new to php and laravel development. I am working on an existing php+laravel project. and I am trying to understand how it works. the existing application is working fine.. but when I make some changes to the php files in models, controller folder, the changes are not reflected in the output.
what command should I run to build everything?
thanks
I've experienced this a few times myself, and the reason was that my cached view had not been updated. Try emptying the following folders:
/app/storage/cache
/app/storage/views
No need to restart the web-server.
Note! Some of the storage folders may contain a git placeholder, such as a .gitkeep file, it get git to commit "empty" folders. Don't delete that file, if you need the folder to get committed.
Update: You can use the artisan command view:clear to clear the cached views, instead of emptying the folders yourself.
I have encountered this problem on my linux machine.
What I did was restart ngnix (service ngnix restart) and also restart php (service php5-fpm restart) and now the changes are showing again.