$_POST array not accessible by external class mPDF
Posted: Sun Feb 08, 2015 4:18 am
not sure if this problem is CMSMS related at all but i'm at a loss.
i have a form that is submitted to a very basic page (template only contains {content}). the content only contains a plugin i wrote. previously, the form action was kept external, but once i realised how easy it is to turn scripts into plugins, i did so. all works well.
now i tried to include mPDF in that plugin. which also works well.
mPDF in its simplest form would look like this:
all this works well, except that the pdf would only print "Name: "
when i echo $html instead, it prints correctly: "Name: rotezecke". print_r($_POST) also shows what is expected.
is there something in CMSMS preventing $_POST to be accessed by external classes, and if so, how can I work around this?
----------------------------------------------
Cms Version: 1.11.12
Installed Modules:
CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
ModuleManager: 1.5.8
News: 2.14.4
CGSmartImage: 1.17.2
Search: 1.7.11
TinyMCE: 2.9.12
CGSimpleSmarty: 1.7.4
CGExtensions: 1.45
CGBlog: 1.12.9
CGFeedback: 1.6.8
Captcha: 0.5.2
FormBuilder: 0.8.1.1
JQueryTools: 1.3.4
GBFilePicker: 1.3.3
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.36-1~dotdeb.1
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.6.19
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
----------------------------------------------
i have a form that is submitted to a very basic page (template only contains {content}). the content only contains a plugin i wrote. previously, the form action was kept external, but once i realised how easy it is to turn scripts into plugins, i did so. all works well.
now i tried to include mPDF in that plugin. which also works well.
mPDF in its simplest form would look like this:
Code: Select all
$html = '<h1>Name: ' . $_POST['firstname'] .'</h1>';
require('mpdf/mpdf.php');
$mpdf=new mPDF();
$mpdf->WriteHTML($html);
$mpdf->Output();
exit();
when i echo $html instead, it prints correctly: "Name: rotezecke". print_r($_POST) also shows what is expected.
is there something in CMSMS preventing $_POST to be accessed by external classes, and if so, how can I work around this?
----------------------------------------------
Cms Version: 1.11.12
Installed Modules:
CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.6
ModuleManager: 1.5.8
News: 2.14.4
CGSmartImage: 1.17.2
Search: 1.7.11
TinyMCE: 2.9.12
CGSimpleSmarty: 1.7.4
CGExtensions: 1.45
CGBlog: 1.12.9
CGFeedback: 1.6.8
Captcha: 0.5.2
FormBuilder: 0.8.1.1
JQueryTools: 1.3.4
GBFilePicker: 1.3.3
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true
Php Information:
phpversion: 5.4.36-1~dotdeb.1
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 256M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.6.19
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
----------------------------------------------