<?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>Eoin O'Sullivan &#187; php</title>
	<atom:link href="http://www.eoinosullivan.ie/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eoinosullivan.ie</link>
	<description>Web Developer based in Dublin, Ireland</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:25:12 +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>How to pass parameters to a PHP file in a cron job</title>
		<link>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/</link>
		<comments>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 10:11:56 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eoinosullivan.ie/?p=82</guid>
		<description><![CDATA[This is just a quick tip but it annoyed the bejaysus out of me for about an hour. I was running the job in the following format: 00*** test_file.php?a=1&#038;b=2&#038;c=3 But an error was getting thrown saying that the input file, &#8230; <a href="http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is just a quick tip but it annoyed the bejaysus out of me for about an hour. I was running the job in the following format:</p>
<p><code>00*** test_file.php?a=1&#038;b=2&#038;c=3</code></p>
<p>But an error was getting thrown saying that the input file, test_file.php?a=1&#038;b=2&#038;c=3, could not be found. With some help from the Google machine, I found that the correct format should be:</p>
<p><code>00*** test_file.php 1 2 3</code></p>
<p>And in your PHP file you can use the $argv variable to get at the paramter values</p>
<p><code>$a = argv[1];<br />
$b = argv[2];<br />
$c = argv[3];</code></p>
<p>And that should do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symphony &#8211; Web Publishing System</title>
		<link>http://www.eoinosullivan.ie/symphony-web-publishing-system/</link>
		<comments>http://www.eoinosullivan.ie/symphony-web-publishing-system/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 00:27:41 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symphony]]></category>

		<guid isPermaLink="false">http://www.eoinosullivan.ie/index.php/symphony-web-publishing-system/</guid>
		<description><![CDATA[<a target="_blank" href="http://thebignoob.com">The big noob</a> is a website that I really like. It's the blog for the guys that created virb and purevolume. The content on their site is managed by <a target="_blank" href="http://21degrees.com.au/products/symphony/">symphony</a>, a customisable well designed web publishing system which I decided to have a look at. <a href="http://www.eoinosullivan.ie/symphony-web-publishing-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://thebignoob.com" target="_blank">The big noob</a> is a website that I really like. It&#8217;s the blog for the guys that created virb and purevolume. The content on their site is managed by <a href="http://21degrees.com.au/products/symphony/" target="_blank">symphony</a>, a customisable well designed web publishing system which I decided to have a look at.</p>
<p>Symphony was created by a small web development team operating out of the Gold Coast in Queensland, Australia. It&#8217;s free to use and having a template engine of pure XSLT appealed to me. From their website &#8211; &#8220;Symphony lets you create small blocks of XSLT code called utilities, which you can use as building blocks to construct your site&#8217;s pages. Due to the nature of XSLT, these utilities are highly reusable, so the next time you&#8217;re developing a website you&#8217;ll probably find you&#8217;ve already done half the work.&#8221;</p>
<p>I had a lot of issues installing the system, it took about 2 days in total. I run vista on my laptop and have apache and php installed and configured prior to this. When I ran the symphony install file, it said i was missing some components like libXSLT. Which is fair enough, as this is is listed in the requirements. I altered my php.ini file to load the libxslt library, restarted apache and the page loaded correctly. I was presented with a set of options for configuring the database, put in my default mysql settings, created a new db in mySQL and created an admin user. This is where I had a lot of issues. It seemed to install correctly and presented me with a login screen. I put in the username/password that I had selected and I got an error &#8211; invalid username. I was confused!! I ran a query on the symphony db to check the users in the db but it returned nothing. Empty table!!</p>
<p>After spending a few hours going through the php code I found that the sql queries were looking in tables prefixed with tbl_ but the tables in my db were prefixed with sym_. I changed the prefix, added my admin user directly into the mysql table and it worked, i could log in.</p>
<p>Next i found that my admin user didn&#8217;t have admin privileges, so i couldn&#8217;t create any pages. Back to the db, gave my user super privileges. Fixed. All options were available. But no pages were being displayed. I ran the default website but I was getting xslt errors. Strange, surely there should be some default home page or something that works out of the box.</p>
<p>And there is, but the install had tried to put them into tbl_pages instead of sym_pages. I found a whole bunch of sql statements in a workspace text file which showed that there should be 6 or 7 pages created by default. I grabbed the sql, replaced tbl_ with sym_ and executed the script. Fixed.</p>
<p>Next I created a new page, browsed to it and got a 404 error. God damn. Back to the product forum again (which is really good by the way). I had to make an alteration to the directory settings in my apache httpd.conf file and enabled mod_rewrite in php.ini &#8211; Fixed. Completely. It works 100%.</p>
<p>The sql table names was really the root of my issues. If they had installed correctly the majority of the issues listed above would not have happened. I&#8217;m not sure why that happened, maybe it was my fault but i just selected the default settings in the install file. The flip side though is that I became very familiar with the php code in symphony, and it&#8217;s good. The admin publishing system is really nice. it looks great, it&#8217;s easy to use and despite the installation issues I am impressed with the product and the xml,xslt idea is great. What&#8217;s really impressive is the debugging feature when you&#8217;re running a website. Append ?debug to a page name and you get to see the xml and xslt that&#8217;s formatting the page. VERY NICE!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eoinosullivan.ie/symphony-web-publishing-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

