Category : cpanel

The title sums up my issue. I’m deploying to shared hosting by uploading my files (except mylaravelproject/public/ to the root directory, and the contents of mylaravelproject/public/ to public_html/. I’ve already tried the following: Configuring index.php to point to the correct folder in root Running composer install and npm install in the relevant directory php artisan ..

Read more

I have uploaded a Laravel project in cPanel. Project file uploaded in sub folder. I have created the .htaccess file [reference by forums and tutorials] but issue not solve. I am the beginner in Laravel, Please help me. Folder Path : example.com->public_html->lrvproject->.htaccess <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews -Indexes </IfModule> RewriteEngine On # Handle Authorization ..

Read more

I’m trying to run a command on cpanel servel everyMinute : So I’m using the following kernel : <?php namespace AppConsole; use IlluminateConsoleSchedulingSchedule; use IlluminateFoundationConsoleKernel as ConsoleKernel; use Mail; use IlluminateConsoleCommand; use AppMailNotifyContratExpire; use CarbonCarbon; use AppModelsProjet_Casting; class Kernel extends ConsoleKernel { /** * The Artisan commands provided by your application. * * @var array ..

Read more

I’m trying to run a schedule task on cpanel. So I’m using the following code : Command : notify.php <?php namespace AppConsoleCommands; use IlluminateConsoleCommand; use AppMailNotifyContratExpire; use Mail; use CarbonCarbon; use AppModelsProjet_Casting; use AppModelsFiliale; class notify extends Command { /** * The name and signature of the console command. * * @var string */ protected ..

Read more

I have a component RemoveBook in app/View/Components/RemoveBook and the blade component in resources/views/components/sections/parts/remove-book.blade.php. all working fine on localhost but on the server – Cpanel – not rendering component code public $route; public $bookid; /** * Create a new component instance. * * @return void */ public function __construct($route, $bookid) { $this->route = $route; $this->bookid = ..

Read more

Recently I have been working on a laravel project that has functionality of sending email through smtp of gmail. So far so good with local development server but the problem arises with production server. Error: Swift_TransportException Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused) Note: I am ..

Read more

I have a project on a Cpanel host and when I edit and upload some of my files it will delete all spaces in the file and the program will be got errors. for instance, it converts this code : @section(‘content’) <div class="container-fluid"> <div class="row"> </div> </div> to this code : @section(‘content’)<div class="container-fluid"><div class="row"></div></div> Source: ..

Read more

I am trying to redirect the main domain to the folder public directory by .htaccss. I wrote the below code on .htaccess file. but the index.php file is downloaded when I hit the domain. RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?xxx.com$ RewriteCond %{REQUEST_URI} !^/foldername/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /foldername/$1 RewriteCond %{HTTP_HOST} ^(www.)?xxx.com$ RewriteRule ..

Read more

I am new on developing application, but now I’m handling a laravel project (website app) that have been deployed on cpanel. Now, I need to use a specific function, but for using it, I need to install the package (the package is maatwebsite/excel). The steps are written here: https://5balloons.info/laravel-export-and-import-excel-using-maatwebsite-package/ (and many other website), but on ..

Read more

I created a laravel rest api project in my local pc with php version 8.0.3. Everything works fine in the localhost. But when I upload the files to cpanel. Below error occurs. My cpanel php version is 7.4.3. I cleared the cache before uploading. Here’s the error I get: { "message": "Target class [AppHttpcontrollersAdminAuthController] does ..

Read more

[Mon Aug 30 13:34:20.808239 2021] [cgi:error] [pid 12226] [client 103.20.215.46:47040] AH01215: #4 /home/ProjectName/public_html/ProjectName/vendor/laravel/f in /home/ProjectName/public_html/ProjectName/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 110: /usr/local/cpanel/cgi-sys/ea-php56 [Mon Aug 30 13:34:20.808137 2021] [cgi:error] [pid 12226] [client 103.20.215.46:47040] AH01215: #3 /home/ProjectName/public_html/ProjectName/vendor/monolog/monolog/src/Monolog/Logger.php(712): MonologLogger->addRecord(400, Object(SymfonyComponentDebugExceptionFatalErrorException), Array): /usr/local/cpanel/cgi-sys/ea-php56 [Mon Aug 30 13:34:20.808005 2021] [cgi:error] [pid 12226] [client 103.20.215.46:47040] AH01215: #2 /home/ProjectName/public_html/ProjectName/vendor/monolog/monolog/src/Monolog/Logger.php(344): MonologHandlerAbstractProcessingHandler->handle(Array): /usr/local/cpanel/cgi-sys/ea-php56 Sourc..

Read more

I uploaded the Laravel project to a subdomain(sub.example.com) I also uploaded the public files to the public_html folder and it works I want to save the photo to the public_html after cropping, but I can’t $image = $request->avatar; $filename = $image->getClientOriginalName(); $image_resize = Image::make($image->getRealPath()); $image_resize->resize(300,300); $userimage= User::where(‘id’ , Auth::user()->id)->first(); $userimage->avatar = $filename; try{ $image_resize->save(‘https://example.com/img/’.$filename); $userimage->save(); ..

Read more