PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 31 bytes)

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 31 bytes)

Edit file /etc/php.ini and increase memory limit:
memory_limit = 32M

May 29, 2018
May 29, 2018

When do SVN UPDATE - authentication needed

svn authentication is stored in the ../.subversion directory. Check that it exists and your user has access to store information in it.

May 29, 2018

Problem when loading landing page - popup window is opened for save file.

put into .htaccess:
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php5 .php

May 29, 2018

VIM for SVN commit

put into .bashrc
export SVN_EDITOR=vim

May 29, 2018

svn cleanup error: file is not under version control

1. Delete the `log` file in the .svn directory
2. Delete .svn/props-base
3. svn cleanup

May 29, 2018

How to copy data of one vocabulary into another

//copy data of the vocabulary by id=1 into vocabulary id=3
insert into term_data (vid, name, description) select 3, name, description
FROM `term_data` WHERE vid=1;

//update tid data of the new terms.
insert into term_hierarchy (tid) select tid FROM `term_data` WHERE vid=3;

NOTE: don't forget to fix sequences for term_data_tid

May 29, 2018

Error with collation

If you get such error:
user warning: Illegal mix of collations (latin1_swedish_ci,IMPLICIT)
and (utf8_general_ci,COERCIBLE) for operation '=' query: SELECT qid FROM
top_searches WHERE q = 'орп' in .\includes\ on line 172.

Change all collation for the db, each table, each row of the table from latin1_swedish_ci collation to utf8_general_ci

May 29, 2018

How to import mysql db, if you don't have permissions to run 'use charset utf8'

In case if you don't have permissions to run use charset utf8

1. Open database dump sql file and add such lines on top of it.


Goto mysql command tool, run it and log in.
type use database name_of_db Enter.
type \. path_to_the_dump_file Enter.

May 28, 2018

Problem - with file and directory permissions on server

Errors on sever: index.php is writable by group
cannot execute file ... permission is denied

All files on server should have chmod 644, and directories 755

for files type:
chmod -R 644 *
for directories type:
find . -type d -exec chmod 755 {} \;

May 28, 2018