Laravel in Shared Hosting - shared-hosting

I am trying to install a Laravel application in Shared Hosting following this tutorial where my server's PHP version is 7.1.17 and my Laravel version is 5.6.15.
When I am trying to browse my application using Chrome I can see only a White page, even no error is there.
I tried to debug the application and found that below code of index.php is not working.
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
What is the solution of this issue?

If there is no error_log or your error log are empty
Check if it's a php version is a latest 7.1 or higher
Make sure YOUR_PATH_DIR are correct
$app = require_once DIR.'/YOUR_PATH_DIR/bootstrap/app.php';
require DIR.'/YOUR_PATH_DIR/vendor/autoload.php';

Related

Unable to get Prestashop Bitnami Stack 1.7 working on Windows

I am fairly new to Bitnami and Prestashop and having issues getting it running
installed Oracle Virtual Box
Imported the Prestashop 1.7 bitnami file as a new VM only changing the RAM to 2GB ( I did this part a few times )
I made no changes to the network - but I noticed that when I logged in the VM didn't have access to the internet ( does it need to? )
So - everything seemed ok, but when I went to the IP address suggested on the screen of the VM - I got a 500 error. So I put prestashop in dev mode ( edited the config file ) then I got the following error:
// No shop found ... too bad, let's redirect to default shop
$default_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
// Hmm there is something really bad in your Prestashop !
if (!Validate::isLoadedObject($default_shop)) {
throw new PrestaShopException('Shop not found');
}
$params = $_GET;
unset($params['id_shop']);
$url = $default_shop->domain;
With the line: throw new PrestaShopException('Shop not found'); in Red.
I am not sure why it doesn't just run or how to fix this.
Do you have this file classes/shop/Shop.php? maybe this link can help you if you didn't have the file https://www.prestatoolbox.com/content/33-shop-not-found-at-line-404-in-file-classes-shop-shop-php
Are you upgrade Prestashop or is it a fresh install?
If you upgrade the application check the theme is update right.
You can check the apache log (/opt/bitnami/apache2/logs/error_log) if are anything about this error.

dropbox api authentication SSL error

I try to be authenticated using Dropbox-php-sdk. Therefore i use localhost development environment without ssl. Is that possible or not as i get the following error:
$callbackUrl = "http://localhost/dropboxphp/finish.php";
$accessToken = $authHelper->getAccessToken($code, $state, $callbackUrl);
echo $accessToken->getToken();
Regards
I just found the solution to my problem even for localhost development using Wamp or other similar packages for Dropbox PHP SDK reading this useful post.
Regards

GeoDesic Buffers sample code does not work in my local IIS Server

I am new to use ArcGis Api for javascript, I am using JS Api 3.20.
I have been trying for 3 days but it does not work.
I have taken code from the following link
Geometry Engine - Geodesic buffers | ArcGIS API for JavaScript 3.20
I paste this in My Html file create in VS website for .Net , and setup a local server for my page using IIS server
I also downloaded proxy from GitHub resource-proxy/DotNet at master · Esri/resource-proxy · GitHub
setup it in same application in IIS
Downloaded excel file added in my application from https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv
but still I am getting the following error in console using developer mode when set Proxy URL to this
config.defaults.io.proxyUrl = "/192.168.8.188/Proxy/proxy.ashx";
GET http://192.168.8.188:1555/192.168.8.188/Proxy/proxy.ashx?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 404 (Not Found)
and when I set proxy url to this
config.defaults.io.proxyUrl = "/Proxy/";
then the following error occurs in console
GET http://192.168.8.188:1555/Proxy/?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 403 (Forbidden)
Could you please help me out. I would be thankful in advance.
I Resolved My Issue thanks.
Basically I didn't enable IIS 4.5 web features so I read readme file of proxy which resolved my issue.
Here is what I read from ReadMe file located in DotNet folder of Proxy
Troubleshooting: If you get an error message 404.3, it's possible that ASP.NET have not been set up. On Windows 8, go to "Turn Windows features on or off" -> "Internet Information Services" -> "World Wide Web Services" -> "Application Development Features" -> "ASP.NET 4.5".
First off, try setting the proxyUrl value to this:
config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
That may resolve the issue.
EDIT (based on clarification that IIS is in fact running on port 1555):
You might want to confirm that you can access the proxy at all, by entering the proxy url directly in your browser (with no arguments), eg:
http://192.168.8.188:1555/Proxy/proxy.ashx
If this resolves correctly, you should get an error response in JSON format like this:
{error: {code: 400,message:"This proxy does not support empty
parameters."}}
That at least would confirm that the proxy is accessible and functioning properly on your system.

Hosting a laravel project on openshift

I am pretty new to hosting on Openshift and also pretty new to Laravel.
I have a laravel project on my local system. What are the steps to successfully host the project on Openshift.
I tried the Quickstart guide, to load from a github repo. So i uploaded my project onto github
I had the env files kept secret by adding them in gitignore ( Should this be done ?)
I have the ssh key set up with rhv setup. Made a private key with Puttygen and can connect via Putty.
I checked if all the code has been uploaded to the openshift server with Putty
But my website gives a 500 Internal Server error.
What am i doing wrong ?
Edit: I connected to the server via ssh and found this error
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/lib/openshift/558bfb764382ec89c3000084/app-r oot/runtime/repo/public/index.php on line 50
Edit 2: On exploring the code on line 50 This is supported only on PHP5.5 or above. So i guess this is the problem ?
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
Is there any fix ?
How to fix this ?
You should try checking out the laravel 5 quickstart on the OpenShift Hub (https://hub.openshift.com/quickstarts/115-laravel-5-0), check out the source code and see what modifications were made to make it run correctly on OpenShift and then incorporate those changes into your application.

Symfony 2.0.6 FOS UserBundle remains in login page

I have two dev environments: one using free MAMP and the other installed MySQL and configured PHP in MacOS Lion.
In the MAMP environment everything is working, however, in the other one it is not. What happens is that when I try to login the browser stays in the same page.
The PHPSESSID is received.
The path set in php.ini entry "session.save_path" is writable (since it rights when I try to login). And "session.auto_start" is set to "0" (I tried it to set to "1" but then I get an error stating that a session is already started and the start_session() function was ignored)
Any idea what must be causing this? I can post my configurations and code if you think it would help...
I Accidentally updated symfony to version 2.0.12 and the FOS UserBundle to latest version. Because of this, the login form needed the parameter "_csrf_token"