Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long filenames can cause fatal errors in some Windows environments #294

Open
tamarazuk opened this issue May 25, 2018 · 7 comments
Open
Labels
Payment Gateway Payment gateway code or issues Question

Comments

@tamarazuk
Copy link
Contributor

Depending on the length of a site's root path, the framework's long filenames could result in fatal errors on Windows servers due to the maximum path length limitation.

I believe the longest file path in the framework is woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php which is why this is tagged with payment-gateway.

Other than renaming our files, is there any other way we can address this? Is there some way to increase that limitation at a server-level so we can add something to our documentation and support saved replies?

I recall I had a customer back in the day who downloaded the plugin and edited the file names with each update. This is definitely something I'd like to avoid recommending.

@tamarazuk tamarazuk added Question Payment Gateway Payment gateway code or issues labels May 25, 2018
@JulieSkyVerge
Copy link

I've seen this issue most recently reported in HS convo 89114 by a Windows user developing locally, with regards to the Bambora integration, where this partial path takes up 182/260 characters all on its own:

woocommerce-gateway-beanstream/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/api/interface-sv-wc-payment-gateway-api-payment-notification-tokenization-response.php

@ChaseWiseman
Copy link
Contributor

Looks like there are some config steps listed here: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation

I guess the limitation is lifted in Windows 10, but it's opt-in. Perhaps we can get one of these merchants to try that & cook up a support reply?

This won't be an issue down the line if we move to autoloading with proper PSR-4, but for now is just the nature of the WP naming standard.

@madriverweb
Copy link

Why are we having to deal with this problem? I submitted a ticket to SkyVerge through WooCommerce. The file is one letter too long. SkyVerge should fix this and be aware that it causes us this problem. I came here to see if other people were having the same problem and if the file might simply be available here.

@madriverweb
Copy link

And this has been a problem for over a year? The new plugin won't activate in our WP admin either, which is why I've attempted the download, unzip, and upload. You have gifted my client the plugin that replaces AIM, but they are paying me hundreds of dollars to try to install it. Can't you just make shorter filenames and upload a newer version of the plugin?

@unfulvio
Copy link
Member

unfulvio commented Sep 2, 2019

hey @madriverweb what's the email address you've used to contact SkyVerge?

Is your client using a Windows 10-based server or older? Apparently the issue may no longer exists in newer machines: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation

When the issue was originally reported here, we were still using non-namespaced class names in the framework (due to PHP 5.2 support requirement). We have since moved to namespace support in newer versions of the Framework and plugins as now the minimum required version is PHP 5.6 in WooCommerce. We didn't update the file names to match PSR standards as we're not fully leveraging class autoloading yet; shortening file names I suppose it's something we could look at again. Seems there weren't reports since the ones mentioned in OP probably due to recent Microsoft Servers improved filename handling and majority of servers running UNIX systems where the limitation never existed.

Please let me know the email address which you have used to contact SkyVerge, we can continue the conversation there, if you don't mind.

@madriverweb
Copy link

madriverweb commented Sep 4, 2019 via email

@godaddy-wordpress godaddy-wordpress deleted a comment from unfulvio Sep 4, 2019
@unfulvio
Copy link
Member

unfulvio commented Sep 5, 2019

@madriverweb gotcha, thanks for the update, we are going to follow up through support by email (just saw the messages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Payment Gateway Payment gateway code or issues Question
Projects
None yet
Development

No branches or pull requests

5 participants