[users@httpd] Re: Error 404 Not Found
On 07/12/2013 00:44, Robert wrote: Apache 2.2 installed and running on my own Windows Vista 64bit SP2 computer. File events_startup.html initiates my website home page and it contains the following code: /a> File cycle-login is cycle-login.php and if working properly displays a login form. Mysql is read and username-password is validated. If successful user is presented with a second form for data input. Both these files reside in c:\apache2\htdocs. Contained in c:\apache2\conf\httpd.conf are following pertinent entries: ServerRoot "c:\apache2" DocumentRoot "c:\apache2\htdocs" *The Issue:* events_startup.html executes correctly and displays the website home page either by entering my domain name into a browser or entering localhost/events_startup.html or by entering my IP address followed by events_startup.html. When I mouse click into the anytime.jpg image I receive the messages "The requested URL /cycle-login was not found on this server." "Error 404 Not Found". Thank you for your help. Robert It could be that you need to change: "cycle-login" to "cycle-login.php" in your html code and also make sure that cycle-login.php file resides in the root of the server. /a> Good luck. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Re: Error 404 Not Found
Did not resolve the issue. Thanks for trying... Robert - Original Message - From: "Good Guy" To: Sent: Saturday, December 07, 2013 3:42 PM Subject: [users@httpd] Re: Error 404 Not Found On 07/12/2013 00:44, Robert wrote: Apache 2.2 installed and running on my own Windows Vista 64bit SP2 computer. File events_startup.html initiates my website home page and it contains the following code: /a> File cycle-login is cycle-login.php and if working properly displays a login form. Mysql is read and username-password is validated. If successful user is presented with a second form for data input. Both these files reside in c:\apache2\htdocs. Contained in c:\apache2\conf\httpd.conf are following pertinent entries: ServerRoot "c:\apache2" DocumentRoot "c:\apache2\htdocs" *The Issue:* events_startup.html executes correctly and displays the website home page either by entering my domain name into a browser or entering localhost/events_startup.html or by entering my IP address followed by events_startup.html. When I mouse click into the anytime.jpg image I receive the messages "The requested URL /cycle-login was not found on this server." "Error 404 Not Found". Thank you for your help. Robert It could be that you need to change: "cycle-login" to "cycle-login.php" in your html code and also make sure that cycle-login.php file resides in the root of the server. /a> Good luck. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Re: Error 404 Not Found
On 07/12/2013 23:26, Robert wrote: Did not resolve the issue. Thanks for trying... Robert Does your server recognize any of the .php files? To test it, create a blank file and paste this code in it: Now save this file in your htdocs folder as "test.php" (without the quotes of course). Now try to load the file in your browser by typing: localhost/test.php If it loads then your server is setup to load php files; If it doesn't load then you know it is not set up correctly. By loading the file, you should get various php configuration details but you don't need to worry about it for now except that it should load correctly. -- Good Guy Website: http://mytaxsite.co.uk Website: http://html-css.co.uk Email: http://mytaxsite.co.uk/contact-us - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Re: Error 404 Not Found
Hi Good Guy, When I loaded test.php into the browser with localhost/test.php it only echoed the contents of test.php back. If I do the same thing with any .php file I have in htdocs the result is the same - echoes back the content of the file. If I type localhost/test I get the 404 error message... "The requested URL /test was not found on this server." Robert - Original Message - From: "Good Guy" To: Sent: Saturday, December 07, 2013 8:59 PM Subject: [users@httpd] Re: Error 404 Not Found On 07/12/2013 23:26, Robert wrote: Did not resolve the issue. Thanks for trying... Robert Does your server recognize any of the .php files? To test it, create a blank file and paste this code in it: Now save this file in your htdocs folder as "test.php" (without the quotes of course). Now try to load the file in your browser by typing: localhost/test.php If it loads then your server is setup to load php files; If it doesn't load then you know it is not set up correctly. By loading the file, you should get various php configuration details but you don't need to worry about it for now except that it should load correctly. -- Good Guy Website: http://mytaxsite.co.uk Website: http://html-css.co.uk Email: http://mytaxsite.co.uk/contact-us - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Seg fault when assigning value in AP_INIT_TAKE1 callback
Hello, Learning to create modules, I want to read configuration directives. I used the following example out of “The Apache Modules Book” (Nick Kew). It compiles fine, however, when I restart apache, I get segmentation fault: sudo service apache2 restart Segmentation fault (core dumped) Action 'configtest' failed. The Apache error log may have more information. …fail! log shows this: [Sun Dec 08 03:58:04 2013] [notice] child pid 30080 exit signal Segmentation fault (11), possible coredump in /etc/apache2 The fault seems to be a result of this line of code (no error results if it is removed): ((txt_cfg*)cfg)->header = val ; Here is my code (reduced to minimal test case): #include "httpd.h" #include "http_config.h" #include "http_protocol.h" typedef struct txt_cfg { const char* header ; const char* footer ; } txt_cfg; static const char* get_form_path(cmd_parms* cmd, void* cfg, const char* val) { ((txt_cfg*)cfg)->header = val ; return NULL ; } static const command_rec mod_cmds[] = { AP_INIT_TAKE1("CustomAuthFormPath", get_form_path, NULL, OR_ALL, "Path to custom authorization form"), { NULL } }; static void register_hooks(apr_pool_t *pool) { } module AP_MODULE_DECLARE_DATA customauthform_module = { STANDARD20_MODULE_STUFF, NULL, NULL, NULL, NULL, mod_cmds, register_hooks, }; If anyone knows the reason for this I would surely appreciate understanding. Thank you kindly, Allasso
Re: [users@httpd] Seg fault when assigning value in AP_INIT_TAKE1 callback
On 8 Dec 2013, at 04:17, Allasso Travesser wrote: > Hello, > > Learning to create modules, I want to read configuration directives. I used > the following example out of “The Apache Modules Book” (Nick Kew). It > compiles fine, however, when I restart apache, I get segmentation fault: So why not start with a complete example, then reduce it step-by-step to what you have? That way you see where it falls apart and figure out why what you just lost mattered. In this case ... > The fault seems to be a result of this line of code (no error results if it > is removed): > > ((txt_cfg*)cfg)->header = val ; … cfg needs to have been initialised, but ... > module AP_MODULE_DECLARE_DATA customauthform_module = > { > STANDARD20_MODULE_STUFF, > NULL, > NULL, > NULL, > NULL, > mod_cmds, > register_hooks, > }; … your initialisation function is NULL. (judging by the name of your module, maybe the now-standard mod_auth_form would be a good startingpoint for you?) -- Nick Kew - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org