[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Downloading File from Server 0/kb

Posted on 2013-01-24
12
Medium Priority
?
489 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:Nathan Riley
  • 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 12

Author Comment

by:Nathan Riley
ID: 38815691
Where would I check that?
0
 
LVL 12

Author Comment

by:Nathan Riley
ID: 38815727
Also I'm running plesk panel.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 12

Author Comment

by:Nathan Riley
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
 
LVL 12

Author Comment

by:Nathan Riley
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 12

Author Comment

by:Nathan Riley
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 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

830 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