digitalmars.D.learn - [Kinda OT] httpd permissions
- Nathan M. Swan (17/17) Apr 25 2012 How do I deal with this (on OSX); are CGI programs not allowed to
- Nicolas Sicard (3/22) Apr 25 2012 Have you checked that your web server has write access to
- Nathan M. Swan (5/7) Apr 25 2012 Yes, it works now, thanks!
- Marco Leise (6/15) Apr 26 2012 D is not a virtual machine language. You have to compile your code to ex...
- Joseph Rushton Wakeling (7/20) Apr 26 2012 Isn't it considered bad practice in modern web design to have _any_ file...
- Marco Leise (5/8) Apr 26 2012 Yes, rdmd is one of the tools that compile your code. It's just not like...
- H. S. Teoh (20/30) Apr 26 2012 File extensions in URLs are a thing of the 90's. Nowadays webserver
- Adam D. Ruppe (7/10) Apr 26 2012 On Apache, you can do something like this in your
How do I deal with this (on OSX); are CGI programs not allowed to write to files? How to change this? Thanks, NMS test.d: import std.stdio; void main() { writeln("Content-type: text/plain\r\n\r\nHello, World!"); } error log: [Wed Apr 25 00:03:01 2012] [error] [client ::1] sh: /Users/nathanmswan/Sites/test.d.deps: Permission denied [Wed Apr 25 00:03:01 2012] [error] [client ::1] Failed: dmd -v -o- '/Users/nathanmswan/Sites/test.d' -I'/Users/nathanmswan/Sites' >/Users/nathanmswan/Sites/test.d.deps [Wed Apr 25 00:03:01 2012] [error] [client ::1] Premature end of script headers: test.d
Apr 25 2012
On Wednesday, 25 April 2012 at 18:11:16 UTC, Nathan M. Swan wrote:How do I deal with this (on OSX); are CGI programs not allowed to write to files? How to change this? Thanks, NMS test.d: import std.stdio; void main() { writeln("Content-type: text/plain\r\n\r\nHello, World!"); } error log: [Wed Apr 25 00:03:01 2012] [error] [client ::1] sh: /Users/nathanmswan/Sites/test.d.deps: Permission denied [Wed Apr 25 00:03:01 2012] [error] [client ::1] Failed: dmd -v -o- '/Users/nathanmswan/Sites/test.d' -I'/Users/nathanmswan/Sites'Have you checked that your web server has write access to /Users/nathanmswan/Sites/ ?/Users/nathanmswan/Sites/test.d.deps[Wed Apr 25 00:03:01 2012] [error] [client ::1] Premature end of script headers: test.d
Apr 25 2012
Have you checked that your web server has write access to /Users/nathanmswan/Sites/ ?Yes, it works now, thanks! NMS P.S. Sorry this might be in the wrong forum, but now I can advertise my homepage as "index.d" instead of compiling it and having it be "index.cgi"
Apr 25 2012
Am Thu, 26 Apr 2012 05:44:59 +0200 schrieb "Nathan M. Swan" <nathanmswan gmail.com>:D is not a virtual machine language. You have to compile your code to execute it. (In case that was unclear.) As for the extension, that is probably a configuration option of your web server. Search for CGI extensions or .cgi and add .d there. -- MarcoHave you checked that your web server has write access to /Users/nathanmswan/Sites/ ?Yes, it works now, thanks! NMS P.S. Sorry this might be in the wrong forum, but now I can advertise my homepage as "index.d" instead of compiling it and having it be "index.cgi"
Apr 26 2012
On 26/04/12 15:52, Marco Leise wrote:Am Thu, 26 Apr 2012 05:44:59 +0200 schrieb "Nathan M. Swan"<nathanmswan gmail.com>:... don't see why you shouldn't use rdmd.D is not a virtual machine language. You have to compile your code to execute it. (In case that was unclear.)Have you checked that your web server has write access to /Users/nathanmswan/Sites/ ?Yes, it works now, thanks! NMS P.S. Sorry this might be in the wrong forum, but now I can advertise my homepage as "index.d" instead of compiling it and having it be "index.cgi"As for the extension, that is probably a configuration option of your web server. Search for CGI extensions or .cgi and add .d there.Isn't it considered bad practice in modern web design to have _any_ file extension visible? Or at least any file extension that hints at the underlying software. If nothing else, it's bad for future-proofing of URLs. What happens when you switch your site from D to D++ in the year 2025? :-)
Apr 26 2012
Am Thu, 26 Apr 2012 16:12:05 +0200 schrieb Joseph Rushton Wakeling <joseph.wakeling webdrake.net>:Yes, rdmd is one of the tools that compile your code. It's just not like you call up a .php and it executes in a virtual machine _instead_ of _compiling_ and executing native code. -- MarcoD is not a virtual machine language. You have to compile your code to execute it. (In case that was unclear.)... don't see why you shouldn't use rdmd.
Apr 26 2012
On Thu, Apr 26, 2012 at 04:12:05PM +0200, Joseph Rushton Wakeling wrote:On 26/04/12 15:52, Marco Leise wrote:[...]File extensions in URLs are a thing of the 90's. Nowadays webserver technology makes it possible (and desirable) to drop them altogether. That way, you can implement the initial version of your page as page.pl, then later change it to page.php when you upgrade, and yet later change it to page.d, all without affecting your users or links to that page in the least. If you use something similar to Apache's autoindex, you can even replace it with page/index.d when you decide that the page needs some separate subpages, WITHOUT needing to edit URLs all over the place. (Besides, URL means "*Universal* resource locater": it's not supposed to change without good reason!) T -- A linguistics professor was lecturing to his class one day. "In English," he said, "A double negative forms a positive. In some languages, though, such as Russian, a double negative is still a negative. However, there is no language wherein a double positive can form a negative." A voice from the back of the room piped up, "Yeah, yeah."As for the extension, that is probably a configuration option of your web server. Search for CGI extensions or .cgi and add .d there.Isn't it considered bad practice in modern web design to have _any_ file extension visible? Or at least any file extension that hints at the underlying software. If nothing else, it's bad for future-proofing of URLs. What happens when you switch your site from D to D++ in the year 2025? :-)
Apr 26 2012
On Thursday, 26 April 2012 at 03:45:01 UTC, Nathan M. Swan wrote:P.S. Sorry this might be in the wrong forum, but now I can advertise my homepage as "index.d" instead of compiling it and having it be "index.cgi"On Apache, you can do something like this in your .htaccess: Options +ExecCGI <Files "app"> SetHandler cgi-script </Files>
Apr 26 2012