[PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel

Good morning friends,

I have a script that collects data from a form and puts together a mysql 
query to search a database.
Now, everything worked fine until I added a few new form fields... now the 
$_POST['var'] don't reach the script...


I have about 20 to 25 form fields which are all taken into the query...

Now my question: is there a limit in the fields that I can use in the query 
string to query the database? Somehow the script doesn't even output the 
value of the POST data anymore... been using this stuff for years now, and 
i'm feeling really silly at the moment.


I'd appreciate any help.

Cheers!
Chris 


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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta:
 Good morning friends,
 
 I have a script that collects data from a form and puts together a mysql 
 query to search a database.
 Now, everything worked fine until I added a few new form fields... now the 
 $_POST['var'] don't reach the script...
 
 I have about 20 to 25 form fields which are all taken into the query...
 
 Now my question: is there a limit in the fields that I can use in the query 
 string to query the database? Somehow the script doesn't even output the 
 value of the POST data anymore... been using this stuff for years now, and 
 i'm feeling really silly at the moment.

AFAIK there is no limit in the number of fields in a query...
post some code please, otherwise I don't think anyone will be able to
help you

greets
Zoltán Németh

 
 I'd appreciate any help.
 
 Cheers!
 Chris 
 

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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel
Right, here we go... this page has about 1000 lines of code, so here the 
relevant stuff.


$s_query = SELECT * FROM database WHERE
kategorie LIKE '$s_cat' AND
marke LIKE '$s_marke' AND
leistung_kw = '$kw_von' AND leistung_kw = '$kw_bis' AND
preis = '$s_preis_von' AND
preis = '$s_preis_bis'.$checkboxes.$sort_str;

I get the $checkboxes from the POST checkboxes, which looks like this (an 
example):


$kraftstoffart = $_POST['fueltype'];
if($kraftstoffart == 3) {
$checkboxes .= ;
}elseif($kraftstoffart == 2) {
$checkboxes .=  AND kraftstoffart = '2';
}elseif($kraftstoffart == 1) {
$checkboxes .=  AND kraftstoffart = '1';
}

and the $sort_str comes in like

$sort_by = $_POST['sort_by'];
$desc_asc = $_POST['desc_asc'];
$sort_str =  ORDER BY .$sort_by. .$desc_asc;


The query then just goes like
$do_q   = mysql_query($s_query) or die(mysql_error());

and that's it...  no errors shown, just the regular output which I had 
before I put the new fields in there. So no changes to what I've had 
before... but there should be changes *g*


I hope anybody can find some sense in what I'm writing here... hardly makes 
sense to me :oP


Cheers!







- Original Message - 
From: Zoltán Németh [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, May 21, 2007 9:36 AM
Subject: Re: [PHP] PHP  MySQL Problem



2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta:

Good morning friends,

I have a script that collects data from a form and puts together a mysql
query to search a database.
Now, everything worked fine until I added a few new form fields... now 
the

$_POST['var'] don't reach the script...

I have about 20 to 25 form fields which are all taken into the query...

Now my question: is there a limit in the fields that I can use in the 
query

string to query the database? Somehow the script doesn't even output the
value of the POST data anymore... been using this stuff for years now, 
and

i'm feeling really silly at the moment.


AFAIK there is no limit in the number of fields in a query...
post some code please, otherwise I don't think anyone will be able to
help you

greets
Zoltán Németh



I'd appreciate any help.

Cheers!
Chris





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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta:
 Right, here we go... this page has about 1000 lines of code, so here the 
 relevant stuff.
 
 $s_query = SELECT * FROM database WHERE
  kategorie LIKE '$s_cat' AND
  marke LIKE '$s_marke' AND
  leistung_kw = '$kw_von' AND leistung_kw = '$kw_bis' AND
  preis = '$s_preis_von' AND
  preis = '$s_preis_bis'.$checkboxes.$sort_str;
 
 I get the $checkboxes from the POST checkboxes, which looks like this (an 
 example):
 
 $kraftstoffart = $_POST['fueltype'];
 if($kraftstoffart == 3) {
  $checkboxes .= ;
 }elseif($kraftstoffart == 2) {
  $checkboxes .=  AND kraftstoffart = '2';
 }elseif($kraftstoffart == 1) {
  $checkboxes .=  AND kraftstoffart = '1';
 }
 
 and the $sort_str comes in like
 
 $sort_by = $_POST['sort_by'];
 $desc_asc = $_POST['desc_asc'];
 $sort_str =  ORDER BY .$sort_by. .$desc_asc;
 
 
 The query then just goes like
 $do_q   = mysql_query($s_query) or die(mysql_error());
 
 and that's it...  no errors shown, just the regular output which I had 
 before I put the new fields in there. So no changes to what I've had 
 before... but there should be changes *g*

actually there seems to be no problem with your query (besides that you
should check posted values first in order to avoid SQL injection)

you said in your first letter that $_POST['var'] don't reach the
script - I would guess the relevant part is not the query but rather
the form itself...

greets
Zoltán Németh

 
 I hope anybody can find some sense in what I'm writing here... hardly makes 
 sense to me :oP
 
 Cheers!
 
 
 
 
 
 
 
 - Original Message - 
 From: Zoltán Németh [EMAIL PROTECTED]
 To: Christian Haensel [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Sent: Monday, May 21, 2007 9:36 AM
 Subject: Re: [PHP] PHP  MySQL Problem
 
 
  2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta:
  Good morning friends,
 
  I have a script that collects data from a form and puts together a mysql
  query to search a database.
  Now, everything worked fine until I added a few new form fields... now 
  the
  $_POST['var'] don't reach the script...
 
  I have about 20 to 25 form fields which are all taken into the query...
 
  Now my question: is there a limit in the fields that I can use in the 
  query
  string to query the database? Somehow the script doesn't even output the
  value of the POST data anymore... been using this stuff for years now, 
  and
  i'm feeling really silly at the moment.
 
  AFAIK there is no limit in the number of fields in a query...
  post some code please, otherwise I don't think anyone will be able to
  help you
 
  greets
  Zoltán Németh
 
 
  I'd appreciate any help.
 
  Cheers!
  Chris
 
  
 

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



[PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Jonathan

[EMAIL PROTECTED] wrote:

I am in the process of adding a part to my website which would include
pictures, pdf files, txt files, and excel files.  The files sizes
could be anywhere on average of 100k to 2mb.  Do you think I should be
uploading the files to a MySQL database or to my server?

I have head that there are pros and cons to both, but have never
really received a definitive answer that helps much.  I appreciate all
your opinions on the pros and cons of both.


benc11,

I store most of my data in both. when i do image processing i usually 
upload the image, store the original in the database, process the image 
into its subsequent sizes or resolutions and store them on the file 
system. If the images get lost on the file system or my application can 
not find them I have the original stored in the db for reprocessing.


I store files other than images, PDF DOC etc...  in the database and on 
the file system. i serve the document from the file system because 
regardless of the thread of conversation it is in my experience that 99% 
of the time it is faster to do so. if its not found i know i have a fall 
back in that it is also stored in the database so i serve that.


Sure my method uses more storage space, but I sleep at night knowing I 
have added redundancy.


Kind regards,

Jonathan

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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel

I thought so, too. But the part where it receives the data is this:

$s_marke  = $_POST['marke'];
$s_modell  = $_POST['modell'];
$s_preis_von = $_POST['preis_von'];
$s_preis_bis = $_POST['preis_bis'];
$s_mileage_von = $_POST['mileage_from'];
$s_mileage_bis = $_POST['mileage_to'];
$s_ez_von  = $_POST['ez_from'];
$s_ez_bis  = $_POST['ez_bis'];
$s_search_text = $_POST['search_text'];
$s_cat   = $_POST['cat'];
$kw_von   = $_POST['kw_von'];
$kw_bis   = $_POST['kw_bis'];

(part of it)

And this is the relevant part of the form

select name=kw_von
 option selected=selected value=0***/option
 option value=/60/option

 option value=/75/option
 option value=/90/option
 option value=8181/110/option
 option value=9292/125/option
 option value=110110/150/option
 option value=147147/200/option
 option value=184184/250/option
 option value=220220/300/option
 option value=257257/350/option
/select

The funny thing is that all vars are being received except for the last two:
$kw_von   = $_POST['kw_von'];
$kw_bis   = $_POST['kw_bis'];

I am s stuck here, it ain't even funny anymore *g* And my boss is, of 
course, waiting for a result. Howcome people don't get that programming 
sometimes really IS leaning back and closing your eyes *gr* :oP


Thanks for trying to help me :o)

Chris

- Original Message - 
From: Zoltán Németh [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, May 21, 2007 9:58 AM
Subject: Re: [PHP] PHP  MySQL Problem



2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta:

Right, here we go... this page has about 1000 lines of code, so here the
relevant stuff.

$s_query = SELECT * FROM database WHERE
 kategorie LIKE '$s_cat' AND
 marke LIKE '$s_marke' AND
 leistung_kw = '$kw_von' AND leistung_kw = '$kw_bis' AND
 preis = '$s_preis_von' AND
 preis = '$s_preis_bis'.$checkboxes.$sort_str;

I get the $checkboxes from the POST checkboxes, which looks like this (an
example):

$kraftstoffart = $_POST['fueltype'];
if($kraftstoffart == 3) {
 $checkboxes .= ;
}elseif($kraftstoffart == 2) {
 $checkboxes .=  AND kraftstoffart = '2';
}elseif($kraftstoffart == 1) {
 $checkboxes .=  AND kraftstoffart = '1';
}

and the $sort_str comes in like

$sort_by = $_POST['sort_by'];
$desc_asc = $_POST['desc_asc'];
$sort_str =  ORDER BY .$sort_by. .$desc_asc;


The query then just goes like
$do_q   = mysql_query($s_query) or die(mysql_error());

and that's it...  no errors shown, just the regular output which I had
before I put the new fields in there. So no changes to what I've had
before... but there should be changes *g*


actually there seems to be no problem with your query (besides that you
should check posted values first in order to avoid SQL injection)

you said in your first letter that $_POST['var'] don't reach the
script - I would guess the relevant part is not the query but rather
the form itself...

greets
Zoltán Németh



I hope anybody can find some sense in what I'm writing here... hardly 
makes

sense to me :oP

Cheers!







- Original Message - 
From: Zoltán Németh [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, May 21, 2007 9:36 AM
Subject: Re: [PHP] PHP  MySQL Problem


 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta:
 Good morning friends,

 I have a script that collects data from a form and puts together a 
 mysql

 query to search a database.
 Now, everything worked fine until I added a few new form fields... now
 the
 $_POST['var'] don't reach the script...

 I have about 20 to 25 form fields which are all taken into the 
 query...


 Now my question: is there a limit in the fields that I can use in the
 query
 string to query the database? Somehow the script doesn't even output 
 the

 value of the POST data anymore... been using this stuff for years now,
 and
 i'm feeling really silly at the moment.

 AFAIK there is no limit in the number of fields in a query...
 post some code please, otherwise I don't think anyone will be able to
 help you

 greets
 Zoltán Németh


 I'd appreciate any help.

 Cheers!
 Chris







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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Zoltán Németh
2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta:
 I thought so, too. But the part where it receives the data is this:
 
 $s_marke  = $_POST['marke'];
 $s_modell  = $_POST['modell'];
 $s_preis_von = $_POST['preis_von'];
 $s_preis_bis = $_POST['preis_bis'];
 $s_mileage_von = $_POST['mileage_from'];
 $s_mileage_bis = $_POST['mileage_to'];
 $s_ez_von  = $_POST['ez_from'];
 $s_ez_bis  = $_POST['ez_bis'];
 $s_search_text = $_POST['search_text'];
 $s_cat   = $_POST['cat'];
 $kw_von   = $_POST['kw_von'];
 $kw_bis   = $_POST['kw_bis'];
 
 (part of it)
 
 And this is the relevant part of the form
 
 select name=kw_von
   option selected=selected value=0***/option
   option value=/60/option
 
   option value=/75/option
   option value=/90/option
   option value=8181/110/option
   option value=9292/125/option
   option value=110110/150/option
   option value=147147/200/option
   option value=184184/250/option
   option value=220220/300/option
   option value=257257/350/option
  /select
 
 The funny thing is that all vars are being received except for the last two:
 $kw_von   = $_POST['kw_von'];
 $kw_bis   = $_POST['kw_bis'];

and if you do a var_dump($_POST) what do you get?
are these values not showing up at all?
if so, then you should check whether they are within the form and
/form tags... I made that mistake once...

greets
Zoltán Németh

 
 I am s stuck here, it ain't even funny anymore *g* And my boss is, of 
 course, waiting for a result. Howcome people don't get that programming 
 sometimes really IS leaning back and closing your eyes *gr* :oP
 
 Thanks for trying to help me :o)
 
 Chris
 
 - Original Message - 
 From: Zoltán Németh [EMAIL PROTECTED]
 To: Christian Haensel [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Sent: Monday, May 21, 2007 9:58 AM
 Subject: Re: [PHP] PHP  MySQL Problem
 
 
  2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta:
  Right, here we go... this page has about 1000 lines of code, so here the
  relevant stuff.
 
  $s_query = SELECT * FROM database WHERE
   kategorie LIKE '$s_cat' AND
   marke LIKE '$s_marke' AND
   leistung_kw = '$kw_von' AND leistung_kw = '$kw_bis' AND
   preis = '$s_preis_von' AND
   preis = '$s_preis_bis'.$checkboxes.$sort_str;
 
  I get the $checkboxes from the POST checkboxes, which looks like this (an
  example):
 
  $kraftstoffart = $_POST['fueltype'];
  if($kraftstoffart == 3) {
   $checkboxes .= ;
  }elseif($kraftstoffart == 2) {
   $checkboxes .=  AND kraftstoffart = '2';
  }elseif($kraftstoffart == 1) {
   $checkboxes .=  AND kraftstoffart = '1';
  }
 
  and the $sort_str comes in like
 
  $sort_by = $_POST['sort_by'];
  $desc_asc = $_POST['desc_asc'];
  $sort_str =  ORDER BY .$sort_by. .$desc_asc;
 
 
  The query then just goes like
  $do_q   = mysql_query($s_query) or die(mysql_error());
 
  and that's it...  no errors shown, just the regular output which I had
  before I put the new fields in there. So no changes to what I've had
  before... but there should be changes *g*
 
  actually there seems to be no problem with your query (besides that you
  should check posted values first in order to avoid SQL injection)
 
  you said in your first letter that $_POST['var'] don't reach the
  script - I would guess the relevant part is not the query but rather
  the form itself...
 
  greets
  Zoltán Németh
 
 
  I hope anybody can find some sense in what I'm writing here... hardly 
  makes
  sense to me :oP
 
  Cheers!
 
 
 
 
 
 
 
  - Original Message - 
  From: Zoltán Németh [EMAIL PROTECTED]
  To: Christian Haensel [EMAIL PROTECTED]
  Cc: php-general@lists.php.net
  Sent: Monday, May 21, 2007 9:36 AM
  Subject: Re: [PHP] PHP  MySQL Problem
 
 
   2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta:
   Good morning friends,
  
   I have a script that collects data from a form and puts together a 
   mysql
   query to search a database.
   Now, everything worked fine until I added a few new form fields... now
   the
   $_POST['var'] don't reach the script...
  
   I have about 20 to 25 form fields which are all taken into the 
   query...
  
   Now my question: is there a limit in the fields that I can use in the
   query
   string to query the database? Somehow the script doesn't even output 
   the
   value of the POST data anymore... been using this stuff for years now,
   and
   i'm feeling really silly at the moment.
  
   AFAIK there is no limit in the number of fields in a query...
   post some code please, otherwise I don't think anyone will be able to
   help you
  
   greets
   Zoltán Németh
  
  
   I'd appreciate any help.
  
   Cheers!
   Chris
  
  
 
  
 

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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel

Guys

nevermind... stupid moron that I am I put a hidden action in the form whích 
I totally (!!) forgot... All my code is fine so far, and all is working 
perfectly... now that bloddy thing cost me 3 DAYS of work... sometimes I 
wonder if I should rather sell shoes than calling myself a webdeveloper and 
work at that job all day long... geez!


Anyhow, thanks for your help guys... time for Aspirin over here... laterz!

Chris

- Original Message - 
From: Zoltán Németh [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, May 21, 2007 10:16 AM
Subject: Re: [PHP] PHP  MySQL Problem



2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta:

I thought so, too. But the part where it receives the data is this:

$s_marke  = $_POST['marke'];
$s_modell  = $_POST['modell'];
$s_preis_von = $_POST['preis_von'];
$s_preis_bis = $_POST['preis_bis'];
$s_mileage_von = $_POST['mileage_from'];
$s_mileage_bis = $_POST['mileage_to'];
$s_ez_von  = $_POST['ez_from'];
$s_ez_bis  = $_POST['ez_bis'];
$s_search_text = $_POST['search_text'];
$s_cat   = $_POST['cat'];
$kw_von   = $_POST['kw_von'];
$kw_bis   = $_POST['kw_bis'];

(part of it)

And this is the relevant part of the form

select name=kw_von
  option selected=selected value=0***/option
  option value=/60/option

  option value=/75/option
  option value=/90/option
  option value=8181/110/option
  option value=9292/125/option
  option value=110110/150/option
  option value=147147/200/option
  option value=184184/250/option
  option value=220220/300/option
  option value=257257/350/option
 /select

The funny thing is that all vars are being received except for the last 
two:

$kw_von   = $_POST['kw_von'];
$kw_bis   = $_POST['kw_bis'];


and if you do a var_dump($_POST) what do you get?
are these values not showing up at all?
if so, then you should check whether they are within the form and
/form tags... I made that mistake once...

greets
Zoltán Németh



I am s stuck here, it ain't even funny anymore *g* And my boss is, of
course, waiting for a result. Howcome people don't get that programming
sometimes really IS leaning back and closing your eyes *gr* :oP

Thanks for trying to help me :o)

Chris

- Original Message - 
From: Zoltán Németh [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, May 21, 2007 9:58 AM
Subject: Re: [PHP] PHP  MySQL Problem


 2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta:
 Right, here we go... this page has about 1000 lines of code, so here 
 the

 relevant stuff.

 $s_query = SELECT * FROM database WHERE
  kategorie LIKE '$s_cat' AND
  marke LIKE '$s_marke' AND
  leistung_kw = '$kw_von' AND leistung_kw = '$kw_bis' AND
  preis = '$s_preis_von' AND
  preis = '$s_preis_bis'.$checkboxes.$sort_str;

 I get the $checkboxes from the POST checkboxes, which looks like this 
 (an

 example):

 $kraftstoffart = $_POST['fueltype'];
 if($kraftstoffart == 3) {
  $checkboxes .= ;
 }elseif($kraftstoffart == 2) {
  $checkboxes .=  AND kraftstoffart = '2';
 }elseif($kraftstoffart == 1) {
  $checkboxes .=  AND kraftstoffart = '1';
 }

 and the $sort_str comes in like

 $sort_by = $_POST['sort_by'];
 $desc_asc = $_POST['desc_asc'];
 $sort_str =  ORDER BY .$sort_by. .$desc_asc;


 The query then just goes like
 $do_q   = mysql_query($s_query) or die(mysql_error());

 and that's it...  no errors shown, just the regular output which I had
 before I put the new fields in there. So no changes to what I've had
 before... but there should be changes *g*

 actually there seems to be no problem with your query (besides that you
 should check posted values first in order to avoid SQL injection)

 you said in your first letter that $_POST['var'] don't reach the
 script - I would guess the relevant part is not the query but rather
 the form itself...

 greets
 Zoltán Németh


 I hope anybody can find some sense in what I'm writing here... hardly
 makes
 sense to me :oP

 Cheers!







 - Original Message - 
 From: Zoltán Németh [EMAIL PROTECTED]

 To: Christian Haensel [EMAIL PROTECTED]
 Cc: php-general@lists.php.net
 Sent: Monday, May 21, 2007 9:36 AM
 Subject: Re: [PHP] PHP  MySQL Problem


  2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt 
  írta:

  Good morning friends,
 
  I have a script that collects data from a form and puts together a
  mysql
  query to search a database.
  Now, everything worked fine until I added a few new form fields... 
  now

  the
  $_POST['var'] don't reach the script...
 
  I have about 20 to 25 form fields which are all taken into the
  query...
 
  Now my question: is there a limit in the fields that I can use in 
  the

  query
  string to query the database? Somehow the script doesn't even 
  output

  the
  value of the POST data anymore... been using this stuff for years 
  now,

  and
  i'm feeling really silly at the moment.
 
  AFAIK there 

[PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Davey
Hi,

Quick question - does anyone know when PHP actually frees allocated
memory during the process of a script? I'm using 5.2.2. For example I
see the following results when profiling:

Memory: 256 KB
Load a 1024x768 JPEG (via GD)
Memory: 4 MB
Create thumbnail (via GD)
Memory: 5.2 MB
Destroy original image resource (imagedestroy)
Memory: 5.2 MB

I would have expected (or rather, hoped) that the memory use would
have dropped down quite dramatically after destroying the image
resource that was using up nearly 4MB of memory, but it didn't seem to
change.

Is this a limitation of the memory_get_usage(true) function, or does
imagedestroy not actually do what it implies?

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



Re[2]: [PHP] Confused about handling bytes

2007-05-21 Thread Tom Rogers
Hi,

Monday, May 21, 2007, 3:57:56 PM, you wrote:
TR Hi,

TR Monday, May 21, 2007, 10:50:27 AM, you wrote:
JV While I'm sure this is a stupid question and the solution will be 
JV obvious to everyone here, this is confusing me.

JV I'm trying to control a device over a serial port using a PHP script, 
JV and one of the things I need to do is read a 26-byte string from an 
JV EEPROM, using a command that returns two bytes at a time, and write 
JV similar strings using a similar command. For example, to read the first
JV two bytes of one such string beginning at address 0x484, I would send:

JV 04 84 00 00 BB

JV Here's the code I've written so far:

JV $string = 1; //which of 200 strings I want to read
JV $base = pack(H*,dechex((($string-1)*hexdec(0x1a))+hexdec(0x484))); 
JV //calculate the base address of the string (the first starts at 0x484)
JV for($i=0;$i  13;$i++) { //iterate 13 times (26 bytes / 2 bytes at a time)
JV dio_write($serial,$base.\x00\x00\xbb,5); //send the command
JV $output[] = dio_read($serial,1);  // read first byte
JV $output[] = dio_read($serial,1); // read second byte
JV $base = pack(H*,dechex(hexdec(bin2hex($base))+2)); //increment address
JV }

JV There are two things wrong with this. First, the final line isn't doing
JV what it's supposed to. Instead of adding 2 to the value of $base each 
JV time, It's producing a pattern like this:

JV 0x484, 0x486, 0x73, 0x73, 0x73, 0x488, 0x48a, 0x48c, 0x48e, 0x490, 0x74,
JV 0x74, 0x74

JV Second, the format of $base doesn't seem to be handled correctly in line
JV 4 of the above code. Given a value of 0x484, this line should write the
JV bytes 04 84, but it is obviously not doing so, given the response I 
JV get from the device (it sends FF FF instead of the expected value at
JV that address, which I get when I remove the variable and manually 
JV specify the address).

JV What are the solutions to these problems?

JV Thanks,
JV -Joe Veldhuis


TR Do your packing after all the calculations:

TR ?php
TR $output = array();
TR $string = 1;
TR for(
TR   $i=0, $base = (($string-1) * 26) + 0x484; 
TR   $i  26;
TR   $i++, $base += 2)
TR {
TR $binarydata = pack(nc*, $base, 0, 0, 0xBB);
TR dio_write($serial,$k=strlen($binarydata),5); //send the command
TR $output[] = dio_read($serial,1);  // read first byte
TR $output[] = dio_read($serial,1); // read second byte
TR }

TR -- 
TR regards,
TR Tom


I left some sebug in there, that should have been:

?php
$output = array();
$string = 1;
for(
  $i=0, $base = (($string-1) * 26) + 0x484; 
  $i  26;
  $i++, $base += 2)
{
$binarydata = pack(nc*, $base, 0, 0, 0xBB);
dio_write($serial,$binarydata,5); //send the command
$output[] = dio_read($serial,1);  // read first byte
$output[] = dio_read($serial,1); // read second byte
}

-- 
regards,
Tom

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



[PHP] Timezone DB update frequency

2007-05-21 Thread Rob Desbois

I am responsible for development of a product using PHP, which is
distributed as a component of the product.

How often does the timezone DB (php_timezonedb.dll) actually *need* to be
updated? We would be responsible for this task via product updates so need
to know if the default DB shipped with PHP will become unsuitable and when /
how often.

Thanks,
--rob


Re: [PHP] Timezone DB update frequency

2007-05-21 Thread Crayon Shin Chan
On Monday 21 May 2007 19:33, Rob Desbois wrote:

 How often does the timezone DB (php_timezonedb.dll) actually *need* to
 be updated? 

Whenever jurisdictions around the world change their time?

-- 
Crayon

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



[PHP] [Linux] PHP and SQL Server

2007-05-21 Thread David BERCOT
Hi,

I'd like to connect to SQL Server (it is MSDE from SQL Server 2000) from
PHP.
My system is Debian.
I've installed FreeTDS and some dependencies...

Here is my /etc/freetds/freetds.conf :
[global]
# TDS protocol version
tds version = 4.2
[etemptation]
host = 10.21.2.203
port = 1433
tds version = 8.0

Then, my /etc/odbc.ini :
[etemptation]
Description = TDS MSSQL Server
Driver = /usr/lib/odbc/libtdsodbc.so
Server = 10.21.2.203
Database = etemptation
Port = 1433
TDS_Version = 8.0

And, my /etc/odbcinst.ini :
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver  = /usr/lib/odbc/libtdsodbc.so
Setup   = /usr/lib/odbc/libtdsS.so
CPTimeout   = 5
CPReuse = 5
UsageCount  = 1

My PHP test page is :
?php
$cnx = odbc_connect(etemptation, idep, password);
if(!$cnx)   {
echo 'problem connexion';
}
else{
echo 'connexion OK';
$sql =SELECT * from HOPPOIN;
$rs = odbc_exec($cnx,$sql);

while(odbc_fetch_row($rs))  {

}

odbc_free_result($rs);
odbc_close($cnx);
echo 'connexion fermee';
}
?

But the result is :
Warning: odbc_connect() [function.odbc-connect]: SQL error:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL
state S1000 in SQLConnect in /home/david.bercot/Internet/test_mssql.php
on line 2 problem connexion

I've also tried in a shell :
p3010-ac-nantes:/home/david.bercot/Internet# isql -v etemptation
src/tds/login.c: tds_connect: 10.21.2.203:1433: Connexion refusée
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[08S01][unixODBC][FreeTDS][SQL Server]Server is unavailable or does not
exist. [ISQL]ERROR: Could not SQLConnect

Do you have any idea for my problem ?

Thank you very much.

David.

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



Re: [PHP] [Linux] PHP and SQL Server

2007-05-21 Thread Mike Smith

On 5/21/07, David BERCOT [EMAIL PROTECTED] wrote:

Hi Mike,

Le Mon, 21 May 2007 10:24:52 -0400,
Mike Smith [EMAIL PROTECTED] a écrit :
 David,

 Is MSDE running in mixed mode authentication? I believe by default it
 only uses Windows authentication. If you're not sure you can readup on
 how to check (and change if necessary):

 http://support.microsoft.com/kb/325022

I've just had a look and MSDE is in mixed mode (2 !) :-(

Thank you.

David.

I vaguely remember having to add :1433 to the freetds.conf on one
Debian server. A quick google turns up this, but I think I put the
server:port on one line (i.e. 192.168.1.11:1433):

http://lists.evolt.org/archive/Week-of-Mon-20030915/148291.html


--
Mike

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



Re: [PHP] Re: Include files....

2007-05-21 Thread Jason Pruim

Hi Everyone,

Thanks for the info, putting the opening and closing tags in the  
include file worked like a charm! Now I just need to get the SQL  
injection protection junk to work... Back to the web to read more!





--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

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



[PHP] How can i help

2007-05-21 Thread James Savage
I am a PHP web programmer with a little bit more than basic knowledge. What 
could i do to help with developing PHP? 

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



RE: [PHP] How can i help

2007-05-21 Thread Jay Blanchard
You can participate in the developers list. 

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



Re: [PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Lynch
On Mon, May 21, 2007 4:23 am, Richard Davey wrote:
 Quick question - does anyone know when PHP actually frees allocated
 memory during the process of a script?

When it can be sure that a variable is no longer needed.

Specifically, when the .refcount of a zval turns to 0.

 I'm using 5.2.2. For example I
 see the following results when profiling:

 Memory: 256 KB
 Load a 1024x768 JPEG (via GD)
 Memory: 4 MB
 Create thumbnail (via GD)
 Memory: 5.2 MB
 Destroy original image resource (imagedestroy)

Try unset($image) as well, so PHP knows you no longer need access to
that variable that was holding all that stuff...

 Memory: 5.2 MB

 I would have expected (or rather, hoped) that the memory use would
 have dropped down quite dramatically after destroying the image
 resource that was using up nearly 4MB of memory, but it didn't seem to
 change.

How are you measuring this?

What version of PHP?

The Memory Manager changed over the course of time.

I'm also not at all sure that you *can* measure it as precisely as you
are trying to do.

 Is this a limitation of the memory_get_usage(true) function, or does
 imagedestroy not actually do what it implies?

Almost for sure imagedestroy() does what it should -- and GD frees up
the internal memory structures for that image.

PHP still has a variable sitting around pointing to that resource,
however, and you may need to notify PHP through unset() that you are
done with it.

That said:
PHP doesn't really allocate that 5.2M of RAM.
GD does.
PHP may not be able to tell you accurately about what GD is doing
internally -- but it's probably not *really* losing that 5.2M or you'd
hear an awful lot more screaming about it from all quarters. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Richard Lynch


On Sun, May 20, 2007 8:16 pm, [EMAIL PROTECTED] wrote:
 I am in the process of adding a part to my website which would include
 pictures, pdf files, txt files, and excel files.  The files sizes
 could be anywhere on average of 100k to 2mb.  Do you think I should be
 uploading the files to a MySQL database or to my server?

 I have head that there are pros and cons to both, but have never
 really received a definitive answer that helps much.  I appreciate all
 your opinions on the pros and cons of both.

We've pretty much beat this horse to death around here...

So I'll try to give just one sample of each:

DB PRO:
Deleting image data can be simpler.

DB CON:
Difficult to scale out the DB when it has so much blob data; easy to
set up image server to segment architecture when it's just a bunch
of files to move and a line of PHP code to change the base URL.

There are enough fanatics on both sides of this coin...
I'm in the put it in the file system camp.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Richard Lynch
On Sun, May 20, 2007 10:43 pm, Robert Cummings wrote:
 On Sun, 2007-05-20 at 20:35 -0500, Greg Donald wrote:
 On 5/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  I am in the process of adding a part to my website which would
 include
  pictures, pdf files, txt files, and excel files.  The files sizes
  could be anywhere on average of 100k to 2mb.  Do you think I
 should be
  uploading the files to a MySQL database or to my server?


 http://www.zend.com/zend/trick/tricks-sept-2001.php?id=342

 [snip]
 cuts performance by approximately a third
 [/snip]

 Sure, if you use database file storage in the naive way described in
 the
 document. But I'm quite certain a database stored binary file
 dispensed
 to multiple servers that keep a locally cached copy for subsequent
 requests beats NFS retrieval hands down. Sure, you could do the same
 caching with the NFS file but then the solution is quite likely just
 as
 good as the database storage solution. So the 1/3 performance penalty
 is
 for the naive solution.

Or you could put all the images on a multi-million dollar
content-distribution-network of image servers...

There are so many ways to skin this cat and make up a benchmark to
prove whatever you want to prove.

So just do whatever makes sense to you for your application at the tim
you do it, and accept the consequences, either way, down the road.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Richard Lynch
On Mon, May 21, 2007 2:26 am, Christian Haensel wrote:
 Good morning friends,

 I have a script that collects data from a form and puts together a
 mysql
 query to search a database.
 Now, everything worked fine until I added a few new form fields... now
 the
 $_POST['var'] don't reach the script...

 I have about 20 to 25 form fields which are all taken into the
 query...

 Now my question: is there a limit in the fields that I can use in the
 query
 string to query the database? Somehow the script doesn't even output
 the
 value of the POST data anymore... been using this stuff for years now,
 and
 i'm feeling really silly at the moment.

 I'd appreciate any help.

POST data *does* have a limit, possibly, based on your selection of
browser/server software...

It's a ridiculously high limit however, so it seems more likely that
you just added a typo to your code.

Show us code to get an answer.

And estimate for us the size of the POST data as well.

Without those bits of info, our answers will be:

Maybe.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Marketplace Framework

2007-05-21 Thread Richard Lynch
On Sun, May 20, 2007 5:33 am, PHP Mailing List wrote:
 Is there any PHP's framework for developing a marketplace site ?

Yes.

Here is a site that will let you play with many of them:
http://www.opensourcecms.com/index.php

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] PHP Data Mining/Data Scraping

2007-05-21 Thread Richard Lynch
On Sat, May 19, 2007 10:22 pm, Shannon Whitty wrote:
 I'm looking for a piece of software or coding that will let me post a
 form
 to another URL, accept the response, search it for a specific
 success
 string and then let me continue processing the rest of my program.

http://php.net/curl

 I want to accept queries on behalf of my supplier, forward it to them
 behind
 the scenes, accept their response and display it within my website.

 Has anyone had any experience with this?  Is there a simple, basic
 utility
 to let me do this?

 I was kind of hoping I could avoid developing it myself.

Search for PHP curl examples online, and you should find the code
simple enough to copy/paste and alter to taste...

It won't be quite as easy as install forum X but it shouldn't kill
you either...

The tricky bit is to figure out what to do when your result from the
supplier is not success nor failure but their site has gone down
and you've got some weird answer you've never seen before...

Or when they alter their web application and then yours breaks because
of it...

You'll end up taking a simple 5-line program and adding about 50 lines
of what if error handling if you do this right...  Or leave it at 5
lines and pray nothing goes wrong :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Adserver programming with php

2007-05-21 Thread Richard Lynch
On Sat, May 19, 2007 7:15 pm, Merlin wrote:
 I am thinking about creating a kind of adserver which is customized
 for
 my needs.

The odds on your needs being THAT different from the existing dozens
of highly customizable adservers seems remote...

Save yourself a TON of money and do more research :-)

 As I would be most confident in doing this with php, I am
 asking myself if this is the right choice or if it would be wiser to
 take a C++ aproach for example to get a higher performance just in
 case
 the site grows fast.
 Do you guys think that a php build webserver would be able to scale
 and
 perform well enough for serving millions of adimpressions daily?

There are PHP sites handling millions of impressions daily, and that's
not even all that tricky, as I understand it...

What you might consider, if you decide to go down this path at all, is
to write it in PHP with an eye to developing a custom PHP extension by
re-writing your PHP code in C once you've worked out all the details.

This would give you the rapid prototyping and flexibility of PHP in
the early days, and satisfy any reasonable need for speed after you
are suitably crusty to not feel the need to make sudden changes, by
just porting the PHP code to C code.

Shouldn't be too hard to discipline yourself to only write PHP that
you know how to convert to C -- and, really, PHP ends up as byte-code
executed by C, so worst-case is you could dig into PHP Internals to
figure out what your tricky PHP is doing...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re[2]: [PHP] When does PHP free-up memory allocated to it?

2007-05-21 Thread Richard Davey
Hi Richard,

Tuesday, May 22, 2007, 1:24:35 AM, you wrote:

 I would have expected (or rather, hoped) that the memory use would
 have dropped down quite dramatically after destroying the image
 resource that was using up nearly 4MB of memory, but it didn't seem to
 change.

 How are you measuring this?

memory_get_usage(true)

 What version of PHP?

5.2.2 (I did say :)

 The Memory Manager changed over the course of time.

Sure, but I'm only interested in how it works now :)

 I'm also not at all sure that you *can* measure it as precisely as you
 are trying to do.

I don't think you can measure it *accurately* right down to the byte,
but with big sweeping operations such as image resource deletion you
should see significant changes in value, and in some circumstances you
do (see blog link at the bottom)

 That said:
 PHP doesn't really allocate that 5.2M of RAM.
 GD does.

Horses for courses, surely? PHP asks GD to do it, the end result is
the same, the memory is being used.

 PHP may not be able to tell you accurately about what GD is doing
 internally -- but it's probably not *really* losing that 5.2M or you'd
 hear an awful lot more screaming about it from all quarters. :-)

True :)

Using the 5MB in the first place doesn't bother me, that's just a
simple allowance for each pixel of the image + RGB/Alpha values, which
is how GD works with it. What I found fascinating on further research
was how the memory can still be used depending simply on how you store
the image resource.

After more research I wrote about it here:
http://www.corephp.co.uk/archives/42-Interesting-memory-use-with-GD-images.html

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

Never trust a computer you can't throw out of a window

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



Re: [PHP] php5 cert

2007-05-21 Thread Richard Lynch
On Fri, May 18, 2007 4:45 pm, Greg Donald wrote:
 Anyone wanna share their insights into the php5 cert test?  The php4
 test was pretty simple for me, but that was a couple of years ago.  It
 seems there's quite a bit of new material being covered on the php5
 version.  I figure with the same number of questions, things had to
 get more general if anything, right?

Didn't take either, but surveyed a half-dozen who took it at php|tek
last week...

My basic impression was that they threw out a lot of the stupid
questions that relied on arcane knowledge or were just plain Bad Code
of nasty loops with silly breaks etc.

What got added was a lot of OOP stuff and stream stuff and...

'Course, there's more than just one test that they hand out, as I
understand it, so there are variations to it, and I had a very very
very small sample of people who I chatted with.

And none of them know for sure if they passed yet or not, really. :-)

I was busy both times the test was being administered, but would
probably fail anyway on the new features parts.  I'm pretty set in my
ways... :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] php5 cert

2007-05-21 Thread Richard Lynch
On Sun, May 20, 2007 10:14 am, Danial Rahmanzadeh wrote:
 are volcan exams really harder than actual php5 exam as phparch
 asserted?

I'm pretty sure after seeing Star Trek: Voyage Home, that Vulcan exams
are MUCH harder than the PHP 5 exam.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



Re: [PHP] Include files....

2007-05-21 Thread Richard Lynch
An include jumps back into HTML mode so you need:

?php
  $server = ;
  $username = ;
.
.
.
?

On Fri, May 18, 2007 3:05 pm, Jason Pruim wrote:
 Okay, Very Newbie-ish question coming!

 I can't figure out why my include won't work... Here's the text:

 index.php:
 ?PHP

 include 'defaults.php';

 $link = mysql_connect($server, $username, $password) or die('Could
 not connect: ' . mysql_error());
 echo 'Connected successfully BR';
 mysql_select_db($database) or die('Could not select database: ' .
 mysql_error());
 echo 'DB selected BR';

 $result = mysql_query($query) or die(mysql_error());
 $num=mysql_numrows($result);
 $i= 0;


 while($i  $num) {

   $FName = mysql_result($result, $i,FName);
   $LName = mysql_result($result,$i,LName);
   $Add1 = mysql_result($result, $i,Add1);
   $Add2 = mysql_result($result, $i,Add2);
   $City = mysql_result($result, $i,City);
   $State = mysql_result($result, $i,State);
   $Zip = mysql_result($result, $i,Zip);
   $Date = date(m-d-y h:i:s,mysql_result($result, $i, Date));
   $Record = mysql_result($result, $i, Record);
   $subName = mysql_result($result, $i,subName);
   $subEmail = mysql_result($result, $i,subEmail);
   $subPhone = mysql_result($result, $i,subPhone);
   $chkMember = unserialize(mysql_result($result, $i,chkMember));
   $chkAdd = unserialize(mysql_result($result, $i,chkAdd));
   $chkDel = unserialize(mysql_result($result, $i, chkDel));

   $i++;

   //echo P$Record $FName, $LName,/P P$Add1,BR $Add2,BR/P
 P$City, $State, $Zip,/P $Date,BR $subName, $subEmail,
 $subPhone, $chkMember[$row], $chkAdd[$row], $chkDel[$row]BR;

   echo H3Name Address/H3;
   echo P id ='test' $FName $LName $Add1 $Add2 $Date/P;

 };




 ?
 *
 defaults.php:

 $server = 'localhost';
 $username = 'USERNAME';
 $password = 'PASSWORD';
 $database = 'DATABASE';
 $query = 'SELECT * FROM current';

 Yes I changed the values of username, password, and database. But
 when I use the same info inside the index.php file it all works just
 fine. Here is the error that it gives me:

 [Fri May 18 15:32:07 2007] [error] PHP Notice:  Undefined variable:
 server in /Volumes/RAIDer/webserver/Documents/tests/legion/index.php
 on line 5
 [Fri May 18 15:32:07 2007] [error] PHP Notice:  Undefined variable:
 username in /Volumes/RAIDer/webserver/Documents/tests/legion/
 index.php on line 5
 [Fri May 18 15:32:07 2007] [error] PHP Notice:  Undefined variable:
 password in /Volumes/RAIDer/webserver/Documents/tests/legion/
 index.php on line 5
 [Fri May 18 15:32:07 2007] [error] PHP Warning:  mysql_connect() [a
 href='function.mysql-connect'function.mysql-connect/a]: Access
 denied for user 'USERNAME'@'localhost' (using password: NO) in /
 Volumes/RAIDer/webserver/Documents/tests/legion/index.php on line 5


 Thanks in advance for helping me through my obvious friday afternoon
 brain fart...




 --

 Jason Pruim
 Raoset Inc.
 Technology Manager
 MQC Specialist
 3251 132nd ave
 Holland, MI, 49424
 www.raoset.com
 [EMAIL PROTECTED]





-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Al

Best of both worlds may be SQLite.  ZEND has a nice article on the subject.

[EMAIL PROTECTED] wrote:

I am in the process of adding a part to my website which would include
pictures, pdf files, txt files, and excel files.  The files sizes
could be anywhere on average of 100k to 2mb.  Do you think I should be
uploading the files to a MySQL database or to my server?

I have head that there are pros and cons to both, but have never
really received a definitive answer that helps much.  I appreciate all
your opinions on the pros and cons of both.


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



RE: [PHP] How can i help

2007-05-21 Thread Ligaya A. Turmelle
There are a number of ways to help depending upon what you want to do.
Any help is always appreciated.  An incomplete listing -
http://www.khankennels.com/blog/index.php/archives/2006/08/10/25-ways-to
-help-out-php/ 

Lig

-Original Message-
From: James Savage [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 22, 2007 7:27 AM
To: php-general@lists.php.net
Subject: [PHP] How can i help

I am a PHP web programmer with a little bit more than basic knowledge.
What could i do to help with developing 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] Enabling LDAP on Plesk 8

2007-05-21 Thread Sn!per
Am currently running Plesk 8.0.1 . A php script with phpinfo() will give:
...
...
'--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,
...
...

But am not able to locate the LDAP section that normally looks like:

LDAP Supportenabled
RCS Version $Id: ldap.c,v 1.130.2.11 2005/01/19 00:28:49 bigtoy Exp $
Total Links 0/unlimited
API Version 2004
Vendor Name OpenLDAP
Vendor Version  20025

As such, when running a script that uses any LDAP functions, I will get error 
msgs like:
Fatal error: Call to undefined function: ldap_connect() ...

Any idea how I can go about solving this issue? Please advise. TIA

--
roger



---
Sign Up for free Email at http://ureg.home.net.my/
---

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



Re: [PHP] PHP MySQL Problem

2007-05-21 Thread Christian Haensel

Hi there, good morning,

as posted yesterday (I guess it kind of got overlooked by the nmber of posts 
here), I was such a dirk that I put a hidden action in my form that 
redirected the test page to another (currently running) form which didn't 
have the changes in it. So my test page showed me data of a live page... 
dumb me, I know. But after hours and hours of coding, I bet this even 
happens to the best out there :oP Little piece of code sticking somewhere 
and you don't even remember that it is there... that reminds me to continue 
writing the handbook to this website *g*


Have a great coding-day :o))

Chris

- Original Message - 
From: Richard Lynch [EMAIL PROTECTED]

To: Christian Haensel [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Tuesday, May 22, 2007 2:42 AM
Subject: Re: [PHP] PHP  MySQL Problem



On Mon, May 21, 2007 2:26 am, Christian Haensel wrote:

Good morning friends,

I have a script that collects data from a form and puts together a
mysql
query to search a database.
Now, everything worked fine until I added a few new form fields... now
the
$_POST['var'] don't reach the script...

I have about 20 to 25 form fields which are all taken into the
query...

Now my question: is there a limit in the fields that I can use in the
query
string to query the database? Somehow the script doesn't even output
the
value of the POST data anymore... been using this stuff for years now,
and
i'm feeling really silly at the moment.

I'd appreciate any help.


POST data *does* have a limit, possibly, based on your selection of
browser/server software...

It's a ridiculously high limit however, so it seems more likely that
you just added a typo to your code.

Show us code to get an answer.

And estimate for us the size of the POST data as well.

Without those bits of info, our answers will be:

Maybe.

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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