RE: [PHP] mysql error, dont see why.. please help

2001-05-22 Thread Chadwick, Russell


The SET clause has to come before WHERE clause   - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql error, dont see why.. please help


Shouldn't it be:
mysql_query("UPDATE user_polls SET url = '$file_name' WHERE uid =
'$UserName' AND type = '$type") or die (mysql_error());

Maybe I'm wrong.

-- 
Tyler Longren
[EMAIL PROTECTED]
Currently Unemployed
www.noworkfortyler.com



On Tue, 22 May 2001 17:00:35 EDT
[EMAIL PROTECTED] wrote:

> Here is the command.
> 
> mysql_query("UPDATE user_polls WHERE uid = '$UserName' AND type = '$type'
SET 
> url = '$file_name'") or die(mysql_error());
> 
> Output
> You have an error in your SQL syntax near 'WHERE uid = 'Oblivion' AND type
= 
> 'music' SET url = 'test'' at line 1
> 
> This is SOOO weird.
> PLEASE HELP
> 
> - Peter
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


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

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




RE: [PHP] URL Variables

2001-05-22 Thread Chadwick, Russell


Variables as part of the url would not be encrypted, but you could send
variables as POST to the secure document and then they would get encrypted -
Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Michael Conley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:08 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] URL Variables


First, I realize this isn't really a PHP question.

If I include variables in a URL that I am passing to a web server over
HTTPS, is the URL (and hence, the variables) encrypted?
example:  https://www.yourdomain.com?firstname=michael&lastname=conley

I need to make sure that the firstname and lastname information is not sent
over the internet in clear text.  



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




RE: [PHP] ftp

2001-05-22 Thread Chadwick, Russell


I can think of 2 options, neither pleasant.  On unix you can write a script
for ftp to use and put a .netrc in your home dir with a line like this
machine  login  password 
and that will make it automatically connect.  So you could write script to
do things like get a file listing and fetch files on the fly and do use > to
send the output to a file which you could read from php.  
ftp < commands.in > output.out
Option 2 is to get the RFC document on the ftp protocol and use phps socket
functions to make a php ftp client from the ground up.  - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Glenda Robalino [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 2:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ftp


Hi..
maybe you could help me, I want to make an FTP but whithout Ftp_open and all

those functions, is there any way???
tx
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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




RE: [PHP] Passwords?

2001-05-22 Thread Chadwick, Russell


This link
Back
will work on javascript enabled machines... 
the truly failsafe way is to stuff their data in a session or in the
database and pass an id back to the original script.
You can also make your form to fill out a seperate file, which your first
script includes, and if there is a data error just include it in the second
script and make sure all the your form fields have something like 

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 3:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Passwords?


I have some field error checking going on ... and when a user (say) doesn't
fill in a field correctly, my error page comes up telling them.  They then
must click on their browsers  button and make the changes.

Now -- I have a password field, and when they click back, they are forced to
re-enter their password -- this is annoying.

My questions are:

1. Is there a way to make this stop happening?
2. Instead of the user clicking on their browsers  button, can I add a
URL that provides the same functionality -- that will work in IE and
Netscape?

Thanks
Jason




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

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




RE: [PHP] Constantly running?

2001-05-23 Thread Chadwick, Russell


If safe mode is off you can keep setting the max execution time in a while
loop and it would run forever.  It will also use 100% cpu unless you call
sleep.

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 7:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Constantly running?


Is there anyway to ALWAYS have a script running on the server without
needing a browser to access it?

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




RE: [PHP] Problem with session_is_registered

2001-06-21 Thread Chadwick, Russell


You have to do session_start (); in your check script before anything else.
- Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 7:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem with session_is_registered


I just check the var.

  if (isset($HTTP_SESSION_VARS['count']))
echo "
Yes its all set :)
";

--

  Chris Lee
  [EMAIL PROTECTED]


""news.php.net"" <[EMAIL PROTECTED]> wrote in message
9gss6k$kud$[EMAIL PROTECTED]">news:9gss6k$kud$[EMAIL PROTECTED]...
> hi everybody,
>
> maybe I get smth. wrong, but as far as I know the function
> "session_is_registered()"
> is used to find out if a var is registered in a session...
>
> ok, now here is my example:
>
> [ index.php ]
>  $count = "";
> session_start();
> session_register ("count");
> $count = "1";
> ?>
> .
> .
> .
> NEXT
>
>
>
> [ check.php ]
>  if (session_is_registered("count")) {
>  echo "yes, count is reg.";
> }
> else {
>  echo "no, count is not reg.";
> }
> ?>
> .
> .
> .
>
>
> now, check.php always writes "no, count is not reg.", but I don't really
> understand, why!
> do I have to run a -> session_register ("count"); <- before using
> "session_is_registered"?
> But if I do this, there is no need to check for the var with
> "session_is_registered"because
> I know the var is registered
>
> maybe someone can help me out or point me to a good tutorial about
> sessions
>
> thx in advance :)
> andi
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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

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




RE: [PHP] apache and php ate up all my memory :-[

2001-06-22 Thread Chadwick, Russell


Can you post the information at the header of top
like...
CPU states:  0.4% user,  0.0% nice,  3.6% system,  0.0% interrupt, 96.1%
idle
Mem: 47M Active, 147M Inact, 36M Wired, 11M Cache, 35M Buf, 7328K Free
Swap: 1024M Total, 144K Used, 1024M Free

and also the output of 
ps waux | grep mysql && ps waux | grep httpd

Thx

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Sebastian Stadtlich [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 6:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] apache and php ate up all my memory :-[


Hi all

Probably some Apache/mysql/php-Admin gurus can give me a hint :
i just moved a website to it's own server ( my first one).
now apache had eaten up all physical and virtual memory
some httpd had allocated 45MB of RAM, memory ran out myqsl crashed...

php is compiled in to apache 
Apache/1.3.19 (Unix) PHP/4.0.4pl1 
these are the relevant entries is my  httpd.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 20
MaxClients 150
MaxRequestsPerChild 500

in the php.ini

memory_limit = 8M 
( but i think that has nothing to do with it)

i can't find anything in the logfiles exept that some httpd were already
killed by itself, because
there was no memory left that they could eat
needless to say that my site does NOT get that much traffic that the
server was at the edge
of it's capacity.
HELP...

Sebastian 

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

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




RE: [PHP] SQL statement for clearing a table

2001-06-22 Thread Chadwick, Russell


No one has yet mentioned TRUNCATE TABLE x which is a lot faster on large
tables because even DELETE FROM evaluates each row where TRUNCATE just
clears the data.  - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Wilbert Enserink [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 5:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL statement for clearing a table


Hi all,

anybody knows the mysql statement for clearing the contents of a table and
lieving the table itself intact?

Wilbert

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-

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

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




RE: [PHP] MySQL Dump In PHP

2001-06-22 Thread Chadwick, Russell



 
mysqldump is a command to be used at a prompt, from php 
you could 
system 
("mysqldump whatever > /tmp/dump.sql");

---
Toolshed Computer Productions - Professional PHP Hosting
Hosting - Dedicated Servers - Design - Programming
http://www.toolshed51.com

  -Original Message-From: Chris Anderson 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, June 22, 2001 1:16 
  AMTo: [EMAIL PROTECTED]Subject: [PHP] MySQL Dump 
  In PHP
  I've been reading through the MySQL manual about 
  backing up my database using mysql dump. I tried passing it as a Query in PHP 
  but that doesn't seem to work. Does anyone know how to do this? Also does the 
  dump back up the files into a directory I specify? I am on a virtual host and 
  need to create the files in my own directories. Any help would be 
  appreciated


RE: [PHP] Strange error on mysql_fetch_array

2001-06-27 Thread Chadwick, Russell


>From experience with oracle, desc only works in an sql prompt, not through
code.  So use the more lengthy method

in mysql:
SHOW FIELDS FROM $table_name

in oracle:
SELECT c.column_name, c.data_type, c.data_length, c.data_precision,
c.data_scale, c.nullable FROM sys.dba_tab_columns c WHERE c.owner = '$owner'
AND c.table_name = '$table_name' 

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 2:01 PM
To: PHP General
Subject: [PHP] Strange error on mysql_fetch_array


The following code fragment works properly, in that I get the output I'm
expecting. However, if I don't disable error messages with @, I get an
error message from PHP saying: "Warning: Supplied argument is not a valid
MySQL result resource in /var/www/htdocs/cgcm/test2.php on line 9."

How can the resource be invalid if I'm getting the results back? I'd
appreciate any explaination.

$connection_id = @mysql_connect ('localhost', 'root') or die('No
connection.');
$database_id   = @mysql_select_db ('cgcms', $connection_id) or die('No
connection.');

...

$result_id = @mysql_query("DESC $table_name $field_name");
$row = mysql_fetch_array($result_id);   # This is line 9

-- 
Todd A. Jacobs
CodeGnome Consulting, LTD



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

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




RE: [PHP] PHP 4.0.6 and APXS2

2001-06-27 Thread Chadwick, Russell


Hello, I believe include problem is a small typo... the include path needs
to be
./:/usr/local/lib/php

There is a php function to change the working directory, I'm not remembering
it off the top of my head, but you can do either:
exec("cd $path && ls -d */*.jpg",$ls);
or:
exec("ls -d $path/*/*.jpg",$ls);

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Gonyou, Austin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 12:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP 4.0.6 and APXS2


After getting apache 2 + 4.0.6 built and installed, I can finally use PHP
and all is well..except...
When accessing a script which uses an exec() statment like the following:

snip-
exec("ls -d */*.jpg",$ls);
snip-

When the LS is performed, it is not performed in the directory where the PHP
resides, but rather in /tmp. What's going on here. Also, I have the
following errors:

-snip-
Warning: Failed opening 'header.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 3
Warning: Failed opening 'footer.inc.php' for inclusion
(include_path='.:/usr/local/lib/php') in /tmp/really_silly on line 26
-snip-

The includes are relative to the path that the PHP script is in. It should
just work, but instead it does what you see above. I didn't see this
behaviour with Apache 1.3.x but it could be my Output/Input Filter
definitions too. Any feedback is appreciated.

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 

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

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




RE: [PHP] PHP code secrity on VirtualHost

2001-06-28 Thread Chadwick, Russell
Title: PHP code secrity on VirtualHost



 
I ran 
into the problem of certain code needing to suexec or do priveledged things that 
you dont want other domains to be able to do and I ended up writting my own 
apache module in C for lack of any other way.  If you come up with another 
solution I'd be very interested to hear about it.  - 
Russ

---
Toolshed Computer Productions - Professional PHP Hosting
Hosting - Dedicated Servers - Design - Programming
http://www.toolshed51.com

  -Original Message-From: Aaron Bennett 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 27, 2001 
  3:45 AMTo: '[EMAIL PROTECTED]'Subject: [PHP] PHP 
  code secrity on VirtualHost
  Hi everyone,    Does anyone 
  know the best way to php secure source code for a virtualhost account so it is 
  not group/world readable? I've been looking for a way to get PHP to play with 
  suexec NOT in cgi mode, but nothing has popped up yet.. Anyone have any ideas 
  short of running outside a virtualhost? 
  Thanks in advance! -- Aaron Bennett 


RE: [PHP] Pricing Advice Needed

2001-06-29 Thread Chadwick, Russell


I believe its 

how_many_times_client_changes_mind * (man_hours * 2) * rate =
what_your_time_is_worth

provided that 

(how_many_times_client_changes_mind * (man_hours * 2)) + other_projects_time
< 18hr/day of programming

Think of the project overall and make sure to sit down with the client and
make a detailed list of features and stuff.  Make sure to significantly
increase the man_hours over a real figure, as every other quote he gets
would include the same, better to have program done early and happy customer
than late program and sad customer.  Rate should be an average based on what
is your minimum and what_your_time_is_worth.  So for instance, on a project
you could decide to charge 20$ an hour... but doing the project is worth 3
months of colo fees and a new Alienware dual Athlon :)  So you get out a
calculator and do the magic.  With any project, make sure you know your
client too... what most important to him: Functionality, Form, Lines of
Code, or Cost?  Then you can program to his needs, cause cost usually isn't
the main feature.

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Alva Chew [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 11:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Pricing Advice Needed


Hi everyone,

Just don't really know where to post this, so here goes:

I am working as a freelance programmer. Problem is I don't really have a
clue how the pricing mechanism in the industry works. I have heard
calculations based on man hours and lines of code, so perhaps anyone one can
tell me on the average, how much should I be charging per man hour, or per
line of code?

Sincere thanks and regards,
Alva Chew, Singapore



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

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




RE: [PHP] PHP & ImageMagick

2001-06-30 Thread Chadwick, Russell


Did you try the escapeshellcmd () function ?  - Russ

---
Toolshed Computer Productions - Professional PHP Hosting
 Hosting - Dedicated Servers - Design - Programming
 http://www.toolshed51.com

-Original Message-
From: Jeffrey Barendse [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 8:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP & ImageMagick


In PHP I try to run a shell command with the following source code:

$fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill
white -draw "text 5,5 VERKOCHT" image.jpg image2.jpg';
exec($fotonaam);

PHP runs the program but the -draw "text 5,5 VERKOCHT" is not executed
(there is no VERKOCHT in the image2.jpg). I tried everything but I can't
solve the problem. Could somebody explain to me how it's possible that the
program (convert) runs but there (seams to be) a problem with -draw "text
5,5 VERKOCHT". If I run the same command troughs telnet/ssh as root or
nobody it works fine

Is it something with the " and the combinative with the exec function (I
also tried \")?

Or is it because I run PHP in safe mode and the convert program tries to run
a external program what is not in the . path (you now, the basic safe mode
restriction)?

Please help me.. I'm getting despaired on this in. ;-)

Regards,

Jeffrey Barendse




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

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




RE: [PHP] ENC: ADD a user in linux using PHP

2001-06-30 Thread Chadwick, Russell

 
http://expect.nist.gov/  
 
---

Toolshed Computer Productions - Professional PHP Hosting

Hosting - Dedicated Servers - Design - Programming

http://www.toolshed51.com  

-Original Message-
From: Bruno Freire [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 9:24 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] ENC: ADD a user in linux using PHP





BM__MailData-Mensagem original- 
De: Bruno Freire 
Enviada em: quinta-feira, 28 de junho de 2001 11:31 
Para:   '[EMAIL PROTECTED]' 
Cc: '[EMAIL PROTECTED]' 
Assunto:ADD a user in linux using PHP 

Hi! I'm Bruno, from brazil 

Somebody knows how to create a new user in LINUX (not http server) using
PHP? 

Something like useradd and passwd 

Thanks, 

Bruno. 




RE: [PHP] Bandwidth?

2001-07-05 Thread Chadwick, Russell


Most colocations charge by sustained bandwidth throughout the month, not in
transfers per month so it may be difficult to get a comparison.  I am paying
485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which
comes out to ummm a lot.  The colocation is at a Level3 facility with dual
OC-192s among other connections.  I think you should renegotiate your deal
with your current ISP or find somone else.  - Russ

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:12 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Bandwidth?


I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.com/


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

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




RE: [PHP] Bandwidth?

2001-07-05 Thread Chadwick, Russell


The little b, bits, so ~45KB

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:26 AM
To: 'Chadwick, Russell'
Subject: RE: [PHP] Bandwidth?


Is that 350 KB/sec or 350 kbps?

Ryan Shrout

-Original Message-----
From: Chadwick, Russell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 1:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Bandwidth?



Most colocations charge by sustained bandwidth throughout the month, not in
transfers per month so it may be difficult to get a comparison.  I am paying
485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which
comes out to ummm a lot.  The colocation is at a Level3 facility with dual
OC-192s among other connections.  I think you should renegotiate your deal
with your current ISP or find somone else.  - Russ

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:12 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Bandwidth?


I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.com/


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

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

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




RE: [PHP] PHP/mySQL Query

2001-07-05 Thread Chadwick, Russell


SELECT t.ownerID, t.last_update, o.teamname 
FROM teampages t, owners o 
WHERE t.ownerID = o.ownerID
ORDER BY t.last_update DESC LIMIT 10

-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/mySQL Query


I fought the urge to post this here but have to :(

I have two tables named like this:

owners
-ownerID
-teamname
-more fields

teampages
-ownerID
-bio

Anyway, I'm doing a select on the database like this: select ownerID,
last_update FROM teampages ORDER BY last_update DESC LIMIT 10

The thing is, I want to get the team name from the other table as well.  Can
anyone help me out?

Jeff

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




RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell


What happens when the code is


- Original Message -
From: "James Bartlett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 1:15 PM
Subject: [PHP] Problem writting to file...


Hi,

I'm trying to write data to a file but for some reason it will not store
numbers in the file...Here's the code I'm using...(as an example)



Thanks for any help...

James



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

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




RE: [PHP] Problem writting to file...

2001-07-06 Thread Chadwick, Russell


Oooo, then make it 
fwrite($fp, "$counter\n");

-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem writting to file...


When I use that code I get the following...

Counter is = 0
Counter is = 1
Counter is = 2
Counter is = 3
Counter is = 4
Counter is = 5

However if you remove the "Counter is =" part then once again no numbers are
written, only the 'new line' symbols...
  - Original Message ----- 
  From: Chadwick, Russell 
  To: '[EMAIL PROTECTED]' 
  Sent: Friday, July 06, 2001 7:43 PM
  Subject: RE: [PHP] Problem writting to file...



  What happens when the code is
  

  - Original Message -
  From: "James Bartlett" <[EMAIL PROTECTED]>
  To: <[EMAIL PROTECTED]>
  Sent: Friday, July 06, 2001 1:15 PM
  Subject: [PHP] Problem writting to file...


  Hi,

  I'm trying to write data to a file but for some reason it will not store
  numbers in the file...Here's the code I'm using...(as an example)

  

  Thanks for any help...

  James



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

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


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




RE: [PHP] How to apply something to every variable

2001-07-06 Thread Chadwick, Russell


while (list($key, $val) = each ($HTTP_POST_VARS)) {
${$key} = addslashes($val);
}

- Russ

-Original Message-
From: Chris Anderson [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 3:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to apply something to every variable


I was playing around trying to find a way to addslashes() to all my
variables, and I came up with this snippet. Hope it helps someone

 $keys = array_keys($HTTP_POST_VARS);
 $post_size = sizeof($keys);
 for($x = 0; $x < $post_size; $x++)
 {
  $temp = $keys[$x];
//you can replace addslashes with whatever you want to use
  ${"$temp"} = addslashes($HTTP_POST_VARS["$temp"]);
 }

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




RE: [PHP] Code Examples for Job Interview

2001-07-09 Thread Chadwick, Russell


For the most part, anything that is reusable and modular they like.  They
also love people who know a buncha languages and would use the best one that
fit the current project so bring a variety.

-Original Message-
From: JCampbell [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 3:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Code Examples for Job Interview


Hey Everyone.

This isn't a request for code or help, just thoughts and ideas.

I've recently been asked to bring along some code examples for a job
interview I will be heading to this week. This was the exact request "The
sample does not have to be within any particular language, but something
that is a substantive representation of your style and logic. "

I'm not sure what to take. Most of my PHP and other projects are lengthy and
involved. I'm not sure if it would be better to print out functions I've
created that perform tasks, or just find something that did wonderfully
challenging things and print that out. Anyone have thoughts on this?



=-
Jonathan Campbell ( [EMAIL PROTECTED] )

Mid days haze and I'm still not awake
I got everything going but my bills are still late
Funnier than hell and I think it's a blast
Life's like a laugh when you got no money

Lyrics from "Average Day" by Aztek Trip ( http://www.aztektrip.com )


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

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




RE: [PHP] Re: Running PHP as a cron job....

2001-07-09 Thread Chadwick, Russell


You can still run php... I put my cron scripts in a directory on the web
server, just makes sure they are all safe to run multiple times in case
someone finds it

then make a script that for each entry in that directory invokes the script.
mines in python so you just 
import urllib

and then for each file in the directory
urllib.urlopen ('/cron/.php')

and make it run your python script nightly and it will run any php script
you put in that directory.

-Original Message-
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 3:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Running PHP as a cron job


Thanks for all of your help on this.  My host admin have informed me that
php is installed only for the web, and not as a cgi, so that's what was
going wrong (it wasn't down to my own naievity afterall.)

So, it's time to learn perl (or bash).

Thanks again for all your comments and help.

James.



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

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




RE: [PHP] Re: how to hide dbconnect file if its in published directory?

2001-07-09 Thread Chadwick, Russell


Have the script dump the envoirnment vars to a file and compare the
variables from a user vs include because some of those variables apache gets
from a browser, off the top of my head REMOTE_ADDR should work, that wont be
set when you include.  So just die() if its set.  - Russ

-Original Message-
From: James, Yz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: how to hide dbconnect file if its in published
directory?


Hi Noah,

if you make the include file a .php file, then the browser will parse the
code as a blank page whether or not they choose to look at the file, or
try to fopen(etc) it.  Problem solved ;)  At least I think that's
safe-ish...

James.

"Noah Spitzer-Williams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey guys,
>
> I come for advice once again. Say i have a file dbconnect.inc which
> connects to my database. Now if this file is located in a directory
> accessible for to the web is there anyway that if someone types in that
file
> i can detect it being accessed, instead of included, and redirect them
> elsewhere?
>
> Thanks guys!
>
> - Noah
>
>



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

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




RE: [PHP] include a perl script

2001-07-09 Thread Chadwick, Russell


if you just want to run the script
system("/path/to/whatever");
if you want its output 
fopen ("/cgi-bin/whatever.cgi");

if you want the perl script to set variables or anything you'll have to
write something that reads the output from fopen and assigns them.  Or if
you trust this server (dont do this over the internet) you can make the cgi
output php code to set arrays and variables and such and then just eval ()
everything.  - Russ

-Original Message-
From: Ajuco [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 4:33 PM
To: [EMAIL PROTECTED]
Subject: [PHP] include a perl script


hi!

Is there a way to 'include' a perl script in a php page??
example..
I have a php page that executes another php script (poll).. to make that I
used the  command.. Is there a command or something that
makes that php page execute a perl script (.cgi) ??

thanks!



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

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




RE: [PHP] Expert advice needed

2001-07-09 Thread Chadwick, Russell


To prevent locking issues and general db clogging.  Any table that stores
votes or hits or anything that may do several transactions / second...
INSERT the data into a temporary table, and then put in a cron job which
will UPDATE your actual table with a count of whats in your temp table.

So for instance.
hit.php should execute
INSERT INTO hits_temp VALUES ('/index.html');
or better yet an index of the page, make sure to have a table that explains
what page #1 is
INSERT INTO hits_temp VALUES (1);

then make a cron job which does
$hits = SELECT count(hits) FROM hits_temp WHERE page = 1;
UPDATE hits SET hit_count = hit_count + $hits WHERE page = 1;

This became life of death for our Sun 250 when it tried sustaining 6-8
updates / second on a bit more complicated table.  Oracle just seized up,
150 processes got in waiting behind it and then denied connections until it
was restarted.  - Russ

-Original Message-
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 5:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Expert advice needed


Hi,

I'm doing a polling side and I'm wandering what way I should save the
result, should I save each record in MySQL or should I save only the
total value in a text file each time I get vote? So, can anyone of you
experts advice me what way I should go? The traffic is only 100-500 hits
per day.

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is
--


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

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




RE: [PHP] encrypting session variables

2001-07-09 Thread Chadwick, Russell


$session_id + 1 before passing it, and then 
$session_id - 1 before using it on the next screen

... thats the security through obscurity way :)

you could put the session_id in a mysql db and then select
password(session_id)
that would return something really obscure
and then select session_id where password(session_id) = 'd3a8f932b10';

-Original Message-
From: Brad Wright [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 6:08 PM
To: PHP General List
Subject: [PHP] encrypting session variables


Hi all,
Is there a simple way to encrypt session variables. If so, is there a method
to 'decode' the encrypted session variable when required?.



Thanks in advance,
Brad


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

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




RE: [PHP] Q: Best EZ & Free Mailing List Manager?

2001-07-10 Thread Chadwick, Russell


qmail with ezmlm, and ezmlm-idx which provides some more advanced features.
- Russ
http://cr.yp.to/ezmlm.html

-Original Message-
From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 9:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Q: Best EZ & Free Mailing List Manager?


Hello,

I need to add a Subscribable and Unsubscribable Email mailing list to a
site.  I'm just not in my usual break out the books and learn 1000 new
things vibe this month.

So...

What do you superpowered pro's recommend as the best, easiest and free

Email Mailing list manager, app, or cut and paste etc.?

Thanks,
Marcus

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



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

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




RE: [PHP] Oracle question

2001-07-10 Thread Chadwick, Russell


Create a sequence, like so
CREATE SEQUENCE "WHATEVER_IDS" 
INCREMENT BY 1 
START WITH 1 
MAXVALUE 1.0E28 
MINVALUE 1 
NOCYCLE 
CACHE 20 
NOORDER;

then when you insert
INSERT INTO test (whatever_ids.nextval);

the nice thing is that in your next query you can just do
whatever_ids.curval 
instead of looking up the value with mysql_auto_id or whatever the function
is. 

-Original Message-
From: Duy B [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 7:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Oracle question


Dear all,
If i want to use id field in Oracle database, how can i do?
For example, in MySQL
create table test (
id int not null auto-increment primary key,
ten char(10));

So that, when i insert a new row into MySQL database, id increases by 1.

But in Oracle i couldn't use as that.
Somebody could help me.
Thanks you all,
BaoDuy




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




RE: [PHP] flat file db

2001-07-10 Thread Chadwick, Russell


put in somewhere outside the document root, as long as your apache isn't
"jailed" php can read your flat file wherever you put it, as long as its
owned by the webserver user - Russ

-Original Message-
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] flat file db


i am setting up a flat file database.  i want to restrict acess so that
users cant view it intentionally or accidentally.  i am pretty positive this
is a job for htaccess but i am pretty clueless in this area(one of many
areas i am clueless in)  anyone got a suggestion on a tutorial or another
way to protect the db other than htaccess?









Thank You,
 
Jon Yaggie
www.design-monster.com
 
And they were singing . . . 
 
'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code
 
101 little bugs in the code . . .'
 
And it continued until they reached 0



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




RE: [PHP] stripping white space?

2001-07-10 Thread Chadwick, Russell


there is a limit of # of root entries. But the number of files per directory
is much higher.  Running RH6.2 I tried this test: I have an SGI xfs
partition that does billion of entries per directory, like reiser, but for
an ext2 partition this perl script is for testing

for ($index = 1; $index <= 2097153; $index++) {
open (OUT, "> file_$index.txt");
print OUT "Test\n";
close (OUT);
}

after letting it run 4 hours :)  it seems to stop at 811626 where I run out
of disk space :)
oh well 

-Original Message-
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 9:52 AM
To: Maxim Maletsky; 'Bart Veldhuizen'; [EMAIL PROTECTED]
Subject: Re: [PHP] stripping white space?


On Tuesday 10 July 2001 11:26, Maxim Maletsky wrote:

> But you're right, on UNIX systems, if I am not wrong, you cannot hold
> more then 1024 (?) files in a single directory.

AFAIK there's no limit (and certainly not 1024 files), but with most 
filesystems accesses on large directories are painfully slow. FSs such as 
ReiserFS however don't slow down noticeably on large directories...

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

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times

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

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




RE: [PHP] how to find out the mysql version from php?

2001-07-10 Thread Chadwick, Russell


SELECT version() AS version

-Original Message-
From: Jakob [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how to find out the mysql version from php?



several people seem the have the "case sensitivity problem"
regarding different mysql versions - see this extract from
the mysql manual:

"
Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous
query 
will return no rows. To match either lowercase or uppercase `b', use this
query 
instead: 

mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]";

>From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use

the BINARY keyword to make one of the strings a binary string. This query
will 
match only lowercase `b' at the beginning of a name: 

mysql> SELECT * FROM pet WHERE name REGEXP BINARY "^b";
"

is there a way to find out _programmatically_ which version of mysql is
running 
(phpinfo() gives some information, but i don't know how this can be
accessed) 
on the server.

thanks in advance,
Jakob.

PS: please cc me, i am on the very long digest list.

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

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




RE: [PHP] File Download IE behavior

2001-07-11 Thread Chadwick, Russell


If you want it to automatically be saved to disk, send the
header("Content-type: octet/stream");

If there is a problem with the open I would think its on the client side
since theres nothing mor the server can do but specify a content type.

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 7:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] File Download IE behavior



When generating a download file from PHP to IE (Netscape is not used by my
client base) the browser prompts with an option to download the file or open
the file where it is.  Opening the file fails and I am forced to download
the file to my local drive before receiving another prompt to open the file
where the second Open works just fine.

Is there a way to allow this first open to work, or cause the open option on
the first download window to be removed?

Warren Vail


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

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




RE: [PHP] counter using PHP or Javascript?

2001-07-11 Thread Chadwick, Russell


http://www.devshed.com/ClipScripts/results/l_2/c_6/

-Original Message-
From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 9:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] counter using PHP or Javascript?


Hi,

   Is there a way to create a counter to count the number of accesses for a
apecific page using PHP or Javascript?

Thanks.

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

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




RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Chadwick, Russell


Try a newline at the end of $headers

-Original Message-
From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mail Bcc to a $variable?


Hello,

Ok I've got a script going to  a Bcc but can't seem to get it to work
when it's like this?

\nBCC:$recipients";

include("password.inc");
if($mailusername == $username && $mailpassword == $password);
{
mail($to, $subject, $bodytext, $headers);
};

?>


So how do I get mail to Bcc a variable like $recipients?   Recipients
being a huge text file of hundreds of email addy's.

-Marcus

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



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

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




RE: [PHP] Function call from a hyperlink

2001-07-11 Thread Chadwick, Russell


another way is to do eval () on $function but that kinda stuff is really bad
for security.  Also bad to get carried away with making one file that passes
tons of different function names so your whole website's in one file :)
There should be some criminal punishment for doing that.

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:16 AM
To: 'Geer'; [EMAIL PROTECTED]
Subject: RE: [PHP] Function call from a hyperlink


Why not just pass a variable: 

and then in the PHP file do:

if ($function) {
function();
}

Ryan Shrout
Amdmb.com

-Original Message-
From: Geer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Function call from a hyperlink


Hi,

Does someone know how I can call a function in a PHP script using a
hyperlink with
text

The function is in the same PHP script as the link.


Many thanks,

Geer



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

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

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




RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell


I think you want
if (!(${"C_Last_Name$y"})) {

or 
if (!(${"C_Last_Name".$y})) {

-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:22 AM
To: PHP
Subject: RE: [PHP] Variable Next To Variable?


I like this idea but it's giving me a parse error on this code:

if (!{$C_Last_Name}{$y}) 

I'm looking at the other ideas also.

Jeff Oien

> > if (!$C_Last_Name$y) {
> > The form submitting information to this code has field name like
> > C_Last_Name1 C_Last_Name2 depending on how many Children
> > are signing up for something. So I need $y to represent the number.
> 
> You want this:
> 
> if (!{$C_Last_Name}{$y}) {
> 
> The {} surrounding the variable name tells PHP that those are
> unique entities/variables.  For example, you could use the following:
> 
> echo "Hello, {$userInfo->printFirstName()}";
> 
> to interpolate a class' method call within a string...
> 
> Chris
> 

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

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




RE: [PHP] Duplication Results When LEFT JOIN is Used Between MultipleTables

2001-07-11 Thread Chadwick, Russell


Sounds like you want a GROUP BY bibID, then you'll have to put group by
functions on all the items you are selecting.

-Original Message-
From: Mike Gifford [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:00 AM
To: Kamil Choma
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Duplication Results When LEFT JOIN is Used Between
MultipleTables


I added DISTINCT to the code (as per below):

Kamil Choma wrote:

> Mike Gifford wrote:
>>However, when I run this query:
>>mysql_query("SELECT DISTINCT
>> WLPbib.bibID,
>>  WLPbib.title,
>>  WLPbib.publisher,
>>  WLPbib.publicationDate,
>>  WLPaddress.city,
>>  WLPaddress.state,
>>  WLPprofile.firstName,
>>  WLPprofile.lastName,
>>  WLPprofile.organization,
>>  WLPcountry.languageName
>>  FROM   WLPbib
>>  LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID
>>  LEFT JOIN WLPaddress ON WLPaddress.publisherID =
WLPbib.publisherID
>>  LEFT JOIN WLPcountry ON WLPcountry.countryID =
WLPaddress.countryID");
>>
>>I now get results in triplicate.  ie. I'm getting three copies of the same
>>title, firstName, organization, etc

> Maybe SLECT DISTINCT ... could help you.

However not everything needs to be distinct.  Just the bibID number
actually.

The results this produces though are no different than without it.

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
It is a miracle that curiosity survives formal education. - A Einstein


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

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




RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Chadwick, Russell


you should make the form names
C_Last_Name1, C_Last_Name2, C_Last_Name3

and then have a hidden variable saying the maximum, then make a small
routine on the receiving page which loops 1 to the max and uses array_push
to make an array of children names.  Check for empty() so that way is
someone fills out 8 for the max, and then only ends up filling in
C_Last_Name1, C_Last_Name4, C_Last_Name7 you wont have to worry about it.

-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:29 AM
To: PHP
Subject: FW: [PHP] Variable Next To Variable?


What I'm doing is having a form page ask, "How many
children do you want to sign up?" Then it spits out form
fields for as many children as they asked for. So each
field has name="C_Last_Name$x" and $x in incremented
for each child. Should I make it name="C_Last_Name[$x]" ?
Jeff Oien

> you should change the form field names to 
> $Children_Last[1], $Children_Last[2]
> instead of hardcoding $Children_Last1
> to make iteration thru the form easier
> and handling of the data easier...
> 
> you can handle it all like this:
> 
> $Number_Children = 5;
> $i = $Number_Children;
>   while ($i--) {
>   if (! $Children_Last[$i]) {
>   // code
>   }
>   }
> 
> > -Original Message-
> > From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Variable Next To Variable?
> > 
> > 
> > Sorry if this has been brought up 100 times.
> > I want to do this:
> > 
> > $y = "1";
> > 
> > while ($y <= "$Number_Children") {
> > if (!$C_Last_Name$y) {
> > error stuff;
> > $y++;
> > }
> > }
> > 
> > The form submitting information to this code has field name like
> > C_Last_Name1 C_Last_Name2 depending on how many Children
> > are signing up for something. So I need $y to represent the number.
> > 
> > Hope that makes sense. Thanks for any help.
> > Jeff Oien
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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

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




RE: [PHP] Mail Bcc to a $variable?

2001-07-11 Thread Chadwick, Russell


Yeah, and it might even be picky about the spacing BCC: $recipients\n

whenever I've had a mail problem, its solved by viewing the headers.  See if
your BCC is making it into the headers and then make sure its spaced like
the other fields or the mail server/client may not be using the field.

>From php.net 
"Please also note that the cc: and bcc: headers are case sensitve and should
be written as Cc: and Bcc: on Win32 systems"

-Original Message-
From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail Bcc to a $variable?


Like  this...

$headers = "From: Me <[EMAIL PROTECTED]>\nBCC:$recipients\n";

Or somewhere else?

Thanks,
Marcus

Russell Chadwick wrote:

> Try a newline at the end of $headers
>
> -Original Message-
> From: Marcus James Christian [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 10:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Mail Bcc to a $variable?
>
> Hello,
>
> Ok I've got a script going to  a Bcc but can't seem to get it to work
> when it's like this?
>
>  include("mailinglist.inc");
> $recipients = "mailinglist.inc";
> $headers = "From: Me <[EMAIL PROTECTED]>\nBCC:$recipients";
>
> include("password.inc");
> if($mailusername == $username && $mailpassword == $password);
> {
> mail($to, $subject, $bodytext, $headers);
> };
>
> ?>
>
> So how do I get mail to Bcc a variable like $recipients?   Recipients
> being a huge text file of hundreds of email addy's.
>
> -Marcus
>
> --
> Marcus James Christian - UNLIMITED -
> Multimedia Internet Design
> http://mjchristianunlimited.com
>
> Proudly presents the music of CHROMATICUS
> at http://chromaticus.com
> and http://artists.mp3s.com/artists/275/chromaticus.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



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

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




RE: [PHP] Averaging columns in two tables?

2001-07-11 Thread Chadwick, Russell


SELECT round((hitters.age+pitchers.age) / 2) as avg_age
...

-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Averaging columns in two tables?


Is it possible to get the average of two tables.  I have an age column in
two tables.  I can get the age average for one table both can the average of
both tables be found in one statement?   One table is for hitters, the other
for pitchers.

Jeff

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




RE: [PHP] Strong typing?

2001-07-12 Thread Chadwick, Russell


http://www.php.net/manual/en/function.settype.php

is this what you are looking for?

-Original Message-
From: Dr. Evil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 12, 2001 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strong typing?



PHP is a great language.  It makes it fast and easy to create web
pages.  However, one feature which is critical for doing rock-solid
stable websites is strong typing.  The reason for this is that you're
dealing with untrusted user input.  Strong typing helps because if you
are expecting an INT, and the user gave you something else, and you
made a mistake in your input checking, the program will fail when you
attempt to assign the value to the strongly-type INT variable.  This
is a good thing when you are dealing with money, or other contexts
where you need very solid code.

First, is there a plan to introduce a strong typing option, like
perl's strict mode?

Second, is there a way to get something equivalent to strong typing
using the class system?

Thanks

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

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