I have a FPDF output which works perfectly locally but there is problem online.
The error is:
Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file (output started at /home/wa/public_html/razpis/baza.inc.php:1)' in /home/wa/public_html/razpis/fpdf.php:271
Stack trace:
#0 /home/wa/public_html/razpis/fpdf.php(1052): FPDF->Error('Some data has a...')
#1 /home/wa/public_html/razpis/fpdf.php(1012): FPDF->_checkoutput()
#2 /home/wa/public_html/razpis/naredipdf.php(169): FPDF->Output('razpis.pdf', 'D')
#3 /home/wa/public_html/razpis/razpis5.php(136): require('/home/wa...')
#4 /home/wa/public_html/razpis/index.php(165): include_once('/home/wa...')
#5 {main} thrown in /home/wa/public_html/razpis/fpdf.php on line 271
Related
I am new to dart/flutter and a litte confused by the async-await flutter exception handling in this case.
So basically i have this function that loads a .json settings file from the flutter data folder.
Its supposed to load the settings and throw a SettingsLoadingException in the case it's unable to find the file, so the calling function knows when to create a new one.
This mechanism works, but two things are confusing me in this case. First of all it's still printing an uncaught FileSystemException to the console even though the print "No settings file!" shows it got caught. Secondly "No settings file" and the error are printed twice - so is it catching two errors?
Future<Settings> loadSettings() async {
try {
String fileName = SettingsService.settingsFileName;
File file = File("${await _localPath}/${dbFolderName}/${fileName}");
String fileContent = await file.readAsString();
Map<String, dynamic> settingJsonMap = jsonDecode(fileContent);
Settings settings = Settings.fromJson(settingJsonMap);
return settings;
} catch (e) {
print("No settings file!");
throw SettingsLoadingException("Unable to load settings");
}
}
I/flutter (10533): No settings file!
I/flutter (10533): No settings file!
E/flutter (10533): \[ERROR:flutter/runtime/dart_vm_initializer.cc(41)\] Unhandled Exception: FileSystemException: Cannot open file, path = '/data/user/0/com.yapps.smartdart/app_flutter/db/settings.json' (OS Error: No such file or directory, errno = 2)
E/flutter (10533): #0 \_File.open.\<anonymous closure\> (dart:io/file_impl.dart:356:9)
E/flutter (10533): \<asynchronous suspension\>
E/flutter (10533):
E/flutter (10533): \[ERROR:flutter/runtime/dart_vm_initializer.cc(41)\] Unhandled Exception: FileSystemException: Cannot open file, path = '/data/user/0/com.yapps.smartdart/app_flutter/db/settings.json' (OS Error: No such file or directory, errno = 2)
E/flutter (10533): #0 \_File.open.\<anonymous closure\> (dart:io/file_impl.dart:356:9)
E/flutter (10533): \<asynchronous suspension\>
E/flutter (10533):
E/SurfaceSyncer(10533): Failed to find sync for id=0
W/Parcel (10533): Expecting binder but got null!
I already tried using the .then and .catchError API which didn't work and led me to a totally different error.
The first thing you're confused about, FileSystemException is an error on the native side of the plugin you're using. So don't worry about that. the error is just getting caught on the plugin side and so does the error message that is being printed.
And The second thing which is messages getting printed twice should not have anything to do with the FileSystemException. My guess is you're calling the method twice. If so, you can confirm this by running this code in debug mode and using break points
Get the following error message on my app. The app is written with the Zend framework, but not by myself. Can anyone tell me what the error message says.
It is about an extra module after all and a template file is missing. Is that correct so far? Can I just copy it in there myself?
Fatal error: Uncaught Zend_View_Exception: script '/.phtml' not found in path
(/application/modules/default/views/scripts/) in
/library/Zend/View/Abstract.php:987 Stack trace: #0
/library/Zend/View/Abstract.php(883): Zend_View_Abstract->_script('/.phtml')
#1 /library/Zend/Controller/Action/Helper/ViewRenderer.php(910):
Zend_View_Abstract->render('/.phtml') #2
library/Zend/Controller/Action/Helper/ViewRenderer.php(931):
Zend_Controller_Action_Helper_ViewRenderer->renderScript('/.phtml', NULL) #3
library/Zend/Controller/Action/Helper/ViewRenderer.php(970):
Zend_Controller_Action_Helper_ViewRenderer->render() #4
/libr in
library/Zend/Controller/Plugin/Broker.php on line 335
Would be very grateful for any tip.
Greetz Bavra
I am trying to use the package encrypt 4.1. for flutter and I am getting the following error in the terminal when I try to run this command
secure-random -b
the output is the following:
FormatException: Missing argument for "base".
#0 Parser.validate (package:args/src/parser.dart:290:21)
#1 Parser.readNextArgAsValue (package:args/src/parser.dart:114:5)
#2 Parser.parseSoloOption (package:args/src/parser.dart:145:7)
#3 Parser.parse (package:args/src/parser.dart:86:11)
#4 ArgParser.parse (package:args/src/arg_parser.dart:326:42)
#5 main (file:///C:/flutter/.pub-cache/hosted/pub.dartlang.org/encrypt-4.1.0/bin/secure-random.dart:18:29)
#6 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
Unhandled exception:
FormatException: Missing argument for "base".
#0 Parser.validate (package:args/src/parser.dart:290:21)
#1 Parser.readNextArgAsValue (package:args/src/parser.dart:114:5)
#2 Parser.parseSoloOption (package:args/src/parser.dart:145:7)
#3 Parser.parse (package:args/src/parser.dart:86:11)
#4 ArgParser.parse (package:args/src/arg_parser.dart:326:42)
#5 main (file:///C:/Users/user/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/encrypt-4.1.0/bin/secure-random.dart:18:29)
#6 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)```
I have dart-sdk/bin into the environment variables,does anyone know why and how to solve it?
In the log file got these problem
#2 /home/imlink79/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(576): Zend_Db_Adapter_Abstract->query('INSERT INTO `en...', Array)
#3 /home/imlink79/public_html/application/libraries/Zend/Db/Table/Abstract.php(1076): Zend_Db_Adapter_Abstract->insert('engine4_user_fi...', Array)
#4 /home/imlink79/public_html/application/libraries/Engine/Db/Table.php(149): Zend_Db_Table_Abstract->insert(Array)
#5 /home/imlink79/public_html/application/libraries/Zend/Db/Table/Row/Abstract.php(475): Engine_Db_Table->insert(Array)
#6 /home/imlink79/public_html/application/libraries/Zend/Db/Table/Row/Abstract.php(446): Zend_Db_Table_Row_Abstract->_doInsert()
#7 /home/imlink79/public_html/application/modules/User/Plugin/Signup/Fields.php(257): Zend_Db_Table_Row_Abstract->save()
#8 /home/imlink79/public_html/application/modules/Core/Controller/Action/Helper/FormSequence.php(193): User_Plugin_Signup_Fields->onProcess()
#9 /home/imlink79/public_html/application/modules/Core/Controller/Action/Helper/FormSequence.php(45): Core_Controller_Action_Helper_FormSequence->doProcess()
#10 [internal function]: Core_Controller_Action_Helper_FormSequence->direct()
#11 /home/imlink79/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(328): call_user_func_array(Array, Array)
#12 /home/imlink79/public_html/application/modules/User/controllers/SignupController.php(50): Zend_Controller_Action_HelperBroker->__call('formSequence', Array)
You need to look into following file, there you have query running:
/application/modules/User/Plugin/Signup/Fields.php(257)
But if there is an error related to Insert query, you probably need to look to mysql log (usually located in /var/log/mysql) and find a log regarding sql-related error.
I'm getting this error after moving the application to another host. It's working locally, without any problems, but the issue started after moving to the webhost. Please tell me what I'm doing wrong.
pdo_mysql extension is not installed
Trace:
#0 D:\Hosting\11486590\html\shopping\magento\lib\Zend\Db\Adapter\Abstract.php(459): Varien_Db_Adapter_Pdo_Mysql->_connect()
#1 D:\Hosting\11486590\html\shopping\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#2 D:\Hosting\11486590\html\shopping\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#3 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource.php(169): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#4 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#5 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#6 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#7 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#8 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Resource\Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#9 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Cache.php(455): Mage_Core_Model_Resource_Cache->getAllOptions()
#10 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Cache.php(497): Mage_Core_Model_Cache->_initOptions()
#11 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\App.php(1183): Mage_Core_Model_Cache->canUse('config')
#12 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Config.php(414): Mage_Core_Model_App->useCache('config')
#13 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#14 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\App.php(413): Mage_Core_Model_Config->loadModulesCache()
#15 D:\Hosting\11486590\html\shopping\magento\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#16 D:\Hosting\11486590\html\shopping\magento\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#17 D:\Hosting\11486590\html\shopping\magento\index.php(87): Mage::run('', 'store')
#18 {main}
Check of your server has the pdo_mysql extension installed.
Create a file info.php and in it write <?php phpinfo() ?>
access the file with your browser and search for "pdo"
if not found install it or ask your server administrator to install it for you