Invalid Declarations .zip archive

Dear all,

after creating a site, I’m trying to upload files to it. The very first file I’m trying to upload is the “Declarations” one. No “Declarations” files were previously uploaded.
I prepared a shapefile containing the needed fields and I zipped .dbf, .prj, .shp, .shx files into the same archive.
I set up “Parcel ID cols”, “Holding ID cols” and " Crop code cols" in the Upload Files window, and then I selected that .zip file to be uploaded. I’m receiving this message:

“Error #103: Upload error for file <file_name>.zip : Error preprocessing uploaded file <file_name>.zip for lpis. Error was: Your file is not a valid .zip archive!”

I tried several times, even:

  • including also .cfg, .sbn, .sbx files into the .zip archive;
  • changing fields type from String to Numeric (integer);
  • using different software to create the .zip archive.

Where am I wrong?

Thank you in advance

Dear @laterza,

Could it be that you are zipping a folder containing the needed files instead of zipping directly the needed files? When you unzip your archive, do you get directly the files, or a folder containing the files?

Best regards,

Philippe

Dear Philippe,

thank you for your quick answer. I do zip four files, not a folder containing them.
Just some minutes ago I noticed that there are several subfolders into /mnt/upload/ <site_name> (e.g.: sen4cap_1617181423415, sen4cap_1617183203533, sen4cap_1617185250694, etc.): probably each of them is the result of each attempt I did uploading the “Declarations” file. Each one of these folders contains a zipped file whose name is the same as the one I tried to upload as “Declarations”. None of these .zip files seems to be valid.

Hello,

Can you check the system logs when you are uploading the parcels (via journalctl)? Or, if you prefer, you can share with me the parcels dataset so that I can have a look (philippe.malcorps@uclouvain.be).

Best regards,

Philippe

Dear Philippe,

Here is an excerpt from journalctl, hoping this excerpt is enough.

  • The directory from which I asked Sen4CAP to take the .zip archive is: /mnt/upload/_declarations/
  • The .zip archive I selected is: AVEPA_1000_sa_v3.zip (it contains a shapefile with the same name)
  • The site name is: AVEPA_1000.

Mar 15 14:06:08 CentOS7-x64 dbus[747]: [system] Activating service name=‘org.fedoraproject.Setroubleshootd’ (using servicehelper)
Mar 15 14:06:08 CentOS7-x64 dbus[747]: [system] Successfully activated service ‘org.fedoraproject.Setroubleshootd’
Mar 15 14:06:08 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from name_connect access on the tcp_socket port 5432. For complete SELinux messages run: sealert -l a37a836e-f00d-4bb0-ae4
Mar 15 14:06:08 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from name_connect access on the tcp_socket port 5432.

                                       *****  Plugin catchall_boolean (47.5 confidence) suggests   ******************
                                       
                                       If you want to allow httpd to can network connect
                                       Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean.
                                       
                                       Do
                                       setsebool -P httpd_can_network_connect 1
                                       
                                       *****  Plugin catchall_boolean (47.5 confidence) suggests   ******************
                                       
                                       If you want to allow httpd to can network connect db
                                       Then you must tell SELinux about this by enabling the 'httpd_can_network_connect_db' boolean.
                                       
                                       Do
                                       setsebool -P httpd_can_network_connect_db 1
                                       
                                       *****  Plugin catchall (6.38 confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed name_connect access on the port 5432 tcp_socket by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000. For complete SELinux messages run: sealert -l 6ff493eb-6f83-4504-82b2-52bd2
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000.

                                       *****  Plugin restorecon (99.5 confidence) suggests   ************************
                                       
                                       If you want to fix the label. 
                                       avepa_1000 default label should be mnt_t.
                                       Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the follo
                                       Do
                                       # /sbin/restorecon -v avepa_1000
                                       
                                       *****  Plugin catchall (1.49 confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed write access on the avepa_1000 directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000. For complete SELinux messages run: sealert -l 6ff493eb-6f83-4504-82b2-52bd2
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000.

                                       *****  Plugin restorecon (99.5 confidence) suggests   ************************
                                       
                                       If you want to fix the label. 
                                       avepa_1000 default label should be mnt_t.
                                       Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the follo
                                       Do
                                       # /sbin/restorecon -v avepa_1000
                                       
                                       *****  Plugin catchall (1.49 confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed write access on the avepa_1000 directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000. For complete SELinux messages run: sealert -l 6ff493eb-6f83-4504-82b2-52bd2
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from write access on the directory avepa_1000.

                                       *****  Plugin restorecon (99.5 confidence) suggests   ************************
                                       
                                       If you want to fix the label. 
                                       avepa_1000 default label should be mnt_t.
                                       Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the follo
                                       Do
                                       # /sbin/restorecon -v avepa_1000
                                       
                                       *****  Plugin catchall (1.49 confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed write access on the avepa_1000 directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from read access on the directory sen4cap_1617429382005. For complete SELinux messages run: sealert -l 4d983722-0445-4b84-
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from read access on the directory sen4cap_1617429382005.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed read access on the sen4cap_1617429382005 directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from create access on the file AVEPA_1000_sa_v3.zip.part. For complete SELinux messages run: sealert -l 1c973015-f3a7-417b
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from create access on the file AVEPA_1000_sa_v3.zip.part.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed create access on the AVEPA_1000_sa_v3.zip.part file by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from create access on the file AVEPA_1000_sa_v3.zip.part. For complete SELinux messages run: sealert -l 1c973015-f3a7-417b
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from create access on the file AVEPA_1000_sa_v3.zip.part.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed create access on the AVEPA_1000_sa_v3.zip.part file by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:09 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from getattr access on the file /mnt/upload/avepa_1000/sen4cap_1617429382005/AVEPA_1000_sa_v3.zip.part. For complete SELin
Mar 15 14:06:09 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from getattr access on the file /mnt/upload/avepa_1000/sen4cap_1617429382005/AVEPA_1000_sa_v3.zip.part.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed getattr access on the AVEPA_1000_sa_v3.zip.part file by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:10 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing httpd from remove_name access on the directory AVEPA_1000_sa_v3.zip.part. For complete SELinux messages run: sealert -l d12063d4-a65b-4b8d
Mar 15 14:06:10 CentOS7-x64 python[31191]: SELinux is preventing httpd from remove_name access on the directory AVEPA_1000_sa_v3.zip.part.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed remove_name access on the AVEPA_1000_sa_v3.zip.part directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:11 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing httpd from remove_name access on the directory AVEPA_1000_sa_v3.zip.part. For complete SELinux messages run: sealert -l d12063d4-a65b-4b8d
Mar 15 14:06:11 CentOS7-x64 python[31191]: SELinux is preventing httpd from remove_name access on the directory AVEPA_1000_sa_v3.zip.part.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed remove_name access on the AVEPA_1000_sa_v3.zip.part directory by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:11 CentOS7-x64 setroubleshoot[31191]: SELinux is preventing /usr/sbin/httpd from read access on the file AVEPA_1000_sa_v3.zip. For complete SELinux messages run: sealert -l 9eb498a7-a4e7-4b77-9845-9
Mar 15 14:06:11 CentOS7-x64 python[31191]: SELinux is preventing /usr/sbin/httpd from read access on the file AVEPA_1000_sa_v3.zip.

                                       *****  Plugin catchall (100. confidence) suggests   **************************
                                       
                                       If you believe that httpd should be allowed read access on the AVEPA_1000_sa_v3.zip file by default.
                                       Then you should report this as a bug.
                                       You can generate a local policy module to allow this access.
                                       Do
                                       allow this access for now by executing:
                                       # ausearch -c 'httpd' --raw | audit2allow -M my-httpd
                                       # semodule -i my-httpd.pp

Mar 15 14:06:15 CentOS7-x64 sen2agri-monitor-agent[1260]: No such file or directory

Dear Philippe,

I also tried with sample data downloaded from Sen4CAP website “Data” section (Example of the full range of data to upload in the system to be able to use all the Sen4CAP processors), first creating a site uploading 01_site_extent.zip, and then trying to upload Declarations as NLD_2019_parcels_31UFU_31UFT.zip.
I’m always getting the same error, so I suppose the problem isn’t on my shapefiles.

Moreover, I noticed that also downloaded Sentinel products are written to invalid .zip archives (e.g.: 7 Sentinel-1 products were downloaded as .zip archives, but each of them is about 14 - 65 kB and all of them are invalid).
Do you believe this strange behaviour on Declarations and Sentinel files is due to some problems with .zip archives creation on my machine?

Hello,

Looking at the logs, it is a problem in the system configuration and not a problem with the parcels layer. Another user had this problem and Cosmin proposed a few potential solutions -> Adding a new site. Maybe you can contact also the user that had this problem.

Philippe

Hello Philippe,

thank you for your tip.
I looked to the potential solutions suggested by @cudroiu, but I already successfully added a site. The trouble with this site is that I can’t successfully upload Declarations.

  • 777 access to /mnt/upload is ok (I can see the site shapefile inside this folder).
  • httpd service is running.
  • I’m getting no errors by checking the gdal bindings.

All I can see is an invalid .zip file in /mnt/upload/<site_name>/sen4cap_<some_numbers>
The name of this invalid .zip file is the same of the valid .zip file I tried to upload in Declarations.

Do you have any other suggestion about other settings / log I can check?

Hello,

Could you please check that the zip file does not contain a folder where the shapefile is located, instead of having the shapefile directly in the zip archive?
If possible, could you provide the zip file containing the declarations that you try to upload, in order to have a look?

Best regards,
Cosmin

Hello Cosmin.

The input Declarations zip archive contains the shapefiles’s four files (.dbf, .prj, .shp, .shx), not a folder.
Sorry, but I can’t upload this zip file.
As I said, I also tried with sample data downloaded from Sen4CAP website “Data” section (Example of the full range of data to upload in the system to be able to use all the Sen4CAP processors) and I’m getting the same error.

Kind Regards

Could you post the messages in the httpd error log during the upload, please?

sudo cat /var/log/httpd/error_log
or
sudo tail -f /var/log/httpd/error_log

Best regards,
Cosmin

Dear Cosmin,

I tried to upload Declarations one more time, then I executed the commands you suggested.

Here is the message after the first command:

[Sun Mar 21 03:42:02.159664 2021] [lbmethod_heartbeat:notice] [pid 1259] AH02282: No slotmem from mod_heartmonitor
[Sun Mar 21 03:42:02.169273 2021] [mpm_prefork:notice] [pid 1259] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Sun Mar 21 03:42:02.169281 2021] [core:notice] [pid 1259] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Mon Mar 22 21:17:02.670425 2021] [mpm_prefork:notice] [pid 1259] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Mar 25 10:58:19.483031 2021] [core:notice] [pid 1277] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 25 10:58:19.485495 2021] [suexec:notice] [pid 1277] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::1856:9fa0:dda5:441d. Set the ‘ServerName’ directive globally to suppress this message
[Thu Mar 25 10:58:19.596586 2021] [lbmethod_heartbeat:notice] [pid 1277] AH02282: No slotmem from mod_heartmonitor
[Thu Mar 25 10:58:19.925380 2021] [mpm_prefork:notice] [pid 1277] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Thu Mar 25 10:58:19.925412 2021] [core:notice] [pid 1277] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Mar 25 10:59:19.544758 2021] [mpm_prefork:notice] [pid 1277] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Mar 25 11:00:20.057956 2021] [core:notice] [pid 1259] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 25 11:00:20.060356 2021] [suexec:notice] [pid 1259] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 10.0.2.15. Set the ‘ServerName’ directive globally to suppress this message
[Thu Mar 25 11:00:20.095896 2021] [lbmethod_heartbeat:notice] [pid 1259] AH02282: No slotmem from mod_heartmonitor
[Thu Mar 25 11:00:20.141634 2021] [mpm_prefork:notice] [pid 1259] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Thu Mar 25 11:00:20.141654 2021] [core:notice] [pid 1259] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Mar 25 11:01:30.057560 2021] [:error] [pid 4291] [client ::1:50526] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/login.php
[Thu Mar 25 11:01:30.057607 2021] [:error] [pid 4291] [client ::1:50526] [], referer: http://localhost/login.php
[Thu Mar 25 11:09:35.235048 2021] [:error] [pid 4297] [client ::1:50906] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 11:09:35.235102 2021] [:error] [pid 4297] [client ::1:50906] {“upload_sitename”:“Test_5000”,“upload_siteid”:“11”,“succ_up_files”:"",“err_up_files”:"",“upload_msgs”:"",“upload_year”:“2020”,“change_upload_year”:“Change year”}, referer: http://localhost/create_site.php
[Thu Mar 25 11:11:16.052262 2021] [:error] [pid 1494] [client ::1:51064] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 11:11:16.052342 2021] [:error] [pid 1494] [client ::1:51064] PHP Warning: date_create(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 773, referer: http://localhost/create_site.php
[Thu Mar 25 14:49:04.802656 2021] [mpm_prefork:notice] [pid 1259] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Mar 25 14:49:58.630976 2021] [core:notice] [pid 15073] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 25 14:49:58.631590 2021] [suexec:notice] [pid 15073] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using fe80::1856:9fa0:dda5:441d. Set the ‘ServerName’ directive globally to suppress this message
[Thu Mar 25 14:49:58.652761 2021] [lbmethod_heartbeat:notice] [pid 15073] AH02282: No slotmem from mod_heartmonitor
[Thu Mar 25 14:49:58.663197 2021] [mpm_prefork:notice] [pid 15073] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Thu Mar 25 14:49:58.663212 2021] [core:notice] [pid 15073] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Mar 25 14:50:15.375250 2021] [:error] [pid 15078] [client ::1:58790] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 14:50:15.375350 2021] [:error] [pid 15078] [client ::1:58790] PHP Warning: date_create(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 773, referer: http://localhost/create_site.php
[Thu Mar 25 15:09:15.944185 2021] [:error] [pid 15077] [client ::1:59466] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 15:09:15.944263 2021] [:error] [pid 15077] [client ::1:59466] [], referer: http://localhost/create_site.php
[Thu Mar 25 15:09:33.595619 2021] [mpm_prefork:notice] [pid 15073] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Mar 25 15:54:56.880147 2021] [core:notice] [pid 1267] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Mar 25 15:54:56.896599 2021] [suexec:notice] [pid 1267] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 10.0.2.15. Set the ‘ServerName’ directive globally to suppress this message
[Thu Mar 25 15:54:56.944477 2021] [lbmethod_heartbeat:notice] [pid 1267] AH02282: No slotmem from mod_heartmonitor
[Thu Mar 25 15:54:57.123982 2021] [mpm_prefork:notice] [pid 1267] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Thu Mar 25 15:54:57.124010 2021] [core:notice] [pid 1267] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Mar 25 16:21:33.227509 2021] [:error] [pid 9002] [client ::1:55428] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/login.php
[Thu Mar 25 16:21:33.227595 2021] [:error] [pid 9002] [client ::1:55428] [], referer: http://localhost/login.php
[Thu Mar 25 16:21:42.973322 2021] [:error] [pid 9078] [client ::1:55524] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 16:21:42.973377 2021] [:error] [pid 9078] [client ::1:55524] {“upload_sitename”:“Test_5000”,“upload_siteid”:“11”,“succ_up_files”:"",“err_up_files”:"",“upload_msgs”:"",“upload_year”:“2020”,“change_upload_year”:“Change year”}, referer: http://localhost/create_site.php
[Thu Mar 25 16:23:50.714745 2021] [:error] [pid 1563] [client ::1:55680] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 16:23:50.714887 2021] [:error] [pid 1563] [client ::1:55680] PHP Warning: date_create(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 773, referer: http://localhost/create_site.php

And here is the message after the second command:

AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 10.0.2.15. Set the ‘ServerName’ directive globally to suppress this message
[Thu Mar 25 15:54:56.944477 2021] [lbmethod_heartbeat:notice] [pid 1267] AH02282: No slotmem from mod_heartmonitor
[Thu Mar 25 15:54:57.123982 2021] [mpm_prefork:notice] [pid 1267] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured – resuming normal operations
[Thu Mar 25 15:54:57.124010 2021] [core:notice] [pid 1267] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Mar 25 16:21:33.227509 2021] [:error] [pid 9002] [client ::1:55428] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/login.php
[Thu Mar 25 16:21:33.227595 2021] [:error] [pid 9002] [client ::1:55428] [], referer: http://localhost/login.php
[Thu Mar 25 16:21:42.973322 2021] [:error] [pid 9078] [client ::1:55524] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 16:21:42.973377 2021] [:error] [pid 9078] [client ::1:55524] {“upload_sitename”:“Test_5000”,“upload_siteid”:“11”,“succ_up_files”:"",“err_up_files”:"",“upload_msgs”:"",“upload_year”:“2020”,“change_upload_year”:“Change year”}, referer: http://localhost/create_site.php
[Thu Mar 25 16:23:50.714745 2021] [:error] [pid 1563] [client ::1:55680] PHP Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 780, referer: http://localhost/create_site.php
[Thu Mar 25 16:23:50.714887 2021] [:error] [pid 1563] [client ::1:55680] PHP Warning: date_create(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/create_site.php on line 773, referer: http://localhost/create_site.php

I think your issue is related to the SELinux which is enabled on your machine.
Do you have any particular reason to keep it enabled or you can disable it?
If you can disable it, you can do it as below:

sudo setenforce 0
sudo sed -i -e ‘s/SELINUX=enforcing/SELINUX=permissive/’ /etc/selinux/config

Best regards,
Cosmin