Showing posts with label Joomla. Show all posts
Showing posts with label Joomla. Show all posts

Thursday, May 23, 2013

Error displaying the error page: Application Instantiation Error (Windows 7 + Wamp server)

When startup joomla on a new php version 5.4.15 "Error displaying the error page: Application Instantiation Error" The Problem is the mysql extension is not running or not loaded by Php, you can check that by display the loaded extensions by usin this command :
$loaded_extensions = get_loaded_extensions();
echo '<pre>';
print_r($loaded_extensions);
echo '</pre>';
exit;
you will see n the resulted list only the default extensions That means the Apache server dont know where to fnd those extensions, I mean the extension_dir is not clearly configured in apache configuration file . to solve this issue go to php version folder, and find the file phpForApache.ini (on Wamp server) then write the right address to the extensions directory. like this :
extension_dir = "c:/wamp/bin/php/php5.4.15/ext/"
check again that this line is uncommented (the ; is removed). restart your server again and it will load the extensions from the right place. 

Note: When You change anything in phpForApache.ini for the php version  it must be not loaded, that means the php version thats hold this file must be not running.

Note: If you are not on Wamp Server you have to check you phpinfo() page to see where is your php.ini reside.

Wednesday, January 30, 2013

How to get the view and layout in Joomla 2.5

In Joomla 2.5 if you want to know the requested uri :
 $uri =& JURI::getInstance(); echo 'Request URI is ' . $uri->toString() . "\n"; 
And for the view and layout you can do the following :
echo (JRequest::getCmd('view')) ."Is the View"; 

echo( JRequest::getCmd('layout'))."Is the Layout"; exit;  
Why is that ? Because Joomla 2.5 using SEF routing that changes the requested route to a new segments related to your category's id and name as well as to the article's id and alias . Which will leads you to no where if you programming a joomla module and need to extract the coming request to check the required view and layout.