Gossamer Forum
Home : Gossamer Threads Inc. : Discussion :

SQL Based Ad Server/Management Script

(Page 2 of 2)
> >
Quote Reply
Re: SQL Based Ad Server/Management Script In reply to
Ok <G> Let me digest this.

If I can digest it, and regurgitate it properly, then I understand it <G>

I've been up to the point of proxying all the /perl/ scripts to the "fat" server, and keeping all the /cgi-bin/ and .php3 scripts on the "thin" server (not that PHP is thin).

Let's see if I can _finally_ execute the mod_perl stuff on the fat server <G>,
along with PHP, and finally have a "thin" front end, and bloated back end .... (hmm... let's NOT go there...;) )

I know mod_perl is ok, but I've never been able to verify any scripts are actually running under it using the various commands to check the registered scripts.

More later..... :)

Ohhh.... one more thing! If I've rewritten the mod_php to the localhost:81 server, isn't there some sort of song/dance I need to do with proxypass & proxypass reverse to avoid ugly returned URL's?? (or is that what the P,L is taking care of?)

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: SQL Based Ad Server/Management Script In reply to
An easy way to test (on a non-live server), is to shutdown the mod_perl server, then try running the scripts. If you get a 502 error, then you know that the proxying is working properly. To test that they are being run under mod_perl, try:

print "GATEWAY: $ENV{GATEWAY_INTERFACE}\n";

in your mod_perl script and make sure it prints out 'CGI-Perl ...'.

Cheers,

Alex



--
Gossamer Threads Inc.
Quote Reply
Re: SQL Based Ad Server/Management Script In reply to
believe it or not... I finally had a bit of time to play with this, and I think I got it working. I see the test script properly with admin.cgi, and when I look at /perl-status I get all sorts of info, plus the "compiled" status of admin.cgi

Now, I've tried running add.cgi and search.cgi but they don't seem to be compiled. Maybe I'm not doing something right... But are all the scripts designed to compile and stay resident?

I see the various links .pm files as listed in the loaded modules area.

A few more days and I may even understand what I'm trying to do <G>

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: SQL Based Ad Server/Management Script In reply to
Look at Compiled Registry Scripts and you'll see the .cgi show up there. If you don't see it, then that means that that mod_perl process hasn't used add.cgi yet. However, reload a couple times and you should see it show up.

You can pre-load all your .cgi scripts by using Apache::RegistryLoader, see the perl guide for an example how.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: SQL Based Ad Server/Management Script In reply to
Ok, I see... if I have 25 apache processes, they all have to have loaded/compiled it to show in the 'registry' I'm looking at? That's sort of odd.... but I guess in a way it makes sense. Since 75+ are showing on the status screen... I guess it will take awhile for the test site to show it all <G>

Pre-loading would mean all the processes when initialized will have the modules and .cgi files loaded?

I've been looking at that issue... preloading has a fewproblems I need to work out, but it would mean a better response the first time a process is activated, though it would mean a slightly longer start up time -- probably negligible, if I only restart apache every few weeks or months anyway.

I may try to move the weather program over tonight, and that will beat the hell out of it :) I should also notice the performance difference, since that really is a pig of a process starter.


http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

> >