Solved

Downloading File from Server 0/kb

Posted on 2013-01-24
12
418 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
echo button 13 48
Link SQL table to Webpage 9 39
uploading multiple image with php 14 20
Getting info from database not working 6 19
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

15 Experts available now in Live!

Get 1:1 Help Now