Changes

From SME Server
Jump to navigationJump to search
2,238 bytes removed ,  10:46, 8 November 2007
Line 41: Line 41:  
==Upload size limit bug==
 
==Upload size limit bug==
 
Must document that on the Wiki:
 
Must document that on the Wiki:
  Max allowed packet value is set to 50M with a custom-template by the RPM.
+
  Max allowed packet value is set to 10M.
This should allow to upload comfortable package size.
     −
I didn't test to upload such file size to confirm this is working as expected...
  −
=> can we really upload files greater than 10MB?
  −
=> if yes, what happens at 50.1MB (just curious lol)
   
  => impact of setting such large value on the server?
 
  => impact of setting such large value on the server?
=> create a DB entry in ocs to set this value and improve the custom-template to allow dynamic changes? This can't be bad!
   
  => lower this value maybe?
 
  => lower this value maybe?
   −
Cool34000
+
No need to create a custom template: DB values already exist for this! They are hidden in php.ini templates ''40DataHandling'' and ''60FileUploads''
----
  −
with ver -5, there is still a 10mb limit, below fixes, but having a db value would be better
     −
<Directory /opt/inventory/ocs/ocsreports>
+
php Values can be changed with the following:
  # SSLRequireSSL on
+
  config setprop php UploadMaxFilesize 50M PostMaxSize 50M
  AddType application/x-httpd-php .php .php3 .phtml
+
  expand-template /etc/php.ini
  Options None
+
  signal-event ocsglpi-update
  Options +Indexes
  −
  Options +Includes
  −
  order deny,allow
  −
  deny from all
  −
  allow from xxxxxxxxxxxxxx
  −
  php_admin_value open_basedir /opt/inventory/ocs:/tmp
  −
  + php_admin_value post_max_size 40M
  −
  + php_admin_value upload_max_filesize 40M
  −
  </Directory>
     −
+ php_admin_value upload_max_filesize $ocs{MaxUpload}  (untested)
+
Worked for me!
 
  −
stephen
  −
----
  −
I was also testing this right now... Just figured out modifications to my.cnf are useless (still locked at 10M)
  −
Got these info from www/ocs/install.php
  −
WARNING: You will not be able to build any auto deployment package with size greater than 10M.
  −
You must raise both post_max_size and upload_max_filesize in your php.ini to correct this.
  −
  −
WARNING: The user you typed does not seem to be root
  −
If you encounter any problem with files insertion, try setting the global max_allowed_packet mysql value to at least 2M in your server config file.
  −
 
  −
I've tested these without success:
  −
#--------------------------------------------------------------
  −
# OCS Inventory Next Generation
  −
#--------------------------------------------------------------
  −
Alias /download /opt/inventory/ocs/download
  −
Alias /ocs      /opt/inventory/ocs/ocsreports
  −
{
  −
    if (exists $ocs{'URL'})
  −
      { $OUT .= "Alias  /$ocs{'URL'} /opt/inventory/ocs/ocsreports"; }
  −
}
  −
  −
<Directory /opt/inventory/ocs/download>
  −
  Options None
  −
  Options +Indexes
  −
  Options +Includes
  −
  AllowOverride None
  −
  order deny,allow
  −
  deny from all
  −
  allow from { $localAccess }
  −
  php_admin_value open_basedir /opt/inventory/ocs/download:/tmp
  −
  php_admin_value post_max_size { $ocs{PhpLimit} }M
  −
  php_admin_value upload_max_filesize { $ocs{PhpLimit} }M
  −
</Directory>
  −
Values expand correctly, but I still get an error page...
  −
 
  −
Did it worked for you? I still can upload a 24MB file (-> getting an error
  −
 
  −
Should we directly modify php.ini with a custom-template? I saw defaut values set to 20M (post max size) and 10M (max upload filesize)
      
Cool34000
 
Cool34000
498

edits

Navigation menu