 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Mark Hamlin's Blog: Debugging xdebug (tcp, dns, ubuntu, osx, vmware) ((all at once))
by Chris Cornutt August 31, 2011 @ 13:04:43
In a recent post to his blog Mark Hamlin talks about some of his difficulties in getting XDebug and Netbeans working together from an OSX machine hitting a Ubuntu server.
For the past 18 months working with PHP, i've primarily used alternatives, not out of preference, but because netbeans xdebug integration consistently failed me. It would (might) work with a remote apache, but would not play with scripts executed remotely from the command line. I could be fairly sure my xdebug config was sound as I no problems with MacGDB and PHPStorm whatsoever.
With a little more investigation, he discovered that it was the OSX firewall causing issues. He found that, with a new incoming connection came a confirmation box to approve the connection. This, of course, wasn't passed along to Netbeans so he never saw it. In the end, he set up a reverse SSH tunnel to bypass the firewall completely (command included).
voice your opinion now!
debug netbeans firewall xdebug ssh tunnel ubuntu osx
Derick Rethans' Blog: Remote Debugging PHP with a Firewall in the Way
by Chris Cornutt August 26, 2011 @ 11:24:17
Sometime debugging PHP applications isn't as easy as just pointing your IDE directly at the server and starting to work. Derick Rethans has a new post talking about one such situation, remote debugging with a firewall in between you and the remote machine with XDebug.
The PHP debugging extension Xdebug has "remote" debugging capabilities for single-step debugging PHP applications. This works by setting your favourite IDE into listening mode and instructing Xdebug (with one of the handy browser extensions for example) to initiate debugging. [...] There could however be a firewall in the way that prevents Xdebug connecting directly to your IDE's IP address. That can be because the network you are on employs NAT. [...] In this case, there is no way Xdebug can connect to your IDE's IP address and port. Or is there?
His alternative requires SSH access to the remote machine - building a tunnel from your local machine to the remote server XDebug can use to get around the firewall. He explains the shell command to set up the tunnel and, a more graphical way, through the Putty ssh/telnet client. A quick call to "netstat" can tell you if things are working correctly or not. All that's left then is to point your XDebug to the port on the localhost and you should be good to go on debugging.
voice your opinion now!
debugging firewall tutorial ssh tunnel xdebug ide
NetTuts.com: Managing Cron Jobs with PHP
by Chris Cornutt April 08, 2011 @ 12:39:30
New on NetTuts.com there's a tutorial about using cron with PHP and how to manage the jobs your server currently runs.
The cronTab, or "Cron Table", is a Linux system process / daemon which facilitates the scheduling of repetitive tasks thereby easing up our day to day routine. In this tutorial, we'll create a dynamic PHP class that, using a secure connection, provides us with a means to manipulate the cronTab!
They explain the cron format (time and script to run) and how to set up a crontab management class that uses the ssh extension for PHP to communicate with the remote server. Their class includes methods for setting up jobs, writing them out to the cron file, removing existing jobs and dropping the entire cron file at once.
voice your opinion now!
cronjob manage ssh tutorial
Mark Karpeles' Blog: PHP can do anything, what about some ssh?
by Chris Cornutt June 28, 2010 @ 13:38:18
In an effort to just about everything he can with PHP Mark Karpeles has posted an article about how he created a SSH server in PHP with most (not quite all) of the functionality of some of its counterparts.
You probably know SSH at least by its name. It's a of secure telnet replacement which also allows many other things such as port forwarding, remote file management (with sftp) and more. With PHP I could write a fully working SSH server in only 3 days. [...] My goal when writing this was to provide a replacement for the FTP protocol for the customers of my hosting service.
He lists the extensions used to create the extension - OpenSSL, mcrypt, hash and (the most important) GMP as well as a link to the source if you'd like to try it out yourself.
voice your opinion now!
openssl mcrypt has gmp ssh server
Till's Blog: PEAR & Plesk
by Chris Cornutt December 10, 2008 @ 09:34:15
In this new post to till's blog, he looks at a method for setting up PEAR on a Plesk system.
Now running any config interface is a blog entry by itself and when I say Plesk, I should also mention confixx and cpanel. And while I have a strong dislike for all them, let me focus on Plesk for now. This is not a copy'n'paste howto, so make sure you double-check all steps involved. With little knowledge, you should be able to to apply all instructions to any other control panel, all you need is SSH access to the server.
The process includes two different sections - why your PEAR installation may not be working and how to install the PEAR packages (on any system supporting a package manager). Command line calls and configuration options are also included.
voice your opinion now!
pear plesk install troubleshoot package controlpanel ssh
Developer Tutorials Blog: Port Scanning and Service Status Checking in PHP
by Chris Cornutt June 10, 2008 @ 08:46:08
The Developer Tutorials blog has posted a new tutorial covering how to scan ports and checking a remote service's status with PHP.
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.
They show how to check a remote instance (a socket open with a timeout) and how to run through a list of ports, looping from one to one-thousand and running an fsockopen on each. They make a sample script to show these two combined - a simple page that loops through the common protocols (HTTP, FTP, SSH, etc) and checks to see if the remote machine is running something on that port.
voice your opinion now!
port scan service status check fsockopen http ftp ssh
Kevin van Zonneveld's Blog: Make SSH connections with PHP
by Chris Cornutt July 27, 2007 @ 09:33:00
Kevin van Zonneveld has a new article posted to his blog that works through a method for making ssh connections from inside of PHP:
Not everyone knows about PHP's capabilities of making SSH connections and executing remote commands, but it can be very useful. I've been using it a lot in PHP CLI applications that I run from cronjobs, but initially it was a pain to get it to work. The PHP manual on Secure Shell2 Functions is not very practice or thorough for that matter, so I would like to share my knowledge in this how to, to make it a little less time consuming setting this up.
His platform of choice for this tutorial is Debian/Ubuntu, that you're already running PHP (and that it's PHP5) and that you know something about server administration. NExt up is the package installation - a simple matter with the help of aptitude and the compiling of the libssh2 libraries. All that's left is to make the module to include and add it to the php.ini.
Some sample code is included - one bit that shows off the execute method and the other, the shell method.
voice your opinion now!
ssh connection tutorial libssh2 package linux php5 ssh connection tutorial libssh2 package linux php5
|
Community Events
Don't see your event here? Let us know!
|