PHP Uploads: Difference between revisions

678 bytes added ,  17:01, 23 February 2023
m
No edit summary
Line 36: Line 36:
== Configuration ==
== Configuration ==


In Cumulus MX Internet Settings just select PHP Upload instead of FTP etc.
#Run CMX and change the Upload protocol to PHP, set the URL to your web site + upload.php
 
#Copy the suggested unique "PHP Secret" from the Internet Settings (or make up your own)
<TODO> Add more detailed config here
#Edit the /webfiles/upload.php file, and change the default secret 'change_this_to_the_value_in_CMX' to the value in CMX
#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 (probably needs to be just “Reports”) and any Extra Files you use
#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


It is important to understand the relative paths used by ''upload.php'' as this is quite different from FTP configurations where sometimes full paths are required (SFTP) or paths from the FTP root (which may differ when full ownership or shared hosting). All files will be transferred relative to that location. You can go deeper and sideways into the directory tree but not up.
It is important to understand the relative paths used by ''upload.php'' as this is quite different from FTP configurations where sometimes full paths are required (SFTP) or paths from the FTP root (which may differ when full ownership or shared hosting). All files will be transferred relative to that location. You can go deeper and sideways into the directory tree but not up.
Line 44: Line 48:


=== Migrating your FTP settings ===
=== Migrating your FTP settings ===
<TODO>
- NOAA Reports
- Extra Files
- Disable 'Create local' copy unless required


- ????
When setting the Upload protocol to PHP you need to make the following upload settings relative as well:
#NOAA Reports
#Extra Web Files
#Disable 'Create local' copy unless required


NOTE: When the PHP-URL is configured you will need to set the ''Extra Webfiles'' paths and the ''NOAA'' path as well. And yes, not only when you use ''CMX'' but also for ''CumulusUtils''!
TODO : other entries??


NOTE: The settings And yes, not only when you use ''CMX'' but also for ''CumulusUtils''!


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