fatal-error

Fatal error: Class 'Memcached' not found in /my/path

偶尔善良 提交于 2019-12-05 14:20:39
When I try : $mc= new Memcached(); I get Fatal error: Class 'Memcached' not found in /my/path phpinfo says that /etc/php5/apache2/conf.d/20-memcached.ini is loaded as an additional .ini file. The content of this file is this one : ; uncomment the next line to enable the module extension=memcached.so dpkg --get-selections | grep memcached libmemcached6 install memcached install php5-memcached install Kubuntu Apache 2.0 php 5.4.4-1 Why do I have this fatal error ? Based on your comment I don't think you have it installed properly. Make sure you see a see a section in phpinfo() such as: memcached

SAS error message (FATAL: Code generation error detected during MISSING smear generation)

醉酒当歌 提交于 2019-12-05 14:12:22
Does anyone know what this error message means? FATAL: Code generation error detected during MISSING smear generation. It occurs whilst concatenating approx 40 datasets. I believe it may be due to hitting memory limits from having too many variables (circa 217), but would be good to get confirmation of this... (log file) 301 Data &dsn.&pfix.; 302 set &setlist.; 303 if SPCODE > 50 then delete; 304 * these SPCODES are subtotals ; run; FATAL: Code generation error detected during MISSING smear generation. NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set

How can I check if a jpeg will fit in memory?

巧了我就是萌 提交于 2019-12-05 12:18:12
Opening a JPEG image using imagecreatefromjpeg can easily lead to fatal errors, because the memory needed exeeds the memory_limit . A .jpg file that is less than 100Kb in size can easily exceed 2000x2000 pixels - which will take about 20-25MB of memory when opened. "The same" 2000x2000px image may take up 5MB on the disk using a different compression level. So I obviously cannot use the filesize to determine if it can be opened safely. How can I determine if a file will fit in memory before opening it, so I can avoid fatal errors? According to several sources the memory needed is up to 5 bytes

Catch ErrorException that wraps a fatal PHP error

只谈情不闲聊 提交于 2019-12-05 11:02:34
In my homemade PHP MVC framework, I've written a little error handler that wraps PHP errors in an exception, then throws it. class ErrorController extends ControllerAbstract { ... public static function createErrorException($number, $message = NULL, $file = NULL, $line = NULL, array $context = array()) { throw new ErrorException($message, $number, 0, $file, $line); } } Which is then registered using set_error_handler() . This works fine, with the exception (no pun intended) of fatal errors. My custom error handler is still called, but I can't catch the ErrorException that is thrown. An example

Why does 'Cannot break/continue 1 level' comes in PHP?

我们两清 提交于 2019-12-05 09:47:00
问题 I am getting sometimes this error on production at: if( true == $objWebsite ) { $arrobjProperties = (array) $objWebsite->fetchProperties( ); if( false == array_key_exists( $Id, $Properties ) ) { break; } $strBaseName = $strPortalSuffix . '/'; return $strBaseName; } $strBaseName = $strSuffix ; return $strBaseName; I have tried to reproduce this issue. But not getting any progress. $Id, $Properties having value received. Does anyone know when does 'Cannot break/continue 1 level' comes in PHP? I

Catch a fatal exception and continue

你。 提交于 2019-12-05 04:30:40
I know, that by its very definition, a fatal exception is supposed to kill the execution, and should not be suppressed, but here's the issue. I'm running a script that scrapes, parses and stores in a DB about 10,000 pages. This takes a couple of hours, and in rare cases (1 in 1000) a page fails parsing and throws a fatal exception. Currently, I'm doing this: for ($i=0;$i<$count;$i++) { $classObject = $classObjects[$i]; echo $i . " : " . memory_get_usage(true) . "\n"; $classDOM = $scraper->scrapeClassInfo($classObject,$termMap,$subjectMap); $class = $parser->parseClassInfo($classDOM);

StaleDataException: Attempted to access a cursor after it has been closed

喜欢而已 提交于 2019-12-05 02:46:31
问题 FATAL EXCEPTION: main Process: com.example.lenovo.phone, PID: 4885 android.database.StaleDataException: Attempted to access a cursor after it has been closed. at android.database.BulkCursorToCursorAdaptor.throwIfCursorIsClosed(BulkCursorToCursorAdaptor.java:64) at android.database.BulkCursorToCursorAdaptor.requery(BulkCursorToCursorAdaptor.java:133) at android.database.CursorWrapper.requery(CursorWrapper.java:186) at android.app.Activity.performRestart(Activity.java:5309) at android.app

A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION

南楼画角 提交于 2019-12-05 01:32:20
I have java 1.6, maven 2, activeMQ 5.5 and functional tests with testng. When I launch it in Idea then OK, but when I try to launch them with maven from console then process suspends after trying to send message via activeMQ and after some time crashes with the following error in log: # # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006d92f7a6, pid=5716, tid=7000 # # JRE version: 6.0_27-b07 # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.2-b06 mixed mode windows-amd64 compressed oops) # Problematic frame: # V [jvm

PHP: Call to undefined function mb_strlen() - on custom compiled PHP with mbstring enabled

让人想犯罪 __ 提交于 2019-12-04 21:24:43
问题 I have this custom compiled PHP (v5.3.3) with the following extensions enabled (via configure): ./configure --prefix=/usr/local/php5.3.3 --with-config-file-path=/usr/local/apache2/conf --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2 --with-curl=/usr/lib --with-curlwrappers --with-freetype-dir=/usr/local --with-gd=/usr/local --with-gettext --with-gmp --with-iconv=/usr/local --with-imap=/usr/local/imap2007e --with-imap-ssl --with-jpeg-dir=/usr/local/lib --with-kerberos --with-libxml-dir=

Inter-app communication in iOS using URL scheme

被刻印的时光 ゝ 提交于 2019-12-04 20:09:30
I have two test apps: App1 & App2. App1 takes String from the text field and triggers method: @IBAction func openApp(sender: AnyObject) { let url1 = ("app2://com.application.started?displayText="+textToSend.text!) let url2 = url1.stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) UIApplication.sharedApplication().openURL(NSURL(string: url2!)!) } Which actually opens App2 which has only label which should change to the text sent through the url, code is within AppDelegate.swift: func application(app: UIApplication, openURL url: NSURL, options: