php-general Digest 28 Jan 2001 04:56:02 -0000 Issue 480

Topics (messages 36991 through 37090):

php code to do ph?
        36991 by: Paul Schreiber

Transparent SID and forms (POST) ?
        36992 by: Alain Fontaine
        37061 by: Markus Fischer

Re: Zend IDE price plans
        36993 by: Christopher Allen
        36997 by: Zeev Suraski
        37013 by: Frank Joerdens

Syncronizing of mysql-db
        36994 by: mn_rio.gmx.net
        37032 by: Brian Clark

Sending Download Header
        36995 by: Natasha
        37004 by: Bojan Gajic

include_path
        36996 by: Cal Evans

Re: PHP Cron jobs
        36998 by: Egan
        37009 by: Matthew Kendall

include_path, and whatever won't let me use a simple include('file.php')
        36999 by: Maxim Maletsky
        37008 by: Lewis Bergman

Re: phpinfo ?
        37000 by: Christian Reiniger

Re: Good Reads
        37001 by: Stephan Ahonen
        37006 by: Scott Gerhardt

A apache/php/mysql/linux security tutorial?
        37002 by: Dave Haggerty
        37003 by: Adrian Teasdale

Re: Accessing variables from other Apache modules
        37005 by: Andreas 'Count' Kotes

FTP rawcommands -> FXP
        37007 by: Andreas Richter

Custom Error 404
        37010 by: [ rswfire ]
        37015 by: Rasmus Lerdorf
        37016 by: [ rswfire ]
        37017 by: Rasmus Lerdorf

register_shutdown_function() not working ?
        37011 by: Andrew Sitnikov
        37019 by: Andrew Sitnikov

PHP Triad
        37012 by: [ rswfire ]

PHP/PDFLib on SCO
        37014 by: Michael Stearne

NT5 Sub Domains
        37018 by: [ rswfire ]
        37021 by: Rasmus Lerdorf
        37023 by: [ rswfire ]
        37027 by: Jonathan Sharp
        37030 by: jeremy brand
        37036 by: [ rswfire ]
        37037 by: Brian Clark
        37038 by: Jonathan Sharp
        37040 by: Jonathan Sharp
        37041 by: Brian Clark
        37042 by: [ rswfire ]
        37051 by: Jonathan Sharp

For India -- a fountain
        37020 by: Flupres5.aol.com

verpickteEngine - alphaRelease
        37022 by: Christian Kleinhuis

Apache on NT5
        37024 by: [ rswfire ]

Win32 - Mail & SMTP ???
        37025 by: Jon Shoberg

Thumbnails and PHP
        37026 by: Todd Cary
        37035 by: Brian Clark
        37059 by: Markus Fischer

[Newbie] - @
        37028 by: Steve Haemelinck
        37029 by: Jonathan Sharp

Re: PHP 4.0.3 on Debian?
        37031 by: Brian Clark
        37044 by: John Donagher
        37045 by: Brian Clark

Re: Oracle support not working
        37033 by: Brian Clark
        37056 by: Steve Haemelinck

Re: assigning an array to a array
        37034 by: Brian Clark

Apache on NT 5  =)
        37039 by: [ rswfire ]

Amazing!!
        37043 by: [ rswfire ]
        37060 by: Gary

functions????
        37046 by: Kumanan
        37049 by: Nick Winfield
        37050 by: Joe Sheble (Wizaerd)
        37054 by: Kumanan
        37058 by: Markus Fischer

Apache -> PHP 4 (CGI)
        37047 by: [ rswfire ]
        37052 by: Jonathan Sharp

$B#P#CA`:n$K:$$C$?$i(B
        37048 by: Kaz Morris

Re: Invoke PHP script from onLoad handler?
        37053 by: Chuck Mayo
        37055 by: Jonathan Sharp
        37064 by: Chuck Mayo
        37066 by: Markus Fischer

Re: Conditional include based on virtual host ?
        37057 by: Alister
        37067 by: Markus Fischer

Re: Remote Directory listing
        37062 by: Markus Fischer

CGI/PHP4
        37063 by: [ rswfire ]

Problem with a regex!
        37065 by: Zack Ham
        37069 by: Jonathan Sharp
        37070 by: Julian Wood
        37072 by: Zack Ham
        37074 by: CC Zona
        37075 by: Julian Wood
        37076 by: Zack Ham
        37089 by: Dustin Butler

JavaScript/PHP Function -> Apache/IIS5  ->  Client Properties
        37068 by: [ rswfire ]
        37071 by: Jonathan Sharp
        37073 by: [ rswfire ]

Leads>?
        37077 by: leadsleadsmoreleads890.hotmail.com
        37078 by: Jonathan Sharp

Apache
        37079 by: [ rswfire ]

E  Bay is going up again..
        37080 by: tabathia
        37081 by: Jonathan Sharp

strange PHP/MySQL problem
        37082 by: PeterOblivion.aol.com
        37088 by: Joe Stump
        37090 by: Joe Sheble (Wizaerd)

Apache Server
        37083 by: [ rswfire ]
        37086 by: Jonathan Sharp

Programming the Hard Way?
        37084 by: [ rswfire ]
        37085 by: Rasmus Lerdorf
        37087 by: Steve Werby

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


has anyone used PHP to talk to ph (directory) servers?

I found an old perl cgi, but i'd rather do this w/ php.

Paul

         shad 96c / 4B CS / mac activist / eda / fumbler
fan of / jewel / sophie b. / sarah slean / steve poltz / emm gryner /
       / x-files / buffy / dawson's creek / habs / bills / 49ers /
         
         t h i n k  d i f f e r e n t.

"Oh I'll be 21 and old without a clue" -- Emm Gryner, "July"





Hi,


When I use a form that POST's information to another php page, do I have to
manually include php's session name and the session id in HIDDEN form
fields, or is this done automatically ? This applies, of course, when the
user has cookies disabled...






On Sat, Jan 27, 2001 at 06:29:05PM +0100, Alain Fontaine wrote : 
> When I use a form that POST's information to another php page, do I have to
> manually include php's session name and the session id in HIDDEN form
> fields, or is this done automatically ? This applies, of course, when the
> user has cookies disabled...

        If you have enabled php4 with transparent sid's
(compile-thime switch --trans-sid) it happens automatically. To
all form actions and hrefs the sid is appended.

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0








> > An alternative (non-subscription) plan for the IDE will be announced
> > next  week.  It'll be designed to make the IDE much more affordable for
> > everyone,  including those who develop for commercial purposes.
> > 
> > Stay tuned!

An alternative is xemacs with the correct <.el >file.






At 17:37 27/1/2001, Lewis Bergman wrote:
>Also, Does anyone know if the IDE works on the snapshots? I didn't see
>anything to preclude it but it seemed to come packaged with a PHP version.
>I wouldn't want to give up the ability to code with the latest function to
>use an IDE. I guess I could just do without for that instance.

There's no guarantee that it'll work on snapshots, even though, chances are 
it will.

Zeev


--
Zeev Suraski <[EMAIL PROTECTED]>
CTO &  co-founder, Zend Technologies Ltd. http://www.zend.com/





On Sat, Jan 27, 2001 at 10:26:35AM -0500, Jim Jagielski wrote:
[ . . . ]
> You mean like the Commercial Subscription ($70/month) ?? The Encoder
> SE is available with that plan. In fact, that's almost the whole idea
> behind the Commercial subscription: to allow a very low entry for access
> to the Encoder technology.

You need to buy a whole year's subscription though. This means you don't
pay $70 a month but 12*$70=$840 a year, in monthly installments. There
is a difference between 'amount X a month' and 'amount Y a year in
monthly installments'. If X happens to be Y/12, it's still not the same.

Just my $0.02.

- Frank





Hi..

does annybody know a tool or script which can help me to syncronize two
mysql databases ?
like at my isp is a database for the web, at home my local development
server.. 
changes i do at home or online should be "syncronized" by a php script every
xx houres called by cron

markus

-- 
Sent through GMX FreeMail - http://www.gmx.net






Hello markus,

(mgn == "[EMAIL PROTECTED]") [EMAIL PROTECTED] drafted:

mgn> does annybody know a tool or script which can help me to
mgn> syncronize two mysql databases ? like at my isp is a database for
mgn> the web, at home my local development server.. changes i do at
mgn> home or online should be "syncronized" by a php script every xx
mgn> houres called by cron

This may not be the simplest route, but you can use rsync to do
exactly that. http://rsync.samba.org/rsync/README.html

Another option might be to use an expect script. If you have expect
installed, check out the examples directory. There should be a script
in there called rftp. May work with a little hacking.

There may be more simple solutions, I don't know.

mgn> markus

-Brian






Hi,

I'm making a small thing, that sends download response
to the header, so that I can build a file from some
data in the mysql, and send the data. It can be both
text and binary data, could some one help out how to
go about this ?

I know about Content-Disposition, but I don't know to
build it.

thanks.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/





header("Content-Disposition: attachment; filename=$file_name");
header("Content-Type: application/octet-stream"); //or any other MIME type
....
echo "Content";

HTH,
Bojan Gajic


Natasha wrote:

> Hi,
>
> I'm making a small thing, that sends download response
> to the header, so that I can build a file from some
> data in the mysql, and send the data. It can be both
> text and binary data, could some one help out how to
> go about this ?
>
> I know about Content-Disposition, but I don't know to
> build it.
>
> thanks.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





is there any way to determine the include_path from within a PHP script?

I want to see if a file exists within my include path before trying to do an
include.

Cal
http://www.calevans.com






On Sat, 27 Jan 2001 18:05:08 +1030, "James Mclean"
<[EMAIL PROTECTED]> wrote:

>    i do not have access to the cron system on my server

>    The Sysadmin for the server is absolutly useless, so getting him to submit a
>cron job is no good.
>    any ideas??


My idea:

We provide user cron access with your shell account.  Apache, PHP and
MySQL hosting near the major Chicago NAP.

Send me an email and I can give you a test account.

:-)



Egan







"James Mclean" <[EMAIL PROTECTED]> wrote...
> i do not have access to the cron system on my server, but
> would like to write a script that does some general housekeeping
> on my database, and various other things like removing old users,
> sending some newsletters etc...

What about putting the script in a regular PHP web page. Then you can call
up that page from any machine on the planet and the housekeeping functions
will be performed right then. So you could set up a cron job (or whatever)
on a machine you _do_ have admin access to, to simply call up the
housekeeping page on a regular basis. And you could use some basic
authentication to make sure the general public does not call up this page if
that is important to you, e.g. check the client IP address.






Hello guys,

I've just installed PHP and Apache on my Win2K workstation at home using
PHPTriad.

my include_path in PHP.ini has the following:

include_path    = "p:\includes c:\phplib P:\other_staff" ;

Now, it does work well includ()ing any files from these directories, however
it won't let me include() a simple file unless I specify the $DOCUMENT_ROOT
for it:

Ho be more clear:

#we are in the same directory...
 include('prepend.php'); #works because it is within 'c:\phplib' directory'
 include("$DOCUMENT_ROOT/a/folder/a/file.php"); #works as long as file is
there...
 include('a/folder/a/file.php'); #won't work at all ...

Yes, I know that the file is there - I use include() the same way since my
very beginning of programming.
What do you think I've misconfigured? Is that something with PHP on windows?
php.ini? directory specifications? apache?

Any suggestions would be very appreciated,

Thanks in advance,
Maxim Maletsky





> include_path  = "p:\includes c:\phplib P:\other_staff" ;
> 
Add the directory itself. In Linux this would look like this:
include_path = .:/includes:/phplib:/other_staff
The "." is the current dir just as an ls -la or dir on windows would list. 
I don't know anything about how to configure PHP for windows but I assume 
the same problem is there.





On Friday 26 January 2001 23:54, John Guynn wrote:
> I've always used the echo and it does work under PHP4...just tested it
> on www.teamkaos.org before I made my post.

Sure it works as well :)
But look closely at the output - with 
echo phpinfo ();
phpinfo prints out the, well, info, and *then* you echo the returnvalue 
of phpinfo () (an integer).
So the output generated by your version will have some little number at 
the end.


-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

(A)bort (R)etry (P)retend this never happened ...




As much as reading a book is helpful in getting you started really quick, I
was able to do most of my learning by taking a simple "web page on a
template" script, studying the syntax, and trying to improve it, keeping the
language reference nearby for the stuff I didn't know. After a couple weeks,
I had a good idea what all the functions did and only needed the reference
to look up the syntax... Now I can code most of the functions I need from my
head, and I didn't have to spend a single cent. (Sorry, book authors...)





Yes, I agree that a person can learn a lot about coding by looking at
working examples and modifying them to you specific situation.
It is also nice to have a good book for reference and a good read.



> -----Original Message-----
> From: Stephan Ahonen [mailto:[EMAIL PROTECTED]]
> Sent: January 27, 2001 12:46 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Good Reads
>
>
> As much as reading a book is helpful in getting you started
> really quick, I
> was able to do most of my learning by taking a simple "web page on a
> template" script, studying the syntax, and trying to improve it,
> keeping the
> language reference nearby for the stuff I didn't know. After a
> couple weeks,
> I had a good idea what all the functions did and only needed the reference
> to look up the syntax... Now I can code most of the functions I
> need from my
> head, and I didn't have to spend a single cent. (Sorry, book authors...)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





I have read through variouos docs to learn about security issues for running
a linux/apache/mysql/php server and have learned a lot.  What I'd like,
though, is to know if there is an overall tutorial on this specific topic,
where all the info is in one place?  Hopefully aimed at the newbie?

Thanks

Dave







> I have read through variouos docs to learn about security issues for
running
> a linux/apache/mysql/php server and have learned a lot.  What I'd like,
> though, is to know if there is an overall tutorial on this specific topic,
> where all the info is in one place?  Hopefully aimed at the newbie?

I can't actually answer your question on this, but I think a resource site
where all the info is placed together would be an excellent idea.  I know
that the Cold Fusion community has a site devoted to this.  Count me in if
you want to start developing something like this

Ade

---  i n o v i c a . c o m  ------------------------
e:     [EMAIL PROTECTED]
w:     http://www.inovica.com

Web Apps, virtual communities and vertical portals
Hosting and dedicated servers just around the corner
Contact us for low-cost domain name registration
----------------------------------------------------





Hi!

I'd like to get SSL_CLIENT_S_DN from mod_ssl but don't seem to be able
to get it using getenv() or apache_note(), it doesn't even show up when
doing phpinfo() .. any hints?

this problem is a little bit more generic, I think. Besides
apache_note(), I don't see a way to get this data, but it doesn't show
up there.

   Count




I need a function to exec raw commands on a server, like "LIST" and esp. "LIST -al". I 
going to use it for programming a public php-fxp client.


mfg 




I am designing a network of Internet sites on NT5 using PHP.  However, when 
I go live with the network, it will be on a Linux system using PHP.

My sites are handled somewhat uniquely.  When a visitor (or a component of 
the network) enters a URL address, the address does not really exist!  They 
are given a custom 404 error page that determines what information/site they 
are trying to view and the page is then created.

I need to know if Linux handles custom error messages the same as NT5.

Here's the scenario:

Let's say I call the following page:  
http://domain.com/site/index.html?anyvar=yeah

The page does not exist so the custom error page is called.  For now, I have 
phpinfo() in the custom error page.  On NT5, the following appears under the 
phpinfo():

SCRIPT_NAME  = name of error page
QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah

Is this how the query string will appear on a Linux machine?  I need to know 
in order to parse the string right...

If it will appear differently, please let me know how.  Thanks in advance!!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





This is a web server question, not a PHP question.  You didn't say which
web server you are using on NT5, nor which one you are planning to use on
Linux.  PHP has nothing to do with how this works.

On Linux with Apache you will get the following variables when you make a
request for domain.com/blah?abc=123&def=456

REDIRECT_ERROR_NOTES     File does not exist: /home/rasmus/phpweb/blah
REDIRECT_QUERY_STRING    abc=123&def=345
REDIRECT_REQUEST_METHOD  GET
REDIRECT_STATUS          404
REDIRECT_URL             /blah
QUERY_STRING             <empty>
REQUEST_URI              /blah?abc=123&def=345

-Rasmus


On Sat, 27 Jan 2001, [ rswfire ] wrote:

> I am designing a network of Internet sites on NT5 using PHP.  However, when
> I go live with the network, it will be on a Linux system using PHP.
>
> My sites are handled somewhat uniquely.  When a visitor (or a component of
> the network) enters a URL address, the address does not really exist!  They
> are given a custom 404 error page that determines what information/site they
> are trying to view and the page is then created.
>
> I need to know if Linux handles custom error messages the same as NT5.
>
> Here's the scenario:
>
> Let's say I call the following page:
> http://domain.com/site/index.html?anyvar=yeah
>
> The page does not exist so the custom error page is called.  For now, I have
> phpinfo() in the custom error page.  On NT5, the following appears under the
> phpinfo():
>
> SCRIPT_NAME  = name of error page
> QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah
>
> Is this how the query string will appear on a Linux machine?  I need to know
> in order to parse the string right...
>
> If it will appear differently, please let me know how.  Thanks in advance!!
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Thank you, Rasmus.

I had a feeling I needed to provide more information.  Right now, I am 
running NT 5, with the CGI version of PHP 4, and IIS 5 as the web server.

As for the Linux machine, it will be running Apache web server.  So I'm 
assuming that the information below is what I need.  It looks like all I 
need is the REDIRECT_QUERY_STRING on Apache.  So I will only need to parse 
the NT string while I am developing the network.  Thanks again!


>From: Rasmus Lerdorf <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [PHP] Custom Error 404
>Date: Sat, 27 Jan 2001 12:17:01 -0800 (PST)
>
>This is a web server question, not a PHP question.  You didn't say which
>web server you are using on NT5, nor which one you are planning to use on
>Linux.  PHP has nothing to do with how this works.
>
>On Linux with Apache you will get the following variables when you make a
>request for domain.com/blah?abc=123&def=456
>
>REDIRECT_ERROR_NOTES     File does not exist: /home/rasmus/phpweb/blah
>REDIRECT_QUERY_STRING    abc=123&def=345
>REDIRECT_REQUEST_METHOD  GET
>REDIRECT_STATUS          404
>REDIRECT_URL             /blah
>QUERY_STRING             <empty>
>REQUEST_URI              /blah?abc=123&def=345
>
>-Rasmus
>
>
>On Sat, 27 Jan 2001, [ rswfire ] wrote:
>
> > I am designing a network of Internet sites on NT5 using PHP.  However, 
>when
> > I go live with the network, it will be on a Linux system using PHP.
> >
> > My sites are handled somewhat uniquely.  When a visitor (or a component 
>of
> > the network) enters a URL address, the address does not really exist!  
>They
> > are given a custom 404 error page that determines what information/site 
>they
> > are trying to view and the page is then created.
> >
> > I need to know if Linux handles custom error messages the same as NT5.
> >
> > Here's the scenario:
> >
> > Let's say I call the following page:
> > http://domain.com/site/index.html?anyvar=yeah
> >
> > The page does not exist so the custom error page is called.  For now, I 
>have
> > phpinfo() in the custom error page.  On NT5, the following appears under 
>the
> > phpinfo():
> >
> > SCRIPT_NAME  = name of error page
> > QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah
> >
> > Is this how the query string will appear on a Linux machine?  I need to 
>know
> > in order to parse the string right...
> >
> > If it will appear differently, please let me know how.  Thanks in 
>advance!!
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





> As for the Linux machine, it will be running Apache web server.  So I'm
> assuming that the information below is what I need.  It looks like all I
> need is the REDIRECT_QUERY_STRING on Apache.  So I will only need to parse
> the NT string while I am developing the network.  Thanks again!

The parse_str() function will come in handy here.  See php.net/parse_str

-Rasmus





Hello php-general,

 Why this not working (php.4.0.4pl1_Linux)?
 
<?
 error_reporting(E_ALL);

 $file_name = '../tmp/text.txt';

 function funct1(){
   global $file_name;
   if ($fd = fopen($file_name,'a+')){
     fwrite($fd,"Funct1\n");
     fclose($fd);
   }else{
     die("Can not open output file");
   }
 }

 function funct2(){
   global $file_name;
   if ($fd = fopen($file_name,'a+')){
     fwrite($fd,"Funct2\n");
     fclose($fd);
   }
 }

 $i = register_shutdown_function('funct2');
 funct1();
?>

file have only  "Funct1" ?

Best regards,
 Andrew Sitnikov                         
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109






Hello Andrew,

Sorry, but i forget what I have Zend Debuger :)

Problem in file path, when i use absolute path
/home/user/tmp/tmp/text.txt all works.

It appears, that in shutdown_function getcwd () == '/',
but in script getcwd () == '/home/user/public_html/'

Only not clearly why.


AS> Hello php-general,

AS>  Why this not working (php.4.0.4pl1_Linux)?
 
AS> <?
AS>  error_reporting(E_ALL);

AS>  $file_name = '../tmp/text.txt';

AS>  function funct1(){
AS>    global $file_name;
AS>    if ($fd = fopen($file_name,'a+')){
AS>      fwrite($fd,"Funct1\n");
AS>      fclose($fd);
AS>    }else{
AS>      die("Can not open output file");
AS>    }
AS>  }

AS>  function funct2(){
AS>    global $file_name;
AS>    if ($fd = fopen($file_name,'a+')){
AS>      fwrite($fd,"Funct2\n");
AS>      fclose($fd);
AS>    }
AS>  }

AS>  $i = register_shutdown_function('funct2');
AS>  funct1();
?>>

AS> file have only  "Funct1" ?

AS> Best regards,
AS>  Andrew Sitnikov                         
AS>  e-mail : [EMAIL PROTECTED]
AS>  GSM: (+372) 56491109






Best regards,
 Andrew Sitnikov                         
 e-mail : [EMAIL PROTECTED]
 GSM    : (+372) 56491109






What is PHP Triad?  How can I learn more about it??

=====================================================
Hello guys,

I've just installed PHP and Apache on my Win2K workstation at home using
PHPTriad.

my include_path in PHP.ini has the following:

include_path    = "p:\includes c:\phplib P:\other_staff" ;

Now, it does work well includ()ing any files from these directories, however
it won't let me include() a simple file unless I specify the $DOCUMENT_ROOT
for it:

Ho be more clear:

#we are in the same directory...
include('prepend.php'); #works because it is within 'c:\phplib' directory'
include("$DOCUMENT_ROOT/a/folder/a/file.php"); #works as long as file is
there...
include('a/folder/a/file.php'); #won't work at all ...

Yes, I know that the file is there - I use include() the same way since my
very beginning of programming.
What do you think I've misconfigured? Is that something with PHP on windows?
php.ini? directory specifications? apache?

Any suggestions would be very appreciated,

Thanks in advance,
Maxim Maletsky


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Has anyone here gotten or tried to get PHP with Pdflib working on SCO
(it's 5.0.5 I believe).  I have tried to compile PHP as a CGI but have
no luck with combining the two on SCO.  It compiles fineon Linux, but
I am looking for someone who has tried it on SCO.  PHP 4.0.4pl1/PDFLib
3.03

Thanks,
Michael





This is a little off topic, so I apologize, but I was hoping one of the 
computer gurus here could help me.

When I go live with my network, I will be using sub-domains.  Such as:  
http://subdomain.domain.com/

In order to test this on my NT5/IIS5 system, I need to be able to use these 
subdomains.  I am programming locally, so there is no .com after my name.  
It is my computer name:  http://si-exec-cio/

Does anyone know how I can configure IIS5 to include 
http://subdomain.si-exec-cio/ ?

I am using Win 2000 Professional.

Again, I apologize for sending an off-topic message.  My network is 
primarily controlled by PHP so I hope you can understand.  =)
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Why don't you just install the Windows version of Apache?  That way your
development environment will be much closer to your production
environment.

-Rasmus

On Sat, 27 Jan 2001, [ rswfire ] wrote:

> This is a little off topic, so I apologize, but I was hoping one of the
> computer gurus here could help me.
>
> When I go live with my network, I will be using sub-domains.  Such as:
> http://subdomain.domain.com/
>
> In order to test this on my NT5/IIS5 system, I need to be able to use these
> subdomains.  I am programming locally, so there is no .com after my name.
> It is my computer name:  http://si-exec-cio/
>
> Does anyone know how I can configure IIS5 to include
> http://subdomain.si-exec-cio/ ?
>
> I am using Win 2000 Professional.
>
> Again, I apologize for sending an off-topic message.  My network is
> primarily controlled by PHP so I hope you can understand.  =)
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I've never tried that before.  I'd be scared of doing something wrong.  Can 
I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I 
wouldn't know where to begin...  =)

I can hear the answer already...  apache.com



>From: Rasmus Lerdorf <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
>
>Why don't you just install the Windows version of Apache?  That way your
>development environment will be much closer to your production
>environment.
>
>-Rasmus
>
>On Sat, 27 Jan 2001, [ rswfire ] wrote:
>
> > This is a little off topic, so I apologize, but I was hoping one of the
> > computer gurus here could help me.
> >
> > When I go live with my network, I will be using sub-domains.  Such as:
> > http://subdomain.domain.com/
> >
> > In order to test this on my NT5/IIS5 system, I need to be able to use 
>these
> > subdomains.  I am programming locally, so there is no .com after my 
>name.
> > It is my computer name:  http://si-exec-cio/
> >
> > Does anyone know how I can configure IIS5 to include
> > http://subdomain.si-exec-cio/ ?
> >
> > I am using Win 2000 Professional.
> >
> > Again, I apologize for sending an off-topic message.  My network is
> > primarily controlled by PHP so I hope you can understand.  =)
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Ah...yes you can. You're probably scared of apache because it doesn't have a
GUI! But don't fret I was in the same boat not too long ago!

1) Download the lastest version of apache (www.apache.org you were close...)
2) Install apache (it does have an installation program)
3) Configuring apache
To configure apache you need to edit the httpd.conf file (I suggest you
create a backfirst!) it's pretty self explanatory, there's lots of
documentation for it. You can run both IIS and Apache as long as they're not
running on the same ports (eg :80, so either disable the web server for IIS
on port 80 (or change it to something like 64892) or make apache run on some
other port (you set this in httpd.conf under the Port option)) So after
you've setup your httpd.conf file, you'll start apache from the command line
(you may scream now if you'd like...this is where MS is...MS...) you run the
apache deamon with a command like C:\path\to\apache.exe start
C:\path\to\httpd.conf It's something similar to that, the command prompt
window will stay open and you won't be able to do anything in that window,
so to shut down apache, open a new window and do the C:\path\to\apache.exe
stop (I haven't done this on NT in a while so those commands are probably
wrong but it should be the right direction)
4) To setup subdomains (this is the good part)
If you want to actually setup domain.com to develop on locally and the site
isn't "online" you can add an entry to your hosts file (somewhere in
C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
bogus TLD like domain.dev) and that will redirect all requests for
domain.xxx to your local apache server (assuming you've set Bind to * in the
httpd.conf file to listen to all IPs) For the actual subdomains you'd set
these in the httpd.conf file under VirtualDirectories (you can either do
Name based subdomains (one IP bound to NIC & multiple domains) or IP based
subdomains (multiple IPs bound to NIC & multiple domain names) Check the
apache.org documentation on how to set them up. It's not too terribly
complex...

NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
    ServerAdmin [EMAIL PROTECTED]
    ServerName subdomain.domain.com
    DocumentRoot C:\path\to\your\website
</VirtualHost>

Just be careful though...once you start using apache and such you'll be on
linux in no time...I have three dev servers now & two live servers...NT is
my desktop only because I use homesite to dev with and a few other winx
progs. Also if anyof you out there know a good colorcoding *nix developer
app (for PHP of couse) please let me know!

If you get stuck on anything, just holler... (i'm usually on EFNet in PHP as
codeboy)

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 1:42 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] NT5 Sub Domains


I've never tried that before.  I'd be scared of doing something wrong.  Can
I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I
wouldn't know where to begin...  =)

I can hear the answer already...  apache.com



>From: Rasmus Lerdorf <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
>
>Why don't you just install the Windows version of Apache?  That way your
>development environment will be much closer to your production
>environment.
>
>-Rasmus
>
>On Sat, 27 Jan 2001, [ rswfire ] wrote:
>
> > This is a little off topic, so I apologize, but I was hoping one of the
> > computer gurus here could help me.
> >
> > When I go live with my network, I will be using sub-domains.  Such as:
> > http://subdomain.domain.com/
> >
> > In order to test this on my NT5/IIS5 system, I need to be able to use
>these
> > subdomains.  I am programming locally, so there is no .com after my
>name.
> > It is my computer name:  http://si-exec-cio/
> >
> > Does anyone know how I can configure IIS5 to include
> > http://subdomain.si-exec-cio/ ?
> >
> > I am using Win 2000 Professional.
> >
> > Again, I apologize for sending an off-topic message.  My network is
> > primarily controlled by PHP so I hope you can understand.  =)
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







apache.org.  :)

> I can hear the answer already...  apache.com
> 
> 
> 
> >From: Rasmus Lerdorf <[EMAIL PROTECTED]>
> >To: "[ rswfire ]" <[EMAIL PROTECTED]>
> >CC: <[EMAIL PROTECTED]>
> >Subject: Re: [PHP] NT5 Sub Domains
> >Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
> >
> >Why don't you just install the Windows version of Apache?  That way your
> >development environment will be much closer to your production
> >environment.
> >
> >-Rasmus
> >
> >On Sat, 27 Jan 2001, [ rswfire ] wrote:
> >
> > > This is a little off topic, so I apologize, but I was hoping one of the
> > > computer gurus here could help me.
> > >
> > > When I go live with my network, I will be using sub-domains.  Such as:
> > > http://subdomain.domain.com/
> > >
> > > In order to test this on my NT5/IIS5 system, I need to be able to use 
> >these
> > > subdomains.  I am programming locally, so there is no .com after my 
> >name.
> > > It is my computer name:  http://si-exec-cio/
> > >
> > > Does anyone know how I can configure IIS5 to include
> > > http://subdomain.si-exec-cio/ ?
> > >
> > > I am using Win 2000 Professional.
> > >
> > > Again, I apologize for sending an off-topic message.  My network is
> > > primarily controlled by PHP so I hope you can understand.  =)
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 






Jonathon,

Thanks so much for your help!!  Okay, I have downloaded and installed 
Apache.  And to my utter surprise...it's working!!  You're right, the fact 
that it does not have a GUI is the reason I was scared of it.  =)

I set the Apache Port option to 8080.  Is that good?  I stopped the IIS 
service.  And now I can't get it to restart, not sure why...

I set Bind to *

Should I set the ServerName directive to domain.dev?  Or does this have to 
be done in the HOSTS file you mentioned?


This is really sweet.  =)




>From: "Jonathan Sharp" <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: RE: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 14:14:59 -0800
>
>Ah...yes you can. You're probably scared of apache because it doesn't have 
>a
>GUI! But don't fret I was in the same boat not too long ago!
>
>1) Download the lastest version of apache (www.apache.org you were 
>close...)
>2) Install apache (it does have an installation program)
>3) Configuring apache
>To configure apache you need to edit the httpd.conf file (I suggest you
>create a backfirst!) it's pretty self explanatory, there's lots of
>documentation for it. You can run both IIS and Apache as long as they're 
>not
>running on the same ports (eg :80, so either disable the web server for IIS
>on port 80 (or change it to something like 64892) or make apache run on 
>some
>other port (you set this in httpd.conf under the Port option)) So after
>you've setup your httpd.conf file, you'll start apache from the command 
>line
>(you may scream now if you'd like...this is where MS is...MS...) you run 
>the
>apache deamon with a command like C:\path\to\apache.exe start
>C:\path\to\httpd.conf It's something similar to that, the command prompt
>window will stay open and you won't be able to do anything in that window,
>so to shut down apache, open a new window and do the C:\path\to\apache.exe
>stop (I haven't done this on NT in a while so those commands are probably
>wrong but it should be the right direction)

>4) To setup subdomains (this is the good part)
>If you want to actually setup domain.com to develop on locally and the site
>isn't "online" you can add an entry to your hosts file (somewhere in
>C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
>bogus TLD like domain.dev) and that will redirect all requests for
>domain.xxx to your local apache server (assuming you've set Bind to * in 
>the
>httpd.conf file to listen to all IPs) For the actual subdomains you'd set
>these in the httpd.conf file under VirtualDirectories (you can either do
>Name based subdomains (one IP bound to NIC & multiple domains) or IP based
>subdomains (multiple IPs bound to NIC & multiple domain names) Check the
>apache.org documentation on how to set them up. It's not too terribly
>complex...
>
>NameVirtualHost 127.0.0.1
><VirtualHost 127.0.0.1>
>     ServerAdmin [EMAIL PROTECTED]
>     ServerName subdomain.domain.com
>     DocumentRoot C:\path\to\your\website
></VirtualHost>
>
>Just be careful though...once you start using apache and such you'll be on
>linux in no time...I have three dev servers now & two live servers...NT is
>my desktop only because I use homesite to dev with and a few other winx
>progs. Also if anyof you out there know a good colorcoding *nix developer
>app (for PHP of couse) please let me know!
>
>If you get stuck on anything, just holler... (i'm usually on EFNet in PHP 
>as
>codeboy)
>
>-Jonathan Sharp
>
>Director of Technology - Imprev Inc.
>Renwick Development Group - Flyerware
>http://www.flyerware.com/
>Phone: (425)688-9200
>Cell: (425)766-1398
>EPage: [EMAIL PROTECTED]
>
>
>-----Original Message-----
>From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, January 27, 2001 1:42 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP] NT5 Sub Domains
>
>
>I've never tried that before.  I'd be scared of doing something wrong.  Can
>I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I
>wouldn't know where to begin...  =)
>
>I can hear the answer already...  apache.com
>
>
>
> >From: Rasmus Lerdorf <[EMAIL PROTECTED]>
> >To: "[ rswfire ]" <[EMAIL PROTECTED]>
> >CC: <[EMAIL PROTECTED]>
> >Subject: Re: [PHP] NT5 Sub Domains
> >Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
> >
> >Why don't you just install the Windows version of Apache?  That way your
> >development environment will be much closer to your production
> >environment.
> >
> >-Rasmus
> >
> >On Sat, 27 Jan 2001, [ rswfire ] wrote:
> >
> > > This is a little off topic, so I apologize, but I was hoping one of 
>the
> > > computer gurus here could help me.
> > >
> > > When I go live with my network, I will be using sub-domains.  Such as:
> > > http://subdomain.domain.com/
> > >
> > > In order to test this on my NT5/IIS5 system, I need to be able to use
> >these
> > > subdomains.  I am programming locally, so there is no .com after my
> >name.
> > > It is my computer name:  http://si-exec-cio/
> > >
> > > Does anyone know how I can configure IIS5 to include
> > > http://subdomain.si-exec-cio/ ?
> > >
> > > I am using Win 2000 Professional.
> > >
> > > Again, I apologize for sending an off-topic message.  My network is
> > > primarily controlled by PHP so I hope you can understand.  =)
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
>[EMAIL PROTECTED]
> > >
> >
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com






Hello rswfire,

(r == "[ rswfire ]") [EMAIL PROTECTED] stated:

r> You're right, the fact that it does not have a GUI is the reason I
r> was scared of it. =)

<snip>

>>(you may scream now if you'd like...this is where MS is...MS...) you
>>run the apache deamon with a command like C:\path\to\apache.exe
>>start

Good lord! That was a lot of trimming for quoted material. :)

Anyway, you can also use Apache Manager from the Windows Tray to stop
and start Apache (without any annoying MS-DOS windows).

http://brian.threadnet.com

It's written by Brian Moon. The same guy who authored Phorum.

-Brian






> I set the Apache Port option to 8080.  Is that good?  I stopped the IIS
> service.  And now I can't get it to restart, not sure why...
Hm, well 8080 is fine, I'm not sure why IIS won't start...but MS probably is
freaking out that opensource is actually taking over it's domain (no pun
intended) =)

> I set Bind to *
That's good, whatever IPs that are config'd on your box apache will bind to
on 8080

> Should I set the ServerName directive to domain.dev?  Or does this have to
> be done in the HOSTS file you mentioned?
Yes you can set ServerName to domain.dev or whatever.foo the reason that
you'll add the entry to your HOSTS file is because most likely you're not
running a DNS server to authentically map that domain to your IP. Windows
looks at HOSTS before it goes to a DNS so that way you can map that domain
to your local host without having to mess with dns or anything and simulate
a production environment (that HOSTS file is quite intersting, try the entry
"216.136.171.205 microsoft.com" and then visit microsoft.com, you'll be
surprised... =) (NOTE TO VIRUS CREATORS: That would be an interesting
hack...to add an entry to the hosts file that does that mapping...oh...that
would get the big BG mad...)

After you've been doing this for a little while, you'll have to get an old
box (like P200 or something) to stick linux on and have that be your dev
server...your EYES will be opened...trust me, the MS empire won't always be
as vast as it is, TUX is alive and moving!)

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] NT5 Sub Domains



Jonathon,

Thanks so much for your help!!  Okay, I have downloaded and installed
Apache.  And to my utter surprise...it's working!!  You're right, the fact
that it does not have a GUI is the reason I was scared of it.  =)

I set the Apache Port option to 8080.  Is that good?  I stopped the IIS
service.  And now I can't get it to restart, not sure why...

I set Bind to *

Should I set the ServerName directive to domain.dev?  Or does this have to
be done in the HOSTS file you mentioned?


This is really sweet.  =)




>From: "Jonathan Sharp" <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: RE: [PHP] NT5 Sub Domains
>Date: Sat, 27 Jan 2001 14:14:59 -0800
>
>Ah...yes you can. You're probably scared of apache because it doesn't have
>a
>GUI! But don't fret I was in the same boat not too long ago!
>
>1) Download the lastest version of apache (www.apache.org you were
>close...)
>2) Install apache (it does have an installation program)
>3) Configuring apache
>To configure apache you need to edit the httpd.conf file (I suggest you
>create a backfirst!) it's pretty self explanatory, there's lots of
>documentation for it. You can run both IIS and Apache as long as they're
>not
>running on the same ports (eg :80, so either disable the web server for IIS
>on port 80 (or change it to something like 64892) or make apache run on
>some
>other port (you set this in httpd.conf under the Port option)) So after
>you've setup your httpd.conf file, you'll start apache from the command
>line
>(you may scream now if you'd like...this is where MS is...MS...) you run
>the
>apache deamon with a command like C:\path\to\apache.exe start
>C:\path\to\httpd.conf It's something similar to that, the command prompt
>window will stay open and you won't be able to do anything in that window,
>so to shut down apache, open a new window and do the C:\path\to\apache.exe
>stop (I haven't done this on NT in a while so those commands are probably
>wrong but it should be the right direction)

>4) To setup subdomains (this is the good part)
>If you want to actually setup domain.com to develop on locally and the site
>isn't "online" you can add an entry to your hosts file (somewhere in
>C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
>bogus TLD like domain.dev) and that will redirect all requests for
>domain.xxx to your local apache server (assuming you've set Bind to * in
>the
>httpd.conf file to listen to all IPs) For the actual subdomains you'd set
>these in the httpd.conf file under VirtualDirectories (you can either do
>Name based subdomains (one IP bound to NIC & multiple domains) or IP based
>subdomains (multiple IPs bound to NIC & multiple domain names) Check the
>apache.org documentation on how to set them up. It's not too terribly
>complex...
>
>NameVirtualHost 127.0.0.1
><VirtualHost 127.0.0.1>
>     ServerAdmin [EMAIL PROTECTED]
>     ServerName subdomain.domain.com
>     DocumentRoot C:\path\to\your\website
></VirtualHost>
>
>Just be careful though...once you start using apache and such you'll be on
>linux in no time...I have three dev servers now & two live servers...NT is
>my desktop only because I use homesite to dev with and a few other winx
>progs. Also if anyof you out there know a good colorcoding *nix developer
>app (for PHP of couse) please let me know!
>
>If you get stuck on anything, just holler... (i'm usually on EFNet in PHP
>as
>codeboy)
>
>-Jonathan Sharp
>
>Director of Technology - Imprev Inc.
>Renwick Development Group - Flyerware
>http://www.flyerware.com/
>Phone: (425)688-9200
>Cell: (425)766-1398
>EPage: [EMAIL PROTECTED]
>
>
>-----Original Message-----
>From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, January 27, 2001 1:42 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP] NT5 Sub Domains
>
>
>I've never tried that before.  I'd be scared of doing something wrong.  Can
>I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I
>wouldn't know where to begin...  =)
>
>I can hear the answer already...  apache.com
>
>
>
> >From: Rasmus Lerdorf <[EMAIL PROTECTED]>
> >To: "[ rswfire ]" <[EMAIL PROTECTED]>
> >CC: <[EMAIL PROTECTED]>
> >Subject: Re: [PHP] NT5 Sub Domains
> >Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
> >
> >Why don't you just install the Windows version of Apache?  That way your
> >development environment will be much closer to your production
> >environment.
> >
> >-Rasmus
> >
> >On Sat, 27 Jan 2001, [ rswfire ] wrote:
> >
> > > This is a little off topic, so I apologize, but I was hoping one of
>the
> > > computer gurus here could help me.
> > >
> > > When I go live with my network, I will be using sub-domains.  Such as:
> > > http://subdomain.domain.com/
> > >
> > > In order to test this on my NT5/IIS5 system, I need to be able to use
> >these
> > > subdomains.  I am programming locally, so there is no .com after my
> >name.
> > > It is my computer name:  http://si-exec-cio/
> > >
> > > Does anyone know how I can configure IIS5 to include
> > > http://subdomain.si-exec-cio/ ?
> > >
> > > I am using Win 2000 Professional.
> > >
> > > Again, I apologize for sending an off-topic message.  My network is
> > > primarily controlled by PHP so I hope you can understand.  =)
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
>[EMAIL PROTECTED]
> > >
> >
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







Brian! You're not helping here, i'm in the middle of a conversion! I'm
trying to help this guy find his destiny! Com'on!

rswfire: You want to get used to the command line, trust me!

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-----Original Message-----
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:52 PM
To: PHP is not a drug .
Subject: Re: [PHP] NT5 Sub Domains



Hello rswfire,

(r == "[ rswfire ]") [EMAIL PROTECTED] stated:

r> You're right, the fact that it does not have a GUI is the reason I
r> was scared of it. =)

<snip>

>>(you may scream now if you'd like...this is where MS is...MS...) you
>>run the apache deamon with a command like C:\path\to\apache.exe
>>start

Good lord! That was a lot of trimming for quoted material. :)

Anyway, you can also use Apache Manager from the Windows Tray to stop
and start Apache (without any annoying MS-DOS windows).

http://brian.threadnet.com

It's written by Brian Moon. The same guy who authored Phorum.

-Brian



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








Hello Jonathan, 

(JS == "Jonathan Sharp") [EMAIL PROTECTED] canalized:

JS> Brian! You're not helping here, i'm in the middle of a conversion!
JS> I'm trying to help this guy find his destiny! Com'on!

:)

JS> rswfire: You want to get used to the command line, trust me!

I use it every day. BSDi, RedHat, Debian, OpenBSD, and sometimes from
the Run box in Windows when I actually *need* to use command.com.

But I got tired, loooong ago, of fo0king around in clumsy MS-DOS.

Unless we're talking about a *real* command line here, my suggestion
still stands.. ;)

-Brian






Thank you Brian and Jonathon.  You are both very helpful!!  I think I like 
the idea of a tray icon -- rather than an annoying DOS window I cannot get 
rid of from my task bar!  =)

No offense, Jonathon...  I agree, I need to work on my command line 
skills...

Should I install Apache as a service on NT??  Then it starts automatically, 
right?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Yeah, well all have our preferences...and the NT command line is NOTHING
like a good *nix one, so I guess I'll agree that the GUI is approvable by
me. =)

I would install it, I think that would take one less step out of getting to
developing when you boot your box!

-Jonathan

-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 3:07 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] NT5 Sub Domains


Thank you Brian and Jonathon.  You are both very helpful!!  I think I like
the idea of a tray icon -- rather than an annoying DOS window I cannot get
rid of from my task bar!  =)

No offense, Jonathon...  I agree, I need to work on my command line
skills...

Should I install Apache as a service on NT??  Then it starts automatically,
right?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







For India / a fountain 

We have been working on a completely volunteer PHP/ MySQL / Linux project for 
about 6 months. It is a low-overhead way to showcase and fundraise for new 
small charitable projects.  We just received (Jan 10th) tax exemption from 
the IRS as well as clearance to give grants overseas.  We expected to 
complete work in about 2-3 months using part-time PHP coders. 

Then the earthquake happened.  

So we are asking ourselves, even though we are not prepared, if we can 
mobilize our resources and build this in time to give rebuilding grants, 
health grants, and other assistance grants to India.  It is impossible to do 
our very ambitious web-site with the handful of PHP coders and get it ready 
in time.

But I have been on PHP.net's list-serve for a few weeks and I have seen the 
*fountain* of knowledge and assistance and so I can't resist asking for your 
help.  Right now our team is distributed over the US (Virginia, California, 
Arizona) and we've had help from a coder in Croatia. And the last two to join 
are from Vitebsk, Bellarus, and Delhi, India. 

If you are interested in learning more please email me at 
[EMAIL PROTECTED] or [EMAIL PROTECTED]

I hope I didn't offend anyone for posting this non-tech notice but I had to 
ask.   If a few of you said yes, it could make it a whole different ballgame.

Mark 



Intelligence . . . is the faculty of making artificial
objects, especially tools to make tools.

--Henri Bergson






(PHP3+ mySQL )
verpickte Engine,
( *warning current development language is -> german* )

a content and user management system, including many feature,
user accounting with image upload, outlook of html pages
100% configurable through template system, wich uses
(currently) mySQL - SQL Results, whole directory and
article management accessible through accounting system,
yet included are :

Message Module - To let users write messages to eachother
            + Schnick Schnack Schnuck Module  - To let users play a game of
schnick-schnack-schnuck ...
vote Module - Manage online polls within the engine ...

That's it for now, to get more information visit one of the following pages
...
( mostly german language ... )

www.verpickteWG.de - Main reason for developing the engine...
www.fractalmovies.com  - another reason ...
www.digitalgott.de - yet another reason ...
www.kleinhuisbehaviours.com - another reason, but the place where you will
find more informations about the engine ...


c.kleinhuis
270101


--
verpickteWG.de - verpickt
digitalgott.de - künstlerisch
fractalmovies.com - göttlich
kleinhuisbehaviours.com - teschnisch






Rasmus,

I think that was a really good idea to install Apache on my system.  Thanks 
for the heads up.  I am downloading apache_1_3_14_win32_r2.exe.  Is that all 
I need?

This is scary new territory for me...  I hope this is the right file.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





I have PHP-4.0.1 running on my Win200 Pro devel box though the IIS DLL and
SMTP services running. I have SMTP enabled on this machine and have outlook
express configured to send mail though the local SMTP service.  I simply
told O.Express the outgoing mail server was my machine (just told it the
machine name).....

Now to the PHP stuff ....

I can't seem to get the mail function to work. A server error gets returned.
I am trying to run a simple script though the PHP.EXE executable. I've tried
editing the php.ini with the SMTP being localhost, my machine's name, and IP
address ... I keep getting the same error. both PHP.EXE and PHP.INI reside
in c:\winnt\system32 so there should not be a path problem ....

any thoughts ??

thanks

-j





What is the best way to display thumbnail photos and their titles with
HTML/PHP?  Table?

Todd



--
Todd Cary
Ariste Software
[EMAIL PROTECTED]







Hello Todd, 

(TC == "Todd Cary") [EMAIL PROTECTED] coined:

TC> What is the best way to display thumbnail photos and their titles
TC> with HTML/PHP? Table?

Sure.. tables are good. Or you can display them in one long vertical
line.. or..

Explain what you mean. If you mean just what the sentence above says,
well, it's just a matter of preference. Do what you think is best.

TC> Todd

-Brian






On Sat, Jan 27, 2001 at 02:14:21PM -0800, Todd Cary wrote : 
> What is the best way to display thumbnail photos and their titles with
> HTML/PHP?  Table?

The html way would be to just include the photos with a small
WIDTH and HEIGHT attribute.

The php would be to read the file and use ImageCopyResized on it.

The most performant way would be to pre-generate the thumbmails
and just include them as normal images in html.

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0




What doe the @ mean in front of a functions?





It doesn't print out any errors or warnings generated by the function.

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED] 

-----Original Message-----
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [Newbie] - @ 


What doe the @ mean in front of a functions?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








Hello Thomas, 

(TW == "Thomas Wentzel") [EMAIL PROTECTED] marked:

TW> I use the following configure string on both machines - only
TW> differences is the paths to pgsql and apxs

<snip>

TW> On my RedHat (which has PHP 4.0.4) I get a nice little
TW> stocks.so...
TW> On my Debian (which has PHP 4.0.3) I get a not so nice little
TW> stocks.a

I'm not familiar with the stocks example, but..

<snip>

TW> Is anybody able to compile .so files on Debian??

On some Debian systems you have to edit the apxs script if you didn't
install Apache via the Debian package system.

(IOW, If your server's httpd executable is called 'apache' instead of
'httpd' then you know it's from the Debian packages system rather than
an install from source tarball. By now you probably know that.)

In order to build any DSO's on a Debian system where one did not
install Apache from their package system (Ie. didn't use apt-get),
most of the time you have to edit the apxs script and correct:

my $CFG_CFLAGS_SHLIB  = q(-fpic -DSHARED_MODULE);
my $CFG_LD_SHLIB      = q(gcc);
my $CFG_LDFLAGS_SHLIB = q(-shared);

Maybe that will help your situation.

-Brian






On Sat, 27 Jan 2001, Brian Clark wrote:

> On some Debian systems you have to edit the apxs script if you didn't
> install Apache via the Debian package system.
> 

FYI, not the case as of the current woody. Apache 1.3.14 configured with:
./configure --enable-module=so

built a proper apxs which PHP had no problem using.

John






Hello John, 

(JD == "John Donagher") [EMAIL PROTECTED] alleged:

JD> FYI, not the case as of the current woody. Apache 1.3.14
JD> configured with: ./configure --enable-module=so

JD> built a proper apxs which PHP had no problem using.

OoOoo, my fault. :) I've been flopping in potatoes for a while now..

Then back to the problem, for which I have no answer. :(

JD> John

-Brian
--
Everything should be built top-down, except the first time.







Hello Jon, 

(JJ == "Jon Jacob") [EMAIL PROTECTED] divulged:

(I'm no Oracle expert)

JJ> Well, I think I have done everything right but must have missed
JJ> something.  I installed with --with-oci8 and --with-oracle, my

Sometimes it doesn't pick it up correctly if you don't use the path
when referring to --with-oracle. Try

--with-oracle=/path/to/BASE/directory

-Brian






You have to make sure your environment variable ORACLE_HOME is set !!!

CHECK: echo $ORACLE_HOME
If it isn't modify the etc/profile or /etc/profile.local

 -----Original Message-----
From:   Brian Clark [mailto:[EMAIL PROTECTED]] 
Sent:   zaterdag 27 januari 2001 23:25
To:     PHP is not a drug .
Subject:        Re: [PHP] Oracle support not working


Hello Jon, 

(JJ == "Jon Jacob") [EMAIL PROTECTED] divulged:

(I'm no Oracle expert)

JJ> Well, I think I have done everything right but must have missed
JJ> something.  I installed with --with-oci8 and --with-oracle, my

Sometimes it doesn't pick it up correctly if you don't use the path
when referring to --with-oracle. Try

--with-oracle=/path/to/BASE/directory

-Brian



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







Hello Jimmy, 

(JB == "Jimmy Bäckström") [EMAIL PROTECTED] detected:

JB> $arr2[0] = $arr1[0];
JB> $arr2[1] = $arr1[1];

What is wrong with this?

$arr2 = $arr1;

Works fine for me.

-Brian






I'm getting a Forbidden error when I try to access my site using Apache.  
Does anyone know what I did wrong?  This is the contents of my httpd.conf 
file:

ServerType standalone

ServerRoot "C:/Program Files/Apache"

PidFile logs/httpd.pid

ScoreBoardFile logs/apache_runtime_status

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

MaxRequestsPerChild 0

ThreadsPerChild 50

BindAddress *

Port 8080

ServerAdmin [EMAIL PROTECTED]

ServerName swifte.dev
DocumentRoot "C:/Inetpub"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "C:/Inetpub">

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
    UserDir "C:/Program Files/Apache/users/"
</IfModule>

<IfModule mod_dir.c>
    DirectoryIndex index.html
</IfModule>

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

UseCanonicalName On

<IfModule mod_mime.c>
    TypesConfig conf/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/error.log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access.log common

ServerSignature On

NameVirtualHost *

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





I restarted the Apache server and the Forbidden error is gone.  But it does 
not recognize PHP.  What do I need to do to make that work guys?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





[ rswfire ] wrote:

> I restarted the Apache server and the Forbidden error is gone.  But it 
> does not recognize PHP.  What do I need to do to make that work guys?
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com

This should get you up and running.:)

http://hotwired.lycos.com/webmonkey/00/44/index4a_page7.html


HTH
Gary





Hi,

i got problem with functions ....


when i call the files with url//filename.php?action=pal

all the time it says
Fatal error: Call to unsupported or undefined function pal_edit() in
/cfiles/memberlink.php on line 7



code
........................
<?
switch ($action) {
    case "pf":
        profile();
        break;

    case "pal":
       pal_edit();
        break;

}


function pf() { echo "profile"; }

function pal_edit() { echo "pal";  }

?>






On Sun, 28 Jan 2001, Kumanan wrote:

> Hi,
> 
> i got problem with functions ....
> 
> 
> when i call the files with url//filename.php?action=pal
> 
> all the time it says
> Fatal error: Call to unsupported or undefined function pal_edit() in
> /cfiles/memberlink.php on line 7
> 

Declare your functions before the switch() statement - your switch
statement is being executed before your functions even get a chance to be
defined. :)

e.g.

function sayBlah() {
  echo "Blah!";
}

switch($task) {
  case do_stuff:
    sayBlah();
    break;
  case other_stuff:
    # whatever
    break;
  default:
    # whatever
    break;
}

Cheers,

Nicky W..
-[ [EMAIL PROTECTED] ]-





your function declarations must appear before you actually call them.

> code
> .......................
> <?
> function pf() { echo "profile"; }
> 
> function pal_edit() { echo "pal";  }

> switch ($action) {
>     case "pf":
>         profile();
>         break;
> 
>     case "pal":
>        pal_edit();
>         break;
> 
> }
> 
> 
> 
> ?>

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics, 
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=================================

> -----Original Message-----
> From: Kumanan [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 27, 2001 4:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] functions????
> 
> 
> Hi,
> 
> i got problem with functions ....
> 
> 
> when i call the files with url//filename.php?action=pal
> 
> all the time it says
> Fatal error: Call to unsupported or undefined function pal_edit() in
> /cfiles/memberlink.php on line 7
> 
> 
> 
> code
> .......................
> <?
> switch ($action) {
>     case "pf":
>         profile();
>         break;
> 
>     case "pal":
>        pal_edit();
>         break;
> 
> }
> 
> 
> function pf() { echo "profile"; }
> 
> function pal_edit() { echo "pal";  }
> 
> ?>
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 




ohhhh

thanks

kumanan
"Nick Winfield" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Sun, 28 Jan 2001, Kumanan wrote:
>
> > Hi,
> >
> > i got problem with functions ....
> >
> >
> > when i call the files with url//filename.php?action=pal
> >
> > all the time it says
> > Fatal error: Call to unsupported or undefined function pal_edit() in
> > /cfiles/memberlink.php on line 7
> >
>
> Declare your functions before the switch() statement - your switch
> statement is being executed before your functions even get a chance to be
> defined. :)
>
> e.g.
>
> function sayBlah() {
>   echo "Blah!";
> }
>
> switch($task) {
>   case do_stuff:
>     sayBlah();
>     break;
>   case other_stuff:
>     # whatever
>     break;
>   default:
>     # whatever
>     break;
> }
>
> Cheers,
>
> Nicky W..
> -[ [EMAIL PROTECTED] ]-
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







        Have you tried defining those function before actually
using them ? Btw, case "pf" and function 'profile()' does not
really match you definition with function 'pf()' ??

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0




I currently have PHP4 installed as a CGI on my NT5 computer.  It works with 
IIS5.  I just installed Apache and it's working.  =)  But how can I make it 
see my CGI version of PHP????
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Da...this one has stumped me...in *nix I'd just say compile it into Apache,
but we can't do that now can we...bummer, looks like a design flaw of NT...
8-)

-Jonathan

P.S. Now I must say, I am running 2K on this box here, and am using outlook
(go ahead and bash me) but that's all I use it for (except for photoshop,
fireworks, and such...) but I'll give linux another year or so to catch
up...it's definatly gaining...

-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 3:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Apache -> PHP 4 (CGI)


I currently have PHP4 installed as a CGI on my NT5 computer.  It works with
IIS5.  I just installed Apache and it's working.  =)  But how can I make it
see my CGI version of PHP????
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







------ $B-j#J#M#P$N!X#E%a!<%k#D#M!Y$r$*FO$1CW$7$^$9!#(B ------ --------------------- $B!y(B.$B%&%#%s%Q%o!http://www.tokioinfo.co.jp/winpwr/index.htm $B%Q%=%3%sA`:n$K$D$^$E$$$?$i(B $BGA$$$F$_$F$/$@$5$$(B http://www.tokioinfo.co.jp/winpwr/index.htm --------------------- ------ $B$3$N%a!<%k$O>pJsDs6!4k6H$h$j(B $B#J#M#P$+$iG[?.$7$F$*$j$^$9!#(B $B-j%8%'%$%(%`%T!



OK, I've gone back through the archives and now understand the situation
with client- and server-side. I just wasn't thinking it through.

Spawning a window to let PHP query the db and somehow passing returned
values back to the parent window is something I could do, I suppose, but
it seems that what I and the other zillion people who keep asking the
same question need is a way to get to our databases using a client-side
technology like Javascript.

I recognize the shortcomings of client-side stuff like compatility
issues and on/off preferences and in this case am willing to let the
user take some reponsibility for his browsing experience.

Now I'm completely off-topic, but does anyone have any ideas regarding
database access with Javascript, perhaps by having JS run a shell or
perl script? How would JS get the values back? Something like

function getdb () {
   var mylist = execute.some.remote.program(./getmysqldata.pl);
   }

With all the traffic on this type of request, I'm surprised the FAQ
doesn't take
up the subject.

Thanks,
Chuck

----- Original Message -----
You *can* have a JavaScript handler invoke PHP -- but it requires
accessing
a URL and waiting for the web-server to respond, so your response time
will
not be so hot.

I'm afraid I don't recall how, but it has been posted here before...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Chuck Mayo <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, January 26, 2001 10:10 AM
Subject: [PHP] Invoke PHP script from onLoad handler?


> Sorry if this has come up before.
>
> I want to update a select list from a mySql database whenever the
> browser window gets the focus. This is because I anticipate that the
> user will frequently use a second window to make additions to the
> database that holds the list values while filling in the form, and I
> want those additions to be in the select list when the user returns.
>
> At present I have PHP querying the db before I output the body tag,
and
> an onLoad() handler passes the returned records to a Javascript which
> populates the list box with the query results, but I have only figured

> out how to query the db when the page initially loads. I really need
to
> query the db and invoke the Javascript every time the window gets
focus.
>
> So, I guess my question is twofold: can I invoke a php function with
an
> onLoad handler, and if so, how can I have onLoad do both things - run
> the php function to query the database, then run the Javascript to
> populate the list box? Or is there another way?
>
> TIA,
> Chuck Mayo







I wrote a browser based application (yes it is an application!) (but I can't
let you see it cause it's propriatary technology) but the client side was
javascript and I had PHP save the data and read data...

I won't go into detail, but basically I had PHP print JavaScript, and then
have a variable in the main window that the child window would save the new
data to...

for example, have the javascript (which PHP generates) be something like
<script>
        var DATAARY = new Array();
        DATAARY[0] = 'Some data';
        DATAARY[1] = 'Some data';
        DATAARY[2] = 'Some data';
        DATAARY[3] = 'Some data';
        window.parent.document.MAINDATAARY = DATAARY;
</script>
It was something to that extent, it works quite nicely, and it definetly
pushes the limits of the technology used.

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]

-----Original Message-----
From: Chuck Mayo [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 4:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Invoke PHP script from onLoad handler?


OK, I've gone back through the archives and now understand the situation
with client- and server-side. I just wasn't thinking it through.

Spawning a window to let PHP query the db and somehow passing returned
values back to the parent window is something I could do, I suppose, but
it seems that what I and the other zillion people who keep asking the
same question need is a way to get to our databases using a client-side
technology like Javascript.

I recognize the shortcomings of client-side stuff like compatility
issues and on/off preferences and in this case am willing to let the
user take some reponsibility for his browsing experience.

Now I'm completely off-topic, but does anyone have any ideas regarding
database access with Javascript, perhaps by having JS run a shell or
perl script? How would JS get the values back? Something like

function getdb () {
   var mylist = execute.some.remote.program(./getmysqldata.pl);
   }

With all the traffic on this type of request, I'm surprised the FAQ
doesn't take
up the subject.

Thanks,
Chuck

----- Original Message -----
You *can* have a JavaScript handler invoke PHP -- but it requires
accessing
a URL and waiting for the web-server to respond, so your response time
will
not be so hot.

I'm afraid I don't recall how, but it has been posted here before...

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Chuck Mayo <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, January 26, 2001 10:10 AM
Subject: [PHP] Invoke PHP script from onLoad handler?


> Sorry if this has come up before.
>
> I want to update a select list from a mySql database whenever the
> browser window gets the focus. This is because I anticipate that the
> user will frequently use a second window to make additions to the
> database that holds the list values while filling in the form, and I
> want those additions to be in the select list when the user returns.
>
> At present I have PHP querying the db before I output the body tag,
and
> an onLoad() handler passes the returned records to a Javascript which
> populates the list box with the query results, but I have only figured

> out how to query the db when the page initially loads. I really need
to
> query the db and invoke the Javascript every time the window gets
focus.
>
> So, I guess my question is twofold: can I invoke a php function with
an
> onLoad handler, and if so, how can I have onLoad do both things - run
> the php function to query the database, then run the Javascript to
> populate the list box? Or is there another way?
>
> TIA,
> Chuck Mayo




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







This is an interesting idea - I hadn't considered having the second window be
subordinant to the first, and really didn't even know I could pass data between
windows. I'll play with this, it might work out.

Thanks,
Chuck

Jonathan Sharp wrote:

> I wrote a browser based application (yes it is an application!) (but I can't
> let you see it cause it's propriatary technology) but the client side was
> javascript and I had PHP save the data and read data...
>
> I won't go into detail, but basically I had PHP print JavaScript, and then
> have a variable in the main window that the child window would save the new
> data to...
>
> for example, have the javascript (which PHP generates) be something like
> <script>
>         var DATAARY = new Array();
>         DATAARY[0] = 'Some data';
>         DATAARY[1] = 'Some data';
>         DATAARY[2] = 'Some data';
>         DATAARY[3] = 'Some data';
>         window.parent.document.MAINDATAARY = DATAARY;
> </script>
> It was something to that extent, it works quite nicely, and it definetly
> pushes the limits of the technology used.
>
> -Jonathan Sharp
>
> Director of Technology - Imprev Inc.
> Renwick Development Group - Flyerware
> http://www.flyerware.com/
> Phone: (425)688-9200
> Cell: (425)766-1398
> EPage: [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Chuck Mayo [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 27, 2001 4:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Invoke PHP script from onLoad handler?
>
> OK, I've gone back through the archives and now understand the situation
> with client- and server-side. I just wasn't thinking it through.
>
> Spawning a window to let PHP query the db and somehow passing returned
> values back to the parent window is something I could do, I suppose, but
> it seems that what I and the other zillion people who keep asking the
> same question need is a way to get to our databases using a client-side
> technology like Javascript.
>
> I recognize the shortcomings of client-side stuff like compatility
> issues and on/off preferences and in this case am willing to let the
> user take some reponsibility for his browsing experience.
>
> Now I'm completely off-topic, but does anyone have any ideas regarding
> database access with Javascript, perhaps by having JS run a shell or
> perl script? How would JS get the values back? Something like
>
> function getdb () {
>    var mylist = execute.some.remote.program(./getmysqldata.pl);
>    }
>
> With all the traffic on this type of request, I'm surprised the FAQ
> doesn't take
> up the subject.
>
> Thanks,
> Chuck
>
> ----- Original Message -----
> You *can* have a JavaScript handler invoke PHP -- but it requires
> accessing
> a URL and waiting for the web-server to respond, so your response time
> will
> not be so hot.
>
> I'm afraid I don't recall how, but it has been posted here before...
>
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> ----- Original Message -----
> From: Chuck Mayo <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Sent: Friday, January 26, 2001 10:10 AM
> Subject: [PHP] Invoke PHP script from onLoad handler?
>
> > Sorry if this has come up before.
> >
> > I want to update a select list from a mySql database whenever the
> > browser window gets the focus. This is because I anticipate that the
> > user will frequently use a second window to make additions to the
> > database that holds the list values while filling in the form, and I
> > want those additions to be in the select list when the user returns.
> >
> > At present I have PHP querying the db before I output the body tag,
> and
> > an onLoad() handler passes the returned records to a Javascript which
> > populates the list box with the query results, but I have only figured
>
> > out how to query the db when the page initially loads. I really need
> to
> > query the db and invoke the Javascript every time the window gets
> focus.
> >
> > So, I guess my question is twofold: can I invoke a php function with
> an
> > onLoad handler, and if so, how can I have onLoad do both things - run
> > the php function to query the database, then run the Javascript to
> > populate the list box? Or is there another way?
> >
> > TIA,
> > Chuck Mayo
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





On Sat, Jan 27, 2001 at 06:04:41PM -0600, Chuck Mayo wrote : 
> Now I'm completely off-topic, but does anyone have any ideas regarding
> database access with Javascript, perhaps by having JS run a shell or
> perl script? How would JS get the values back? Something like
> 
> function getdb () {
>    var mylist = execute.some.remote.program(./getmysqldata.pl);
>    }

        Unless you are running a *signed* JavaScript code you
can't just call an external program (security, anyone ?). If its
just for a intranet, just let your JS code get signed to gain
higher client side access privileges and you are done; else
bummer (at least, this way).

What you could do with normal client side JS is just reload the
opener window.

As far I unterstood, you have a main window with some kind of
listbox depending on database output. Under some circumstances, a
window pops up where the use can alter some data. Just when you
have the feeling, the user has entered/altered enough data to
update the listbox in the window which spawned the popup, force
to reload the page with syntax like

        opener.location.href='same_url_again';

and your php script is called again, the db-data is fetched again
and you listbox is altered (hopefully).

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0




On Fri, 26 Jan 2001 14:52:28 +0100, you wrote:

>Hello,
>
>I have developed a large web application the contents of which (language and
>data) depends on the URL the site is accessed from, e.g. en.site.com would
>display the "english" site, and "fr.site.com" would display the french site

It's a good way to do it, I wrote an extension to FastTemplates (and
the phplib templates.inc) to help with such an event so you could have
multiple levels of templates, falling back eventually (and hopefully,
or it's broken) to a default set.  The defaults could be English (and
no-language, others could be fr, es, pt, Klingon, whatever.

A different name to access the site could look utterly different, just
have most of the same content on the page, in different places.  I was
going to use it to re-skin websites according to who it was for
(originally it was going to be a 'virtual bookshop' that companies
could brand for themselves).

>The whole thing is "parameterized" through a set of global variables (or
>defines) that reside in a file called settings.php. The question is: how can
>I include the "right" settings.php file, depending on the virtual host used
>to access the site?

Take a look at the output of phpinfo() for the two virtual sites,
especially 

HTTP_SERVER_VARS["HTTP_HOST"]
HTTP_SERVER_VARS["SERVER_NAME"]

Server_name is likely to be the 'main name' (www.example.com), but
http_host should be the name it's called by (not always the same
thing)

Alister





        You could use $HTTP_HOST:

if( stristr( $HTTP_POST, "fr.domain.com"))
        $lang = "fr";

Just put such in your settings.php file you allready include.
Works for me.

Any other ideas very welcome too :)

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0




On Sat, Jan 27, 2001 at 04:03:34PM -0000, Kif wrote : 
> I have tried $startdir = http://siteiwant.com/; with no joy
> :(

        There is no real, standard think like an index. What you
see with webservers is just a component of the webserver which
makes it easier for you to access sub-dirs and sub-files, if it
is configured to do so. And thats the point, if the remote site
is not configured to list the dir in the particular path you try
to access, no way. And still even if it does, you can't use
opendir; you have to parse the (most times it will be html)
output you get.

        Its easier if the directory you need a listing of is also
mapped 1:1 to ftp on the same site; then just use phps ftp
functions.

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail:         [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0





Hello,

I have PHP4 installed on my NT5 system as a CGI and it is working with IIS5 
and Apache.  But I never realized that the CGI version ends up in the URL 
when I use it with Apache.  I really have a thing against this.  =)

Is there any way to prevent that?  Or do I need to use the module version?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





I'm trying to create a small template parser so I can fill my html pages up with data. 
 An example:  <html><head><title>{title}</title></head></html

What I'm trying to do is run through it and replace {title} with an appropriate value. 
 I have tried running ereg_replace("{$var}",$value,$string) and 
ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do nothing or 
produce the error "Warning: invalid content of \{\}".

Any help would be appreciated,
Zack

_____________________________________________________________
Free email provided by ---> http://sect0r.com




what's the value of var? It appears that it doesn't have a value set.

-Jonathan

-----Original Message-----
From: Zack Ham [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Problem with a regex!


I'm trying to create a small template parser so I can fill my html pages up
with data.  An example:  <html><head><title>{title}</title></head></html

What I'm trying to do is run through it and replace {title} with an
appropriate value.  I have tried running
ereg_replace("{$var}",$value,$string) and
ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do
nothing or produce the error "Warning: invalid content of \{\}".

Any help would be appreciated,
Zack

_____________________________________________________________
Free email provided by ---> http://sect0r.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








Why not use the php mechanism itself? An easy way to do a template system is
make a normal php page as a template, and then include it from another page
after specifying a bunch of variables.

eg.

template.php:
=========

<html><head><title><?= $title ?></title></head></html>

calling page:
=============

<?php

$title = "My template system";
include ('template.php');

?>

Hope this helps,

Julian

on 1/27/01 6:17 PM, Zack Ham at [EMAIL PROTECTED] wrote:

> 
> I'm trying to create a small template parser so I can fill my html pages up
> with data.  An example:  <html><head><title>{title}</title></head></html
> 
> What I'm trying to do is run through it and replace {title} with an
> appropriate value.  I have tried running ereg_replace("{$var}",$value,$string)
> and ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do
> nothing or produce the error "Warning: invalid content of \{\}".
> 
> Any help would be appreciated,
> Zack
> 
> _____________________________________________________________
> Free email provided by ---> http://sect0r.com

--
Julian Wood
Learning Technologies and Digital Media
University of Calgary






I had it echo off the value of $var right before it ran the ereg_replace and it echoed 
"TITLE".  So there is a value... any ideas on fixing?

--- Julian Wood <[EMAIL PROTECTED]>
> wrote:
>
>Why not use the php mechanism itself? An easy way to do a template system is
>make a normal php page as a template, and then include it from another page
>after specifying a bunch of variables.
>
>eg.
>
>template.php:
>=========
>
><html><head><title><?= $title ?></title></head></html>
>
>calling page:
>=============
>
><?php
>
>$title = "My template system";
>include ('template.php');
>
>?>
>
>Hope this helps,
>
>Julian
>
>on 1/27/01 6:17 PM, Zack Ham at [EMAIL PROTECTED] wrote:
>
>> 
>> I'm trying to create a small template parser so I can fill my html pages up
>> with data.  An example:  <html><head><title>{title}</title></head></html
>> 
>> What I'm trying to do is run through it and replace {title} with an
>> appropriate value.  I have tried running ereg_replace("{$var}",$value,$string)
>> and ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do
>> nothing or produce the error "Warning: invalid content of \{\}".
>> 
>> Any help would be appreciated,
>> Zack
>> 
>> _____________________________________________________________
>> Free email provided by ---> http://sect0r.com
>
>--
>Julian Wood
>Learning Technologies and Digital Media
>University of Calgary
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

_____________________________________________________________
Free email provided by ---> http://sect0r.com




In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] (Zack Ham) wrote:

> What I'm trying to do is run through it and replace {title} with an 
> appropriate value.  I have tried running 
> ereg_replace("{$var}",$value,$string) and 
> ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do 
> nothing or produce the error "Warning: invalid content of \{\}".

Is $var=="title" (same case, no leading/trailing whitespace, etc.)?

If so, then perhaps try:
  ereg_replace("\{" . $title . "\}",$value,$string)

If not, then perhaps one of these:
  eregi_replace("\{" . $title . "\}",$value,$string) 
  eregi_replace("\{title\}",$value,$string)

-- 
CC





Maybe I'm misunderstanding something. I'm suggesting that you not bother at
all with an ereg_replace system.

If you want to do a system like you're suggesting, you would use a variable
variable. That is, ${$var} will evaluate to 'Hello' when $var = 'title' and
$title = 'Hello'.

HTH,

Julian


on 1/27/01 6:56 PM, Zack Ham at [EMAIL PROTECTED] wrote:

> 
> I had it echo off the value of $var right before it ran the ereg_replace and
> it echoed "TITLE".  So there is a value... any ideas on fixing?
> 
> --- Julian Wood <[EMAIL PROTECTED]>
>> wrote:
>> 
>> Why not use the php mechanism itself? An easy way to do a template system is
>> make a normal php page as a template, and then include it from another page
>> after specifying a bunch of variables.
>> 
>> eg.
>> 
>> template.php:
>> =========
>> 
>> <html><head><title><?= $title ?></title></head></html>
>> 
>> calling page:
>> =============
>> 
>> <?php
>> 
>> $title = "My template system";
>> include ('template.php');
>> 
>> ?>
>> 
>> Hope this helps,
>> 
>> Julian
>> 
>> on 1/27/01 6:17 PM, Zack Ham at [EMAIL PROTECTED] wrote:
>> 
>>> 
>>> I'm trying to create a small template parser so I can fill my html pages up
>>> with data.  An example:  <html><head><title>{title}</title></head></html
>>> 
>>> What I'm trying to do is run through it and replace {title} with an
>>> appropriate value.  I have tried running
>>> ereg_replace("{$var}",$value,$string)
>>> and ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do
>>> nothing or produce the error "Warning: invalid content of \{\}".
>>> 
>>> Any help would be appreciated,
>>> Zack
>>> 
>>> _____________________________________________________________
>>> Free email provided by ---> http://sect0r.com
>> 
>> --
>> Julian Wood
>> Learning Technologies and Digital Media
>> University of Calgary
>> 
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> _____________________________________________________________
> Free email provided by ---> http://sect0r.com

--
Julian Wood
Learning Technologies and Digital Media
University of Calgary






I tried ereg_replace("\{" . $var . "\}",$value,$string) and it didnt return 
                 an error... but it didnt replace anything.  Other ideas ?  Either {'s 
are 
                 impossible to escape or php just doesnt like me...

--- CC Zona <[EMAIL PROTECTED]>
> wrote:
>In article <[EMAIL PROTECTED]>, 
>[EMAIL PROTECTED] (Zack Ham) wrote:
>
>> What I'm trying to do is run through it and replace {title} with an 
>> appropriate value.  I have tried running 
>> ereg_replace("{$var}",$value,$string) and 
>> ereg_replace("\{$var\}",$value,$string).  Neither work.  They either do 
>> nothing or produce the error "Warning: invalid content of \{\}".
>
>Is $var=="title" (same case, no leading/trailing whitespace, etc.)?
>
>If so, then perhaps try:
>  ereg_replace("\{" . $title . "\}",$value,$string)
>
>If not, then perhaps one of these:
>  eregi_replace("\{" . $title . "\}",$value,$string) 
>  eregi_replace("\{title\}",$value,$string)
>
>-- 
>CC
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

_____________________________________________________________
Free email provided by ---> http://sect0r.com




Zack,

Your not going to find {title} when $var = "TITLE".  Everything PHP is case
sensitive.  Also $string is not changed if there are matches, ereg_replace
returns the modified string.

HTH
Dustin


> I tried ereg_replace("\{" . $var . "\}",$value,$string) and 
> it didnt return 
>                  an error... but it didnt replace anything.  
> Other ideas ?  Either {'s are 
>                  impossible to escape or php just doesnt like me...
> 
> --- CC Zona <[EMAIL PROTECTED]>
> > wrote:
> >In article <[EMAIL PROTECTED]>, 
> >[EMAIL PROTECTED] (Zack Ham) wrote:
> >
> >> What I'm trying to do is run through it and replace 
> {title} with an 
> >> appropriate value.  I have tried running 
> >> ereg_replace("{$var}",$value,$string) and 
> >> ereg_replace("\{$var\}",$value,$string).  Neither work.  
> They either do 
> >> nothing or produce the error "Warning: invalid content of \{\}".
> >
> >Is $var=="title" (same case, no leading/trailing whitespace, etc.)?
> >
> >If so, then perhaps try:
> >  ereg_replace("\{" . $title . "\}",$value,$string)
> >
> >If not, then perhaps one of these:
> >  eregi_replace("\{" . $title . "\}",$value,$string) 
> >  eregi_replace("\{title\}",$value,$string)





I need to get a whole bunch of client properties from a visitor on my site 
before a page is displayed.  I do this using JavaScript.  I first determine 
if the visitor's browser supports JavaScript, and if it does I run a 
function that basically builds a temporary page and returns a bunch of 
client properties for me.

Here's the code:

                                if ($Browser_JavaScriptOK == TRUE)
                                {

                                        echo "<HTML>";
                                        echo "<HEAD>";
                                        echo "<TITLE>[ Swift eNetwork ] eNetWizard : 
Determining Client 
Properties</TITLE>";
                                        echo "<SCRIPT LANGUAGE=\"JavaScript\">";
                                        echo "function GetProperties()";
                                        echo "{";
                                        echo 
"window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_NAME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCodeName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVersion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(navigator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvailHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availWidth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(screen.height)+\"&cWidth=\"+escape(screen.width)+\"&cPixelDepth=\"+escape(screen.pixelDepth));";
                                        echo "}";
                                        echo "</SCRIPT>";
                                        echo "</HEAD>";
                                        echo "<BODY BGCOLOR='#000000' 
OnLoad=\"GetProperties()\">&nbsp;";
                                        echo "</BODY>";
                                        echo "</HTML>";
                                        exit;

                                }


This code is run and then goes back to the calling page with all of the 
variables.  I then process the variables and put them into a class and build 
the page.

This works on IIS5, but when I try to do this on Apache, it freezes up and 
after a time comes back with an error message saying PHP.EXE did something 
wrong and will be closed.

Can anyone tell me what is happening?  Do you know of any other way to 
reliably return client properties?

Thankz...
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Hm...I'm not sure I completely understand...but I believe that you're trying
to gather as many stats from the client as possible?

What about having a page that is somewhat transparent to the user (if they
support JS) that you have something like this...

<script>
function GetProperties()
{
        document.theform.cVersion.value = navigator.appVersion;
        etc...
        document.theform.submit();
}
</script>

<body onLoad="GetProperties()">
<form action="mainpage.php" method="POST" name="theform">
        <input type="hidden" name="cVersion">
</form>
<img src="/img/a/nice/techno/dancing/woman.gif"><br>
<b>Welcome to my beautiful site! One moment please...</b>
</body>

Then you'd have mainpage.php checkthrough all those values, and possibly
dump them into a DB and create a SESSIONID which each page thereafter uses
the sessionid to lookup the client settings from the db and build the page
based upon that? Depending on how long it takes to set all the hidden fields
and submit the form, it might even be transparent to the user...or...you
might just have a generic front page if no session id is set and popup
window that has all that java script and say something line "Customizing for
YOU!" and then have that page POST to itself and then have the window close
it self (and you've set a cookie with the session id of course) so then each
page that he visits thereafter has the session id set. And you can customize
for him/her...

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] JavaScript/PHP Function -> Apache/IIS5 -> Client
Properties


I need to get a whole bunch of client properties from a visitor on my site
before a page is displayed.  I do this using JavaScript.  I first determine
if the visitor's browser supports JavaScript, and if it does I run a
function that basically builds a temporary page and returns a bunch of
client properties for me.

Here's the code:

                                if ($Browser_JavaScriptOK == TRUE)
                                {

                                        echo "<HTML>";
                                        echo "<HEAD>";
                                        echo "<TITLE>[ Swift eNetwork ] eNetWizard : 
Determining Client
Properties</TITLE>";
                                        echo "<SCRIPT LANGUAGE=\"JavaScript\">";
                                        echo "function GetProperties()";
                                        echo "{";
                                        echo
"window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_N
AME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCod
eName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVe
rsion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(nav
igator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvai
lHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availW
idth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(scree
n.height)+\"&cWidth=\"+escape(screen.width)+\"&cPixelDepth=\"+escape(screen.
pixelDepth));";
                                        echo "}";
                                        echo "</SCRIPT>";
                                        echo "</HEAD>";
                                        echo "<BODY BGCOLOR='#000000' 
OnLoad=\"GetProperties()\">&nbsp;";
                                        echo "</BODY>";
                                        echo "</HTML>";
                                        exit;

                                }


This code is run and then goes back to the calling page with all of the
variables.  I then process the variables and put them into a class and build
the page.

This works on IIS5, but when I try to do this on Apache, it freezes up and
after a time comes back with an error message saying PHP.EXE did something
wrong and will be closed.

Can anyone tell me what is happening?  Do you know of any other way to
reliably return client properties?

Thankz...
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







Jonathon,

I believe I have found the cause of the problem...  But first let me explain 
what I am doing better.

Yes, I am trying to gather as many stats from the client as possible.  
Before a page is display, many classes are initialized.  This particular 
class is the session class.  After it retrieves all of the client 
properties, a session is created.  If they don't have JavaScript, there's 
not much I can do, so I just use "basic settings" and give them a session.

This is done transparently.  It creates this temporary file and then reloads 
the page with the long URI.  This time the session class retrieves all of 
the properties and does put them into a database.  Then, sets the session 
id.  Then, it reloads the page again, getting rid of the long URI and just 
leaving the session id in the URI.

Well, here's where the problem appears to be.  I believe the CGI version of 
PHP on Apache is trying to parse the page as a PHP file.  Even though it is 
a simple HTML file.  Below is the HTML that is produced from the previous 
code:

<HTML><HEAD><TITLE>[ Swift eNetwork ] eNetWizard : Determining Client 
Properties</TITLE><SCRIPT LANGUAGE="JavaScript">function 
GetProperties(){window.location.replace("http://swifte.dev:8080/php/php.exe?ENETWIZARD_GETCLIENT=TRUE&cName="+escape(navigator.appName)+"&cCodeName="+escape(navigator.appCodeName)+"&cVersion="+escape(navigator.appVersion)+"&cPlatform="+escape(navigator.platform)+"&cLanguage="+escape(navigator.language)+"&cJavaEnabled="+escape(navigator.javaEnabled())+"&cAvailHeight="+escape(screen.availHeight)+"&cAvailWidth="+escape(screen.availWidth)+"&cColorDepth="+escape(screen.colorDepth)+"&cHeight="+escape(screen.height)+"&cWidth="+escape(screen.width)+"&cPixelDepth="+escape(screen.pixelDepth));}</SCRIPT></HEAD><BODY
 
BGCOLOR='#000000' OnLoad="GetProperties()">&nbsp;</BODY></HTML>

Notice the swifte.dev:8080 --> After that is /php/php.exe -- I hate this.  
That should not be there and the filename is not there either.  So of course 
it's having a problem.  I did a check on phpinfo() and the variable 
$SCRIPT_NAME is set to /php/php.exe.  The only other variables that have the 
filename are REQUEST_URI and PATH_INFO.  But I'm still getting the same 
problem.

I don't exactly understand your code below.  First of all, I do not want to 
use cookies at all - not anywhere on my network.  Too much controversy.  So 
I take advantage of the database in that respect.  Secondly, does the code 
example below automatically submit itself??  I've never seen that done 
before...

Robert




>From: "Jonathan Sharp" <[EMAIL PROTECTED]>
>To: "[ rswfire ]" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>Subject: RE: [PHP] JavaScript/PHP Function -> Apache/IIS5  ->  Client 
>Properties
>Date: Sat, 27 Jan 2001 17:47:05 -0800
>
>Hm...I'm not sure I completely understand...but I believe that you're 
>trying
>to gather as many stats from the client as possible?
>
>What about having a page that is somewhat transparent to the user (if they
>support JS) that you have something like this...
>
><script>
>function GetProperties()
>{
>       document.theform.cVersion.value = navigator.appVersion;
>       etc...
>       document.theform.submit();
>}
></script>
>
><body onLoad="GetProperties()">
><form action="mainpage.php" method="POST" name="theform">
>       <input type="hidden" name="cVersion">
></form>
><img src="/img/a/nice/techno/dancing/woman.gif"><br>
><b>Welcome to my beautiful site! One moment please...</b>
></body>
>
>Then you'd have mainpage.php checkthrough all those values, and possibly
>dump them into a DB and create a SESSIONID which each page thereafter uses
>the sessionid to lookup the client settings from the db and build the page
>based upon that? Depending on how long it takes to set all the hidden 
>fields
>and submit the form, it might even be transparent to the user...or...you
>might just have a generic front page if no session id is set and popup
>window that has all that java script and say something line "Customizing 
>for
>YOU!" and then have that page POST to itself and then have the window close
>it self (and you've set a cookie with the session id of course) so then 
>each
>page that he visits thereafter has the session id set. And you can 
>customize
>for him/her...
>
>Cheers,
>-Jonathan Sharp
>
>Director of Technology - Imprev Inc.
>Renwick Development Group - Flyerware
>http://www.flyerware.com/
>Phone: (425)688-9200
>Cell: (425)766-1398
>EPage: [EMAIL PROTECTED]
>
>
>-----Original Message-----
>From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
>Sent: Saturday, January 27, 2001 5:25 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] JavaScript/PHP Function -> Apache/IIS5 -> Client
>Properties
>
>
>I need to get a whole bunch of client properties from a visitor on my site
>before a page is displayed.  I do this using JavaScript.  I first determine
>if the visitor's browser supports JavaScript, and if it does I run a
>function that basically builds a temporary page and returns a bunch of
>client properties for me.
>
>Here's the code:
>
>                               if ($Browser_JavaScriptOK == TRUE)
>                               {
>
>                                       echo "<HTML>";
>                                       echo "<HEAD>";
>                                       echo "<TITLE>[ Swift eNetwork ] eNetWizard : 
>Determining Client
>Properties</TITLE>";
>                                       echo "<SCRIPT LANGUAGE=\"JavaScript\">";
>                                       echo "function GetProperties()";
>                                       echo "{";
>                                       echo
>"window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_N
>AME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCod
>eName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVe
>rsion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(nav
>igator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvai
>lHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availW
>idth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(scree
>n.height)+\"&cWidth=\"+escape(screen.width)+\"&cPixelDepth=\"+escape(screen.
>pixelDepth));";
>                                       echo "}";
>                                       echo "</SCRIPT>";
>                                       echo "</HEAD>";
>                                       echo "<BODY BGCOLOR='#000000' 
>OnLoad=\"GetProperties()\">&nbsp;";
>                                       echo "</BODY>";
>                                       echo "</HTML>";
>                                       exit;
>
>                               }
>
>
>This code is run and then goes back to the calling page with all of the
>variables.  I then process the variables and put them into a class and 
>build
>the page.
>
>This works on IIS5, but when I try to do this on Apache, it freezes up and
>after a time comes back with an error message saying PHP.EXE did something
>wrong and will be closed.
>
>Can anyone tell me what is happening?  Do you know of any other way to
>reliably return client properties?
>
>Thankz...
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com






BUY LEADS WHOLESALE FROM US FOR YOUR BUSINESS

http://www.geocities.com/leadoffers1900/leads.htm




All I have to say about his one is: "Your mother was a hamster and your
father smelled of elderberries. I fart in your general direction and I wave
my private parts at your ante you silly English kA nigh It!"

No spam please.

Thank you.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 6:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Leads>?



BUY LEADS WHOLESALE FROM US FOR YOUR BUSINESS

http://www.geocities.com/leadoffers1900/leads.htm

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






I've encounted some serious problems with Apache.  I'm about to claim to be 
an IIS fan real soon!!

Can anyone help me with the following...

1.  Why does $PHP_SELF include /php/php.exe in the variable?  How can I stop 
it from doing that?

2.  Same thing with $SCRIPT_NAME as $PHP_SELF except it does not include the 
filename.

3.  How can I turn on directory browsing?  I am receiving a Forbidden error 
whenever there isn't a default document in a directory.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





Selling on eBay is getting a little more expensive...the more 

you sell the more profit they make!

Are you tired of eBay and their price hikes?

Looking for an alternative?

Then we have just what you are looking for at a fraction of the cost!

Our Motto, The More YOU sell the more Profit YOU make...

For more complete details about this incredible offer, please respond to:
                                
               [EMAIL PROTECTED]
 
With the words "more info" in the subject line.


Thank You




Do I have to repeat myself about this topic? Sheesh!

-Codeboy

-----Original Message-----
From: tabathia [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 11:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] E Bay is going up again..


Selling on eBay is getting a little more expensive...the more 

you sell the more profit they make!

Are you tired of eBay and their price hikes?

Looking for an alternative?

Then we have just what you are looking for at a fraction of the cost!

Our Motto, The More YOU sell the more Profit YOU make...

For more complete details about this incredible offer, please respond to:
                                
               [EMAIL PROTECTED]
 
With the words "more info" in the subject line.


Thank You

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








if you goto
http://downloads.moddingcentral.com/add.php
you will see a simple form

this form takes the info and a PHP script processes it and places it into a 
mysql table. now the problem

if i put Cynical Saint's Video Tutorial in the name it will display 
Cynical Saint\ in the dbase (also seen @ downloads.moddingcentral.com)

but if you place it in the description it is fine..

here is my sql query

$rst = mysql_query("INSERT INTO tablename(id, game, section, name, size, 
description, dllink, creator, creatoremail, date, website, score, downloads) 
VALUES ('$id', '$game', '$section', '$modname', '$size', '$description', 
'$dllink', '$creator', '$creatoremail', now(), '$website', '0', '0') ") or 
die(mysql_error());

Whats wrong with this?
its driving me nuts!

- Thanks




Are you adding slashes beforehand (or running magic quotes) ? Also I always do
a stripslashes() on the text fields I print out.

--Joe

On Sat, Jan 27, 2001 at 11:06:03PM -0500, [EMAIL PROTECTED] wrote:
> if you goto
> http://downloads.moddingcentral.com/add.php
> you will see a simple form
> 
> this form takes the info and a PHP script processes it and places it into a 
> mysql table. now the problem
> 
> if i put Cynical Saint's Video Tutorial in the name it will display 
> Cynical Saint\ in the dbase (also seen @ downloads.moddingcentral.com)
> 
> but if you place it in the description it is fine..
> 
> here is my sql query
> 
> $rst = mysql_query("INSERT INTO tablename(id, game, section, name, size, 
> description, dllink, creator, creatoremail, date, website, score, downloads) 
> VALUES ('$id', '$game', '$section', '$modname', '$size', '$description', 
> '$dllink', '$creator', '$creatoremail', now(), '$website', '0', '0') ") or 
> die(mysql_error());
> 
> Whats wrong with this?
> its driving me nuts!
> 
> - Thanks
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/






Is it possible that the name field isn't lon enough to contain the full
value so is being truncated whereas the description field is long enough...

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=================================

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 27, 2001 9:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strange PHP/MySQL problem
>
>
> if you goto
> http://downloads.moddingcentral.com/add.php
> you will see a simple form
>
> this form takes the info and a PHP script processes it and places
> it into a
> mysql table. now the problem
>
> if i put Cynical Saint's Video Tutorial in the name it will display
> Cynical Saint\ in the dbase (also seen @ downloads.moddingcentral.com)
>
> but if you place it in the description it is fine..
>
> here is my sql query
>
> $rst = mysql_query("INSERT INTO tablename(id, game, section, name, size,
> description, dllink, creator, creatoremail, date, website, score,
> downloads)
> VALUES ('$id', '$game', '$section', '$modname', '$size', '$description',
> '$dllink', '$creator', '$creatoremail', now(), '$website', '0',
> '0') ") or
> die(mysql_error());
>
> Whats wrong with this?
> its driving me nuts!
>
> - Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>





How come my Apache Server goes down after a short time and forces me to 
restart it?  Shouldn't it just stay active?!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





how long does it run for?

-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 8:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Apache Server


How come my Apache Server goes down after a short time and forces me to 
restart it?  Shouldn't it just stay active?!
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







Am I programming the hard way?

I *always* parse my strings like this...

mysql_query("SELECT * FROM table WHERE id='".$id."'");

Could I just do this?

mysql_query("SELECT * FROM table WHERE id='$id'");

If so, is this compatable across all platforms and versions of PHP?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





> Am I programming the hard way?
>
> I *always* parse my strings like this...
>
> mysql_query("SELECT * FROM table WHERE id='".$id."'");
>
> Could I just do this?
>
> mysql_query("SELECT * FROM table WHERE id='$id'");
>
> If so, is this compatable across all platforms and versions of PHP?

Yes





"[ rswfire ]" <[EMAIL PROTECTED]> wrote"
> Am I programming the hard way?
> mysql_query("SELECT * FROM table WHERE id='".$id."'");
>
> Could I just do this?
> mysql_query("SELECT * FROM table WHERE id='$id'");

Yes.  And if $id is always numeric you could simplify it even more.  Quotes
are only needed around strings.  They aren't needed around numbers.  If you
surround a number in quotes it's treated as a string which will result in
different behavior when doing sorting and > or < comparisons.

mysql_query( "SELECT * FROM table WHERE id=$id " );

--
Steve Werby
COO
24-7 Computer Services, LLC
Tel: 804.817.2470
http://www.247computing.com/



Reply via email to