Page 1 of 1

fopen() not functioning properly

Posted: Thu May 08, 2008 1:21 am
by Chirayu
Hello friends,

I am facing a strange problem within my application.

The application is meant for handling Word and PowerPoint documents. On the page, there is a input field provided where the file path for the document is displayed. If the value in the input field is changed, then the php script will try to determine first whether the document is open or not by opening that document in append mode using fopen(). If the document is open then it will return an error message and restore old path.

Also there is a "View" button provided on the page. When a user clicks on the "View" button, the VBScript will open the Word or PowerPoint document in read-only mode to which the "View" button is linked.

Once the document is opened in read-only mode by clicking the "View" button, if I change the file path for Word document then the php scripts return error message every time I change the file path and restores the old path. However for PowerPoint document, the php script returns error message on for the first time only and in the subsequent try it moves the document, even when it is open in read-only mode.

I am using Windows 2003, IIS 6.0, FastCGI, PHP 5.2.4 and MSSQL Server 2000.

Please help me.

Thanks

Chirayu

Re: fopen() not functioning properly

Posted: Fri May 09, 2008 8:31 pm
by JAB Creations
Hi Chirayu and welcome to DevNetwork.

You should consider reading the forum titles before you post.

General Forum description...
This forum is not for asking programming related questions.
I'd recommend posting the issue (along with more code if possible) in the PHP Code forum.

I also highly recommend copying the exact error message with the exception of anything proprietary (such as function or variable names so essentially copy only the generic part of the error message), go to Google, paste the error message, and encase it within quotes.

Good luck!

Re: fopen() not functioning properly

Posted: Sat May 10, 2008 1:12 am
by RobertGonzalez
Moved to PHP - Code.