I am working on a web application project with Laravel 5.4.21, PHP 7 and Apache 2.4 on Windows 10.
When I run Laravel using 'php artisan serve' command, it runs fine. But if I run from apache htdocs, it shows following errors:
FatalThrowableError in Encrypter.php line 130: Call to undefined function openssl_decrypt()
But I have OpenSSL enabled in php.ini.
I do not have Xampp. I have searched some solutions, but they do not work.
Related
I've deployed a laravel app on cpanel. The app is working as expected on my local machine but on cpanel I'm getting the error below.
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.30. in /home4/peakcoke/public_html/vendor/composer/platform_check.php on line 24
When I run php -v I get 8.0.20.
How can I fix this?
Do a phpinfo(), what you get by running php -v from terminal is PHP CLI version.
Also, Cpanel usually comes with PHP Selector component that allows you to switch between different installed versions.
I installed laravel project 5.1 which is working fine but artisan commands are not working throwing each() error which is deprecated in php 7.1. When I run phpinfo() it shows php version 5.6 and on command line there's also two versions are showing
when run
phpinfo();
5.6
when run on command Line in xampp folder
C:/xampp> php -v;
5.7
when run in command in this xammpp/php directory
C:/xampp/php> php -v;
5.6
This is because there are CLI version and WEB version.
How Giacomo1968 says in this answer on Super User:
“Don’t panic! If you are concerned about what PHP version your Apache server is using, the output of phpinfo() is always what you should pay attention to. The Apache PHP module and the PHP command line binary are two different things that don’t interfere with each other.
In fact you can compile and load various PHP versions you want to work with Apache as long as you adjust Apache to properly load it. The PHP command line interface will never come into play in the case of Apache parsing PHP pages.
The command line version of PHP is simply there for command line specific tasks and the PHP module for Apache will never touch, use or need that.”
I am suddenly got this error in my composer when I am using php artisan and I already find this link but it doesn't help me , How can I fix it, I am using laravel 5.4 and PHP 7.1 and IIS 7.5 as my server
Laravel is working fine with NGINX and PHP7 FCGI, but throwing an error 500 hphp_invoke when using NGINX with HHVM.
When running the command tail -n 50 -f /var/log/hhvm/error.log the output is:
Fatal error: syntax error, unexpected '(' in /var/www/apps/erp.com/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php on line 41
It is a fresh Laravel install and anything has not been changed.
I also tested hello world php scripts with NGINX and HHVM and they are working fine.
I am using ubuntu 16.04
Any help would be appreciated.
I recently updated PHP from 5.2.10 to 5.3.3 and now I have problems when executing PHP scripts from command line, i receive an error "Call to undefined function pg_connect()" so it seems that cli does not recognize the php53-pgsql module
From the browser works fine but I need to execute scripts from command line
I have a Centos 5.5 and postgres 8.4
I checked the phpinfo of the php-cli and said it was php version 5.2.16 !! It seems that in the installation the 5.3 was installed ok on /usr/bin/php but /usr/local/bin/php had version 5.2 so I replaced it and now works fine!