Re: Apache::ASP and no global.asa
Rick Glunt wrote: I am trying to setup Apache::ASP to handle asp pages for one of my virtual domains in Apache but I am getting an 'Internal Server Error' on the browser and an error in the Apache log files that goes something like [error] Undefined subroutine Apache::ASP::Compiles::_usr_local_apache_htdocs_www_aspdomain___global_asa: :Form called at (eval 24) line 1. -- , /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1506. I believe I already answered this question in a prior mail to the list, but wanted to clarify that Apache::ASP creates an empty global.asa for you if you don't have one, and it is into this perl package that all your scripts and includes are compiled so that they can share perl global values more easily. So the namespace is a bit misleading. If you wanted to rename the global.asa perl package, set the GlobalPackage config. --Josh _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Apache::ASP and no global.asa
I am trying to setup Apache::ASP to handle asp pages for one of my virtual domains in Apache but I am getting an 'Internal Server Error' on the browser and an error in the Apache log files that goes something like [error] Undefined subroutine Apache::ASP::Compiles::_usr_local_apache_htdocs_www_aspdomain___global_asa: :Form called at (eval 24) line 1. -- , /usr/local/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1506. The site/eg asp test files all work on my server. And I have the following directives included in this virtual domain: Files ~ (\.asp) SetHandler perl-script PerlSetVar NoState 1 PerlHandler Apache::ASP /Files What could the problem be? The site admin tells me they do not need a global.asa and since I do not know ASP I cannot dispute that. Thanks, Rick
Re: Apache::ASP problem with global.asa
[EMAIL PROTECTED] wrote: the global.asa that my global_test.html is using is what I had sent you ... the application variable $Application-{test} (the last variable printed in the error log above) is initialiazed in the Session_OnStart subroutine. The other application variables are from an older global.asa which I was trying (this was copied from the eg/ directory). In that old global.asa also, these variables were initialized in Session_OnStart subroutine (not Application_OnStart). Two things to note: 1-- When I changed the global.asa, it's still showing the variables from the old global.asa 2-- Session_OnStart seems to be executing fine but not Application_OnStart Ritu, The Application_OnStart routine only gets run with the first Session_OnStart of the application, or the first user to visit the site triggers the Application_OnStart... if you want to test your changes to Application_OnStart, you will need to delete the contents of StateDir, and restart the web server. One nice way to check Application_OnStart being run is to turn debugging on, and write something in the event like $Response-Debug('app starting') Do you think upgrading to v0.17 will help?? Will it be enough just to copy the ASP.pm code rather than re-building the whole module?? With Apache::ASP, it is sufficient to just copy over ASP.pm and stop/start the web server, but I would recommend in general running make test just to make sure things look good first. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Apache::ASP problem with global.asa
Joshua, I am using version 0.15 of Apache::ASP. In any case, if global.asa is not changed after the server re-starts, this issue should not show up, right? I have another confusion that you may be able to help with: I have 3 different sub-directories under the DocumentRoot. I treat each of the 3 sub-directories as mutually exclusive web applications. Is it ok for each of these sub-directories to have it's own global.asa?? I guess I am not clear on how an application is defined. As always, thanks for all your help. Regards, ritu Here's an excerpt from the Apache error log: [Fri Dec 10 00:25:21 1999] [notice] Apache/1.3.9 (Unix) mod_perl/1.21 configured -- resuming normal operations [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] STARTING ASP HANDLER (v0.15) for file /web/htdocs/ritu/global_test.html [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] GlobalASA package Apache::ASP::Demo [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] compiling global.asa Apache::ASP::Demo [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] global.asa routines - Application_OnStart: 1; Session_OnEnd: 1; Session_OnStart: 1; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] opening lock file /tmp/asp_demo/server/application.lock [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] created $Application - Session218f675b0e2f63d12b3e2ee7fbb12461: 944678001; Session2b14c0280adf29463ddbcab2cfff2f41: 39646; Sessionbd07e861955c12537c15899759ef99b7: 39272; Sessiond0d2ad8e71bc0f6ad3b32e1265bc0ad8: 39233; Sessionf072cb77cac6ebb97a6f49e5cd61cc30: ?; Sessionfbb22bd2b4b0f93328ad413f07c5c121: ?; Sessionfe02a577364bd5d6d58d7ce0c4ed40da: ?; test: ritu-application; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] opening lock file /tmp/asp_demo/server/internal.lock [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] SessionCookie - 965c1c9ace8acebc2c0f1f57640d2668 [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] refreshing 965c1c9ace8acebc2c0f1f57640d2668 with timeout 944812554 [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] opening lock file /tmp/asp_demo/96/965c1c9ace8acebc2c0f1f57640d2668.lock [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] session not expired - time: 944803554; timeout: 944804837; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] tieing session 965c1c9ace8acebc2c0f1f57640d2668 [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] tied session - test1: ritu-session-own; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] ASP object created - Application: Apache::ASP::Application=HASH(0x8334b74); GlobalASA: Apache::ASP::GlobalASA=HASH(0x81e80c8); Internal: Apache::ASP::State=HASH(0x8292294); Request: Apache::ASP::Request=HASH(0x81f8510); Response: Apache::ASP::Response=HASH(0x81f8528); Server: Apache::ASP::Server=HASH(0x81f8654); Session: Apache::ASP::Session=HASH(0x8337494); allow_application_state: 1; app_start: 0; basename: global_test.html; buffering_on: 0; cgi_do_self: 0; cgi_headers: ; clean: 0; command_line: ; compile_error: ; compile_includes: ; cookie_path: /; debug: 2; debugs_output: ARRAY(0x81e7ff0); dirname: /web/htdocs/ritu; errors: 0; errors_output: ARRAY(0x832f574); filehandle: ; filename: /web/htdocs/ritu/global_test.html; filter: 0; global: /web/htdocs/ritu/.; global_package: Apache::ASP::Demo; group_refresh: 900; groups_refresh: 900; id: NoCache; init_packages: ARRAY(0x81f8678); mail_alert_period: 20; mail_alert_to: ; mail_errors_to: ; mail_host: ; mtime: 944795801; no_cache: 1; no_headers: 0; no_session: ; no_state: 0; package: Apache::ASP::Demo; paranoid_session: 0; pod_comments: 1; r: Apache=SCALAR(0x837ad94); remote_ip: 12.78.106.29; script_timeout: 90; secure_session: ; session_serialize: ; session_timeout: 9000; soft_redirect: ; stat_inc: 1; stat_inc_match: zzz; state_cache: ; state_db: SDBM_File; state_dir: /tmp/asp_demo; state_manager: 10; ua: Mozilla/4.5 [en] (WinNT; U); unique_packages: 0; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] reloading - Tie/Hash.pm: /usr/lib/perl5/5.00503/Tie/Hash.pm; [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of Apache/ASP.pm /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm Apache::ASP [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of lib.pm /usr/lib/perl5/5.00503/lib.pm lib [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of Fcntl.pm /usr/lib/perl5/5.00503/i386-linux/Fcntl.pm Fcntl [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of re.pm /usr/lib/perl5/5.00503/i386-linux/re.pm re [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of strict.pm /usr/lib/perl5/5.00503/strict.pm strict [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of Exporter.pm /usr/lib/perl5/5.00503/Exporter.pm Exporter [Fri Dec 10 00:25:54 1999] [error] [asp] [4984] [debug] stat register of overload.pm
Re: Apache::ASP problem with global.asa
Please attach a bit of your apache error log with Apache::ASP debugging turned on. It will help to see how things are being initialized and run to diagnose your problem. There was also a global.asa reload error, perhaps related, a couple versions back that would not refresh a changed global.asa. Try upgrading to the latest Apache::ASP. --Joshua _ Joshua Chamas Chamas Enterprises Inc. NodeWorks free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051 [EMAIL PROTECTED] wrote: Hi, I am having problems getting Application variables initialized in the Application_OnStart subroutine of global.asa. The Session_OnStart seems to be working fine. I am including excerpts from httpd.conf, .htaccess, global.asa and the file I'm using to test global.asa. I stopped and re-started the server to make sure the application is re-started. I also tested the global_asa_demo.htm in eg/ directory with a couple of print statements to print the $Application-{Count} variable in global.asa of the eg/ directory ... it didn't work either. I would appreciate any pointers with this. Thanks. - ***httpd.conf*** Directory "/web/htdocs" # # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options FollowSymLinks ExecCGI # # This controls which options the .htaccess files in directories can # override. Can also be "All", or any combination of "Options", "FileInfo", # "AuthConfig", and "Limit" # AllowOverride AuthConfig # # Controls who can get stuff from this server. # Order allow,deny Allow from all /Directory .htaccess*** # .htm files for the ASP parsing, but not the $Session object # NoState turns off $Session $Application Files ~ (\.htm) PerlHandler Apache::ASP PerlSetVar Debug 2 PerlSetVar Global . PerlSetVar NoState 0 PerlSetVar BufferingOn 0 PerlSetVar NoCache 1 # PerlSetVar DynamicIncludes 1 /Files global.asa sub Application_OnStart { $Application-{'instance'} = 'global'; } sub Session_OnStart { # $Session-Timeout = "300"; $Session-{'test1'} = 'session-own'; $Application-{'test'} = 'my-application'; } sub Session_OnEnd { $Session-{"Onlinename"} = ""; $Session-{"UID"} = ""; } global_test.htm % my($xyz)=$Application-{test}; my($abc)=$Application-{instance}; my($uvw) = $Session-{test1}; % html head titleHome Page/title /head body LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="5" MARGINHEIGHT="0" center application variable: %=$xyz% session variable: %=$uvw% application_onstart: %=$abc% /body/html --- Creating Business Communities Instantly http://www.provillage.com