File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 5
5
* PHP 5
6
6
* CakePHP 2
7
7
*
8
+ * @todo place in own config file Config/databaseblobfile.php
8
9
*/
9
10
Configure::write (
10
11
'DatabaseBlobFile ' ,
11
12
array (
12
13
'cdn_host ' => '' ,
14
+ 'memory_limit ' => null , // eg '128M' or '1024M'
15
+ 'execution_time ' => null , // eg 300
13
16
'sizes ' => array (
14
17
'md1 ' => array ('resizewidth ' ,67 ),
15
18
'md2 ' => array ('resizewidth ' ,165 ),
Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ class BlobFileHandler {
5
5
public $ resource ;
6
6
public $ resourceInfo ;
7
7
8
+ public function __construct () {
9
+
10
+ /**
11
+ * processing images may need more resources than an avereage page request
12
+ */
13
+ if (Configure::read ('DatabaseBlobFile.memory_limit ' )) {
14
+ ini_set ('memory_limit ' , Configure::read ('DatabaseBlobFile.memory_limit ' ));
15
+ }
16
+
17
+ if (Configure::read ('DatabaseBlobFile.execution_time ' )) {
18
+ set_time_limit (Configure::read ('DatabaseBlobFile.execution_time ' ));
19
+ }
20
+
21
+ }
8
22
9
23
/**
10
24
* add a message to stack (for outside checking)
You can’t perform that action at this time.
0 commit comments