Solved

Downloading File from Server 0/kb

Posted on 2013-01-24
12
429 Views
Last Modified: 2013-02-11
In my application I'm able to upload and download files on our development server.

Moved it to our live server and I'm still able to upload, but when downloading all the files I get are 0/kb in size.  Almost like a permissions error to download or something, but I don't get an error.

When I FTP to the server I see the file there and if I download via FTP the file opens fine.

Do I need to allow apache access or something on my live server?  I'm on CENTOS.
0
Comment
Question by:N R
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 15

Expert Comment

by:Ess Kay
ID: 38815660
sounds like you indeed do have a permission problem,

check your configurations for downloads, something there is deffinately stopping it
perhaps you have a limit enabled of 0
0
 
LVL 11

Author Comment

by:N R
ID: 38815691
Where would I check that?
0
 
LVL 11

Author Comment

by:N R
ID: 38815727
Also I'm running plesk panel.
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 38817102
Might be something related to firewall? Could you please stop iptables on server and give it a try ?

service iptables stop

Open in new window


Or if any other firewall is installed, just stop it and see the results.

If it doesn't help, please check the apache error logs.  Logs can be located at the following location on server.

/var/www/vhosts/domainname.com/statistics/logs/error_log

Open in new window


Cheers!!!
0
 
LVL 11

Author Comment

by:N R
ID: 38817217
Tried #1 still didn't fix.

Tried #2 and there hasn't been a new error in there in months.

Any other ideas?
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 38817394
Thanks for the update. Just to confirm, are you trying to download large files? If yes, what is the file size? Have you tried downloading a small file?

Is this server dedicated & do you have full access?

Cheers!!!
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 11

Author Comment

by:N R
ID: 38817413
Yes I have full access.

Nope small files less than 1 meg, images, excel, word docs ect....
0
 
LVL 13

Expert Comment

by:LinuxGuru
ID: 38817603
Could you please list the permission of download folder & files here?

You can use the following command through shell.

cd /directory
ls -al

Open in new window


Thanks!
0
 
LVL 16

Expert Comment

by:grahamnonweiler
ID: 38817633
Have you checked your PHP error log?

It is possible that PHP is causing the error, and not Apache. For instance, if you are using "readfile()" have you checked that your PHP scripts have the correct path information?

Is the PHP implementation and configuration on your test server the same as your production server?
0
 
LVL 11

Author Comment

by:N R
ID: 38819383
Where is the php log file?
0
 
LVL 16

Expert Comment

by:grahamnonweiler
ID: 38821419
Check your PHP.INI file for the location of the log file.
0
 
LVL 13

Accepted Solution

by:
LinuxGuru earned 500 total points
ID: 38823725
You should be able to locate php.ini using the following command.

php -i | grep php.ini

Open in new window


Cheers!!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Echo vs ?><?php  html code 4 45
phpmyadmin 3 32
Before I get too far.. best way to save dates data 4 14
using php variable inside javascript 5 11
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now