O/H Jim Lucas έγραψε:
Thodoris wrote:
Hi guys. I am having a problem with opening xls files from a link
generated from php script. Let me analyze this:
I have two linux servers with apache (php,mysql etc) that are running
the same project. There is a part in this project that reads all the
files from a directory and generates the appropriate links to them.
These files are usually spreadsheets (xls) and when I open a file using
the link on the first machine it opens normally but when I open the file
from the second it is opened read only.
I have checked the rights and the ownership and they are the exact same
from the servers document root to the file itself.
Any ideas why is this happening?
Thodoris,
I would think the simple answer to this is, is that you had the document open
when you uploaded it.
Try uploading it again, this time without any application viewing it. This
should clear the "owned by" flag set when the document is open.
Their is no setting with Apache/PHP/Mysql/etc..-server side, that could cause
this problem!
It is specific to the file that is uploaded.
Try to copy (cmd line using scp or something) from the first (working) machine
to the second (not working) machine and try to view it then.
I think it is a simple mistake of uploading the file when you had it open.
Yes this the case thanks Jim. Well when you upload the file if it is
already opened then the browser uploads as read-only.
When you try to open it using linux it opens normally but when you open
it using windows then it detects the read-only attribute that
that was set before and it keeps it as read-only.
Windowz have their own way of things.
Thanks guys and sorry for the lame question I haven't though that it
would be so obvious.
Thodoris