about Rev cgi and MySQL

16 messages Options
Embed this post
Permalink
Nicolas Cueto-4

about Rev cgi and MySQL

Reply Threaded More More options
Print post
Permalink
Just curious about something. But I don't know the technical
vocabulary, so please forgive this verbose (and confusing?)
explanation.

I think it essentially has do with user queues.


I have a Rev.cgi script on the On-Rev server that works in this 3-step sequence:

(STEP 1) uses SELECT to retrieve data from a MySQL table

(STEP 2) does stuff based on that retrieved data in order to alter it

(STEP 3) uses UPDATE to put that now-altered data back into the same MySQL table


My question is about data mishaps that could happen during STEP 2 --
specially if it happens to take a long time (a few seconds?) -- should
it happen to come about that a new user calls a Rev.cgi which is still
working on a previous user's call.


The chaos sequence I have in mind is this:

USER 1 : STEP 1 --> Rev.cgi retrieves data from SQL table at time X ( = tData)
USER 1 : STEP 2 --> Rev.cgi works with tData to make tData_User1 (but
no UPDATE yet)

... but during USER 1 : STEP 2 ...

USER 2 : STEP 1 -->   Rev.cgi retrieves data from SQL table at time
X+1 (still = tData)
USER 2 : STEP 2 --> Rev.cgi works on tData to make tData_User2 (but no
UPDATE yet)
USER 1 : STEP 3 --> updates SQL table with tData.User1
USER 2 : STEP 3 --> updates SQL table with tData.User2

In this chaos scenario of mine -- if indeed this is how things
actually happen between servers, which I'm hoping it's not -- the
problem is the state of tData at USER 2 : STEP2. It should not be
tData but actually tData_User1.


So, is there something in-built in SQL or Rev.cgi that handles queues
in such a way that prevents this kind of queue chaos, whether it's 2
or 2 million users calling in at the "same" time

Or do I have to take care of this myself somehow, by, say, proper scripting?

Thank you.

--
Nicolas Cueto
_______________________________________________
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
Jan Schenkel

Re: about Rev cgi and MySQL

Reply Threaded More More options
Print post
Permalink
This problem isn't unique to cgi-scripting - you have the same issues with a desktop application where concurrent updates need to be handled.

There are 3 approaches to concurrent changes:
- pessimistic locking (no one can change the record while somebody has it locked)
- optimistic locking (essentially no locking, whoever makes the last update wins)
- optimistic locking + versioning (again no locking, byut we use a version number to see if anyone else made a change)

The first approach, pessimistic locking, doesn't scale very well and you risk locking out users when someone opens a record and goes out for lunch without closing the record.
The second approach, optimistic locking without versioning, is just not an option in a serious business application; but it may fit the bill under other circumstances as it's the quickest.

Which leaves us with the third option, optimistic locking + versioning. In this scenario, you add a 'version' column to each table, and when you update a record, you only update it if the version number is the same as when you read it.
So when opening the record, you'd have:
  SELECT * FROM Customer WHERE cust_Id = 12345
Then you copy the version number for later use:
  put revDatabaseColumnNamed(tResultSetId, "cust_Version") into tVersion
Let's assume for a second that the version number is 8. When you want to save the changes, you would use a query like:
  UPDATE Customer SET cust_Name = 'Jan', cust_Version = cust_Version + 1 WHERE cust_Id = 12345 AND cust_Version = 8

When you use the revExecuteSQL command, the result contains the number of records affected by your UPDATE query. If the result for the above query is 0, then no records were updated, which means that someone else incremented the version number.
At this point, you could read the new version of the record and provide some sort of 'merge' functionality where the user picks the right fields.

Important note: when using a 'version' field, make sure to extract non user-entry data our of the table ionto a separate table. For instance, if there's a field cust_Balance to hold the current balance of the cusztomer, you should move that out of the Customer table, so that the rest of your business logic can update that without worrying about a version number.

Hope this helped,

Jan Schenkel.
=====
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


--- On Mon, 11/2/09, Nicolas Cueto <[hidden email]> wrote:

> From: Nicolas Cueto <[hidden email]>
> Subject: about Rev cgi and MySQL
> To: "How to use Revolution" <[hidden email]>
> Date: Monday, November 2, 2009, 3:47 PM
> Just curious about something. But I
> don't know the technical
> vocabulary, so please forgive this verbose (and
> confusing?)
> explanation.
>
> I think it essentially has do with user queues.
>
>
> I have a Rev.cgi script on the On-Rev server that works in
> this 3-step sequence:
>
> (STEP 1) uses SELECT to retrieve data from a MySQL table
>
> (STEP 2) does stuff based on that retrieved data in order
> to alter it
>
> (STEP 3) uses UPDATE to put that now-altered data back into
> the same MySQL table
>
>
> My question is about data mishaps that could happen during
> STEP 2 --
> specially if it happens to take a long time (a few
> seconds?) -- should
> it happen to come about that a new user calls a Rev.cgi
> which is still
> working on a previous user's call.
>
>
> The chaos sequence I have in mind is this:
>
> USER 1 : STEP 1 --> Rev.cgi retrieves data from SQL
> table at time X ( = tData)
> USER 1 : STEP 2 --> Rev.cgi works with tData to make
> tData_User1 (but
> no UPDATE yet)
>
> ... but during USER 1 : STEP 2 ...
>
> USER 2 : STEP 1 -->   Rev.cgi retrieves
> data from SQL table at time
> X+1 (still = tData)
> USER 2 : STEP 2 --> Rev.cgi works on tData to make
> tData_User2 (but no
> UPDATE yet)
> USER 1 : STEP 3 --> updates SQL table with tData.User1
> USER 2 : STEP 3 --> updates SQL table with tData.User2
>
> In this chaos scenario of mine -- if indeed this is how
> things
> actually happen between servers, which I'm hoping it's not
> -- the
> problem is the state of tData at USER 2 : STEP2. It should
> not be
> tData but actually tData_User1.
>
>
> So, is there something in-built in SQL or Rev.cgi that
> handles queues
> in such a way that prevents this kind of queue chaos,
> whether it's 2
> or 2 million users calling in at the "same" time
>
> Or do I have to take care of this myself somehow, by, say,
> proper scripting?
>
> Thank you.
>
> --
> Nicolas Cueto
> _______________________________________________
> 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
Claudi Cornaz

including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Hi all,

I finaly started getting to grips with on-rev and after some initial  
struggeling I start getting the hang of it.
Very powerfull and very nice.

However I am now again struggeling with a "simple" thing but I can't  
get it to work.
I have a folder "lib" with obviously some irev files  in it.

this lib folder is at the root level in my public_html folder

I need to include one of the files in this lib folder called  
"cc_PageStats" from other pages.
As long as the calling page is on the root level I can include the  
file with: include "lib/cc_PageStats.irev"
In that case everything works as expected.

Now I have a page in another folder, called testing. This folder is on  
the root level,
so I assumed I need to change the include statement to:
include "../lib/cc_PageStats.irev"
but this doesn't work. I get the error message in my on-Rev desktop  
app saying:
"FTP error file "/testing/..//lib/cc_PageStats.irev" not present.
(where does this 'testing' come from. I thought the 2 dots meant to go  
one level higher in the dir structure
and start from there.)

Whatever I try I can't get this file included.

If anybody has a idea what I am doing wrong please let me know, for I  
am banging my head now for some time.
Even better would be, preferably a one liner, so I can include the  
file from whatever dir the requested page is,
without worring about the number of levels
(I have been trying with a 'hard coded adress like "http://claudi.on-rev.com/lib/cc_Pagestats 
" and with $_SERVER["document_root"]
and a couple of others but unfortunatly nothing.)


All ideas or suggestions are greatly appreciated

    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
Rick Harrison

Re: about Rev cgi and MySQL

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jan Schenkel
Hi,

There are some other compromising approaches to consider as well.

Don't have the record open long at all in your processing.
If it is a form, don't use the database field for your entry, use
a variable for the entry, so the record isn't actually open.
Once the user actually submits the information, then open
your record, copy the information from the variables into
the record, and perform your update.  In this way you will
use the least amount of time for your record locking technique.

Use a record locking strategy where you can use a
Date/Time stamp along with a session ID, or IP-Address,
when the record was opened for updating.
If the record isn't updated within a specified amount of time,
let it time out, send a message to the user that the update
timed out, and direct them to do it over. Close the record
so someone else can update it.

If someone else is trying to update the same record at the same
time, have the program wait for a couple of seconds and try
the update again. (You can loop this for several tries before
giving up.  If it still fails at this point you can send that user a
record busy message, ask them to wait, or ask them to try
again in a minute, or to cancel their update for later.)

I hope this helps!

Rick

On Nov 3, 2009, at 8:28 AM, Jan Schenkel wrote:

> This problem isn't unique to cgi-scripting - you have the same  
> issues with a desktop application where concurrent updates need to  
> be handled.
>
> There are 3 approaches to concurrent changes:
> - pessimistic locking (no one can change the record while somebody  
> has it locked)
> - optimistic locking (essentially no locking, whoever makes the last  
> update wins)
> - optimistic locking + versioning (again no locking, byut we use a  
> version number to see if anyone else made a change)
> ...
> Hope this helped,
>
> Jan Schenkel.
> =====
> Quartam Reports & PDF Library for Revolution
> <http://www.quartam.com>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same  
> time."  (La Rochefoucauld)
>

_______________________________________________
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
Richard Miller-5

set the defaultfolder to desktop... crashes revweb on XP

Reply Threaded More More options
Print post
Permalink
Can others verify this (on other platforms as well)? Has it perhaps been
documented already?

This sequence crashes RevMedia (in both the development and runtime
environments) on my XP machine:

set the defaultfolder to specialfolderpath("desktop")
put the detailed files

Thanks.
Richard Miller
_______________________________________________
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: 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:

> I need to change the include statement to:
> include "../lib/cc_PageStats.irev"
> but this doesn't work.

I have many pages at my on-rev site like that and it works fine. The
"../" does mean "up one folder" and I often use it.

> Even better would be, preferably a one liner, so I can include the file
> from whatever dir the requested page is,
> without worring about the number of levels
> (I have been trying with a 'hard coded adress like
> "http://claudi.on-rev.com/lib/cc_Pagestats"

This works too. Did you use the include statement as a revTalk script?
It has to be like this:

<?rev include "../cc_PageStats.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
Alex Tweedly

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
J. Landman Gay wrote:
> Claudi Cornaz wrote:
>
>> I need to change the include statement to:
>> include "../lib/cc_PageStats.irev"
>> but this doesn't work.
>
> I have many pages at my on-rev site like that and it works fine. The
> "../" does mean "up one folder" and I often use it.
>
This works for me too.   But it does have the HUGE disadvantage that the
source file must know where it is in the folder tree so it can have the
correct number of "../"s). It would be better to have a form that would
work from anywhere in the tree ... which leads us on to ...
>> Even better would be, preferably a one liner, so I can include the
>> file from whatever dir the requested page is,
>> without worring about the number of levels
>> (I have been trying with a 'hard coded adress like
>> "http://claudi.on-rev.com/lib/cc_Pagestats"
>
> This works too.
Indeed this works, and makes the include statement be independent of the
source file location.
BUT -
(a)  isn't it a lot of extra work ?
Instead of opening a local file, the interpreter must open an http
connection to the server and read the file over that.

(b) isn't it a (minor) security issue ?

I think I'd normally protect my include folder with a .htaccess file, so
that random users can't access my include files, they can only access
the web pages I want them to access. But that would (I think, haven't
tested it) prevent this form of include being used.

-- 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
J. Landman Gay

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Alex Tweedly wrote:

> BUT -
> (a)  isn't it a lot of extra work ?
> Instead of opening a local file, the interpreter must open an http
> connection to the server and read the file over that.
>
Yeah, this has been harrassing me. I'm pretty sure a path like this
would work but I haven't tried it yet: ~/path/to/includeFile. I'm going
to test it, that would be way easier.

  (b) isn't it a (minor) security issue ?

No, because it's revTalk. The browser never sees the file path, only the
contents of the file. To the outside, it looks like hard-coded html.

> I think I'd normally protect my include folder with a .htaccess file, so
> that random users can't access my include files, they can only access
> the web pages I want them to access. But that would (I think, haven't
> tested it) prevent this form of include being used.

I don't think you'd have to, since the path is never sent to the
browser. Alternately, I suppose you could store the includes outside the
web folder. A path is a path, right?

--
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
Alex Tweedly

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
J. Landman Gay wrote:
> Yeah, this has been harrassing me. I'm pretty sure a path like this
> would work but I haven't tried it yet: ~/path/to/includeFile. I'm
> going to test it, that would be way easier.
>
No - already guesses that one and tried it. "File not found"
>  (b) isn't it a (minor) security issue ?
>
> No, because it's revTalk. The browser never sees the file path, only
> the contents of the file. To the outside, it looks like hard-coded html.
Different issue. I was concerned about simply guessing the directory
name, and hence seeing the include files. Of course, since they are
.irev files, you can't simply download them but you can see their names,
guess their function, etc. and in some cases retrieving them will give
some info about the internals of the site. And in a couple of cases I've
just tried, there are other kinds of files in the includes (or inc)
directory. (Apologies to anyone who notices me snooping around their
site ;-)

>
>> I think I'd normally protect my include folder with a .htaccess file,
>> so that random users can't access my include files, they can only
>> access the web pages I want them to access. But that would (I think,
>> haven't tested it) prevent this form of include being used.
>
> I don't think you'd have to, since the path is never sent to the
> browser. Alternately, I suppose you could store the includes outside
> the web folder. A path is a path, right?
>
I didn't think you can do this - but you can. And that's kind of scary.
It means that a script error (or deliberate misuse) in any of your
add-on domains can see and alter all files, including those in other
add-on domains.  I'm not sure this is a "feature", it feels more like a
"bug" (or at least, a "problem").

-- 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
J. Landman Gay

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Alex Tweedly wrote:
> J. Landman Gay wrote:
>> Yeah, this has been harrassing me. I'm pretty sure a path like this
>> would work but I haven't tried it yet: ~/path/to/includeFile. I'm
>> going to test it, that would be way easier.
>>
> No - already guesses that one and tried it. "File not found"

This works though:

<?rev include "/home/jacque/public_html/myinclude.irev" ?>


>>  (b) isn't it a (minor) security issue ?
>>
>> No, because it's revTalk. The browser never sees the file path, only
>> the contents of the file. To the outside, it looks like hard-coded html.

> Different issue. I was concerned about simply guessing the directory
> name, and hence seeing the include files. Of course, since they are
> .irev files, you can't simply download them but you can see their names,
> guess their function, etc. and in some cases retrieving them will give
> some info about the internals of the site. And in a couple of cases I've
> just tried, there are other kinds of files in the includes (or inc)
> directory. (Apologies to anyone who notices me snooping around their
> site ;-)

Isn't that true of any site though? I've set my site not to display file
listings, and anyone who tries should get a "forbidden" error page. It's
an option in cPanel. Or you mean something else?

>> I don't think you'd have to, since the path is never sent to the
>> browser. Alternately, I suppose you could store the includes outside
>> the web folder. A path is a path, right?
>>
> I didn't think you can do this - but you can.

I know. It's pretty common I guess, I first read about it some years ago
when researching something else. People writing to various forums
sometimes recommend storing files there because outsiders can't see or
download them.

> And that's kind of scary.
> It means that a script error (or deliberate misuse) in any of your
> add-on domains can see and alter all files, including those in other
> add-on domains.  I'm not sure this is a "feature", it feels more like a
> "bug" (or at least, a "problem").

If so, it's a problem for any site using any language. PHP could do the
same thing.

--
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
Sarah Reichelt-2

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alex Tweedly
>>> I need to change the include statement to:
>>> include "../lib/cc_PageStats.irev"
>>> but this doesn't work.
>>
>> I have many pages at my on-rev site like that and it works fine. The "../"
>> does mean "up one folder" and I often use it.
>>
> This works for me too.   But it does have the HUGE disadvantage that the
> source file must know where it is in the folder tree so it can have the
> correct number of "../"s). It would be better to have a form that would work
> from anywhere in the tree ... which leads us on to ...

And if you have include files that call other include files, they need
to know where they are called from, rather than were the include file
is.
In HTML, if you have a path like "/images/pic.jpg" then the browser
knows that this means to go to the root folder, find the images folder
and use the pic.jpg file in there. Unfortunately, iRev doesn't work
like this, so you have to be more specific.

But this doesn't explain why Claudi is having problems. I think the
On-Rev client is confused about where the lib file is going. Perhaps
you should have a look using an FTP client or the FTP manager in
cPanel.

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
Andre Garzia-3

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Hi Folks,

The defaultfolder is always the folder that the requested script is (unless
you change it yourself). So what I do is on top of my scripts, I include a
specific include file that changes the defaultfolder to some root place like
/public_html/ and then all the other includes are in reference to that,
makes easier to maintain.

We need to have a mental map of the division between Apache and RevServer.
Apache sees a url with a path and it will use all it's configuration
madness, virtual server stuff, aliases and who knows what to pinpoint where
it should actually find the resource. When using RevServer people tend to
keep that Apache resolution in mind and think that a URL
"binfile:/images/logo.png" will be pointing to the same place a <img
src="/images/logo.png"> would point. This is misleading, RevServer is Rev,
and Rev will work with the filesystem and it will all be relative to the
defaultfolder. When we use "include" we're asking for a file in the file
system not a network resource. This means that we can hop to parent folder
with "../" or access hard drive root at "/" and that file & user permissions
are in effect.

Another thing that trick users is line endings. RevServer is running on
Linux, so you might need to convert line endings before trying to upload a
file or it will give you execution errors. FTP clients such as interarchy
can do it automatically for you.

cheers, I am talkative due to sleeplessness :D
_______________________________________________
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: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
In reply to this post by Sarah Reichelt-2
I am chiming in here to set a few admin basics that govern web hosting  
access.

The OnRev server is running Linux operating system.
Permissions for file and folder access are set by Linux.

Linux has been setup to allow Apache to be designated as an owner of a  
file or folder.
When you use command line for 'chown' or 'chmod' commands, you are  
talking to Linux and setting permissions.

If Apache is an owner of a folder (eg. publicHtml/) it has access to  
that folder according to the Linux permission level (0-7).
Apache can read and write files in a folder if it is the owner and the  
file access level is 6.
Apache can execute a script if the access level of the script file is 7.

Browsers talk to Apache and request various kind of information.
Before Apache takes action, it looks in the folder to see if there is  
an htaccess file.
If so, it reads it as a text file and follows the rules that have been  
put there by the web site admin.

Linux does not know anything about htaccess rules.
Apache always follows htaccess rules, if present.

Access rules are very powerful and complex.
One rule could be that any request for a file (eg. userInfo.txt) is  
honored by Apache by returning a different file (eg.  
notPermittedMsg.txt).  Skilled web admins will use many htaccess files  
to keep users out of folders or from executing files. Do a Google for  
'htaccess' to see some tutorials on this.

Now getting to the FTP access (not the Linux computer operating system  
or the Apache program).
This is governed by cPanel settings.
You can setup several FTP user accounts and allow uploading/
downloading.  Each account has a specified 'home' folder and typically  
cannot access any other folders outside that path.  This allows web  
designers access to specific folders, and not all.

Not all hosting systems are the same, and much depends on what the  
hosting company wants to allow.

First:  Claudi may be using an FTP account login:password that is set  
to "testing/", but not likely.
Looking closely at the
    "FTP error file "/testing/..//lib/cc_PageStats.irev" not present.
shows two "//" in the path, which will give an error.
The word "testing" comes from the parent folder the 'page' requesting  
the include file.
I am not sure why the double slash occurs without more info.

Secondly:  Alex said about access to all the folders on a hosting  
site...
"I didn't think you can do this - but you can. And that's kind of  
scary. It means that a script error (or deliberate misuse) in any of  
your add-on domains can see and alter all files, including those in  
other add-on domains.  I'm not sure this is a "feature", it feels more  
like a "bug" (or at least, a "problem").

Access to all the subdomain folders can be regulated, primarily using  
*group* permissions, and also by using htaccess files in each folder.  
Often there are libraries and databases that are used by several  
subdomains.  For years the use of PHP globals was convenient, but  
allowed anyone to easily attack a server.  No one uses these globals  
anymore.

As I learn more about OnRev in the coming months, I will show examples  
of protecting a scripts, subdomains, and hazardous scripts.

I have a couple utility scripts to deal with moving files into deeper  
folder levels and not having to rewrite the include paths.  Basically,  
you call a script that builds the path for you.

The gurus of web hosting should be able to add specifics and  
corrections, but this is a start.
Hope this helps
More to come.

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
Sarah Reichelt-2

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
In reply to this post by Andre Garzia-3
> The defaultfolder is always the folder that the requested script is (unless
> you change it yourself). So what I do is on top of my scripts, I include a
> specific include file that changes the defaultfolder to some root place like
> /public_html/ and then all the other includes are in reference to that,
> makes easier to maintain.


That is a very neat idea. Then all file references can be made
relative to the root folder which would save a lot of trouble.
Thanks Andre.

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 Jim Ault

Thanks all for your ideas and responses
What a great list this is.

I still can't get the ../lib/cc_Pagestats working (strange)
Jim the double slash in "/testing/..//lib/cc_PageStats.irev" was a  
typo from me in the email
By the way thanks for the explanation about linux/apache. It sure  
helps in getting a overall picture.

Setting the defaultFolder as Andre sugested on the other hand works  
like a charme. So that's the way to go for me.

So I am off now to do some more coding and probably finding more  
problems/learnings on the way.

Thanks all
    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
Thomas McGrath III-3

Re: including a file on on-rev

Reply Threaded More More options
Print post
Permalink
Claudi,

Can you post the different 'working' code in comparison to what your  
first attempt was?

That would be great.

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 7:27 AM, Claudi Cornaz wrote:

>
> Thanks all for your ideas and responses
> What a great list this is.
>
> I still can't get the ../lib/cc_Pagestats working (strange)
> Jim the double slash in "/testing/..//lib/cc_PageStats.irev" was a  
> typo from me in the email
> By the way thanks for the explanation about linux/apache. It sure  
> helps in getting a overall picture.
>
> Setting the defaultFolder as Andre sugested on the other hand works  
> like a charme. So that's the way to go for me.
>
> So I am off now to do some more coding and probably finding more  
> problems/learnings on the way.
>
> Thanks all
>   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

_______________________________________________
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