getting error while deploying laravel 5.5 project - laravel-5

Deploying my laravel project on Linux hosting using cpanel. Project running on localhost very well but once i put on hosting, it is giving me following error.
Warning: require_once(): It is not safe to rely on the system's
timezone settings. You are required to use the date.timezone setting
or the date_default_timezone_set() function. In case you used any of
those methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected the timezone 'UTC' for
now, but please set date.timezone to select your timezone. in
/home/sachinpa/public_html/public/index.php on line 52
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting
identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in
/home/sachinpa/public_html/public/index.php on line 52.

Related

laravel error while uploading project on cpanel

I am trying to upload projects on server but I found error as "[26-Jan-2021 16:31:26 Etc/GMT] PHP Parse error:
syntax error, unexpected ':', expecting '{' in
/home/indextechno/public_html/demo7/vendor/symfony/polyfill-php80/bootstrap.php
on line 23"
this error is obvious message you have some syntax error in that file.
first check code in IDE to ensure everything is fine and then upload it to host.

laravel "Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE)"

i moved my laravel project from local to sharedhost
but the laravel give this error :
"Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE)"
in
public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
host php version : 7.0
image
That code only works from PHP 7.1 and up.
Note:
As of PHP 7.1.0 visibility modifiers are allowed for class constants.
Link to documentation.
Upgrade your PHP version or use an earlier version of Doctrine's DBal.

Parse error: syntax error on newly installed October CMS using installer.php

I just installed October CMS using their installer.php, afterwards, after setting up my database and admin, I get this
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /xxx/xxx/xxx/xxx/xxx/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 101

Laravel 5 and iPage Hosting

I have a shared hosting at iPage. I did the steps listed here : Deploy Laravel 5 using only FTP in a shared hosting (Moving files, editing htaccess) and yet still facing the same 500 error :
20161126T060216: bluepenlabs.com/projects/peugeot/public/index.php PHP
Warning:
require(/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php):
failed to open stream: No such file or directory in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/index.php
on line 22 PHP Fatal error: require(): Failed opening required
'/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/public/bootstrap/autoload.php'
(include_path='.:/usr/local/lib/php-5.5.22-amd64/lib/php') in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/ 20161126T061559:
bluepenlabs.com/projects/peugeot/public/index.php
PHP Parse error:
syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE)
in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
20161126T061939: bluepenlabs.com/projects/peugeot/public/index.php PHP
Parse error: syntax error, unexpected '.', expecting '&' or variable
(T_VARIABLE) in
/hermes/bosnaweb28a/b1452/ipg.bluepenlabscom/projects/peugeot/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php
on line 475
Note that i'm trying to install the laravel project in a subdirectory /projects/peugeot/
Thank you
I once hosted a laravel project on iPage(shared hosting). I faced 500 errors. Not showing much description.
This may be because of the Laravel 5.3 min server requirements.
Ipage hosting site normally give a version below the min requirement. You need to change the setting on your Control Panel. Try upgrading your PHP version.
Hope this helps.

CodeIgniter "No input file specified"

I just finished developing a website using codeigniter and in the end the person I was developing for switched from one hosting service to another. Now, when I try to go in the website at first I got a message saying
"No input file specified"
after going through some websites I found out I could try and fix this by using index.php? changing these on the config.php file:
$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";
I tried that but now I am getting this message:
A PHP Error was encountered
Severity: Notice
Message: Undefined property:
Login::$session
Filename: controllers/login.php
Line Number: 121
Fatal error: Call to a member function
userdata() on a non-object in
/home/content/34/5024634/html/pdv/application/controllers/login.php
on line 121
on line 121 of controllers/login.php you see this:
if ($this->session->userdata('logged_in') == TRUE)
which works perfectly fine on the old server as well as on localhost. Now, going back to the previous host isn't an option according to my client so I've been stuck with this error for a while now and haven't been able to find any solution, would any of you guys know how to fix this?
The most helpful websites I've checked out are these two:
http://anon83.wordpress.com/2007/12/11/codeigniter-vs-godaddy-problems/
http://codeigniter.com/wiki/Godaddy_Installaton_Tips/
You probably forgot to load your session library
$this->load->library('session'); in your construct or autoload it.

Resources