Monthly Archives: October 2016

Convert GMT to Local timezone in PHP

Following code snippet converts a date time in GMT to Local timezone.

 

mysql table is marked as crashed and last (automatic?) repair failed

If you are getting this error

mysql table is marked as crashed and last (automatic?) repair failed

Go to your data folder and try running

You should stop MySQL process first. If that doesn’t work, you can try with

I had to navigate to /var/lib/mysql/<database> and run myisamchk -r -v -f ./<table name>.

PS – This was answered at following thread, this post is for just personal reference in future.

Reference – http://stackoverflow.com/questions/8843776/mysql-table-is-marked-as-crashed-and-last-automatic-repair-failed

Requires Doctrine DBAL Laravel migration

If you are running a migration to change the data type of a column in a table. You might come across this error message in terminal.

This error message is telling you to install doctrine/dbal to make this work. You can learn more about this package here https://github.com/doctrine/dbal

To install this package through composer, run following command in terminal.

Now you can run your migration by running

This should work now.