My mistakes

Archive for the ‘LINUX’ Category

Refer this post


Quick fix
$subject= mb_encode_mimeheader($subject,”UTF-8″, “B”, “\n”);


When we convert a pdf to an image using ghostscript like

convert mam.pdf document.png

you may get an error like this :
ERROR: /undefined in –get–
Operand stack:
–dict:6/6(L)–   F1   14   –dict:9/14(L)–   –dict:9/14(L)–   275   –dict:9/14(L)–   –dict:11/12(L)–   glyf
Execution stack:
%interp_exit   .runexec2   –nostringval–   –nostringval–   –nostringval–   2   %stopped_push   –nostringval–   –nostringval–   –nostringval–   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   –nostringval–   –nostringval–   2   1   6   –nostringval–   %for_pos_int_continue   –nostringval–   –nostringval–   –nostringval–   –nostringval–   %array_continue   –nostringval–   false   1   %stopped_push   –nostringval–   %loop_continue   –nostringval–   –nostringval–   –nostringval–   –nostringval–   –nostringval–   –nostringval–   –nostringval–
Dictionary stack:
–dict:1127/1686(ro)(G)–   –dict:0/20(G)–   –dict:107/200(L)–   –dict:107/200(L)–   –dict:104/127(ro)(G)–   –dict:241/347(ro)(G)–   –dict:20/24(L)–   –dict:4/6(L)–   –dict:20/20(L)–   –dict:3/5(L)–   –dict:10/14(L)–   –dict:33/50(ro)(G)–   –dict:21/40(L)–
Current allocation mode is local
Last OS error: 2
ESP Ghostscript 815.02: Unrecoverable error, exit code 1
convert: Postscript delegate failed `mam.pdf’.
convert: missing an image filename `document.png’.
[manu@rc-170 imagemagic]$ /usr/lib/ -invisible -headless -norestore -accept=”socket,host=,port=8100;urp;” -nofirststartwizard & > /dev/null 2>&1
[1] 29233

Solution :

Upgrade the ghostscript to a newer version greater than 8.60

Loops and save()

You must reset the Model on every loop iteration.
$this->{ Model Name } ->create();

Place the above line at the beginning of the loop for eg:

foreach() {
$this->{ Model Name } ->create();
/* actual code */

Replace the { Model Name } with the corresponding model name


XML Error: XML declaration not finished at line 1

This error can occur in either one of these two situations…

1. Your server does not support UTF-8 encoding;
2. You have incorrect magic_quotes settings on your server.

To check your server settings
Create a php file and place the below lines in it

For working with the second problem magic_quote settings should be:

magic_quotes_gpc ON
magic_quotes_runtime OFF (same as the PHP default setting)
magic_quotes_sybase OFF (same as the PHP default setting)


Please have a try

Check the encoding of your ci_sessions database table field

change it to utf8_general_ci