Dear Berny,
Sorry, no joy - the problem seems to be on a different level.
I’ve tried a bit to look behind the scenes:
I’ll go through it for the “Explicit Midi Codes” link
Let’s distinguish three things first:
1. the rendering of a links as I see it
a) in the status line of the browser when I hover over the link in the page
b) in a browser address field after I clicked
c) the error-message the browser gives me
2. correctness of the elements of that link such that it actually points to and thus opens a file (a wrongly assembled link might still be syntactically correct)
3. What I see concerning that link looking at the html source generated by php (which I can ask the browser to show).
Let’s look at syntax first (are all slashes there? Are all words in the link spelt correctly?
1a)
Hover: This link is *syntactically* correct, all slashes are there (none lost) - YES, syntactically this is correct
1b)
Click the link: syntactically in the address bar the link is not displayed correctly. After php/ “..ctestsC:U…" all slashes are missing except one %08 - but after that the b of the word bolprocessor is missing - so there are multiple things fishy here (and no, I don’t have a folder “olprocessor” (the “belprocessor”-one I had the other day was just to amuse you and demonstrate that even the home-folder needn’t be “bolprocessor” - it has been back to normal right after that “trytwice” test.):
http://localhost:8080/bolprocessor/php/..ctestsC:UsersschueSites%08olprocessorctests-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_tempcycle2_codesmidicodes.txt <http://localhost:8080/bolprocessor/php/..ctestsC:UsersschueSites%08olprocessorctests-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_tempcycle2_codesmidicodes.txt>
1c)
And this is the error message of the browser: the link is even a bit more messy, there is this box in front of olprocessor which might be a hint why the b is missing.
2) now, the worst thing in that link is of course that at the beginning we have a correct http link down to …lessor/php/ , but then - o horror - first a syntacially incorrect segment that wants to redirect us to ../ctests but can’t, because it’s missing a slash, and then worst: now a full absolute link from c:/ all the way down to the textfile is added - and it’s syntactically broken on top of it.
3) Now a quick look in the html source the browser interprets gives a hint what the biggest problem seems to be related to: the (relative) html-link there is represented with backslashes (correct *windows* syntax, but on that level we actually *require* forward slash, because it’s html. So I guess you use code that generates “Windows paths” in literal html-generation. That explains the missing slashes in the links (though its weird that they’re there in the status line!!). This is clearly a mistake, but a mistake that is inconsequential on the Mac, because there the system path uses forward-slashes as well, so you get away with the mistake.
As to the question why something wrongly generates the path-segments after ctests as a absolute path, that starts from c:\.. again, I don’t know - maybe some str_replace operation fails to delete the front part of that path? But I’ve seen that “C:/Users….” In some forms as “value” - and that might also have to do with it. Shouldn’t those forms contain a relative path starting from the bolprocessor folder? Well - no idea. But I think there results a vague idea of what goes wrong here: it’s not a urlencode problem, it has to do with the question: when does php assembles Windows-paths (getcwd, using backslash and starting from C:\…., and when does it need to create html-paths, using strictly forward-slash and starting from /bolprocessor/… Currently it still puts Windows paths in places, where it should have converted them to html-paths. Vaguely in that direction it seems to point…).
So much from me. All the best - I also wish you the nicest holidays, and an enjoyable trip to Marseille!!! I haven’t been to France for 30 years, but that Camus/Sartre, Gitanne/Goulouise and French elegance-flair/nostalgy is still fully alive in me - I’d love to go there (unfortunately I hardly speak any French…). Enjoy, but stay safe!!
Yours with huggs
Rainer
> On 31. Jul 2020, at 23:45, Bernard Bel <ber...@gm...> wrote:
>
> Dear Rainer,
>
> I think I finally understand what is going wrong!
>
> When navigating with page "index.php", paths are often passed as GET instructions in the URLs. When these contain DIRECTORY_SEPARATORs, it is possible that the link will be messed up. Therefore I am now putting urlencode() and urldecode() everywhere to make sure that these URLs appear well-formed on all systems. All DIRECTORY_SEPARATORs are converted to "%2F" in the URL, then decoded back - hopefully with the proper encoding for separators!
>
> I think I have fixed it everywhere and uploaded a new version. But since I am navigating on Mac which is quite tolerant with encodings, the real check will be on Windows. No hurry, we'll finalize this point next week when I get close to a connection…
>
> In all this we should also take into account that this is not web navigation: our machines might behave differently when navigating on a local web server. Having everything fine on Mac with MAMPS doesn't prove it will be multiplatform. We're learning, aren't we ?
>
> All the best
>
> Bernard
>
> Rainer Schuetz wrote on 31/07/2020 21:05:
>>
>>
>>> On 31. Jul 2020, at 20:44, Bernard Bel <ber...@gm... <mailto:ber...@gm...>> wrote:
>>>
>>> You should not put anything else that the PHP files in the "php" folder…
>>
>> Of course not… Those paths don’t exist - they are constructed by php on Windows.
>>
>> My php-folder is exactly like yours - git would immediately tell me if something was differing. The only thing I get are these long lists of session folders/files in ctests which I remove before I change branches or something…
>>
>> Best
>> .r.
>>
>>
>>
>>
>>
>>
>>> Bernard
>>>
>>> Rainer Schuetz wrote on 31/07/2020 18:27:
>>>> With that latest version, I don’t get boxes any more but the slashes are still missing and a unneeded “bolprocessor” is robbed it’s b:
>>>>
>>>> /bolprocessor/php/olprocessorctests/-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_tempcycle2_codesmidicodes.txt
>>>>
>>>> And that “Play midi file” link, unfortunately I don’t get it at all…
>>>>
>>>> Best
>>>> .r.
>>>>
>>>>> On 31. Jul 2020, at 16:55, Bernard Bel <ber...@gm... <mailto:ber...@gm...>> wrote:
>>>>>
>>>>> Yes, this is a bit confusing.
>>>>>
>>>>> On Mac with a MAMP installation the absolute URL is always:
>>>>>
>>>>> http://localhost/try/bolprocessor/ <http://localhost/try/bolprocessor/> etc. (where 'try' would be the top folder)
>>>>>
>>>>> Anyway, it seems that the problem was sending a (possibly incorrect) absolute link to window.open().
>>>>>
>>>>> I have revised the entire code and replaced these with relative links. I uploaded the revised package…
>>>>>
>>>>> You will still need to verify that you get a "Play MIDI file" link on the prototype page (see attached picture).
>>>>>
>>>>> If it is not there it might mean that MIDI Library wasn't able to create the MIDI file, or the link is incorrect - but it is a relative link.
>>>>>
>>>>> If it is visible, check that clicking the link will play the sound. It may be very short and week, so use hearphones because these events are very short ones.
>>>>>
>>>>> We're slowly moving to compatibility ! ;-)
>>>>>
>>>>> Bernard
>>>>>
>>>>>
>>>>> Rainer Schuetz wrote on 31/07/2020 15:34:
>>>>>>
>>>>>>
>>>>>>> On 31. Jul 2020, at 15:11, Bernard Bel <ber...@gm... <mailto:ber...@gm...>> wrote:
>>>>>>>
>>>>>>> I'll reply the next part of your message in a separate mail.
>>>>>>
>>>>>> Yea, I realised my path-related descriptions were too messy to be helpful. So on Windows the correct path is:
>>>>>>
>>>>>> http://localhost:8080/bolprocessor/ctests/-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_temp/cycle2_codes/midicodes.txt <http://localhost:8080/bolprocessor/ctests/-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> The path generated in the browser:
>>>>>>
>>>>>> http://localhost:8080/bolprocessor/php/olprocessorctests/-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_tempcycle2_codesmidicodes.txt <http://localhost:8080/bolprocessor/php/olprocessorctests/-mi.abc1_l17f78gc0u0dn0k1aq4rsvttls_tempcycle2_codesmidicodes.txt>
>>>>>>
>>>>>> So it’s swallowing multiple slashes and and adding in stuff.
>>>>>>
>>>>>> On Mac displays as:
>>>>>>
>>>>>> users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> Which is an absolute path starting with the word “users” spelt wrong (Users) and maybe missing an initial slash. I can’t remember ever having seen such a path in a browser… not sure if it’s even allowed… But now I see that it’s the browser converts it to that. The manually corrected path:
>>>>>>
>>>>>> http:///Users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> Or
>>>>>>
>>>>>> http://Users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> Doesn’t open either. If absolute path is required, the only thing that opens for me is:
>>>>>>
>>>>>> file:///Users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <file:///Users/rs/Projects/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> But it would make much more sense to just use
>>>>>>
>>>>>> http://localhost/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://localhost/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> So the path generated by php for server-based http-access should be
>>>>>>
>>>>>> bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://localhost/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> Or (not sure)
>>>>>>
>>>>>> /bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt <http://localhost/bolprocessor/ctests/-mi.abc1_fevkrev7g7subcgk6ejfcetqp1_temp/cycle2_codes/midicodes.txt>
>>>>>>
>>>>>> Which opens just fine for me… But this is a bit confusing, and I really can’t think through it these days…. Very sorry (but the issues are there)
>>>>>>
>>>>>> Best
>>>>>> .r.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> bolprocessor-devel mailing list
>>>>>> bol...@li... <mailto:bol...@li...>
>>>>>> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel <https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel>
>>>>>
>>>>> <Screen Shot 2020-07-31 at 16.49.52 (2).png>_______________________________________________
>>>>> bolprocessor-devel mailing list
>>>>> bol...@li... <mailto:bol...@li...>
>>>>> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel <https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> bolprocessor-devel mailing list
>>>> bol...@li... <mailto:bol...@li...>
>>>> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel <https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel>
>>>
>>> _______________________________________________
>>> bolprocessor-devel mailing list
>>> bol...@li... <mailto:bol...@li...>
>>> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel <https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel>
>>
>>
>>
>>
>>
>> _______________________________________________
>> bolprocessor-devel mailing list
>> bol...@li... <mailto:bol...@li...>
>> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel <https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel>
>
> _______________________________________________
> bolprocessor-devel mailing list
> bol...@li...
> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel
|