dp6319 2013-02-06 16:38
浏览 114
已采纳

为什么我的服务器不接受大于2MB的文件?

I have a VPS that runs XAMPP and gives service to an iPhone App that I made.

I used ASIHTTPRequest to upload files to the server.

The App sends files to the server, and the server accept only those who are lighter then 2MB.

I also checked with Wireshark and found this warning:

PHP Fatal error: Maximum execution time of 60 seconds exceeded in c:/xxx/index.php in line 2

in line 2 I wrote: session_start();

in my theory they are 2 things that block big files from entering my server:

  1. Some kind of file size limit
  2. Some kind of time limit per action

I really need help on this one. Thanks!

  • 写回答

4条回答 默认 最新

  • ds0678 2013-02-06 16:43
    关注

    Check the settings in your php.ini file which, when running XAMPP, can be found in the *root*/php/ directory.

    #Make sure file uploads are turned on
    file_uploads = On
    
    #Change the max upload size to 100Mb
    upload_max_filesize = 100M
    
    #Change the max post size to 100Mb
    post_max_size = 100M
    
    #Change the max upload time to 900seconds
    max_input_time = 900
    
    #This is where you are seeing your problem as the script execution is timing out.
    #Change the max execution time of the script to 900 seconds
    max_execution_time = 900
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突