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/ 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
>>>>>
>>>>> The path generated in the browser:
>>>>>
>>>>> 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
>>>>>
>>>>> But it would make much more sense to just use
>>>>>
>>>>> 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...
>>>>> 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
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> bolprocessor-devel mailing list
>>> bol...@li...
>>> 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
>
>
>
>
>
> _______________________________________________
> bolprocessor-devel mailing list
> bol...@li...
> https://lists.sourceforge.net/lists/listinfo/bolprocessor-devel
|