Quantcast

Maximum PC

It is currently Sat Aug 23, 2014 2:51 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: CGI executable programming with VB6
PostPosted: Sun Jun 27, 2004 9:12 pm 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 8:56 pm
Posts: 170
Hello everyone, I'm attempting to write some CGI executables to be run on a WindowsXP/IIS 5.1 Server.

I've mastered writing some basic executables which run properly when tested in Netscape or IE. My next thing that I want to do is create a small poll program. I have no problem sorting out who votes for what. My only problem is writing a file to the hard drive of the server computer.

No matter what I do, I receive an error saying "Path/File access error Error Number = 75"

I have no trouble using VB6 to input a file by doing:

Open app.path & "/stats.txt" for input as #1

input #1, blah
input #1, blah2
etc etc

Close #1

As soon as I try doing "Open app.path & "/stats.txt" for output as #1" I get the error mentioned above. I make sure that I've done a close #1 from the input before hand so it's not like #1 is still open. Is there some other way to write to the hard drive? I've made sure that in IIS built into WinXP that the cgi-bin can run executables (not just scripts) by right clicking on the cgi bin in the tree view of my web site and going to properties. Also, in the box above where you select if scripts, executables or nothing has execute permissions, there is a box which has several options in it. Read and write are currently enabled in this box as well.

So if someone has experience doing cgi executables in Windows and knows what I'm talking about... please help

:D

Thanks again all.


Top
  Profile  
 
 Post subject: Re: CGI executable programming with VB6
PostPosted: Wed Jun 30, 2004 11:10 am 
I'd rather be modding!
I'd rather be modding!
User avatar

Joined: Fri Jun 25, 2004 3:47 pm
Posts: 3731
Location: Las Vegas
I do not have the required experience - but since no-one else is posting....

Can you print the contents of the file to screen while the program is running?

Some languages require that the file already exists.

Simplify the path - so if its a character or length issue in the path its eliminated.

Do not use "#" or special characteris in the file name. (I just noticed you are not doing this - so its for others I guess)

oh yeah - use the complete path

I doubt it, but it might need exe privy to work

Manta


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 11:52 am 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 7:11 am
Posts: 124
Location: 127.0.0.1
not sure, but does the CGI normally use a fake username like dbuser, or webuser? it is probably that the username doesn't have permission to write to the disk. you may want to double check on that.

also, for scripting like ASP, I normally see people using filesystem objects, something like Filesystem.create (can remember the exact name) to create a new file, instead of using open xxx for input as #1.

you may want to check out some other forums for programming, like www.devx.com


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 2:41 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
A good start would be looking into what Error Number = 75 means. Just curious, does VB require you to use some form of exception handling to read or write to a file?


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 2:44 pm 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 7:11 am
Posts: 124
Location: 127.0.0.1
I believe 75 is the same as path/file access error.

in old VB (up to VB6), there is no exception handling... you can turn on error handling by using a statement such as

on error goto ...

but generally it is not required, unlike in VB.NET or Java.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 2:57 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
emanresu wrote:
I believe 75 is the same as path/file access error.

in old VB (up to VB6), there is no exception handling... you can turn on error handling by using a statement such as

on error goto ...

but generally it is not required, unlike in VB.NET or Java.


Gotta love a nice vague error message... :?

In that case, I would make sure I could read and write using a regular app and then migrate to the cgi app.

So VB.NET has checked exceptions now? Those damn thieves... :twisted:


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 4:08 pm 
Little Foot
Little Foot

Joined: Sun Jun 27, 2004 7:11 am
Posts: 124
Location: 127.0.0.1
ha ha... understand your feelings...

when I saw vb.net... I had the same reaction... but I didnt use THAT word. instead, i said "wow! finally microsoft made a smart move to make .NET apps like java."


Top
  Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 8:43 pm 
Bitchin' Fast 3D Z8000*
Bitchin' Fast 3D Z8000*
User avatar

Joined: Tue Jun 29, 2004 11:32 pm
Posts: 2555
Location: Somewhere between compilation and linking
They should have called it .JET instead... :)


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group