 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Tibo Beijen's Blog: Fixing mysqldump on Zend Server CE on OS X
by Chris Cornutt March 01, 2011 @ 11:50:58
Tibo Beijen has a new post today showing his method for fixing mysqldump on Zend Server CE running on an OS X platform. The default install throws a socket error when you try to dump a database using the command.
Inspecting the mysql configuration contained in /usr/local/zend/mysql/data/my.cnf confirmed that the section [client] showed the socket as returned by executing SHOW VARIABLES; from the mysql client: /usr/local/zend/mysql/tmp/mysql.sock Although it is possible to specify the socket by using mysqldump's --socket switch, that doesn't really seem a 'solution'.
As a real solution to the problem was to copy over the my.cnf file from the custom location Zend Server has it in to the default "/etc/my.cnf" with settings pointing to the correct MySQL socket.
voice your opinion now!
mysqldump zendserver osx socket error fix
Joshua Thijssen's Blog: Creating a traceroute program in PHP
by Chris Cornutt December 02, 2010 @ 13:09:07
Joshua Thijssen has a new post to his blog looking at taking a common unix tool - traceroute - and seeing if he could translate it into PHP where it could be called directly without the need for something like exec.
Today i was reading upon this wonderful article about writing a trace-route program in Python in 40 lines. Even though trace-route is one of the many tools i use on day to day basis, i never really got into writing a version myself (something I like to do just to gain knowledge how things works). So when I was reading this post, i thought, Python is nice, but is it possible to do it in PHP as well? The answer to that: yes and no..
His post introduces you to "traceroute" (including a bit on how it works) in case you're either not a unix user or haven't gone much past some of the basics of the operating system type. One issues he butted up against was problems with the socket extension in PHP and inconsistencies with the underlying connection types. Another is the limitation of the tool only working as the root superuser. He includes the actual code and some sample output if you'd like to try it for yourself.
voice your opinion now!
traceroute program socket issue
CatsWhoCode.com: How to easily monitor your web server using PHP
by Chris Cornutt February 08, 2010 @ 13:48:31
In a new post to the CatsWhoCode.com blog Jean-Babtiste Jung walks you through the creation of a simple monitoring script written using just PHP that can tell you if your web site is up and responsive.
In order to make sure that your website is always available to the public, you have to monitor it. In this tutorial, I'll show you how you can easily create a monitoring script that will check your website availability and send an email or sms alert to you if it isn't.
They have a snippet of code (about 15 lines long) with a function you can call to check a remote host's connection and check the returned data for a certain string. This can not only ensure that your site is responsive but also that it's not responding incorrectly. You could even use this to hit a certain monitoring page of your site to check for certain things (like database connection problems).
voice your opinion now!
monitor webserver tutorial socket
Christian Weiske's Blog: PHP Testfest Berlin 2009
by Chris Cornutt May 12, 2009 @ 12:05:46
Christian Weiske has posted about his experience at this year's TestFest in Belin (as hosted by the Berlin PHP User Group).
I spent the last weekend (may 09/10) on the PHP Testfest Berlin, organized by Till for the Berlin PHP Usergroup. Coming from Leipzig, I don't really know who of the other 8 people were from the user group and who not.
He mentions issues the group faced (OS X being difficult, PHP from CVS not compiling), the intro to testing and their first area of choice - gettext (which they got up to 98.8% coverage!). The second and third efforts were some work done on the intl and sockets extensions.
voice your opinion now!
testfest berlin testfest09 extension test gettext intl socket
DeveloperTutorials.com: Port Scanning and Service Status Checking in PHP
by Chris Cornutt April 08, 2009 @ 08:49:21
On the DeveloperTutorials.com site today there's a new tutorial showing the creation of a port scanner with PHP - a tool that, given some of the familiar ports that services (like web or email servers) run on, can check to see if they're responding.
While building web applications, it's often important to keep an eye on the other services running on your server. Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.
Their example makes a socket connection to the remote port to see if there's a valid hookup. The wrap this inside a loop for ports 1 through 1000 to see what ports are open and responding on your local machine (doing this on a remote machine is just asking for trouble).
Their full example defines some of the common ports in an array and loops to check on their status. It sets out a base you can build on top of with things like their suggestions - logging scan results, repoting downtime and running a service-specific task.
voice your opinion now!
port scan fsockopen socket http ftp pop3 check connection
ThinkPHP Blog: Comet in conjunction with a PHP socket server - server-client communication
by Chris Cornutt September 02, 2008 @ 08:41:55
In a new post to the ThinkPHP blog today there's a look at combining Comet with PHP to make a simple method for the client to talk back to the server outside the usual methods.
If a couple of users have opened the application there are already some hundred or thousand requests per second. The outcome of this is a big load for your server and a highly increased traffic - your server will in a senseless way be overloaded. In conclusion, our problem is the enormous amount of polling without knowing whether the server really wants to send a new push. Let's turn the initial situation around. And we get the solution to our problem: Comet.
With Coment, the model changes and the request is "cached" on the server-side automatically in a single Comet instance. Coordinate this with another recommendation of theirs, a PHP socket server, and you can do some pretty interesting things.
voice your opinion now!
communication socket server comet ajax push pull
|
Community Events
Don't see your event here? Let us know!
|