<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Romiro &#187; PHP</title>
	<atom:link href="http://www.romiro.com/archives/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.romiro.com</link>
	<description>A jaunt into the realm of pessimistic optimism</description>
	<lastBuildDate>Wed, 15 Jul 2009 18:12:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Zend Studio IDE Schemes</title>
		<link>http://www.romiro.com/archives/15</link>
		<comments>http://www.romiro.com/archives/15#comments</comments>
		<pubDate>Sat, 24 Nov 2007 03:46:30 +0000</pubDate>
		<dc:creator>rrogers</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.romiro.com/archives/15</guid>
		<description><![CDATA[As per a request from a comment on a previous post I made on here, here&#8217;s a zip of the original Zend IDE themes, including the Ruby Blue theme that my other Eclipse theme was based off of. Download Zend IDE Themes]]></description>
			<content:encoded><![CDATA[<p>As per a <a href="http://www.romiro.com/archives/7#comment-13">request</a> from a comment on a previous post I made on here, here&#8217;s a zip of the original Zend IDE themes, including the Ruby Blue theme that my other Eclipse theme was based off of.<a href="http://www.romiro.com/wp-admin/upload.php?style=inline&amp;tab=browse-all&amp;post_id=15&amp;_wpnonce=8605b56c2f&amp;ID=16&amp;action=view&amp;paged" id="file-link-16" title="Zend IDE Themes" class="file-link text"> 			</a></p>
<p><a href="http://www.romiro.com/wp-content/uploads/2007/11/schemes.zip" title="Zend IDE Themes">Download Zend IDE Themes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.romiro.com/archives/15/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP, Windows, and the exec() function</title>
		<link>http://www.romiro.com/archives/13</link>
		<comments>http://www.romiro.com/archives/13#comments</comments>
		<pubDate>Thu, 23 Aug 2007 15:20:55 +0000</pubDate>
		<dc:creator>rrogers</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.romiro.com/archives/13</guid>
		<description><![CDATA[I've been developing a little web app that allows someone to remotely play MP3s by sending commands to a Windows server running Apache2.2, PHP5, and foobar2000 (the latter being the MP3 player) For some reason over the course of this week, all three installations of this app I have stopped working. The problem was coming [...]]]></description>
			<content:encoded><![CDATA[<p>I've been developing a little web app that allows someone to remotely play MP3s by sending commands to a Windows server running Apache2.2, PHP5, and <a href="http://foobar2000.org" title="foobar2000" target="_blank">foobar2000</a> (the latter being the MP3 player)</p>
<p>For some reason over the course of this week, all three installations of this app I have stopped working.  The problem was coming from PHP all of a sudden deciding that it wanted to wait for the execution of the program before finishing its process.  I'm still not sure why all three machines stopped working (I haven't touched the code for ~5 days until today) especially given that one is a Vista Ultimate x64, another is XP SP2 x86, and the main one being a Server 2003 box.</p>
<p>Anyway, the original way I was handling sending commands was using the Windows 'start' command to pass the actual program call.  Using 'start' allows you to run programs that won't necessarily close right after execution (ie foobar2000). Example of the old way:</p>
<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-3">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/exec"><span style="color:#000066;">exec</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'start &quot;&quot; /B &quot;c:program filesfoobar2000foobar2000.exe&quot;'</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
But as I said, it wasn't working anymore as PHP would hang on that particular host until I would manually RDP into the server and kill the foobar2000 process from the task manager.</p>
<p>After I went through as many different ways to stop this from happening, including creating a batch file that just ran foobar2000 and having that called by 'cmd.exe' which is then in turn called by 'start', I finally came up with something that worked thanks to a Russian web site that I couldn't understand save for the PHP examples:</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/pclose"><span style="color:#000066;">pclose</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/popen"><span style="color:#000066;">popen</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'start &quot;&quot; /B &quot;c:program filesfoobar2000.exe&quot;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#FF0000;">'r'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Basically, it uses popen() to actually open the program (as well as create a handle inside PHP) and then immediately release the handle with pclose().  Now I'm again happily sending commands to foobar2000.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.romiro.com/archives/13/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby Blue theme for Eclipse</title>
		<link>http://www.romiro.com/archives/7</link>
		<comments>http://www.romiro.com/archives/7#comments</comments>
		<pubDate>Sat, 19 May 2007 15:13:54 +0000</pubDate>
		<dc:creator>rrogers</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.romiro.com/archives/7</guid>
		<description><![CDATA[I have recently made the switch from using Zend IDE to Eclipse and PDT/Aptana for my jaunts into web development (read: every day of my career). While using Zend, I had ran across a post on the Zend Forums that listed a good chunk of different themes you could download and use in your Zend [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently made the switch from using Zend IDE to Eclipse and PDT/Aptana for my jaunts into web development (read: every day of my career).  While using Zend, I had ran across a <a href="http://www.zend.com/forums/index.php?t=tree&amp;th=3030&amp;S=3b925e9cd950bc350f59db0c1a42205d" target="_blank">post on the Zend Forums</a> that listed a good chunk of different themes you could download and use in your Zend environment.  My favorite out of the list was instantly the Ruby Blue theme, apparently from <a href="http://macromates.com/" target="_blank">TextMate</a> (although in my brief, brief time playing with TextMate, I never saw it as one of the options).  Regardless, it's an awesome theme if you're into lights-on-dark for your editing like I am.</p>
<p>After my switch I found out that it's either really difficult to do Google searches on Eclipse themes and styles, or that no one has really made much headway in that part of the IDE. (There is the <a href="http://drnicwilliams.com/2006/08/08/textmate-theme-for-radrails/">TextMate theme for RadRails</a> but I found it to be not exactly my cup of tea...I'm picky, sorry!).  So I tasked myself with an attempt at manually migrating the pretty colors from ZDE into Eclipse, and wouldn't you know it, the transition went pretty damn smoothly.</p>
<p align="center"><a href="http://www.romiro.com/wp-admin/upload.php?style=inline&amp;tab=browse&amp;post_id=7&amp;_wpnonce=72d7f5abf7&amp;ID=8&amp;action=view&amp;paged" id="file-link-8" title="PHP" class="file-link image">  			</a><a href="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-php.png" title="PHP"><img src="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-php.thumbnail.png" alt="PHP" /></a>    <a href="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-css.png" title="CSS"><img src="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-css.thumbnail.png" alt="CSS" /></a>  <a href="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-js.png" title="JavaScript"><img src="http://www.romiro.com/wp-content/uploads/2007/05/rubyblue-js.thumbnail.png" alt="JavaScript" /></a></p>
<p>To get these color styles into your own Eclipse, just download the .epf file and go to File -&gt; Import in Eclipse, choose General -&gt; Preferences, select the file, and import.  I recommend making a backup of your own preferences by following the same steps, only selecting Export instead of Import.  I stripped out some of the non-color related stuff, but in order to make sure I got everything, I left some of the stuff I wasn't sure about in there, so there may be a conflict if you have some of your own personal preferences (though I'm fairly sure I didn't do much to my settings besides changing tabs to spaces).</p>
<h3><a href="http://www.romiro.com/wp-content/uploads/2007/05/ruby_blue.zip" title="Eclipse Preferences File">» Eclipse Preferences File</a></h3>
<p>Also, there are settings for both Aptana's CSS/JS editor as well as the Webtools versions of those editors (as well as HTML for webtools).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.romiro.com/archives/7/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
