[PHP] increasing max size to upload

2002-06-20 Thread Anil Garg

hi,

how can i change the maximum size of the file being uploaded??
The line below does not seem to help me:
input type=hidden name=MAX_FILE_SIZE value=25000

Do  i need to make some more changes??
php ver i am using is mod_php4-4.1.2

I dont have a php.ini file anywhere!! i just have a file php.ini-dist in
/usr/local/etc/ ...but i dont think it is being used.

thanx
anil


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] increasing max size to upload

2002-06-20 Thread Tyler Longren

Change upload_max_filesize in php.ini to the value you desire.

-- 
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Thu, 20 Jun 2002 12:12:33 -0400
Anil Garg [EMAIL PROTECTED] wrote:

 hi,
 
 how can i change the maximum size of the file being uploaded??
 The line below does not seem to help me:
 input type=hidden name=MAX_FILE_SIZE value=25000
 
 Do  i need to make some more changes??
 php ver i am using is mod_php4-4.1.2
 
 I dont have a php.ini file anywhere!! i just have a file php.ini-dist
 in/usr/local/etc/ ...but i dont think it is being used.
 
 thanx
 anil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] increasing max size to upload

2002-06-20 Thread Philip Olson


Rename php.ini-dist to php.ini and modify it 
according to your needs (also read all the 
notes contained within).

Regards,
Philip Olson


On Thu, 20 Jun 2002, Anil Garg wrote:

 hi,
 
 how can i change the maximum size of the file being uploaded??
 The line below does not seem to help me:
 input type=hidden name=MAX_FILE_SIZE value=25000
 
 Do  i need to make some more changes??
 php ver i am using is mod_php4-4.1.2
 
 I dont have a php.ini file anywhere!! i just have a file php.ini-dist in
 /usr/local/etc/ ...but i dont think it is being used.
 
 thanx
 anil
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Post

2002-06-20 Thread James Drabb

Hey PHPers,

I was wondering if there is a setting to make PHP not change the posted data?  For
example I am posting a first and Last name and if I put in O'Hara for the last name
PHP returns O\'Hara.  I would prefer getting just O'Hara back and then replacing
the ' with '' myself.  I need to be able to put the posted data into MySQL and MS SQL.
MS SQL doesn't like the O\'Hara format.

Thanks,

Jim Drabb

-- 
-
Never ask a geek why, just nod your head and slowly back away
-
James Drabb JR
Programmer Analyst
Darden Restaurants
Business Systems
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] session code in class problem

2002-06-20 Thread Ford, Mike [LSS]

 -Original Message-
 From: Mark Colvin [mailto:[EMAIL PROTECTED]]
 Sent: 20 June 2002 16:48
 
 I have the following .php script and .inc file which doesn't work:

 = .inc file =
 
 ?PHP
 class Sessions
 {
 
function Check_Session()
 
  session_start();
if (!session_is_registered(SESSION))
{
   header(Location: http://???.???.??.?/index.php?logintext=Please
 login.);
   exit();
}
 
 }

 Parse error: parse error, expecting `'{'' in
 /var/www/html/includefiles/session_functions.inc on line 7

Quite right.  The body of a function needs to be enclosed in { }, so PHP is
expecting a { immediately after function Check_Session().

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Post

2002-06-20 Thread Erik Price


On Thursday, June 20, 2002, at 12:19  PM, James Drabb wrote:


 I was wondering if there is a setting to make PHP not change the posted 
 data?  For
 example I am posting a first and Last name and if I put in O'Hara for 
 the last name
 PHP returns O\'Hara.  I would prefer getting just O'Hara back and then 
 replacing
 the ' with '' myself.  I need to be able to put the posted data into 
 MySQL and MS SQL.
 MS SQL doesn't like the O\'Hara format.

Investigate the gpc_magic_quotes setting in the manual.  It's set in 
your php.ini.  You can either work around it using stripslashes() on 
your GET/POST/COOKIE data, or you can change the setting in php.ini or 
with a function that changes the setting like ini_set().


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Post

2002-06-20 Thread Philip Olson


See these PHP directives:

  Directive:Default:
  --
  magic_quotes_gpc  on
  magic_quotes_sybase   off

If both are enabled, PHP will do what you want. 
magic_quotes_gpc is the PHP directive that essentially 
runs addslashes() on all your GetPostCookie data 
automatically, which is what you're experiencing.  This 
cannot be set at runtime with ini_set().

magic_quotes_sybase is a little different, if on then  
both magic_quotes_gpc and addslashes will escape as 
'' not \'.  magic_quotes_sybase can be set at runtime 
with ini_set() which will affect your use of addslashes().

Regards,
Philip Olson


On Thu, 20 Jun 2002, Erik Price wrote:

 
 On Thursday, June 20, 2002, at 12:19  PM, James Drabb wrote:
 
 
  I was wondering if there is a setting to make PHP not change the posted 
  data?  For
  example I am posting a first and Last name and if I put in O'Hara for 
  the last name
  PHP returns O\'Hara.  I would prefer getting just O'Hara back and then 
  replacing
  the ' with '' myself.  I need to be able to put the posted data into 
  MySQL and MS SQL.
  MS SQL doesn't like the O\'Hara format.
 
 Investigate the gpc_magic_quotes setting in the manual.  It's set in 
 your php.ini.  You can either work around it using stripslashes() on 
 your GET/POST/COOKIE data, or you can change the setting in php.ini or 
 with a function that changes the setting like ini_set().
 
 
 Erik
 
 
 
 
 
 
 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] calling a php file from javascript

2002-06-20 Thread Lazor, Ed

I don't know the complete answer.  But, in case it helps, I can tell you
that you'll need to research how to load standard web pages.  In other
words, this is a general Javascript / Flash question and PHP doesn't really
play factor into your solution.

 -Original Message-
 how can I call a php file from javascript?. Actually I want 
 to call a php
 file from flash without appear a web browser window(I used 
 getURL function
 but it use new or self window). so I will use fscommand and 
 call php from
 java.
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Error Reporing Questions with Mac

2002-06-20 Thread Lazor, Ed

Why would this be the case?  PHP is server-side and client independent...

 -Original Message-
 Your problem is undoubtably to do with the difference in line 
 endings on
 mac/pc/unix.
 
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] getting values by a joints mysql query

2002-06-20 Thread Lazor, Ed

You need to establish a relation between the two tables to complete the join
with something like:

AND G.GID = U.GID

Also, this is not a PHP related question.  You should also be directing this
to the MySQL mailing list.

 -Original Message-
 Im having problem in getting the the result values in my cross joint
query.
 
 $query=(Select U.Name, U.Title, G.Groups from Users as U, Groups as G
where U.Id='$Id' );
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] POST v. GET

2002-06-20 Thread Matt Schroebel

 after you read this web page (take you no more than 15 minutes), you 
 should consider browsing the actual HTTP spec, though it's pretty 
 technical and is very long.

I've html'd the RFC2616 for easier reading and you can find it at 
http://www.php-faq.com/httpintro.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] res_search dn_expand undefined reference php 4.2.1 / apache 1.3.26 / redhat 6.2

2002-06-20 Thread Dan Harrington

Hey everyone,
I'm getting this error regarding the PHP source files when compiling Apache.

These are the arguments I used to configure php 4.2.1:

./configure  --with-apache=../apache_1.3.26 \
--with-jpeg-dir=/usr/local/lib --with-pgsql --with-gd \
--with-ttf=/usr/local/lib --with-t1lib=/usr/local/lib \
--enable-gd-imgstrttf \
--enable-trans-sid --with-imlib=/usr/lib --with-mysql

and this is what I used to configure apache 1.3.26 :

./configure \
--with-layout=Apache \
--prefix=/usr/local/apache \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=so \
$

[...snip]

=== src/modules
gcc -c  -I./os/unix -I./include   -DLINUX=22 -I/usr/local/src/php-4.2.1 
-I/usr/local/src/php-4.2.1/m
ain -I/usr/local/src/php-4.2
.1/main -I/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend 
-I/usr/local/src/php-4.2.1/T
SRM -I/usr/local/src/php-4.2
.1/TSRM -I/usr/local/src/php-4.2.1 -DUSE_EXPAT -I./lib/expat-lite `./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DLINUX=22 -I/usr/local/src/php-4.2.1 
-I/usr/local/src/php-4.2.1/m
ain -I/usr/local/src/php-4.2
.1/main -I/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend 
-I/usr/local/src/php-4.2.1/T
SRM -I/usr/local/src/php-4.2
.1/TSRM -I/usr/local/src/php-4.2.1 -DUSE_EXPAT -I./lib/expat-lite `./apaci` buildmark.c
gcc  -DLINUX=22 -I/usr/local/src/php-4.2.1 -I/usr/local/src/php-4.2.1/main 
-I/usr/local/src/php-4.2.
1/main -I/usr/local/src/php-
4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/TSRM 
-I/usr/local/src/php-4.2.
1/TSRM -I/usr/local/src/php-
4.2.1 -DUSE_EXPAT -I./lib/expat-lite `./apaci`   -rdynamic \
  -o httpd buildmark.o modules.o modules/standard/libstandard.a 
modules/php4/libphp4.a
main/libmain.a ./os/unix/libos.a ap/l
ibap.a
lib/expat-lite/libexpat.a  -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/local/pgsql/lib  
-rdynamic -L/u
sr/local/lib -L/usr/
local/pgsql/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lpam 
 -lpq -lgd -l
t1 -lttf -ljpeg -lcrypt -lre
solv -lm -ldl -lnsl  -lresolv -lcrypt   -lm -lcrypt -ldl
modules/php4/libphp4.a(dns.o): In function `zif_checkdnsrr':
/usr/local/src/php-4.2.1/ext/standard/dns.c:246: undefined reference to `__res_search'
modules/php4/libphp4.a(dns.o): In function `zif_getmxrr':
/usr/local/src/php-4.2.1/ext/standard/dns.c:307: undefined reference to `__res_search'
/usr/local/src/php-4.2.1/ext/standard/dns.c:334: undefined reference to `__dn_expand'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.26/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.26'
make: *** [build] Error 2

[...snip]

and the compile then dies.

I've searched the groups and there are some references to this problem, but no 
solutions that I can
find.
Redhat 6.2 is the OS.

Thanks
Dan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Passing URL as variable

2002-06-20 Thread Lisi

I have the following link in my code:

clickrate.php?site=sitenamelink=http://www.clientsite.com/store.php?id=430action=menu

There are two variables I am trying to pass to clickrate, site and link. 
The full link is http://www.clientsite.com/store.php?id=430action=menu.

The problem is that since the link itself has variables being passed, 
action is being passed as a separate variable and the full link is getting 
cut off.

I tried using htmlspecialchars, and surrounding the link with quotes, but 
nothing worked.

Any ideas?

Thanks,

-Lisi


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Passing URL as variable

2002-06-20 Thread Chris Boget

 The problem is that since the link itself has variables being passed, 
 action is being passed as a separate variable and the full link is getting 
 cut off.
 I tried using htmlspecialchars, and surrounding the link with quotes, but 
 nothing worked.

You can try urlencode().  The problem with that, however, is whether or
not clickrate.php is running urldecode() on any of the variables.

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Passing URL as variable

2002-06-20 Thread Michael Sweeney

You need to run the link value through urlencode() before you stick it
in the url. When you need to read it as a legal url again, pass it
through urldecode().

..michael..


On Thu, 2002-06-20 at 11:20, Lisi wrote:
 I have the following link in my code:
 
 
clickrate.php?site=sitenamelink=http://www.clientsite.com/store.php?id=430action=menu
 
 There are two variables I am trying to pass to clickrate, site and link. 
 The full link is http://www.clientsite.com/store.php?id=430action=menu.
 
 The problem is that since the link itself has variables being passed, 
 action is being passed as a separate variable and the full link is getting 
 cut off.
 
 I tried using htmlspecialchars, and surrounding the link with quotes, but 
 nothing worked.
 
 Any ideas?
 
 Thanks,
 
 -Lisi
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to read the Exchange databases?

2002-06-20 Thread Barajas, Arturo

Hi, list.

I'm starting an application, running Apache + PHP + MySQL under WinNT.

I need a user database, and all the users are on the Exchange 
Server database. Does anyone know how can I read that 
database or connect to it?

I'm already running the NTLM module, so I can validate my 
users under an NT domain, and I just don't want to transfer 
that Exchange database (unless there's no other way).

TIA, any help will be greatly appreciated.
--
Un gran saludo/Big regards...
   Arturo Barajas
   Sistemas PPG SJR
   +52 (427) 271-9100, ext. 448

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Passing URL as variable

2002-06-20 Thread Lisi

Thanks, I knew there was a function I was missing.

Most links being passed to clickrate do not have this particular problem. 
Is it a problem if I pass all URL through urldecode, for those cases when I 
need it, i.e. will it mess up a URL that hasn't been encoded with urlencode?

Thanks,

-Lisi

At 10:31 AM 6/20/02 -0700, Michael Sweeney wrote:
You need to run the link value through urlencode() before you stick it
in the url. When you need to read it as a legal url again, pass it
through urldecode().

..michael..


On Thu, 2002-06-20 at 11:20, Lisi wrote:
  I have the following link in my code:
 
  
 
clickrate.php?site=sitenamelink=http://www.clientsite.com/store.php?id=430action=menu
 
  There are two variables I am trying to pass to clickrate, site and link.
  The full link is http://www.clientsite.com/store.php?id=430action=menu.
 
  The problem is that since the link itself has variables being passed,
  action is being passed as a separate variable and the full link is getting
  cut off.
 
  I tried using htmlspecialchars, and surrounding the link with quotes, but
  nothing worked.
 
  Any ideas?
 
  Thanks,
 
  -Lisi
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Passing URL as variable

2002-06-20 Thread Chris Boget

 Most links being passed to clickrate do not have this particular problem. 
 Is it a problem if I pass all URL through urldecode, for those cases when I 
 need it, i.e. will it mess up a URL that hasn't been encoded with urlencode?

Run a little test script to see for yourself, but I don't believe that's true.
urldecode() on an unencoded string should just return the string.  However,
the reverse isn't true.  If you use urlencode() you must use urldecode(), if
you want a readable/usable value.

Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to read the Exchange databases?

2002-06-20 Thread Scott

I think there is a way to export the user list in the Exchange Server 
Manager into a csv file.  It would not be real time, but would get you the 
list.



On Thu, 20 Jun 2002, Barajas, Arturo wrote:

 Hi, list.
 
 I'm starting an application, running Apache + PHP + MySQL under WinNT.
 
 I need a user database, and all the users are on the Exchange 
 Server database. Does anyone know how can I read that 
 database or connect to it?
 
 I'm already running the NTLM module, so I can validate my 
 users under an NT domain, and I just don't want to transfer 
 that Exchange database (unless there's no other way).
 
 TIA, any help will be greatly appreciated.
 --
 Un gran saludo/Big regards...
Arturo Barajas
Sistemas PPG SJR
+52 (427) 271-9100, ext. 448
 
 

-- 
-
Now Playing:  Simple Minds - All The Things She Said
  Server Uptime:  189 days

www.scottah.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Include/require

2002-06-20 Thread Michael Sweeney

Be careful not to get confused between a chrooted environment like the
web server or ftp server and php include paths. PHP handles the include
and require parameters either as absolute (eg /inc/filename is an
absolute path from / - it is not relative to the web docroot.) or
relative to the directories in the php.ini include directive. If you
want to simplify your include and require statements, specify the path
to 'inc' in php.ini and then express the paths to the included files
relative to that.

..michael..

On Wed, 2002-06-19 at 22:43, David Freeman wrote:
 
   Is there a way to make include()/require() take a a full
   virtual path?  I.e.  require_once(/inc/myinc.php)?  It gets
   a little annoying to do require(../../../../file.php).
 
 Sure, they should work either way.  The only real gotcha is knowing what
 a full path will be in relation to the web server when it goes to do the
 include/require.  For example, an include for '/inc/myinc.php' has
 particular meaning under *nix that may have it not work even though it
 looks that way to an ftp proggy.
 
 Part of my normal configuration file for php projects is a declaration
 of $webroot as the path to a document as called from within a browser
 (ie. $webroot = http://www.some.domain/some/directory;) and $fileroot
 as the path to a document as called from the filesystem (ie. $fileroot =
 /home/some/user/directory) and then just append as appropriate (ie.
 Include($fileroot/inc/someinclude.php) and away you go.
 
 CYA, Dave
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Netiquette

2002-06-20 Thread Lazor, Ed

Concise is also good ;)

*gives Erik a noogie*

Erik wrote: 
 I was going to stay out of the thread, because people have 
 ways of doing 
 it that they are set in, but this is really the crux of it -- 
 allow me 
 to extrapolate on what Dan said.  Please realize that these 
 aren't fire 
 and forget emails.  They are stored, mirrored, archived.  Somewhere, 
 some site (such as theaimsgroup.com) is volunteering their 
 resources to 
 make sure that this information isn't all lost.  But if 
 people quote the 
 entire email because they're too lazy to snip, then that's a lot of 
 unnecessary extra data which has to be stored with it.
 
 If it's relevant to this particular atomic post, include 
 needed quoted 
 data.  It will help bring context to the conversation, for 
 newcomers or 
 people like me who are subscribed to too many lists to keep track of 
 threads in our heads.  But don't just include the whole email 
 and post 
 at the top of it, unless it's really short.  These huge threads get 
 longer and longer with each iteration of the conversation, 
 like a memory 
 leak.  There's not built-in garbage collector for a mailing list, so 
 it's up to subscribers to keep the noise down.
 
 Some people, especially in business, like to slap their 
 comments on top 
 of a previous email.  This helps in certain situations where 
 there is no 
 centralized mailing list, and isn't really that big a deal since it's 
 not being sent out to thousands of people or publicly archived.  In 
 fact, it's probably recommended.  But for mailing lists, really, just 
 quote what you need.
 
 Some good mail clients will let you do this very easily, by selecting 
 whatever text you feel is appropriate and then hitting 
 Reply and only 
 that text is included as quoted material in the reply.  You 
 can further 
 snip this down, as you should, in consideration of others.
 
 As a subscriber to a mailing list, you do have a 
 responsibility to keep 
 that mailing list from becoming overcongested.  It's like not 
 throwing a 
 paper cup or trash out the window when you're driving down 
 the highway.  
 What happens when someone needs to go to extra trouble to 
 maintain the 
 roads?  The taxes go up and tolls are charged.  If you want 
 to pay for 
 the privilege of using this resource (either via subscription fees or 
 via advertising, such as is found in Yahoo! groups mailing lists or 
 SourceForge lists), then go ahead and waste the bandwidth 
 with pages of 
 extra, unneeded, information.
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Escaping escaped chars

2002-06-20 Thread Gerard Samuel

Im trying to move some binary strings from mysql to postgresql,
and the binary strings has escape chars '\' in them.
I was told to double escape them like so - '\\\'
Here is what Im trying -

$data = '\0PZ\0Îê˜Úµ';  // This is a representation from an mysql dump
$data2 = str_replace('/\', '/\/\/\', $data);

Im getting -
Unexpected character in input: '\' (ASCII=92) state=1
I guess my str_replace() isn't correct.

Am I going about the right way to double escape them.
Thanks.

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Escaping escaped chars

2002-06-20 Thread Michael Sweeney

Just escape the \ with a single escape character. eg. your string
'\0PZ\0Îê˜Úµ' would end up as '\\0PZ\\0Îê˜Úµ' - each \ simply
escapes the backslash following it. If you add two backslashes, you end
up with one too many which is what the error is referring to.


..micahel..

On Thu, 2002-06-20 at 10:59, Gerard Samuel wrote:
 Im trying to move some binary strings from mysql to postgresql,
 and the binary strings has escape chars '\' in them.
 I was told to double escape them like so - '\\\'
 Here is what Im trying -
 
 $data = '\0PZ\0Îê˜Úµ';  // This is a representation from an mysql dump
 $data2 = str_replace('/\', '/\/\/\', $data);
 
 Im getting -
 Unexpected character in input: '\' (ASCII=92) state=1
 I guess my str_replace() isn't correct.
 
 Am I going about the right way to double escape them.
 Thanks.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Netiquette

2002-06-20 Thread Johnson, Kirk

Foul! Top-post ;)

 *gives Ed a noogie*

 Concise is also good ;)
 
 *gives Erik a noogie*
 
 Erik wrote: 
  I was going to stay out of the thread, because people have 
  ways of doing 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Date Comparsion

2002-06-20 Thread Lazor, Ed

Check out the date() and mktime() functions.

 -Original Message-
 Now i want to compare the leave_from and leave_to date to find out the
 number of days between!
 
 What should i do or any function in php can provide this operation?
 
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Escaping escaped chars

2002-06-20 Thread Gerard Samuel

One of the guys over on the php-db list told me that to store the binary 
string correctly in postrgresql, that I would
have to double quote whats already there.
So in essence, by the time it hits the database, it has to be -
\\\0PZ\\\0Îê˜Úµ

Any suggestions to modify the string like this...
Maybe I should be looking into one of the preg functions

Thank You.

Michael Sweeney wrote:

Just escape the \ with a single escape character. eg. your string
'\0PZ\0Îê˜Úµ' would end up as '\\0PZ\\0Îê˜Úµ' - each \ simply
escapes the backslash following it. If you add two backslashes, you end
up with one too many which is what the error is referring to.


..micahel..

On Thu, 2002-06-20 at 10:59, Gerard Samuel wrote:
  

Im trying to move some binary strings from mysql to postgresql,
and the binary strings has escape chars '\' in them.
I was told to double escape them like so - '\\\'
Here is what Im trying -

$data = '\0PZ\0Îê˜Úµ';  // This is a representation from an mysql dump
$data2 = str_replace('/\', '/\/\/\', $data);

Im getting -
Unexpected character in input: '\' (ASCII=92) state=1
I guess my str_replace() isn't correct.

Am I going about the right way to double escape them.
Thanks.






  


-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Status code and Header(Location: )

2002-06-20 Thread Peter Thoenen

PHP Manual says there are two special cases for
headers, Location and Status.  Not to concerned about
status here, but it states that Location: always
returns an status code 302.  Now HTTP/1.1 depreciates
302 since browsers were incorrectly implementing it
anyways.  It was replaces 302 with the MUSTS 303 and
304.  (304 is the correctly handled 302, and 303 is
the current incorrect way most browsers implement 302)

Since PHP seems to always return 302, is it possible
to force HTTP/1.1 compliance and return 303 or 304
depending on my situation?

-Peter


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: more upload problem

2002-06-20 Thread Andy

anil wrote
i am getting the following warning message:

 Warning: Unable to open 'none' for reading: No such file or directory in
/z/mercury/www/data/content/admin/do_upload.php on line 40
/anil wrote


Hi anil,

it seems to me that you are not getting the filename. Check if the filename
which comes from your form is available.
Maybe you spitched to php  4.2 where you have to deal different with vars
and always have to know where they come from. Try to echo the name out.

Hope this helps,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



Anil Garg [EMAIL PROTECTED] schrieb im Newsbeitrag
news:022b01c21872$19c64dc0$[EMAIL PROTECTED]...
 Hi,

 i am getting the following warning message:

 Warning: Unable to open 'none' for reading: No such file or directory in
 /z/mercury/www/data/content/admin/do_upload.php on line 40

 As this warning comes when the file is not uploaded to the tmp direcotry
can
 anyone plz tell me what are the cases due to which a file cannot be
uploaded
 to the tmp directory??( size doesnt seem to be the problem here as its
 uploading some files larger than the one which giving this erro)

 thanx
 anil :)




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Can I be an ASP with PHP?

2002-06-20 Thread René Fournier

I have a question to which I'm pretty sure the answer will be no, but 
I would like to hope I'm wrong...

I've developed a very simple Content Management tool--called 
Europa--that even retarded monkeys can use to change/update text in 
their web site. It's web-based, user-authenticated (sessions), and runs 
with PHP4 and MySQL.

Now, Europa is pretty much plug and play, so long as the web site is 
getting its text from a MySQL database. There's a web agency in town 
that is interested in Europa for their clients. Their clients want to be 
able to easily and quickly update certain elements of their site without 
begging some outside webmaster. They would really benefit from Europa.

Problem: I don't want to sell Europa, or even install it on someone's 
web server for a one-time fee. I've spent a long time on this little 
tool, and want to continue to improve it. So, I would rather license it 
to companies. They pay a quarterly subscription fee, and get to use 
Europa as it continues to grow and improve.  I'm just a little worried 
about one thing: If I install Europa on their server, and they pay their 
paltry quarterly subscription fee, and then decide they don't need any 
updates, I'm screwed. The value of Europa is much greater than what I 
want to sell subscriptions to it for (not much--I'm not really greedy), 
but I need some kind of control.

The idea: In order for Joe User to update text on his web site, he comes 
to my Europa web site, enters his company name, user ID, password, and 
clicks Login, and--voilà--he sees a handsome list of tables containing 
the text content of his site--which is pulled from a MySQL database 
residing on HIS web site's web host.

And this is the trick: Can PHP somehow fetch MySQL data over the 
Internet? Is this possible? If so, is it necessary for me to resort to 
new, unknown technologies like XML or SOAP, or can I do it with PHP 
alone?

Thanks for your comments.

...Rene

---
René Fournier,
[EMAIL PROTECTED]

Toll-free +1.888.886.2754
Tel +1.403.291.3601
Fax +1.403.250.5228
www.smartslitters.com

SmartSlitters International
#33, 1339 - 40th Ave NE
Calgary AB  T2E 8N6
Canada


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: How to remove the first element of an array?

2002-06-20 Thread Andy

Hello Leon,

try array_shift

http://www.php.net/manual/en/function.array-shift.php

Hope this helps,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



Leon Mergen [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
 Hello,

 I would like to know what the best (and fastest) way to remove the first
 element of an array is?

 So actually, I want $array[0] removed, and $array[1] to become 0,
$array[2]
 to become 1, etc etc...





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: JPGrapgh and GD Library SAMBAR server

2002-06-20 Thread Andy

Hi Christopher,

it seems to me that you have gd1.8 enabled but jdgraph in you version
requires gd2.

Check your php.ini if the propper library is activated.

Hope this helps,

Andy
--

http://www.globosapiens.net
Global Travellers Network!



Christopher J. Crane [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
 I recently installed and got working the GD library under a Windows 2K
 server running SAMBAR server as the web server. I got a simple test script
 to try to be sure the GD Library was working and it is and I am able to
 output images in PNG JPEG and GIF formats.

 My problem is that I can not get the JPGraph scripts running correctly. I
 get error messages such as:
 Warning: Undefined index:  gd2 in ../jpgraph.php on line 3418

 Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343

 Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343

 Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343

 Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343

 Warning: Cannot add header information - headers already sent by (output
 started at ../jpgraph.php:3418) in ../jpgraph.php on line 4257
 ?PNG

 I am not sure what I am doing wrong. I would like to use JPGraph because
of
 the nice graphs I have seen on his website. Any help would be great.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Can I be an ASP with PHP?

2002-06-20 Thread Erik Price


On Thursday, June 20, 2002, at 02:29  PM, René Fournier wrote:

 The idea: In order for Joe User to update text on his web site, he 
 comes to my Europa web site, enters his company name, user ID, 
 password, and clicks Login, and--voilà--he sees a handsome list of 
 tables containing the text content of his site--which is pulled from a 
 MySQL database residing on HIS web site's web host.

 And this is the trick: Can PHP somehow fetch MySQL data over the 
 Internet? Is this possible? If so, is it necessary for me to resort to 
 new, unknown technologies like XML or SOAP, or can I do it with PHP 
 alone?

You don't need to use XML.  MySQL has no way of knowing whether 
someone is accessing it locally or remotely.  You have to specify a 
domain name or IP address for any client (PHP-based, command-line, or 
otherwise) that wishes to connect to it and use it, even if that means 
localhost.

When you specify your database connection parameters, you enter an IP 
address or domain name for where the database is located.  This is 
normal.  The client then uses your web site interface (Europa) to 
access their own MySQL database, they make the changes.  Now when 
someone goes to their web site (which also accesses their own MySQL 
database), they see the updated content.

The only thing to worry about is that since they're doing their own 
hosting of their own stuff, they could hire someone cheaper or learn how 
to do it themselves and drop their Europa subscription.  But I'm sure 
you've already considered that.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] HTTP_POST_VARS Question

2002-06-20 Thread Chris Sechiatano

Hi,

Just a simple question about the HTTP_POST_VARS.  I know my forms will work
if I use only the name of the input.  Say a text box called FirstName.  I
can just do:

print $FirstName;

and everything works fine.  Why would I want to use

print $HTTP_POST_VARS[FirstName];

instead?


Thanks

-- 
Chris Sechiatano
[EMAIL PROTECTED]
www.chris-s.com

PGP Key 0x0021EFA0




msg67494/pgp0.pgp
Description: PGP signature


Re: [PHP] HTTP_POST_VARS Question

2002-06-20 Thread Erik Price


On Thursday, June 20, 2002, at 02:41  PM, Chris Sechiatano wrote:

 Just a simple question about the HTTP_POST_VARS.  I know my forms will
 work
 if I use only the name of the input.  Say a text box called FirstName.
 I
 can just do:

 print $FirstName;

 and everything works fine.  Why would I want to use

 print $HTTP_POST_VARS[FirstName];

 instead?

Read the warning box at this page: 
http://www.php.net/manual/en/language.variables.predefined.php

The short version: in PHP 4.1.2 or later you need to either use $_POST, 
$_GET, etc unless you set register_global = on (it is off by default).

You don't really ever want to use $HTTP_POST_VARS, $HTTP_GET_VARS, etc 
unless you are using a version of PHP from before PHP 4.1.0.  In which 
case you might want to use it in combination with turning 
register_globals = off, to help yourself avoid making bad coding 
mistakes.

It's no substitute for good coding, but it can help.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Can I be an ASP with PHP?

2002-06-20 Thread Lazor, Ed

René,

My 10 cents:

For a monthly fee, host sites and promote your software (and updates) as
part of the service.  Or, sell the software and offer upgrades at a price.
This option isn't as attractive though.  It's much more expensive upfront
and means the customer will have to deal with managing the system.  Your
hosting service provides a way to spread the cost over an extended period of
time in a hassle free manner.

Offer free support for recent versions and charge to support older versions.
As a result, one benefit of upgrading is free support and it's much easier
for you to manage.  Managing multiple sets of code can become a major
headache.

Remember, sometimes it's wise to ask for more money up front if it means
you'll be there when customers need support.

Yes, MySQL can fetch data over the Internet.  You'll want to research ways
of encrypting this data, but typically it's just an issue of specifying
which server is the database server when using the mysql_connect function.

-Ed


 -Original Message-
 From: René Fournier [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 20, 2002 11:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can I be an ASP with PHP?
 
 
 I have a question to which I'm pretty sure the answer will be 
 no, but 
 I would like to hope I'm wrong...
 
 I've developed a very simple Content Management tool--called 
 Europa--that even retarded monkeys can use to change/update text in 
 their web site. It's web-based, user-authenticated 
 (sessions), and runs 
 with PHP4 and MySQL.
 
 Now, Europa is pretty much plug and play, so long as the web site is 
 getting its text from a MySQL database. There's a web agency in town 
 that is interested in Europa for their clients. Their clients 
 want to be 
 able to easily and quickly update certain elements of their 
 site without 
 begging some outside webmaster. They would really benefit from Europa.
 
 Problem: I don't want to sell Europa, or even install it on 
 someone's 
 web server for a one-time fee. I've spent a long time on this little 
 tool, and want to continue to improve it. So, I would rather 
 license it 
 to companies. They pay a quarterly subscription fee, and get to use 
 Europa as it continues to grow and improve.  I'm just a 
 little worried 
 about one thing: If I install Europa on their server, and 
 they pay their 
 paltry quarterly subscription fee, and then decide they don't 
 need any 
 updates, I'm screwed. The value of Europa is much greater than what I 
 want to sell subscriptions to it for (not much--I'm not 
 really greedy), 
 but I need some kind of control.
 
 The idea: In order for Joe User to update text on his web 
 site, he comes 
 to my Europa web site, enters his company name, user ID, 
 password, and 
 clicks Login, and--voilà--he sees a handsome list of tables 
 containing 
 the text content of his site--which is pulled from a MySQL database 
 residing on HIS web site's web host.
 
 And this is the trick: Can PHP somehow fetch MySQL data over the 
 Internet? Is this possible? If so, is it necessary for me to 
 resort to 
 new, unknown technologies like XML or SOAP, or can I do it with PHP 
 alone?
 
 Thanks for your comments.
 
 ...Rene
 
 ---
 René Fournier,
 [EMAIL PROTECTED]
 
 Toll-free +1.888.886.2754
 Tel +1.403.291.3601
 Fax +1.403.250.5228
 www.smartslitters.com
 
 SmartSlitters International
 #33, 1339 - 40th Ave NE
 Calgary AB  T2E 8N6
 Canada
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Using PHP and Apache's .htaccess files.

2002-06-20 Thread Todd Fernandes

Here is my question. It involves using PHP and apache's .htaccess files.

What I basically want to know is, how do I redirect a bas user after a
failed Authentication attempt.

Example:
One PHP script checks to see if $PHP_AUTH_USER is set and if not calls
header( sprintf(WWW-authenticate: basic realm=\%s\, $g_auth_realm ));
header( HTTP/1.0 401 Unauthorized );

to get them to provide a username and password. Now, how to I check that
against the .htaccess and .htpasswd files I have in a subdirectory below the
script.

The way I have it working now is that I check to see if $PHP_AUTH_USER is
set, and if it is, I send them to the page that is a directory down behind
the .htaccess file. Working that way, if they are an invalid user, they are
prompted again, if they hit cancel, they get the 401 page. I want to give
them a custom error message instead of the generic 401 page.

Any ideas on how to avoid the 401 page?

Thank you,
Todd



Re: [PHP] Status code and Header(Location: )

2002-06-20 Thread Rasmus Lerdorf

Line 706 of php4/main/SAPI.c implements this.  Go ahead and submit a patch
and we will consider it.

-Rasmus

On Thu, 20 Jun 2002, Peter Thoenen wrote:

 PHP Manual says there are two special cases for
 headers, Location and Status.  Not to concerned about
 status here, but it states that Location: always
 returns an status code 302.  Now HTTP/1.1 depreciates
 302 since browsers were incorrectly implementing it
 anyways.  It was replaces 302 with the MUSTS 303 and
 304.  (304 is the correctly handled 302, and 303 is
 the current incorrect way most browsers implement 302)

 Since PHP seems to always return 302, is it possible
 to force HTTP/1.1 compliance and return 303 or 304
 depending on my situation?

 -Peter


 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Can I be an ASP with PHP?

2002-06-20 Thread Michael Sweeney

On Thu, 2002-06-20 at 11:29, René Fournier wrote:

 
 And this is the trick: Can PHP somehow fetch MySQL data over the 
 Internet? Is this possible? If so, is it necessary for me to resort to 
 new, unknown technologies like XML or SOAP, or can I do it with PHP 
 alone?
 

PHP can fetch (and write) data from any MySQL server that is available
on the internet. You need the hostname, a user name and a password
(details in the mysql_connect documentation). You need to be careful
about how the MySql grant tables are set so that you don't compromise
the database engine, but that's it. So yeah, you could host the Europa
tool on your servers and charge a periodic access to it. If someone
doesn't pay, disable their access to the tool - they still have their
data and database and they can use it however they want. I don't know if
that's a good business model or not, but there's not technical reason
why you can't do it.

..michael..


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Using PHP and Apache's .htaccess files.

2002-06-20 Thread Matt Schroebel

 -Original Message-
 From: Todd Fernandes [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, June 20, 2002 3:07 PM

 The way I have it working now is that I check to see if 
 $PHP_AUTH_USER is
 set, and if it is, I send them to the page that is a 
 directory down behind
 the .htaccess file. Working that way, if they are an invalid 
 user, they are
 prompted again, if they hit cancel, they get the 401 page. I 
 want to give
 them a custom error message instead of the generic 401 page.

Might be easier to crypt() the password and stuff it in a mysql db.  Then check the 
crypted user input against the db value to authorize.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Red Hat PHP

2002-06-20 Thread Phil Schwarzmann

I'm trying to install a PHP server on Linux Red Hat 7.3
 
I have a reformatted PC and some burned disks of RH 7.3 that my CD-ROM
won't detect when it reboots.
 
How do I get RH 7.3 loaded?  I've tried using the rawrite.exe function
but it always hangs at a DOS prompt when I run this file.
 
Thanks!



RE: [PHP] Red Hat PHP

2002-06-20 Thread Lazor, Ed

Good question.  Please refer to the RedHat mailing list for assistance.

 -Original Message-
 From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 20, 2002 12:47 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Red Hat  PHP
 
 
 I'm trying to install a PHP server on Linux Red Hat 7.3
  
 I have a reformatted PC and some burned disks of RH 7.3 that my CD-ROM
 won't detect when it reboots.
  
 How do I get RH 7.3 loaded?  I've tried using the rawrite.exe function
 but it always hangs at a DOS prompt when I run this file.
  
 Thanks!
 
 

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Memory Size (4.1.2 vs 4.2.1)

2002-06-20 Thread Eli White

Ok, thanks to everyone's help here, I just finished doing a minimalistic 
compile of PHP 4.2.1, (removing mysql, posix, session, and xml).

However, I then replace my existing 4.1.2 with it (yeah, I was upgrading 
at the same time - If I had to recompile, might as well)

And I was suprised, even after removing those parts, the memory req 
didn't seem to change much:

Before: (stock compile of 4.1.2 plus GD)
Apache process took 5.5Mb RAM, 1.8Mb resident

After: (reduced compile of 4.2.1 plus GD)
Apache process took 5.2Mb RAM, 2.0Mb resident

So the overall size dropped, but the resident rose.  And overall, not by 
that much?

So is 4.2.1 that much bigger to cancel out the reduced compile?  Or are 
removing those parts just so small that it doesn't make much of a 
difference?

Eli


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Using PHP and Apache's .htaccess files.

2002-06-20 Thread Andy

hello Todd,

there is a directive where you can redirect errors to certain pages withhin
the htaccess file.

I do not remember the exact syntax, but it looked like...

ErrorDocument 401 /root/to/your/file.html

Please check the apache docs it this does not work.

Andy


--

http://www.globosapiens.net
Global Travellers Network!



Todd Fernandes [EMAIL PROTECTED] schrieb im Newsbeitrag
001001c2188d$9614b4f0$[EMAIL PROTECTED]">news:001001c2188d$9614b4f0$[EMAIL PROTECTED]...
 Here is my question. It involves using PHP and apache's .htaccess files.

 What I basically want to know is, how do I redirect a bas user after a
 failed Authentication attempt.

 Example:
 One PHP script checks to see if $PHP_AUTH_USER is set and if not calls
 header( sprintf(WWW-authenticate: basic realm=\%s\, $g_auth_realm ));
 header( HTTP/1.0 401 Unauthorized );

 to get them to provide a username and password. Now, how to I check that
 against the .htaccess and .htpasswd files I have in a subdirectory below
the
 script.

 The way I have it working now is that I check to see if $PHP_AUTH_USER is
 set, and if it is, I send them to the page that is a directory down behind
 the .htaccess file. Working that way, if they are an invalid user, they
are
 prompted again, if they hit cancel, they get the 401 page. I want to give
 them a custom error message instead of the generic 401 page.

 Any ideas on how to avoid the 401 page?

 Thank you,
 Todd




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date Comparsion

2002-06-20 Thread 1LT John W. Holmes

I never saw the original post, but you'll want to use the TO_DAYS() function
in your query.

SELECT TO_DAYS(leave_to) - TO_DAYS(leave_from) AS Num_Days FROM your_table

---John Holmes...

- Original Message -
From: Lazor, Ed [EMAIL PROTECTED]
To: 'Jack' [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 12:53 PM
Subject: RE: [PHP] Date Comparsion


 Check out the date() and mktime() functions.

  -Original Message-
  Now i want to compare the leave_from and leave_to date to find out the
  number of days between!
 
  What should i do or any function in php can provide this operation?




 This message is intended for the sole use of the individual and entity to
 whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you are
 not the intended addressee, nor authorized to receive for the intended
 addressee, you are hereby notified that you may not use, copy, disclose or
 distribute to anyone the message or any information contained in the
 message.  If you have received this message in error, please immediately
 advise the sender by reply email and delete the message.  Thank you very
 much.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Architecture problem? Google want index files exept the main page.

2002-06-20 Thread Andy

Hi guys,

I did recently launch my first web site and I am asking myself why google is
only indexing the first page.
To get a better index on other search engines I am passing parameters a bit
strange and the dynamic pages
look more like static ones. So I hope this was not a shoot in a hole :-(

I am getting the parameters from the url and decode them after a certain
key. The file looks to the visitor like
it is a directory while I am forcing apache to parse it with php.

So this is the first day google is indexing it, but as I said I tryed to
search the site with google site search and it
does only find the first page.

A site like:
http://www.globosapiens.net/profiles/A002021.html

is not indexed at all!!

Did I go the wrong path, or what else is going on? Thank you for any help,

Andy

--

http://www.globosapiens.net
Global Travellers Network!






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Speed tests? RAM usage displays?

2002-06-20 Thread Pekka Saarinen


Hi,

Is there any way to determine script's memory usage?
What about execution time in ms (with breakpoints)?
And is there way to measure MySQL query speed in ms?

Thanks

Pekka
http://photography-on-the.net/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] insert date with a calendar

2002-06-20 Thread David Freeman


  user input, which is not always reliable, has to be in the correct
format.

What I've done for things like this is to have three separate select
form elements.  The first for selecting a day of the month.  The second
for selecting a month and the third for selecting a year.  I usually set
the year options based on the requirements - as in, if it's a mostly
current event then I set the valid options for year to be current year
minus two through to current year plus five.

CYA, Dave




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Speed tests? RAM usage displays?

2002-06-20 Thread 1LT John W. Holmes

 Is there any way to determine script's memory usage?

Depends on your web server. There is a way in apache. Rasmus answered this
same question for me a couple weeks ago, look through the archives. I saw an
option in IIS to put memory usage into the logs, that may work, too.

 What about execution time in ms (with breakpoints)?

Plenty of classes around that'll do basic timing, but not sure on the
breakpoint. shouldn't be that hard to implement, though. PEAR has a class to
do it, I think, or search phpclasses.org

 And is there way to measure MySQL query speed in ms?

Not really. I really wish there was a function to return query time, but
there isn't. Best you can do is take a timestamp before you issue the query
and one afterwards. That's not going to be the actual query time, but it'll
give you an idea. Best way to implement that is to make a wrapper for
mysql_query()

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Speed tests? RAM usage displays?

2002-06-20 Thread Uros Gruber

Hi!

Thursday, June 20, 2002, 10:56:40 PM, you wrote:

PS Is there any way to determine script's memory usage?

When you configure and compile you have some option
--with-memory-limit  something like that and then add

\%{mod_php_memory_usage}n\

in you http.conf of Apache where you define how log files
look like.


PS What about execution time in ms (with breakpoints)?
PS And is there way to measure MySQL query speed in ms?

u can use microtime function

function getMicrotime()
{
list($usec, $sec) = explode( ,microtime()); 
return ((float)$usec + (float)$sec); 
}

in your head of your script than call:

$start = getMicrotime();

and then in the end of script

$stop = getMicrotime();
$diff = $stop - $start;
echo Execution time was: .$diff;

You can also use Benchmark module from PEAR there is also
support for markers.

-- 
lp,
 Urosmailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: JPGrapgh and GD Library SAMBAR server

2002-06-20 Thread Nico Jansen - NiRo IT Consultants B.V.

Hi Christopher,

I think that we have the same configuration. I'm running PHP with the SAMBAR server as 
well and the JP Graph module is working OK with me so it should be working.
Have you tried the JP Graph - testsuit : On my notebook ( W2K ) I installed it at 
http://localhost/jpgraph-1.6.1/src/Examples/testsuit_jpgraph.php


Hopes this help :

Good Luck N:-J
www.niro-it.nl

My phpini looks like this:

include_path=.

[PHP]
extension=php_gd.dll

My modifications in jpgraph.php for my configuration:
// The full absolute name of directory to be used as a cache. This directory MUST
// be readable and writable for PHP. Must end with '/'
DEFINE(CACHE_DIR,/db/njhome/jpgraph-1.6.1/jpgraph_cache/);

// The URL relative name where the cache can be found, i.e
// under what HTTP directory can the cache be found. Normally
// you would probably assign an alias in apache configuration
// for the cache directory. 
DEFINE(APACHE_CACHE_DIR,/jpgraph-1.6.1/jpgraph_cache/);

// Directory for TTF fonts. Must end with '/'
DEFINE(TTF_DIR,/dv/fonts/jpgttf/ttf/);


 
PHPinfo looks like this:
  PHP Version 4.1.1 

  System Windows NT 5.0 build 2195 
gd
  GD Support enabled 
  GD Version 1.6.2 or higher 
  FreeType Support enabled 
  FreeType Linkage with TTF library 
  JPG Support enabled 
  PNG Support enabled 
  WBMP Support enabled 



  SERVER[SERVER_SOFTWARE] SAMBAR 5.0  


Andy [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Christopher,
 
 it seems to me that you have gd1.8 enabled but jdgraph in you version
 requires gd2.
 
 Check your php.ini if the propper library is activated.
 
 Hope this helps,
 
 Andy
 --
 
 http://www.globosapiens.net
 Global Travellers Network!
 
 
 
 Christopher J. Crane [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]...
  I recently installed and got working the GD library under a Windows 2K
  server running SAMBAR server as the web server. I got a simple test script
  to try to be sure the GD Library was working and it is and I am able to
  output images in PNG JPEG and GIF formats.
 
  My problem is that I can not get the JPGraph scripts running correctly. I
  get error messages such as:
  Warning: Undefined index:  gd2 in ../jpgraph.php on line 3418
 
  Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
 
  Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
 
  Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
 
  Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
 
  Warning: Cannot add header information - headers already sent by (output
  started at ../jpgraph.php:3418) in ../jpgraph.php on line 4257
  ?PNG
 
  I am not sure what I am doing wrong. I would like to use JPGraph because
 of
  the nice graphs I have seen on his website. Any help would be great.
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Fw: [PHP] Architecture problem? Google want index files exept the main page.

2002-06-20 Thread Kevin Stone

It took me a few minutes to figure out where the /profiles link was on your
hompage.  You understand that the only way a spider can read the content on
your webpage is to fopen() and parse the contents.  Google's software cannot
explore your dynamic content like a human can.  If the random profiles
link does not point to A00201.html when the page is parsed for the
spider's visit then the spider will never know about that page and it won't
get indexed.  If you want these pages to be indexed then build a new page on
your website called profiles and have it print links to all profile pages
on the same page.  Link the to the profiles page from the home page.
-Kevin

- Original Message -
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 2:41 PM
Subject: [PHP] Architecture problem? Google want index files exept the main
page.


 Hi guys,

 I did recently launch my first web site and I am asking myself why google
is
 only indexing the first page.
 To get a better index on other search engines I am passing parameters a
bit
 strange and the dynamic pages
 look more like static ones. So I hope this was not a shoot in a hole :-(

 I am getting the parameters from the url and decode them after a certain
 key. The file looks to the visitor like
 it is a directory while I am forcing apache to parse it with php.

 So this is the first day google is indexing it, but as I said I tryed to
 search the site with google site search and it
 does only find the first page.

 A site like:
 http://www.globosapiens.net/profiles/A002021.html

 is not indexed at all!!

 Did I go the wrong path, or what else is going on? Thank you for any help,

 Andy

 --
 
 http://www.globosapiens.net
 Global Travellers Network!






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] alternatives? (Was: Shot in the dark)

2002-06-20 Thread Chris Garaffa

Hello,
any chance you could set your clock to the correct date? It says July 6, 
and is really screwing up my sorting order for mail... thanks

On Saturday, July 6, 2002, at 04:49 PM, jtjohnston


--
Chris Garaffa
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Installing Syncronizing

2002-06-20 Thread César Aracena

Hello all,
 
I have this client who has a T connection and would like to run a PHP /
MySQL based program in local mode, but also be able to make the data
available from the web but hosted in a remote server… kinda strange u
think? Me too… The problem is that his server doesn’t run with IIS but
with a little ap called WinGate, which gives him all the approach for
his little network. Have anyone installed the PHP / MySQL under MS NT4.0
running WinGate before? Anything to tell me that will help me in the
process?
 
Also, I would need the MySQL people to tell me how can I make the local
 remote databases to stay synchronized let’s say with a one hour
interval top… Is this possible? FYI the remote db is hosted under a
Cobalt RAQ4i server running Red Hat Linux Apache Web server.
 
Thanks in advance.
 
 mailto:[EMAIL PROTECTED] Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 



Re: [PHP] alternatives? (Was: Shot in the dark)

2002-06-20 Thread John Taylor-Johnston

Sorry Chris,
It's set at June 20th here? Maybe my NNTP server?
John

Chris Garaffa wrote:

 Hello,
 any chance you could set your clock to the correct date? It says July 6,
 and is really screwing up my sorting order for mail... thanks

 On Saturday, July 6, 2002, at 04:49 PM, jtjohnston

 --
 Chris Garaffa
 [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How many copies

2002-06-20 Thread Martin Towell

For the first question: Will this work?
In class A, you wont get anything when you use $this-bar if the class
hasn't been instantiated.

besides that fact, you'll should get the output of:
settig:bar+foo
if you call A::foo();

As for the second question: How many times A will be made
answer: zero time - you're not instantiating it anywhere


-Original Message-
From: Uros Gruber [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 7:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How many copies


Hi!

my example

class A {
  var $bar = bar;
  function set($data) {
echo settig: .$data;
  }

  function foo() {
B::get($this-bar) ;
  }
}

class B {
  function get($bar) {
$bar = $bar . +foo;
A::set($bar);
  }
}

My question is. Will this work and how many time class A will
be made. one or 2 times. And is it possible to use properties
from class A in funstion set if i call it from class B, how
do i reference to it.

-- 
lp,
 Uros  mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Hex operations

2002-06-20 Thread Frank S. Kicenko

U... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] include() question...

2002-06-20 Thread Phil Schwarzmann

Okay, let's say I want to send a user to a certain webpage...

usually I would use...

include(website.php);

but, if i want to send a user to a website along with a variable like...

$temp = website.php?var=.$var;
include($temp);

...this doesn't work.  

any suggestions??

THANKS!!



RE: [PHP] Hex operations

2002-06-20 Thread Martin Towell

looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap  64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo $cap - $cap1 - $bit\n;
}

and you'll see what I mean...

-Original Message-
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


U... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] include() question...

2002-06-20 Thread Purushotham Komaravolu

use header
ob_start()
$temp = website.php?var=.$var;
header (Location: $temp);


Puru
- Original Message - 
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 4:31 PM
Subject: [PHP] include() question...


 Okay, let's say I want to send a user to a certain webpage...
 
 usually I would use...
 
 include(website.php);
 
 but, if i want to send a user to a website along with a variable like...
 
 $temp = website.php?var=.$var;
 include($temp);
 
 ...this doesn't work.  
 
 any suggestions??
 
 THANKS!!
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] session in class problem

2002-06-20 Thread ninti


Try enclosing the function code in brackets:

function Check_Session()
{
  code goes here
}


Mick


Quoting Mark Colvin [EMAIL PROTECTED]:

 I have the following .php script and .inc file which doesn't work:
 
 =  .php file =
 
 ?PHP
   // Include function files
   require_once includefiles/session_functions.inc;
 
  // Create instances of the required class
  $sess = new Sessions;
 
  // chech for valid session
  $sess-Check_Session();
 
  phpinfo();
 ?
 
 html
 head
 titleUntitled/title
 /head
 body
 table summary=
 trtdadmin/td/tr
 /table
 /body
 /html
 
 
 = .inc file =
 
 ?PHP
 class Sessions
 {
 
function Check_Session()
 
  session_start();
if (!session_is_registered(SESSION))
{
   header(Location: http://???.???.??.?/index.php?logintext=Please
 login.);
   exit();
}
 
 }
 
 The session was created in a previous login script. When I enter the
 .php
 script I get the following error:
 
 Parse error: parse error, expecting `'{'' in
 /var/www/html/includefiles/session_functions.inc on line 7
 
 Fatal error: Cannot instantiate non-existent class: sessions in
 /var/www/html/adminoutput.php on line 8
 However, if I copy the code from the function in the .inc file and place
 it
 at the top of my php script, and delete the class code in the php
 script
 everything works OK. Why is this happening? I also tried placing
 session_start() in the php script before calling the class method
 Check_Session but this had no effect.
 
 Thanks in advance
 
 
 Mark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] include() question...

2002-06-20 Thread Philip Olson


 but, if i want to send a user to a website along 
 with a variable like...
 
 $temp = website.php?var=.$var;
 include($temp);
 
 ...this doesn't work.  

Example:

?php
  $var = 'foo';
  include 'somefile.php';
?

somefile.php now has access to $var.  This is 
talked about in the manual too:

  http://www.php.net/include

In your case above, $var will already be available 
to website.php if you simply include it.

Regards,
Philip Olson


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] include() question...

2002-06-20 Thread David Freeman


  Okay, let's say I want to send a user to a certain webpage...
  
  usually I would use...
  
  include(website.php);
  
  but, if i want to send a user to a website along with a 
  variable like...
  
  $temp = website.php?var=.$var;
  include($temp);
  
  ...this doesn't work.  

If you are just including the file in what's already loading then all
you need to do is make sure that $var is already set when you include
the file.  Including is logically the same as opening up the other file
and then doing a copy/paste into the current page.  It's exactly the
same as if the contents of your included file was in the file that's
doing the including.

If you are actually trying to load a new page and pass a variable to it
then you probably want to look at using header(Location:
website.php?var=$var); instead.  This will actually load a whole new
page in the browser rather than just including an extra file in a page
that's already being loaded.

CYA, Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Hex operations

2002-06-20 Thread Frank S. Kicenko

I think the goofy variable is getting truncated 

(3FFF | 4) is returning 7
(4FFF | 4) is returning 8

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 6:37 PM
To: Frank S. Kicenko; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap  64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo $cap - $cap1 - $bit\n;
}

and you'll see what I mean...

-Original Message-
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


U... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Hex operations

2002-06-20 Thread Frank S. Kicenko

sorry... (4FFF | 4) is returning 4

-Original Message-
From: Frank S. Kicenko 
Sent: Thursday, June 20, 2002 7:34 PM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


I think the goofy variable is getting truncated 

(3FFF | 4) is returning 7
(4FFF | 4) is returning 8

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 6:37 PM
To: Frank S. Kicenko; [EMAIL PROTECTED]
Subject: RE: [PHP] Hex operations


looks like it's trying to treat $cap1 as a decimal number, and not a hex
number
have a look at this:

for ($cap = 0; $cap  64; $cap++)
{
  $cap1 = dechex($cap);
  $bit = ($cap1 | 0x01);
  echo $cap - $cap1 - $bit\n;
}

and you'll see what I mean...

-Original Message-
From: Frank S. Kicenko [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Hex operations


U... Does anybody know why this doesn't work...

Example: 
$cap = 16383;
$cap1 = dechex($cap);
// cap1 is now equal to 3FFF;
$bit = ($cap1 | 0x01);
//bit should equal 3FFF, but it doesn't.. it is always = 3 !!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Questions on uploading files.

2002-06-20 Thread By Proxy

Hi, sorry if this is one of those oft-answered questions, but...

I am using the script below to upload a file to the server, however if I
upload a file, say, 'pamnude.jpg' then the tmp path, file name and file size
are returned but not the mimetype. Why could this be?

Also, I read about there being a bug where arbitrary files could be
specified as the file parameter and cause files on the server to be
processed. This can be checked with the is_uploaded_file($file) function.
The example on the php.net site was /etc/passwd
Using the script below, I used /etc/passwd as the file name (or even if I
entered no file name, or any garbage text) and I always get the 'True'
response.
What am I doing wrong?

Finally, is there any way of uploading that won't cause the file to be saved
to the server, but be handled directly by a script to a database?

Thanks

Lee

?php
 if(!$ulfile_size)
 {
 $source=$HTTP_POST_FILES['ulfile']['tmp_name'];
 $name=$HTTP_POST_FILES['ulfile']['name'];
 $mimetype=$HTTP_POST_FILES['ulfile']['type'];
 $size=$HTTP_POST_FILES['ulfile']['size'];
 echo $sourcebr$namebr$mimetypebr$size;
 }

 if(is_uploaded_file($ulfile))
 {
echoTrue;
 }
 else
 {
echoFalse;
 }

echo
html
head
/head
body
form enctype='multipart/form-data' method='post' action='$PHP_SELF'
br
File to upload: input type='file' name='ulfile' id='ulfile'
br
input type=submit name='Upload' value='Upload File'br
/form
/body
/html
;
?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] insert date with a calendar

2002-06-20 Thread Justin French

When users have to enter dates on my forms, I always provide them with three
drop-down menus, for day (1-31), Month (1-12) and year (usually current
year, the next and the next, depending on the application).

Then I have three values on the next page ($_POST['day'], $_POST['month'],
$_POST['year']) which I can combine into a date format I like, or even into
a Unix timestamp.

With the addition of JavaScript, I COULD make sure that months with less
than 31 days could not have non existent days selected, but I prefer to do
all my validation server-side and spit the form back to them with their
current values.

I can't see the need for a pop-up, GUI callendar, or anything else.

Just let them select a start and end date via 6 drop-down menus, make sure
the date is correct, make sure the end date is after the start date, format
them however you want as strings, then insert them into your DB.

Easy.


Justin French



on 21/06/02 1:51 AM, Kevin Meredith ([EMAIL PROTECTED]) wrote:

 Hi there.
 
 I have an app that requires users to insert an 'end' date.  The date is
 saved in MYSQL in the date format.  The problem is that the user input,
 which is not always reliable, has to be in the correct format.  I was
 wondering if there is a way to have a simple calendar option, either on the
 page on in a pop-up window, where a user can select a date which will then
 have the correct format to be inserted.  There is also other data being
 captured on this page so this preferably needs to be done without refreshing
 the page.
 
 Any ideas would be greatly appreciated.
 
 Thanks
 Kevin
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Error Reporing Questions with Mac

2002-06-20 Thread Justin French

Ed,

Read the rest of the email.  The problem WASN'T to do with what CLIENT was
reading the page at the time, it was to do with what SERVER was running the
PHP code.

Saving his text files onto the Mac, and then trying to run them produced
Error on line 1, whilst saving and running the code on Win X resulted in
Error on line 43.

Hence, it was a problem with line ending on Mac files.  Once again, you
would get an error on line 1 if PHP doesn't recognise the line-endings,
and sees just one really long line.

If you read the rest of the thread, you'll find that the OP has got it
sorted and it was infact a problem with Mac line breaks.  He changed the
default in Dreamweaver to Windows-line-breaks, and all is well.


Justin French

Creative Director
http://Indent.com.au




on 21/06/02 3:00 AM, Lazor, Ed ([EMAIL PROTECTED]) wrote:

 Why would this be the case?  PHP is server-side and client independent...
 
 -Original Message-
 Your problem is undoubtably to do with the difference in line
 endings on
 mac/pc/unix.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Can I be an ASP with PHP?

2002-06-20 Thread Justin French

1. the problems of licensing, copyright, people who don't pay, etc etc could
all be handled with a decent license agreement/contract and a lawyer to
follow up any possible bad apples.

2. usually people connect to MySQL as localhost, but you can connect to
the server remotely IF the server allows it.  I'm not aware of many ISPs
that do.  of course, there's no reason why they couldn't write another
front-end which extracts the data out of their own database and cut you off.

3. you could store all the PHP code and MySQL database AND DATA on one
server (yours), and this way only one MySQL database has to allow external
connections... I believe this would slow their website down somewhat though.

4. rather than a fully dynamic website, you might want to consider a build
type tool which generates a site worth of static HTML pages, and FTPs them
to the server... so they don't actually get a dynamic site, they get a CMS,
and a build tool which merges templates and data into static HTML pages.


If all else fails with this stuff, option 1 is always the answer.  A clear
license/contract/terms of use will deter 99% of business' from breeching
copyright.


I can relate this problem to a client of mine, who pays a monthly fee for
the inventory system in their warehouse.  At one stage they got sick of the
payments and said thanks, we'll take it from here.  The developer just
shrugged their shoulders and left... obviously

Within two months, my client had called them back and re-established the
monthly payments, because they required:

- some bug fixes
- some new functionality
- support / advice / etc


Your best option may be to charge a nominal LICENSE fee for the product AS
IS (perhaps base it on the total product's worth, divided by the # of units
you think you might sell in 6 months, so eventually you'll start turning a
profit).

So if they back out after one month, they've got license to USE the product
as is, but they give up the right for support, bug fixes, extensions, new
bits, etc etc.

Or, they may choose to pay the small monthly fees, get the updates, get the
support, get the bugs fixed, etc etc.

This process might be done in 12 month blocks too...



Justin French







on 21/06/02 4:29 AM, René Fournier ([EMAIL PROTECTED]) wrote:

 I have a question to which I'm pretty sure the answer will be no, but
 I would like to hope I'm wrong...
 
 I've developed a very simple Content Management tool--called
 Europa--that even retarded monkeys can use to change/update text in
 their web site. It's web-based, user-authenticated (sessions), and runs
 with PHP4 and MySQL.
 
 Now, Europa is pretty much plug and play, so long as the web site is
 getting its text from a MySQL database. There's a web agency in town
 that is interested in Europa for their clients. Their clients want to be
 able to easily and quickly update certain elements of their site without
 begging some outside webmaster. They would really benefit from Europa.
 
 Problem: I don't want to sell Europa, or even install it on someone's
 web server for a one-time fee. I've spent a long time on this little
 tool, and want to continue to improve it. So, I would rather license it
 to companies. They pay a quarterly subscription fee, and get to use
 Europa as it continues to grow and improve.  I'm just a little worried
 about one thing: If I install Europa on their server, and they pay their
 paltry quarterly subscription fee, and then decide they don't need any
 updates, I'm screwed. The value of Europa is much greater than what I
 want to sell subscriptions to it for (not much--I'm not really greedy),
 but I need some kind of control.
 
 The idea: In order for Joe User to update text on his web site, he comes
 to my Europa web site, enters his company name, user ID, password, and
 clicks Login, and--voilà--he sees a handsome list of tables containing
 the text content of his site--which is pulled from a MySQL database
 residing on HIS web site's web host.
 
 And this is the trick: Can PHP somehow fetch MySQL data over the
 Internet? Is this possible? If so, is it necessary for me to resort to
 new, unknown technologies like XML or SOAP, or can I do it with PHP
 alone?
 
 Thanks for your comments.
 
 ...Rene
 
 ---
 René Fournier,
 [EMAIL PROTECTED]
 
 Toll-free +1.888.886.2754
 Tel +1.403.291.3601
 Fax +1.403.250.5228
 www.smartslitters.com
 
 SmartSlitters International
 #33, 1339 - 40th Ave NE
 Calgary AB  T2E 8N6
 Canada
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] read how many caracter

2002-06-20 Thread John Holmes

 i want read how caracter from onepage like this
 
 asasassasa
 sasassasa
 sasasassas
 sasassasasa
 sasasassasa

Yes, I want to one give you answer like this, okay? Thanks, no.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP, Java integration failed: Red Hat 7.1, JDK 1.4, Apache 1.3x

2002-06-20 Thread William John Burns

All:

None of the many online user posts in setting up Java connectivity from 
within PHP have worked. RPM or tarball.

Do you know of anyone who has an RPM of PHP, with the standard MySQL, 
GD, Postgres, WDDX, etc...but also libphp_java.so correctly set-up?

The Windows PHP has Java support right off the bat with an edit the the 
.ini file. On Win 98, no problems at all. But on my Linux paritions...

There are at least dozens of people trying to get this to work. All of 
them could be helped with an RPM or a definitive answer. Why can't 
someone release linux binaries with this sort of thing compiled in?

My system: Sun Java2 JDK 1.4.0, Red Hat 7.1, Apache 1.3x. I have tried 
all versions of PHP tarballs since 4.04p1 And I'm not alone in this 
frustration.

Yes, sometimes there is a libphp_java. There is always the .jar file. 
But after editing the .ini, doing all manner of things with 
LD_LIBRARY_PATH/ldconfig, nothing!

The best I ever got was a page that registered the .so module, but never 
finished output. (I use a test page with phpinfo(), then and a sample 
call to get a Java timestamp. In this circumstance, the page cuts off 
before the sample Java timestamp and instance.

Any help or leads would be appreciated.

Regards,

WJ Burns



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Jack

Dear all
i made a Registration Form for user to input their Data, but i also had some
Field Check before the data can be insert to the Mysql_Database!
I had a question here, sometime the mysql shows the error :
Duplicate Key for xxx
I know what is this about, reguarding to my Registration Form, it mean the
Login Name is Duplicated! But i want to show my own message to the user for
this error instead the Mysql Error! It is meanness to show User the Mysql
Error, cause they won't understand it!!!

Could Someone pls tell me how i can do this?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Martin Towell

what about doing a select count(*) from table where username = 'foobar'
then, if ($cnt  0) { /* display error */ } else { /* insert new username */
}

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 21, 2002 2:07 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP] How to Show my Own Error Message Instead of Mysql Error?


Dear all
i made a Registration Form for user to input their Data, but i also had some
Field Check before the data can be insert to the Mysql_Database!
I had a question here, sometime the mysql shows the error :
Duplicate Key for xxx
I know what is this about, reguarding to my Registration Form, it mean the
Login Name is Duplicated! But i want to show my own message to the user for
this error instead the Mysql Error! It is meanness to show User the Mysql
Error, cause they won't understand it!!!

Could Someone pls tell me how i can do this?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Installing Syncronizing

2002-06-20 Thread Mark

I think you're confused. the only WinGate I know of is an alternative
to windows' internet connection sharing. It's not a web server.

and what's a T connection?

On Thu, 20 Jun 2002 19:26:37 -0300, César Aracena wrote:
Hello all,

I have this client who has a T connection and would like to run a
PHP /
MySQL based program in local mode, but also be able to make the data
available from the web but hosted in a remote server… kinda strange
u
think? Me too… The problem is that his server doesn’t run with IIS
but
with a little ap called WinGate, which gives him all the approach
for
his little network. Have anyone installed the PHP / MySQL under MS
NT4.0
running WinGate before? Anything to tell me that will help me in the
process?

Also, I would need the MySQL people to tell me how can I make the
local
 remote databases to stay synchronized let’s say with a one hour
interval top… Is this possible? FYI the remote db is hosted under a
Cobalt RAQ4i server running Red Hat Linux Apache Web server.

Thanks in advance.

mailto:[EMAIL PROTECTED] Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Script text

2002-06-20 Thread sonjaya

I have capture serial port (pabx phone) ,and get the file dat like in
attachement.
So iwant make some page for read that conten in the file I just take
some part like this

1.date 
2.extension
3.long
4.number 
Exsample :

17/06/02  07:27:3008  00:00:59   437  2034224

16/06/02  08:11:2506  00:03:55   437  2532034

15/06/02  08:25:1908  00:00:12   234  0818797107

15/06/02  08:26:3906  00:01:20   234  0818797107

15/06/02  08:33:5207  00:09:25   437  2500682

15/06/02  08:49:1207  00:02:47   303  7806168

15/06/02  08:51:1208  00:01:52   303  7806584

15/06/02  08:53:0206  00:01:46   303  7211716

15/06/02  09:00:4007  00:01:06   326  2501682

I want make screen lay out like this

Date  extension  No PhoneLong  Type call Cost
17/06/02   437   2034224 00:00:59  Local  500

16/06/02   437   2532034 00:03:55  local 1000

15/06/02  2340818797107  00:00:12  Handphones3500 

15/06/02  234  0818797107  00:01:20  Handphone 5000

15/06/02  437  0212500682  00:09:25  Interlocal1  

15/06/02  303   780616800:02:47  Local  600

15/06/02  303 780658400:01:52  Local  500

15/06/02  303 721171600:01:46  Local  500 

15/06/02  326 250168200:01:06  Local  500 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Mysql Insert from select problem with php

2002-06-20 Thread David McInnis

After posting this on the MySQL list and getting some feedback we were
able to determine that this was not a flaw with MySQL.  Any ideas from
the PHP community?

===

Can anyone tell me why this does not work?  I am using php and mysql.

When I do an insert from select into a mysql table I get an error
whenever a value from the select portion of the query contains an
apostrophe.  Before I insert the initial value I use the php
addslashes() function to escape the ' and  characters.

For example:

If clients table contans a field called fname and it has a value of
O'Henry.  Remembering that I have used addslashes() before inserting
the value into mysql in the first place.

The following query will fail on insert:

Sql = insert into orders (fname) SELECT fname from clients where
clientid = '$clientid';


David McInnis



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Andy

jack
But i want to show my own message to the user for
this error .
/jack

hello Jack,

do a check of the insert was successfull and redirect with php to your
original page and include a error var
e.g

if (!mysql...)
HEADER(LOcation:file.php?error=mysqlfailed

Then on your sign up page do an error check

if (!empty($errror))
switch ($error){
case 'mysqlfailed':
echo 'please choose a different user name...';
break;
}

Good luck,

andy

--

http://www.globosapiens.net
Global Travellers Network!



Jack [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear all
 i made a Registration Form for user to input their Data, but i also had
some
 Field Check before the data can be insert to the Mysql_Database!
 I had a question here, sometime the mysql shows the error :
 Duplicate Key for xxx
 I know what is this about, reguarding to my Registration Form, it mean the
 Login Name is Duplicated! But i want to show my own message to the user
for
 this error instead the Mysql Error! It is meanness to show User the Mysql
 Error, cause they won't understand it!!!

 Could Someone pls tell me how i can do this?


 --
 Thx a lot!
 Jack
 [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Mysql Insert from select problem with php

2002-06-20 Thread Andy

why don't you do a quick fix and just add addslashes again if obviously
there is no escap slash present right now?

Good luck,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



David McInnis [EMAIL PROTECTED] schrieb im Newsbeitrag
005001c218e8$699e0c40$221d7041@bigdaddy">news:005001c218e8$699e0c40$221d7041@bigdaddy...
 After posting this on the MySQL list and getting some feedback we were
 able to determine that this was not a flaw with MySQL.  Any ideas from
 the PHP community?

 ===

 Can anyone tell me why this does not work?  I am using php and mysql.

 When I do an insert from select into a mysql table I get an error
 whenever a value from the select portion of the query contains an
 apostrophe.  Before I insert the initial value I use the php
 addslashes() function to escape the ' and  characters.

 For example:

 If clients table contans a field called fname and it has a value of
 O'Henry.  Remembering that I have used addslashes() before inserting
 the value into mysql in the first place.

 The following query will fail on insert:

 Sql = insert into orders (fname) SELECT fname from clients where
 clientid = '$clientid';


 David McInnis





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php