<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Zend Framework on a shared host</title>
	<atom:link href="http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Tue, 13 Mar 2012 12:47:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: james</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-82196</link>
		<dc:creator>james</dc:creator>
		<pubDate>Sun, 09 Oct 2011 18:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-82196</guid>
		<description>Hi Rob,

Your solution did solved the referencing public facing files. But what about the hyperlink created by something like this: &lt;a href=&quot;url(array(&#039;controller&#039;=&gt;&#039;index&#039;,&#039;action&#039;=&gt;&#039;test&#039;));?&gt;&quot;&gt;Test Page ?

It seems the url did not include &#039;/public/&#039; in the above link.

Please advise.

Thanks
James</description>
		<content:encoded><![CDATA[<p>Hi Rob,</p>
<p>Your solution did solved the referencing public facing files. But what about the hyperlink created by something like this: &lt;a href=&quot;url(array('controller'=&gt;'index','action'=&gt;'test'));?&gt;"&gt;Test Page ?</p>
<p>It seems the url did not include '/public/' in the above link.</p>
<p>Please advise.</p>
<p>Thanks<br />
James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qin</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-43796</link>
		<dc:creator>qin</dc:creator>
		<pubDate>Tue, 23 Nov 2010 21:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-43796</guid>
		<description>Rob
Thanks for the quick reply.

I should have tried harder before posting next time :)

I lost track of while moving these files around.

Thanks,
Qin</description>
		<content:encoded><![CDATA[<p>Rob<br />
Thanks for the quick reply.</p>
<p>I should have tried harder before posting next time :)</p>
<p>I lost track of while moving these files around.</p>
<p>Thanks,<br />
Qin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-43794</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Tue, 23 Nov 2010 20:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-43794</guid>
		<description>qin,

I&#039;d try to use relative URLs for the images in the CSS file. The URL should be relative to the location of the CSS file.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>qin,</p>
<p>I'd try to use relative URLs for the images in the CSS file. The URL should be relative to the location of the CSS file.</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qin</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-43788</link>
		<dc:creator>qin</dc:creator>
		<pubDate>Tue, 23 Nov 2010 17:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-43788</guid>
		<description>Thank you so much for this post, it worked like a charm. My css and js file loads fine now. This is however one problem I can&#039;t seem to work around.

This is what I am trying to do in my global.css file to load a background image when I am working on my localhost:

background:url(&quot;/images/bg2.jpg&quot;) 

The above line will NOT work on shared host environment. The images folder resides in the public folder, which also has the index.php that starts everything.  

I have to change it to 
background:url(&quot;/public/images/bg2.jpg&quot;) in order for the image to load.

Is there anyway to modify the .htaccess file so that 
background:url(&quot;/images/bg2.jpg&quot;) will work just like on my localhost.

It would be nice if I don&#039;t have to keep 2 version of css files for localhost and remote server.

Thanks.</description>
		<content:encoded><![CDATA[<p>Thank you so much for this post, it worked like a charm. My css and js file loads fine now. This is however one problem I can't seem to work around.</p>
<p>This is what I am trying to do in my global.css file to load a background image when I am working on my localhost:</p>
<p>background:url("/images/bg2.jpg") </p>
<p>The above line will NOT work on shared host environment. The images folder resides in the public folder, which also has the index.php that starts everything.  </p>
<p>I have to change it to<br />
background:url("/public/images/bg2.jpg") in order for the image to load.</p>
<p>Is there anyway to modify the .htaccess file so that<br />
background:url("/images/bg2.jpg") will work just like on my localhost.</p>
<p>It would be nice if I don't have to keep 2 version of css files for localhost and remote server.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-35852</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Sat, 26 Jun 2010 01:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-35852</guid>
		<description>I&#039;ve set up my site according to the more current version of zf, and everything works on a shared host. However, the plugin is not being loaded.

Pics, code and details here:

http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/plugin-not-loading-4638.html</description>
		<content:encoded><![CDATA[<p>I've set up my site according to the more current version of zf, and everything works on a shared host. However, the plugin is not being loaded.</p>
<p>Pics, code and details here:</p>
<p><a href="http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/plugin-not-loading-4638.html" rel="nofollow">http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend-framework-2/plugin-not-loading-4638.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-35841</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 25 Jun 2010 16:59:47 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-35841</guid>
		<description>Hi,

I am using the configuration and directory structure from your book ZFIA.

I get the following error when using the above controller:

Fatal error: Call to a member function getResource() on a non-object in /var/www/html/aotf/library/Places/Controller/Plugin/UrlSetup.php  on line 7

It may be that I do not see an application.ini file.

Thus, I cannot do:

&quot;(This code assumes you have added a resources.view[] = &quot;&quot; to your application.ini)&quot;

Please advise. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am using the configuration and directory structure from your book ZFIA.</p>
<p>I get the following error when using the above controller:</p>
<p>Fatal error: Call to a member function getResource() on a non-object in /var/www/html/aotf/library/Places/Controller/Plugin/UrlSetup.php  on line 7</p>
<p>It may be that I do not see an application.ini file.</p>
<p>Thus, I cannot do:</p>
<p>"(This code assumes you have added a resources.view[] = "" to your application.ini)"</p>
<p>Please advise. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bert</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-35526</link>
		<dc:creator>Bert</dc:creator>
		<pubDate>Wed, 16 Jun 2010 20:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-35526</guid>
		<description>Hmm, the purifier destroyed the last code segment, but I think, you get the drift.</description>
		<content:encoded><![CDATA[<p>Hmm, the purifier destroyed the last code segment, but I think, you get the drift.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bert</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-35525</link>
		<dc:creator>Bert</dc:creator>
		<pubDate>Wed, 16 Jun 2010 20:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-35525</guid>
		<description>Hey Rob,
thanks for your solution.
I just noticed that it breaks the redirector.

So I refrained from giving the altered URL to the frontcontoller and applied a quick fix like the following:


        $frontController = Zend_Controller_Front::getInstance();
        $view = $frontController-&gt;getParam(&#039;bootstrap&#039;)-&gt;getResource(&#039;view&#039;);
        $baseUrl = $request-&gt;getBaseUrl();
        if (defined(&#039;RUNNING_FROM_ROOT&#039;)) {
            $baseUrl .= &#039;/public&#039;;
        }
		$view-&gt;baseUrlVar = $baseUrl;

... and than using $view-&gt;baseUrlVar in the view-scripts like that:

baseUrlVar ?&gt;/path/to/file

But I am guessing that there&#039;s a way more elegant solution out there.

Cheers, Bert</description>
		<content:encoded><![CDATA[<p>Hey Rob,<br />
thanks for your solution.<br />
I just noticed that it breaks the redirector.</p>
<p>So I refrained from giving the altered URL to the frontcontoller and applied a quick fix like the following:</p>
<p>        $frontController = Zend_Controller_Front::getInstance();<br />
        $view = $frontController-&gt;getParam('bootstrap')-&gt;getResource('view');<br />
        $baseUrl = $request-&gt;getBaseUrl();<br />
        if (defined('RUNNING_FROM_ROOT')) {<br />
            $baseUrl .= '/public';<br />
        }<br />
		$view-&gt;baseUrlVar = $baseUrl;</p>
<p>... and than using $view-&gt;baseUrlVar in the view-scripts like that:</p>
<p>baseUrlVar ?&gt;/path/to/file</p>
<p>But I am guessing that there's a way more elegant solution out there.</p>
<p>Cheers, Bert</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roch</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-35217</link>
		<dc:creator>Roch</dc:creator>
		<pubDate>Tue, 08 Jun 2010 21:56:17 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-35217</guid>
		<description>Do you know of anyway with htaccess to disable someone from using your domain to point to their own website on the same server? Ex: they use YOURDOMAIN.com to promote their PHISHING WEBSITE.COM by using this simple URL to send users : YOURDOMAIN.COM/~phishing/file.html

Any help would be greatly appreciated. Thanks</description>
		<content:encoded><![CDATA[<p>Do you know of anyway with htaccess to disable someone from using your domain to point to their own website on the same server? Ex: they use YOURDOMAIN.com to promote their PHISHING WEBSITE.COM by using this simple URL to send users : YOURDOMAIN.COM/~phishing/file.html</p>
<p>Any help would be greatly appreciated. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greffin</title>
		<link>http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/#comment-34948</link>
		<dc:creator>Greffin</dc:creator>
		<pubDate>Tue, 01 Jun 2010 10:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/?p=873#comment-34948</guid>
		<description>Hi Rob, can you give me some example code for index.php that calls the plugins view.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Rob, can you give me some example code for index.php that calls the plugins view.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

