Wednesday, May 7, 2014

Warning: mysql_connect(): No such file or directory in but file exists in terminal

This will fix the issue:

sudo su
ln -s /Applications/xampp/xamppfiles/var/mysql/mysql.sock /tmp/mysql.sock
mkdir /var/mysql
ln -s /Applications/xampp/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock

Sunday, May 4, 2014

Custom files redirection error on wordpress

Even though the permissions for the folders and files are correct, a 404 error kept showing on the wordpress site. This can be resolved by modifying the .htaccess file and modifying the headers to something like this (the highlighted section is what is new):


RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/rest/(.*)$ [OR]
RewriteRule ^.*$ - [L]

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress