Wednesday 4 December 2013

Warning: mkdir() [function.mkdir]: Permission denied in DrupalLocalStreamWrapper->mkdir()


Drupal is giving the following error while uploading the themes:

Warning: mkdir() [function.mkdir]: Permission denied in DrupalLocalStreamWrapper->mkdir() (line 639 of /home/username/public_html/includes/stream_wrappers.inc). 
รข€¢bootstrap-7.x-2.1 (1).zip does not contain any .info files. 

Try With the Following Solution :
  • Change the file permission for the /sites/default/ to 777
  • Create the folder called /temps/ in the /home/username/public_html provide the file permission for the /temps/ as 777
  • Login to the drupal admin panel >>Go to Configuration >> Media >> File System. Change the Temporary directory path to the following :
    home/username/public_html/temps
  • Then save the settings. 

     

The sub domain abc.domain.com is not working showing the >> server not found error


The sub domain abc.domain.com is not working showing the >> server not found error . 

Check if the sub domain is created by going to cPanel >> Subdomains, If the sub domain is created and it is pointed to the correct root document folder and try with following step to resolve the issue 

You will have to enable the rewritebase rule in the Apache. Since there is no RewriteBase enabled for the sub domain 

You can also add the following code in the .htacess directly. 

<IfModule mod_rewrite.c>

RewriteEngine On

# RewriteBase /folder_path/

RewriteBase /

Database Connection Error

Website showing Database Connection Error
If it is a wordpress website , it is a common issue

Check the following to resolve the issue :
Login to the cPanel >> go to File Manager >> Open the public_html directory >> look for the wp-config.php and open it using the code editor.
Save the database, database username , password.

Go to Mysql >> delete the database user (Note: Do not delete the database , delete only the database user ).
Then create the new database user again as specified in the
wp-config.php , then reassign the database user to the database.

Or, instaed of deleting the database user , you can click on the database user and reassign the privileges and save it. Some times it works.

If the above step did not work , check the database by clicking on the >> check DB under the Mysql .If you find the corrupted database tables , go to Mysql >> click on Repair DB. This will resolve the error.

If all of the above steps did not resolve the problem , contact the hosting provider to resolve the issue. If may also be the reason that server is down.

To enable the passive port range for ProFTPd


How do I enable the passive port range for ProFTPd?

To enable the passive port range for ProFTPd, perform the following via the command line as the root user:
  • Open /etc/proftpd.conf in a text editor, such as vi.
  • Add the following to the first section of the configuration file:
PassivePorts 49152 65534

  • Save the changes to the configuration file.
  • Run the command /usr/local/cpanel/scripts/restartsrv_ftpserver to restart the server.

Error: Connection timed out , Error: Failed to retrieve directory listing in the filezilla


Getting following error in the filezilla :

 PASV
Response: 227 Entering Passive Mode (119,18,57,237,6,29)
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing 


Solution:

Open passive port range in iptables and also in pure-ftpd configuration file.

To open the passive port range in pure-ftpd configuration file:
  • Open the /etc/pure-ftpd.conf configuration file in a text editor, such as vi.
  • Remove the number sign (#) from the beginning of the line which contains the PassivePortRange test.
  • Change that line to the following :
PassivePortRange 49152 65534
  • Save the changes to the configuration file.
  • Run the command /usr/local/cpanel/scripts/restartsrv_ftpserver to restart the server.


To open the passive port range in iptables :
To open passive mode ports in your firewall, issue the following commands at the command line as root:
iptables -I INPUT -p tcp --dport 49152:65534 -j ACCEPT
  • /etc/iptables-save

If the server is loading slowly check the below stats in the server


$uptime
12:03:11 up 1 day, 23:23, 2 users, load average: 44.67, 37.02, 30.92

$free -m
it will check for the memory (RAM) available.

$nice top -cd3
It will show details regarding the process consumption.

$mysqladmin proc stat
It will check the mysql process stats
This will show the stats regarding the slow queries.


$attackers 80
It will check for the highest http connection at the port 80

Note : Ip with more than 50 connections to the httpd should be blocked.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes)


Domain getting the following error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 79 bytes) in /home/username/public_html/libraries/joomla/database/database/mysqli.php on line 498


Solution: 

Step1 : Login to the root
Step 2: Create the info.php file and check the memory limit.
Step 3: If it is 64MB. Then go to php.ini. File and then change it to 256M according to the memory availability.

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...