revTalk - iRev - revWeb - PHP - iPhone and back again

15 messages Options
Embed this post
Permalink
Thomas McGrath III-3

revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
Overview:
I have been plugging away at writing an iPhone application that  
manipulates photos and uploads them online (why I have been so silent  
on the list for awhile). And except for a major confusion working with  
the internal database (still unresolved) I have been able to get  
everything else working.

What I can do so far is load a view on the iPhone and take a picture  
or use a picture from the camera/library on the iPhone, add a  
background, a frame and some text from a database. I can also edit the  
text in a table and save to a user file in the device. Lastly, I can  
email and SMS the final image to another phone or computer and NOW I  
can send the picture up to rev-online via a 'borrowed' PHP script.

What I would like to do is have either iRev or a revWeb standalone  
'know' when new images are uploaded and display them in the browser  
for users to see and show. I would also like to have iRev/revWeb send  
out a push notification to another iPhone application (the image  
viewer) so that viewers will know that other users have uploaded new  
pictures. I am studying up on the push notification on the iPhone side.

The Problem:
The problem is that I , like a lot of other revTalk developers, am  
clueless when it comes to PHP and iRev and the how's and why's and  
where's of how all of these tie together. What with learning from  
scratch all of the objective-c code I really haven't had the time to  
also learn PHP and even if I had, figuring out how to tie them all  
together for what I want is a daunting task. There are no books or  
videos or tutorials on how to accomplish these things. I am getting  
little tid-bits from this list like the great explanation recently on  
linux/apache.

In the past I could just download a sample stack and tear it apart and  
'see' how it all works but now there are so few examples of each of  
these "as they are related to each other" that I just don't know where  
to turn. We revver's  have such a unique product line and being able  
to integrate this with HTML, CSS, PHP, Javascript, CGI, Wordpress,  
etc. and for my case being able to use iRev to handle incoming images  
from my iPhone application and then possibly sending/handling the push  
notification back, there is such opportunity for this if only we can  
put it all together.

I just don't know any "HTML, CSS, PHP, Javascript, mySQL, SQLite,  
Javascript, CGI, Wordpress, Objective-C, C++, Apache, on-rev server,  
iRev RevTalking" experts. I think we are to be the first.

I am willing to share what I have learned on the objective-c side (it  
is so cool being able to send an image to my own on-rev server from my  
own phone) and I need to get up to date on how the rest ties together.  
The bigger picture as it were but with enough details to work it out.  
I will eventually figure it out, but wouldn't it be great if we had a  
way to put it all together in one place. The shared expertise of all  
on this list directed towards individual multi-part objectives to be  
shared by all. The big picture. A sort of zoomQuilt for RevTalkers.

Warmest regards,

Tom McGrath III
Lazy River Software
[hidden email]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html






_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Shao Sean-2

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
Not having used server-side rev yet (when will this be released for us  
to install on our own servers?) all I can tell you is that this is  
easy to do with Rev CGIs (or even a compiled Rev app running -ui)
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Alex Tweedly

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thomas McGrath III-3
Thomas McGrath III wrote:

> Overview:
> I have been plugging away at writing an iPhone application that
> manipulates photos and uploads them online (why I have been so silent
> on the list for awhile). And except for a major confusion working with
> the internal database (still unresolved) I have been able to get
> everything else working.
>
> What I can do so far is load a view on the iPhone and take a picture
> or use a picture from the camera/library on the iPhone, add a
> background, a frame and some text from a database. I can also edit the
> text in a table and save to a user file in the device. Lastly, I can
> email and SMS the final image to another phone or computer and NOW I
> can send the picture up to rev-online via a 'borrowed' PHP script.
>
When you say "rev-online" I take it you mean on-rev ?

Sarah has an example on her wonderful on-rev samples page (
http://www.troz.net/onrev/ ) of a script to upload pictures.
I'm not clear on how the iPhone sends the pictures via a borrowed PHP
script - but it might be easy to convert this irev script to match it.
(If you like, email me the PHP script and I'll have a look at an iRev
equivalent to it).
> What I would like to do is have either iRev or a revWeb standalone
> 'know' when new images are uploaded and display them in the browser
> for users to see and show. I would also like to have iRev/revWeb send
> out a push notification to another iPhone application (the image
> viewer) so that viewers will know that other users have uploaded new
> pictures. I am studying up on the push notification on the iPhone side.
>
If you can convert the upload mechanism to iRev then you're (almost) done.

If not, you could run a rev script periodically (say one per minute or
once per 10 minutes) to check for the latest pictures, and then update
or push data accordingly. You could do this, as Shao Sean suggested via
a cgi or compiled rev app tun with -ui --- but that would be new
territory for me. You could write an iRev script that checks for new
photos (uploaded since the last time the script ran) and pushes them out
(that's pretty easy). And then you could trigger that script
periodically, using a cron job with curl.

(cron is simply a Unix mechanism to run the same command line app or
command at regular intervals, such as every so many minutes or hours (or
days, months, ...))

To do this, go into cPanel, click on "cron jobs" in the "Advanced"
section. Then click on "standard" for experience level, and fill in the
(pretty obvious) values, with the "command to run:" line being
     curl http://www.mysitename.com/myscript.irev

-- Alex.

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Sarah Reichelt-2

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thomas McGrath III-3
On Wed, Nov 4, 2009 at 11:44 PM, Thomas McGrath III <[hidden email]> wrote:

> Overview:
> I have been plugging away at writing an iPhone application that manipulates
> photos and uploads them online (why I have been so silent on the list for
> awhile). And except for a major confusion working with the internal database
> (still unresolved) I have been able to get everything else working.
>
> What I can do so far is load a view on the iPhone and take a picture or use
> a picture from the camera/library on the iPhone, add a background, a frame
> and some text from a database. I can also edit the text in a table and save
> to a user file in the device. Lastly, I can email and SMS the final image to
> another phone or computer and NOW I can send the picture up to rev-online
> via a 'borrowed' PHP script.

Great work. I too have spent some months struggling with Objective-C.
It's not bad as C goes - at least the IDE is nice to use - but it
seems to take ages to do things which are so easy in Rev...

> What I would like to do is have either iRev or a revWeb standalone 'know'
> when new images are uploaded and display them in the browser for users to
> see and show.

Not quite sure what you have in mind here, but it doesn't sound too difficult.
Did you want a web page that only shows the recent images?
Or a web page that shows the last x images, but updates itself if
there are new ones?

Showing the most recent images is easy enough - you can use standard
Rev commands to list the long files in the images folder and sort by
date to get the new ones.
A web page can be set to refresh periodically by including a REFRESH
meta tag, but this is probably not what you want.

I have a slideshow page that uses AJAX to ask an iRev file for the
html to display next. The iRev file lists the images, picks one
randomly, works out the size so it can construct a valid HTML img tag,
then sends that tag back to the AJAX call. This uses JavaScript to set
the innerHTML of a div tag to show the new image. There is a
JavaScript timer so this happens every 5 seconds.
It sounds worse than it is, but you can see it in action here:
<http://www.troz.net/onrev/samples/slideshow.irev>

What you could do is have an iRev file that just returned true or
false depending on whether there were any new images.
If it returned false, the web page could just set up a new timer and wait.
if it returned true, the web page could ask another iRev file for the
details of the images to display and then display them.


> I would also like to have iRev/revWeb send out a push
> notification to another iPhone application (the image viewer) so that
> viewers will know that other users have uploaded new pictures. I am studying
> up on the push notification on the iPhone side.

Sorry, I haven't done any investigations of the push mechanism yet.
But if your uploading script can trigger an iRev script, I'm sure it
can do whatever is needed to push data.

I would not worry about PHP if I were you. iRev is a good replacement
for server-side scripting which is what PHP does.
You will need some JavaScript if you need any client-side scripting
i.e. timers, reactions to clicks on the web page, AJAX etc.

Please send more detail on what you really need and I'm sure we can
start to work out some scripts.

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Claudi Cornaz

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thomas McGrath III-3
Hi Thomas,

I just started with irev and mysql. I know how you must feel. I can  
program quite fluently in revtalk
and if something doesn't work as expected, which happens fairly often,
I always know at least 2 or more ways to tackle the problem or to  
solve it in a different way.

But now  I am getting on 'new' ground: irev, connections, ports,  
mysql, cgi, css, htm, etcl.
And all these things need to work together aswell and suddenly I find  
myself looking all over the place to find 'trivial' things,
that is, trivial once you know them.

The first hurdle being where to look, where can you find what you  
need. Copying bits and pieces from code you find,
trying to fit it all together. It's like walking through molasses,  
till you sudenly discover that you're no longer walking but
somehow you've started swimming, and now that you look more closely it  
is not mollasses at all, but it's something like ... water.
(and now that you're really taking attention you notice that you have  
turned into ... a fish)

Well anyway here are some pieces of what I tried and failed.

include "../lib/ccStats.irev"  -- failed with "FTP error file "/
testing/..//lib/cc_PageStats.irev" not present.
         the include call was made from a page in the "testing"  
folder. Why that folders name is added I don't know

include "http://claudi.on-rev.com/lib/cc_PageStats.irev"          -    
fails

I also tried: include "/home/claudi/public_html/lib/
cc_PageStats.irev"   which for some reason first failed and later on  
it worked
    no idea why it first failed but I've been changing and trying all  
kinds of things which I don't all recall and in which order,
    so probably I first did something stupid.

I also tried some more complicated crazy things to no avail but what  
those where,  I don't know anymore.

So it looks like I can use: include "/home/claudi/public_html/lib/
cc_PageStats.irev"
or what I use now:
set the defaultFolder to $_Server["DOCUMENT_ROOT"]
include "lib/cc_PageStats.irev"

I hope this helps
   Best wishes,
    Claudi



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Andre Garzia-3

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Hi Claudi,

The piece below will not work. RevServer include command works with the file
system and has no knowledge of HTTP. Having a include command that worked
over a network, could pose a security issue since it would open a bad
secured server to cross site scripting. Yes in the desktop we can do go
stack url and start using it which is basically the same thing but a
standalone is in compiled form so it is harder to change the source in it.
RevServer is scripting, text files, if someone manage to change a line there
to include a remote file, all hell breaks loose...


> include "http://claudi.on-rev.com/lib/cc_PageStats.irev"          -
> fails
>

Cheers
andre

--
http://www.andregarzia.com All We Do Is Code.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Alex Tweedly

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
In reply to this post by Claudi Cornaz
Claudi Cornaz wrote:

>
> Well anyway here are some pieces of what I tried and failed.
>
> include "../lib/ccStats.irev"  -- failed with "FTP error file
> "/testing/..//lib/cc_PageStats.irev" not present.
>         the include call was made from a page in the "testing" folder.
> Why that folders name is added I don't know
>
> include "http://claudi.on-rev.com/lib/cc_PageStats.irev"          -  
> fails
>
I think that was a misleading error message, in that it was a failure
that occurred when the on-rev client tried to download the included file
to allow you to view/edit it. I suspect this because the on-rev client
uses ftp, while the processing of an include in the interpreter
doesn't.  Still doesn't explain why it failed, or why the double '/' is
in there - but if I'm right about this being an on-rev client error,
then it does explain why the 'testing' was in the file path.

btw - include '../lib/file.irev' does work for me. Try checking with an
ftp program, rather than the irev client, that all your files are
exactly where you expect them to be.

-- Alex.

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Thomas McGrath III-3

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alex Tweedly
I was away for a few days. Back now. Here is the PHP script I used:

<?php
$uploaddir = './';      //Uploading to same directory as PHP file
$file = basename($_FILES['userfile']['name']);
$uploadFile = $file;
$randomNumber = rand(0, 99999);
$newName = $uploadDir . "Demoted" . $randomNumber . $uploadFile;


if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
        echo "Temp file uploaded. \r\n";
} else {
        echo "Temp file not uploaded. \r\n";
}

if ($_FILES['userfile']['size']> 500000) {
        exit("Your file is too large. It must be lest than 500k");
}

// This is an if statement that logs in the xCode debugger console the  
server variables and
// the directory and format of file and size of file and type of file
// ECHO sends back to the iphone the important information which can  
be trapped there for its own use
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $newName)) {
     $postsize = ini_get('post_max_size');   //Not necessary, I was  
using these
     $canupload = ini_get('file_uploads');    //server variables to  
see what was
     $tempdir = ini_get('upload_tmp_dir');   //going wrong.
     $maxsize = ini_get('upload_max_filesize');
     //echo "http://lazyriver.on-rev.com/upload/{$file}" . "\r\n" .  
$_FILES['userfile']['size'] . "\r\n" . $_FILES['userfile']['type'] ;
        echo "http://lazyriver.on-rev.com/upload/{$newName}" . "\r\n" .  
"Format is " . $file . "\r\n" . "Size is " . $_FILES['userfile']
['size'] . "\r\n" . "Type is " . $_FILES['userfile']['type'] ;
        }
?>


This works perfectly to upload images from my app in the iPhone to the  
folder that the PHP is in. I don't understand it but it works. I would  
not even know where to begin to understand this or where to look with  
out opening the door to the thousands of pages with things I don't  
want to learn about PHP.
Now if this were to be able to be converted to iRev files and it works  
then I would really want to learn it. (The point of iRev I think).


Tom McGrath III
Lazy River Software
[hidden email]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html






On Nov 4, 2009, at 5:20 PM, Alex Tweedly wrote:

> Thomas McGrath III wrote:
>> Overview:
>> I have been plugging away at writing an iPhone application that  
>> manipulates photos and uploads them online (why I have been so  
>> silent on the list for awhile). And except for a major confusion  
>> working with the internal database (still unresolved) I have been  
>> able to get everything else working.
>>
>> What I can do so far is load a view on the iPhone and take a  
>> picture or use a picture from the camera/library on the iPhone, add  
>> a background, a frame and some text from a database. I can also  
>> edit the text in a table and save to a user file in the device.  
>> Lastly, I can email and SMS the final image to another phone or  
>> computer and NOW I can send the picture up to rev-online via a  
>> 'borrowed' PHP script.
>>
> When you say "rev-online" I take it you mean on-rev ?
>
> Sarah has an example on her wonderful on-rev samples page ( http://www.troz.net/onrev/ 
>  ) of a script to upload pictures.
> I'm not clear on how the iPhone sends the pictures via a borrowed  
> PHP script - but it might be easy to convert this irev script to  
> match it. (If you like, email me the PHP script and I'll have a look  
> at an iRev equivalent to it).
>> What I would like to do is have either iRev or a revWeb standalone  
>> 'know' when new images are uploaded and display them in the browser  
>> for users to see and show. I would also like to have iRev/revWeb  
>> send out a push notification to another iPhone application (the  
>> image viewer) so that viewers will know that other users have  
>> uploaded new pictures. I am studying up on the push notification on  
>> the iPhone side.
>>
> If you can convert the upload mechanism to iRev then you're (almost)  
> done.
>
> If not, you could run a rev script periodically (say one per minute  
> or once per 10 minutes) to check for the latest pictures, and then  
> update or push data accordingly. You could do this, as Shao Sean  
> suggested via a cgi or compiled rev app tun with -ui --- but that  
> would be new territory for me. You could write an iRev script that  
> checks for new photos (uploaded since the last time the script ran)  
> and pushes them out (that's pretty easy). And then you could trigger  
> that script periodically, using a cron job with curl.
>
> (cron is simply a Unix mechanism to run the same command line app or  
> command at regular intervals, such as every so many minutes or hours  
> (or days, months, ...))
>
> To do this, go into cPanel, click on "cron jobs" in the "Advanced"  
> section. Then click on "standard" for experience level, and fill in  
> the (pretty obvious) values, with the "command to run:" line being
>    curl http://www.mysitename.com/myscript.irev
>
> -- Alex.
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Thomas McGrath III-3

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Shao Sean-2
Yeah that's great except where do I learn about this in runRev?  
Examples? How to's? This is complex to me.

Thanks

Tom McGrath III
Lazy River Software
[hidden email]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html


On Nov 4, 2009, at 9:45 AM, Shao Sean wrote:

> Not having used server-side rev yet (when will this be released for  
> us to install on our own servers?) all I can tell you is that this  
> is easy to do with Rev CGIs (or even a compiled Rev app running -ui)
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Thomas McGrath III-3

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sarah Reichelt-2
Sarah, Thanks, I knew you were also learning the Obj-c stuff.

I wanted to do either show recent x number of images and or searchable  
images (top twenty) and update a page on new images or coming to the  
page. There may be thousands. I also want to write an iPhone viewer  
app to view these images. So an image captured on the device and  
manipulated in my app is then sent online. Online, (preferably iRev)  
will process the file and display the file and push the needed iPhone  
push code to the viewer app. Then I would want to provide some of the  
social aspects like voting/rating and sharing and linking etc. Down  
the road I would like to provide user password protected areas for  
manipulating a users uploaded files, etc.

I am also planning an app that would allow users to add photos and  
text to a page on the web for an individual user that would then be  
downloaded to another of my iPhone apps as an update. After being  
notified the user launches the app and it would check online for new  
data and download that and process it for the user. I can explain this  
one further but for now I just want to grasp the whole process for the  
app I already wrote and what iRev can do for it.

Then lastly the easiest part would be to have a desktop app like in  
your demo to display the images as well. I walked through your  
tutorial and built the sample app.

I might be able to trigger an iRev script - that would be cool and  
would help keep this in the realm I understand. Maybe that would be  
the missing piece for me.

P.S. I uploaded the PHP script I borrowed in another reply.

Tom McGrath III



Lazy River Software
[hidden email]

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html

On Nov 4, 2009, at 5:26 PM, Sarah Reichelt wrote:

> On Wed, Nov 4, 2009 at 11:44 PM, Thomas McGrath III  
> <[hidden email]> wrote:
>> Overview:
>> I have been plugging away at writing an iPhone application that  
>> manipulates
>> photos and uploads them online (why I have been so silent on the  
>> list for
>> awhile). And except for a major confusion working with the internal  
>> database
>> (still unresolved) I have been able to get everything else working.
>>
>> What I can do so far is load a view on the iPhone and take a  
>> picture or use
>> a picture from the camera/library on the iPhone, add a background,  
>> a frame
>> and some text from a database. I can also edit the text in a table  
>> and save
>> to a user file in the device. Lastly, I can email and SMS the final  
>> image to
>> another phone or computer and NOW I can send the picture up to rev-
>> online
>> via a 'borrowed' PHP script.
>
> Great work. I too have spent some months struggling with Objective-C.
> It's not bad as C goes - at least the IDE is nice to use - but it
> seems to take ages to do things which are so easy in Rev...
>
>> What I would like to do is have either iRev or a revWeb standalone  
>> 'know'
>> when new images are uploaded and display them in the browser for  
>> users to
>> see and show.
>
> Not quite sure what you have in mind here, but it doesn't sound too  
> difficult.
> Did you want a web page that only shows the recent images?
> Or a web page that shows the last x images, but updates itself if
> there are new ones?
>
> Showing the most recent images is easy enough - you can use standard
> Rev commands to list the long files in the images folder and sort by
> date to get the new ones.
> A web page can be set to refresh periodically by including a REFRESH
> meta tag, but this is probably not what you want.
>
> I have a slideshow page that uses AJAX to ask an iRev file for the
> html to display next. The iRev file lists the images, picks one
> randomly, works out the size so it can construct a valid HTML img tag,
> then sends that tag back to the AJAX call. This uses JavaScript to set
> the innerHTML of a div tag to show the new image. There is a
> JavaScript timer so this happens every 5 seconds.
> It sounds worse than it is, but you can see it in action here:
> <http://www.troz.net/onrev/samples/slideshow.irev>
>
> What you could do is have an iRev file that just returned true or
> false depending on whether there were any new images.
> If it returned false, the web page could just set up a new timer and  
> wait.
> if it returned true, the web page could ask another iRev file for the
> details of the images to display and then display them.
>
>
>> I would also like to have iRev/revWeb send out a push
>> notification to another iPhone application (the image viewer) so that
>> viewers will know that other users have uploaded new pictures. I am  
>> studying
>> up on the push notification on the iPhone side.
>
> Sorry, I haven't done any investigations of the push mechanism yet.
> But if your uploading script can trigger an iRev script, I'm sure it
> can do whatever is needed to push data.
>
> I would not worry about PHP if I were you. iRev is a good replacement
> for server-side scripting which is what PHP does.
> You will need some JavaScript if you need any client-side scripting
> i.e. timers, reactions to clicks on the web page, AJAX etc.
>
> Please send more detail on what you really need and I'm sure we can
> start to work out some scripts.
>
> Cheers,
> Sarah
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Jim Ault

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thomas McGrath III-3

On Nov 9, 2009, at 6:24 AM, Thomas McGrath III wrote:

> Yeah that's great except where do I learn about Rev CGIs in runRev?  
> Examples? How to's? This is complex to me.

Not likely that CGI operation will ever be documented in runRev, nor  
PHP conversions to IREV.
This is partly due to the complexity and also the few Rev programmers  
that will want to learn all about the web server world.
On-Rev does allow the use of CGI and IREV and PHP in the same domain,  
the same web site, but not on the same web page (actually you can, but  
you need to know a trick or two get this to work.  I will post links  
to some working examples of this on my OnRev domain when I get them  
dressed up a bit.  They are ugly at the moment.)

-------
So far, my take on IREV is that it will evolve to become more  
powerful, but it is not there yet.
The use of CGI with both script files and stacks is very powerful, but  
has a few layers of complexity that most Rev programmers are not used  
to.

Jacque has a very good tutorial on her site that goes through the  
steps of installing and testing cgi scripting.
Andre has done a set of stacks called "Rev on Rockets" that let's you  
look inside web server logic and functions.

Be prepared to think like a web server, not just how a Rev stack works  
running on someone's computer.  In CGI there is no debugger, just  
error messages that will look cryptic or simply report that something  
did not work.

I believe that CGI installation and use will not be documented by  
runRev since web hosting companies vary widely.  Some hosting  
companies don't allow the installation of user programs, others allow  
it but don't support it (which means you can try it, but don't bug  
them if it does not work).  Your mileage and smileage may vary.

------
If you are trying to duplicate PHP code, this can be highly complex  
depending on the functions used.  Many things that are done in PHP  
fall into 6 categories
-1- security
-2- PHP bug fixes
-3- web server limitations, such as the lack of persistence, managing  
cookies, various program languages (perl, etc)
-4- data encoding/decoding, control character escaping, html entities,  
etc.
-5- extensive use of multi-dimensional array variables
-6- interfacing with SQL databases

As a result, PHP keeps evolving, is incredibly well documented at  
php.net, but is not for the newbie.  Lots of comments are offered by  
top-notch programmers that have to deal with the many intricacies of  
web server management (again, daunting for the newbie).

The PHP script you posted to the list is a fairly simple one that  
manages a single file upload.

----------
I can install the Rev CGI on my Mac running Apache, and even inside  
the MAMP install on the same computer at the same time.  Don't worry  
about what this means, other than some operating systems can be  
flexible and successful, like OSX.

On-Rev does allow the use of CGI and IREV and PHP in the same domain,  
the same web site, but not on the same web page (actually you can, but  
you need to know a trick or two get this to work)


Jim Ault
Las Vegas


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
J. Landman Gay

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
Jim Ault wrote:
>
> On-Rev does allow the use of CGI and IREV and PHP in the same domain,
> the same web site, but not on the same web page (actually you can, but
> you need to know a trick or two get this to work.  I will post links to
> some working examples of this on my OnRev domain when I get them dressed
> up a bit.  They are ugly at the moment.)

I think it's ugly by nature. ;) But I managed to combine them this way:
<http://jacque.on-rev.com/codebits/dualrevlets.irev>. The irev page
calls the CGI, which returns data, which the irev page displays. This
was also the only way I could find to put a stack in use at the moment.
If you know any other tricks, I'm interested.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
J. Landman Gay

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
J. Landman Gay wrote:

> Jim Ault wrote:
>>
>> On-Rev does allow the use of CGI and IREV and PHP in the same domain,
>> the same web site, but not on the same web page (actually you can, but
>> you need to know a trick or two get this to work.  I will post links
>> to some working examples of this on my OnRev domain when I get them
>> dressed up a bit.  They are ugly at the moment.)
>
> I think it's ugly by nature. ;) But I managed to combine them this way:
> <http://jacque.on-rev.com/codebits/dualrevlets.irev>. The irev page

Oops, wrong URL. Should be: <http://jacque.on-rev.com/zygodemo/getkey.irev>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Jim Ault

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by J. Landman Gay

On Nov 9, 2009, at 6:45 PM, J. Landman Gay wrote:

> Jim Ault wrote:
>>
>> On-Rev does allow the use of CGI and IREV and PHP in the same  
>> domain, the same web site, but not on the same web page (actually  
>> you can, but you need to know a trick or two get this to work.  I  
>> will post links to some working examples of this on my OnRev domain  
>> when I get them dressed up a bit.  They are ugly at the moment.)
>
> I think it's ugly by nature. ;) But I managed to combine them this  
> way: <http://jacque.on-rev.com/codebits/dualrevlets.irev>. The irev  
> page calls the CGI, which returns data, which the irev page  
> displays. This was also the only way I could find to put a stack in  
> use at the moment. If you know any other tricks, I'm interested.

There are a couple besides the call to the CGI script [Rev engine] on  
the OnRev server.
If I get some client work done tonight, I will finish my pages that  
illustrate some tricks.
Otherwise it will be tomorrow night.
I need to use these tricks for my client, but other work needs to be  
done for tomorrow... so for sure by Wed morning.

>
> I think it's ugly by nature. ;)
Not by web access standards.  This kind of access is actually the  
backbone of browser success.  Your browser does a mash-up of a variety  
of technologies and resources in the same web page (between the <html>  
bunches of stuff </html>  tags ).

You should look behind the scenes of a simple WordPress blog.. tons of  
PHP function calls and combined resources.

more later.

Jim Ault
Las Vegas
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Jim Sims

Re: revTalk - iRev - revWeb - PHP - iPhone and back again

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thomas McGrath III-3
On Nov 4, 2009, at 9:45 AM, Shao Sean wrote:
> Not having used server-side rev yet (when will this be released for  
> us to install on our own servers?) all I can tell you is that this  
> is easy to do with Rev CGIs (or even a compiled Rev app running -ui)
On Nov 9, 2009, at 3:24 PM, Thomas McGrath III wrote:

> Yeah that's great except where do I learn about this in runRev?  
> Examples? How to's? This is complex to me.

If making a Rev CGI thing worries you, it's not that hard really. The  
whole web mashup thing seems far more confusing to me  :-/

To make a Rev CGI follow Jacque's tutorial, it's step by step. Once  
you learn it you'll love it, enables you to do all kinds of cool things.

You do need a CGI friendly ISP however, I use http://www.jaguarpc.com/

I have a CGI up right now that sends out emails, does passwords &  
login, writes to files for archive use, etc., but most importantly  
talks to Windows or OS X standalones.

http://www.xhoutout.com

Click signup and use Malta and Gozo as username and password.

You'll see it create web pages, add new users to a list, send  
messages. Needs a little more work but you'll be able to fiddle with  
it a bit.

sims
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution