Steps to setup remote accessing of database from other server (desktop).

1). Click START button,

            

    Type “SQL Server Configuration” in search button and click “SQL Server Configuration Manager”.

 

2). In SQL Server Configuration, follow all steps which are listed below.

   i). Select SQL Server Browser do right click and click ‘’Properties’’.

Click “Services” tab in above and check whether “Start Mode” to Automatic if it is Manual and click Apply.

Again check the properties of SQL Server Service to be in Automatic mode.

Continue reading Steps to setup remote accessing of database from other server (desktop).

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

Unfortunately today morning when I open my site it shows the error,

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

This is due to “php mysql api is deprecated” in php version 5.2

Then I logged into my cpanel and clicked on Select PHP Version and changed the verion from  5.2 to 5.4

And finally I visited my site it is working fine as before.

move_uploaded_file(./images/resume-sample.gif): failed to open stream: Permission denied

I tried to upload the file using php,

it shows the error like

move_uploaded_file(./images/resume-sample.gif): failed to open stream: Permission denied
move_uploaded_file(): Unable to move '/tmp/phpjyhikF' to './images/resume-sample.gif'

the images folder has all the permissions and its Owner/Group is root root. After giving the 0777 permission to images folder it doesn’t uploaded, the same error persists. Clearing the apache server cache doesn’t help to solve the issue.

Finally, it is selinux permission issue, we need to give permission to the images folder.

chcon -R -t httpd_sys_rw_content_t images

This solves the upload problem

The IP you’re using to send mail is not authorized to 550-5.7.1 send email directly to our servers.

I have tried using mail() in php installed on linux server.

<?php

mail('mailid@gmail.com', 'This is the subject', 'Test - Body of the mail');

?>

Then I found the error like this,

The IP you’re using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead.

This was because i’m using the sendmail in same server, where php is installed.

Then I used my own smtp server configuration,

ini_set('SMTP', 'smtp.example.net');
ini_set('smtp_port',587);

Although the mail was not send, the reason is mail() in php does not allows any authentication. i.e. auth_user or auth_password.

For mail in php, we can use third party open source libraries such as,

  1. PHPMailer
  2. SwiftMailer
  3. PEAR Mail