Page Isn't Working Error - Laravel cPanel - cpanel

I am trying to upload my laravel project to cPanel.
I have uploaded the contents of the public folder in Laravel to the public_html directory
I have uploaded the rest of the laravel files to a folder called 'project'
I have changed the index.php file like this.
require __DIR__.'/../project/vendor/autoload.php';
$app = require_once __DIR__.'/../project/bootstrap/app.php';
I am getting an error "Page isn't working HTTP ERROR 500"
The Project folder directory is /project
and the public folder contents are in /public_html
Thanks in advance.

Turns out I had to change the php version which was defaulted to 5.4 to 7.2 and that did the trick and everything works perfectly now.

Related

Xtrareports stylesheet is missing

I'm using .NET CORE 3.1 and I implemented xtrareports in my project. Now I'm using free trial of Devexpress. But when I'm loading my project after publish project and publish node_modules file on server the *.repx is empty and I have 28 wrong for loading file . and the stylesheet file message "Failed to load resource: the server responded with a status of 404 ()".
If nodeJS is installed on your server, IIS creates a virtual directory for node_modules and doesn't allow to serve this folder to client. So, even you upload the folder under wwwroot, client can not access this folder and report will not work.
So, try to remove virtual directory or move your files to another server that NodeJs is not installed.

Location of config files when deploying Symfony

I'm trying to deploy a Symfony 3 application on Kimsufi of OVH.
Everything works on my local machine, but when I deploy I get the error (debug mode is on) :
The file "/home/remiblaiyb/app/app/config/routing.yml" does not exist.
Symfony seems to search on app/app for config, I have no idea why.
Do you have any suggestion? Thank you very much.
EDIT: I finally found the answer. It's due to the new way of getting the project directory in Symfony: Symfony looks after the composer.json file, which I didn't upload in prod!
So do not forget to include your composer.json into your project.
Thanks!

How to disable creating html example folder in Apache

I am creating a provision shell script file and in Laravel I have a public folder and not html like in a default Apache install.
So, I end up deleting html and index.php example file all the time.
Is there any option while installing apache2 on my system to not create html folder and the example file?

mod_rewrite in XAMPP and Magento 2

I followed this tutorial http://www.appseconnect.com/how-to-install-magento-2-on-xampp-server-localhost/ to install Magento 2 on XAMPP (Windows).
But, after install magento, I open the project and admin on browser and when I see the firebug console there countless errors when trying to access js, css and fonts of the folder pub/static:
I tried this solution (and a few others I found on google) but not resolved.
Set the Magento 2 mode to 'Developer mode.
Clear everything on pub/static folder except .htaccess file.
Also clear all cache (var/cache/* , var/page_cache/* ,
var/generation/*)
Check folder permission of 'pub/static' folder.
Refresh the page on browser.
In 'Developer mode' required files will automatically create on
public/static folder if the folder have permission to create files.

Yii - How to cause Yii to republish to the assets folder

Yii question.
On my development machine, the required JQuery files for the application were present in a subfolder under the assets folder. However, when I copied the application to my test server, JQuery files were missing in the folder yii looked for them. I kept getting errors such as '../assets/db0e5a94/jquery.ba-bbq.js' 404 not found, etc.
I emptied the assets folder, and now all my CSS files etc. are reported missing. Is there any way I can cause Yii to republish to the assets folder?
Thanks!
Simply delete all sub-directories in the assets folder and clear your browser cache. Do not delete the assets directory or you will have to set the write permissions again.
in components/Controller.php add the following function:
protected function beforeAction($action){
if(defined('YII_DEBUG') && YII_DEBUG){
Yii::app()->assetManager->forceCopy = true;
}
return parent::beforeAction($action);
}
A simple way to have your assets back is to manually copy them from framework directory back. I know it is not the best way to do it, but it should help you while you find a better solution.
Ask your hosting service provider to disable SAFE_MODE in php.ini. Then remove asstes directory together with its sub files and folders and create it again. Make sure that you set CHMOD to 0777 for the new directory you just created.
I also had this same problem. After uploading the respective files to the server i changed the file permission to 755 in the server. Then it worked.