Re: [PHP] File upload problem

2002-05-07 Thread Miguel Cruz

On Tue, 7 May 2002, Jason Wong wrote:
>>> 
>>
>> You actually _need_ that hidden tag set AFAIK.
> 
> I'm curious, I keep seeing people say that that tag is /necessary/, but I've 
> never had to use it in the upload forms that I've built and they work just 
> fine in Opera, NN & IE. 

Don't feel bad - I never use it either and I'm still breathing.

miguel


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




Re: [PHP] File upload problem

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 15:22, Miguel Cruz wrote:
> On Tue, 7 May 2002, Jason Wong wrote:
> >>> 
> >>
> >> You actually _need_ that hidden tag set AFAIK.
> >
> > I'm curious, I keep seeing people say that that tag is /necessary/, but
> > I've never had to use it in the upload forms that I've built and they
> > work just fine in Opera, NN & IE.
>
> Don't feel bad - I never use it either and I'm still breathing.

A lot of people have reported on the list that their uploads didn't work 
until they added that tag. If any of these people are reading this could you 
confirm that that tag is really necessary? And what version of 
browser/webserver/php are you using?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The future isn't what it used to be.  (It never was.)
*/

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




[PHP] gd high resolution

2002-05-07 Thread Plamen Slavov

Hi guys,
Does anyone have any idea about how can i sav images, using gd functions, with a 
resolution greater than 72 dpi ?
Thanks




Re: [PHP] File upload problem

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 14:14, David Freeman wrote:

> I guess that anything that causes this sort of thing to happen on the
> browser is going to help.  I know I'd be fairly unimpressed if I sat
> waiting for a 2MB file to upload only to find that the limit is 1.5MB or
> some such.  At least if a client-side limit is given the browser can do
> something about it.
>
> Not that I actually recall testing that either - I've so far only used
> file upload capabilities on intranet projects where I have fully
> switched 100MB and the like.

Hmm, after a bit of testing I find that the MAX_FILE_SIZE tag is useless to 
say the least (probably because no browsers support it?)

In all of NN, Opera, IE having the tag does /not/ prevent the file from being 
uploaded. Thus if I set MAX_FILE_SIZE to 10 (100K) and upload a 5MB file 
what happens is:

1) you still have to wait for the whole 5MB to be uploaded
2) php sees the MAX_FILE_SIZE setting is exceeded then discards the file

If anyone wants to run their own tests here's my test script:

==

  

  
  

  Gimme a file
  

  
  


  

==

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You just wait, I'll sin till I blow up!
-- Dylan Thomas
*/

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




[PHP] Self Destruct code

2002-05-07 Thread PHPCoder

Hi
I have a funny request; I wrote a system for a client and am rather 
concerned that I am not going to receive payment for the work done. They 
want me to hand over the code before they are willing to pay, so 
basically I will be left at their mercy; if they don't pay, they will 
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that 
are time related etc. Something that will bomb the mysql tables or break 
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools 
etc, so I'm open for suggestions.
PS, I know about Zend's encrypter, but since it will live on their 
server, I don't think it will help much since they will need the 
decrypter on there anyway right?

Thanks


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




Re: [PHP] Self Destruct code

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 16:19, PHPCoder wrote:
> Hi
> I have a funny request; I wrote a system for a client and am rather
> concerned that I am not going to receive payment for the work done. They
> want me to hand over the code before they are willing to pay, so
> basically I will be left at their mercy; if they don't pay, they will
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that
> are time related etc. Something that will bomb the mysql tables or break
> some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools
> etc, so I'm open for suggestions.
> PS, I know about Zend's encrypter, but since it will live on their
> server, I don't think it will help much since they will need the
> decrypter on there anyway right?

Presumably they've seen your code working on your server and it does what 
they expect of it? You could say to them, hand over the money or else (only 
joking), or hand over half the money, transfer the code, if there's no 
problem running on their server, give you the rest of the money.

This should be solved through legal means rather than technical.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
A beautiful woman is a picture which drives all beholders nobly mad.
-- Emerson
*/

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




RE: [PHP] Self Destruct code

2002-05-07 Thread Tommy Claasens - Q Data KZN

Hi, 
Depends on what type of server they are running, 
You could add a script in there that takes a query string that will invoke a
set of 
drop table statments, 
followed by some file delete's 
But as I have never seen the need to do this, I dont have any code that can
help you 

But I am sure you will be able to just add a switch in the index page, that
takes something like this 

if (isset($op) && $op == "deletesite")
{
 // Drop sql tables
 $conn = mysql_connect("host","user","pass");
 $sql = "DROP TABLE tableName";
 $rs = mysql_query($sql, $conn);
 for each $file in $files
 {
   // some delete code 
 }  
}

But yet again I would rather do this via legal means than destroy code.

my $0.02 worth 

Thanks
Tommy 


-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Tue, 07 May 2002 10:20
To: php-general
Subject: [PHP] Self Destruct code


Hi
I have a funny request; I wrote a system for a client and am rather 
concerned that I am not going to receive payment for the work done. They 
want me to hand over the code before they are willing to pay, so 
basically I will be left at their mercy; if they don't pay, they will 
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that 
are time related etc. Something that will bomb the mysql tables or break 
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools 
etc, so I'm open for suggestions.
PS, I know about Zend's encrypter, but since it will live on their 
server, I don't think it will help much since they will need the 
decrypter on there anyway right?

Thanks


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

2002-05-07 Thread Ferry van Steen

Hey there,

I just came across a really busy site due to the murder on Pim Fortuyn in
the Netherlands.
Anyways, this site gives a really nice error message. I put it below. Is
this a PHP function/mode/config option or where these things written by the
people who maintain PHP on that site?

It looks like this:

Warning: Access denied for user: 'icon@localhost' (Using password: YES) in
/home/sites/www.icondolement.nl/web/com/icon2/include/mysql.inc.php on line
8
Connection Error 

MySQL Error : Connection Error
Error Number: 1045 Access denied for user: 'icon@localhost' (Using password:
YES)
Date: Tue, May 7, 2002 10:35:52
IP  : 80.60.70.114
Browser : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Referer : http://www.icondolement.nl/com/icon2/guestbook


More or less... This client doesn't render it exactly the same as IE...

The source:



Icondolement




http://www.icondolement.nl/com/icon2/";>



Warning:  Access denied for user: 'icon@localhost' (Using password:
YES) in
/home/sites/www.icondolement.nl/web/com/icon2/include/mysql.inc.php
on line 8
Connection ErrorMySQL Error :
Connection Error
Error Number: 1045 Access denied for user: 'icon@localhost' (Using password:
YES)
Date: Tue, May 7, 2002 10:35:52
IP  : 80.60.70.114
Browser : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Referer : http://www.icondolement.nl/com/icon2/guestbook.php


Regards


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




Re: [PHP] Self Destruct code

2002-05-07 Thread Marius Ursache

or.. you can use an airplaine full with gas :))

Tommy Claasens - Q Data KZN a écrit :

> Hi,
> Depends on what type of server they are running,
> You could add a script in there that takes a query string that will invoke a
> set of
> drop table statments,
> followed by some file delete's
> But as I have never seen the need to do this, I dont have any code that can
> help you
>
> But I am sure you will be able to just add a switch in the index page, that
> takes something like this
>
> if (isset($op) && $op == "deletesite")
> {
>  // Drop sql tables
>  $conn = mysql_connect("host","user","pass");
>  $sql = "DROP TABLE tableName";
>  $rs = mysql_query($sql, $conn);
>  for each $file in $files
>  {
>// some delete code
>  }
> }
>
> But yet again I would rather do this via legal means than destroy code.
>
> my $0.02 worth
>
> Thanks
> Tommy
>
> -Original Message-
> From: PHPCoder [mailto:[EMAIL PROTECTED]]
> Sent: Tue, 07 May 2002 10:20
> To: php-general
> Subject: [PHP] Self Destruct code
>
> Hi
> I have a funny request; I wrote a system for a client and am rather
> concerned that I am not going to receive payment for the work done. They
> want me to hand over the code before they are willing to pay, so
> basically I will be left at their mercy; if they don't pay, they will
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that
> are time related etc. Something that will bomb the mysql tables or break
> some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools
> etc, so I'm open for suggestions.
> PS, I know about Zend's encrypter, but since it will live on their
> server, I don't think it will help much since they will need the
> decrypter on there anyway right?
>
> Thanks
>
> --
> 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

--
  Marius Ursache (3563 || 3494)

   \|/  \|/
   "@'/ ,. \`@"
   /_| \__/ |_\
  \__U_/



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




RE: [PHP] Self Destruct code

2002-05-07 Thread Craig Vincent

> Hi
> I have a funny request; I wrote a system for a client and am rather
> concerned that I am not going to receive payment for the work done. They
> want me to hand over the code before they are willing to pay, so
> basically I will be left at their mercy; if they don't pay, they will
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that
> are time related etc. Something that will bomb the mysql tables or break
> some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools
> etc, so I'm open for suggestions.
> PS, I know about Zend's encrypter, but since it will live on their
> server, I don't think it will help much since they will need the
> decrypter on there anyway right?

I wouldn't do something like this, there's too many legalities at stake.
Personally I would suggest requiring at least a modest retainer before
transmitting the code if you don't trust him (and in the future you may want
to consider getting a deposit from a company before even beginning work).
The other thing you could do is encode the file using the zend encoder and
transmit just the compiled version to themthen they could still wind up
not paying you but worse case scenario means they get the code only as is,
no ability to modify it or fix bugs.  I know you mention in your post you're
aware of it but trust me, being unable to fix any bugs with it can serious
cause problemsor to even go a step further you could add an extra line
of code (assuming you encode this of course) the does an http call to a
file/url on a server you controlyou could instruct your program
immediately terminate if it cannot access that specific file.  Then if the
company doesn't pay you, you remove that file and poof the program is no
longer usableand since it's encoded they could not determine what the
problem is nor solve it.

However in the future I strongly urge you to get a deposit for any projects
you're going to work on.  Such a retainer is perfectly acceptable in a
circumstance like thisand it protects you from companies deciding to
terminate a project mid-development (or if they don't pay you, you at least
get something out of it).

Sincerely,

Craig Vincent



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




[PHP] strtotime failure

2002-05-07 Thread Koenig, Jennifer

Hallo,

Why would strtotime fail (i.e. return a -1)?  I check the type with gettype,
which tells me that the argument I'm passing in is a string.  I cast it to a
string before passing it in, with the same results (returns a -1).  The only
thing that seems to do anything is to settype it to "string" before calling
strtotime, which ends up with bizarre results.

The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc, and
are coming out of a database.  Only SOME of this data results in a -1 when I
call strtotime on it.  Other records (the same numbers - 11:00, 13:00, etc.)
come out fine.

Could the data that's failing strtotime have been corrupted on data-entry?
Why does is_string on this data tell me it's a string?

--Jennifer Koenig

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




Re: [PHP] Error messages

2002-05-07 Thread Michael Egan

Ferry,

I think this is a fairly standard error message suggesting that the
password information being passed to the underlying database is
incorrect.

It would be the settings to connect to the database that need to be
altered in this case.

Michael Egan

> Warning: Access denied for user: 'icon@localhost' (Using password: YES) in
> /home/sites/www.icondolement.nl/web/com/icon2/include/mysql.inc.php on line
> 8
> Connection Error

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




[PHP] Timing out session cookies

2002-05-07 Thread Sear, Mick

Hi,

How do I set an expiration time on a session cookie?  I basically want to
log users out automatically after a period of inactivity.

Cheers,
Mick


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




[PHP] Re: Timing out session cookies

2002-05-07 Thread Pedro Pontes

session_set_cookie_params ($expiration_time_in_seconds);

Regards,

--


Pedro Alberto Pontes

"Mick Sear" <[EMAIL PROTECTED]> wrote in message
06D1C9FA1087D4119FC900508B95056E011FECF2@eulexch1a">news:06D1C9FA1087D4119FC900508B95056E011FECF2@eulexch1a...
> Hi,
>
> How do I set an expiration time on a session cookie?  I basically want to
> log users out automatically after a period of inactivity.
>
> Cheers,
> Mick
>



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




[PHP] Configuration problems

2002-05-07 Thread Pedro Pontes

I have "/usr/local/lib/libgd.a",

but when I

"./configure --with-gd=/usr/local/lib --enable-gd-native-ttf --with-mysql --
with-apache=/usr/local/apache_1.3.24/ --enable-track-vars --with-oci8 --with
-zlib-dir=/usr/local/lib"

I get

"configure: error: Unable to find libgd.(a|so) anywhere under
/usr/local/lib"

What am I doing wrong?

Thank you.


--


Pedro Alberto Pontes




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




[PHP] problem with fread

2002-05-07 Thread Henning Sprang

Hy,
i have a question about the fread() function.
i want to read data from a webserver url, which i don't know the exact size
of, i only know that it varies.
i see i have to give the lentgh of a file when reading it, but for remote
files i have no way to check the size. And i saw no way to tell fread it should
just read until the end.

ok, i could set the filesize very high,. but this seems a dirty solution.

on the other hand there is the fgets() function to read data "line by line"
- but my data has no linbreaks, it's only serialized php variable data that
comes in one line.

what's the best olution for that situation?

tia,
henning



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




[PHP] multipart/form-data

2002-05-07 Thread Michael Ransburg

Hi!

Everytime I add enctype="multipart/form-data" to my  tag the
$HTTP_POST_VARS is empty. If I remove it, everything works. I need the
multipart/form-data because I'm doing a file upload as part of my form.

I'm running PHP 4.1.2.

Any ideas?

Thanks
mike

ps: Here is my core configuration:

Configuration:
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
 On On
allow_url_fopen
 1 1
always_populate_raw_post_data
 0 0
arg_separator.input
 & &
arg_separator.output
 & &
asp_tags
 Off Off
auto_append_file
 no value no value
auto_prepend_file
 no value no value
browscap
 no value no value
default_charset
 no value no value
default_mimetype
 text/html text/html
define_syslog_variables
 Off Off
disable_functions
 no value no value
display_errors
 On On
display_startup_errors
 Off Off
doc_root
 no value no value
enable_dl
 On On
error_append_string
 no value no value
error_log
 no value no value
error_prepend_string
 no value no value
error_reporting
 2039 2039
expose_php
 On On
extension_dir
 /usr/lib/php4 /usr/lib/php4
file_uploads
 no value no value
gpc_order
 GPC GPC
highlight.bg
 #FF #FF
highlight.comment
 #FF9900 #FF9900
highlight.default
 #CC #CC
highlight.html
 #00 #00
highlight.keyword
 #006600 #006600
highlight.string
 #CC #CC
html_errors
 On On
ignore_user_abort
 Off Off
implicit_flush
 Off Off
include_path
 .:/php/includes:/usr/share/php .:/php/includes:/usr/share/php
log_errors
 Off Off
magic_quotes_gpc
 On On
magic_quotes_runtime
 Off Off
magic_quotes_sybase
 Off Off
max_execution_time
 30 30
open_basedir
 no value no value
output_buffering
 no value no value
output_handler
 no value no value
post_max_size
 8M 8M
precision
 14 14
register_argc_argv
 On On
register_globals
 On On
safe_mode
 On Off
safe_mode_exec_dir
 no value no value
safe_mode_gid
 Off Off
safe_mode_include_dir
 no value no value
sendmail_from
 [EMAIL PROTECTED] [EMAIL PROTECTED]
sendmail_path
 /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i
short_open_tag
 On On
SMTP
 localhost localhost
sql.safe_mode
 Off Off
track_errors
 Off Off
upload_max_filesize
 2M 2M
upload_tmp_dir
 no value no value
user_dir
 no value no value
variables_order
 EGPCS EGPCS
xmlrpc_error_number
 0 0
xmlrpc_errors
 Off Off
y2k_compliance
 Off Off


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




[PHP] Re: strtotime failure

2002-05-07 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hallo,
> 
> Why would strtotime fail (i.e. return a -1)?  I check the type with gettype,
> which tells me that the argument I'm passing in is a string.  I cast it to a
> string before passing it in, with the same results (returns a -1).  The only
> thing that seems to do anything is to settype it to "string" before calling
> strtotime, which ends up with bizarre results.
> 
> The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc, and
> are coming out of a database.  Only SOME of this data results in a -1 when I
> call strtotime on it.  Other records (the same numbers - 11:00, 13:00, etc.)
> come out fine.
> 
> Could the data that's failing strtotime have been corrupted on data-entry?
> Why does is_string on this data tell me it's a string?
> 
> --Jennifer Koenig
> 
For a first guess, try using trim or chop on the data before feeding it to 
strtotime, in case there are unexpected white spaces in the data.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] Re: strtotime failure

2002-05-07 Thread George Nicolae

strtotime returns a timestamp of a data type(ex 05/07/2002)
strtotime(05/07/2002)

you can't recevie a timpstamp from a time of a day.

--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Jennifer Koenig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hallo,
>
> Why would strtotime fail (i.e. return a -1)?  I check the type with
gettype,
> which tells me that the argument I'm passing in is a string.  I cast it to
a
> string before passing it in, with the same results (returns a -1).  The
only
> thing that seems to do anything is to settype it to "string" before
calling
> strtotime, which ends up with bizarre results.
>
> The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc,
and
> are coming out of a database.  Only SOME of this data results in a -1 when
I
> call strtotime on it.  Other records (the same numbers - 11:00, 13:00,
etc.)
> come out fine.
>
> Could the data that's failing strtotime have been corrupted on data-entry?
> Why does is_string on this data tell me it's a string?
>
> --Jennifer Koenig



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




Re: [PHP] Configuration problems

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 17:46, Pedro Pontes wrote:
> I have "/usr/local/lib/libgd.a",
>
> but when I
>
> "./configure --with-gd=/usr/local/lib --enable-gd-native-ttf --with-mysql
> -- with-apache=/usr/local/apache_1.3.24/ --enable-track-vars --with-oci8
> --with -zlib-dir=/usr/local/lib"
>
> I get
>
> "configure: error: Unable to find libgd.(a|so) anywhere under
> /usr/local/lib"
>
> What am I doing wrong?

Do you have a libgd.so anywhere? If eg: you have /usr/local/lib/libgd.so then 
you need:

  --with-gd=/usr/local

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
O'Reilly's Law of the Kitchen:
Cleanliness is next to impossible
*/

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




AW: [PHP] multipart/form-data

2002-05-07 Thread Michael Ransburg

As an add on to my mail, it seems that there are various people on deja who
have exactly the same problem. Take this guy for example, same php version,
same problem:

http://groups.google.com/groups?hl=en&threadm=B8B6599D.A88%25mnc%40stoic.net
&rnum=25&prev=/groups%3Fq%3Dphp%2Bmultipart/form-data%26hl%3Den%26start%3D20
%26sa%3DN

(all in one line above)

I did search deja before, but even as many seem to have this problem, I did
not find an answer...

thanks again
Mike

> -Ursprüngliche Nachricht-
> Von: Michael Ransburg [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 7. Mai 2002 12:01
> An: [EMAIL PROTECTED]
> Betreff: [PHP] multipart/form-data
>
>
> Hi!
>
> Everytime I add enctype="multipart/form-data" to my  tag the
> $HTTP_POST_VARS is empty. If I remove it, everything works. I need the
> multipart/form-data because I'm doing a file upload as part
> of my form.
>
> I'm running PHP 4.1.2.
>
> Any ideas?
>
> Thanks
> mike
>
> ps: Here is my core configuration:
>
> Configuration:
> Configuration
> PHP Core
> Directive Local Value Master Value
> allow_call_time_pass_reference
>  On On
> allow_url_fopen
>  1 1
> always_populate_raw_post_data
>  0 0
> arg_separator.input
>  & &
> arg_separator.output
>  & &
> asp_tags
>  Off Off
> auto_append_file
>  no value no value
> auto_prepend_file
>  no value no value
> browscap
>  no value no value
> default_charset
>  no value no value
> default_mimetype
>  text/html text/html
> define_syslog_variables
>  Off Off
> disable_functions
>  no value no value
> display_errors
>  On On
> display_startup_errors
>  Off Off
> doc_root
>  no value no value
> enable_dl
>  On On
> error_append_string
>  no value no value
> error_log
>  no value no value
> error_prepend_string
>  no value no value
> error_reporting
>  2039 2039
> expose_php
>  On On
> extension_dir
>  /usr/lib/php4 /usr/lib/php4
> file_uploads
>  no value no value
> gpc_order
>  GPC GPC
> highlight.bg
>  #FF #FF
> highlight.comment
>  #FF9900 #FF9900
> highlight.default
>  #CC #CC
> highlight.html
>  #00 #00
> highlight.keyword
>  #006600 #006600
> highlight.string
>  #CC #CC
> html_errors
>  On On
> ignore_user_abort
>  Off Off
> implicit_flush
>  Off Off
> include_path
>  .:/php/includes:/usr/share/php .:/php/includes:/usr/share/php
> log_errors
>  Off Off
> magic_quotes_gpc
>  On On
> magic_quotes_runtime
>  Off Off
> magic_quotes_sybase
>  Off Off
> max_execution_time
>  30 30
> open_basedir
>  no value no value
> output_buffering
>  no value no value
> output_handler
>  no value no value
> post_max_size
>  8M 8M
> precision
>  14 14
> register_argc_argv
>  On On
> register_globals
>  On On
> safe_mode
>  On Off
> safe_mode_exec_dir
>  no value no value
> safe_mode_gid
>  Off Off
> safe_mode_include_dir
>  no value no value
> sendmail_from
>  [EMAIL PROTECTED] [EMAIL PROTECTED]
> sendmail_path
>  /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i
> short_open_tag
>  On On
> SMTP
>  localhost localhost
> sql.safe_mode
>  Off Off
> track_errors
>  Off Off
> upload_max_filesize
>  2M 2M
> upload_tmp_dir
>  no value no value
> user_dir
>  no value no value
> variables_order
>  EGPCS EGPCS
> xmlrpc_error_number
>  0 0
> xmlrpc_errors
>  Off Off
> y2k_compliance
>  Off Off
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




[PHP] strtotime failure -- nevermind!! :)

2002-05-07 Thread Koenig, Jennifer

It was staring me right in the face - the data that wasn't working was typed
(by Europeans) as 6.30 instead of 6:30.  So it was a string whose format was
unacceptable as a Unix timestamp format.

--Jennifer Koenig

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




Re: [PHP] problem with fread

2002-05-07 Thread Dan Hardiker

> i have a question about the fread() function.
> i want to read data from a webserver url, which i don't know the exact
> size of, i only know that it varies.

You dont actually give the size of the file, you give the size of the block
you want to pull. For example:

http://whatever.com/file.html";; // whatever you wanna pull from

  if ($fp = fopen($url, "r")) {
while ($tmp = fget($fp, 4096)) $output .= $tmp;
fclose($fp);
  }

  echo "The URL's content is: ".$output;
?>

The "4096" part just means it will pull from the file pointer ($fp) in 4096
byte blocks (or chunks), and the while will keep pulling the chunks until
there is nothing left to pull.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] multipart/form-data

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 18:01, Michael Ransburg wrote:
> Hi!
>
> Everytime I add enctype="multipart/form-data" to my  tag the
> $HTTP_POST_VARS is empty. If I remove it, everything works. I need the
> multipart/form-data because I'm doing a file upload as part of my form.

What does your form tag look like?

 

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The best thing that comes out of Iowa is I-80.
*/

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




RE: [PHP] multipart/form-data

2002-05-07 Thread Michael Ransburg

Hi!

It looks like that:


I tried shifting around the enctype, but it did not help. The http_post_vars
is always empty. Only if I remove it, everything works. There seem to be
many guys having the same problem, I did search for it at deja, but I did
not find a solution. Look here for example:
http://groups.google.com/groups?hl=en&threadm=B8B6599D.A88%25mnc%40stoic.net

thanks
mike

> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 12:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] multipart/form-data
>
>
> On Tuesday 07 May 2002 18:01, Michael Ransburg wrote:
> > Hi!
> >
> > Everytime I add enctype="multipart/form-data" to my  tag the
> > $HTTP_POST_VARS is empty. If I remove it, everything works.
> I need the
> > multipart/form-data because I'm doing a file upload as part
> of my form.
>
> What does your form tag look like?
>
>  
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications
> Development *
>
> /*
> The best thing that comes out of Iowa is I-80.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




Re: [PHP] problem with fread

2002-05-07 Thread Henning Sprang

>$output = ""; // Clear output
>   $url = "http://whatever.com/file.html";; // whatever you wanna pull from
> 
>   if ($fp = fopen($url, "r")) {
> while ($tmp = fget($fp, 4096)) $output .= $tmp;
> fclose($fp);
>   }
> 
>   echo "The URL's content is: ".$output;
> ?>

erm, don't wanna be nosy, but you meant fgets() - forgot the "s" - didn't
you?

just for others who read that one...

anyway, so it's safe and clean to use this one.

thank you very much!

henning


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




[PHP] Session + IIS

2002-05-07 Thread Maurice

Hi,

I'm having some troubles with sessions and PHP 4.1.2 in IIS 5 under 
WinNT. I'm using the standard session functions from php.

$cookie_params = session_get_cookie_params();
session_set_cookie_params($cookie_params["lifetime"],dirname($SCRIPT_NAME));
session_start();
session_register("g_sessionData");

The problem is that php sometimes doesn't find it's sessions anymore. I 
can see some file being created in de sessiondata dir, with the correct 
data in  them, but they are not loaded in the next page load. The 
problem might also have to do with cookies, because I see the sessionid 
being added to the link. I checked of course that cookies were enabled.

The strange thing this is that this problem only occurs in the document 
root of my site. The content management system, which runs in a subdir, 
works fine with sessions. When I placed my website in a subdir, it also 
worked fine.As you can see in the code, I set the path in the cookie. 
Might the paths of the main site and the site in the subdir interfear 
with each other (they both use the same code). This all works fine with 
Linux/Apache.

I've come acros a number of problem reports about PHP and IIS, stateing 
that session management doesn't work fine for certain PHP versions. Does 
anyone know what the status of these problems are and which PHP version 
has stable session management on a windows platform.

Greets,
Maurice


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




Re: [PHP] multipart/form-data

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 18:12, Michael Ransburg wrote:
> Hi!
>
> It looks like that:
> 

Looks OK.

> I tried shifting around the enctype, but it did not help. The
> http_post_vars is always empty. Only if I remove it, everything works.
> There seem to be many guys having the same problem, I did search for it at
> deja, but I did not find a solution. Look here for example:
> http://groups.google.com/groups?hl=en&threadm=B8B6599D.A88%25mnc%40stoic.ne
>t

Try searching on http://bugs.php.net to see if anything comes up.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The Heineken Uncertainty Principle:
You can never be sure how many beers you had last night.
*/

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




RE: [PHP] multipart/form-data

2002-05-07 Thread Michael Ransburg

Thanks for that suggestion, I think I found something.

My core configuration says
file_uploads no value no value

I guess the default value for file_uploads is "no", and
http://bugs.php.net/bug.php?id=15827 suggests that the behaviour I described
results from file_uploads not being allowed.

I'll try to change this.

thanks
mike

> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] multipart/form-data
>
>
> On Tuesday 07 May 2002 18:12, Michael Ransburg wrote:
> > Hi!
> >
> > It looks like that:
> >  enctype="multipart/form-data">
>
> Looks OK.
>
> > I tried shifting around the enctype, but it did not help. The
> > http_post_vars is always empty. Only if I remove it,
> everything works.
> > There seem to be many guys having the same problem, I did
> search for it at
> > deja, but I did not find a solution. Look here for example:
> >
> http://groups.google.com/groups?hl=en&threadm=B8B6599D.A88%25m
> nc%40stoic.ne
> >t
>
> Try searching on http://bugs.php.net to see if anything comes up.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications
> Development *
>
> /*
> The Heineken Uncertainty Principle:
>   You can never be sure how many beers you had last night.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




Re: [PHP] problem with fread

2002-05-07 Thread Dan Hardiker

> erm, don't wanna be nosy, but you meant fgets() - forgot the "s" -
> didn't you?

Yes I did (early-morning-itis I guess heh). Thanks for the typo
correction ;)

Ammended code is as follows:

>> >   $output = ""; // Clear output
>>   $url = "http://whatever.com/file.html";; // whatever you wanna pull
>>   from
>>
>>   if ($fp = fopen($url, "r")) {
>> while ($tmp = fgets($fp, 4096)) $output .= $tmp;
>> fclose($fp);
>>   }
>>
>>   echo "The URL's content is: ".$output;
>> ?>

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] Self Destruct code

2002-05-07 Thread Chris Hewitt

Hi,

 From a legal viewpoint, I don't think you should modify any data or 
files on the clients computer. Code which simply times out (i.e. stops 
working but takes no other action) seems more acceptable.

HTH
Chris

PHPCoder wrote:

> Hi
> I have a funny request; I wrote a system for a client and am rather 
> concerned that I am not going to receive payment for the work done. 
> They want me to hand over the code before they are willing to pay, so 
> basically I will be left at their mercy; if they don't pay, they will 
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that 
> are time related etc. Something that will bomb the mysql tables or 
> break some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools 
> etc, so I'm open for suggestions.
> PS, I know about Zend's encrypter, but since it will live on their 
> server, I don't think it will help much since they will need the 
> decrypter on there anyway right?
>
> Thanks
>
>



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




Re: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-07 Thread The_RadiX

Pfft..

Stealing is what i call that :P


Why "steal" someones.. When you can write your own ? :)




Muhahahahahah..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message - 
From: "Mizery De Aria" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 10:55 AM
Subject: [PHP] Re: Forum with PHP, without using mySQL..


> www.yabbforum.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] Who's having a good hosting experience these days? {!?}

2002-05-07 Thread The_RadiX

Hmm

Brisbane eh?

Heard of Bribie Island?? Up north.. oooh, say 40mins drive  30 mins if
your speeding abit :)


Yeah.. That's me home :P


Yeah love the crap restrictions they give you on broadband here in Aus eh?
Lemme guess: Telstra? You shoulda gone with optus.. I love Telstra (dad
works for them) but Optus give you 15Gb p/m on their cable package.. So..
I'd have to weigh up telstra loyalty for value :)

Of course that's dependent on area and geo. location too...



Anywayz.. I can't get any broadband at ALL here yet.. But ADSL has been
installed in exchanges over xmas holi's and should be hopefully rolled out
for us to use soon :)




Ok well.. Hi to a fellow Aussie :)  spose I should be saying something
appropriate like:

Cya later mate!


:P




:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message -
From: "Liam MacKenzie" <[EMAIL PROTECTED]>
To: "The_RadiX" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
"Justin French" <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 2:25 AM
Subject: Re: [PHP] Who's having a good hosting experience these days? {!?}


> Free web hoting for PHP developers
>
> MySQL database (more if you need more)
> Subdomain, or I can host your domain
> Apache /w all the bits and pieces
> Slackware Linux OS
> 512/512 Cable connection in Brisbane, Australia
>
> Only catch is, I've got a 3 GIG monthly transfer limit, so no big
> uploads/downloads please (such as MP3s)
>
>
> Email me if you're interested.
>
>
> - Original Message -
> From: "The_RadiX" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; "Justin French" <[EMAIL PROTECTED]>
> Sent: Monday, May 06, 2002 5:31 PM
> Subject: [PHP] Who's having a good hosting experience these days?
>
>
> Um Justin..
>
> Hi..
>
> or should I say.. Hi fellow Aussie mate .. :)
>
>
> Yeah I am in oz too and asked some hosting questions a while back..
>
> Your host has only 2GB downloads on the UNIX plan and also that's at US$15
> p/m.. isnt that a tad pricey?
>
>
> I was looking into powweb.com or aletia.com at much cheaper pricing and
> larger services (200mb storage, 10/12Gb p/m,etc)
>
>
>
> What do you think of these..
>
>
>
> Thanks...
> :::
> :  Julien Bonastre [The-Spectrum.org CEO]
> :  A.K.A. The_RadiX
> :  [EMAIL PROTECTED]
> :  ABN: 64 235 749 494
> :  QUT Student #: 04475739
> :::
> - Original Message -
> From: "Justin French" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 06, 2002 10:22 AM
> Subject: Re: [PHP] Who's having a good hosting experience these days?
>
>
> > Cheap?
> > I've been with experthost.com for around 8 months, with very little to
> > complain about... I've got a reseller account with about 12 domains, so
> i'm
> > paying around US$6each, and I think the standard is US$15each for one,
> $10ea
> > for two, and then a sliding scale up to 25 domains @ $5ea or something.
> >
> > It *shouldn't* be about the money, but I'm currently making a healthy
> profit
> > out of hosting some client domains under my account.
> >
> >
> > Reliable?
> > They have intelligent support staff on 24/7, and they've had one service
> > fallout in this time.  It was a biggie, and I had to reload some data
from
> > my local copy, but I'd like to believe this was a one-off.
> >
> >
> > Fast?
> > The service seems fast (although I'm in Australia, so pings times are
> > affected by sheer distance).
> >
> >
> > Feature Rich?
> > 50meg, 20POPs, redirects, groups, auto-responders, 2GB bandwidth, MySQL,
> > webmail, recent versions of Apache/MySQL/PHP, intelligent support staff,
> etc
> > etc.
> >
> >
> > I'm pretty happy.  Better still, they offer a free 1 month test account,
> so
> > you can try them for yourself.
> >
> >
> > Justin French
> > 
> > Creative Director
> > http://Indent.com.au
> > 
> >
> >
> >
> >
> >
> > on 06/05/02 9:19 AM, David Freeman ([EMAIL PROTECTED]) wrote:
> >
> > >
> > >> My hosting service which WAS cool about 2 years ago has
> > >> grown into a bloated mess of zero logic.
> > >
> > > Fast, Reliable, Cheap, Feature-Rich
> > >
> > > Now pick any three.
> > >
> > > In the end I guess you get what you pay for.  If you can only afford a
> > > lower price host then you only get lower value.
> > >
> > > 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
>
>
>
>
>


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




RE: [PHP] Error messages

2002-05-07 Thread David Freeman

 > really nice error message. I put it below. Is this a PHP 
 > function/mode/config option or where these things written by 
 > the people who maintain PHP on that site?

 > MySQL Error : Connection Error
 > Error Number: 1045 Access denied for user: 'icon@localhost' 
[etc]

A little of both I would guess.  The site designers would have used the
error reporting functions available to derive the information displayed
and then incorporated that design into the actual pages you see
displayed.  You wouldn't expect to get a page with that information
without having coded it first.

Having said that, I'd be a little careful of providing that much
information in an error message on a production (and publicly available)
web site purely because it may provide enough information for someone to
attack or compromise the site.

CYA, Dave



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




RE: [PHP] Self Destruct code

2002-05-07 Thread David Freeman


 > basically I will be left at their mercy; if they don't pay, 

 > So, is there any way I can inconspicuously code in some 
 > boo-boo's that are time related etc.

I'd suggest that you have a legal or business practices issue rather
than a technical one.  Do you have a signed contract or work agreement?
What are the terms and conditions laid out in it?  If you don't have one
then perhaps you should look at having one.  At a minimum I'd be
suggesting that such terms and conditions need to address the issues of
copyright over the work produced, significant "way points" or
development stages, completion deadlines and payment schedules.

If you deliberately sabotage the work you have done you might end up in
a poor legal position yourself (leaving aside personal feelings of being
able to get back at someone for a moment).

If you don't have such things in place then perhaps suggesting a part
payment or some other alternative will work.

Ultimately, there are no real technical solutions to anything but
technical problems and I don't think the situation you're describing
falls into that category.

CYA, Dave


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




RE: [PHP] File upload problem

2002-05-07 Thread David Freeman

 > -Original Message-
 > Hmm, after a bit of testing I find that the MAX_FILE_SIZE 
 > tag is useless to say the least (probably because no browsers support
it?)

That's somewhat of a shame I guess but I can hardly claim to be
surprised - especially as I've just spent much of my time in the last
couple of days wrestling with browser rendering compatibility issues for
a client's web site - from which my only significant conclusion was that
Netscape sucks.

 > 1) you still have to wait for the whole 5MB to be uploaded
 > 2) php sees the MAX_FILE_SIZE setting is exceeded then 
 > discards the file

An opportunity to do something lost - although I guess you might be able
to do some javascripting to achieve the same.  But then, that wouldn't
require you to have the hidden field either.

CYA, Dave



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




RE: [PHP] Re: help!!!

2002-05-07 Thread .ben

Hi, I've locked myself out of my flat and left the oven on, could someone
write me a PHP script to let me in, thanks.

 .b

> -Original Message-
> From: John Holmes [mailto:[EMAIL PROTECTED]]
> Sent: 05 May 2002 23:39
> To: 'George Nicolae'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: help!!!
>
>
> And I need a PHP script to help me take over the world. It has to be
> fewer than 666 lines and I don't have MySQL. Also, could you write the
> PHP in ASP, please?
>
> ---John Holmes...
>
> > -Original Message-
> > From: George Nicolae [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, May 05, 2002 12:25 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Re: help!!!
> >
> > If you find someone pls tell him to write for me a new portal with
> secure
> > user authentication and a webmail system with Oracle backend.
> > tanx.
> > --
> >
> >
> > Best regards,
> > George Nicolae
> > IT Manager
> > ___
> > PaginiWeb.com  - Professional Web Design
> > www.PaginiWeb.com
> >
> >
> > "J. H." <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Can anyone here help me write a simple auto shop
> > > scheduling program? Would really appreciate it if you
> > > would help me out.
> > >
> > > Jane H.
> > >
> > > __
> > > Do You Yahoo!?
> > > Yahoo! Health - your guide to health and wellness
> > > http://health.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
>


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




[PHP] extensions

2002-05-07 Thread Maris Kalnins

Hi!

Configuration - windows XP, PHP4 (not in CGI mode), Apache

I am experiencing difficulty to add sybase_ct support into php

php is installed in C:/PHP4
in php.ini file:

extension_dir = C:/PHP4/extensions
extension=php_sybase_ct.dll

after restarting Apache it says:
"Unable to load library 'C:/PHP4/extensions/php_sybase_ct.dll' - The
specified module could not be found"

the interesting part is that in C:/PHP4/extensions there is a file
php_sybase_ct.dll

What am I doing wrong?

Thanks



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




RE: [PHP] Self Destruct code

2002-05-07 Thread Jay Blanchard

[snip]
I have a funny request; I wrote a system for a client and am rather
concerned that I am not going to receive payment for the work done. They
want me to hand over the code before they are willing to pay, so
basically I will be left at their mercy; if they don't pay, they will
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that
are time related etc. Something that will bomb the mysql tables or break
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools
etc, so I'm open for suggestions.
[/snip]

You could try something like this;

if(date == '30 days from now'){
if(unlock code <> 'the unlock code'){
Do stuff to disable code, set variables to odd values, drop 
tables,
whatever;
Do stuff to send e-mail to offending party;
}
}

HTH!

Jay 'Been There, Has to Do That' Blanchard



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




RE: [PHP] Self Destruct code

2002-05-07 Thread Michael Ransburg

Too easy...the client would just have to check the code for it and he would
have the code.

Better get a md5'd version of the code from somewhere in the net (from your
server for example) and compare it to the md5'd version of the code the
client put in.

But that way the client could always just comment out the if condition.

Hmm..maybe you can obfuscate that somehow...but I've no idea if that's
possible in php...?

> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 1:41 PM
> To: 'PHPCoder'; 'php-general'
> Subject: RE: [PHP] Self Destruct code
>
>
> [snip]
> I have a funny request; I wrote a system for a client and am rather
> concerned that I am not going to receive payment for the work
> done. They
> want me to hand over the code before they are willing to pay, so
> basically I will be left at their mercy; if they don't pay, they will
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that
> are time related etc. Something that will bomb the mysql
> tables or break
> some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools
> etc, so I'm open for suggestions.
> [/snip]
>
> You could try something like this;
>
>   if(date == '30 days from now'){
>   if(unlock code <> 'the unlock code'){
>   Do stuff to disable code, set variables
> to odd values, drop tables,
> whatever;
>   Do stuff to send e-mail to offending party;
>   }
>   }
>
> HTH!
>
> Jay 'Been There, Has to Do That' Blanchard
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




Re: [PHP] Self Destruct code

2002-05-07 Thread Peter Hicks


I back up Chris' comments about the legality of self-destructing code. Sort
out contractual issues with lawyers.

If you want to 'limit' your system until you get paid, what about deliberately
putting a limit on a column in MySQL, e.g. the key column is a TINYINT rather
than INT? Let the customer know that once you're paid, you will un-'cripple'
the system. Assure them no data will be lost.


Peter.


On Tue, 7 May 2002, Chris Hewitt wrote:

> Hi,
>
>  From a legal viewpoint, I don't think you should modify any data or
> files on the clients computer. Code which simply times out (i.e. stops
> working but takes no other action) seems more acceptable.
>
> HTH
> Chris


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




RE: [PHP] Self Destruct code

2002-05-07 Thread Jay Blanchard

[snip]
Too easy...the client would just have to check the code for it and he would
have the code.

Better get a md5'd version of the code from somewhere in the net (from your
server for example) and compare it to the md5'd version of the code the
client put in.

But that way the client could always just comment out the if condition.

Hmm..maybe you can obfuscate that somehow...but I've no idea if that's
possible in php...?
[/snip]

Assuming the client can read code, but I agree with encrypted code.

As for obfusation..isn't that what we live for? :) How about a series of
functions that call each other, comments in the code that don't tell the
whole story. Name the variable for the unlock code something non-obvious.
Check the date and set a variable that seems in concert with the
application. Bury functions within other functions. Nest if statements to
within an inch of their life. WaitI just read some code like that that
was due to lack of planning and documentation...and there is no
self-destruct mechanism...just 'spaghetti' code! :)

The legal angle should be the one most considered. That and having a
contract.

Jay



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




Re: [PHP] Self Destruct code

2002-05-07 Thread The_RadiX

Well I share heavily with whoever the starter of this post was..


see yes.. upfront half payments are indeed much better..


but.. (and I assume here) when you are younger and have a smaller reputation
it's harder for clients to understand that.. so you usually end up with this
problem of having a site.. but like they could reject offer at last moment
or worse yet.. personal experience here 3 months ago.. you upload to their
server..

the business changes hands.. server ftp passwords change.. you lose contact
mysteriously with your contact. and voila.. pftt. in a puff of smoke.. your
hard worked site.. has no connection to you anymore.. you can't remove/touch
it.. and noone answers you..


You ring them back EVERY afternoon for a week straight... always being told
they will ring you back ASAP...


BULLSHIT.. what a load of crap...



No reply calls... No emails... Nothing.. Zilch.. and more importantly.. NO
F***ING MONEY!!!



Soo.. You have ISP bills, mobile bills, maybe rent/family/living costs (not
in my case), Uni text books, transport, webhosting etc.. and no money..



Yes.. That's a personal tale... Quite sad... But I have moved on..



It get's worse.. I was bitten twice by same client.. First site I made for
him.. Was for their main biz.. And that took like 3-4months to FINALLY get
paid.. Then I did the 2nd one.. and yeah.. you know the rest.. :(



Anyway here's a tip..

Remember.. in this kinda work... "YOU'RE THE BOSS" ... so go like this..

Go to the little biz you wanna do a site for.. or if you're offered that's
even better and be straight, to the point and barely flexible.. Don't let
them get you..


AND don't sell yourself cheap..

Try this: "I can make you a site for $850 that will allow you to perform all
you have asked and has room for expansion later on when your company grows..
I may also charge you a small fee of $5-10 per month for maintance and
hosting costs"..


the maintance fee of course is just some bonus "fixed/guaranteed" income per
month... 5-10 bucks is crap but once you do 50 sites.. it counts for a
little more pocket money...



Hey don't stop there..

Site I am doing now for a popular local biz (comp shop) is 650 for site,
nice a cheap once-off. and AUD$20  per month to cover their www domain name
payments and help towards my hosting..


And my hosting is SOO cheap that I could easily fit like 12 of these sites
similiar to this one on my server on my current plan.. and therefore be
making nice little profit.. :)




Anywayz.. back to your story..


Hahahah.. I must laugh.. Yes the thought occured to me without hesitation
when they f**ked me over.. but as I said.. I had not planned for it,
therefore I had no "backdoor" as such.. and as I had no FTP access anymore i
was well done for..


Lesson learnt: Don't mess with biz men :)



This time? Muhahahah.. Cos every site I build uses more PHP and MySQL than
you could shake a stick at anyway its quite easy for me to put a file or
just a special little "function" that allows me to easily.. hmmm yes.. you
got the idea...



Yeah I think it's a good idea.. Maybe not destroy (although it'd be nice)
but just render unusable..


Like it's quite simple really..


If you let's say use a header kind of file for each and every page of site
(like I do) to load up global vars and format of site etc.. than you can
haev something in there that handles it..


For a quick example:

Let's say you have your files all use (include/require) a header.php 


Then in your header.php just add these lines



-

if(isset($HTTP_GET_VARS["site_power"])) {
  if($HTTP_GET_VARS["site_power"]=="off") unlink("/test.tmp");
  else {
$powerfile=fopen("/test.tmp","w");
fclose($powerfile);
  }
}

if(file_exists("/test.tmp")) exit("This site has been temporarily disabled
due to payment complications.. Please check back soon.");

--


that's about all there is to it.. Should work fine.. Some of you may say:
"USE $_GET instead" but I have always used the $HTTP_*_VARS idea.. and it
works.. and it's compat with newer versions still of PHP so as far as I can
see it's all ok.. but replace if you want.. up to you..


Yeah basically just format up a little message for them... and that'll be
shown if you send the get name=value pair to ANY php file on your site
containing something like: /file.php?site_power=off

you can turn it back on with just passing on in there.. optionally you may
want to use a password kinda of idea too.. just combine md5 if you want to
do soemthing like

if(md5($HTTP_GET_VARS["site_power"]))="41d67d9b067b00ed2ce76af695767644")...
..

which happens to be md5 of: "mypassword_off"


so you get the idea..



Well this whole thing was enlightening.. that might explain the huge email
reply I wrote :)





Cya..

:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::

RE: [PHP] Re: Forum with PHP, without using mySQL..

2002-05-07 Thread Brian McGarvie

not as if forums are particularly hard/complex neway ;)

-Original Message-
From: The_RadiX [mailto:[EMAIL PROTECTED]]
Sent: 07 May 2002 11:51
To: [EMAIL PROTECTED]; Mizery De Aria
Subject: Re: [PHP] Re: Forum with PHP, without using mySQL..


Pfft..

Stealing is what i call that :P


Why "steal" someones.. When you can write your own ? :)




Muhahahahahah..


:::
:  Julien Bonastre [The-Spectrum.org CEO]
:  A.K.A. The_RadiX
:  [EMAIL PROTECTED]
:  ABN: 64 235 749 494
:  QUT Student #: 04475739
:::
- Original Message - 
From: "Mizery De Aria" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 10:55 AM
Subject: [PHP] Re: Forum with PHP, without using mySQL..


> www.yabbforum.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


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




[PHP] Re: Session + IIS

2002-05-07 Thread Vincent Oostindie

Hi Maurice,

On Tue, 07 May 2002 11:40:20 +0200, Maurice wrote:
> I've come acros a number of problem reports about PHP and IIS, stateing
> that session management doesn't work fine for certain PHP versions. Does
> anyone know what the status of these problems are and which PHP version
> has stable session management on a windows platform.

When register_globals is off (and it should be), sessions do not work
properly with PHP 4.1.2. I can tell you this really gave me a serious
headache :-)

PHP 4.1.1 works fine, and so does PHP 4.2.0. So if I were you, I'd
install the latter one.

Greetings,

Vincent

BTW: Crossposting is not a nice thing to do, Maurice!

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




[PHP] Uploads adding \r?

2002-05-07 Thread Cole Tuininga


I'm using PHP on a customer's site.  One of the things they do is to add
a dxf (CAD) file to be associated with parts.  The peculiar thing is
this: When the file gets uploaded, the EOL gets changed from "\n" to
"\r\n".

Initially, I thought this was some kind of weird M$ thing (web server is
apache 1.3.mumble with php 4.1.2 on linux), but I tried uploading from
my linux box with the same result. 

Any thoughts?

-Cole Tuininga


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




[PHP] Re: Access denied errors

2002-05-07 Thread David J Jackson

Nick ---

Try this connect script.
Then from inside you php page use


HTH,
David

--- connect.php --


// database connect script
$dbhostname = "localhost";
$dbuser = "picklesql";
$dbpasswd = "pi56fb";
$dbname= "pickle";
$link = mysql_connect("$dbhostname", "$dbuser", "$dbpasswd")
 or die("Connection to server: $dbhostname FAILED!!");
mysql_select_db("$dbname")
 or die("Connection to database: $dbname FAILED!!");
?>


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




[PHP] Registering an Array in a Session

2002-05-07 Thread Alexis Antonakis

Hi,

I am trying to register an array in a session, but am having no luck.


What I have is a form with set fields on which is processed a certain number
of times.


Upon submitting the form each time, I run the following:

session_register("fieldtext[".$page."]");

where fieldtext is the name of a field on the form, and $page is the page
number, which increases by one each time the form is submitted.


All I get registered is the last value submitted on the form, all the
previous values are null.

Any advice would be most appreciated.

TIA
Alexis


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




[PHP] how to generate a date between 1998 and today by random?

2002-05-07 Thread andy

hi there,

I am wondering if there is an easy way to generate a random date. It would
work by creating arrays of values and then just selecting like:

$year = array(2002, 2003, 2004, 2005);
$month = array
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Okt','Nov','Dez');

$date = $month[rand(0,count($month))].' '.rand(0,31).',
'.$year[rand(0,count($year))];

But there might be an easyer and faster (better performant) way.

Thanx for any help,

Andy



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




RE: [PHP] how to generate a date between 1998 and today by random?

2002-05-07 Thread Niklas Lampén

array_rand() might be the solution for you.


Niklas

-Original Message-
From: andy [mailto:[EMAIL PROTECTED]] 
Sent: 7. toukokuuta 2002 16:12
To: [EMAIL PROTECTED]
Subject: [PHP] how to generate a date between 1998 and today by random?


hi there,

I am wondering if there is an easy way to generate a random date. It
would work by creating arrays of values and then just selecting like:

$year = array(2002, 2003, 2004, 2005);
$month = array
('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Okt','Nov','Dez
');

$date = $month[rand(0,count($month))].' '.rand(0,31).',
'.$year[rand(0,count($year))];

But there might be an easyer and faster (better performant) way.

Thanx for any help,

Andy



-- 
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] how to generate a date between 1998 and today by random?

2002-05-07 Thread Michael Ransburg

haven't tried that:

use mktime to get unixtimestamps of today and of the date between 1998.

create a random number between these timestamps (the random function should
be capable of it, or just code yourself a little function).

convert the resulting timestamp to a date using the todate() function.

I think that should work and it should be easy enough.

mike

> -Original Message-
> From: andy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 07, 2002 3:12 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] how to generate a date between 1998 and today
> by random?
>
>
> hi there,
>
> I am wondering if there is an easy way to generate a random
> date. It would
> work by creating arrays of values and then just selecting like:
>
> $year = array(2002, 2003, 2004, 2005);
> $month = array
> ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Okt',
> 'Nov','Dez');
>
> $date = $month[rand(0,count($month))].' '.rand(0,31).',
> '.$year[rand(0,count($year))];
>
> But there might be an easyer and faster (better performant) way.
>
> Thanx for any help,
>
> Andy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28.02.2002



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




Re: [PHP] Registering an Array in a Session

2002-05-07 Thread Dan Hardiker

> I am trying to register an array in a session, but am having no luck.
[..]
> where fieldtext is the name of a field on the form, and $page is the
> page number, which increases by one each time the form is submitted.



That should get you started.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




[PHP] Re: Registering an Array in a Session

2002-05-07 Thread Austin Marshall

Alexis Antonakis wrote:
> Hi,
> 
> I am trying to register an array in a session, but am having no luck.
> 
> 
> What I have is a form with set fields on which is processed a certain number
> of times.
> 
> 
> Upon submitting the form each time, I run the following:
> 
> session_register("fieldtext[".$page."]");
> 
> where fieldtext is the name of a field on the form, and $page is the page
> number, which increases by one each time the form is submitted.
> 
> 
> All I get registered is the last value submitted on the form, all the
> previous values are null.
> 
> Any advice would be most appreciated.
> 
> TIA
> Alexis
> 

Try simply registering "fieldtext" and refer to the array within the 
code as $fieldtext['key'];  Also, if you are using a recent version of 
PHP, there is no need to register session variables.  You can make use 
of $_SESSION and store arrays within it, for example 
$_SESSION['fieldtext']['key'];


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




[PHP] Re: how to generate a date between 1998 and today by random?

2002-05-07 Thread Austin Marshall

Try making use of a timestamp via the strtotime.  You'll have to do the 
math, but you can generate a random number with the range being the 
number of seconds in the date range and then adding the remaining 
offset.  Then convert the timestamp back to a date with everyones 
favorite date() function.

Andy wrote:
> hi there,
> 
> I am wondering if there is an easy way to generate a random date. It would
> work by creating arrays of values and then just selecting like:
> 
> $year = array(2002, 2003, 2004, 2005);
> $month = array
> ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Okt','Nov','Dez');
> 
> $date = $month[rand(0,count($month))].' '.rand(0,31).',
> '.$year[rand(0,count($year))];
> 
> But there might be an easyer and faster (better performant) way.
> 
> Thanx for any help,
> 
> Andy
> 
> 




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




[PHP] permissions issue under NT?

2002-05-07 Thread brent

Help. I've managed to hose myself. I had this page working fine until I 
went in and screwed up my users under NT4. I can't backtrack and figure out 
what I changed. Can anyone point me in the right direction? Is this a 
permissions issue? Thanks.

Brent

Warning: open(/tmp\sess_6bdc839067df0a2b942d87a63b781eb6, O_RDWR) failed: m 
(2) in D:\blah\www\page.php on line 3

line 3 = session_start();

Warning: open(/tmp\sess_6bdc839067df0a2b942d87a63b781eb6, O_RDWR) failed: m 
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the 
current setting of session.save_path is correct (/tmp) in Unknown on line 0




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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread Dan Hardiker

> Help. I've managed to hose myself. I had this page working fine until I
>  went in and screwed up my users under NT4. I can't backtrack and
> figure out  what I changed. Can anyone point me in the right direction?
> Is this a  permissions issue? Thanks.

Ok, sorry if Im gonna sound a little blunt, but the following error message
looks rather obvious to me.

> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown on
> line 0

Open your php.ini file and change "session.save_path" from "/tmp"
to "c:/temp" (or where-ever you wish it to go)

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




[PHP] copy protection

2002-05-07 Thread Udo Giacomozzi

Hi!

Has somebody thought of adding some sort of copy protection to a PHP 
project? I guess it would be difficult to accomplish.

Say you have some PHP scripts for mantaining a web site. You don't want the 
ISP simply copies the scripts for each web site he wishes to use it for but 
buys a valid license for each copy. 

A solution would be a license key that guarantees the scripts are being 
used only on a specific web site / domain name the license has been buyed 
for.

One problem is that PHP is source code, it isn't stored in compiled form, 
and a copy protection could be easily located and removed I think. Ok, 
there is Zend encoder but it is very expensive in my opinion.

Are there any tools, articles? Did ever have anyone this problem?

Udo

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 21:30, Dan Hardiker wrote:
> Ok, sorry if Im gonna sound a little blunt, but the following error message
> looks rather obvious to me.
>
> > Warning: Failed to write session data (files). Please verify that the
> > current setting of session.save_path is correct (/tmp) in Unknown on
> > line 0
>
> Open your php.ini file and change "session.save_path" from "/tmp"
> to "c:/temp" (or where-ever you wish it to go)

Plus a quick search of the archives would reveal that the same question was 
answered just yesterday.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Patch griefs with proverbs.
-- William Shakespeare, "Much Ado About Nothing"
*/

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




RE: [PHP] copy protection

2002-05-07 Thread Matt Schroebel

Look at the Zend Encoder.  It's not free, but there is a free trial available.
http://www.zend.com/store/products/zend-encoder.php

> -Original Message-
> From: Udo Giacomozzi [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, May 07, 2002 9:36 AM
> Subject: [PHP] copy protection

> Has somebody thought of adding some sort of copy protection to a PHP 
> project? I guess it would be difficult to accomplish.

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




[PHP] rand(0,1) does seem to get more often 1

2002-05-07 Thread andy

Hi there,

I am wondering if it is possible that this function tends to be more often
1. I do get 8 of 10 times 1.

  srand((double)microtime()*100);
  if (rand(0,1) == 1){
code...

it looks ok to me.

Thanx for any help,

Andy



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




Re: [PHP] copy protection

2002-05-07 Thread Chris

I found this on the web one day, though I've never used it or played around 
with it.  It does make the code a pain to read though if it does anything 
close to the sample on the page.  Plus, its free.

http://pobs.mywalhalla.net

-Chris

At 01:35 PM 5/7/2002 +, Udo Giacomozzi wrote:
>Hi!
>
>Has somebody thought of adding some sort of copy protection to a PHP
>project? I guess it would be difficult to accomplish.
>
>Say you have some PHP scripts for mantaining a web site. You don't want the
>ISP simply copies the scripts for each web site he wishes to use it for but
>buys a valid license for each copy.
>
>A solution would be a license key that guarantees the scripts are being
>used only on a specific web site / domain name the license has been buyed
>for.
>
>One problem is that PHP is source code, it isn't stored in compiled form,
>and a copy protection could be easily located and removed I think. Ok,
>there is Zend encoder but it is very expensive in my opinion.
>
>Are there any tools, articles? Did ever have anyone this problem?
>
>Udo


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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread brent

At 02:30 PM 5/7/02 +0100, you wrote:
> > Help. I've managed to hose myself. I had this page working fine until I
> >  went in and screwed up my users under NT4. I can't backtrack and
> > figure out  what I changed. Can anyone point me in the right direction?
> > Is this a  permissions issue? Thanks.

Dan - It seemed pretty obvious to me too, but again, the ini file hasn't 
changed since the whole thing worked. What has changed are the permissions 
under NT. I've tried changing the /tmp permissions, but the combinations 
are considerable, and I don't have time to try them all. I was hoping 
someone could point me in the right direction.

Thanks.

>Ok, sorry if Im gonna sound a little blunt, but the following error message
>looks rather obvious to me.
>
> > Warning: Failed to write session data (files). Please verify that the
> > current setting of session.save_path is correct (/tmp) in Unknown on
> > line 0
>
>Open your php.ini file and change "session.save_path" from "/tmp"
>to "c:/temp" (or where-ever you wish it to go)
>
>--
>Dan Hardiker [[EMAIL PROTECTED]]
>ADAM Software & Systems Engineer
>First Creative Ltd
>
>
>
>--
>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] Creating mail account on Linux server

2002-05-07 Thread Rosen

Hi,
How can I create a mail account on Linux server with PHP ?

Can I do it ?

Thanks,
Rosen




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




[PHP] adding 60 to a date

2002-05-07 Thread Scott St. John

Morning

I am working on a password aging system that will force a user to change 
their password every 60 days.  Can anyone recommend the best method for 
taking the current date and adding 60 days to that number?  Should I do a 
unix timestampe and add or strtotime and add 60 days?

Thanks,

-Scott



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




Re: [PHP] Creating mail account on Linux server

2002-05-07 Thread Dan Hardiker

And I quote, from the [EMAIL PROTECTED] which you posted to no more
than 30 mins ago. Im hoping you dont have the IQ of a fish.

> How can I create a mail account on Linux server with PHP ?

More information is required for that question to be answer (such as what
MTA and MDA are you using and a few others which would give the impression
you dont quite have a grasp on the question your really asking).

In anycase - wrong list. The PHP Developers list is for people who develop
PHP, not with it. I think your after [EMAIL PROTECTED] ... send an
email to [EMAIL PROTECTED] to sign up.

If you choose to pursue the question in that forum, please include the
following information in your question:

 1. Linux Distro & Version
 2. Mail Transfer Agent [MTA] (qmail, sendmail, etc)
 3. Mail Delivery Agent [MDA] (vpopmail, etc)
 4. Your experiance with creating / using unix mail boxes outside of PHP
(eg: how would you go about the problem using shell scripts / command line
typing)

This will give the people who try to help a better impression of the
situation and give you more targeted advice.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 21:58, brent wrote:
> At 02:30 PM 5/7/02 +0100, you wrote:
> > > Help. I've managed to hose myself. I had this page working fine until I
> > >  went in and screwed up my users under NT4. I can't backtrack and
> > > figure out  what I changed. Can anyone point me in the right direction?
> > > Is this a  permissions issue? Thanks.
>
> Dan - It seemed pretty obvious to me too, but again, the ini file hasn't
> changed since the whole thing worked. What has changed are the permissions
> under NT. 

Never mind the ini file. Your problem is that php can't write to /tmp, Dan 
was just suggesting another way to deal with it.

> I've tried changing the /tmp permissions, but the combinations
> are considerable, and I don't have time to try them all. I was hoping
> someone could point me in the right direction.

Set it world readable/writeable?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
And on the eighth day, we bulldozed it.
*/

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




Re: [PHP] Creating mail account on Linux server

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 22:02, Rosen wrote:
> Hi,
> How can I create a mail account on Linux server with PHP ?

Depends on what mail server you have and how it is set up.

> Can I do it ?

In theory yes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Don't tell me what you dreamed last night for I've been reading Freud.
*/

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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread Dan Hardiker

> Dan - It seemed pretty obvious to me too, but again, the ini file
> hasn't  changed since the whole thing worked. What has changed are the
> permissions  under NT. I've tried changing the /tmp permissions, but
> the combinations  are considerable, and I don't have time to try them
> all. I was hoping  someone could point me in the right direction.

/tmp doesnt exist under windows - thats a unix path. Try changing it to a
path that does exist. I dont use windows so you will have to try one of the
following (assuming the dir you want it c:\temp\)

  c:\\temp
  c:\temp
  c:/temp

One of those should work... I dont know if you need to escape php.ini
values (hence the \\ and \ options).

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] adding 60 to a date

2002-05-07 Thread John S. Huggins

On Tue, 7 May 2002, Scott St. John wrote:

>-Morning
>-
>-I am working on a password aging system that will force a user to change 
>-their password every 60 days.  Can anyone recommend the best method for 
>-taking the current date and adding 60 days to that number?  Should I do a 
>-unix timestampe and add or strtotime and add 60 days?

Yes, using the unix timestamp is most frequently the wise thing to do - at
least for me :-|

Just add 5,184,000 seconds to the current timestamp.

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: [PHP] adding 60 to a date

2002-05-07 Thread Scott St. John

Will the fact that the server is on NT be a problem?  

On Tue, 7 May 2002, John S. Huggins wrote:

> On Tue, 7 May 2002, Scott St. John wrote:
> 
> >-Morning
> >-
> >-I am working on a password aging system that will force a user to change 
> >-their password every 60 days.  Can anyone recommend the best method for 
> >-taking the current date and adding 60 days to that number?  Should I do a 
> >-unix timestampe and add or strtotime and add 60 days?
> 
> Yes, using the unix timestamp is most frequently the wise thing to do - at
> least for me :-|
> 
> Just add 5,184,000 seconds to the current timestamp.
> 
> **
> 
> John Huggins
> VANet
> 
> [EMAIL PROTECTED]
> http://www.va.net/
> 
> **
> 
> 
> 

-- 



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




Re: [PHP] adding 60 to a date

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 21:44, Scott St. John wrote:
> Morning
>
> I am working on a password aging system that will force a user to change
> their password every 60 days.  Can anyone recommend the best method for
> taking the current date and adding 60 days to that number?  Should I do a
> unix timestampe and add or strtotime and add 60 days?

I would say strtotime() wins out on the legibility stakes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Things will be bright in P.M.  A cop will shine a light in your face.
*/

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




Re: [PHP] permissions issue under NT?

2002-05-07 Thread Stuart Dallas

Jason Wong <[EMAIL PROTECTED]> wrote:
>> I've tried changing the /tmp permissions, but the combinations
>> are considerable, and I don't have time to try them all. I was hoping
>> someone could point me in the right direction.
>
> Set it world readable/writeable?

Oooh, nasty. That should be your last option. Assuming you're using a
default install of IIS, PHP will run under the IUSR_machine user. Give that
user full access to the tmp directory and you should be ok. If that does not
work then take Jason's advice.

If you're using apache then I can't really help but I would guess that it's
a similar situation.

--
Stuart


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




Re: [PHP] adding 60 to a date

2002-05-07 Thread Tyler Longren

No, this won't be a problem.  I also suggest using a unix timestamp.  It's
the easiest way of doing it.

tyler

- Original Message -
From: "Scott St. John" <[EMAIL PROTECTED]>
To: "John S. Huggins" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 8:55 AM
Subject: Re: [PHP] adding 60 to a date


> Will the fact that the server is on NT be a problem?
>
> On Tue, 7 May 2002, John S. Huggins wrote:
>
> > On Tue, 7 May 2002, Scott St. John wrote:
> >
> > >-Morning
> > >-
> > >-I am working on a password aging system that will force a user to
change
> > >-their password every 60 days.  Can anyone recommend the best method
for
> > >-taking the current date and adding 60 days to that number?  Should I
do a
> > >-unix timestampe and add or strtotime and add 60 days?
> >
> > Yes, using the unix timestamp is most frequently the wise thing to do -
at
> > least for me :-|
> >
> > Just add 5,184,000 seconds to the current timestamp.
> >
> > **
> >
> > John Huggins
> > VANet
> >
> > [EMAIL PROTECTED]
> > http://www.va.net/
> >
> > **
> >
> >
> >
>
> --
>
>
>
> --
> 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] Creating mail account on Linux server

2002-05-07 Thread Sysadmin

I'm curious about the same thing.  RedHat 7.2 with default IMAP.

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:06 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Creating mail account on Linux server


On Tuesday 07 May 2002 22:02, Rosen wrote:
> Hi,
> How can I create a mail account on Linux server with PHP ?

Depends on what mail server you have and how it is set up.

> Can I do it ?

In theory yes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Don't tell me what you dreamed last night for I've been reading Freud.
*/

-- 
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] Self Destruct code

2002-05-07 Thread Justin French

I don't believe this is the right way to do things, and really, anything you
"break" can be spotted, fixed, patched and repaired.  Sure, it might piss
them off for a few days, but it aint a solution.


1. Do you have an agreement with the client in writing?  Who owns the
copyright of the code?  Who pays what and when?  What warranties are you
providing, etc etc?  If you don't fix it now.

In this case, you would be aiming to have copyright ownership of the code AT
LEAST until payment is received.


2. They should be willing to make part/full payment based on viewing the
working code on any server. If they want to see it working on their server
only, then perhaps suggest that you have control over the passwords until
payment... not a solid fix, but better than nothing.


3. In future, you should also aim for part payment (monthly, half-way,
deposit, milestones, etc).


I've had one client who hadn't payed.  I did everything right, kept
contracts, kept the FTP passwords, etc etc.  The bill was overdue by 15
days, and they were ignoring my emails/calls, so I pulled their site
offline.  15 minutes later, I received a phone call.  I explained my
position, and was payed within 3 hours.


The issue here is really who owns the code before and after payment.  In
conjunction with a written agreement / contract over what happens, when and
how (and how much), you should have no reason to really worry.  Having
written agreements out there also reminds the client of their obligations.

It may cost a few $'s, but you will be able to pursue a client who hasn't
payed IF you have a written agreement, and clear conditions.


The copyright act, and a clear contract are your best safeguards.  If
they're not willing to agree to simple, industry-standard practices, then to
me, the client isn't worth having.


Justin French



on 07/05/02 6:19 PM, PHPCoder ([EMAIL PROTECTED]) wrote:

> Hi
> I have a funny request; I wrote a system for a client and am rather
> concerned that I am not going to receive payment for the work done. They
> want me to hand over the code before they are willing to pay, so
> basically I will be left at their mercy; if they don't pay, they will
> still have a working version of the system...
> So, is there any way I can inconspicuously code in some boo-boo's that
> are time related etc. Something that will bomb the mysql tables or break
> some code if it is not "unlocked" within a month etc.
> I'm not sure if people out tjere might have existing safeguard tools
> etc, so I'm open for suggestions.
> PS, I know about Zend's encrypter, but since it will live on their
> server, I don't think it will help much since they will need the
> decrypter on there anyway right?
> 
> Thanks
> 


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




[PHP] problem with fsockopen and lenght of fputs

2002-05-07 Thread Philippe

Hello everyone,

I'm trying to send Email with fsockopen. It works fine but when the body 
of the message is superior to 8k. Then the fputs didn't work.
I've read that the fputs had a buffer of 8k and we must use 
set_file_buffer to remove buffer. But it seems not to work on a 
fsockopen.
Is there an solution to increase the size of buffer for a socket ??

Here's my code :

$message="EHLO ".$nom_serveur.chr(13).chr(10);/
$message.="MAIL FROM:<".$exp.">".chr(13).chr(10);
$message.="RCPT TO:<".$to.">".chr(13).chr(10);
$message.="DATA".chr(13).chr(10);
$message.="Date: ".date("r").chr(13).chr(10);
$message.="Subject: ".$subject.chr(13).chr(10);
$message.="From: ".$exp.chr(13).chr(10);
$message.="Reply-To: ".$reply.chr(13).chr(10);
$message.="To: ".$to.chr(13).chr(10);

$message.="Mime-Version: 1.0".chr(13).chr(10);

  if ($type='text')
$message.="Content-Type: text/plain;";
  else
$message.="Content-Type: text/html;";

$message.=" charset=\"iso-8859-1\"".chr(13).chr(10);
$message.="Content-Transfert-Encoding: 8bit".chr(13).chr(10);

$message.=chr(13).chr(10);
$message.=$msg.chr(13).chr(10);

$message.=".".chr(13).chr(10);
$message.="QUIT".chr(13).chr(10);

$fd=fsockopen($ip_serveur,25);
fputs($fd,$message,strlen($message));
fclose($fd);

Thanks for your response,

Best regards.

Philippe BARRIELLE
Sce Informatique
---
*  S.A. Editions et Publicites - ABRITEL *
109, La Canebière - B.P 2033 - 13201 Marseille cedex 01 - France
Tél  : 33 (0)4 91 11 00 72   Wap : http://wap.abritel.fr
Email: [EMAIL PROTECTED] Web : http://www.abritel.fr
---
LOCATIONS VACANCES - FRANCE - SPAIN - DOM - PORTUGAL
---


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




Re: [PHP] Creating mail account on Linux server

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 22:23, [EMAIL PROTECTED] wrote:
> I'm curious about the same thing.  RedHat 7.2 with default IMAP.

> > How can I create a mail account on Linux server with PHP ?

In general, if people need to ask such a question, then they really are not 
ready, or do not understand the security implications of creating mail 
accounts on a server.

The first thing you need to ask yourself is why would you want to do it?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I finally went to the eye doctor.  I got contacts.  I only need them to
read, so I got flip-ups.
-- Steven Wright
*/

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




RE: [PHP] Creating mail account on Linux server

2002-05-07 Thread Sysadmin

I can create the popuser account, but my problem comes with setting the 
password.  I realize that when you do a "useradd" command you can 
specify a -p option for password, but it hasn't worked for me.  Is 
there a better way then calling system commands?

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Creating mail account on Linux server


On Tuesday 07 May 2002 22:23, [EMAIL PROTECTED] wrote:
> I'm curious about the same thing.  RedHat 7.2 with default IMAP.

> > How can I create a mail account on Linux server with PHP ?

In general, if people need to ask such a question, then they really are 
not 
ready, or do not understand the security implications of creating mail 
accounts on a server.

The first thing you need to ask yourself is why would you want to do it?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I finally went to the eye doctor.  I got contacts.  I only need them to
read, so I got flip-ups.
-- Steven Wright
*/

-- 
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] Creating mail account on Linux server

2002-05-07 Thread Dan Hardiker

>> I'm curious about the same thing.  RedHat 7.2 with default IMAP.
>> > How can I create a mail account on Linux server with PHP ?

If you check the list, you will see a reply from myself with a list of
questions you need to answer for us to begin to help you.

> In general, if people need to ask such a question, then they really are
> not  ready, or do not understand the security implications of creating
> mail  accounts on a server.

I agree with Jason here.

1. An IMAP account != a mail account, thats just a MAA (Mail Access Agent)
which allows you to read mail from a file/dir/storage space on your
machine. I use Courier IMAP for that (using ./Maildir).
2. We need to know your MTA and MDA in order to even begin to help
3. On a "default" RedHat setup you need root access (as in you need give
your php script root access) in order to perform what your asking. If that
doesnt ring alarm bells, please type "halt" at your RedHat console now.

> The first thing you need to ask yourself is why would you want to do
> it?

For the most part, I use these sort of functions from a PHP script to
administrate my system and give customers automated access to modify their
own domains. (This is all done through a MySQL firewall [as in data gets
put into MySQL from the interface, and then read by backend scripts that do
the dirty work - unconnected to the frontend interface for security ...
incase anyone was about to tell me what they think a firewall is])

Although I can't see these two people having the unix know-how in order to
build such a system, let alone securely.

I would make some bitchy underhanded comments about their Mother's and the
local Ameaoba slut relating to their IQ ... but I wont, cuz Im not like
that ;) heh

Jason: what dya recon on people being licensed to be able to run a unix
style operating system? heh Hell lets license people to use computers.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




[PHP] Announcement: Smarty template engine 2.1.1 released

2002-05-07 Thread Monte Ohrt

This is a minor bug fix release.

http://www.phpinsider.com/php/code/Smarty/

Version 2.1.1
-

 - added cycle function (Monte)
 - fixed bug with resource testing, and include_path (Monte)
 - fixed a bug with register_outputfilter function (Monte)


Monte


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




RE: [PHP] Creating mail account on Linux server

2002-05-07 Thread Dan Hardiker

> I can create the popuser account, but my problem comes with setting the
>  password.  I realize that when you do a "useradd" command you can
> specify a -p option for password, but it hasn't worked for me.  Is
> there a better way then calling system commands?

PLEASE tell me your aware that the "useradd" command will add a unix user,
not just for mail - but for access to the machine itself over a terminal
(SSH / Telnet / whatever else you may have left open)... and should the
script your trying to make ever be exploited, that the hacker could then
very easily create a user account on your system and then just walk
straight in??

Given your current attitude (and awareness) of security, I doubt that it
would take long for your machine to be anhilated.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] Announcement: Smarty template engine 2.1.1 released

2002-05-07 Thread Dan Hardiker

> This is a minor bug fix release.

Wasnt aware that php-general had incorporated a channel for product
plugging and advertisment?!

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




Re: [PHP] Announcement: Smarty template engine 2.1.1 released

2002-05-07 Thread Rasmus Lerdorf

Relax Dan, open source non-commercial PHP-related announcements of
interest to a lot of PHP users are welcome here.

-Rasmus

On Tue, 7 May 2002, Dan Hardiker wrote:

> > This is a minor bug fix release.
>
> Wasnt aware that php-general had incorporated a channel for product
> plugging and advertisment?!
>
> --
> Dan Hardiker [[EMAIL PROTECTED]]
> ADAM Software & Systems Engineer
> First Creative Ltd
>
>
>
> --
> 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] Announcement: Smarty template engine 2.1.1 released

2002-05-07 Thread Brian McGarvie

and an advertisment for products that fall into the "for users who can't
think for themselves" bucket of uselessness.

even if it is open source... there is other places for it ;)

-Original Message-
From: Dan Hardiker [mailto:[EMAIL PROTECTED]]
Sent: 07 May 2002 15:53
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Announcement: Smarty template engine 2.1.1 released


> This is a minor bug fix release.

Wasnt aware that php-general had incorporated a channel for product
plugging and advertisment?!

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



-- 
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] Re: Very Large MySQL Query String

2002-05-07 Thread David Bouw

Dear Javier,

Yes, indeed when you encode the file it grows. Normally about 30%..
Thus, the file in my situation of 1 Megabyte grows to 1.3 MegaByte..

But I would expect that this should not give any problems...
The columns I am using allows 16 Megabyte.. Does anyone else know what
the string limitation of PHP Mysql query function is?

With kinds regards,
David Bouw

> Hi, I think if you encode the file with base64 and store it in the
> database the size of the document will be more than 1MB sure.
>
> David Bouw wrote:
>> Dear Kirk (and Julio)
>>
>> Thanks for the response..
>>
>> I don't want to use a link to the images because backing up my data
>> and porting it to another machine is much easier. (Replicating is also
>> very easy.) When storing the file separately this gets more complex,
>> especially when you want to get this data from another machine...
>>
>> The stored data isn't retrieved very often, so speed isn't really an
>> issue. (Till now speed really never was an isse. When adding the right
>> indexes MySql + PHP does incredible things!!.)
>>
>> I do though use the suggested 'linking' method for an website where
>> the images are needed on the website.. In the current situation though
>> I store PDF images of invoices which are basically only needed to look
>> something up if there is a problem...
>>
>> Kirk, I already tried changing the properties of the column in which I
>> store the images.. (Currently it is an longtext, but before this I
>> always used an Longblob...)
>>
>> I can't remember the exact sizes of MySQL, but I believe that an
>> Mediumblob can handle 16 Megabyte..  (I know have little more than a 1
>> MB..)
>>
>> I will try some things tomorrow, but I can't find out what the problem
>> is.. (Column size, PHP-Mysql string length limitation or maybe
>> something I am overlooking..)
>>
>> I can though echo the query to screen and see that the uploaded file
>> is encoded to a very nice (large) text-string..
>>
>> Any other suggestions are greatly appreciated.
>>
>> With kind regards,
>> David Bouw
>>
>>
>>
>>
>>
>>>If I use the link to the file, i.e.
>>>
>>>   file//C:\filedir\file.pdf or .txt or whatever
>>>
>>>how do I  insert/update/delete the file since MySQL is holding only
>>>the link?
>>>
>>>BTW David, what are the properties of the field you are inserting to?
>>>Could that be the problem?
>>>
>>>-Kirk
>>>
>>>"Julio Nobrega Trabalhando" <[EMAIL PROTECTED]> wrote in message
>>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>>
  Instead of uploading to Mysql, why don't you store the file at a
>>>
>>>directory
>>>
and on Mysql only the path to it?

  Retrieving files from the hard drive is much faster than doing the
  same
>>>
>>>on
>>>
Mysql, and also access to manipulation (insert, update, delete,
etc...)

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"David Bouw" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

>I can't seem to figure out the following.
>
>I use the http upload functions a lot, works great!!..
>For some months now I have been using a small PHP program
>which I use to upload PDF files of scanned documents and
>insert them into a Mysql table..
>
>Normally these files are small (<250 kb), but I now have a
>PDF of 1 MB... When uploading files I run the
>function: chunk_split(base64_encode($binaryfile));
>to encode it, this to transform the binary file to text.. (Works

>>>great!!!)
>>>
>When the query was called to insert the data, nothing happens, also
>no error from mysql...  Only think I can think of is that the mysql
>query string is to long.. ??  (The data when encoded is about 1.3 MB
>of text)..
>
>This is the source code..
>
>if (!($userfile_size == 0))
>   {$fd = fopen ($userfile, "r");
>$contents = fread ($fd, filesize ($userfile));
>fclose ($fd);
>unlink ($userfile);
>echo "Eerste RAW: ".strlen($contents);
>$encodes_data = chunk_split(base64_encode($contents));
>$userfile_name = str_replace(" ", "", "$userfile_name");
>echo strlen($encodes_data)." - Displays text size ";
>//Works

right!

>mysql ($databasename_boekhoud, "insert mubo_boekhoud_images
>(data,
>originalname, groep, type)
>values '$encodes_data', '$userfile_name', '$groep',
>'$userfile_type')");

//

>mysql_error(); //No error given..?
>  }
>
>Any suggestions are very much appreciated...
>
>With kind regards,
>David Bouw
>
>


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

RE: [PHP] Creating mail account on Linux server

2002-05-07 Thread Sysadmin

Ok, so it's a bad idea :-)  I'm aware of the security risks I'm dealing 
with here, but thanks to all those who gave me some ideas to go with.  
This WILL NOT be on a production machine, it's on my internal network 
and I'm just playing with it to see what I can do.  Have a nice day and 
thanks to all for the help.

-Original Message-
From: Dan Hardiker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:47 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Creating mail account on Linux server


>> I'm curious about the same thing.  RedHat 7.2 with default IMAP.
>> > How can I create a mail account on Linux server with PHP ?

If you check the list, you will see a reply from myself with a list of
questions you need to answer for us to begin to help you.

> In general, if people need to ask such a question, then they really 
are
> not  ready, or do not understand the security implications of creating
> mail  accounts on a server.

I agree with Jason here.

1. An IMAP account != a mail account, thats just a MAA (Mail Access 
Agent)
which allows you to read mail from a file/dir/storage space on your
machine. I use Courier IMAP for that (using ./Maildir).
2. We need to know your MTA and MDA in order to even begin to help
3. On a "default" RedHat setup you need root access (as in you need give
your php script root access) in order to perform what your asking. If 
that
doesnt ring alarm bells, please type "halt" at your RedHat console now.

> The first thing you need to ask yourself is why would you want to do
> it?

For the most part, I use these sort of functions from a PHP script to
administrate my system and give customers automated access to modify 
their
own domains. (This is all done through a MySQL firewall [as in data gets
put into MySQL from the interface, and then read by backend scripts 
that do
the dirty work - unconnected to the frontend interface for security ...
incase anyone was about to tell me what they think a firewall is])

Although I can't see these two people having the unix know-how in order 
to
build such a system, let alone securely.

I would make some bitchy underhanded comments about their Mother's and 
the
local Ameaoba slut relating to their IQ ... but I wont, cuz Im not like
that ;) heh

Jason: what dya recon on people being licensed to be able to run a unix
style operating system? heh Hell lets license people to use computers.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



-- 
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] Who's having a good hosting experience these days?

2002-05-07 Thread Francisco Reyes

On Sun, 5 May 2002, Marcus James Christian wrote:

> about $11ish or less a month.  Traffic is minimal, and like I say the
> only tech support calls I've had to make this past year were when the
> hosting service tweeked and freaked something thus messing it all up.

You did not mention your requirements.
Do you need a database? If so which one?
I use two companies and have had different experiences both good and bad
with them. The first issue is to define what are your needs then you can
start looking.


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




RE: [PHP] Self Destruct code

2002-05-07 Thread Cal Evans

IANAL!

It's against the law in most states to create booby-traps in your code.

As others have suggested, don't turn over the code until you've received
payment. IMHO, you really should have specified the payment schedule in your
contract.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:20 AM
To: php-general
Subject: [PHP] Self Destruct code


Hi
I have a funny request; I wrote a system for a client and am rather
concerned that I am not going to receive payment for the work done. They
want me to hand over the code before they are willing to pay, so
basically I will be left at their mercy; if they don't pay, they will
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that
are time related etc. Something that will bomb the mysql tables or break
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools
etc, so I'm open for suggestions.
PS, I know about Zend's encrypter, but since it will live on their
server, I don't think it will help much since they will need the
decrypter on there anyway right?

Thanks


--
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] Self Destruct code

2002-05-07 Thread Sysadmin

Or you could set up an automated "IMAP Account Creater."  That should 
pretty much take care of things from the way things sound around 
here:-) 

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 11:15 AM
To: PHPCoder; php-general
Subject: RE: [PHP] Self Destruct code


IANAL!

It's against the law in most states to create booby-traps in your code.

As others have suggested, don't turn over the code until you've received
payment. IMHO, you really should have specified the payment schedule in 
your
contract.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:20 AM
To: php-general
Subject: [PHP] Self Destruct code


Hi
I have a funny request; I wrote a system for a client and am rather
concerned that I am not going to receive payment for the work done. They
want me to hand over the code before they are willing to pay, so
basically I will be left at their mercy; if they don't pay, they will
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that
are time related etc. Something that will bomb the mysql tables or break
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools
etc, so I'm open for suggestions.
PS, I know about Zend's encrypter, but since it will live on their
server, I don't think it will help much since they will need the
decrypter on there anyway right?

Thanks


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


RE: [PHP] Tailing a log file {!?}

2002-05-07 Thread .ben

IIS produced plain-text log files, this is what i'd like to tail ideally.

cheers.

 .ben

> -Original Message-
> From: David Freeman [mailto:[EMAIL PROTECTED]]
> Sent: 06 May 2002 02:01
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Tailing a log file {!?}
> 
> 
> 
>  > Is there a tail util for NT/W2K?
> 
> Almost certainly there will be a tool that will read the end of files.
> The problem will be in what you want to look at.  If you want to look at
> log files on NT/2K then, AFAIK, they aren't actually vanilla text files
> so a tail util won't do the job.  I'm not actually sitting near an NT/2K
> box at the moment so I can't check that for certain.
> 
> 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] Self Destruct code

2002-05-07 Thread Collins, Robert

Does it have to be a booby-trap or will some little annoyance like a
shareware popup that would just aggravate the heck out of them do the trick?

Robert W. Collins II 
Webmaster 
New Orleans Regional Transit Authority 
Phone : (504) 248-3826 
Email : [EMAIL PROTECTED] 



-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 10:15 AM
To: PHPCoder; php-general
Subject: RE: [PHP] Self Destruct code


IANAL!

It's against the law in most states to create booby-traps in your code.

As others have suggested, don't turn over the code until you've received
payment. IMHO, you really should have specified the payment schedule in your
contract.

=C=

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*


-Original Message-
From: PHPCoder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 07, 2002 3:20 AM
To: php-general
Subject: [PHP] Self Destruct code


Hi
I have a funny request; I wrote a system for a client and am rather
concerned that I am not going to receive payment for the work done. They
want me to hand over the code before they are willing to pay, so
basically I will be left at their mercy; if they don't pay, they will
still have a working version of the system...
So, is there any way I can inconspicuously code in some boo-boo's that
are time related etc. Something that will bomb the mysql tables or break
some code if it is not "unlocked" within a month etc.
I'm not sure if people out tjere might have existing safeguard tools
etc, so I'm open for suggestions.
PS, I know about Zend's encrypter, but since it will live on their
server, I don't think it will help much since they will need the
decrypter on there anyway right?

Thanks


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




Re: [PHP] Creating mail account on Linux server

2002-05-07 Thread Liam MacKenzie

I don't know, can it be done?
http://scripts.operationenigma.net/adduser.php



- Original Message - 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 08, 2002 12:06 AM
Subject: Re: [PHP] Creating mail account on Linux server


On Tuesday 07 May 2002 22:02, Rosen wrote:
> Hi,
> How can I create a mail account on Linux server with PHP ?

Depends on what mail server you have and how it is set up.

> Can I do it ?

In theory yes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Don't tell me what you dreamed last night for I've been reading Freud.
*/

-- 
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] File upload problem

2002-05-07 Thread Linn Kubler

I put the max file size tag into my code but that didn't help either.  What
looks like is happening is that the php file can't be found.  I'm using
phpscriptcenter's upload.php program and it is all in one script, if you
know what I mean.

What I'm seeing now is that, depending on the size of the file that I select
to upload, it doesn't look like the form is being processed correctly.  I
changed the action of the form to point to a simple html file and I get the
same results, page cannot be displayed.  But this only happens when I pick a
file that's 15MB or larger, pick a file that's smaller, in this case a few
KB, and it works as expected.  Not sure what to look for next.

Thanks for all the help,
Linn

"David Freeman" <[EMAIL PROTECTED]> wrote in message
002701c1f562$b1501460$[EMAIL PROTECTED]">news:002701c1f562$b1501460$[EMAIL PROTECTED]...
>
>  > -Original Message-
>
>  > 
>
> You actually _need_ that hidden tag set AFAIK.
>
> CYA, Dave
>
>



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




[PHP] Re: rand(0,1) does seem to get more often 1

2002-05-07 Thread J Smith


Running the code with such a small number of trials will likely cause skewed 
results one way or the other.

I ran this code and consistently got around the 50-50 split you'd expect:



J


Andy wrote:

> Hi there,
> 
> I am wondering if it is possible that this function tends to be more often
> 1. I do get 8 of 10 times 1.
> 
>   srand((double)microtime()*100);
>   if (rand(0,1) == 1){
> code...
> 
> it looks ok to me.
> 
> Thanx for any help,
> 
> Andy


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




Re: [PHP] copy protection

2002-05-07 Thread Udo Giacomozzi

[EMAIL PROTECTED] (Chris) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

> I found this on the web one day, though I've never used it or played
> around with it.  It does make the code a pain to read though if it
> does anything close to the sample on the page.  Plus, its free.
> 
> http://pobs.mywalhalla.net
> 

Thanks for the link!

Udo

Posted by ELKNews 1.0.4-B
Empower your News Reader! http://www.atozedsoftware.com

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




RE: [PHP] Re: Making a Client-side HTTPS Request

2002-05-07 Thread .ben

> Jonathan Rosenberg wrote:
> > I would like to be able to make a client side HTTPS request from
> > one of my pages.  From searching around, I see that I can do
> > everything I want using the CURL library.  But the ISP I am using
> > does not have the CURL library installed.
> >
> > I'll ask them if they'll install this library.  But, assuming
> > they don't, do I have any other options for doing what I want?
> >
> > --
> > JR
> >
>
> Even if they don't have it compiled into PHP, they might have curl
> installed and available from the command line.

If you want to do CLEINT-side HTTP requests i think you can use the
MSXML-HTTP object within JS, but only if the objects are installed, and this
may only be avail inside IE5.5>

However, if you want to do it on the server you can do it using sockets.

someone helped me with this a month or so ago, mail me for the code.

 .b


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




[PHP] Unsetting PHP_AUTH_USER

2002-05-07 Thread Mark Virtue

I'm having a devil of a time trying to "unset" the built-in global
$PHP_AUTH_USER.  My aim is to have a "logout" button.
 
Obviously the first thing to try is unset($PHP_AUTH_USER).  No good -
when I refresh the page it's back.
 
Then I tried unset($_SERVER['PHP_AUTH_USER']) - same deal.  I also tried
session_destroy() and unset($_COOKIE[session_name()]).  All failed - as
soon as I refresh the page, the $PHP_AUTH_USER value is restored.
 
I heard that if you send the header lines:
 
Header('WWW-Authenticate: Basic realm="My Realm"');
Header("HTTP/1.0 401 Unauthorized");

...then the browser clear its authentication cache (and the value is
forgotten), but those lines also cause that username/password dialog to
pop up.  That's not what I want.  I want logout functionality, not log
in again functionality.
 
Anyone know how to make the value of $PHP_AUTH_USER get completely
forgotten via a couple of simple lines of code?  It should be easy - how
many sites out there do you see with a "log out" button?
 
Mark.
 
P.S.  The logout facility in phpMyAdmin has problems - it's actually a
"relogin" facility, and if you supply the same username and password you
don't get logged in.
 



Re: [PHP] Unsetting PHP_AUTH_USER

2002-05-07 Thread Rasmus Lerdorf

You don't unset the variable.  The variable comes from your browser
sending an Authenticate http request header, so as long as the browser
sends this header, the variable is going to get created.  The way to unset
it is then to stop the browser from sending this Authenticate header.

Currently there is no way to tell a browser to not send this header
cleanly.  Sending a 401 is the only way, but as you mentioned that pops up
the login button.  So basically you will have to layer some additional
mechanism on top of the http auth system to achieve what you want.

-Rasmus

 On Wed, 8 May 2002, Mark Virtue wrote:

> I'm having a devil of a time trying to "unset" the built-in global
> $PHP_AUTH_USER.  My aim is to have a "logout" button.
>
> Obviously the first thing to try is unset($PHP_AUTH_USER).  No good -
> when I refresh the page it's back.
>
> Then I tried unset($_SERVER['PHP_AUTH_USER']) - same deal.  I also tried
> session_destroy() and unset($_COOKIE[session_name()]).  All failed - as
> soon as I refresh the page, the $PHP_AUTH_USER value is restored.
>
> I heard that if you send the header lines:
>
> Header('WWW-Authenticate: Basic realm="My Realm"');
> Header("HTTP/1.0 401 Unauthorized");
>
> ...then the browser clear its authentication cache (and the value is
> forgotten), but those lines also cause that username/password dialog to
> pop up.  That's not what I want.  I want logout functionality, not log
> in again functionality.
>
> Anyone know how to make the value of $PHP_AUTH_USER get completely
> forgotten via a couple of simple lines of code?  It should be easy - how
> many sites out there do you see with a "log out" button?
>
> Mark.
>
> P.S.  The logout facility in phpMyAdmin has problems - it's actually a
> "relogin" facility, and if you supply the same username and password you
> don't get logged in.
>
>


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




[PHP] var-vars question

2002-05-07 Thread heinisch

Hi folks,
Linux, PHP3

I have the following problem:
I have an object, which creates a form, wherein there are selects, which
names accord to values in the database.

But I didn´t get it to have a variable var, I´m sure it´s just a small 
thing, but I cannot see it
Any suggestions ?
TIA Oliver

echo '';
// Already tried post, no difference
echo '';
while($da=$MKA -> getDbAns()) // This gives back an array named $da 
while there are answers
{

   $xwert=$da[1];

//  $da[1] contains "abc" the var  $xwert will be "abc" 

// now I´d like to see the value of $abc but there´s nothing in

   echo ' '.$$xwert.'';

// set the new select named "abc"
   echo '';

// forget the rest, just for understanding what while does
   for($i=0; $i < 11 ; $i++)
   {
  if(isset($$da[1])) // just for testing
  {
 echo "".$i."";
  }
  else
  {
 echo "".$i."";
  }
   } // end for
   echo '';
   echo '';
   echo ''.$da[1].'';
   echo ''.$da[2].'';
   echo ''.$da[3].' EUR';
   echo '';
} // end while
echo '';
echo '';
echo "";


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




Re: [PHP] File upload problem

2002-05-07 Thread Jason Wong

On Tuesday 07 May 2002 19:09, David Freeman wrote:
>  > -Original Message-
>  > Hmm, after a bit of testing I find that the MAX_FILE_SIZE
>  > tag is useless to say the least (probably because no browsers support
>
> it?)
>
> That's somewhat of a shame I guess but I can hardly claim to be
> surprised - especially as I've just spent much of my time in the last
> couple of days wrestling with browser rendering compatibility issues for
> a client's web site - from which my only significant conclusion was that
> Netscape sucks.
>
>  > 1) you still have to wait for the whole 5MB to be uploaded
>  > 2) php sees the MAX_FILE_SIZE setting is exceeded then
>  > discards the file
>
> An opportunity to do something lost - although I guess you might be able
> to do some javascripting to achieve the same.  But then, that wouldn't
> require you to have the hidden field either.

Done some more tests. The good news is that it seems that browsers can and do 
respect the limits set on the server (php.ini). For example in php.ini I set 
the "post_max_size" to 32M then when I upload a 33M file, the browser has a 
quick word with the server and ascertains that the file is over the limit and 
stops.

The bad news is that out of Opera, NN and IE only Opera works properly in 
this respect. NN uploads the file then gives "Network Error: Connection reset 
by peer". IE uploads the file then gives "Cannot find server, page cannot be 
displayed" (!!).

These were quick and dirty tests and should not be taken as gospel.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If a man has talent and cannot use it, he has failed.
-- Thomas Wolfe
*/

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




  1   2   >