www.centos.org Forum Index CentOS 6 - General Support Problem to open Microsoft Offce file (.xls, .doc) when download through php script
|
Bottom Previous Topic Next Topic |
| |
|
|
|---|
| Poster | Thread |
|---|
|
Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #1 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/5/16
From
Posts: 5
|
Dear All,
I've develop web server that running on Centos 6.2, PHP Version 5.3.13, Apache/2.2.15 and mysql 5.1.59, CMS: Joomla 1.5 and using component Jdownloads for upload & download file. I face some problem to open Microsoft Offce file (.xls, .doc) when download through php script. error message appear (The file are you trying to open, ' file.xls', is in different format than specified by the file extension. Verify that the file is not corrupted.......) The size is same with original file size.I try download direct to the server via ftp, file is ok, no corrupted, error appear when i download through php script. But when i download and open .pdf or .zip file is ok. no error message. i also try to install same joomla component in other hosting, it working fine, no error message when i download same Microsoft file. Seem like my develop server is not correctly encode Microsoft office file when i download through php script. My /etc/php.ini --> php.ini My /etc/httpd/conf/httpd.conf --> httpd.conf Any suggestion? Thanks |
||
Posted on: 2012/5/16 13:37
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #2 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/5/16
From
Posts: 5
|
Here my PHP info --> info.php
|
||
Posted on: 2012/5/16 16:08
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #3 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.
Quote:
Current CentOS versions are: Apparently you are using something other than standard CentOS packages, at least for php and mysql. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/5/16 17:21
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #5 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
One is an upgrade and one a downgrade. It appears you are using the aggressive and intrusive Atomic repo, so I would be reluctant to advise, and I really can't say if it would help with your issue with extensions in any case. Was just pointing out that you are outside known CentOS territory.
If more help is needed then please provide more information about your system by running "./getinfo.sh package" and showing us the output file, and perhaps explain why you found it necessary to use Atomic packages in place of core packages in the first place. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/5/17 11:04
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #6 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/5/16
From
Posts: 5
|
Thanks for your reply, After fail to downgrade my php version, i decide to format my server to Centos 5.8, I install php, mysql, phpmyadmin in my server. Below are detail of my php version
but unfortunately I still face some problem to open Microsoft Offce file (.xls, .doc) when download through php script. The file still corrupt. I try open the file using notepad, I found some blank space at the top of the file, i remove the blank space at the top and save to .xls. then document is ok, not corrupted, i try download .txt file, still some extra blank space at the top of file. I also try to install this component ( upload & download file component) to other hosting, is ok, no extra space in the top file when i download, and the file exactly same with original file (not corrupted) Seem like whatever i download my server add blank space at the top file, any suggestion? Thanks. |
||
Posted on: 2012/5/19 4:00
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #7 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
You now have a mix of packages from Jason Litka and Atomic. Either you did not install real CentOS-5.8 or you added 3rd party repos that replace core packages afterward. What media did you use to reinstall the server?
I still have no idea about whether or not your Microsoft files would work correctly without the foreign packages. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/5/19 16:20
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #8 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/5/16
From
Posts: 5
|
Ic, I download from centos website (http://www.centos.org/modules/tinycontent/index.php?id=32) ,then burn the .iso image to DVD, after i install centos 5.8 in my server, my php version is 5.1, then i try to yum update php, but the result is:
No Packages marked for Update So i decide to add 3rd party repos, so that i can update my php version, may in know what the trusted/stable repos? so that i can update my php version correctly. Thanks |
||
Posted on: 2012/5/19 17:08
|
|||
|
Re: Problem to open Microsoft Offce file (.xls, .doc) when download through php script | #9 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
Having no idea why you need to update from the distro packages it is difficult for anyone to advise, but whatever you do, you need to use a consistent set of packages from as few 3rd party repos as possible, and not mix incompatible repos. Atomic is particularly problematic to me because they replace lots of core packages, set themselves up as priority=1, and silently overwrite any user changes to the repo configs if their release package is updated. All around much too aggressive and presumptuous for my taste.
Please read about Installing Software and Repositories, and note the warnings and advice about installing and configuring the yum priorities plugin. Non-core repos should have a higher numeric value, which is a lower priority. Lower is "better" as in golf scores. If you can describe your requirements, and explain why the core packages do not meet them, then perhaps someone can advise on what repo[s] might best suit your needs. I will say that many people who need updates to core packages find IUS or Remi to be good sources. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/5/19 17:24
|
|||
Top Previous Topic Next Topic |
|



Topic options
Print Topic
Threaded
Newest First
myecho




You cannot start a new topic.
You can view topic.