I am using spout library to import excel data into mysql using php but I am having error in finding directory. I searched a lot but did not find any relevant stuff.
Warning: require_once(here is your path of spout
library/spout-2.4.3/src/Spout/ Autoloader/autoload.php): failed to
open stream: No such file or directory in
C:\xampp\htdocs\uploadexcel.php on line 23
![1]:( https://i.stack.imgur.com/dLspH.png)
Related
Have this project which aims to import an Excel sheet: the file is a report, not a flat file and there's no way to obtain such. So I'm using PHP Excel to read the file and save the data we need into the application.
Problem is that the file is in Excel 4.0 format which I can't edit (apparently), it can be opened and viewed in MS Excel application, but PHP Excel throws the exception when trying to read it with Excel5:
Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message 'The filename C:/xampp/htdocs/uploads/PS.xls is not recognised as an OLE file' in C:\xampp\htdocs\includes\PHPExcel-1.8\Classes\PHPExcel\Shared\OLERead.php on line 90
PHP Excel identifies the file as in HTML format, but also, throws me the error:
Warning: DOMDocument::loadHTML(): Invalid char in CDATA 0x4 in Entity, line: 1 in C:\xampp\htdocs\includes\PHPExcel-1.8\Classes\PHPExcel\Reader\HTML.php on line 495
I suppose this is because the data contains special characters (UTF-8), but found nothing in PHPExcel that could change the encoding... neither could find anything about this problem and I'm starting to think there's no solution for this, except by asking the user to copy & paste the data to "decent" Excel file... That way works, but require some manual manipulation.
No it can't read it. The minimum BIFF format version that PHPExcel can read is BIFF 5 (from 1993).
Good luck finding anything capable of reading BIFF 4 (from 1992). BIFF 4 uses OLE1, while PHPExcel can only read .xls files using OLE2 (from BIFF 5 onwards). I'm not aware of any pure PHP extensions that can handle such an early format; you may need to use the commercial LibXl extension.
I have seen different variations of this problem which I have tried to use without any success so i figured it would be best just to ask.
I recently moved my website from my wamp server over to my qnap server. Seams to be working quite well except 3 errors that popped up (did not have them on my local host and havent changed any of the code).
I get the following 3 errors.
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
I seam to understand what is going on that it cannot access the file but can anyone point out what i need to change and where/which file i need to change it. I have not done any changes to my codeigniter file structure (all original setup). If you need code dump just let me know from which file.
Thank you for your help.
Jonas
i want to draw a piechart in php using mysql. i am getting error only for below code.
<?php include "libchart/classes/libchart.php"; ?>
during run i am getting below error. anyone please help me.
Warning: include(libchart/classes/libchart.php) [function.include]:
failed to open stream: No such file or directory in
C:\xampp\htdocs\g2.php on line 2
Warning: include() [function.include]: Failed opening
'libchart/classes/libchart.php' for inclusion
(include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\g2.php on line
2
It means the file C:\xampp\htdocs\libchart\classes\libchart.php does not exist
it seems you giving wrong path for file. I think you should tell your directory path too here i.e where is the file in which you including the file and the file path which you want to include.
I'm using Doctrine 1.2.
The code is trying to include some entities (in the example, AdvertiserUsers) by adding the suffix "Table" at the end. I print a trace at the end of this message.
The thing is, my app does not use these files! I have my models called AdvertiserUsers on the style, with no need for an AdvertiserUsersTable file. Actually, I have my models called "AdvertiserUsers" only, and my app works OK without it (ugly warnings aside - which I want to get rid of).
I don't know why it tries to include these files that are not needed. This is the actual issue.
As a side note, my application has been doing this after I integrated an external module (from a freelance) that used a direct connection - no Doctrine - and happens on this module, when having to integrate both and using separate connections for different data.
Trace:
[26-Jul-2011 22:59:06] PHP Warning: include_once(AdvertiserUsersTable.php): failed to open stream: No such file or directory in /usr/local/zend/share/ZendFramework/library/Zend/Loader.php on line 146
[26-Jul-2011 22:59:06] PHP Warning: include_once(): Failed opening 'AdvertiserUsersTable.php' for inclusion (include_path='/usr/local/zend/apache2/htdocs/stats-from-zero/application/../library:/usr/local/zend/apache2/htdocs/stats-from-zero/library:/usr/local/zend/apache2/htdocs/stats-from-zero/library/doctrine::/usr/local/zend/apache2/htdocs/stats-from-zero/library/recaptcha-php-1.10:/usr/local/zend/apache2/htdocs/stats-from-zero/public/php-form-builder-class:.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/usr/local/zend/apache2/htdocs/stats-from-zero/application/modules/stats/models:/usr/local/zend/apache2/htdocs/stats-from-zero/application/modules/stats/forms') in /usr/local/zend/share/ZendFramework/library/Zend/Loader.php on line 146
AdvertiserUsersTable.php does not exist. Check name of that file & specific directory. It should be there
For the longest time now I've been trying to convert HTML pages containing large tables to PHP. These are styled with CSS and can be several pages long.
I first tried DOMPDF. It works great, until a document is more than one page. None of the fixes I've found work. Either it errors out, or any element that would be even partially on the second page gets lumped over the content of page 1. I've tried both the latest release and the SVN copy I checked out today.
I also tried html2ps/pdf, and it gives me "permission denied" errors writing to the cache directory, even though the directory is fully writable. The system requirements test script passes. The server is running PHP 5 under IIS (not my choice heh).
Can either of these be convinced to work, or is there a library that can do it?
Errors from the demo/test scripts:
Warning: file_put_contents(C:\Inetpub\wwwroot\JM\pdf\html2ps\cache/7d888258e9745b3716532ea81342daaf.css.compiled) [function.file-put-contents]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\JM\pdf\html2ps\css.cache.class.php on line 33
Warning: fopen(C:\Inetpub\wwwroot\JM\pdf\html2ps\cache/unicode.lb.classes.dat) [function.fopen]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\JM\pdf\html2ps\inline.content.builder.php on line 991
Warning: flock() expects parameter 1 to be resource, boolean given in C:\Inetpub\wwwroot\JM\pdf\html2ps\inline.content.builder.php on line 992
Warning: fwrite(): supplied argument is not a valid stream resource in C:\Inetpub\wwwroot\JM\pdf\html2ps\inline.content.builder.php on line 1011 (this error repeats several thousand times)
Warning: fopen(C:\Inetpub\wwwroot\JM\pdf\html2ps\cache/times.z) [function.fopen]: failed to open stream: Permission denied in C:\Inetpub\wwwroot\JM\pdf\html2ps\pdf.fpdf.makefont.php on line 318
Can't write to file C:\Inetpub\wwwroot\JM\pdf\html2ps\cache/times.z
A similar problem with html2pdf under IIS has been discussed here.
The solution was quite simple, yet weird. If this doesn't help you, a full error-message and / or a little bit of code would help me to help you.
I personally recommend command line applications instead of any PHP libraries.
Reasons :
PHP libraries need more time and memory (cache) for conversion process.
They need well-formatted HTML pages only, otherwise throw errors or warnings.
No support for external style sheets.
Command Line Tool:
If you run your script on a Linux server then I suggest command line tools.
Reasons :
They are extremely fast compared to PHP libraries.
Support CSS.
Accept non-well-formatted HTML.
Which command line tool to use?
wkhtmltopdf
htmltopdf
html2pdf
For more information refer to Converting HTML to PDF (not PDF to HTML) using PHP.