php-general Digest 14 Jan 2001 14:25:36 -0000 Issue 454

Topics (messages 34436 through 34470):

Re: rewriting the browser's url
        34436 by: Cynic

祝!ご成人**
        34437 by: Over Twenty

Escape characters
        34438 by: Jeremy Bowen
        34439 by: Cynic

Re: Problem building php 3.0.18
        34440 by: Michael A. Peters

Mixing PHP3 & SSI
        34441 by: Scott Brown
        34442 by: Rasmus Lerdorf
        34444 by: Scott Brown
        34445 by: Rasmus Lerdorf
        34446 by: Scott Brown
        34447 by: Rasmus Lerdorf
        34449 by: Scott Brown
        34451 by: Rasmus Lerdorf

Re: load balancing with php/apache?
        34443 by: tarique.sanisoft.com
        34469 by: Cal Evans

Re: RTFM me to IIF file format creation...
        34448 by: php3.developersdesk.com
        34470 by: Rouvas Stathis

Re: problem using flock()
        34450 by: Rasmus Lerdorf
        34458 by: Mukul Sabharwal

Installing PHP in Windows Me and PWS4
        34452 by: Statbat

SMs
        34453 by: Dhaval Desai
        34466 by: Bastian

file checking
        34454 by: Huseyin

logging page views, which method is better????
        34455 by: Dallas Kropka
        34461 by: php3.developersdesk.com

Refresh particular browser while updating another browser
        34456 by: Hendry Sumilo
        34460 by: Chris Adams
        34468 by: Cal Evans

Easiest Way to Install PHP3 with MySQL support on RHL 6.2
        34457 by: Neil Zanella

Re: cookie stopped working???
        34459 by: Rasmus Lerdorf

MSQL and php creating problem with date..
        34462 by: Dhaval Desai

socket-functions
        34463 by: Christoph Aigner

Re: Wondering whats wrong?
        34464 by: Zabia Networks Webmaster

Subdomain-Service
        34465 by: Bastian

Re: Is there an error??
        34467 by: Hrishi

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]


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


1) use POST method, not GET
2) don't output anything from the script that recieves the 
POST data, instead, redirect to another page. 
pseudocode follows:

if( post ) {
        query the database ;
        header( 'Location: result.php' ) ;
}

html form



At 03:23 14.1. 2001, Jared Howard wrote the following:
-------------------------------------------------------------- 
>I need to know how to be able to eliminate the querysting portion of the
>URL that is displayed on the users browser.  I don't want it possible to
>click refresh and reenter in the same querystring that was used previously
>(eg. php runs a mysql query of INSERT based on the querystring which only
>should be run once no matter how many times they click refresh).
>
>
>-- 
>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]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






ご成人オメデトウゴザイマス http://www.gem.hi-ho.ne.jp/p-head/tobi/infdex.htm ご成人以外は削除してください



Hey All,
        
        I am sending e-mail using the mail() command. My question is whenever
an ' is used in the e-mail it is escaped like this: don\'t. Is there any way to
prevent this??

Thanks,

Jeremy 




mail( 'email@address' , 'subject' , stripslashes( $body ) ) ;


At 04:22 14.1. 2001, Jeremy Bowen wrote the following:
-------------------------------------------------------------- 
>Hey All,
>        
>        I am sending e-mail using the mail() command. My question is whenever
>an ' is used in the e-mail it is escaped like this: don\'t. Is there any way to
>prevent this??
>
>Thanks,
>
>Jeremy 
>
>-- 
>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]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






I did that, and compiling those two modules as modules gives the same
error (as it would, of course).
I really would those compiled as seperate shared objects, not as part of
the libphp3.so.

These will be rpm's that are distributed, and the way users determin
what php functions they want to use is to uncomment certain shared
objects from their php3.ini file.

That way if they don't want certain php functions available, they don't
need to add to the weight of apache by having php provide those
functions.

Richard Lynch wrote:
> 
> If you're smart enough to edit a spec file, you could just compile from
> source... :-)
> 
> ----- Original Message -----
> From: "Michael A. Peters" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> Sent: Saturday, January 13, 2001 12:36 AM
> Subject: [PHP] Problem building php 3.0.18
> 
> > Howdy-
> >
> > I'm having a slight problem when attempting to build php 3.0.18
> >
> > First of all I'd like to say the rpm spec file I inherited for this is a
> > mess- I may clean it up (likely start from scratch...), but the spec
> > file I'm using isn't the issue.
> >
> > mod_php builds just dandy- but I get bad linking errors when attempting
> > to build the calendar.so and crypt.so modules.
> >
> > here's the problem:
> > cd dl
> > ./setup
> >
> > make 'CFLAGS=-I/usr/include/apache -I. -I../' calendar.so crypt.so
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/calendar.o calendar/calendar.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/dow.o
> > calendar/dow.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/french.o calendar/french.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/gregor.o calendar/gregor.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/jewish.o calendar/jewish.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/julian.o calendar/julian.c
> > gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o
> > calendar/easter.o calendar/easter.c
> > ld -o calendar.so calendar/calendar.o calendar/dow.o calendar/french.o
> > calendar/gregor.o calendar/jewish.o calendar/julian.o calendar/easter.o
> > ld: warning: cannot find entry symbol _start; defaulting to 08048080
> > calendar/calendar.o: In function `cal_jdtogreg':
> > calendar/calendar.o(.text+0x29): undefined reference to `getParameters'
> > calendar/calendar.o(.text+0x42): undefined reference to
> > `convert_to_long'
> > yada (more errors of same)
> >
> > This spec file is known to build php-3.0.16 no problem.
> > The spec file build 3.0.18 if I comment out the attempts to build
> > calendar.so and crypt.so- including all the other *so modules (mysql.so,
> > pgsql.so, gd.so, yada yada)
> >
> > Issue happens on both glibc 2.2 (red hat 7.0) and glibc 2.1.3 (rh 6.2)
> > Compiler on both is gcc 2.95.3, ld on RH7 is gnu ld 2.10.90 (not sure on
> > rh6)
> >
> > Anyone know what the issue is?
> >
> > my spec file can be viewed at http://24.5.29.77/SPECS/mod_php3.spec if
> > anyone cares to take a look. (NOTE- in that spec file, I currently have
> > the problem areas commented out so it would build.)
> > -=-=-=-=-=-=-=-=-=-=-=-=-
> > Michael A. Peters
> > Abriasoft Senior Developer
> >
> > --
> > 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]

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer




Ok - I thought I saw that it could be done, so I tried it... and I almost
got it working.

But rather than one simple layer, I've got SHTML that calls other SHTML and
so on.... it made changes really simple until now ;-)

So anyways, rather than use <? virtual(....) ?> I've replaced my

        <!--#include virtual="...." -->

with

        <? readfile("http://.....") -->

and renamed the page to .php, and it works - EXCEPT.....

The processing of the readfile does NOT pass through sufficient information
for a browser determination against the HTTP_USER_AGENT variable.

Everything I'm receiving is from the "else side" of the

 <!--#if expr="\"$HTTP_USER_AGENT\" = /.*MSIE.*/" -->
        ie specific
<!--#else -->
        netscrap specific
<!--#endif -->

Is this a known bug in PHP3(.0.15) thats fixed in PHP4, or have I stepped in
it again?





Why did you decide not to use virtual?  The readfile() method you are
using turns PHP into the browser and it makes a completely new request to
your web server.

-Rasmus

On Sat, 13 Jan 2001, Scott Brown wrote:

> Ok - I thought I saw that it could be done, so I tried it... and I almost
> got it working.
>
> But rather than one simple layer, I've got SHTML that calls other SHTML and
> so on.... it made changes really simple until now ;-)
>
> So anyways, rather than use <? virtual(....) ?> I've replaced my
>
>       <!--#include virtual="...." -->
>
> with
>
>       <? readfile("http://.....") -->
>
> and renamed the page to .php, and it works - EXCEPT.....
>
> The processing of the readfile does NOT pass through sufficient information
> for a browser determination against the HTTP_USER_AGENT variable.
>
> Everything I'm receiving is from the "else side" of the
>
>  <!--#if expr="\"$HTTP_USER_AGENT\" = /.*MSIE.*/" -->
>       ie specific
> <!--#else -->
>       netscrap specific
> <!--#endif -->
>
> Is this a known bug in PHP3(.0.15) thats fixed in PHP4, or have I stepped in
> it again?
>
>
> --
> 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 tried virtual first - but it didnt work.

it grabbed the first <? virtual(...) ?> call, processed it, and then forgot
about the rest of the page.



> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 11:56 PM
> To: Scott Brown
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Mixing PHP3 & SSI
>
>
> Why did you decide not to use virtual?  The readfile() method you are
> using turns PHP into the browser and it makes a completely
> new request to
> your web server.
>
> -Rasmus
>
> On Sat, 13 Jan 2001, Scott Brown wrote:
>
> > Ok - I thought I saw that it could be done, so I tried
> it... and I almost
> > got it working.
> >
> > But rather than one simple layer, I've got SHTML that calls
> other SHTML and
> > so on.... it made changes really simple until now ;-)
> >
> > So anyways, rather than use <? virtual(....) ?> I've replaced my
> >
> >     <!--#include virtual="...." -->
> >
> > with
> >
> >     <? readfile("http://.....") -->
> >
> > and renamed the page to .php, and it works - EXCEPT.....
> >
> > The processing of the readfile does NOT pass through
> sufficient information
> > for a browser determination against the HTTP_USER_AGENT variable.
> >
> > Everything I'm receiving is from the "else side" of the
> >
> >  <!--#if expr="\"$HTTP_USER_AGENT\" = /.*MSIE.*/" -->
> >     ie specific
> > <!--#else -->
> >     netscrap specific
> > <!--#endif -->
> >
> > Is this a known bug in PHP3(.0.15) thats fixed in PHP4, or
> have I stepped in
> > it again?
> >
> >
> > --
> > 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]
>





Well, your readfile() method will never work in any version of PHP.  Why
not just port all your SSI stuff to PHP?  There is nothing you can do in
SSI that you can't easily do in PHP.

-Rasmus

On Sun, 14 Jan 2001, Scott Brown wrote:

> I tried virtual first - but it didnt work.
>
> it grabbed the first <? virtual(...) ?> call, processed it, and then forgot
> about the rest of the page.
>
>
>
> > -----Original Message-----
> > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, January 13, 2001 11:56 PM
> > To: Scott Brown
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Mixing PHP3 & SSI
> >
> >
> > Why did you decide not to use virtual?  The readfile() method you are
> > using turns PHP into the browser and it makes a completely
> > new request to
> > your web server.
> >
> > -Rasmus
> >
> > On Sat, 13 Jan 2001, Scott Brown wrote:
> >
> > > Ok - I thought I saw that it could be done, so I tried
> > it... and I almost
> > > got it working.
> > >
> > > But rather than one simple layer, I've got SHTML that calls
> > other SHTML and
> > > so on.... it made changes really simple until now ;-)
> > >
> > > So anyways, rather than use <? virtual(....) ?> I've replaced my
> > >
> > >   <!--#include virtual="...." -->
> > >
> > > with
> > >
> > >   <? readfile("http://.....") -->
> > >
> > > and renamed the page to .php, and it works - EXCEPT.....
> > >
> > > The processing of the readfile does NOT pass through
> > sufficient information
> > > for a browser determination against the HTTP_USER_AGENT variable.
> > >
> > > Everything I'm receiving is from the "else side" of the
> > >
> > >  <!--#if expr="\"$HTTP_USER_AGENT\" = /.*MSIE.*/" -->
> > >   ie specific
> > > <!--#else -->
> > >   netscrap specific
> > > <!--#endif -->
> > >
> > > Is this a known bug in PHP3(.0.15) thats fixed in PHP4, or
> > have I stepped in
> > > it again?
> > >
> > >
> > > --
> > > 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]
> >
>
>
> --
> 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]
>





Well, it means redeveloping the entire site then - i'm just trying to add
one PHP page to a couple of dozen others that are entirely built out of
pieces of SHTML - not reinvent the wheel (I'm not getting paid for my time
here - it's volunteer work ;-)

If readfile is indeed that "broken", maybe we can talk the powers that be
into dumping full HTTP headers through the readfile call in a future
version.... I mean, the main script has it already from when it was
called... so it should be able to sub-call pages in that same context.

Maybe they'll like it without all the site menus and headers.........(well,
it's worth asking...)

> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 14, 2001 12:02 AM
> To: Scott Brown
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Mixing PHP3 & SSI
>
>
> Well, your readfile() method will never work in any version
> of PHP.  Why
> not just port all your SSI stuff to PHP?  There is nothing
> you can do in
> SSI that you can't easily do in PHP.
>
> -Rasmus
>
> On Sun, 14 Jan 2001, Scott Brown wrote:
>
> > I tried virtual first - but it didnt work.
> >
> > it grabbed the first <? virtual(...) ?> call, processed it,
> and then forgot
> > about the rest of the page.
> >
> >
> >
> > > -----Original Message-----
> > > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, January 13, 2001 11:56 PM
> > > To: Scott Brown
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Mixing PHP3 & SSI
> > >
> > >
> > > Why did you decide not to use virtual?  The readfile()
> method you are
> > > using turns PHP into the browser and it makes a completely
> > > new request to
> > > your web server.
> > >
> > > -Rasmus
> > >
> > > On Sat, 13 Jan 2001, Scott Brown wrote:
> > >
> > > > Ok - I thought I saw that it could be done, so I tried
> > > it... and I almost
> > > > got it working.
> > > >
> > > > But rather than one simple layer, I've got SHTML that calls
> > > other SHTML and
> > > > so on.... it made changes really simple until now ;-)
> > > >
> > > > So anyways, rather than use <? virtual(....) ?> I've replaced my
> > > >
> > > >         <!--#include virtual="...." -->
> > > >
> > > > with
> > > >
> > > >         <? readfile("http://.....") -->
> > > >
> > > > and renamed the page to .php, and it works - EXCEPT.....
> > > >
> > > > The processing of the readfile does NOT pass through
> > > sufficient information
> > > > for a browser determination against the HTTP_USER_AGENT
> variable.
> > > >
> > > > Everything I'm receiving is from the "else side" of the
> > > >
> > > >  <!--#if expr="\"$HTTP_USER_AGENT\" = /.*MSIE.*/" -->
> > > >         ie specific
> > > > <!--#else -->
> > > >         netscrap specific
> > > > <!--#endif -->
> > > >
> > > > Is this a known bug in PHP3(.0.15) thats fixed in PHP4, or
> > > have I stepped in
> > > > it again?
> > > >
> > > >
> > > > --
> > > > 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]
> > >
> >
> >
> > --
> > 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 readfile is indeed that "broken", maybe we can talk the powers that be
> into dumping full HTTP headers through the readfile call in a future
> version.... I mean, the main script has it already from when it was
> called... so it should be able to sub-call pages in that same context.

readfile() is not broken at all.  It is silly to use readfile() to access
the local server.  virtual() does that just fine.  Having readfile() lie
about the browser type that it is and send along fake headers would not be
a good idea.  If you want to do something like that use fsockopen() and
connect to port 80 of your server and send all the fake headers you want.

-Rasmus






> > If readfile is indeed that "broken", maybe we can talk the
> > powers that be into dumping full HTTP headers through the
> > readfile call in a future version.... I mean, the main
> > script has it already from when it was called... so it
> > should be able to sub-call pages in that same context.
>
> readfile() is not broken at all.

"broken" was in quotes for a reason... yes, it works the way the docs say -
but it doesnt work well enough in light of the fact that virtual gives me
garbage.

If I do a browser based connect to that SHTML file, I'll get a IE based
response when I use IE, and a Netscape response when I use Netscape.

If I do a readfile() request to that SHTML file through PHP3.0.15, I ALWAYS
get a Netscape based response, even when the calling PHP3 knows that it was
called from an IE browser.  This is no doubt due to the HTTP 1.0 connection
used (To quote the online PHP manual:)

        If filename begins with "http://" (not case sensitive),
        an HTTP 1.0 connection is opened to the specified server
        and the text of the response is written to standard output.

This is nice, and things like .CGI's and other scripts can be used this
way - but not completely transparently as can be seen in my case (and this
will of course fail when referencing a name-based host... something thats
becoming more and more prevalent these days).

But obviously it's not a FULL HTTP 1.0 connection - other wise it would have
a

        User-Agent:

line in the request header, wouldnt it?

> It is silly to use readfile() to access the local server.
> virtual() does that just fine.  Having readfile() lie about
> the browser type that it is and send along fake headers  would
> not be a good idea.  If you want to do something like that use
> fsockopen() and connect to port 80 of your server and send all
> the fake headers you want.

I tried virtual - but in doing so, I lost everything except what preceeded
the virtual call (which is pretty much right at the top of the page, being
as it calls the standard page headers/formatting).

This made virtual useless to me, on my server (running php3.0.15 - maybe it
works better under 4, but I dont have that option right now)

Include doesnt work, as it doesnt process the SHTML, require also doesnt do
what I need.

Thus readfile() (even if it's not the best idea) actually worked better than
any of the more desirable alternatives.

So it looks like I will have to use the fsockopen() method - since the
"non-broken" readfile() routine doesnt handle User-Agent properly.






> > > If readfile is indeed that "broken", maybe we can talk the
> > > powers that be into dumping full HTTP headers through the
> > > readfile call in a future version.... I mean, the main
> > > script has it already from when it was called... so it
> > > should be able to sub-call pages in that same context.
> >
> > readfile() is not broken at all.
>
> "broken" was in quotes for a reason... yes, it works the way the docs say -
> but it doesnt work well enough in light of the fact that virtual gives me
> garbage.

Well, shouldn't you be complaining about virtual() then?

> If I do a readfile() request to that SHTML file through PHP3.0.15, I ALWAYS
> get a Netscape based response, even when the calling PHP3 knows that it was
> called from an IE browser.  This is no doubt due to the HTTP 1.0 connection
> used (To quote the online PHP manual:)
>
>       If filename begins with "http://" (not case sensitive),
>       an HTTP 1.0 connection is opened to the specified server
>       and the text of the response is written to standard output.
>
> This is nice, and things like .CGI's and other scripts can be used this
> way - but not completely transparently as can be seen in my case (and this
> will of course fail when referencing a name-based host... something thats
> becoming more and more prevalent these days).
>
> But obviously it's not a FULL HTTP 1.0 connection - other wise it would have
> a
>
>       User-Agent:
>
> line in the request header, wouldnt it?

It is a full connection and a User-Agent header is sent.  The user agent
is reported accurately as "PHP" followed by a version number.  It is not
Netscape nor IE making this HTTP request, it is PHP.

-Rasmus





On Sat, 13 Jan 2001, jeremy brand wrote:

> Oh, BTW, we don't use PHP sessions, we use our own.  
That has got me hooked - what do you use?
do you mean you dont use 
1) PHP4 sessions 
OR
2) don't use PHP for session handling at all?

Tarique

-- 
=========================================
       B2B Application Providers
        http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.net
=========================================





I agree. You've piqued my curiosity.  Can you go into details?

Cal
http://wwww.calevans.com

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 13, 2001 10:19 PM
To: jeremy brand
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] load balancing with php/apache?


On Sat, 13 Jan 2001, jeremy brand wrote:

> Oh, BTW, we don't use PHP sessions, we use our own.  
That has got me hooked - what do you use?
do you mean you dont use 
1) PHP4 sessions 
OR
2) don't use PHP for session handling at all?

Tarique

-- 
=========================================
       B2B Application Providers
        http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.net
=========================================


-- 
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]






Addressed to: "Dallas Kropka" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Dallas Kropka" <[EMAIL PROTECTED]> Sat, 13 Jan 2001 
19:15:02 -0600
>
> I need to create files and reports for importation into QuickBooks,
> but they need to be in the IIF file format that QuickBooks
> supports.... where can I find information for creating these files?


The content of the iif files is defined in Quickbooks help.  Look for
IIF or Data import.  It differs for each type of data you are
transferring. You will have to look in help to get the definitions.
There is also info on the subject and example files on the quickbooks
web site. www.quickbooks.com, I think. Search on IIF, and maybe the
type of file you want to create.


<From memory, not tested>
You can provide several different types of data in a single file.  The
file needs to start with a definition of the fields you are going to
present.  These definition lines start with !.  Each of your data lines
must have the exact same fields in the order you defined them in the !
lines.  You don't have to provide all the possible values, but some
record types do have required fields that must be provided, and filled
in.

Each record is a number of values with "\t" between them. The record
ends with "\r\n".  You must use double quotes so the tabs (\t) and
Dos/Windows style line breaks {\r\n) are converted to the proper
character values.
</from memory>

Once you have reviewed Quickbooks help, and the web site, if you have
specific quesions on your file format, ask again.  It is actually
pretty easy.  The best way to verify your files during development is
to open them with a spreadsheet program.  Also, you MUST backup the
quickbooks data before you try testing your upload.  If it fails for
any reason, just restore, fix the problem and upload again.  Don't feel
bad if you do this a couple dozen times before everything works.







Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




I find wotsit.org an excellent resource :
<http://www.wotsit.org/>
-Stathis.

Dallas Kropka wrote:
> 
> I need to create files and reports for importation into QuickBooks, but they
> need to be in the IIF file format that QuickBooks supports.... where can I
> find information for creating these files?
> 
> --
> 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]




Oh man, I wouldn't do it this way.  Log this stuff in a separate file
using a simple append which doesn't need logging.  Then write yourself a
simple little perl script that figures it out after the fact.  File
locking on anything with high traffic is going to make your hair turn
grey.

Another alternative is to log this stuff to a database.

-Rasmus

On Sat, 13 Jan 2001, 10,000 Screaming Monkeys wrote:

> Hi,
>
> I'm having a problem with one of the PHP scripts I've written and I'm
> hoping someone can point me in the right direction.  The portion of
> the script that is giving me trouble is the locking of, and writing to,
> a logfile (plain text).  I'm using flock() as I understand it and have
> looked at the online manual page for it to no avail...
>
> What's happening is, under "high" traffic conditions on the website I
> wrote the script for, the logfile is occasionally getting clobbered. I
> tried one of the suggestions on the man page (the one by
> [EMAIL PROTECTED]), but it resulted in the logfile being appended to,
> rather than properly updated as I want.  (better than being clobbered,
> but rather confusing to cleanup after later...)
>
> Here is an example snippit of the script.  Can anyone tell me what I
> might be doing wrong, or suggest a better/more efficient way to write
> this?
>
> <BEGIN CODE SNIP>
> if (@fopen($dlfile, "r")) {
>
>    $log_entries = file($download_log);
>    $total = count($log_entries);
>    $dl_time = time();
>
>    for ($i=0; $total>$i; $i++) {
>       $split = explode("||", $log_entries[$i]);
>
>       if ($stats_url == $split[1]) {
>          // If the file being downloaded is already in the logfile,
>          // increment the download count and update the $dl_time
>
>          $fp = fopen($download_log, "r");
>          flock($fp,1);
>          $x = fread($fp, filesize($download_log));
>          fclose($fp);
>
>          $fp = fopen($download_log, "w");
>          flock($fp,2);
>
>          // Increment download counter
>          $add = $split[0]+1;
>
>          // Do the actual update of the download count & latest dl time
>          $x = str_replace("$split[0]||$split[1]||$split[2]||$split[3]||$split[4]||", 
>"$add||$split[1]||$split[2]||$dl_time||$split[4]||", $x);
>
>          fwrite($fp, $x);
>
>          fclose($fp);
>          $write = 1;
>       }
>
>    }
>    if ($write != 1) {
>
>       // The file being downloaded is not in the logfile --
>       // add it now and start its counter at 1
>
>       $fp = fopen($download_log, "a");
>       flock($fp,2);
>       $fw = fwrite($fp, 
>"1||$stats_url||$dl_time||$dl_time||dir2=$dir2&file=$urlfile||\n");
>       fclose($fp);
>
>    }
> }
> <END CODE SNIP>
>
> Thanks...I'm desperate...
>
> - Jamie
>
> --
> The sweetest cherry in an apple pie
> <[EMAIL PROTECTED]>  (Single purpose Email address)
>
> --
> 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]
>





Hi,

Well the problem might be while obtaining the lock.
fopen() with let's say 'a' will open the file, and put
the cursor to the very last byte. The time period
between opening the file and getting the lock is
probably where you're clobbered.

At let's say time X, a file is opened and the writing
lock is obtained at X.2 (2 seconds later), if
something has been written to the file in these 2
seconds, then you've had it, the cursor will remain at
the position of X. So a work around could be doing an
fseek() after obtaining the lock.

http://www.devhome.net/php/tutorials/

Look at the File Handling in a Nutshell, it has some
detailed info.

> On Sat, 13 Jan 2001, 10,000 Screaming Monkeys wrote:
> 
> > Hi,
> >
> > I'm having a problem with one of the PHP scripts
> I've written and I'm
> > hoping someone can point me in the right
> direction.  The portion of
> > the script that is giving me trouble is the
> locking of, and writing to,
> > a logfile (plain text).  I'm using flock() as I
> understand it and have
> > looked at the online manual page for it to no
> avail...
> >
> > What's happening is, under "high" traffic
> conditions on the website I
> > wrote the script for, the logfile is occasionally
> getting clobbered. I
> > tried one of the suggestions on the man page (the
> one by
> > [EMAIL PROTECTED]), but it resulted in the
> logfile being appended to,
> > rather than properly updated as I want.  (better
> than being clobbered,
> > but rather confusing to cleanup after later...)
> >
> > Here is an example snippit of the script.  Can
> anyone tell me what I
> > might be doing wrong, or suggest a better/more
> efficient way to write
> > this?
> >
> > <BEGIN CODE SNIP>
> > if (@fopen($dlfile, "r")) {
> >
> >    $log_entries = file($download_log);
> >    $total = count($log_entries);
> >    $dl_time = time();
> >
> >    for ($i=0; $total>$i; $i++) {
> >       $split = explode("||", $log_entries[$i]);
> >
> >       if ($stats_url == $split[1]) {
> >          // If the file being downloaded is
> already in the logfile,
> >          // increment the download count and
> update the $dl_time
> >
> >          $fp = fopen($download_log, "r");
> >          flock($fp,1);
> >          $x = fread($fp, filesize($download_log));
> >          fclose($fp);
> >
> >          $fp = fopen($download_log, "w");
> >          flock($fp,2);
> >
> >          // Increment download counter
> >          $add = $split[0]+1;
> >
> >          // Do the actual update of the download
> count & latest dl time
> >          $x =
>
str_replace("$split[0]||$split[1]||$split[2]||$split[3]||$split[4]||",
> "$add||$split[1]||$split[2]||$dl_time||$split[4]||",
> $x);
> >
> >          fwrite($fp, $x);
> >
> >          fclose($fp);
> >          $write = 1;
> >       }
> >
> >    }
> >    if ($write != 1) {
> >
> >       // The file being downloaded is not in the
> logfile --
> >       // add it now and start its counter at 1
> >
> >       $fp = fopen($download_log, "a");
> >       flock($fp,2);
> >       $fw = fwrite($fp,
>
"1||$stats_url||$dl_time||$dl_time||dir2=$dir2&file=$urlfile||\n");
> >       fclose($fp);
> >
> >    }
> > }
> > <END CODE SNIP>
> >
> > Thanks...I'm desperate...
> >
> > - Jamie
> >
> > --
> > The sweetest cherry in an apple pie
> > <[EMAIL PROTECTED]>  (Single purpose Email address)
> >
> > --
> > 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]
>

=====
To Find Out More About Me : http://mukul.tsx.org/

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Hello,

I am trying to install php in windows Me and PWS4. But I am getting into trouble. I 
have stated the steps I have performed and the one I am unable to perform.

1. - The easiest way to do it is to copy these DLLs to your SYSTEM (Windows 9x) 
directory, 
   which is under your Windows directory. The DLLs that need to be copied are 
MSVCRT.DLL 
   (it was already in that folder) and PHP4TS.DLL.

Done.

2. - Copy php.ini file in your windows folder.

Done

3. - Edit the enclosed PWS-php4.reg file to reflect the location of your
     php4isapi.dll.  Forward slashes should be escaped, for example:
  
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]
    ".php"="C:\\Program Files\\PHP\\php4isapi.dll"

I don't have any enclosed PWS-php4.reg file. Where will i find it.

Thanks in advance for the help.

Regards
Statbat




HI!

I am trying to build a SMS(Short message service)
mesaging system..can anybody tell me what are the
requirements for this...

Thanx a lot!
Dhaval Desai


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Hello!

A requirement is a special server that sends them, but such a server costs
money, every message costs some.
Another way is to send the messages to the mailaddress. I only know it from
Germany: [EMAIL PROTECTED]

Bastian


--






********//End of message********
"Dhaval Desai" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> HI!
>
> I am trying to build a SMS(Short message service)
> mesaging system..can anybody tell me what are the
> requirements for this...
>
> Thanx a lot!
> Dhaval Desai
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.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]
>






i am trying to write a function that checks the file to see if it is still
availabla to download
if not it will return link is broken
this is what i have
if(!($connection = @fopen ($row[url], "r"))) {
$broken=1;}
else {
$broken=0;
}
but the problem is that it sometimes display broken link even thoug it is
not
if someone can help me thats wonderful
thanks in advance







        I have a large site, with several hundred pages.... its a product listing
and shopping cart.... and I want to log my page views.... I receive an
average of 3000 hits per minute.

Is it better (faster) to log my views to a database table? or to a flat
file?





Addressed to: "Dallas Kropka" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Dallas Kropka" <[EMAIL PROTECTED]> Sun, 14 Jan 2001 
00:57:10 -0600
>
>
>       I have a large site, with several hundred pages.... its a product
> listing and shopping cart.... and I want to log my page views.... I
> receive an average of 3000 hits per minute.
>
> Is it better (faster) to log my views to a database table? or to a
> flat file?


No need to re-invent the wheel, all accesses are already being logged.


If you are using Apache, take a look at the access log.  Every hit to
the server is already logged there.  I am not sure what the default
location for the file is, but you can find it with

   locate access_log

or by looking for the string  Log  in your httpd.conf file.  I believe
it may appear under either the AccessLog or CustomLog keywords.

You might want to look at Webalizer, or a couple of other programs to
analyze the contents.

   http://www.mrunix.net/webalizer/

There are others, but this is the one I use.





Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Dear Expert,

I would like how to refresh particular browser with a new updated data when 
the user has updated it at another browser.
Purpose of doing this is particular user won't user overwrite new value if 
he uses another browser to update it.

Thank you



Sincerely Yours

Hendry Sumilo
[EMAIL PROTECTED]
http://members.tripodasia.com.my/hsumilo

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





On 13 Jan 2001 23:45:58 -0800, Hendry Sumilo <[EMAIL PROTECTED]> wrote:
>I would like how to refresh particular browser with a new updated data when 
>the user has updated it at another browser.
>Purpose of doing this is particular user won't user overwrite new value if 
>he uses another browser to update it.

I don't think there's a good way of doing this sort of something strange with a
Java applet. The easiest way of doing this would be to include a timestamp row 
in your database table; the edit form would be generated with the current value
of that field. When they submit the form, your code can check to see if the time
stamp that was current when the form was created is still valid and either 
process the request or give the user some sort of "Overwrite newer data (y/n)"
prompt.




>From everything I know, this can't be done easily. The only way I can think
of to do it is to keep both sessions alive so that you still have a
connection to the browser from the server.  This is not real good.

I would instead, explore options using JavaScript.  I think I can see a
couple of ways that you could use JavaScript to force a refresh of a window
that it has a handle to, upon an event. (Like pressing the submit button in
a browser.)

Cal
http://www.calevans.com


-----Original Message-----
From: Hendry Sumilo [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 14, 2001 1:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Refresh particular browser while updating another browser


Dear Expert,

I would like how to refresh particular browser with a new updated data when
the user has updated it at another browser.
Purpose of doing this is particular user won't user overwrite new value if
he uses another browser to update it.

Thank you



Sincerely Yours

Hendry Sumilo
[EMAIL PROTECTED]
http://members.tripodasia.com.my/hsumilo

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]







Hello,

I thought this might be of interest to some newbies who might want to
enable MySQL support in PHP without having to do anything but execute
some commands as root on their Red Hat Linux 6.2 system. Here they are:

wget ftp://ftp.redhat.com/redhat/redhat-6.2/SRPMS/SRPMS/php-3.0.15-2.src.rpm
rpm -ivh php-3.0.15-2.src.rpm
cd /usr/src/redhat/SPECS
cat php.spec | awk '/configure/ { print $0; print "\t--with-mysql \\" }' > php.spec.out
mv -f php.spec.out php.spec
rpm -ba php.spec
cd /usr/src/redhat/RPMS/i386
rpm -ivh --force php-3.0.15-2.i386.rpm
rpm -ivh --force php-ldap-3.0.15-2.i386.rpm
rpm -ivh --force php-pgsql-3.0.15-2.i386.rpm
rpm -ivh --force php-imap-3.0.15-2.i386.rpm
rpm -ivh --force php-manual-3.0.15-2.i386.rpm

All done!

Have fun,

-- Neil





> SetCookie("cpvin","$vin","time()+1500");

SetCookie("cpvin",$vin,time()+1500);

Note though that such short expiry times make you very prone to people
having their clocks set wrong.  It is a better idea to embed your server's
timestamp in the value of the cookie and when you get the cookie back
compare that timestamp to your server's current time and determine if you
shoudl expire the cookie or not.  Leaving expiry to a remote user's badly
configured machine is a mistake.

> Today I tried putting: $cpvin = $HTTP_COOKIE_VARS["cpvin"];  at the
> top.. no luck there either.

Stick a phpinfo() call on your page and scroll to the bottom of the
output.  You will see all the incoming and outgoing headers for the
request.  Cookie headers will show up there.

-Rasmus





Hiee Guys I am trying to do the following: but I get
an error saying:


*****************************************************
You have an error in your SQL syntax near
'dayofmonth(date_add('', INTERVAL 7 DAY)))' at line 2
*****************************************************



<?php

$odate = date('Y m  d');

$connect = mysql_connect("localhost");


$query = "insert into list(odate,edate)
values($odate,dayofmonth(date_add('$odate_sql',
INTERVAL 7 DAY))";

$execute = mysql_db_query("dubaiteenz",$query);
if($execute)
{
echo "Success, you are thinking in the right
direction";
}
else
{
echo mysql_error();
}


?>





Can anybody help me out please....


Thanx!
Dhaval Desai






__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




hello,

is it possible to use the socket-functions within a windows-environment, or
are they for linux-distributions only ...?


regards christoph





Yeah that was it exactly what was wrong. Thank you!


*********** REPLY SEPARATOR  ***********

On 13/01/2001 at 18:03 Sterling Hughes wrote:

>Toby Butzon wrote:
>>
>> This is a matter of figuring out why the variable isn't a
>> valid file handle resource. To do so, find where it should
>> be made such a resource (the line that says $fp =
>> fsockopen...etc... is probably it), and add some error
>> checking. I believe this function has its own way of
>> returning what's wrong; check php.net/fsockopen and take a
>> look at additional arguments... Then you must simply output
>> the resulting error message (which is assumed to be
>> resulting because the file handle is not being created).
>>
>> --Toby
>>
>
>That is good advice, but i don't think that's the poster's problem.
>
>The problem is the following code:
>
>fputs("$fp", "GROUP $groups[$i]\n");
>
>You cannot stringify a resource (with PHP 4).  Therefore the offending code must
>look like:
>
>fputs($fp, "GROUP $groups[$i]\n");
>
>In order to work...
>
>-Sterling
>
>
>> ----- Original Message -----
>> From: "K.Simon" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Saturday, January 13, 2001 11:07 AM
>> Subject: [PHP] Wondering whats wrong?
>>
>> Hello,
>> running the following script (exec.php) on telnet account i
>> get this error:
>> Warning: Supplied argument is not a valid file handler
>> resource in exec.php on line 21
>> Can anybody tell me whats wrong with it? Normally it should
>> fetch the newsgroups on my local news server and insert them
>> into rows on a mysql database. This script is part of
>> myPHPusenet-0.9.9.
>> I hope the script was not too long.
>>
>> THE SCRIPT:
>> *********************************************************
>>
>> #!/usr/bin/php -q
>>
>> <?
>>
>> $start = gettimeofday();
>>
>> include("conf.inc.php");
>> include("newsgroups.inc.php");
>>
>> @mysql_connect($hostname, $username, $password) OR DIE
>> ("Could not connect");
>> @mysql_select_db("$database") OR DIE ("Could not open
>> database");
>>
>> $i = 0;
>> $j = 0;
>>
>> while($i < sizeof($groups) ) {
>>
>>         $fp = fsockopen("$server", 119);
>>         set_socket_blocking($fp, true);
>>         $response = fgets($fp, 256);
>>         fputs("$fp", "GROUP $groups[$i]\n");
>>         $gruppe = fgets($fp, 1024);
>> $range = split(" ", $gruppe);
>> $range_start = $range[2];
>> $range_end = $range[3];
>>
>> $db_ng_name[$i] = ereg_replace("\.","_", $groups[$i]);
>>
>> $query1 = "UPDATE last SET last.last = '$range_end' WHERE
>> newsgroup = '$db_ng_name[$i]'";
>> $query2 = "SELECT last FROM last WHERE (newsgroup LIKE
>> '$db_ng_name[$i]')";
>> $runit2 = MYSQL_QUERY($query2);
>> $result = @MYSQL_RESULT($runit2,0,last);
>>
>> IF (@MYSQL_NUMROWS($runit2) == 1) {
>>
>> $range_start = $result;
>>
>> while($range_start < $range_end) {
>>
>> system("parse.php $server $groups[$i] $range_start");
>>
>> $range_start++;
>> $j++;
>>
>> }
>>
>> }
>>
>> ELSE {
>> PRINT "No new posts in $groups[$i]\n";
>> }
>>
>> $runit1 = MYSQL_QUERY($query1);
>>
>> $i++;
>> }
>>
>> $tables = MYSQL_LIST_TABLES($database);
>> $k = 0;
>>
>> WHILE ($k < MYSQL_NUM_ROWS ($tables)) {
>> $area_names[$k] = MYSQL_TABLENAME ($tables, $k);
>> $query = "SELECT count(*) AS total_nr FROM $area_names[$k]";
>> $q_string = @MYSQL_QUERY($query);
>> $fundet = @MYSQL_RESULT($q_string,0,total_nr);
>>
>> $total += $fundet;
>> $k++;
>> }
>>
>> $date = date("d");
>> $month = date("F");
>> $shortmonth = date("M");
>> $year = date("Y");
>> $hour = date("H");
>> $min = date("i");
>> $sec = date("s");
>>
>> $end =  gettimeofday();
>>
>> $exec_time = number_format( (($end["sec"] +
>> $end["usec"]/1000000) - ($start["sec"] +
>> $start["usec"]/1000000)), 3);
>>
>> $contents = "Hi!\n\nThe newsparser was run $date $month
>> $year at $hour:$min:$sec, and it inserted $j posts in
>> the\ndatabasen, there are now $total posts in the
>> \n\nDatabase the update took $exec_time seconds.\n\n--
>> \n\nYours Truly.\n\tmyPHP usenet";
>>
>> mail("$email", "$subject", "$contents",
>> "From:$USER@$HOSTNAME\nReply-To: [EMAIL PROTECTED]");
>>
>> $fp = fopen($logname, "a") or die ("Could not open
>> logfile");
>> $logmess = "$shortmonth $date $hour:$min:$sec the newsparser
>> inserted $j posts, there are now $total total\n";
>> $write = fputs($fp, $logmess);
>> fclose($fp);
>>
>> ?>
>>
>> --
>> 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]
>
>--
>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!

Are there any scripts to create an Subdomain-Service (yourname.domain.com)
without having Wildcards? I've got a danish-script, but it's not that, what
I expected, becuase it needs wildcars.

Thanks!!

Reagards,
Bastian






$odate_sql is not initialized.

-------------------------------------------
Yeah, there are more important things in life than money, but they won't go
out with you if you don't have any.
----- Original Message -----
From: "Dhaval Desai" <[EMAIL PROTECTED]>
To: "Hrishi" <[EMAIL PROTECTED]>
Sent: Sunday, January 14, 2001 4:59 PM
Subject: Is there an error??


> Hiee Guys I am trying to do the following: but I get
> an error saying:
>
>
> *****************************************************
> You have an error in your SQL syntax near
> 'dayofmonth(date_add('', INTERVAL 7 DAY)))' at line 2
> *****************************************************
>
>
>
> <?php
>
> $odate = date('Y m  d');
>
> $connect = mysql_connect("localhost");
>
>
> $query = "insert into list(odate,edate)
> values($odate,dayofmonth(date_add('$odate_sql',
> INTERVAL 7 DAY))";
>
> $execute = mysql_db_query("dubaiteenz",$query);
> if($execute)
> {
> echo "Success, you are thinking in the right
> direction";
> }
> else
> {
> echo mysql_error();
> }
>
>
> ?>
>
>
>
>
>
> Can anybody help me out please....
>
>
> Thanx!
> Dhaval Desai
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
>
>



Reply via email to