This text is replaced by the Flash movie.

Archive for the ‘PHP’ Category

Module Title not showing up Joomla 1.5(fixed)

July 28th, 2008
  I encountered this problem, when I am upgrading a template from 1.0 to 1.5... I thought this was only a minor problem, until 3 hours past and I still couldn't fix it... I checked everything on the admin, settings, parameters, and even global configuration. Until I rechecked the module param at the template  <jdoc:include type="modules" name="user2"  /> and I try putting style... first a blank one... it doesn't work, then I try putting style="xhtml" and now the title of module shows

<jdoc:include type="modules" name="user2"  style="xhtml"  />

Virtue Mart Bug

December 22nd, 2007
When Adding Category, Product or Just change configuration, the administration page automatically Logs me out, I tried to Google for the solution which is easy to find... and visited the results which are forum of virtuemart but it takes me 3 forums before I finally got to the solution page.


Virtue Mart Session fix

Changes to be made:

administrator/index2.php
BEFORE
########
103 doGzip();
104
105 // if task action is 'save' or 'apply' redo session check
106 if ( $task == 'save' || $task == 'apply' ) {
107 $mainframe->initSessionAdmin( $option, '' );
108 }
#########



AFTER
########
102 // if task action is 'save' or 'apply' redo session check
103 if ( $task == 'save' || $task == 'apply' ) {
104 $mainframe->initSessionAdmin( $option, '' );
105 }
106 doGzip();
########

Joomla SEF and IIS URL rewrite

December 3rd, 2007

Using ISAPI 3.0 over IIS 6.0 for rewriting URL to Search Engine Friendly URL, I experienced this problem that links return 404 error when clicking any links on joomla. After googling for 3 hours, I found the right solution, which requires to hack the code.

.htaacess code
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php

This is because Joomla expects original URL in the REQUEST_URI server variable, but in IIS this variable is not available and cannot be emulated.
With ISAPI_Rewrite we store original request in HTTP_X_REWRITE_URL. You can then assign value of this variable in PHP code to the REQUEST_URI variable

at /components/com_sef/sef.php
// IIS patch.
if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}

I append this code over sef.php by the way I'm using the component sh404SEF which I guess is the best for joomla I have tried OpenSEF (this component I guess is not continue for development) and ArtioSEF.

Shifting from IIS 6 to Apache

May 20th, 2007
This week I was so very busy I have been put on a task where I am going to install on a dedicated server an Apache... this apache server must run on different port so while testing the new server we wont affect the current web server running which is IIS 6 and the vistors of the sites can still visit it. Where shifting cause of the rewrite problems, in IIS the company used ISAPI rewrite it enables the IIS to rewrite URLs o browsers... this is so important cause in SEO search engine prefer a clean URL. The problem is some syntax in htaccess mod_rewrite were not supported by ISAPI rewrite, we are using Joomla for CMS cause I know it a lot I installed OpenSEF an Excellent Component that does SEF magic for joomla. In apache this is so easy to handle but in IIS for me it is so hard so my boss given up and we decidedly to shift server... I have encounters lot of problem still shifting first running asp .net on apache, at first I installed Apache 2.2 I notice I could not install the mod_aspdotnet module... after throughly researching the cause... I need to downgrade to Apache 2.0 and It works. So I got everything working with dotNet but it doesnt support plain asp I still need to install mod_perl , and still lot of configuration to do with httpd.conf. Another Problem we may encounter is move the SSL certificate to the new apache server. This week will be a tough one.