I have my files into /var/www but i need access sqlite file into folder
/home/my/words
I'm trying do this:
$dir = 'sqlite:../../home/my/words/bd.sqlite';
But path doesn't work.
Error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [14] unable to open database file' in /var/www/db.php:20 Stack trace: #0 /var/www/db.php(20): PDO->__construct('sqlite:..\..\ho...') #1 /var/www/Details.php(14): require_once('/var/www/db.php') #2 /var/www/controller/Controller.php(14): require_once('/var/www/Detail...') #3 /var/www/index.php(5): require_once('/var/www/contro...')
If i use, for example: $dir = 'sqlite:test\db.sqlite'; it works great.
What i'm doing wrong?
Related
I am trying to use ImageMagick to covert the first page of pdf to image but it is not working, I tried all the solutions from Stack Overflow and some other websites such as using real path but none is working.
<?php
$image=new Imagick();
$image->readImage('uploads/Datapath.pdf[0]');
$image->writeImages('uploads/ima.jpg');
?>
This is the code but not working and is giving error
Fatal error: Uncaught ImagickException: UnableToOpenBlob 'uploads/Datapath.pdf': No such file or directory # error/blob.c/OpenBlob/3315 in F:\xampp\htdocs\Web_Engineering\webproj\try.php:3 Stack trace: #0 F:\xampp\htdocs\Web_Engineering\webproj\try.php(3): Imagick->readImage('uploads/Datapat...') #1 {main} thrown in F:\xampp\htdocs\Web_Engineering\webproj\try.php on line 3
I have unzipped the installation folder. When going to the install.php to start the installer I get an Fatal error: Uncaught RuntimeException.
I use XAMPP with PHP 7.2 and I go to:
http://localhost/typo3/install.php
I get following message:
Fatal error: Uncaught RuntimeException: Could not create directory "/Applications/XAMPP/xamppfiles/htdocs/typo3temp/var/log/"! in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2172 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2140): TYPO3\CMS\Core\Utility\GeneralUtility::createDirectoryPath('/Applications/X...') #1 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(222): TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep('/Applications/X...') #2 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(193): TYPO3\CMS\Core\Log\Writer\FileWriter->createLogFile() #3 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(123): TYPO3\CMS\Core\Log\Writer\FileWriter->openLogFile() #4 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/Fil in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2172
Stacktrace in log file:
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2140): TYPO3\CMS\Core\Utility\GeneralUtility::createDirectoryPath('/Applications/X...')
#1 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(222): TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep('/Applications/X...')
#2 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(193): TYPO3\CMS\Core\Log\Writer\FileWriter->createLogFile()
#3 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(123): TYPO3\CMS\Core\Log\Writer\FileWriter->openLogFile()
#4 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/Fil in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2172
:
No more error logs available..
The error means that php cannot write to your xampp htdocs directory, because of security restrictions of the Applications dir.
You should change your xampp configuration like in this tutorial https://pureinfotech.com/install-xampp-windows-10/
I was in the process of viewing an existing pptx file using the reader of Powerpoint2007 but
i get this fatal error:
Fatal error: Uncaught exception 'Exception' with message 'File ./resources/phppowerpoint_logo.gif not found!' in C:\xampp\PHPPresentation-master\src\PhpPresentation\Shape\Drawing.php:107 Stack trace: #0 C:\xampp\PHPPresentation-master\samples\Sample_Header.php(49): PhpOffice\PhpPresentation\Shape\Drawing->setPath('./resources/php...') #1 C:\xampp\htdocs\sanagumana.php(8): include_once('C:\xampp\PHPPre...') #2 {main} thrown in C:\xampp\PHPPresentation-master\src\PhpPresentation\Shape\Drawing.php on line 107
I already check the resources folder and phppowerpoint_logo.gif is there. What can I do??
Recently I have changed my host. On the previous host, every thing was ok, but now on the new host I get following error..
Please direct me to the host so I can solve this problem ASAP???
Fatal error: Uncaught exception 'Exception' with message 'Document namespace isn't a valid Excel XML 2003 Spreadsheet' in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php:198
Stack trace:
#0 /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php(305): SimpleExcel\Parser\XMLParser->parseDOM(Object(SimpleXMLElement))
#1 /home/jalali/public_html/admin/#dmin.php(28): SimpleExcel\Parser\XMLParser->loadFile('../archive/1371...')
#2 {main} thrown in /home/jalali/public_html/admin/SimpleExcel/Parser/XMLParser.php on line 198
When simply calling the Imagick class:
$image = new Imagick('/images/magick/atmsk.png');
I get the error message:
Fatal error: Uncaught exception 'ImagickException' with message
'unable to open file `/images/magick/atmsk.png' #
png.c/ReadPNGImage/2889' in .../imag.php:4 Stack trace: #0
.../imag.php(4): Imagick->__construct('/images/magick/...') #1 {main}
thrown in .../imag.php
I have checked memory available as per another posting here and that is ok!
Use the full path to the image, for example:
$image = new Imagick($_SERVER['DOCUMENT_ROOT'] . '/images/magick/atmsk.png');