Upload a Laravel 4.2 project on bytehost - laravel

I have uploaded my Laravel 4.2 project (using Filezilla) which is stored in folder name main-Laravel into the htdocs folder on bytehost.when I tried accessing it like this http://bcms.byethost8.com/main-laravel/public/, I an error saying Fatal error: require(): Failed opening required '/home/vol12_4/byethost8.com/b8_16140412/htdocs/main-laravel/bootstrap/../../main-laravel/vendor/autoload.php' (include_path='.:/usr/share/pear/') in /home/vol12_4/byethost8.com/b8_16140412/htdocs/main-laravel/bootstrap/autoload.php on line 17. I did not have this problem when working on my local machine, so what can I do to resolve this problem and thanks in advance.

You will need to do additional setup to get Laravel working on a shared hosting.
Laravel needs composer to get the autoloading right and few other requirements to be run (such as higher PHP version, several PHP extensions & so on).
Here you can find more info:
http://laravel-tricks.com/tricks/setup-laravel-4-in-shared-hosting-with-securing-laravel-base-file

Related

Cannot load images once symfony project is deployed on production server

I'm actually working on the server migration of a Symfony project. I'm new to Symfony so i'm discovering how a Symfony project works at the same time.
The projet use Symfony 4.
I'm stuck at the point where the deployment on the production server works but once on the website side, images and .css files cannot be loaded.
I get the following error in the console : console error
When I look at the path where images are loaded I get http://domainname/builg/images/imagename.jpg
I have check and the images are well located in the folder public/build/images in the server.
I've tried accessing the images directly by doing a GET request on the search bar but I can't have access whether it is by asking http://domainname/build or http://domainname/public/images
As the project is actually perfectly running on another server and locally on my computer I don't think the issue come from twig or the webpack encore.
I can't see what I've done wrong.
Maybe have I missed something in the configuration phase ? Should I update some path ?
Thanks in advance,
I assume you are using Symfony 6 or 5. Please follow these steps:
php bin/console cache:clear --env=prod
npm run build
OR
yarn run build
assets are auto symlink in latest symfony 5 or 6 version. If not then please run this command:
php bin/console assets:install --symlink
And try to access http://domainname/build/images/imagename.jpg . Make sure this url is correct with image name and path.

Restiction in directory when deploy laravel app. open_basedir restriction for lang directory

I tried to deploy a laravel web in Windows server 2018. At the moment that I load the webpage error 500.
The log file said:
PHP Fatal error: Uncaught ErrorException: file_exists(): open_basedir restriction in effect. File(C:\inetpub\vhosts\my-web.com\resources\lang/de.json) is not within the allowed path(s): (C:/Inetpub/vhosts/my-web.com\;C:\Windows\Temp) in C:\inetpub\vhosts\my-web.com\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:23
I tried to give all permissions in Plesk but doesn't help. I tried to print a simple "Hello world" and it works. Do I miss something?
I also did the recommendation from Plesk without success.
https://support.plesk.com/hc/en-us/articles/115000278993-A-website-hosted-in-Plesk-is-not-accessible-open-basedir-restriction-in-effect-File-is-not-within-the-allowed-path-s-
PHP version 7.3.14
Laravel 6
In Plesk go to php settings and add :{WEBSPACEROOT} to the open_basedir so laravel can access to file in root.

Laravel ErrorException - Invalid path

I have my laravel website on a shared hosting.
After syncing the remote files with PhpStorm and run composer update i receive
"file_put_contents(C:\xampp\public_html\mydomain.com\storage\framework\views/558703d19442567af4246eafaed8012c37ed6c26.php): failed to open stream: No such file or directory
Version of laravel is 5.6.22
Any ideea how to fix this ?

Laravel errors gone

enter code hereHi all my on windows 7(so i don't have any folder permissions) I have can't see Laravel error anymore. It worked fine yesterday.
why? what's wrong?
Laravel version 5.1 and web server wamp lastest version.
I found this link
but can't find file - storage/meta/compiled.php
this command also not working for me - php artisan optimize
also debug = true in .env and app.php files
please help
If you read the installation documentation you will find the following information:
After installing Laravel, you may need to configure some permissions. Directories within the storage and the bootstrap/cache directories should be writable by your web server. If you are using the Homestead virtual machine, these permissions should already be set.

Laravel 4 Workbench not working in Pagodabox

Im developing a library hand in hand with a project I'm working on in L4 and I'm doing it in a Workbench as recommended. I have set the Service Providers etc and it works fine on my local machine. However when I pust to Pagodabox, the console gives me this:
Error Output: PHP Fatal error: Class 'Coderollers\Formidable\FormidableServiceProvider' not found in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 123
Clearly, for some reason, on Pagodabox it is looking for my service provider in the vendors folder rather than the workbench folder. Does anyone know why this might be?
For a workbench package to be loaded by Laravel it expects to find an autoload.php file within a vendor directory of your package. You'll need to run composer install from your workbench packages directory to install the package dependencies and have it dump an autoload file.
Once done Laravel will be able to detect and use your package.

Resources