Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Okay, I am just trying to get it to work. I keep getting the following error message:

CGIWrap Error: Execution of this script not permitted

Execution of (exercise5) is not permitted for the following reason:

Script is not a regular file

Server Data:

Server Administrator/Contact: system@nova.umuc.edu 
Server Name: nova.umuc.edu 
Server Port: 80 
Server Protocol: HTTP/1.1 
Virtual Host: nova.umuc.edu 

Request Data:

User Agent/Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 ( ) 8868058803 system:4.02190 JobsSearchToolbar/1.2 
Request Method: GET 
Remote Address: 209.183.235.178 
Remote Port: 19687 
Extra Path Info: /new2.php 

It is rather infuriating. Please see my below simple code. What am I doing wrong guys?? HELP??!!??

This is my code:

           #!/usr/local/bin/php

           <?php
             print "hello, world"   
           ?>

           <?xml version = "1.0" encoding = "utf-8"?>
           <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

           <html xmlns="http://www.w3.org/1999/xhtml">
           <head>
           </head>
           <body>
           </body>
           </html>

This is my link: http://nova.umuc.edu/cgi-bin/cgiwrap/ct386a28/exercise5/new2.php

Is it me or is it actually easier to code "stuff" sometimes than to actually configure it? I dunno. . .

share|improve this question
    
The error messages say little about your server type. Normally PHP is used with mod_php and does not require to be located in the cgi-bin/ directory. If you have to do so, give that script a .cgi extension over .php, make it executable, and remove the leading spaces in the first line before #!/usr/bin/.. –  mario Apr 12 '11 at 18:23
    
"Getting" how? What are you doing when you receive this error? How do you receive it? –  Lightness Races in Orbit Apr 12 '11 at 18:27
1  
I'd talk to your UMUC.EDU IT guys, personally. This is something specific to your [somewhat unusual] server configuration for scripts. –  Lightness Races in Orbit Apr 12 '11 at 18:28
add comment

migrated from stackoverflow.com Apr 12 '11 at 18:37

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

So basically after talking tech support, I realized that Filezilla was uploading the files as binary instead of ASCII. I actually had to go log into the NOVA Unix server and do change the file using: dos2unix new2.php new2.php. Once I did that it worked!!! Who would have known? That had nothing to do with programming!!!! It was all config stuff. But at least it works! Thank you to everybody who tried to help me!

share|improve this answer
add comment

When the compiller says your script is not a aregular file, it means it needs to be changed or converted to another file format where it can be read. The computer science department of UNN has more info on this.

share|improve this answer
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  slm Apr 16 '13 at 11:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.