<?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>My Science Is Better &#187; php</title>
	<atom:link href="http://www.myscienceisbetter.info/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.myscienceisbetter.info</link>
	<description></description>
	<lastBuildDate>Sat, 20 Mar 2010 16:16:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up Xdebug with Zend Server on Linux</title>
		<link>http://www.myscienceisbetter.info/setting-up-xdebug-with-zend-server-on-linux.html</link>
		<comments>http://www.myscienceisbetter.info/setting-up-xdebug-with-zend-server-on-linux.html#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:06:20 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xdebug]]></category>
		<category><![CDATA[zend server]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=134</guid>
		<description><![CDATA[Since our team work on different operating system, we switched for custom apache/php/mysql installs to Zend Server. Before everyone was using something different (the guys on windows were using XAMP, WAMP, on ubuntu i was using the packages in the repo and on the server we're using apache from cPanel) and applications were behaving a [...]]]></description>
			<content:encoded><![CDATA[<p>Since our team work on different operating system, we switched for custom apache/php/mysql installs to Zend Server. Before everyone was using something different (the guys on windows were using XAMP, WAMP, on ubuntu i was using the packages in the repo and on the server we're using apache from cPanel) and applications were behaving a differently according to the default settings for all those platforms.</p>
<p>So we decided to install Zend Server  CE as it has more or less the same settings over different platforms.  I've had some bad experiences installing ZSCE on a system that already had apache installed via apt, but after a clear install of Karmic, ZF was running like a charm. The install process described in the <a href="http://files.zend.com/help/Zend-Server-Community-Edition/deb_installation.htm">online documentation</a> works great.</p>
<p>After install is done, make sure to symlink php, pecl, pear and phpize so you can access them system  wide:</p>
<pre class="brush: bash;">
sudo ln -s /usr/local/zend/bin/zendctl.sh /usr/sbin/zendctl
sudo ln -s /usr/local/zend/bin/pear /usr/sbin/pear
sudo ln -s /usr/local/zend/bin/pecl /usr/sbin/pecl
sudo ln -s /usr/local/zend/bin/php /usr/sbin/php
sudo ln -s /usr/local/zend/bin/phpize /usr/sbin/phpize
</pre>
<p>At this point you should be able to run php -i in terminal and the phpinfo will be displayed.</p>
<p>Next step is to install xdebug via pecl by running: </p>
<pre class="brush: bash;">sudo pecl install xdebug</pre>
<p>If all went well you should have the xdebug library located at /usr/local/zend/lib/php_extensions/xdebug.so . If you don't have it there, then something went wrong and you should NOT continue reading. This issue must be sorted first.</p>
<p>Next you need to comment out the 1st line of /usr/local/zend/etc/conf.d/debugger.ini so it looks like this:</p>
<pre class="brush: bash;">
#open editor
gksu gedit /usr/local/zend/etc/conf.d/debugger.ini

# this is how the 1st two lines should look afterwards
; register the extension to be loaded by Zend Extension Manager
;zend_extension_manager.dir.debugger=/usr/local/zend/lib/debugger
</pre>
<p>Xdebug needs to be loaded before Zend Extension Manager, that's why you need to add the following line just on top of the /usr/local/zend/etc/ext.d/extension_manager.ini</p>
<pre class="brush: bash;">
#open the editor
gksu gedit /usr/local/zend/etc/ext.d/extension_manager.ini

#add this line on 1st line:
zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so

#save the file
</pre>
<p>Restart zend server by running:</p>
<pre class="brush: bash;">
sudo /etc/init.d/zend-server restart
</pre>
<p>You can check if xdebug is working like so:</p>
<pre class="brush: bash;">
php -i |grep xdebug
</pre>
<p>The output should be something similar to this:</p>
<pre class="brush: bash;">
xdebug
xdebug support =&gt; enabled
xdebug.auto_trace =&gt; Off =&gt; Off
xdebug.collect_includes =&gt; On =&gt; On
xdebug.collect_params =&gt; 0 =&gt; 0
xdebug.collect_return =&gt; Off =&gt; Off
xdebug.collect_vars =&gt; Off =&gt; Off
xdebug.default_enable =&gt; On =&gt; On
xdebug.dump.COOKIE =&gt; no value =&gt; no value
xdebug.dump.ENV =&gt; no value =&gt; no value
xdebug.dump.FILES =&gt; no value =&gt; no value
xdebug.dump.GET =&gt; no value =&gt; no value
xdebug.dump.POST =&gt; no value =&gt; no value
xdebug.dump.REQUEST =&gt; no value =&gt; no value
xdebug.dump.SERVER =&gt; no value =&gt; no value
xdebug.dump.SESSION =&gt; no value =&gt; no value
xdebug.dump_globals =&gt; On =&gt; On
xdebug.dump_once =&gt; On =&gt; On
xdebug.dump_undefined =&gt; Off =&gt; Off
xdebug.extended_info =&gt; On =&gt; On
xdebug.idekey =&gt; mimir =&gt; no value
xdebug.manual_url =&gt; http://www.php.net =&gt; http://www.php.net
xdebug.max_nesting_level =&gt; 100 =&gt; 100
xdebug.profiler_aggregate =&gt; Off =&gt; Off
xdebug.profiler_append =&gt; Off =&gt; Off
xdebug.profiler_enable =&gt; Off =&gt; Off
xdebug.profiler_enable_trigger =&gt; Off =&gt; Off
xdebug.profiler_output_dir =&gt; /tmp =&gt; /tmp
xdebug.profiler_output_name =&gt; cachegrind.out.%p =&gt; cachegrind.out.%p
xdebug.remote_autostart =&gt; Off =&gt; Off
xdebug.remote_enable =&gt; Off =&gt; Off
xdebug.remote_handler =&gt; dbgp =&gt; dbgp
xdebug.remote_host =&gt; localhost =&gt; localhost
xdebug.remote_log =&gt; no value =&gt; no value
xdebug.remote_mode =&gt; req =&gt; req
xdebug.remote_port =&gt; 9000 =&gt; 9000
xdebug.show_exception_trace =&gt; Off =&gt; Off
xdebug.show_local_vars =&gt; Off =&gt; Off
xdebug.show_mem_delta =&gt; Off =&gt; Off
xdebug.trace_format =&gt; 0 =&gt; 0
xdebug.trace_options =&gt; 0 =&gt; 0
xdebug.trace_output_dir =&gt; /tmp =&gt; /tmp
xdebug.trace_output_name =&gt; trace.%c =&gt; trace.%c
xdebug.var_display_max_children =&gt; 128 =&gt; 128
xdebug.var_display_max_data =&gt; 512 =&gt; 512
xdebug.var_display_max_depth =&gt; 3 =&gt; 3
</pre>
<p>Note the xdebug support => enabled on line 2.</p>
<p>Hope that helps <img src='http://www.myscienceisbetter.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/setting-up-xdebug-with-zend-server-on-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to update your Twitter status using Zend Framework</title>
		<link>http://www.myscienceisbetter.info/how-to-update-your-twitter-status-using-zend-framework.html</link>
		<comments>http://www.myscienceisbetter.info/how-to-update-your-twitter-status-using-zend-framework.html#comments</comments>
		<pubDate>Tue, 22 Sep 2009 09:30:20 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[zend_service_twitter]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=91</guid>
		<description><![CDATA[After reading the NetTuts tutorial on how to update your Twitter status using CodeIgniter, I wanted to show how to update your Twitter status using Zend Framework.
For this tutorial you need to install Zend Framework and Zend_Tool first.
Step 1: setup apache vhost by creating the /etc/apache2/sites-available/twitter as follows:

&#60;VirtualHost *:80&#62;

    ServerAdmin romeo.cioaba@spotonearth.com
  [...]]]></description>
			<content:encoded><![CDATA[<p>After reading the NetTuts tutorial on how to <a href="http://net.tutsplus.com/tutorials/php/how-to-update-your-twitter-status-with-codeigniter/" target="_blank">update your Twitter status using CodeIgniter</a>, I wanted to show <a title="How to update your Twitter status using Zend Framework" href="http://www.myscienceisbetter.info/how-to-update-your-twitter-status-using-zend-framework.html">how to update your Twitter status using Zend Framework</a>.</p>
<p>For this tutorial you need to <a title="Install Zend Framework and Zend_Tool using PEAR on Ubuntu" href="http://www.myscienceisbetter.info/install-zend-framework-and-zend_tool-using-pear-on-ubuntu.html">install Zend Framework and Zend_Tool</a> first.</p>
<p>Step 1: setup apache vhost by creating the /etc/apache2/sites-available/twitter as follows:</p>
<pre class="brush: bash;">
&lt;VirtualHost *:80&gt;

    ServerAdmin romeo.cioaba@spotonearth.com
    DocumentRoot /home/mimir/Zend/workspaces/DefaultWorkspace7/twitter
    ServerName twitter.dev
    ServerAlias www.twitter.dev
    ErrorLog /home/mimir/Zend/workspaces/DefaultWorkspace7/logs/twitter_error_log
    CustomLog /home/mimir/Zend/workspaces/DefaultWorkspace7/logs/twitter_access_log combined

    &lt;Directory &quot;/home/mimir/Zend/workspaces/DefaultWorkspace7/twitter/&quot;&gt;
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
    &lt;/Directory&gt;

&lt;/VirtualHost&gt;
</pre>
<p>You will need to change the DocumentRoot and Directory directives to match your configuration.</p>
<p>Step 2: add twitter.dev to your hosts file:</p>
<pre class="brush: bash;">
127.0.0.1	twitter.dev www.twitter.dev
</pre>
<p>Step 3: create the Zend Framework project</p>
<pre class="brush: bash;">
# i switch to my Zend Studio workspace, where apache is reading his sites from:
# cd Zend/workspaces/DefaultWorkspace7/
zf create project twitter
</pre>
<p>Step 4: restart apache</p>
<pre class="brush: bash;">
sudo /etc/init.d/apache2 restart
</pre>
<p>At this point you should have a default Zend Framework project that you can browse at http://twitter.dev/public/. How let's change our status <img src='http://www.myscienceisbetter.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Replace the content of IndexController with the following:</p>
<pre class="brush: php;">
&lt;?php
class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        // we create the form
        $updateForm = new Zend_Form();

        $status = new Zend_Form_Element_Text('status');
        $status-&gt;setLabel('New Twitter Status')
               -&gt;setRequired(true)
               -&gt;addFilter('StripTags')
               -&gt;addFilter('StringTrim')
               -&gt;addValidator('NotEmpty');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit-&gt;setLabel('Update');

        $updateForm-&gt;addElements(array($status, $submit));

        // we send the form to the view
        $this-&gt;view-&gt;updateForm = $updateForm;

        // we check if there was any POST
        if ($this-&gt;getRequest()-&gt;isPost()){
            $formData = $this-&gt;_request-&gt;getPost();
            // checking if the form data is valid (if we have a new status or not)
            if ($this-&gt;view-&gt;updateForm-&gt;isValid($formData)){
                // our form is valid, we can update our status
                $twitterStatus = $formData['status'];

                $twitter = new Zend_Service_Twitter('myusername', 'mypassword');
                $response = $twitter-&gt;status-&gt;update($twitterStatus);
            }
        }

    }

}
</pre>
<p>Also replace the view for the index action of IndexController with:</p>
<pre class="brush: php;">

&lt;h1&gt;Welcome to the Twitter Update Tutorial&lt;/h1&gt;

&lt;?php echo $this-&gt;updateForm?&gt;
</pre>
<p>TADA! You can now check your twitter account and see that twitter status is updated every time you submit the form -:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/how-to-update-your-twitter-status-using-zend-framework.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install Zend Framework and Zend_Tool using PEAR on Ubuntu</title>
		<link>http://www.myscienceisbetter.info/install-zend-framework-and-zend_tool-using-pear-on-ubuntu.html</link>
		<comments>http://www.myscienceisbetter.info/install-zend-framework-and-zend_tool-using-pear-on-ubuntu.html#comments</comments>
		<pubDate>Tue, 22 Sep 2009 08:46:57 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[zend_tool]]></category>

		<guid isPermaLink="false">http://www.myscienceisbetter.info/?p=87</guid>
		<description><![CDATA[I work every day with Zend Framework and the easiest way i find to install it is by using the PEAR packages offered by the betta channel ZF Campus
Here is what you have to do install Zend Framework and Zend_Tool using PEAR on Ubuntu:

sudo pear channel-discover pear.zfcampus.org
sudo pear install zfcampus/zf
# for some reason the installer [...]]]></description>
			<content:encoded><![CDATA[<p>I work every day with <a title="Zend Framework" href="http://www.myscienceisbetter.info/category/zend-framework">Zend Framework</a> and the easiest way i find to install it is by using the PEAR packages offered by the betta channel <a title="ZF Campus" href="http://pear.zfcampus.org/" target="_blank">ZF Campus</a></p>
<p>Here is what you have to do install <a title="Install Zend Framework and Zend_Tool using PEAR on Ubuntu" href="http://www.myscienceisbetter.info/install-zend-framework-and-zend_tool-using-pear-on-ubuntu.html">Zend Framework and Zend_Tool using PEAR on Ubuntu</a>:</p>
<pre class="brush: bash;">
sudo pear channel-discover pear.zfcampus.org
sudo pear install zfcampus/zf
# for some reason the installer does not correctly link the zf.php and Zend_Tool won't work
# so we need to setup a symlink
sudo ln -s /usr/share/php/zf.php /usr/bin/zf.php
</pre>
<p>That's it! You can now test your install:</p>
<pre class="brush: bash;">
zf show version
</pre>
<p>In my care the output was this one:</p>
<pre class="brush: bash;">
mimir@orion:~$ zf show version
Zend Framework Version: 1.9.2
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/install-zend-framework-and-zend_tool-using-pear-on-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse plugins written in PHP?</title>
		<link>http://www.myscienceisbetter.info/eclipse-plugins-written-in-php.html</link>
		<comments>http://www.myscienceisbetter.info/eclipse-plugins-written-in-php.html#comments</comments>
		<pubDate>Thu, 22 Jan 2009 01:20:00 +0000</pubDate>
		<dc:creator>Romeo Adrian Cioaba</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.myscienceisbetter.info/?p=24</guid>
		<description><![CDATA[On another Eclipse related news, i have noticed today the GSOC 2009 ideas for eclipse. Although all the ideas are interesting, what catched my view was "Write Eclipse plug-ins in PHP
" through e4.
e4 is the community effort for building the next generation of the Eclipse Platform. The project has three principle aims:

 Simplify the Eclipse [...]]]></description>
			<content:encoded><![CDATA[<p>On another <a href="http://www.eclipse.org/">Eclipse</a> related news, i have noticed today the <a href="http://wiki.eclipse.org/Google_Summer_of_Code_2009_Ideas">GSOC 2009 ideas for eclipse</a>. Although all the ideas are interesting, what catched my view was "Write Eclipse plug-ins in PHP<br />
" through e4.</p>
<blockquote><p><strong>e4</strong> is the community effort for building the next generation of the Eclipse Platform. The project has three principle aims:</p>
<ul>
<li> <strong>Simplify the Eclipse programming model:</strong> This will<br />
reduce development and maintenance costs and enable a larger developer<br />
community to leverage the platform in their own Eclipse-based<br />
applications.</li>
<li> <strong>Enable the platform for use on emerging web-based runtime technologies:</strong><br />
This will ensure the platform remains a compelling and viable<br />
application framework in a rapidly changing web technology landscape,<br />
and it will allow e4-based applications to leverage web technologies,<br />
while remaining insulated from specific technology choices that may<br />
quickly become obsolete.</li>
<li> <strong>Broaden participation in development of the platform:</strong><br />
This reduces the risks associated with building on a platform largely<br />
funded from a single source. Having a large and diverse group of<br />
commercial backers, will ensure the platform remains vibrant and viable<br />
over the long term.</li>
</ul>
<p>Please refer to the <a class="external text" title="http://www.eclipse.org/proposals/e4" rel="nofollow" href="http://www.eclipse.org/proposals/e4">project proposal</a> for more information, including the initial list of committers. The e4 project summary page is <a class="external text" title="http://www.eclipse.org/projects/project_summary.php?projectid=eclipse.e4" rel="nofollow" href="http://www.eclipse.org/projects/project_summary.php?projectid=eclipse.e4">here</a>.</p></blockquote>
<p>I'm really interested to see what comes out of that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.myscienceisbetter.info/eclipse-plugins-written-in-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
