buy tadalafil

Archive for January, 2010

“WordPress database error MySQL server has gone away for query…..”

Thursday, January 21st, 2010

Error :

WordPress database error MySQL server has gone away for query…..”

Solution :

You need to add the following line in line number 334 in wp-includes/wp-db.php file

$this->query("set session wait_timeout=600");

Done

/bin/pwd: failed to stat `.’: Permission denied

Thursday, January 21st, 2010

Error :
After run /scripts/fixcommomproblems
Que this message

Code:

Processing mailman
/bin/pwd: failed to stat `.’: Permission denied
Processing zarautzi
/bin/pwd: failed to stat `.’: Permission denied
Processing alphaele
/bin/pwd: failed to stat `.’: Permission denied
Processing transjus
/bin/pwd: failed to stat `.’: Permission denied

Solution:

Hello,It seems to suid is not set for /bin/pwd binary please run following command to fix it.

chmod u+s /bin/pwd

Done

How to install Mail::SPF on cpanel server

Friday, January 15th, 2010

How  to install Mail::SPF on cpanel server ?

Please use the following one line command to perform the install:

perl -MCPAN -e "get('Mail::SPF')" && cd /home/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf && tar -xzvf Mail-SPF-v2.007.tar.gz && cd Mail-SPF-v2.007 && perl Build.PL && ./Build && ./Build test && ./Build install && /scripts/checkperlmodules --full

Done

===========================================

As an alternative, to help clarify the steps used by the above command, here is each step on its own line:

Code:
# perl -MCPAN -e "get('Mail::SPF')"
# cd /home/.cpan/sources/authors/id/J/JM/JMEHNLE/mail-spf
# tar -xzvf Mail-SPF-v2.007.tar.gz
# cd Mail-SPF-v2.007
# perl Build.PL
# ./Build
# ./Build test
# ./Build install
# /scripts/checkperlmodules --full
===========================================
You can check the perl module installed on the server by using the single command.
# instmodsh

Internal Server Error

Friday, January 15th, 2010

SuPHP Permission Issue

suPHP enhances overall server security. When migrating from a server that is not running suphp to a server running these, permission and ownership issues occur . When you access your domain you usually see

s1

Tail the Apache error logs to see what the error is

# tail -f /usr/local/apache/logs/error_logs

You can see the error

[Thu Jul 12 09:00:09 2007] [error] [client XXX.XXX.X.X] SoftException in Application.cpp:601: Directory “/home/user/public_html/test.php” is writable by group .

[Thu Jul 12 09:00:11 2007] [error] [client XXX.XXX.X.X] Premature end of script headers:

The script fail if the php file or folder is writable for anyone other that the owner. Check the permission and ownership .

# cd /home/user/public_html/

# ll | grep test.php

-rwxrwxrwx 1 nobody nobody 158 2008-05-13 04:32 test.php

That shows test.php has full permission and is not owned by the user . Change the permission and ownership.

# chmod 644 test.php

# chown user.user test.php

If it is a server wide issue , then its difficult to change it for each user . Here is a script (for cpanel servers) that fixes all the files and folder permissions that occurs when server changes to suphp.

1) Save the script to a file .

# vi /root/suphpfix.sh

     #!/bin/bash
     for user in `ls /var/cpanel/users`; do
     chown ${user}:${user} /home/${user}/public_html
     chmod 755 /home/${user}/public_html
     find /home/${user}/public_html -group nobody -print0 | xargs -0 chgrp ${user}
     find /home/${user}/public_html -type f -print0 | xargs -0 chmod 644
     find /home/${user}/public_html -type d -print0 | xargs -0 chmod 755
     done

2) Make the script executable.

# chmod u+x /root/suphpfix.sh

3) Execute the script

# bash /root/suphpfix.sh

set correct ownership to all accounts

Wednesday, January 13th, 2010

How to set correct ownership to all account on the cPanel server. You can use the following commands to set the correct ownership for all accounts which is hosted on the cPanel server.

===============================

for i  in `cat /etc/trueuserdomains   | awk '{print $2}'`
> do
> chown $i.$i /home/$i -R;
> chown $i.mail /home/$i/etc -R;
> chown $i.nobody /home/$i/public_html;
> done;

===============================

how to include file in jsp page

Tuesday, January 12th, 2010

How to include file in the .jsp pages :

<%@ include file="footer.jsp" %>

Fatal error: Allowed memory size of

Monday, January 11th, 2010

Error : Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2420 bytes) in /home/username/public_html/thumbnail.php on line 49

Solution : To change the memory limit for one specific script by including a line such as this at the top of the script:

Open the file /home/username/public_html/thumbnail.php

and

add the following  code below the code <?php ”

ini_set("memory_limit","128M");

Done