Uploading Image - Livecode Tutorial Example? Sessions?

Mike Bonner bonnmike at gmail.com
Fri May 26 15:42:42 EDT 2017


I keep hoping for a server wide upgrade myself. I don't use the service all
that much so its not really a critical issue for me, but the one site that
IS actually up, and commercial and useful could be improved with an
alternate version.  I'll see if I can get the .htaccess example working ok,
and if so, then I'l think about potential changes.

Thanks for the previously working example.  Hopefully it will return to
being a currently working example.

On Fri, May 26, 2017 at 1:23 PM, Matthias Rebbe via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Mike,
>
> i just noticed that my lc server installation on TIO is not working
> anymore :(
>
> Tio is running LC Version 7.1  and that version always shows an empty
> $_post array when the posted data was formated with libUrlMultipartFormData
> I asked support for a server wide upgrade to a version which is able to
> handle that kind of posted data, but w/o success.
>
> So i installed LC DP6 on the 29th April, which is able to handle that kind
> of data,  and it worked w/o problems so far. I am not sure for how long it
> is not working anymore , but im pretty sure it worked at at least until
> last week.
>
> I really do not know what´s the problem is now, but i am really  peeved. I
> have really no time and no desire to check every day if it is still working.
>
> I think i have to move that domain also to HostM. Better and quicker
> support. Normal support requests are answered and solved within a few
> hours. The longest time for a reply was about  4 hours, the shortest 30
> minutes. Very good ticket system, so you can see all previous tickets in
> your customer account. And and and…
>
> Btw, if a customer can proof the purchase of a current commercial LC
> license they install  a version of choice of a commercial license  of LC
> server account wide. No need to install it for every domain / domain folder.
>
> Matthias
>
>
> > Am 26.05.2017 um 20:12 schrieb Mike Bonner via use-livecode <
> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
> >
> > Thank you!!
> >
> >
> > On Fri, May 26, 2017 at 11:39 AM, Matthias Rebbe via use-livecode <
> > use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
> wrote:
> >
> >> Mike,
> >>
> >> i have successfully intalled LC 9 DP6 on Tio Server using the .htaccess
> >> method.
> >>
> >> This is the content of my .htaccess
> >>
> >>        Directory index index.lc
> >>
> >>        Options -Indexes
> >>        Options ExecCGI
> >>
> >>        AddHandler livecode-script .rev .lc9 .lc
> >>        Action livecode-script /cgi-bin/livecode-server-9_0_0_dp_6
> >>
> >>
> >> Please note that you need to add this to each .htaccess file for each
> >> domain/domain folder.
> >>
> >> So if you use public_html for your main domain, e.g. mike.on-rev.com <
> http://mike.on-rev.com/> <
> >> http://mike.on-rev.com/ <http://mike.on-rev.com/>>,  and for an
> additional addon  domain, e.g.
> >> mikebonner.com <http://mikebonner.com/> <http://mikebonner.com/ <
> http://mikebonner.com/>>, a separate folder, e.g.
> >> /public_html/mikebonner
> >>
> >> then you need to place the .htaccess file and the lcserver binaries into
> >> public_html and also into the "2nd domain” folder
> /public_html/mikebonner.
> >>
> >> So if you have 50 addon domains and each  in its own folder and you want
> >> to use your own LC Server binaries for all 50 domains, then you have to
> >> copy .htaccess and LC Server into
> >> each of the 50 folders.
> >>
> >> Please find a screenshot of the permssions i´ve set for each file here:
> >> https://dl.webfactory.onl/permssions_lcserver.png <
> https://dl.webfactory.onl/permssions_lcserver.png> <
> >> https://dl.webfactory.onl/permssions_lcserver.png <
> https://dl.webfactory.onl/permssions_lcserver.png>>
> >>
> >> HTH,
> >>
> >> Matthias
> >>
> >>
> >> Matthias Rebbe
> >> +49 5741 310000
> >> ‌matthiasrebbe.eu <http://matthiasrebbe.eu/> <http://matthiasrebbe.eu/
> <http://matthiasrebbe.eu/>>‌
> >>
> >>
> >>
> >>> Am 26.05.2017 um 18:52 schrieb Mike Bonner via use-livecode <
> >> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> <mailto:use-livecode at lists.runrev.com <mailto:use-livecode at lists.
> runrev.com>>>:
> >>>
> >>> Theres another issue with on-rev.  Even if you set the sessionSavePath,
> >> it
> >>> won't work due to the default version of LC on on-rev.  You need to
> >>> override the version using an .htaccess file, but i've not managed to
> >>> actually get that to work for me.  Looking for the link that tells you
> >> how
> >>> to do this. If you actually get it to work please let me know how!
> >>>
> >>> http://lessons.livecode.com/m/4070/l/41105-how-do-i-choose- <
> http://lessons.livecode.com/m/4070/l/41105-how-do-i-choose->
> >> which-livecode-server-engine-to-use-with-on-rev <
> >> http://lessons.livecode.com/m/4070/l/41105-how-do-i- <
> http://lessons.livecode.com/m/4070/l/41105-how-do-i->
> >> choose-which-livecode-server-engine-to-use-with-on-rev>
> >>>
> >>> Unless they've updated the default version for .lc files, you'll need
> to
> >>> switch to a more recent version of the server to get sessions to work.
> >>>
> >>> On Fri, May 26, 2017 at 10:15 AM, JOHN PATTEN via use-livecode <
> >>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
> >> wrote:
> >>>
> >>>> I think I figured out the issue based on an old post by Sturgis…
> >>>>
> >>>> Apparently you have to set the sessionSavePath before you call the
> >> “start
> >>>> session.”
> >>>>
> >>>> set the sessionSavePath to the defaultfolder
> >>>>
> >>>> Forum discussion here:
> >>>>
> >>>> http://forums.livecode.com/viewtopic.php?f=15&t=10787&p= <
> >> http://forums.livecode.com/viewtopic.php?f=15&t=10787&p=>
> >>>> 50056&hilit=session#p50034 <http://forums.livecode.com/ <
> >> http://forums.livecode.com/>
> >>>> viewtopic.php?f=15&t=10787&p=50056&hilit=session#p50034>
> >>>>
> >>>> Cheers!
> >>>>
> >>>>
> >>>>> On May 26, 2017, at 8:39 AM, JOHN PATTEN via use-livecode <
> >>>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>
> >> wrote:
> >>>>>
> >>>>> Hello!
> >>>>>
> >>>>> Thanks for those that answered about the problem I was having with
> FTP.
> >>>> It was the URLEncode issue that was tripping me up.
> >>>>>
> >>>>> However, I’m changing gears as I hadn’t realized that I could not ftp
> >>>> directly into a htmlpublic directory on On-Rev. Ultimately I am trying
> >> to
> >>>> just create a little iOS app that will allow me upload and image and
> >> create
> >>>> a simple html page to display the image.
> >>>>>
> >>>>> I have been using the LiveCode tutorial here: “How do I use LiveCode
> >>>> graphics features server-side?” (http://lessons.livecode.com/ <
> >> http://lessons.livecode.com/>
> >>>> m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side
> <
> >>>> http://lessons.livecode.com/m/15262/l/156710-how-do-i-use- <
> >> http://lessons.livecode.com/m/15262/l/156710-how-do-i-use->
> >>>> livecode-graphics-features-server-side>)
> >>>>>
> >>>>> I can’t get this to work the “start session” included in the script?
> >>>>>
> >>>>> The example starts:
> >>>>> ---------------
> >>>>> <?lc
> >>>>> start session
> >>>>> ## enter the image file into our $_SESSION if one's just been
> uploaded
> >>>>> if $_FILES["imagefile"] is not empty then
> >>>>>        put url("binfile:" & $_FILES["imagefile"]["filename"]) into
> >>>> $_SESSION["imagedata"]
> >>>>> end if
> >>>>> if $_SESSION["imagedata"] is empty then
> >>>>>        printForm ## no image has been uploaded so display the form to
> >>>> upload one
> >>>>> else
> >>>>>        create image “myImage” …
> >>>>>
> >>>>> ————————
> >>>>>
> >>>>> If I take the “start session” out, the server script works, sort
> of…as
> >> I
> >>>> think it will upload the image, but because there is no session, you
> >> can’t
> >>>> manipulate the image.
> >>>>>
> >>>>> Has anybody got this example to work? I have tried moving the “start
> >>>> session” around to different areas of the server script, but that does
> >> not
> >>>> seem to work either.
> >>>>>
> >>>>> Thank you!
> >>>>> John Patten
> >>>>> SUSD
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> use-livecode mailing list
> >>>>> use-livecode at lists.runrev.com
> >>>>> Please visit this url to subscribe, unsubscribe and manage your
> >>>> subscription preferences:
> >>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>>> _______________________________________________
> >>>> use-livecode mailing list
> >>>> use-livecode at lists.runrev.com
> >>>> Please visit this url to subscribe, unsubscribe and manage your
> >>>> subscription preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>> _______________________________________________
> >>> use-livecode mailing list
> >>> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode <
> >> http://lists.runrev.com/mailman/listinfo/use-livecode>
> >>
> >>
> >> Matthias Rebbe
> >> +49 5741 310000
> >> ‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> Matthias Rebbe
> +49 5741 310000
> ‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list