LassoStartup not executing?

classic Classic list List threaded Threaded
55 messages Options
123
Reply | Threaded
Open this post in threaded view
|

LassoStartup not executing?

Steve Upton

I've had an interesting week... in the bad way.

Anyway, I reinstalled Lasso (now up to 8.5.5) on our Mac server.

All seems OK but the items in my site's LassoStartup folder don't seem to be executed.

I launched Lasso in console mode and watched the spew go by... I saw that it claimed the 3 files in the folder where executed. But the globals that they set up remained unavailable. I copied the files to a web-accessible folder and opened them from a browser... they opened fine and globals are all set up, etc.

So I thought it might be file perms. I set them up to be owned by the Lasso user, nothing

Thought there still may be an error in the code, no sign of errors in any Lasso logs...

I recreated the site by re-importing the previously exported settings file. Seemed to work OK.

anyone? this is weird.

regards,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Fletcher Sandbeck-3
On 4/10/08 at 11:35 AM, [hidden email] (Steve Upton) wrote:

>I launched Lasso in console mode and watched the spew go by... I saw
>that it claimed the 3 files in the folder where executed. But the
>globals that they set up remained unavailable. I copied the files to a
>web-accessible folder and opened them from a browser... they opened
>fine and globals are all set up, etc.

I wonder if you are accessing a different Lasso site then you
think you are.  Go into ServerAdmin and make sure the site
routing rules are set up properly.

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Steve Upton
At 11:57 AM -0700 4/10/08, Fletcher Sandbeck wrote:
>On 4/10/08 at 11:35 AM, [hidden email] (Steve Upton) wrote:
>
>>I launched Lasso in console mode and watched the spew go by... I saw
>>that it claimed the 3 files in the folder where executed. But the
>>globals that they set up remained unavailable. I copied the files to a
>>web-accessible folder and opened them from a browser... they opened
>>fine and globals are all set up, etc.
>
>I wonder if you are accessing a different Lasso site then you think you are.  Go into ServerAdmin and make sure the site routing rules are set up properly.

I was wondering that myself. I now have only 2 Lasso sites on the server, default and ours. I just 'stopped' default and it still seems to be serving OK (had me nervous there).

Can you tell me specifically what I should be looking at? At the moment I can't remember (or find) how it it finding the site's root folder....

That said, the LassoStartup sub-folder is available in the LassoSites folder and has the files... and it mentions them in the console mode..

still confused..

Regards,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Bil Corry-3
Steve Upton wrote on 4/10/2008 2:37 PM:
> That said, the LassoStartup sub-folder is available in the LassoSites folder and has the files... and it mentions them in the console mode..
> still confused..

Well, its entirely possible that site 2 has your globals, as the console indicates, but when you hit what you think is site 2, you're really on site 1, which doesn't have your globals.

Add this to a page you're hitting:

        ['Site is ' + site_name + ' (' + site_id + ')']

Does it return 1 or 2?


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Steve Upton
At 2:48 PM -0500 4/10/08, Bil Corry wrote:

>Steve Upton wrote on 4/10/2008 2:37 PM:
>>That said, the LassoStartup sub-folder is available in the LassoSites folder and has the files... and it mentions them in the console mode..
>>still confused..
>
>Well, its entirely possible that site 2 has your globals, as the console indicates, but when you hit what you think is site 2, you're really on site 1, which doesn't have your globals.
>
>Add this to a page you're hitting:
>
> ['Site is ' + site_name + ' (' + site_id + ')']
>
>Does it return 1 or 2?

Thanks Bil,

It returns site 2, as it should... so still no sign of the source of the trouble.

Also, I put the data into a test page within the normal site directory and it loaded OK so Lasso is pointing at the right file structure.

still puzzled...

Steve


--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Bil Corry-3
Steve Upton wrote on 4/10/2008 2:58 PM:
> It returns site 2, as it should... so still no sign of the source of the trouble.

Then in your LassoStartup script, add some logging:

        log_critical('Starting!'); // at top of page

        log_critical('Creating Global "this"');
        global('this' = 'that');

        log_critical('Creating Global "that"');
        global('that' = 'this');

        log_critical('Stopping!!'); // at bottom of page


That will tell you if everything on the page is being processed by Lasso, or if its prematurely ending for some reason.


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Steve Upton
At 3:31 PM -0500 4/10/08, Bil Corry wrote:
>Steve Upton wrote on 4/10/2008 2:58 PM:
>>It returns site 2, as it should... so still no sign of the source of the trouble.
>
>Then in your LassoStartup script, add some logging:
>
> log_critical('Starting!'); // at top of page
><snip>
>That will tell you if everything on the page is being processed by Lasso, or if its prematurely ending for some reason.

Thanks Bil,

I should have tried that, obviously. So, I gave it a try, restarted Lasso into Console mode and the log items showed up.... then tried the site and found they had loaded properly. hmmm

Then it dawned on me that I had been restarting the site alone as well as restarting Lasso, so I wondered if sometimes I had seen the issue when restarting the site alone (from within ServerAdmin)

So, THEN I log into *SiteAdmin* and find that it wants the site to be 'initialized'. Wha? I guess I had been doing all my setup, restarting, importing, etc from ServerAdmin.

It seems to be OK now that I have 'initialized' it. - I didn't need to change anything at all, just press OK.

So, do you think that the issue may have been related to the site not being initialized? Should this be necessary for an imported site? I'd rather someone else didn't need to fall into this hole...

thanks for your help guys,

Steve

--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Steve Upton
In reply to this post by Bil Corry-3

well... we're almost there...

thanks to better logging, I've discovered an oddity..

Is there a reason why Server_Name is blank when the site starts up?

That's what causing part of our problem...

Steve


--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Fletcher Sandbeck-3
On 4/10/08 at 5:16 PM, [hidden email] (Steve Upton) wrote:

>well... we're almost there...
>
>thanks to better logging, I've discovered an oddity..
>
>Is there a reason why Server_Name is blank when the site starts up?
>
>That's what causing part of our problem...

The server name is drawn from the Web server so it is not
defined except during a Web request.

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Steve Upton
At 6:25 PM -0700 4/10/08, Fletcher Sandbeck wrote:

>On 4/10/08 at 5:16 PM, [hidden email] (Steve Upton) wrote:
>
>>well... we're almost there...
>>
>>thanks to better logging, I've discovered an oddity..
>>
>>Is there a reason why Server_Name is blank when the site starts up?
>>
>>That's what causing part of our problem...
>
>The server name is drawn from the Web server so it is not defined except during a Web request.

thanks for responding...

OK, now I need to figure out why it worked under 8.5.4 and not under 8.5.5... or if there's something else afoot.

I have a background script launch (via -async) at startup. It executes every 30 seconds or so. When it executes it calls (via the include tag) a URL on our server. That page does all the stuff we need done periodically. The URL contains the server_name tag so I can move it around on our servers without having to modify it.

It worked until I upgraded to 8.5.5 on Tuesday...

one of those "no Idea how it worked, but I know why it doesn't now" kind of phenomena?

Steve


--


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

Fletcher Sandbeck-3
On 4/10/08 at 9:32 PM, [hidden email] (Steve Upton) wrote:

>OK, now I need to figure out why it worked under 8.5.4 and not under
>8.5.5... or if there's something else afoot.
>
>I have a background script launch (via -async) at startup. It executes
>every 30 seconds or so. When it executes it calls (via the include
>tag) a URL on our server. That page does all the stuff we need done
>periodically. The URL contains the server_name tag so I can move it
>around on our servers without having to modify it.
>
>It worked until I upgraded to 8.5.5 on Tuesday...
>
>one of those "no Idea how it worked, but I know why it doesn't
>now" kind of phenomena?

Can you log [Server_Name] in that script?  That should let you
know what value is being returned.  I don't think anything
should have changed with that tag.  When you call a page through
[Include_URL] it is seen as the same as calling a page through a
normal Web browser.

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

dguardiola
>
> Can you log [Server_Name] in that script?  That should let you know  
> what value is being returned.  I don't think anything should have  
> changed with that tag.  When you call a page through [Include_URL]  
> it is seen as the same as calling a page through a normal Web browser.
>

I can confirm 8.5.5 does not handle [server_name] like 8.5.4, I had  
upgraded on the dev machine and not on the server so I just tested  
the tag on both

in 854 : domain.com
in 855 : www.domain.com

I had to batch-change a lot files and ctags to make everyhting works,  
each of my sites were getting hung at least twice a day these days !

For me the tag change is not a problem, but I'd prefer to know it  
before....

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: LassoStartup not executing?

dguardiola

Le 11 avr. 08 à 16:47, Dominique Guardiola a écrit :

>>
>> Can you log [Server_Name] in that script?  That should let you  
>> know what value is being returned.  I don't think anything should  
>> have changed with that tag.  When you call a page through  
>> [Include_URL] it is seen as the same as calling a page through a  
>> normal Web browser.
>>
>
> I can confirm 8.5.5 does not handle [server_name] like 8.5.4, I had  
> upgraded on the dev machine and not on the server so I just tested  
> the tag on both
>
> in 854 : domain.com
> in 855 : www.domain.com

argh!
i upgraded the server to 8.5.5 too, but the difference is still here !
last explaination : upgrade the server to OS X 10.4.10, which i try now
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

dguardiola

Le 11 avr. 08 à 17:02, Dominique Guardiola a écrit :

>
> Le 11 avr. 08 à 16:47, Dominique Guardiola a écrit :
>>>
>>> Can you log [Server_Name] in that script?  That should let you  
>>> know what value is being returned.  I don't think anything should  
>>> have changed with that tag.  When you call a page through  
>>> [Include_URL] it is seen as the same as calling a page through a  
>>> normal Web browser.
>>>
>>
>> I can confirm 8.5.5 does not handle [server_name] like 8.5.4, I  
>> had upgraded on the dev machine and not on the server so I just  
>> tested the tag on both
>>
>> in 854 : domain.com
>> in 855 : www.domain.com
>
> argh!
> i upgraded the server to 8.5.5 too, but the difference is still here !
> last explaination : upgrade the server to OS X 10.4.10, which i try  
> now

reboot, no change...I now have two identical Lasso installs with two  
identical systems and server_name behaves differently...help !!
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

dguardiola
I meant 10.4.11, sorry

I sum up the problem:
[server_name] with Lasso 8.5.5 + 10.4.11 on my powerbook G4 :  
www.domain.com
[server_name] with Lasso 8.5.5 + 10.4.11 on my mini intel : domain.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

dguardiola

Le 11 avr. 08 à 17:46, Dominique Guardiola a écrit :
> I meant 10.4.11, sorry
>
> I sum up the problem:
> [server_name] with Lasso 8.5.5 + 10.4.11 on my powerbook G4 :  
> www.domain.com
> [server_name] with Lasso 8.5.5 + 10.4.11 on my mini intel : domain.com

sorry to continue this monologue but I have to fix this quickly and  
panic is near

what i really see is :
[server_name] with Lasso 8.5.5 + 10.4.11 on my powerbook G4 :  
dev.mysite.fr
[server_name] with Lasso 8.5.5 + 10.4.11 on my mini intel : mysite.fr

and i have in the hosts file

127.0.0.1 dev.mysite.fr

could this happen on the pb because server_name gets the name from  
the hosts file on my dev pb ?
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

Fletcher Sandbeck-3
On 4/11/08 at 6:03 PM, [hidden email] (Dominique
Guardiola) wrote:

>sorry to continue this monologue but I have to fix this quickly
>and panic is near
>
>what i really see is :
>[server_name] with Lasso 8.5.5 + 10.4.11 on my powerbook G4 : dev.mysite.fr
>[server_name] with Lasso 8.5.5 + 10.4.11 on my mini intel : mysite.fr
>
>and i have in the hosts file
>
>127.0.0.1 dev.mysite.fr
>
>could this happen on the pb because server_name gets the name
>from the hosts file on my dev pb ?

The [Server_Name] is provided by Apache.  It can vary depending
on your configuration files.  So, that certainly seems possible.

One thing you could try is placing a file "servername.lasso" in
LassoStartup for each site which sets the server name to a
constant value.  Now, the [Server_Name] tag will always return
the same value, no matter what Apache reports.

<?lassoscript
     log_warning('[Server_Name] hard-coded to "testing".');
     define_tag('name', -namespace='server_', -priority='replace');
         return('testing');
     /define_tag;
?>

This would only work if the site is accessed through a single
domain name.  It might be useful on a dev server to peg the name
to be the same as your production server.

[fletcher]

--
Fletcher Sandbeck                         [hidden email]
LassoSoft, LLC                          http://www.lassosoft.com


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

dguardiola
>
> <?lassoscript
>     log_warning('[Server_Name] hard-coded to "testing".');
>     define_tag('name', -namespace='server_', -priority='replace');
>         return('testing');
>     /define_tag;
> ?>
>
> This would only work if the site is accessed through a single  
> domain name.  It might be useful on a dev server to peg the name to  
> be the same as your production server.

thanks fletcher
So i can override the tag behaviour and have a different ctag on each  
server or a ctag that behaves differently depending on his IP adress,  
I'll cook my own, good :)

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: [server_name]

Jim de Zwart
In reply to this post by dguardiola
Be sure to take a close look at your Apache configuration file, compare
servername and serveralias settings.

Dominique Guardiola wrote:

>
> Le 11 avr. 08 à 17:02, Dominique Guardiola a écrit :
>>
>> Le 11 avr. 08 à 16:47, Dominique Guardiola a écrit :
>>>>
>>>> Can you log [Server_Name] in that script?  That should let you know
>>>> what value is being returned.  I don't think anything should have
>>>> changed with that tag.  When you call a page through [Include_URL]
>>>> it is seen as the same as calling a page through a normal Web browser.
>>>>
>>>
>>> I can confirm 8.5.5 does not handle [server_name] like 8.5.4, I had
>>> upgraded on the dev machine and not on the server so I just tested
>>> the tag on both
>>>
>>> in 854 : domain.com
>>> in 855 : www.domain.com
>>
>> argh!
>> i upgraded the server to 8.5.5 too, but the difference is still here !
>> last explaination : upgrade the server to OS X 10.4.10, which i try now
>
> reboot, no change...I now have two identical Lasso installs with two
> identical systems and server_name behaves differently...help !!

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Checkerboard layout for records?

Ken Wallace-2
In reply to this post by Fletcher Sandbeck-3


Hi all,

 From a database referencing photo thumbnails, we'd like a checkerboard
5 across and however many rows of photos down.

Spilling [records] into <tr> goes down – into <td> goes across.
How does one make the checkerboard?

Thanks,

Ken
--
Sealevel, Halifax, Nova Scotia
www.sealevel.ca
skype: sealevelns


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

123