Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Location
    Burnaby, BC, Canada
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    exec causes a CGI Error

    Hello,

    I am using php to dynamically write a bat file, which is then run using exec.

    But the problem is it returns this error:

    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

    that bat file consists of:

    iisvdir.vbs /create "Default Web Site" "asdf" "D:\Server\FTP\public_html\LocalUser\asdf"
    net user "asdf" "asdf" /add /fullname:"asdf" /passwordchg:no /expires:never
    net localgroup "web" "asdf" /add
    net localgroup "users" "asdf" /delete
    fsutil quota modify d:\ 20000000 20000000 "asdf"

    I've tried a few things, but can't figure it out. If someone can see my problem, or knows of a better way to run the commands, please let me know.

    Thanks
    'Programming is the only artform that fights back!'

  • #2
    New Coder
    Join Date
    Apr 2005
    Location
    Burnaby, BC, Canada
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I finally figured out the problem.

    The internet user didn't have permission to run the things i was running in my bat file.

    If the bat file doesn't work, it causes the cgi error.
    'Programming is the only artform that fights back!'


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •