<?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>action online&#187; Search Results    forcetype</title>
	<atom:link href="http://www.actiononline.biz/search/forcetype/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://www.actiononline.biz</link>
	<description>Technology &#038; Business blog of YDS Web Solution</description>
	<lastBuildDate>Fri, 03 Jun 2011 11:35:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Apache Recompiling with PHP4 to PHP5 Upgrade Problems</title>
		<link>http://www.actiononline.biz/web/php43-to-php520-upgrade-problems/</link>
		<comments>http://www.actiononline.biz/web/php43-to-php520-upgrade-problems/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 09:10:43 +0000</pubDate>
		<dc:creator>Benj Arriola</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://webgasm.actiononline.biz/server/2006/11/26/php43-to-php520-upgrade-problems/</guid>
		<description><![CDATA[This is an on going post as you read this right now, I will edit it as I go on. I have just upgraded my PHP4.4.1 to PHP5.2.0 on a cPanel server using the WHM Apache Update. So far I have encountered the following problems: AddType .html extensions for PHP &#8211; error 500. Problem: This [...]]]></description>
			<content:encoded><![CDATA[<p><em>This is an on going post as you read this right now, I will edit it as I go on.</em></p>
<p>I have just upgraded my PHP4.4.1 to PHP5.2.0 on a cPanel server using the <acronym title="Web Host Manager">WHM</acronym> Apache Update. So far I have encountered the following problems:</p>
<h3>AddType .html extensions for PHP &#8211; error 500.</h3>
<p><strong>Problem: </strong>This does not work anymore if you have this line in your .htaccess file.</p>
<p><code>AddType application/x-httpd-php .php .php4 .php3 .phtml .html .htm</code></p>
<p><strong>Solution: </strong>This will work. I looked at the httpd.conf file and checked how it was written in there.</p>
<p><code>AddHandler application/x-httpd-php .php .php4 .php3 .phtml .html .htm</code><br />
<code>AddType application/x-httpd-php .php</code><br />
<code>AddType application/x-httpd-php .php4</code><br />
<code>AddType application/x-httpd-php .php3</code><br />
<code>AddType application/x-httpd-php .phtml</code><br />
<code>AddType application/x-httpd-php .html</code><br />
<code>AddType application/x-httpd-php .htm</code></p>
<h3>OK, The document has moved here.</h3>
<p><strong>Problem: </strong>I have <a title="301 redirection using PHP" href="http://webgasm.actiononline.biz/seo/2006/05/15/301-redirect-pages-using-php/">PHP 301 Redirect pages</a>, in fact I use it on this blog too. And instead of the page just directing. It shows an intermediate page that says:</p>
<blockquote><p>OK<br />
The document has moved <u>here</u>.</p></blockquote>
<p>
A message like this will really appear if there is some code before the PHP redirection code. And I had none since it was the first thing in my WordPress template, all the way on top.</p>
<p>
<strong>Solution: </strong>In PHP5, it seems even having the header location code all the way on top, but is called by an include() or require() function, it will display the error message. So in my case where it was in a WordPress template, I took the code out and placed it on top of the main WordPress file. Disadvantage of this is, I will need to reinsert the code when a WordPress update comes out.</p>
<h3>allow_url_include is disabled by default</h3>
<p>If you have been using include() functions with actual absolute URLs with get include errors. And I have no plans on enabling it. They were disabled by default for security purposes. If you are having this problem with your scripts, instead of using:</p>
<p><code>include("http://www.domain.com/path/file.php");</code>
</p>
<p>Use this instead on a cPanel server:</p>
<p><code>include("/home/account_username/public_html/path/file.php");</code></p>
<h3>ZenPhoto does not seem to work</h3>
<p><strong>Problem: </strong>getGalleryIndexURL(); function is not working. We are not sure why and there seems like no one has been writing about it yet in the ZenPhoto forums.
</p>
<p><strong>Solution:</strong> This function should output the URL of the photo gallery index. In templates it is usually used in album.php and image.php files for the breadcrumb navigation. Probably not the best solution but since it only occurs twice in our template, we just hard coded the link to the gallery index.</p>
<h3>ForceType problems and other problems with Dew-Code phpLinks</h3>
<p><strong>Problem: </strong>A hosting client of mine using <a href="http://www.dew-code.com/">Dew-code phpLinks</a> had problems of the script not working. And I have found not only 1 problem but several.</p>
<p><strong>Problem with ForceType</strong>. The .htaccess file had this line:</p>
<p><code>ForceType application/x-httpd-php</code></p>
<p>Solution: Add SetHandler</p>
<p><code>SetHandler application/x-httpd-php</code><br />
<code>ForceType application/x-httpd-php</code></p>
<h3>$_SERVER[PATH_INFO] not supported by default</h3>
<p>
Here is what the PHP Manual has to say:</p>
<blockquote><p>cgi.fix_pathinfo: Provides real PATH_INFO/PATH_TRANSLATED support for CGI. PHP&#8217;s previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting this to 1 will cause PHP CGI to fix it&#8217;s paths to conform to the spec. A setting of zero causes PHP to behave as before. Default is zero. You should fix your scripts to use SCRIPT_FILENAME rather than PATH_TRANSLATED. </p></blockquote>
<p><strong>Solution:</strong> I became a fan of the PATH_INFO sometime early 2005 and has been using it for some time. But since PHP recommends not to use it anymore, instead of globally enabling it, I am going to modify all scripts to be more compliant to the new way of doing things. But then again, I barely have the time to rewrite everything. And I will just come up with a patch to the problem. thus I am going to use:</p>
<p><code>$_SERVER[PATH_INFO] = </code><br />
<code>substr($_SERVER[REQUEST_URI], strlen($_SERVER[PHP_SELF]));</code></p>
<p><s>Ok now back to discovering more problems, so far, I still have the ZenPhoto problem.</s></p>
<p>
<strong>UPDATE: </strong> Because of all these problems, I did a roll back to PHP4.4 and ran PHP5.2 on FastCGI and had Ruby on Rails enabled too. Thanks to <a href="http://tech.mikelopez.info/2006/11/30/ruby-on-rails-apache-fcgi-fastcgi-on-cpanel/" target="_blank">Mike on his PHP4/PHP5/RoR setup</a>.</p>
<div class="aizattos_related_posts"><span class="aizattos_related_posts_header" >Related Posts</span><ul><li><span class="aizattos_related_posts_title"><a href="http://www.actiononline.biz/business/how-many-customers-may-get-mad-during-the-reboot-of-my-server/" rel="bookmark" title="Permanent Link: How many customers may get mad during the reboot of my server?" >How many customers may get mad during the reboot of my server?</a></span><div class="aizattos_related_posts_excerpt">Sometimes bad things happen to servers. The more you host on a web server, the more potential proble...</div></li><li><span class="aizattos_related_posts_title"><a href="http://www.actiononline.biz/technology/are-chinese-hackers-really-chinese/" rel="bookmark" title="Permanent Link: Are Chinese Hackers really Chinese?" >Are Chinese Hackers really Chinese?</a></span><div class="aizattos_related_posts_excerpt">
There has been recent news tagging China as one of the leading countries who hack into US governme...</div></li><li><span class="aizattos_related_posts_title"><a href="http://www.actiononline.biz/web/enabling-wildcard-dns-on-cpanel-servers/" rel="bookmark" title="Permanent Link: Enabling Wildcard DNS on CPanel Servers" >Enabling Wildcard DNS on CPanel Servers</a></span><div class="aizattos_related_posts_excerpt">In some cases, you will want a subdomain to be the same as the homepage of a website. For example:
...</div></li><li><span class="aizattos_related_posts_title"><a href="http://www.actiononline.biz/blog/blogging-again/" rel="bookmark" title="Permanent Link: Blogging Again" >Blogging Again</a></span></li><li><span class="aizattos_related_posts_title"><a href="http://www.actiononline.biz/web/_pingme-_encloseme-headers-sent-wordpress-error/" rel="bookmark" title="Permanent Link: _pingme, _encloseme, headers sent WordPress Error" >_pingme, _encloseme, headers sent WordPress Error</a></span></li></ul></div><img src="http://www.actiononline.biz/?ak_action=api_record_view&id=227&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.actiononline.biz/web/php43-to-php520-upgrade-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

