How to fix the disappearance of bootstrap template from my laravel project - laravel

I downloaded a laravel project from a shared hosting and I want to edit him in my localhost but when I type out the home adress: localhost:8000/ it shows me those two errors :
Warning: require_once(C:\Users\Rafaa\Downloads\Compressed.idea/public/index.php): failed to open stream: No such file or directory in C:\Users\Rafaa\Downloads\Compressed.idea\server.php on line 21.
Fatal error: require_once(): Failed opening required 'C:\Users\Rafaa\Downloads\Compressed.idea/public/index.php' (include_path='C:\xampp\php\PEAR') in C:\Users\Rafaa\Downloads\Compressed.idea\server.php on line 21.
then I found a solution which is to remove some code from the server.php
the line :
require_once __DIR__.'/public/index.php';
Become :
require_once __DIR__.'/index.php';
then the error fixed and the website worked in my localhost but the design is gone , it show me a static html website without any color or image or any thing.

You are not seeing any images or designs(CSS/JS) probably because your all assets and images are having public folder in url, check the console of browser and see what errors you get.
You will have to remove public for all the urls otherwise you won't be able to run project with php artisan serve

Related

Failed to open stream: No such file or directory using Laravel Forge

I'm using LiveWire for my Laravel project, and I'm trying to deploy using Laravel Forge but I encountered an Internal Server Error 500. I changed the .env to APP_DEBUG=true and APP_ENV=local.
Now I see the following error:
file_get_contents(/home/forge/officialmonte.co/vendor/livewire/livewire/src/../dist/manifest.json): Failed to open stream: No such file or directory (View: /home/forge/officialmonte.co/resources/views/layouts/app.blade.php) (View: /home/forge/officialmonte.co/resources/views/layouts/app.blade.php)
I thought the reason was because my project doesn't have a "dist" folder, and instead it named it as "build" folder. So I went to the file LivewireManager.php and changed the following code. My Project Folder
From this:
$manifest = json_decode(file_get_contents(__DIR__.'/../dist/manifest.json'), true);
$versionedFileName = $manifest['/livewire.js'];
To this:
$manifest = json_decode(file_get_contents(__DIR__.'/../build/manifest.json'), true);
$versionedFileName = $manifest['/livewire.js'];
But now I get this error instead:
file_get_contents(/home/forge/officialmonte.co/vendor/livewire/livewire/src/../build/manifest.json): Failed to open stream: No such file or directory (View: /home/forge/officialmonte.co/resources/views/layouts/app.blade.php) (View: /home/forge/officialmonte.co/resources/views/layouts/app.blade.php)
How can I solve this, and what is the error about? The thing that confuses me the most is that when I'm using my laptop to run the project (npm run dev), it works fine, but when I try to deploy, it breaks.

File Manager for TinyMCE 5 Not showing uploaded images,404 image not found,but it exists in the folder - Laravel

So,i've been having problems with integrating file manager to TinyMCE 5,uploading images into a specified folder using the file manager works without any issues,that is also true for deleting the images,but the problem is when you try to use the images,they appear as blank and if you open a console you will see error 404 messages that images don't exist
The solution that worked for me is that i went to .env file which is inside of your laravel project and then changed this line of code which is usually located in the first few lines of the file:
APP_URL=http://localhost
to this
APP_URL=http://127.0.0.1:8000
It seems like file manager uses APP_URL to build the URL for some reason,still haven't found out why tho

why can't resolve the required file Laravel on on my hosting server?

I'm trying to connect the folder public with Laravel but I can't
API is in another folder called Laravel01
I've changed the url on index.php
require __DIR__.'/../laravel01/vendor/autoload.php';
but I can't step back to the root folder
Fatal error: require(): Failed opening required '/homepages/15/d831964969/htdocs/api/../laravel01/vendor/autoload.php' (include_path='.:/usr/lib/php7.4') in /homepages/15/d831964969/htdocs/api/index.php on line 24
it keeps on api folder when it must link with laravel01 folder
sorry for my English and I hope everybody can understand me, thanks a lot

Change root folder name

My Laravel project folder was "laravel" so i changed to "testsite", but now i cant access the site.
InvalidArgumentException in FileViewFinder.php line 137: View [pages.home] not found.
ErrorException in Filesystem.php line 109: file_put_contents(C:\Users\Zen\Google Drive\xampp\laravel\storage\framework/sessions/4d5b7c28f025c192658893a77c2d6bdb60b33d48): failed to open stream: No such file or directory
Full error can be found here:
PasteBin
Its visible in the paste that is something related with sessions from the old folder "laravel".
Using Xampp with virtualhosts, restarted Xampp, cleared browser cache, it didint solved the issue.
How can i fix this issue?
Problem solved, has described here: Laravel 5.1 View not found
php artisan cache:clear
php artisan config:cache
You have an inconsistent path, take a look of how you're setting the slashes:
xampp\laravel\storage\framework/sessions/
Besides that, make sure that the framework/session folder exists
Also check that pages.home hierarchy exists in your views folder:
View [pages.home] not found

Magento 1.9 Installation Error

I am trying to install magento 1.9 on my web hosting server .
I ftp-ed the files into my hosted website but experience the following error when i try to access my URL.
Fatal error: Class 'Mage_Core_Controller_Request_Http' not found in /home/bf/public_html/app/code/core/Mage/Core/Model/App.php on line 1238
I tried a google search but i am unable to find anything relevant .
Just download the Fresh copy from Magento community again. Also make sure that your server has all the prerequisite for Magento as mentioned in below link.
http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html
Please make sure that below files exist in this directory
app/code/core/Mage/Core/Controller/Request/Http.php
1.Make sure you have enabled curl on your server and with have right file permission.
2.Make sure file should exist on following path:
/home/bf/public_html/app/code/core/Mage/Core/Controller/Request/Http.php
3.Make sure compilation mode is disabled.
/home/bf/public_html/includes/config.php
Every thing inside should be commented.
4.If it does not work, you have to debug this.
Open index.php in root and add these line of code,
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
It will show you why error is coming.Once you will find the root cause, you can get the solution on google or any forum.

Resources