Since we had the
"apc delivering wrong page error". As for now, according to apc maintainer g0paz we have a fix candidate.
Looks like the team php5, apache2, apc aint perfect. Some qutes from a chat log. I hope g0paz doesnt mind .
remove the sapi_stat() call and see if it works out fine
that means. If you use apache2 and a sapi handler for php5 just
comment line #759 in apc_cache.c
Hell yeah.
One remark: The problem seems to be i conjunction with applications that work via index.php, mod_rewritten or not.
Eclox is a simple doxygen frontend plug-in for eclipse. It aims to provide a slim and sleek integration of the code documentation process into eclipse.
from http://home.gna.org/eclox/
yehaaa ;)
silly, but the zend rest server does not serialize nested arrays ... so i came up with a little fix (for the .7.0 incubator):
--- library/Zend/Rest/Server.php 2007-03-07 11:18:03 UTC (rev 39)
+++ library/Zend/Rest/Server.php 2007-03-07 12:23:40 UTC (rev 40)
@@ -199,7 +199,7 @@
}
$method = $function->getName();
-
+
if ($class) {
$xml = "<$class generator='zend' version='1.0'>";
$xml .= "<$method>";
@@ -222,7 +222,15 @@
if (ctype_digit((string) $key)) {
$key = 'key_' . $key;
}
- $xml .= "<$key>$value</$key>";
+ if (is_array($value))
+ {
+ $xml .= "<$key>" . $this->_to_xml($value). "</$key>";
+ }
+ else
+ {
+ $xml .= "<$key>$value</$key>";
+ }
+
}
if (!$has_status) {
@@ -236,6 +244,21 @@
return $xml;
}
+
+ function _to_xml($data)
+ {
+ $xml = '';
+ foreach ($data as $key => $value) {
+ if (is_array($value))
+ {
+ $xml .= _to_xml($value);
+ continue;
+ }
+ $xml .= '<' . $key . '>' . $value . '</' . $key . '>';
+ }
+ return $xml;
+ }
+
/**
* Handle a single value
*
Rant: I killed the experimental usage if PHPUnit and will rewrite ALL my tests to Simpletest (again).
Why?
I seem way to stupid to follow the guides for test grouping and was not able to get it running. I am very sorry, after some multiple thousand tests in PHP, Python and some in Java it must be possible to use the test runner and all its aspects w.o. getting a degree in informatics. One point may be using a framework with proper error messages:
Catchable fatal error: Argument 1 passed to PHPUnit_Framework_TestSuite::addTest() must implement interface PHPUnit_Framework_Test, string given, called in /home/mruser/public_html/xe2zend/tests/Tpdb/AllTests.php on line 26 and defined in /usr/share/php/PHPUnit/Framework/TestSuite.php on line 234
The test runs out of the box but does not when grouped, the manual has nothing to tell me neither has google ;)
Since Simpletest actually dies w.o. any error message when checking for Exceptions actually, there seems nothing left than cheating a bit with simpletest and use Marcus Bakers trick to test on Exceptions ;) (Thats why i wanted to change to PHPUnit)
function test...() {
try {
// throw here.
} catch (Exception $e) {
}
$this->fail('This should have thrown');
}
OMFG ... thank good its friday (and i have to go to work 2morrow) G*
I started playing spring and found out that i had absolutely no chance against the people on the net. I simply didnt understood how the units and eco system worked.
After a while of beeing bashed in the online mode i started playing Spring versus the AI's that are available on the net.
After a while i found out that the AI's learn while beeing used, so i thought about a nice way to train the AI's:
Let the play against each other
After a while i started to let different AI's Play against each other and found out that there are different bugs in different AI's.
So now ill start posting my results here and when i have enough matches and data I'll start the
SPRING AI LEAGUE
- diffent maps to be played
- 2 matches per map (changing start pos)
- winner is who whiped the enemy completely off the map (3 pts)
- if there is a rest of the enemy station its a draw (1 pts)
Ill post noticable here in the blog
I have a new job and now I am working at
chip.de where I am responsible for the development of a subproject for the website.
We are a team of 5 developers and have a backoffice/sales team that outnumbers us by the factor 2. So far so good. From the technical point of view it's a interesting thing here:
- the it website with the most pi's in germany
- a large webfarm where our application runs in
- a IT department that is 50% of teh company ;)
- a lot of php coding people
One of my first jobs is a prototype project that should help us deciding how and if we should develop a special sub site for the whole company. So far, this time it is up to me to decide the toolbox we are using. So far, there is a lot to choose, its a high load website application that must be able to deliver a lot of pi's a day.
- PHP5
- Mysql 4.x with PDO
- Smarty: because were already using it
- Zend Framework, because i do not like having glued together components like PEAR
- Simpletest, because i still likeit more than PHP-Unit (All Objects were doing for our selfes need to be unit-tested)
- Moo.fx (Javascritp Framework) for Ajax/Client Interactivity
Since it will be a effort to establish PHP5, UnitTesting, modern AJAX Principles, its surely interesting for all the readers of that blog. Illkeep you people Updated.
SCHWING .........
- more warnings dropped (php5)
- you can decide what to view while youre debugging
- open the files you debug while youre debugging
- Development gets faster, gtd
- see how your script really works instead looking for the needle inthe haystack
- avoid useless debug output in your script
This is just the result from a lot of work of my colleagues and my boss who conviced me to use it. What should i say ;) They where absolutely right.
This extension pops up an alert dialog to warn chrome and extension developers about one particular type of leak. It warns when chrome windows close but leave other code pointing at their JavaScript objects.
https://addons.mozilla.org/firefox/2490/I dont have much time to write .. but it works ;) it even finds memleaks in mozilla ;) So far a cool tool at all .. something we needed before but it didt exist .. now it does.
As i developed javascript and Ajax Applications in the last year i have use several really good tools that helped me with a fast and clean development of code. Some of them ill name here and now.
Firefox Browser
The Firefox Browser is the best browser for developers and is needed for most of the tools and plugins described here. Its standard compilant, so if youre developing for xbrowser compatible Apps, you better start with firefox comapt and the move towards InternetExplorer
get Firefox hereFire BugShipped as a Plugin for Firefox, firebug helps you look into your application, some features:
- Status bar icon shows you when there is an error in a web page
- A console that shows errors from JavaScript and CSS
- Log messages from JavaScript in your web page to the console (bye bye "alert debugging")
- An JavaScript command line (no more "javascript:" in the URL bar)
- Spy on XMLHttpRequest traffic
- Inspect HTML source, computed style, events, layout and the DOM
A Must have if you code javascript and like to know what you Application is doing NOW ;)
get Firebug HereWeb Developer ToolbarShares some Features with firebug, but most of them are unique. This toolbar has the following Features
- cookies, ( view, edit, delete)
- css (disable, inplace edit, borders around boxes)
- forms (copletition, show form vars, convert to get / post)
- images (disable, infos etc)
- informations on all elements on the page
- outline elements
- zoom in and out
I guess i saved miriads of time since i use that one
get the Tolbar hereSelenium IDE Webtester
Tired of doing all the same click and test workflow all the day ? Wanna concentrate on coding ? Usethe Seleium IDE to record ypour clicks on the Application and replay whenever you need them ...
Links
OpenQA Selenium IDE Driven selenium reference Story about SeleniumJSeclipse by InteraktNo need to say more than the homepage stats, its simply the best js editor i have stumeled upon:
JSEclipse is the the best and most popular Javascript plugin for the Eclipse environment. Its benefits are visible from the simplest tasks like editing small sections of code for your site to the more complex ones like working with the next big AJAX library or developing plugins for a product that embeds JavaScript like Dreamweaver or Photoshop.get JSEclipseSo have fun and get to the sun instead of using the wrong tools and waste time ;)
Seeing Sebastian Bergmann on the PHPUG Munich, presenting PHP-Unit2 makes me partly Happy. I am not this far away from the PHP Test thing as i thought.
I guess i need to work a bit more into mock objects and my tutorial on functional php software testing, that will enlight people a bit more practically, and ostly it is thought to enlight myself on first hand, but why not tell that stuff to others then ;)