PHP Uploads: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
916 bytes added ,  01:34, 2 September 2023
m
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 9: Line 9:
It can transfer both text and binary files.
It can transfer both text and binary files.


If the ''upload.php'' file is installed for CMX and the protocol works for CMX then it will also work for CUtils and the file locations will be relative to the location of the ''upload.php'' file (which therefore will be the root location of your website).  
If the ''upload.php'' file is installed for CMX and the protocol works for CMX then it will also work for CUtils and the file locations will be relative to the location of the ''upload.php'' file (which therefore will be the root location of your website).
 
'''Note''': It is not a requirement to change to using the PHP Upload method. The previous FTP/FTPS/SFTP methods remain fully supported and operational.


== Is it secure? ==
== Is it secure? ==
Line 34: Line 36:
:* If any updates fail, then only the cumulative data since the last successful transfer is sent.
:* If any updates fail, then only the cumulative data since the last successful transfer is sent.
:* It uses data compression over the network
:* It uses data compression over the network
== Disadvantages? ==
* It requires PHP support from your web provider - though most do
:* Some web providers may not permit all the PHP methods that are required to implement this method
* You need to change your upload paths to use the new method - make a copy of your cumumulus.ini file so you can easily revert


== Configuration ==
== Configuration ==
Line 42: Line 49:
#Copy the '''/webfiles/upload.php''' to your web server, place it in the root folder of the default web site along with the index.html files etc
#Copy the '''/webfiles/upload.php''' to your web server, place it in the root folder of the default web site along with the index.html files etc
#You will need to update the paths for the NOAA Reports (it probably needs to be just “Reports”)
#You will need to update the paths for the NOAA Reports (it probably needs to be just “Reports”)
#Amend the paths of any Extra Files you upload
#Amend the paths of any Extra Files you upload (it probably needs to be just the remote file name)
#The uploads should start working!
#The uploads should start working!
#You can now disable all the "Create local" options for files in Internet Settings|Interval Settings. Local copies of the files created in the /web folder are no longer required
#You can now disable all the "Create local" options for files in Internet Settings|Interval Settings. Local copies of the files created in the /web folder are no longer required
Line 70: Line 77:


This option should only be used if you are certain, you need it, and ideally you can restrict the PHP process file system permissions to the areas you want data written.
This option should only be used if you are certain, you need it, and ideally you can restrict the PHP process file system permissions to the areas you want data written.
=== CumulusUtils ===
The CUtils inifile parameter ''UploadDir'' specifies a subdirectory for CUtils relative to the webroot (the location of ''upload.php'') without any specification of the URL (as that is implicit in the use of ''upload.PHP'' as specified in ''Cumulus.ini''). If you wish all files to be transferred into the same directory as specified by CMX, then leave ''UploadDir'' empty.


== Cumulus.ini ==
== Cumulus.ini ==

Navigation menu