Closed sngrl closed 3 years ago
@michaeldrennen you use DIRECTORY_SEPARATOR constant in two packages: Geonames & LocalFile.
Geonames requires Laravel, so it's possible to use dotenv features and change DIRECTORY_SEPARATOR
to env('DIRECTORY_SEPARATOR', DIRECTORY_SEPARATOR)
in the Geonames package source code, and don't forget to add line DIRECTORY_SEPARATOR=/
to .env file.
LocalFile package need to change too, in method split() - add optional attribute $directorySeparator with default value.
Hi, for fix this problema i added addslashes() to $absoluteLocalFilePathOfIsoLanguageCodesFile in the file IsoLanguageCode.php and it would be like this:
$absoluteLocalFilePathOfIsoLanguageCodesFile = addslashes(self::downloadFile($this, $remotePath, $this->connectionName));
The same for the following files: InsertGeonames.php -> $absolutePathToMasterTxtFile = addslashes($this->combineTxtFiles());
I hope it helps!!!
Hi, for fix this problema i added addslashes() to $absoluteLocalFilePathOfIsoLanguageCodesFile in the file IsoLanguageCode.php and it would be like this:
$absoluteLocalFilePathOfIsoLanguageCodesFile = addslashes(self::downloadFile($this, $remotePath, $this->connectionName));
The same for the following files: InsertGeonames.php -> $absolutePathToMasterTxtFile = addslashes($this->combineTxtFiles());
I hope it helps!!!
I use windows and I had the same problem but with the changes you mention works perfectly. Thanks @CamaleonGamer
Hi, for fix this problema i added addslashes() to $absoluteLocalFilePathOfIsoLanguageCodesFile in the file IsoLanguageCode.php and it would be like this: $absoluteLocalFilePathOfIsoLanguageCodesFile = addslashes(self::downloadFile($this, $remotePath, $this->connectionName)); The same for the following files: InsertGeonames.php -> $absolutePathToMasterTxtFile = addslashes($this->combineTxtFiles()); I hope it helps!!!
I use windows and I had the same problem but with the changes you mention works perfectly. Thanks @CamaleonGamer
Good thing it was helpful! Greetings!
I just committed some code that should fix this issue. @CamaleonGamer was on the right track. Let me know if this resolves the issue. If not, I will dust off my Windows machine and take a deep dive.
I just committed some code that should fix this issue. @CamaleonGamer was on the right track. Let me know if this resolves the issue. If not, I will dust off my Windows machine and take a deep dive.
Excellent, Thanks so much! @michaeldrennen
It seems like this problem is still here: https://github.com/michaeldrennen/Geonames/issues/18 PHP constant DIRECTORY_SEPARATOR on Windows system is backslash: "\" On MySQL query running it make a troubles: