I did that last night based on findings in another thread. It broke the gallery again. I was back to the same PHP stack overflow error and repeating header. I had to restore the database to recover.
I was able to fix the category issue by changing the MySQL my.ini. I removed strict mode if I recall.