Class "ZipArchive" not found in laravel 9 - php

I hosted a laravel website in hostinger vps. I used import export lib in that laravel website. So while importing a file I am getting this error:
Class "ZipArchive" not found
I tried to intall
apt-get install php-zip
systemctl apache2 restart
Currently I am using php 8.1. After trying still getting this error. Is there a way to solve this issue? Or I am doing something wrong.

Related

MongoDB Class 'MongoDB\Driver\Manager' not found" in Laravel 5.7, php 7.3 (on Ubuntu 20.4 and Apache)

I am running a laravel 5.7 app on apache server which i have tried on the different php versions(7.2, 7.3) i have installed on my ubuntu system. Upon hitting the apps url in the browser i get this error Class 'MongoDB\Driver\Manager' not found
I have been battling with this for a while now and have tried so many solutions out there but it still persists. I have mongodb extension installed on all the php distributions.
Funny enough, When i tried getting a record from the db using tinker it works very fine.
You must install php extension separatly; is not a library
https://www.php.net/manual/en/mongodb.installation.manual.php
In ubuntu simple run
sudo apt-get install php-mongodb

PhpSpreadSheet Class ZipArchive not found Error [duplicate]

This question already has answers here:
Fatal error: Class 'ZipArchive' not found in
(25 answers)
Closed 3 months ago.
I've just downloaded PhpSpreadsheet package via composer and I tried to generate an Excel spreadsheet. But all I get is an error "Class ZipArchive not found ". I work on Windows. In my localhost it is correctly generating excel. My localhost php version is 7.0.2 .But server Php Version is 5.6. I am not able to generate excel in server. I am getting "*Class ZipArchive not found" error.
I think you just need the PHP "zip" extension on your server...
If I understand well, your dev machine is on Windows. But your "production" machine is on... Linux?
If it's Debian :
apt-get install php-zip
If it's RedHat or whatever
yum install...
I update the Ubuntu 16.04 with php5.6 to Ubuntu 18.04 with php7.2.
Solved the same erorr with installing the php-zip as in the first post: sudo apt-get install php-zip, then restart the apache server: sudo service apache2 restart.
You have to reference ZipArchive in your PHP code:
use ZipArchive;

How to resolve "undefined function TYPO3\CMS\Core\Localization\Parser\simplexml_load_string()" in TYPO3 8 CMS

Recently I have installed TYPO3 CMS 8 in my local server, after all configuration wizard finally I got error like "Call to undefined function TYPO3\CMS\Core\Localization\Parser\simplexml_load_string()".
Can anyone help me for resolving this error.
This is php extension error. install php7.0-xml using below command and after restart your apache server.
sudo apt-get install php7.0-xml
sudo service apache2 restart
I found this in german: https://forum.typo3.org/index.php/t/214932/-typo3-german-gel-st-simplexml-problem-typo3-7-6-und-php-7-auf-ubuntu-server-16-04
SimpleXML is not active by default in PHP 7 on Ubuntu. See
http://stackoverflow.com/questions/35593521/php-7-simplexml. After
activate them all works.

Could not find PDO driver when installing laravel 5 on CentOS 7 with DigitalOcean

I'm trying to get my offline Laravel 5 webapp deployed. First of all I created a new droplet at DigitalOcean. Via ssh access I installed a fully working LAMP stack (I got the apache test-page at my ip-address).
After that, I pulled my git repo into the /var/www/html folder. Using composer install all my dependencies were installed.
When I visit my-ip-addres/public, I get a laravel error
PDOException in Connector.php line 55: could not find driver
I thought maybe my PDO module wasn't installed correctly but when I look in my phpinfo() file, everything looks correct.
Is there anyone who can help me out with this problem?
run this command sudo apt-get install phpX-mysql X: php version (7.0 or 5.6 or ...) and then service apache restart .

How can I get my current symfony installation run on a local server?

I have been working on a Symfony2 installation on a dedicated server for the past year and I'm finally trying to get it to work on my local server (since I am spending more time meddling with the code lately).
I've created a new database and imported it. Edited the parameters.yml file to contain all the info needed by local and ran php composer.phar install.
Ran php app/console doctrine:schema:update, clear cache, install assets and dumped assetics. No errors so far.
Now, when I go to the app.php file, I am getting this error :
Fatal error: Call to undefined function Doctrine\Common\Annotations\token_get_all() in [path]/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php on line 56
I couldn't find an answer by searching (could be because I am not sure what i am searching for). Has anyone encountered this issue before and know how to fix it?
Regards,
Do you have the PHP tokenizer extension enabled? Check the Symfony requirements for more information.
In Ubuntu 14.04 you could install it with
sudo apt-get install libapache2-mod-php5

Categories