Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans:
Not Finding the Symbols
Dec 01, 2016 @ 15:58:22

In this new post to his site Derick Rethans about an issue that was discovered with the newer version of the PHP MongoDB driver dealing a JSON encoding/decoding error.

Yesterday we released the new version of the MongoDB Driver for PHP, to coincide with the release of MongoDB 3.4. Not long after that, we received an issue through GitHub titled "Undefined Symbol php_json_serializable_ce in Unknown on Line 0".

The driver makes use of the JSON extension's "JsonSerializable" interface to handle some of the BSON types (like binary data). They were surprised that, despite running their tests on a wide range of builds they never came up with this same issue, compiling them from source. The key here is that the JSON extension is bundled along with the binary when compiled this way however some linux distributions do things differently. They ship it as a separate module and, because this could potentially be missing, a JSON error like the one reported could occur. He goes on to talk about some specific examples from various distributions and the simple fix - ensure the JSON extension is loaded before the MongoDB driver is loaded in your installation. This prevents the JSON handling from being missing and the JSON-related error message from popping up.

tagged: mongodb driver undefined symbol error message extension troubleshoot

Link: https://derickrethans.nl/undefined-symbol.html

Debuggable Blog:
Supressing Errors in PHP
Jan 30, 2009 @ 17:14:58

Felix Geisendorfer has posted two new items to the Debuggable blog looking at suppressing errors in your applications - and no, that doesn't mean using the @ operator either.

As of late I am getting sick of some best practices I have taught myself. Never using the @-error suppressing operator quickly moving to the top of the list. Before you start crying out loud (I know you will), let me say this: I do not mean to encourage anybody to use the @-operator. Applying the practice herein introduced may result in permanent damage to your coding habits and could serve as a gateway behavior to writing shitty code.

He gives an example in the first post of a place where he failed to properly check to ensure an element existed before checking a element of it. The second post provides an interesting solution to the same problem - using empty on the element/subelement to check its existence.

tagged: suppress error empty isset check exist shutup operator symbol

Link:

Elizabeth Smith's Blog:
Fun with compiling - Gtk+, PHP-Gtk2, and MSVC
Dec 19, 2006 @ 20:34:00

Elizabeth Smith has a new post to her blog today covering some of the fun she's been having with compiling things like Gtk+ and PHP-Gtk2.

So I've been using microsoft visual studio (actually it's Visual C++ Express, but uses the same stuff behind the scenes) to work on getting things compiled on windows. PHP-Gtk2 allows for some nifty extensions, well at least on linux. So I've been working to get versions of libglade, scintilla, gtksourceview and mozembed working on windows. It's a long, slow process. Here's the deal so far.

She talks about her current situation (what's compiling and what's not) and the software that she's trying to get up and running. She also mentions a problem she's been having with an error message talking about "unresolved external symbols" she'll need to track down (or get some help on - anyone out there seen it?)

tagged: compiling phpgtk gtk msvc situation unresolved external symbol compiling phpgtk gtk msvc situation unresolved external symbol

Link:

Elizabeth Smith's Blog:
Fun with compiling - Gtk+, PHP-Gtk2, and MSVC
Dec 19, 2006 @ 20:34:00

Elizabeth Smith has a new post to her blog today covering some of the fun she's been having with compiling things like Gtk+ and PHP-Gtk2.

So I've been using microsoft visual studio (actually it's Visual C++ Express, but uses the same stuff behind the scenes) to work on getting things compiled on windows. PHP-Gtk2 allows for some nifty extensions, well at least on linux. So I've been working to get versions of libglade, scintilla, gtksourceview and mozembed working on windows. It's a long, slow process. Here's the deal so far.

She talks about her current situation (what's compiling and what's not) and the software that she's trying to get up and running. She also mentions a problem she's been having with an error message talking about "unresolved external symbols" she'll need to track down (or get some help on - anyone out there seen it?)

tagged: compiling phpgtk gtk msvc situation unresolved external symbol compiling phpgtk gtk msvc situation unresolved external symbol

Link:


Trending Topics: