April 17th, 2006
Joomla shows error of below pattern when trying to install a module or component.
Warning: is_dir(): Stat failed for /home/xyzabc/public_html/cms/media/install_443448a97a130/images (errno=13 - Permission denied) in /home/xyzabc/public_html/cms/administrator/includes/pcl/pclzip.lib.php on line 4287
Warning: is_dir(): Stat failed for /home/xyzabc/public_html/cms/media/install_443448a97a130/images (errno=13 - Permission denied) in /home/xyzabc/public_html/cms/administrator/includes/pcl/pclzip.lib.php on line 4287
This is because of 2 reasons
1 ) Bad folder permissions
2 ) register globals in on in php.ini
The solution
1 ) Issue the below command after going to the installation directory of Joomla
# chmod 777 administrator/backups/ administrator/components/ administrator/modules/ administrator/templates/ cache/ components/ images/ images/banners/ images/stories/ language/ mambots/ mambots/content/ mambots/editors/ mambots/editors-xtd/ mambots/search/ media/ modules/ templates/
2 ) Copy the server’s php.ini to the Joomla installation directory and edit it to make sure that register globals is off. At times a httpd service restart would be required.
Hope now you can install components and modules to your Joomla installation.
Posted in Scripts, Joomla | No Comments »
April 16th, 2006
1) cd /usr/local/src
2 ) wget http://us2.php.net/get/php-5.1.2.tar.bz2/from/this/mirror (or any other mirror)
3 ) tar -jxvf php-5.1.2.tar.bz2
4 ) cd php-5.1.2/
5 ) PHP=’/usr/bin/php’ ( result of which php )
6 ) CFG=`$PHP -i | grep configure | sed “s/'//g” | sed “s/–prefix=\/usr//g” | sed “s/’//g” | sed “s/\.\/configure \(.*\)–with-apxs.*apxs \(.*\)/\1 \2/” | sed "s/<tr><td class=\"e\">Configure Command <\/td><td class=\"v\">//g" | sed "s/<\/td><\/tr>//g"`
7 ) CFGLINE=”${CFG##* => } –prefix=/usr/local/php5 –exec-prefix=/usr/local/php5 –enable-force-cgi-redirect –enable-discard-path”
8 ) ./configure $CFGLINE
9 ) make
10 ) make install
11 ) cp /usr/local/php5/bin/php /usr/local/cpanel/cgi-sys/php5
12 ) chown root:wheel /usr/local/cpanel/cgi-sys/php5
13 ) cp -f php.ini-recommended /usr/local/php5/lib/php.ini
14 ) Edit /usr/local/apache/conf/httpd.conf to add the below enteries
Action application/x-httpd-php5 “/cgi-sys/php5″
AddType application/x-httpd-php5 .php5
15 ) Restart the httpd service.
Reference : - http://devel.webonce.com/php5.txt
Now for using php 5 you need to either have the scripts with extension .php5 or need to have the below entry in your .htaccess file
AddHandler application/x-httpd-php5 .php
Posted in Apache, .htaccess, PHP | No Comments »
April 16th, 2006
Below are the steps to install php5 on a redhat server. We are going to install php 5.1.2 current satble php5 version.
1) cd /usr/local/src
2 ) wget http://us2.php.net/get/php-5.1.2.tar.bz2/from/this/mirror (or any other mirror)
3 ) tar -jxvf php-5.1.2.tar.bz2
4 ) cd php-5.1.2/
5 ) PHP=’/usr/local/bin/php’ ( result of which php )
6 ) CFG=`$PHP -i | grep configure | sed “s/–prefix=\/usr\/local//g” | sed “s/’//g” | sed “s/\.\/configure \(.*\)–with-apxs.*apxs \(.*\)/\1 \2/”`
7 ) CFGLINE=”${CFG##* => } –prefix=/usr/local/php5 –exec-prefix=/usr/local/php5 –enable-force-cgi-redirect –enable-discard-path”
8 ) ./configure $CFGLINE
9 ) make
10 ) make install
11 ) cp /usr/local/php5/bin/php /usr/local/cpanel/cgi-sys/php5
12 ) chown root:wheel /usr/local/cpanel/cgi-sys/php5
13 ) cp -f php.ini-recommended /usr/local/php5/lib/php.ini
14 ) Edit /usr/local/apache/conf/httpd.conf to add the below enteries
Action application/x-httpd-php5 “/cgi-sys/php5″
AddType application/x-httpd-php5 .php5
15 ) Restart the httpd service.
Reference : - http://devel.webonce.com/php5.txt
Posted in Apache, .htaccess, PHP | No Comments »
April 13th, 2006
That is when you hit abcd.com it will forward to yahoo.com but the URL in address bar will not change. For this put the below content in index.html of the domain abcd.com
<html>
<head>
<title>abcd.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="JavaScript">
document.write("<frameset rows=* frameborder=NO border=0 framespacing=0 cols=*>");
document.write("<frame name=main src=http://www.yahoo.com"+document.location.search+">");
document.write("</frameset>");
document.write("<noframes>");
document.write("< body bgcolor=#FFFFFF text=#000000>");
document.write("</body></noframes>");
</script>
</html>
Posted in Apache | No Comments »
April 13th, 2006
If you get the below error while trying to install a perl module
*********************************************************************
Testing connection speed…(this could take a while)….Done
Ran out of working CPAN mirrors. Please contact cPanel Support at /scripts/cPanelPerl.pm line 209
*********************************************************************
The fix is as below
rm -f /root/.cpcpan/mirrors.speeds
rm -f /root/.cpcpan/pingtimes/*
And rerun the script.
Posted in Cpanel/WHM | No Comments »
April 13th, 2006
Edit .htaccess file and include the following
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} www.domainname [OR]
RewriteCond %{HTTP_HOST} domainname
RewriteCond %{REQUEST_URI} !subfolder/
RewriteRule ^(.*)$ subfolder/$1 [L]
Posted in .htaccess | No Comments »