File Uploader Extention MainWp

Hello, I have a bit of an odd problem and would greatly appreciate some guidance from the wizzards.

The File Uploader Extention seems to be quite happy with uploading files to most of the sites in my MainWP group but for some reason all the sites on one particular VPS instance are rejecting the file upload with the following error.

“Upload failed. Please make sure the site is connected properly.”

Oddly the File Uploader creates the directory on the server but refuses to upload the 6k .txt file (Where there are plenty file size and time resources are available).

The other sites on the other VPS happily accept the File Uploader and all the site connections seem fine and other functions work. IE when I run a remote post to one of the sites with a featured image it uploads the content and image file with no problems, it’s just the File Uploader extention and only on one of my servers.

I have been through all the php configs between the VPS’s and tried to see discrepencied in the PHP config (as I setup my VPS pretty much on the same platforms and with the same control panels and resources). There is a difference in PHP versions but all higher than 8.

The public folder file permissions are the same as the working VPS’s and wordpress directories are writable all the wordpress health checks seem fine etc.

I’m a little stumped at this point. The File Uploader works beautifully on all the other servers it’s just this one problem child. Any assitance or insights would be greatly appreciated.

Hey @Kadabra

What’s the PHP version on the affected VPS server?

And is there anything else that might be different on that VPS compared to the other servers?

For example, do sites on that VPS have a plugin installed that other sites do not that might be causing a conflict?
Is Cloudflare being used for those sites or some other cloud proxy firewall?
Is there any security rule enabled on it that isn’t enabled on other servers?

Thanks Bojan

Sites are very lean no plugins apart from SEO yoast and classic editor. Some have elementor page builders but nothing significantly different from the other servers. The PHP versions across the servers are mostly 8 and up.

All the sites across the servers have CloudFlare no special configs all set to full encryption with a SSL cert from let’s encrypt server side.

Firewall I’m going to purge in the morning but no special configs there but I might actually try specificly whitelist the mainwp servers IP and see what happens.

The setups on mainWP ran so smoothly and everything else seems to work seemlessly just this one silly server.

Sometimes a bit of pointing in the right direction goes a long way. Will update after the firewall whitelist.

2 Likes

After a few distractions I have hopped back onto this task.

The MainWP Child Server Information Report there is a Warning under SSL Warnings in PHP v 8.1.7

SSL Warnings = empty error:2406F079:random number generator:RAND_load_file:Cannot open file Warning

If I switch to the other version of php on the server 8.0.19 the SSL Warnings go away. yet am still unable to upload.

The php version on the working sites is 7.4.21 & 8.0.20 If I upgrade a site to 8.1.10 it reproduces the same warning error in the MainWP Child Information Dashboard, yet the File Upload still processes successfully. (even with the warning)

I checked the SSL certificate with the suggested https://www.sslshopper.com/ssl-checker.html as outlined on the Knowledge Base and everything seems fine.

I have had a look at the server firewalls and allowed all connections from the Main WP server IP address and vice versa on the MainWP server back to the Child servers.

I have also disabled CloudFlare and put it into development mode and re-tested the File Uploader with each change and still not uploading the file.

I have re-synced the Child and Server a dozen times and everything is connected and works.

The thing that puzzels me the most is that it creates the folder on the server, but it refuses the file upload itself. I have tried changing the text file with a small image and it still refuses the upload, but happily creates the folder on the server.

Thanks for the update.

It is also possible that there’s a security rule present on the Dashboard that’s blocking the child sites on that VPS from downloading the zip.

Can you temporarily disable any security rules you may have on the Dashboard (plugins, server firewalls, .htaccess rules), and also temporarily disable cloud proxies such as Cloudflare and see if that helps?

You may also whitelist the Dashboard in Cloudflare: Whitelist your MainWP Dashboard in Cloudflare Firewall - MainWP Documentation

If that doesn’t help, can you set up a test MainWP Dashboard on a different server, and then add one of the affected child sites to it, and try using File Uploader?
That way, we could verify the potential security issue between the current Dashboard and Child sites on that VPS.

Thank Bojan for the help.

Yes I have whitelisted the IP and Referrer in CloudFlare WAF, and allowed the IP on my local server Firewall, went as far as to disable CloudFlare and setup the API keys.

I suspect it’s not a firewall issue as it allows the File Uploader to create the folder on the server, and the server permits other file uploads (as in post images from MainWP server etc).

I will check on how the licencing works on MainWP server, I think I have it setup for just one site. If that works it could well be a solution.

Appreciate your feeback.

1 Like

MainWP license doesn’t impose any limitation on the number of installs.

Let us know how it goes.

Thanks Bojan

I installed the MainWP on the server itself and connected the local sites again ± 30 odd sites.

Still the same error with the File Uploader on the sites that exist on that VPS.

I added a couple of sites NOT on that VPS and the File Uploads with no problem. The only thing I can think is that somthing is amiss with the PHP settings of that VPS.

I will continue investigating.

1 Like

I notice on the non workng VPS running php 8.1.7 it has the following Disabled Functions in PHP

, pcntl_alarm, pcntl_async_signals, pcntl_exec, pcntl_fork, pcntl_get_last_error, pcntl_getpriority, pcntl_setpriority, pcntl_signal, pcntl_signal_dispatch, pcntl_signal_get_handler, pcntl_sigprocmask, pcntl_sigtimedwait, pcntl_sigwaitinfo, pcntl_strerror, pcntl_wait, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifcontinued, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig,

And the following extentions loaded

Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, pspell, readline, session, shmop, soap, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib

On the working VPS it has no disabled functions and these loaded extentions

Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apc, apcu, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, pspell, readline, session, shmop, soap, sockets, sodium, standard, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib

Could this be related?

Humm I updated the php version on the working server to 8.1.9 and it replicates the disabled extentions and still allows file uploads.

That would indicate that the disabled PHP extensions are not the culprit.

It may still be a Firewall issue, but not the firewall on the child site, but rather on the Dashboard.
Folder creation and file upload are somewhat different processes. File upload is essentially a file download from the Dashboard to the child site.

So it’s possible that a security rule on the Dashboard, which can include a firewall, is blocking this download request.

Do you have any other servers available except for the troubled VPS and the original server where the Dashboard was located to try temporarily installing a fresh Dashboard? If yes, please try doing so, and then add one of the affected child sites to it and then try using the File Uploader.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.