Laravel 5.8 error 500 uploaded in shared hosting cpanel - php

I uploaded a laravel-5.8 project to a shared hosting cpanel.
The problem is when I access index.php it gives me an error 500.
Here is my project directory
I didn't transfer the public folder yet. but it should work when access.
stage.example.com/public/ instead it displays error 500.
I changed the database credentials.
I haven't changed the path in index.php since I didn't move the public folder yet.
path:index.php
I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7.
PHP >= 7.1.3
BCMath PHP Extension
Ctype PHP Extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension
Tokenizer PHP Extension
XML PHP Extension
I hope someone can help I wanted to run my laravel5.8 project in Cpanel.

I have answered this question in another post. Have a look at it and see if helps:
What is the easiest and quickest method to deploy a Laravel web application live?

I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7
I have no idea what "myphpadmin" is, anyway since you're running PHP 5.6 Laravel can't work.
In cPanel you should have an option to select the PHP version, select the latest available, 7.3 if your cPanel is updated.

If you have blank page maybe you need to change the path to the autoload.php file in index.php. This file is in vendor folder.
Change :
require __DIR__.'/bootstrap/autoload.php';
by
require __DIR__.'/vendor/autoload.php';

Related

Unable to load dynamic library 'php_grpc.dll'

My goal is to connect my laravel project to firestore firebase. I will be needing the grpc in order to continue it. However my problem is the .dll cant be found. I already uploaded the .dll file in ext folder.
I also included it in my php.ini file.
still getting the same error
I dont know if its the version og php and grpc is conflicting.
After applying the comments' suggestions:
You need to mention extensions without php_ and .dll prefix and suffix like below:
extension=fileinfo
extension=grpc
Restart Apache server if required. You can also check for php version on the command line using php --version. If it shows the version without any warnings/errors, it means the extensions are loaded correctly.
Also, as the error message in your screenshot suggests, you need to install the right thread safe package of GRPC relevant to your operating system architecture and PHP version from https://pecl.php.net/package/grpc
Since nice_dev pointed out it was a compatibilit issue. I downloaded the non thread x64 and used it. It worked. Been using the x84, maybe the reason why it's not working.

WAMP Server: phpMyAdmin showing loads of Deprecation Notices & errors?

I'm working with WAMP Server for local development, As WAMP does not ship with PHP 7.1, I installed it manually as I needed that version for a project to work.
I downloaded the binaries from the PHP site (Thread Safe version) and placed it inside wamp64/bin/php/php7.1.8 and renamed the php.ini for development file to phpForApache.ini and had to change the extension dir for modules to load also.
After all of that I went on phpMyAdmin and here is an example:
There is many more errors of the same type.
My question is how do I solve them?
I am running 4.6.4 for phpMyAdmin...
These errors came mostly cause of your phpMyAdmin version is not compatible with php version please first sure the cause of issue.
So you have to download the latest version of phpMyAdmin phpMyAdmin-download-link
Download the latest version from upper right green button
Then extract that zip file in wampp/apps directory and remove all-languages from folder name and remove - from behind the version number this is not necessary but doing this to set a conventional name which will help us while we changing version number in files.
Copy config.inc.php file from older version folder and paste in new version folder which one you extract.
Edit phpMyAdmin version in phpmyadmin.conf file found in wamp/alias directory.
Edit wampmanager.conf file found in wampp/ directory if you found phpMyAdmin version defined in this file because I am not sure probably they removed it from latest version of wamp.
Hop you found this helpful if yes please vote, happy codding 😊

Unable to load Image ImageMagick for PHP on Azure

So, I have started to explore Azure, and trying to setup a PHP, MySQL on my Free Azure tier.
I have a WebApp setup on Azure, and phpinfo() is coming up nicely.
I am getting trouble setting up ImageMagick though.
I am on on the default PHP 5.4.42
I downloaded the extension dlls for ImageMagick from https://pecl.php.net/package/imagick/3.1.2/windows
Specifically, i got the http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/php_imagick-3.1.2-5.4-nts-vc9-x86.zip file, which is nts version for PHP 5.4
Next, i followed the steps at https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/
I created a folder under my wwwroot folder called 'bin'. So now mu site path looks like /site/wwwroot/bin.
In this bin folder, i copied the php_imagick.dll file AND the other 8 Core_RL*.* files.
Next, In my Azure app settings, i added PHP_EXTENSIONS key, with value bin\php_imagick.dll
I then restarted my web app, but i am only getting the below error in my azure logs:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\home\site\wwwroot\bin\php_imagick.dll' - The specified module could not be found.
in Unknown on line 0
As alternatives, now I have changed my PHP version to 5.6(latest on Azure), and have put the corresponding version of imagick files from pecl site. This did not fix anything.
I have also tried the ini method, by creating ext and ini folders under the site folder, and creating the corresponding 'PHP_INI_SCAN_DIR' setting, but on restart of app, nothing shows up in the phpinfo(). Very sad :(
Please suggest what can I attempt to fix this issue.
Not all the versions of Imagemagick are compatible.
Here is a repo https://github.com/snobu/php-imagick-webapps that has the right resources referenced.
Download these resources (NTS Versions)
http://windows.php.net/downloads/pecl/releases/imagick/3.3.0rc2/php_imagick-3.3.0rc2-5.6-nts-vc11-x86.zip
http://www.imagemagick.org/download/binaries/ImageMagick-6.9.2-8-Q16-x86-dll.exe
Follow the steps in this Article, It just works http://blogs.msdn.com/b/azureossds/archive/2015/12/01/php-imagemagick-on-azure-web-apps.aspx

how to run laravel application in phpdesktop application?

I have downloaded phpdesktop application and copied working laravel application into the phpdesktop www directory. Also enabled the necessary extension in php-ini file inside phpdesktop application.
Index page of the application is working properly. but I am getting the following error messages when accessing other pages.
Error 404: Not Found
File not found
phpdesktop doesn't have apache server to enable mod_rewrite to solve this issue. How to overcome this issue? Plz guide.
for laravel, you need to change www_directory, point it towards "www/public"
"web_server": {
"listen_on": ["127.0.0.1", 0],
"www_directory": "www/public",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php",
"hide_files": []
},
phpDesktop 57 is currently using php 7.1.x if you want to run latest version of the laravel then just download the required version of php from official website and delete all the files and folder from the php folder inside phpDesktop except php.ini and put all the downloaded files and folder of php in php directory then you will be able to run laravel application inside phpDesktop.
you can have a reference from here: Just Check this article

Configure LDAP certificate dir in PHP 5.5.x (Windows)

Until version 5.4, when PHP was compiled from its source, LDAP extension was hard coded to look for its certificates in c:\openldap\sysconf folder. Since 5.5, this 'harcode' was replace by an environment variable called %SYSCONFDIR%. However i can't make LDAP extension point to the same dir it did before, no matter what i do! :(
In PHP 5.4, ldap_config.h
#define LDAP_SYSCONFDIR "c:\\openldap\\sysconf"
In PHP 5.5, ldap_config.h
#define LDAP_SYSCONFDIR "%SYSCONFDIR%"
Sorry for my bad english.
Any clue? Thanks.
Download the latest version of PHP 5.5.
This has been resolved in the PHP 5.5.4 binaries from windows.php.net. The LDAP extension looks for "c:\openldap\sysconf\ldap.conf" as it had done in 5.4.
I ran a trace with Sysinternals Process Explorer and it revealed that php_ldap was attempting to open the file C:\Apache24\%SYSCONFDIR%\ldap.conf, where %SYSCONFDIR% is interpreted literally and not expanded from the contents of an environment variable.
I have Apache installed in C:\Apache24, but obviously the exact path will vary depending on the name of your Apache folder.
In the root folder of your Apache installation, create a folder named %SYSCONFDIR% (literally!) and put ldap.conf in there. That solved it for me.
It seems that it will be fixed by php team in the next release.
See https://bugs.php.net/bug.php?id=65642

Categories