 |
|
| Demo ASP: syntax_error.asp |
2010-09-09
|
We are creating a perl syntax error... this should demonstrate
how error handling is done. Please check the error log file if
you are interested in the output there.
You can turn this error messaging off by setting the Debug variable
in the ASP config to 1 or 0.
Also here is an example of how you can use debugging, an API
extension $Response->Debug(@args), in your script. The debug
output will show up below, and in your error logs. This user
style debugging is turned off with the same Debug setting set to 0.
Try this script also with buffering on.
This script by default does a runtime syntax error. If you would like
to see a script compile error, click here.
view this file's source
Errors Output
- error including compile_error.inc, not compiled: Bareword "code" not allowed while "strict subs" in use at /usr/local/proj/mlink/site/asp/eg/compile_error.inc line 5.
Apache::ASP::Response::Include('Apache::ASP::Response=HASH(0x9c334cc)', 'compile_error.inc') called at /usr/local/proj/mlink/site/asp/eg/syntax_error.asp line 55
Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC() called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
Apache::ASP::Execute('Apache::ASP=HASH(0x9182488)', 'Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6...') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1480
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1478
Apache::ASP::Run('Apache::ASP=HASH(0x9182488)') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 192
Apache::ASP::handler('Apache=SCALAR(0x9c24e04)') called at /dev/null line 0
eval {...} called at /dev/null line 0
, /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1522
Debug Output
- RUN ASP (v2.61) for /usr/local/proj/mlink/site/asp/eg/syntax_error.asp
- GlobalASA package Apache::ASP::Demo
- global.asa was not cached for __ASP__usr_local_proj_mlink_site_asp_eg__x00af84ec606339cdd7bd51c7f4b07c30xApache::ASP::Demo
- compiling global.asa Apache::ASP::Demo __ASP__usr_local_proj_mlink_site_asp_eg__x00af84ec606339cdd7bd51c7f4b07c30xApache::ASP::Demo exists 1 - asp: Apache::ASP=HASH(0x9182488); compiled: HASH(0x9c35320); exists: 1; package: Apache::ASP::Demo; - --- - exists: 0; mtime: 0;
- global.asa routines - Application_OnEnd: 1; Application_OnStart: 1; Script_OnEnd: 1; Script_OnFlush: 1; Script_OnStart: 1; Session_OnEnd: 1; Session_OnStart: 1;
- creating dbm for file /tmp/asp_demo/server/internal, db SDBM_File, serializer: Data::Dumper
- creating dbm for file /tmp/asp_demo/server/application, db MLDBM::Sync::SDBM_File, serializer: Data::Dumper
- session id from cookie: 0b14d37a2b2d3174d9f42f6d48bdc630
- refreshing 0907acb90f7ceff9d9c36ecaedeae879 with timeout 1284054972
- new session id 0907acb90f7ceff9d9c36ecaedeae879
- creating dbm for file /tmp/asp_demo/09/0907acb90f7ceff9d9c36ecaedeae879, db SDBM_File, serializer: Data::Dumper
- tieing session 0907acb90f7ceff9d9c36ecaedeae879
- clearing starting session
- Session_OnStart - session: 0907acb90f7ceff9d9c36ecaedeae879;
- executing Session_OnStart
- updating LastSessionTimeout from 1284054918
- parse file /usr/local/proj/mlink/site/asp/eg/syntax_error.asp
- parsing /usr/local/proj/mlink/site/asp/eg/syntax_error.asp
- found header.inc at /usr/local/proj/mlink/site/asp/eg/header.inc
- runtime exec of dynamic include header.inc args ()
- parse file /usr/local/proj/mlink/site/asp/eg/header.inc
- parsing /usr/local/proj/mlink/site/asp/eg/header.inc
- start parse of data - 1320
- undefing sub Apache::ASP::Demo::__ASP_l_proj_mlink_site_asp_eg_header_incx24bd1b50626504c18134bcd2c77446fcxINC code CODE(0x9a516c0)
- compiling into package Apache::ASP::Demo subid [Apache::ASP::Demo::__ASP_l_proj_mlink_site_asp_eg_header_incx24bd1b50626504c18134bcd2c77446fcxINC]
- start parse of data - 1495
- undefing sub Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC code CODE(0x9c3038c)
- compiling into package Apache::ASP::Demo subid [Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC]
- register include /usr/local/proj/mlink/site/asp/eg/header.inc with success
- parse file /usr/local/proj/mlink/site/asp/eg/compile_error.inc
- parsing /usr/local/proj/mlink/site/asp/eg/compile_error.inc
- start parse of data - 116
- undefing sub Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC code CODE(0x9c2d788)
- compiling into package Apache::ASP::Demo subid [Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC]
- undefing sub Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC code CODE(0x9c2d788)
- register include compile_error.inc with error:
- Script_OnStart
- executing Script_OnStart
- [syntax_error.asp] - Script_OnStart /usr/local/proj/mlink/site/asp/eg/syntax_error.asp in global.asa
- executing Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 1 bytes to client
- building headers
- sending cgi headers
- executing Apache::ASP::Demo::__ASP_l_proj_mlink_site_asp_eg_header_incx24bd1b50626504c18134bcd2c77446fcxINC
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 1036 bytes to client
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 82 bytes to client
- done executing include code Apache::ASP::Demo::__ASP_l_proj_mlink_site_asp_eg_header_incx24bd1b50626504c18134bcd2c77446fcxINC
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 537 bytes to client
- [syntax_error.asp] - Debugging - can; take - just: about; - any; kind - of reference - or scalar
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 77 bytes to client
- Script_OnFlush
- executing Script_OnFlush
- [syntax_error.asp] - Script_OnFlush: about to flush 269 bytes to client
- parse file /usr/local/proj/mlink/site/asp/eg/compile_error.inc
- parsing /usr/local/proj/mlink/site/asp/eg/compile_error.inc
- start parse of data - 116
- undefing sub Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC code CODE(0x9c2d788)
- compiling into package Apache::ASP::Demo subid [Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC]
- undefing sub Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC code CODE(0x9c2d788)
- error including compile_error.inc, not compiled: Bareword "code" not allowed while "strict subs" in use at /usr/local/proj/mlink/site/asp/eg/compile_error.inc line 5.
Apache::ASP::Response::Include('Apache::ASP::Response=HASH(0x9c334cc)', 'compile_error.inc') called at /usr/local/proj/mlink/site/asp/eg/syntax_error.asp line 55
Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC() called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
Apache::ASP::Execute('Apache::ASP=HASH(0x9182488)', 'Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6...') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1480
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1478
Apache::ASP::Run('Apache::ASP=HASH(0x9182488)') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 192
Apache::ASP::handler('Apache=SCALAR(0x9c24e04)') called at /dev/null line 0
eval {...} called at /dev/null line 0
, /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1522
- ASP Done Processing Apache::ASP=HASH(0x9182488) - Application: Apache::ASP::Application=HASH(0x9a5026c); GlobalASA: Apache::ASP::GlobalASA=HASH(0x9c211a0); Internal: Apache::ASP::State=HASH(0x9c21068); Request: Apache::ASP::Request=HASH(0x9c264dc); Response: Apache::ASP::Response=HASH(0x9c334cc); Server: Apache::ASP::Server=HASH(0x9c35098); Session: Apache::ASP::Session=HASH(0x9c1f930); app_state: 1; basename: syntax_error.asp; cleanup: ARRAY(0x9182d28); compile_checksum: ff296bd1061de32598ffbfab063ed1e9; compile_error: 1; compile_eval: SCALAR(0x9769ef0); compile_includes: 1; compile_perl_count: 4; cookie_domain: ; cookie_path: /; dbg: 3; debugs_output: ARRAY(0x9c267b8); destroy: 1; dir_config: Apache::Table=HASH(0x9a514b0); dirname: /usr/local/proj/mlink/site/asp/eg/; errors_output: ARRAY(0x9a502a8); errs: 1; filename: /usr/local/proj/mlink/site/asp/eg/syntax_error.asp; global: /usr/local/proj/mlink/site/asp/eg//.; global_package: Apache::ASP::Demo; group_refresh: 30; headers_in: Apache::Table=HASH(0x9a4d064); includes_dir: ARRAY(0x9a50344); init_packages: ARRAY(0x9a524e4); inode_names: ; lang_comment: #; lang_language: PerlScript; lang_module: Apache::ASP::Lang::PerlScript; lang_object: Apache::ASP::Lang::PerlScript=HASH(0x9c1d3ec); last_compile_include_data: HASH(0x9a516e4); last_time: 1284054672.3176; no_cache: ; package: Apache::ASP::Demo; paranoid_session: ; parse_config: 1; parse_file_count: 4; pod_comments: 1; r: Apache=SCALAR(0x9c24e04); register_includes: HASH(0x9c36b30); remote_ip: 38.107.191.87; request_binary_read: 1; response_tied: 1; run_perl_script: SCALAR(0x9c33f14); search_dirs_cache: HASH(0x9c1c7ac); secure_session: ; session_cookie: 1; session_count: 1; session_id: 0907acb90f7ceff9d9c36ecaedeae879; session_serialize: ; session_state: 1; session_timeout: 300; session_url: 1; session_url_force: ; session_url_match: ; session_url_parse: 0; session_url_parse_match: ; start_time: 1284054672.2708; stat_inc: 0; stat_inc_match: 0; stat_scripts: 1; state_db: ; state_dir: /tmp/asp_demo; state_manager: 10; state_serialize: ; state_serializer: ; ua: CCBot/1.0 (+http://www.commoncrawl.org/bot.html); use_strict: 1; win32: 0; xml_subs_match: my:\w+; xml_subs_perl_args: 1; xml_subs_strict: ; xslt: ;
- errors out
- error including compile_error.inc, not compiled: Bareword "code" not allowed while "strict subs" in use at /usr/local/proj/mlink/site/asp/eg/compile_error.inc line 5.
Apache::ASP::Response::Include('Apache::ASP::Response=HASH(0x9c334cc)', 'compile_error.inc') called at /usr/local/proj/mlink/site/asp/eg/syntax_error.asp line 55
Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6c7882356f519fda94ea81f47734efxINC() called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1518
Apache::ASP::Execute('Apache::ASP=HASH(0x9182488)', 'Apache::ASP::Demo::__ASP__mlink_site_asp_eg_synta__error_aspx8b6...') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1480
eval {...} called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1478
Apache::ASP::Run('Apache::ASP=HASH(0x9182488)') called at /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 192
Apache::ASP::handler('Apache=SCALAR(0x9c24e04)') called at /dev/null line 0
eval {...} called at /dev/null line 0
, /usr/local/perl562/lib/site_perl/5.6.2/Apache/ASP.pm line 1522
Compiled Data with Error
-: package Apache::ASP::Demo; ;; sub Apache::ASP::Demo::__ASP_mlink_site_asp_eg_compile_error_incx87ca4f3817507604073b2da577c9bbd0xINC { ;; package Apache::ASP::Demo; ;; use strict;;;use vars qw($Application $Session $Response $Server $Request);;
-: #line 1 /usr/local/proj/mlink/site/asp/eg/compile_error.inc
1: ;;&Apache::ASP::WriteRef($main::Response, \('
2: This next code block contains invalid perl code that will
3: generate a compile time error.
4: '));
5: invalid perl code;
6: ; ;; }
An error has occured with the Apache::ASP script just run.
If you are the developer working on this script, and cannot work
through this problem, please try researching it at the
Apache::ASP web site,
specifically the FAQ section.
Failing that, check out your
support options, and
if necessary include this debug output with any query.