php-general Digest 18 Apr 2005 21:09:12 -0000 Issue 3405

2005-04-18 Thread php-general-digest-help

php-general Digest 18 Apr 2005 21:09:12 - Issue 3405

Topics (messages 213254 through 213291):

ldap_connect error
213254 by: Steve Turnbull

Question regarding PDF creation
213255 by: Mário Gamito
213266 by: Jason Barnett
213286 by: Chris W. Parker

Re: How to ignore E_STRICT and E_NOTICE with error_handler callback
213256 by: Dan Rossi
213264 by: Matthew Weier O'Phinney
213265 by: Marek Kilimajer

stripping of the last character
213257 by: Ross
213258 by: Sebastian
213259 by: Chris Kay

explode a string
213260 by: Sebastian
213271 by: Petar Nedyalkov

mysql blob datatype for documents
213261 by: Bosky, Dave
213262 by: Satyam

RHES 3 - PHP 5.0.x - freetype
213263 by: Sasha Dolgy

putting the results of a query inro an array
213267 by: Ross
213268 by: Jay Blanchard

mysql_result()
213269 by: Greg Donald
213270 by: Greg Donald

Re: PHP and Sessions
213272 by: Petar Nedyalkov
213287 by: The Disguised Jedi

Re: ACM Dynamic Languages Symposium
213273 by: Jason Barnett
213274 by: Jason Barnett
213276 by: Rory Browne

Re: Please update your account information
213275 by: Jason Barnett

Re: Session variables are not stored when set in implicitly called 
constructor!??
213277 by: Jason Barnett

Windows and Query String
213278 by: Greg Deckler
213279 by: John Nichel
213280 by: Chris Ramsay
213281 by: Armando Afá
213282 by: Greg Donald

Re: Barcodes [Solved]
213283 by: Mike Smith
213285 by: Eric Wood
213289 by: Mike Smith

Re: php-general Digest 18 Apr 2005 08:44:11 - Issue 3404
213284 by: DuSTiN KRySaK

Re:Php + flash, need some help making a small .FLA
213288 by: I Poop Rainbows

Re: trying to send mail via localhost
213290 by: Brent Baisley

Apache - IIS Migration
213291 by: Pablo D Marotta

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
---BeginMessage---
Hi

I am running a LAMP setup consisting of Debian (testing), PHP4, Apache2, and
MySQL 4.

When I installed php, I used apt-get, and included in the list of modules
was libapache2_mod_php4 php4 php4-ldap ...

PHP works fine, and a test phpinfo() brings up all of the expected
parameters (at least I think it does).

The one thing that doesn't work is ldap. I have enabled the ldap modules -
a2enmod ldap - and this doesn't throw an error, it just prompts for the
apache restart which in turn restarts fine.

BUT if I run a very simple ldap_connect (see script) I get this error;

Fatal error: Call to undefined function: ldap_connect()
in /www/stevedev/vhtdocs/ldap/index.php on line 27

So it appears that the ldap hasn't got itself running with php.

The very simple test script I used was;

$ds = ldap_connect('ldap.our server.net');
if ($ds) {
ldap_bind($ds);
echo 'connected';
} else {
echo 'not connected';
}

Has any one got any ideas of why this error get thrown?

Regards
Steve
---End Message---
---BeginMessage---
Hi,

I'm using FPDF (http://www.fpdf.org/) to create a... PDF.

I'm trying to use a variable inside an instruction, but i'm getting
errors or malformed PDFs and i can't figure how to overcome them.

This instruction

$pdf-Cell(60,10,'Powered by FPDF.',0,1,'C');

inserts a line in the PDF, starting in coordinates 60,10 of the sheet,
without border (0), breaking to the next line (1) and centered (C).

Now, i want to use this with a variable:

$pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C');

The problem here is that the part ,0,1, is not stringed, while C is.
So, what i get in the PDF is

Curriculum Vitae de Mário Gamito,0,0,C
(Mário Gamito == $full_name)

So, how to unparse the ,0,1, in the middle of the instruction ?

Any help would be apreciated.


Warm Regards,
Mário Gamito
---End Message---
---BeginMessage---
Mário Gamito wrote:
...
 
 $pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C');
 

If I break down this argument to a simpler form, you are using:

$pdf-Cell(40,10,'CV de Mario Gamito,0,0,C');

You aren't supplying the last 3 arguments!  What I *think* you're going
for instead here is:

$pdf-Cell(40,10,CV de $full_name,0,1,'C');

 The problem here is that the part ,0,1, is not stringed, while C is.
 So, what i get in the PDF is
 
 Curriculum Vitae de Mário Gamito,0,0,C
 (Mário Gamito == $full_name)
 
 So, how to unparse the ,0,1, in the middle of the instruction ?

Just don't include it as part of the string argument at all (the 3rd
argument).  Currently it looks like the 0,1 in the middle of the
instruction is just text that you are inserting into that cell location.

 
 Any help 

RE: [PHP] Setting permissions such that file can be included but not open directly

2005-04-18 Thread Kim Madsen
 -Original Message-
 From: Mike [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 15, 2005 9:43 PM
 To: 'Dasmeet Singh'; php-general@lists.php.net
 Subject: RE: [PHP] Setting permissions such that file can be included
but
 not open directly
 
  directly to private/includefile.php can run the script
  without authorising themselves...
 
  Is it possible to set folder permission such that files
  inside it cant be open directly but could be included?
 
 Can you just give read permissions -only- to the user that PHP runs as
and
 not these other users?

Just put these kinda directives outside webscope, I.E.:

/home/USER/public_html/
/home/USER/private/

--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper

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



Re: [PHP] Setting permissions such that file can be included but not open directly

2005-04-18 Thread Dasmeet Singh
Kim Madsen wrote:
-Original Message-
From: Mike [mailto:[EMAIL PROTECTED]
Sent: Friday, April 15, 2005 9:43 PM
To: 'Dasmeet Singh'; php-general@lists.php.net
Subject: RE: [PHP] Setting permissions such that file can be included
but
not open directly

directly to private/includefile.php can run the script
without authorising themselves...
Is it possible to set folder permission such that files
inside it cant be open directly but could be included?
Can you just give read permissions -only- to the user that PHP runs as
and
not these other users?

Just put these kinda directives outside webscope, I.E.:
/home/USER/public_html/
/home/USER/private/
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper
Thanks that works as well :)
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback

2005-04-18 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote:
Hi there i have an error handler callback within an error class which is
also being used for pear errors. E_NOTICE and E_STRICT are still triggering
this callback method, so i have to make a check that the code is not one of
these. I have error_reporting to ignore both of these and still no luck,
any ideas ?
put this at the top of the error handling function:
if($errno == E_STRICT || $errno == E_NOTICE) return;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] ldap_connect error

2005-04-18 Thread Steve Turnbull
Hi

I am running a LAMP setup consisting of Debian (testing), PHP4, Apache2, and
MySQL 4.

When I installed php, I used apt-get, and included in the list of modules
was libapache2_mod_php4 php4 php4-ldap ...

PHP works fine, and a test phpinfo() brings up all of the expected
parameters (at least I think it does).

The one thing that doesn't work is ldap. I have enabled the ldap modules -
a2enmod ldap - and this doesn't throw an error, it just prompts for the
apache restart which in turn restarts fine.

BUT if I run a very simple ldap_connect (see script) I get this error;

Fatal error: Call to undefined function: ldap_connect()
in /www/stevedev/vhtdocs/ldap/index.php on line 27

So it appears that the ldap hasn't got itself running with php.

The very simple test script I used was;

$ds = ldap_connect('ldap.our server.net');
if ($ds) {
ldap_bind($ds);
echo 'connected';
} else {
echo 'not connected';
}

Has any one got any ideas of why this error get thrown?

Regards
Steve

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



[PHP] Question regarding PDF creation

2005-04-18 Thread Mário Gamito
Hi,

I'm using FPDF (http://www.fpdf.org/) to create a... PDF.

I'm trying to use a variable inside an instruction, but i'm getting
errors or malformed PDFs and i can't figure how to overcome them.

This instruction

$pdf-Cell(60,10,'Powered by FPDF.',0,1,'C');

inserts a line in the PDF, starting in coordinates 60,10 of the sheet,
without border (0), breaking to the next line (1) and centered (C).

Now, i want to use this with a variable:

$pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C');

The problem here is that the part ,0,1, is not stringed, while C is.
So, what i get in the PDF is

Curriculum Vitae de Mário Gamito,0,0,C
(Mário Gamito == $full_name)

So, how to unparse the ,0,1, in the middle of the instruction ?

Any help would be apreciated.


Warm Regards,
Mário Gamito

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



Re: [PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback

2005-04-18 Thread Dan Rossi
already have i was hoping to avoid the if's. E_STRICT was throwing a 
heap of suggestions for pear packages code ;)

On 18/04/2005, at 6:44 PM, Marek Kilimajer wrote:
[EMAIL PROTECTED] wrote:
Hi there i have an error handler callback within an error class which 
is
also being used for pear errors. E_NOTICE and E_STRICT are still 
triggering
this callback method, so i have to make a check that the code is not 
one of
these. I have error_reporting to ignore both of these and still no 
luck,
any ideas ?
put this at the top of the error handling function:
if($errno == E_STRICT || $errno == E_NOTICE) return;
--
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] stripping of the last character

2005-04-18 Thread Ross
I have a large group of email addesses serperated by commas. I need to trim 
off the very last comma

$recipients = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],


Also how would I add a space after every comma? to give

[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]


many thanks,

Ross

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



Re: [PHP] stripping of the last character

2005-04-18 Thread Sebastian
$recipients = '[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],';

echo str_replace(',', ', ', substr($recipients, 0, -1));


- Original Message - 
From: Ross [EMAIL PROTECTED]


 I have a large group of email addesses serperated by commas. I need to
trim
 off the very last comma

 $recipients = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],


 Also how would I add a space after every comma? to give

 [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]


 many thanks,

 Ross

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



Re: [PHP] stripping of the last character

2005-04-18 Thread Chris Kay

use substr($recipients,0,1);
to remove the last char

and ereg_replace(,, ,,$recipients);
to add the spaces

Hope this helps

CK

On Mon, Apr 18, 2005 at 12:05:42PM +0100, Ross wrote:
 I have a large group of email addesses serperated by commas. I need to trim 
 off the very last comma
 
 $recipients = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],
 
 
 Also how would I add a space after every comma? to give
 
 [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
 
 
 many thanks,
 
 Ross
 
 -- 
 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] explode a string

2005-04-18 Thread Sebastian
$string = '4:gaming,5:hardware,3:software,8:security';

what is the best way to explode then loop this string after its taken apart.

output should be something like:

$id = 4
$cat = gaming

etc..

im just looking for the best/fastest way to do this. the string can grow to
200 or so bytes, maybe more.

should i list(), while(), explode it, or should i explode it and foreach it?
or..?

thanks.

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



[PHP] mysql blob datatype for documents

2005-04-18 Thread Bosky, Dave
Would it be better to store uploaded pdf, word, or excel documents in a
MySql blob field rather than keeping them in a directory?

I really want to secure the documents and limit document access to
specific users.

 

Curious

Dave



HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.


[PHP] Re: mysql blob datatype for documents

2005-04-18 Thread Satyam
Dave Bosky [EMAIL PROTECTED] wrote in message

Would it be better to store uploaded pdf, word, or excel documents in a
MySql blob field rather than keeping them in a directory?

I really want to secure the documents and limit document access to
specific users.

 Curious

Dave

---
Obscuring access to information is not a safe security policy, it just makes 
it harder to some, it doesn't make it foolproof against all.  And, in the 
meantime, you are placing a toll on your resources and performance for no 
real gain.

If you have lousy security, you can have it in MySql or in your directories.

Satyam 

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



[PHP] RHES 3 - PHP 5.0.x - freetype

2005-04-18 Thread Sasha Dolgy
(this post has been made to php-install aswell)

Hi Everyone.  I'm having a little problem here.  Was wondering if
anyone else had encountered this.  Currently I'm building PHP 5.0.4
(issue is with .3 aswell) and it's being built on a RHES 3 update 3
machine.

The following freetype rpm's come installed on this deployment:

freetype-2.1.4-4.0
freetype-devel-2.1.4-4.0

I can not get freetype to work with PHP unless i download the source,
./configure; make; make install ... was wondering what the differences
would be between the RPM's noted above and a simple install.(The
configure is located below)

  imagettftext($im, 20, 0, 10, 20, $black, ARIAL.TTF,
  Testing... Omega: amp;#937;);

When I compile my own freetype and install, and compile php against
it, the above works.  When I don't, the above does not work.  I would
really love to get this working with the supplied RHES RPM's.  If
anyone has any idea I sure would be interested!

Thanks


'./configure' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--localstatedir=/var' \
'--with-mysql' \
'--enable-gd-native-ttf' \
'--with-gd' \
'--with-openssl=/usr/local/ssl' \
'--with-imap=/usr/local/imap-2004a' \
'--with-imap-ssl' \
'--enable-embedded-mysqli' \
'--with-java=/usr/java/jdk' \
'--with-kerberos' \
'--with-xml' \
'--with-xpm' \
'--with-bz2' \
'--with-jpeg-dir=/usr/lib' \
'--with-png-dir=/usr/lib' \
'--with-ttf=/usr/lib' \
'--with-freetype-dir=/usr/include/freetype2' \
'--with-tiff-dir=/usr/lib' \
'--with-zlib-dir=/usr/lib' \
'--with-gettext' \
'--enable-fastcgi' \
'--disable-path-info-check' \
'--disable-ipv6' \
'--with-curl' \
'--with-exif' \
'--with-iconv' \
'--with-ldap' \
'--enable-mbstring' \
'--with-mcrypt' \
'--with-mhash' \
$@

-- 
Sasha Dolgy
[EMAIL PROTECTED]

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



Re: [PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback

2005-04-18 Thread Matthew Weier O'Phinney
* Dan Rossi [EMAIL PROTECTED]:
 already have i was hoping to avoid the if's. E_STRICT was throwing a 
 heap of suggestions for pear packages code ;)

So turn off error reporting for those levels:

error_reporting(E_ALL  ~E_STRICT  ~E_NOTICE);


 On 18/04/2005, at 6:44 PM, Marek Kilimajer wrote:

  [EMAIL PROTECTED] wrote:
   Hi there i have an error handler callback within an error class which 
   is
   also being used for pear errors. E_NOTICE and E_STRICT are still 
   triggering
   this callback method, so i have to make a check that the code is not 
   one of
   these. I have error_reporting to ignore both of these and still no 
   luck,
   any ideas ?
 
  put this at the top of the error handling function:
 
  if($errno == E_STRICT || $errno == E_NOTICE) return;

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



Re: [PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback

2005-04-18 Thread Marek Kilimajer
Dan Rossi wrote:
already have i was hoping to avoid the if's. E_STRICT was throwing a 
heap of suggestions for pear packages code ;)
That means you are using PHP5, so you can use second argument to 
set_error_handler()

On 18/04/2005, at 6:44 PM, Marek Kilimajer wrote:
[EMAIL PROTECTED] wrote:
Hi there i have an error handler callback within an error class which is
also being used for pear errors. E_NOTICE and E_STRICT are still 
triggering
this callback method, so i have to make a check that the code is not 
one of
these. I have error_reporting to ignore both of these and still no luck,
any ideas ?

put this at the top of the error handling function:
if($errno == E_STRICT || $errno == E_NOTICE) return;
--
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: Question regarding PDF creation

2005-04-18 Thread Jason Barnett
Mário Gamito wrote:
...
 
 $pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C');
 

If I break down this argument to a simpler form, you are using:

$pdf-Cell(40,10,'CV de Mario Gamito,0,0,C');

You aren't supplying the last 3 arguments!  What I *think* you're going
for instead here is:

$pdf-Cell(40,10,CV de $full_name,0,1,'C');

 The problem here is that the part ,0,1, is not stringed, while C is.
 So, what i get in the PDF is
 
 Curriculum Vitae de Mário Gamito,0,0,C
 (Mário Gamito == $full_name)
 
 So, how to unparse the ,0,1, in the middle of the instruction ?

Just don't include it as part of the string argument at all (the 3rd
argument).  Currently it looks like the 0,1 in the middle of the
instruction is just text that you are inserting into that cell location.

 
 Any help would be apreciated.
 
 
 Warm Regards,
 Mário Gamito


-- 
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins



signature.asc
Description: OpenPGP digital signature


[PHP] putting the results of a query inro an array

2005-04-18 Thread Ross
how can I put the results from the following query into two arrays?

The only fields are 'name' and 'email'

$query = SELECT * FROM contacts;
 $result= mysql_query($query);
 $number= mysql_num_rows ($result);

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



RE: [PHP] putting the results of a query inro an array

2005-04-18 Thread Jay Blanchard
[snip]
The only fields are 'name' and 'email'

$query = SELECT * FROM contacts;
 $result= mysql_query($query);
 $number= mysql_num_rows ($result);
[/snip]

Using * in a query like this is bad formspell it out

while($row = mysql_fetch_array($result){
$arrayName[] = $row['name'];
$arrayEMail[] = $row['email'];
}
print_r($arrayName);
print_r($arrayEMail);

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



[PHP] mysql_result()

2005-04-18 Thread Greg Donald
-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



[PHP] Re: mysql_result()

2005-04-18 Thread Greg Donald
Oops.  Silly Gmail hotkeys.

What are you guys using instead of mysql_result() when using MySQL 4.1
and the 'improved' MySQL functions?  mysql_result() went away and the
next best thing I can find is mysqli_fetch_array() with a little
iteration.  Thoughts?


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



Re: [PHP] explode a string

2005-04-18 Thread Petar Nedyalkov
On Monday 18 April 2005 14:34, Sebastian wrote:
 $string = '4:gaming,5:hardware,3:software,8:security';

 what is the best way to explode then loop this string after its taken
 apart.

 output should be something like:

 $id = 4
 $cat = gaming

 etc..

 im just looking for the best/fastest way to do this. the string can grow to
 200 or so bytes, maybe more.

 should i list(), while(), explode it, or should i explode it and foreach
 it? or..?

while is faster than foreach. check the iterator section in SPL for details.


 thanks.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpa0VNdMvmfC.pgp
Description: PGP signature


Re: [PHP] PHP and Sessions

2005-04-18 Thread Petar Nedyalkov
On Monday 18 April 2005 05:22, Reynier Perez Mira wrote:
 Hi list:

 I have this code that Works perfectly:

 File: index.php

 ?

  session_start();

  echo a href=logout.php?sid=. session_id().Close session/a;

 ?

 File: logout.php

 ?

  session_unset();

  session_destroy();

 ?



 When user click link all works fine but when user close window withouth
 click link the session is not delete and all vars preserve they values. How
 can I fix that? I use PHP 5.0.0 RC2 and Windows XP SP1.

It's because the session is managed through cookies and they don't expire 
until the next load. 

You can:

1. Set the expiration time to time in the past using 
session_set_cookie_params();
2. Stop the cookies and use GET method.




 Regards

 Reynier Prez Mira

 3ero. Ing. Informtica

 Entre ms inteligente me siento, ms me doy cuenta de lo ignorante que soy.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpohbo3m3AVw.pgp
Description: PGP signature


[PHP] Re: CFP: DLS05: ACM Dynamic Languages Symposium

2005-04-18 Thread Jason Barnett
Please, do not cross-post.

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] Re: Please update your account information

2005-04-18 Thread Jason Barnett
I guess Mailman fell asleep?  :P

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


Re: [PHP] Re: CFP: DLS05: ACM Dynamic Languages Symposium

2005-04-18 Thread Rory Browne
There are times when cross-posting is approperate, and times when it
isn't. In this case it's approperate.

In the case of replying to his cross-posting it isn't.

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



[PHP] Re: Session variables are not stored when set in implicitly called constructor!??

2005-04-18 Thread Jason Barnett
Adam wrote:
 Hallo everybody,
 hope I am writing to correct mailinglist(^_^*)...

Absolutely!

 I have troubles with sessions and descructor in php5. Can not set session
 variable in destructor when it's called implicitly. Do You know solution
 please?
 I think problem is that session is stored before imlicit object destruction
 *doh*

 example.php:
 ?php
 session_start();
 session_register(variable);

*Note* You don't need to use session_register() if you use $_SESSION.
In fact this probably isn't even doing what you think it is.  Using
$_SESSION indexes is the preferred way to go about using sessions.


 // singleton for request
 class Request {
 function __destructor() {
 $_SESSION[variable] = hallo;

The __destructor() method is supposed to be about killing the class
(Request).  It's probably bad practice to be changing $_SESSION vars
inside of there even if that $_SESSION var affects your class.  Here,
read this page and maybe it will make more sense to you:

http://php.net/manual/en/language.oop5.decon.php

Heck, look at the user contributed notes since one of them will directly
affect this idea of yours.

 }
 }

 $req = Request::getInstance();
 $req-doSomeThink();
 echo This should be hallo 2nd time:  . $_SESSION[variable];//
 unfortunatly this is not set
 echo  a href='example.php'Click and cry;-(/a;
 // implicit desturctor call

If the reference count for $req is greater than 0 (i.e. there is a
Singleton) then __destruct won't be called.  And why should it be
called?  Because, again, __destruct is for cleaning up the class while
the object is getting destroyed.

 ?

 Thank You very much...
 BR
 a3c


--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] Windows and Query String

2005-04-18 Thread Greg Deckler
I have searched for this in the FAQ's, News Archives and Googled for it
and cannot seem to find the answer. Please help.

I have a script that simply echo's a query string variable to the
screen. This works on a previously configured linux box with PHP4.0, but
not on a newly created Windows 2003 box with PHP5.0.

Here is the URL sample:

http://www.blahblahblah.com/hello.php?pg=1

Here is the page sample:

?

  echo $pg;

?

On the Windows box, I get Undefined variable.

I suspect that something in my php.ini is not set correctly to allow
this but I cannot find what that is.

Now, I realize that I should probably NOT be using the variable directly
but rather initializing it via _GET or by some other method because
using it directly makes the code nearly impossible to read. But, I am
trying to convert some existing code not written by me that runs on this
Linux box to a Windows machine and whoever wrote this made RAMPANT use
of this method of accessing query string parameters. Thus, I am stuck
having to get this to work until I can find about 50,000 hours to conver
all of the code.

Any assistance is GREATLY appreciated.

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



Re: [PHP] Windows and Query String

2005-04-18 Thread John Nichel
Greg Deckler wrote:
I have searched for this in the FAQ's, News Archives and Googled for it
and cannot seem to find the answer. Please help.
Should have checked the manual.
http://us4.php.net/register_globals
I have a script that simply echo's a query string variable to the
screen. This works on a previously configured linux box with PHP4.0, but
not on a newly created Windows 2003 box with PHP5.0.
Here is the URL sample:
http://www.blahblahblah.com/hello.php?pg=1
Here is the page sample:
?
  echo $pg;
?
On the Windows box, I get Undefined variable.
$10 will get you $20 that register_globals is OFF.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Windows and Query String

2005-04-18 Thread Chris Ramsay
snip
Thus, I am stuck
having to get this to work until I can find about 50,000 hours to conver
all of the code.
/snip

No doubt a lesson is contained herewith...if you are working on a
windows machine now, grab yourself a free copy of Textpad from Helios
(google for it) and use their wonderful search and replace function -
you'll get it done sooner than you think - honest!

rgds

Chris

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



Re: [PHP] Windows and Query String

2005-04-18 Thread Armando Afá
See the register_global my friend maybe it is set off
- Original Message - 
From: Greg Deckler [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Monday, April 18, 2005 10:10 AM
Subject: [PHP] Windows and Query String


 I have searched for this in the FAQ's, News Archives and Googled for it
 and cannot seem to find the answer. Please help.
 
 I have a script that simply echo's a query string variable to the
 screen. This works on a previously configured linux box with PHP4.0, but
 not on a newly created Windows 2003 box with PHP5.0.
 
 Here is the URL sample:
 
 http://www.blahblahblah.com/hello.php?pg=1
 
 Here is the page sample:
 
 ?
 
   echo $pg;
 
 ?
 
 On the Windows box, I get Undefined variable.
 
 I suspect that something in my php.ini is not set correctly to allow
 this but I cannot find what that is.
 
 Now, I realize that I should probably NOT be using the variable directly
 but rather initializing it via _GET or by some other method because
 using it directly makes the code nearly impossible to read. But, I am
 trying to convert some existing code not written by me that runs on this
 Linux box to a Windows machine and whoever wrote this made RAMPANT use
 of this method of accessing query string parameters. Thus, I am stuck
 having to get this to work until I can find about 50,000 hours to conver
 all of the code.
 
 Any assistance is GREATLY appreciated.
 
 -- 
 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] Windows and Query String

2005-04-18 Thread Greg Donald
On 4/18/05, Chris Ramsay [EMAIL PROTECTED] wrote:
 No doubt a lesson is contained herewith...if you are working on a
 windows machine now, grab yourself a free copy of Textpad from Helios
 (google for it) and use their wonderful search and replace function -
 you'll get it done sooner than you think - honest!

How would a search and replace tool know which variables to
replace/change/convert or not?


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



[PHP] Re: Barcodes [Solved]

2005-04-18 Thread Mike Smith
On 4/15/05, Mike Smith [EMAIL PROTECTED] wrote:
 I just ordered a CueCat from eBay to play with reading Barcodes. Of
 course we'll use a Symbol or some other reader when we implement this
 in production, but I thought this would be a start. There are several
 classes at phpclasses.org
 (http://www.google.com/custom?q=barcodehl=enlr=ie=UTF-8oe=ISO-8859-1c2coff=1client=pub-2951707118576741cof=FORID:1%3BL:http://files.phpclasses.org/graphics/googlesearch.jpg%3BLH:50%3BLW:256%3BGL:1%3BBGC:A3C5CC%3BT:%2300%3BLC:%23ff%3BVLC:%23663399%3BALC:%23ff%3BGALT:%23663399%3BGFNT:%23ff%3BGIMP:%23ff%3BDIV:%2322%3BLBGC:A3C5CC%3BAH:center%3BS:http://www.phpclasses.org/search.html%3Bdomains=www.phpclasses.orgsitesearch=www.phpclasses.orgstart=10sa=N)
 for generating barcodes. At this point I'm assuming a form with a text
 field with onchange=this.form.submit(); would handle reading the
 barcode and submitting it. I'm assuming we would need to have all our
 barcodes in a single format (codabar, code39, etc). Would I then need
 to store barcode data. The barcodes will be generated from unique part
 numbers so I'm thinking I can generate them (and compare them to
 input) on the fly.
 
 --
 Thanks for any help,
 Mike Smith

It turns out it's easier than I was expecting. No voodoo! I got my
CueCat (usb version) today, plugged it in (on Linux, haven't tried
Windows yet) and scanned a barcode I generated. I tried it at the
console. It type out the correct part number and sent a carriage
return!

I'm using a script to generate the barcodes (3 of 9 or Code39):
http://www.sid6581.net/cs/php-scripts/barcode/

Just foreach through an array of part #'s

foreach($array AS $val)
echo img src=\barcode.php?barcode=$val\\n; //see barcode.php
for  other GET options

There are plenty of other barcode classes and phpclasses.org, but this
does what I want. Barcoding doesn't seem quite the mystery I thought
it would be.

Thanks,
Mike

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



[PHP] Re: php-general Digest 18 Apr 2005 08:44:11 -0000 Issue 3404

2005-04-18 Thread DuSTiN KRySaK
check out amfphp (opensource php/flash remoting):
http://www.amfphp.org/
good tutorials here:
http://www.sephiroth.it/tutorials.php
AMFPHP allows you to return info from PHP classes as an actionscript 
object in flash.

d
On 18-Apr-05, at 1:44 AM, [EMAIL PROTECTED] wrote:
From: Matt Babineau [EMAIL PROTECTED]
Date: April 17, 2005 2:15:25 PM PDT
To: php-general@lists.php.net
Subject: Php + flash, need some help making a small .FLA
Hi all -
Does anyone have any experience with integrating php + flash? Or know 
of any
good tutorial sites? Basically what I want to do is have an animated 
loading
screen, and then pull pictures from a database and display text from a
database, text could be scrolling across the bottom like CNN or 
something.
Anyone familiar with some techniques on doing this?

Any examples people may have of this would be great, just send me some
sample .FLA scripts!!
If you've got some examples of exactly what I want to do, and you also 
have
a paypal account, I can make it worth your time :-D

Thanks,
Matt Babineau
Criticalcode
w: http://www.criticalcode.com
p: 858.733.0160
e: [EMAIL PROTECTED]

Re: [PHP] Re: Barcodes [Solved]

2005-04-18 Thread Eric Wood
- Original Message - 
From: Mike Smith
I'm using a script to generate the barcodes (3 of 9 or Code39):
http://www.sid6581.net/cs/php-scripts/barcode/

This script seems to limit the input barcode to 15 characters... um...
-eric woo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question regarding PDF creation

2005-04-18 Thread Chris W. Parker
Mário Gamito mailto:[EMAIL PROTECTED]
on Monday, April 18, 2005 3:01 AM said:

 I'm using FPDF (http://www.fpdf.org/) to create a... PDF.

First of all thanks for asking this question because I was in need of building 
PDFs and lo and behold FPDF works great so far!

 $pdf-Cell(60,10,'Powered by FPDF.',0,1,'C');

 $pdf-Cell(40,10,'CV de ' . $full_name . ',' . 0,0 . ',C');
 
 The problem here is that the part ,0,1, is not stringed, while C is.
 So, what i get in the PDF is

I haven't messed around with this package at all yet (I am currently going 
through the tutorials) but what I notice is that your quotes are messed up (I 
think).

Notice that in the first example it is: ,0,1,'C');

Your example is: 0,0 . ',C');

I think it should be: 0,0,'C');

So I would write your line as:

$pdf-Cell(40,10,CV de $full_name ,0,0,'C');


HTH,
Chris.

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



Re: [PHP] PHP and Sessions

2005-04-18 Thread The Disguised Jedi
yes, set the cookie expiration to 0. Can be done in php.ini, or with the 
function mentioned.
 use ini_set() or change the value.

 On 4/18/05, Petar Nedyalkov [EMAIL PROTECTED] wrote: 
 
 On Monday 18 April 2005 05:22, Reynier Perez Mira wrote:
  Hi list:
 
  I have this code that Works perfectly:
 
  File: index.php
 
  ?
 
  session_start();
 
  echo a href=logout.php?sid=. session_id().Close session/a;
 
  ?
 
  File: logout.php
 
  ?
 
  session_unset();
 
  session_destroy();
 
  ?
 
 
 
  When user click link all works fine but when user close window withouth
  click link the session is not delete and all vars preserve they values. 
 How
  can I fix that? I use PHP 5.0.0 RC2 and Windows XP SP1.
 
 It's because the session is managed through cookies and they don't expire
 until the next load.
 
 You can:
 
 1. Set the expiration time to time in the past using
 session_set_cookie_params();
 2. Stop the cookies and use GET method.
 
 
 
 
  Regards
 
  Reynier Pérez Mira
 
  3ero. Ing. Informática
 
  Entre más inteligente me siento, más me doy cuenta de lo ignorante que 
 soy.
 
 --
 
 Cyberly yours,
 Petar Nedyalkov
 Devoted Orbitel Fan :-)
 
 PGP ID: 7AE45436
 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
 PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436
 
 
 


-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm 
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However, 
I must say that the ENTIRE contents of this message are subject to other's 
criticism, corrections, and speculations.

This message is Certified Virus Free


[PHP] Re:Php + flash, need some help making a small .FLA

2005-04-18 Thread I Poop Rainbows
Check out: 
http://www.sephiroth.it/index.php


---

you don't really need to use the ming lib for
something like this---there are a couple different
ways to do this, depending on which version of flash
you're using:

Flash5---use loadvariables...check documentation

FlashMX--use the loadVars object---check out
http://actionscript-toolbox.com/index.php  for more
info on this

another (much simpler) way that i believe works for
both versions is to pass the data along via parameters
in the embed/object tag---specifically the URL
param---

bliss
lewis lacook



***
No More Movements...

Lewis LaCook --Poet-Programmer|||http://www.lewislacook.com/||| 

Web Programmer|||http://www.corporatepa.com/||| 

XanaxPop:Mobile Poem Blog- http://www.lewislacook.com/xanaxpop/ 

Collective Writing Projects--  Appendix M 
-http://www.lewislacook.com/AppendixM/





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] Re: Barcodes [Solved]

2005-04-18 Thread Mike Smith
On 4/18/05, Eric Wood [EMAIL PROTECTED] wrote:
 - Original Message -
 From: Mike Smith
 I'm using a script to generate the barcodes (3 of 9 or Code39):
 http://www.sid6581.net/cs/php-scripts/barcode/
 
 This script seems to limit the input barcode to 15 characters... um...
 -eric woo
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
The sample on the website will display image to small for 16
characters. There is an options to adjust the widthXheight of the
generated image to display more I found the longest part number we had
and based my image width on that (+5). There are other options
(phpclasses, hotscripts), but this works for now. I may evaluate some
other options as I get into it.

--
Mike

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



Re: [PHP] trying to send mail via localhost

2005-04-18 Thread Brent Baisley
That's a relay error. It's actually a good thing. If your server is 
setup to allow sending email without logging in, that's generally 
called an open relay. That's where spam comes from. You can configure 
your mail server to allow relaying from only the local machine. Then 
you wouldn't have to login before sending mail. But you should only do 
that if you really know how to configure your server. And if you really 
know how to configure your server, you probably wouldn't do that.
You should look into another PHP mail function, like the PHPMailer 
class library. This will allow you to authenticate with the mail server 
before sending email. Then you won't have to create an open relay.

On Apr 16, 2005, at 1:28 PM, AndreaD wrote:
When trying to send mail via localhost I get the following error
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1
Any ideas?/
RH
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Apache - IIS Migration

2005-04-18 Thread Pablo D Marotta
Hi there..

I´m using Apace 1.3.31 and PHP 4.3.8 in a Windows 2000 enviroment.

I´ll have to migrate the whole site to Windows 2003 enviroment, using IIS 6.0..
Should there be any problem about that, or not?

I mean, should it all go fine, or is it possible for the code to fail in some
parts?
Just in case you need to know, I´m using register globals on, and I´m also
using some Pear functions (Excel_Spreadsheet).

The people I´ve asked about this yet, have told me that it should go fine as
long as I keep the same PHP version.
(I should install PHP in the IIS, configure it to recognize the php files, and
then copy the php files)

Thank you all!
Pablo



American Express made the following
 annotations on 04/18/05 14:09:05
--
**

This message and any attachments are solely for the intended recipient and may 
contain confidential or privileged information. If you are not the intended 
recipient, any disclosure, copying, use, or distribution of the information 
included in this message and any attachments is prohibited. If you have 
received this communication in error, please notify us by reply e-mail and 
immediately and permanently delete this message and any attachments. Thank you.

**
==

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



AW: [PHP] Apache - IIS Migration

2005-04-18 Thread Webmaster
Hi,
abolutly right.
I never had problems with migrating from Apache to IIS or vice versa.

Best Regards 
Mirco Blitz

-Ursprüngliche Nachricht-
Von: Pablo D Marotta [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 18. April 2005 23:09
An: php-general@lists.php.net
Betreff: [PHP] Apache - IIS Migration

Hi there..

I´m using Apace 1.3.31 and PHP 4.3.8 in a Windows 2000 enviroment.

I´ll have to migrate the whole site to Windows 2003 enviroment, using IIS
6.0..
Should there be any problem about that, or not?

I mean, should it all go fine, or is it possible for the code to fail in
some
parts?
Just in case you need to know, I´m using register globals on, and I´m also
using some Pear functions (Excel_Spreadsheet).

The people I´ve asked about this yet, have told me that it should go fine as
long as I keep the same PHP version.
(I should install PHP in the IIS, configure it to recognize the php files,
and
then copy the php files)

Thank you all!
Pablo



American Express made the following
 annotations on 04/18/05 14:09:05

--

**

This message and any attachments are solely for the intended recipient and
may contain confidential or privileged information. If you are not the
intended recipient, any disclosure, copying, use, or distribution of the
information included in this message and any attachments is prohibited. If
you have received this communication in error, please notify us by reply
e-mail and immediately and permanently delete this message and any
attachments. Thank you.


**

==

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

2005-04-18 Thread Jeremy Reynolds
I'm very new to XML and XSL and feel very helpless about a problem I 
am having.  I've tried several message boards with no luck.  The 
problem I am having is this...
===
Problem: can't retrieve the 1 from the ERRORCODE tag.

I've narrowed down the source to the xmlns attribute inside the 
FMPXMLRESULT tag.  Still can't figure out how to code it to grab the 
1 though.  Any ideas?  I've tried:

/ERRORCODE
FMPXMLRESULT/ERRORCODE
/FMPXMLRESULT/ERRORCODE
FMPXMLRESULT/@xmlns/ERRORCODE
and nothing works.
===(XSL)==
xsl:template match=/
OrganizationNamexsl:value-of select=ERRORCODE//OrganizationName
===(Source XML)==
FMPXMLRESULT xmlns=http://www.filemaker.com/fmpxmlresult;
ERRORCODE1/ERRORCODE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Single SQL-statement in PHP to order...

2005-04-18 Thread Gustav Wiberg
Hi there!
I guess this is off-topic? but I want to know if this is possible. (If 
there's anyone out there that have a solution, I would appreciate it 
though)

I want to know if there is anyway of showing tables in PHP in an order 
like this in a single SQL-statement...

Table is like this:
IDCategory
7
15
4
3
I want to order the table like this: First everything that is IDCategory 
4, then the rest of the posts (doesn't matter which order)

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


RE: [PHP] XSL problem

2005-04-18 Thread Jared Williams
 ===
 Problem: can't retrieve the 1 from the ERRORCODE tag.
 
 I've narrowed down the source to the xmlns attribute inside 
 the FMPXMLRESULT tag.  Still can't figure out how to code it 
 to grab the 1 though.  Any ideas?  I've tried:
 
 /ERRORCODE
 FMPXMLRESULT/ERRORCODE
 /FMPXMLRESULT/ERRORCODE
 FMPXMLRESULT/@xmlns/ERRORCODE
 
 and nothing works.
 
 
 ===(XSL)==
 
 xsl:template match=/
 OrganizationNamexsl:value-of 
 select=ERRORCODE//OrganizationName
 
 
 ===(Source XML)==
 
 FMPXMLRESULT xmlns=http://www.filemaker.com/fmpxmlresult;
 ERRORCODE1/ERRORCODE

This is a namespaces related I think, you need to define a the namespace in the 
stylesheet, common place is on the xsl:styleseet
element together, then use the prefix 

xsl:stylesheet xmlns:fm=http://www.filemaker.com/fmpxmlresult; ...

xsl:template match=/
OrganizationNamexsl:value-of select=fm:FMPXMLRESULT/fm:ERRORCODE 
//OrganizationName

Jared

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



Re: [PHP] Single SQL-statement in PHP to order...

2005-04-18 Thread Richard Lynch
select ... from ... ORDER BY (IDCategory = 4) DESC,

IDCategory = 4 will return 1 or 0, for 4 or not 4.

1 is bigger than 0, in most countries. :-)



On Mon, April 18, 2005 2:50 pm, Gustav Wiberg said:
 Hi there!

 I guess this is off-topic? but I want to know if this is possible. (If
 there's anyone out there that have a solution, I would appreciate it
 though)

 I want to know if there is anyway of showing tables in PHP in an order
 like this in a single SQL-statement...

 Table is like this:
 IDCategory
 7
 15
 4
 3

 I want to order the table like this: First everything that is IDCategory
 4, then the rest of the posts (doesn't matter which order)

 /G
 @varupiraten.se


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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] RHES 3 - PHP 5.0.x - freetype

2005-04-18 Thread Richard Lynch
You may want to define does not work a bit more fully.

Does it crash PHP?

Generate error messages?

Not display the text?

Catch your computer on fire?

Post back to the list only -- I probably won't know the answer.

On Mon, April 18, 2005 5:52 am, Sasha Dolgy said:
 (this post has been made to php-install aswell)

 Hi Everyone.  I'm having a little problem here.  Was wondering if
 anyone else had encountered this.  Currently I'm building PHP 5.0.4
 (issue is with .3 aswell) and it's being built on a RHES 3 update 3
 machine.

 The following freetype rpm's come installed on this deployment:

 freetype-2.1.4-4.0
 freetype-devel-2.1.4-4.0

 I can not get freetype to work with PHP unless i download the source,
 ./configure; make; make install ... was wondering what the differences
 would be between the RPM's noted above and a simple install.(The
 configure is located below)

   imagettftext($im, 20, 0, 10, 20, $black, ARIAL.TTF,
   Testing... Omega: amp;#937;);

 When I compile my own freetype and install, and compile php against
 it, the above works.  When I don't, the above does not work.  I would
 really love to get this working with the supplied RHES RPM's.  If
 anyone has any idea I sure would be interested!

 Thanks


 './configure' \
 '--with-apxs=/usr/local/apache/bin/apxs' \
 '--localstatedir=/var' \
 '--with-mysql' \
 '--enable-gd-native-ttf' \
 '--with-gd' \
 '--with-openssl=/usr/local/ssl' \
 '--with-imap=/usr/local/imap-2004a' \
 '--with-imap-ssl' \
 '--enable-embedded-mysqli' \
 '--with-java=/usr/java/jdk' \
 '--with-kerberos' \
 '--with-xml' \
 '--with-xpm' \
 '--with-bz2' \
 '--with-jpeg-dir=/usr/lib' \
 '--with-png-dir=/usr/lib' \
 '--with-ttf=/usr/lib' \
 '--with-freetype-dir=/usr/include/freetype2' \
 '--with-tiff-dir=/usr/lib' \
 '--with-zlib-dir=/usr/lib' \
 '--with-gettext' \
 '--enable-fastcgi' \
 '--disable-path-info-check' \
 '--disable-ipv6' \
 '--with-curl' \
 '--with-exif' \
 '--with-iconv' \
 '--with-ldap' \
 '--enable-mbstring' \
 '--with-mcrypt' \
 '--with-mhash' \
 $@

 --
 Sasha Dolgy
 [EMAIL PROTECTED]

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] mysql blob datatype for documents

2005-04-18 Thread Richard Lynch
On Mon, April 18, 2005 5:40 am, Bosky, Dave said:
 Would it be better to store uploaded pdf, word, or excel documents in a
 MySql blob field rather than keeping them in a directory?

 I really want to secure the documents and limit document access to
 specific users.

It shouldn't be significantly easier to limit access with BLOBs than with
actual files if your Security Model and Design is any good.

And the penalties for using BLOBs to store these are legion.

There is a custom super-fast souped up database storage software package
specifically optimized for large chunks of data like this that you should
be using.

It's call the file system :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] explode a string

2005-04-18 Thread Richard Lynch
On Mon, April 18, 2005 4:34 am, Sebastian said:
 $string = '4:gaming,5:hardware,3:software,8:security';

$idcats = explode(',', $string);
while (list(, $idcat) = each($idcats)){
  list($id, $cat) = explode(':', $idcat);
  echo \$id = $idbr /\n;
  echo \$cat = $catbr /\n;
}

 what is the best way to explode then loop this string after its taken
 apart.

 output should be something like:

 $id = 4
 $cat = gaming

 etc..

 im just looking for the best/fastest way to do this. the string can grow
 to
 200 or so bytes, maybe more.

200 bytes is chump-change.

It really doesn't matter how you do this, within reason.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] stripping of the last character

2005-04-18 Thread Richard Lynch




On Mon, April 18, 2005 5:11 am, Chris Kay said:

 use substr($recipients,0,1);
 to remove the last char

 and ereg_replace(,, ,,$recipients);
 to add the spaces

If the list is *REALLY* large, http://php.net/str_replace might be a bit
faster.

For sure, there's no need to haul out the Ereg cannon for something this
simple. :-)

 Hope this helps

 CK

 On Mon, Apr 18, 2005 at 12:05:42PM +0100, Ross wrote:
 I have a large group of email addesses serperated by commas. I need to
 trim
 off the very last comma

 $recipients = [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],


 Also how would I add a space after every comma? to give

 [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]


 many thanks,

 Ross

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] ldap_connect error

2005-04-18 Thread Richard Lynch
On Mon, April 18, 2005 2:43 am, Steve Turnbull said:
 I am running a LAMP setup consisting of Debian (testing), PHP4, Apache2,
 and
 MySQL 4.

 When I installed php, I used apt-get, and included in the list of modules
 was libapache2_mod_php4 php4 php4-ldap ...

 PHP works fine, and a test phpinfo() brings up all of the expected
 parameters (at least I think it does).

 The one thing that doesn't work is ldap. I have enabled the ldap modules -
 a2enmod ldap - and this doesn't throw an error, it just prompts for the
 apache restart which in turn restarts fine.

 BUT if I run a very simple ldap_connect (see script) I get this error;

 Fatal error: Call to undefined function: ldap_connect()
 in /www/stevedev/vhtdocs/ldap/index.php on line 27

 So it appears that the ldap hasn't got itself running with php.

 The very simple test script I used was;

 $ds = ldap_connect('ldap.our server.net');
 if ($ds) {
 ldap_bind($ds);
 echo 'connected';
 } else {
 echo 'not connected';
 }

 Has any one got any ideas of why this error get thrown?

Sounds to me like you've installed:
LDAP
PHP
but you have *not* installed the PHP-LDAP module.

Search in your apt-get thingie for something like php_ldap or phpldap
which will be the PHP extension that lets PHP actually use LDAP, as
opposed to just happening to have both LDAP and PHP installed on the same
machine.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Php + flash, need some help making a small .FLA

2005-04-18 Thread Richard Lynch
On Sun, April 17, 2005 2:15 pm, Matt Babineau said:
 Does anyone have any experience with integrating php + flash? Or know of
 any
 good tutorial sites? Basically what I want to do is have an animated
 loading
 screen, and then pull pictures from a database and display text from a
 database, text could be scrolling across the bottom like CNN or something.
 Anyone familiar with some techniques on doing this?

 Any examples people may have of this would be great, just send me some
 sample .FLA scripts!!

 If you've got some examples of exactly what I want to do, and you also
 have
 a paypal account, I can make it worth your time :-D

Google for Flash photo album and Flash photo gallery and I'll bet a
dollar you find what you want.

Do I still get the money? :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Localhost not working with cookies

2005-04-18 Thread Richard Lynch
On Sun, April 17, 2005 1:05 pm, Proudly Pinoy said:
 I've read from php.net/setcookie and codecomments.com that using localhost
 won't work with cookies and neither are IP addresses. So how do I test
 cookies on local system?

Works for me.

Maybe doesn't work with specific broken browsers or something, but you
just need it to work for development, where you pick the browser, no?

You'd have to do QA on a non-localhost for those browsers so badly broken
as to not do Cookies for localhost, but that should not be too onerous.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] mysql insert function

2005-04-18 Thread Richard Lynch
On Sun, April 17, 2005 10:56 am, Dasmeet Singh said:
 I regularly need to insert data into MySQL.. and instead of writing
 Insert query everytime i wrote this function... and it works well..

 Please see and tell is it a good idea using this..or there might be
 problems with it?

It's not a Bad Idea, but what are you really saving with all this?

AFTER:
 $fields=array(
 Title = $Title,
 OwnerMemberId = $memberid,
 Address = $Address,
 City = $City,
 State = $State,
 Pin = $Pin
 );

 insertArray(Property, $fields);

BEFORE:
$query = insert into Property (Title, OwnerMemberId, Address, City,
State, Pin) ;
$query .=  values ('$Title', $memberID, '$Adress', '$City', '$State',
'$Pin') ;
db_query($query);

Seems to me you haven't saved any characters in typing, nor made the code
significantly more clear to the reader.

That's just my take.  Everybody and their brother does it your way.
[shrug]

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Another array sorting Problem

2005-04-18 Thread Richard Lynch

Use SQL in your query that looks like:

ORDER BY kat, Rowid

in the first place?


On Sat, April 16, 2005 5:51 pm, Webmaster said:
 Hi,

 I have a multidimensional array looking linke this

 Rowid title   kat
 123   nr1 3
 442   nr2 2
 547665nr3 5
 4532  nr4 3
 3244  nr5 1
 124   nr6 2
 776   nr7 4

 I now need to sort that array first by kat and second on rowid, so it
 would
 throw out:

 Nr5
 Nr6
 Nr2
 Nr1
 Nr4
 Nr7
 Nr3

 I tried to achieve that goal with array_multiosort(), but all I got was a
 one way (either rowid or kat) sorting.

 Do you know some kind of way to achieve my goal?

 Thabk you for helping.
 Mirco Blitz

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] forwarding email messages directly from a maildir

2005-04-18 Thread Richard Lynch
On Sat, April 16, 2005 4:37 am, mbneto said:
 I'd like to make a script that opens my maildir
 (~login/Maildir/.Junk/cur) and forwards all messages to a specific
 address in order to train the spam engine.

 Any tips about this ?

http://php.net/imap

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] processing email

2005-04-18 Thread Richard Lynch
On Fri, April 15, 2005 7:17 pm, Florin Andrei said:
 I want to write an application that's almost like a webmail, but not
 quite. It must receive emails from several mailing lists, store them in
 a database, allow making annotations, provide some kind of accounts with
 passwords, etc. It's quite specialized, it cannot be used as a webmail
 proper, nor a webmail can be used instead (and that's why i'm writing
 it).

 But i do not want to reinvent the wheel. Are there any PHP libraries or
 something to process email? E.g., for things like here's the message,
 separate the headers from the body and do something different with each
 other item or find a discussion thread in these emails if i give you
 the headers of each message. Things like that.

 BTW, i will use PHP-4.3

I wrote a custom spam-filter in PHP cuz I wanted more control...

Source Code:
http://l-i-e.com/imap/index.phps

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] cant get data

2005-04-18 Thread Richard Lynch
On Fri, April 15, 2005 5:14 am, kyriacos sakkas said:
 Hi all,
   I have a problem getting the data from a post request. I have tried
 $_POST and $HTTP_RAW_POST_DATA and they appear to be completely empty.
 the always_populate_raw_post_data  directive is set to on.

 Below is the incoming data as captured by ethereal:

 POST /cyprus/reply.php HTTP/1.1
 Host: 212.31.98.213
 Connection: keep-alive, TE
 X-External-Id: ef58e0602c7db247419ca535eb66e4d4
 X-Recipient: 99527583:0:0
 X-Sender: 4000
 X-Status: done
 TE: trailers
 

 Any ideas ? I am at a loss here

Maybe you screwed up a mod_rewrite, and the POST you see in ethereal gets
rewritten to something entirely different by the time PHP is invoked...

That's all I got.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to unset a post variable

2005-04-18 Thread Richard Lynch
On Fri, April 15, 2005 5:08 am, Mario de Frutos Dieguez said:
 I have another little question hehe :D, i have a page with a form where
 the user insert data and can click in a new,edit or delete button. I've
 make that when a button is clicked the page refresh and in the head of
 the page i have conditions like this: if ($_POSt[buttonNew]!=) {
 insert commands.. } , etc

 My question is, how can i unset $_POST[buttonNew] or leave it empty
 because when the user refresh the page make insert commans again because
 the $_POST[buttonNew] arent empty.

The POST data is sent by the browser, so you can't really alter that...

But you can bury an http://php.net/md5 or other random token in the FORM,
and put that token in a table in your database, and then on the first
POST, you mark that token as used

On the second POST, a re-load, you can detect that the token was used
and do whatever you want.  Re-direct the user, ignore them completely,
give them an error message, blow up their computer.  Well, okay, you can
do almost whatever you want.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] php and linux shell script

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 11:52 pm, Balwant Singh said:
 1) first of all i would like to inform you that i have made a PHP script
 which also have some amount of
 linux shell script in it for converting emails from EVOLUTION to MOZILA
 THUNDERBIRD just by executing
 this script.  if anybody need it, do let me know, i will send the same.

 2) i am also exploring possibilities of using linux dialog boxes (used in
 shell scripting)
 with PHP. has anybody tried it, may please advise me how to call dialog
 boxes through PHP in CLI.
 also please share with me if u have information on how to use PHP with
 Shell Scripting.

http://gtk.php.net/

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Storing password in cookie

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 1:57 pm, [EMAIL PROTECTED] said:
 On 14 Apr 2005 Chris Shiflett wrote:

 When a user enters a credit card number, there may likely be a
 verification step before the actual purchase is made. It's better to
 keep this number on the server (in the session data store) than to
 unnecessarily expose it over the Internet again (SSL mitigates the risk,
 but an unnecessary risk is still worth avoiding).

Hmmm.

Seems to *me* that transmitting the CC# via SSL is more secure than
$_SESSION data on a shared server.

I guess on a dedicated server, it's a question of whether you trust your
own box to not have any sneak users on it, versus SSL-sniffing and
decrypting, and I'd *still* have to guess that SSL-sniffing/decrypting is
less common than hacked servers.  [shrug]  But if Chris says I'm wrong, I
must be wrong on that one.

Frankly, if their CC# failed the validation check, I'd personally just
tell them they typed it wrong, and give them a blank box again.

They'll be too tempted to just try it again without looking at the numbers
if you give it to them all filled in.

You don't think they actually READ those error messages, do you? :-)

If the client paying the bills won't accept that the empty box is right,
and you can't educate them out of their opinion, I guess you're stuck
shuttling the CC# back and forth over SSL.

 Re last four digits, I have notice that many sites seem to be going to
 showing the last five or six, first four plus last four, etc.
 Apparently people are finding that last four alone isn't sufficient for
 users to recognize the card.

As I understand it...

The first four digits, in almost all instances, matches the BANK
(card-issuer).

Each BANK has, like, one or more ---- series and
they exlusively control the cards within  range.

So if somebody uses, say, BankOne for both business and personal, the
first four digits are pretty much guaranteed to be not all that useful to
them.

The odds on any given user having the same last four digits are pretty
narrow.

I suspect that in some cases, the choice of what to display is what comes
back from the Merchant Account Server -- Just display whatever they think
is kosher to send back to you.  Seems like a reasonable action to me. 
After all, they are the ones actually storing/processing the cards, and
they ought to be the ones who know what they are doing.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to unset a post variable

2005-04-18 Thread Chris Kay

unset($_POST['buttonNew']);
wont work?

CK

On Mon, Apr 18, 2005 at 08:25:04PM -0700, Richard Lynch wrote:
 On Fri, April 15, 2005 5:08 am, Mario de Frutos Dieguez said:
  I have another little question hehe :D, i have a page with a form where
  the user insert data and can click in a new,edit or delete button. I've
  make that when a button is clicked the page refresh and in the head of
  the page i have conditions like this: if ($_POSt[buttonNew]!=) {
  insert commands.. } , etc
 
  My question is, how can i unset $_POST[buttonNew] or leave it empty
  because when the user refresh the page make insert commans again because
  the $_POST[buttonNew] arent empty.
 
 The POST data is sent by the browser, so you can't really alter that...
 
 But you can bury an http://php.net/md5 or other random token in the FORM,
 and put that token in a table in your database, and then on the first
 POST, you mark that token as used
 
 On the second POST, a re-load, you can detect that the token was used
 and do whatever you want.  Re-direct the user, ignore them completely,
 give them an error message, blow up their computer.  Well, okay, you can
 do almost whatever you want.
 
 -- 
 Like Music?
 http://l-i-e.com/artists.htm
 
 -- 
 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] Streaming video BLOBs from MySQL

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 12:40 pm, J J said:
 I have a case where video files (mov, flv, etc) have
 been stored in a MySQL database as blobs.

Doc: Don't do that.

 I'm loading them into a flash video player and
 everything works fine except it takes longer it seems
 and it doesn't allow streaming the actual video.

 If I load the same videos with a direct link to the
 http:// file system (/videos/file.flv) it loads in
 super-fast and allows streaming.

 I'm guessing mysql and/or php doesn't actually release
 the BLOB until it's loaded it completely.

You need to figure out where the time is going.

If it's taking all that time to get the BLOB from MySQL to PHP, then it
really doesn't matter how fast you do or don't spew it out from PHP to the
browser.

Do some of these:
?php error_log(__LINE__ . ' ' . microtime()); ?

 So, is there a way to actually have PHP read the BLOB
 and stream it as it's loading?  Is there an fstream()
 option like the fread()?

You could *maybe* use MySQL substring and http://php.net/echo and
http://php.net/flush in a loop, but that's going to be horrible on your
PHP - MySQL end.

You're really going to be better off storing the movies in files where
they belong, as it's perfectly natural to fopen and fread a small chunk to
spew out so it comes out as a stream, not one big blob.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] header()

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 7:54 am, Martín Marqués said:
 I'm having a bit of a problem understanding how the header() sends the
 HTTP
 headers.

 Here's what I want to do:

 1) Send a PDF file which will be printed in the client (the client will
 read
 it and print it if he wants to.
 2) Redirect to the main page of the aplication.

You can't really do that...

If you wanted HTML output plus a re-direct, you could use a META
HTTP-EQUIV tag for the re-direct.

But I know of nothing in a PDF that would get you a re-direct...

Actually, you could send them off to the main page, with a META HTTP-EQUIV
re-directing them to your PDF and it *might* kinda sorta work on *some*
browsers...

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Insert Chars into a string

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 10:53 am, PartyPosters said:
 Hello,
 I have a variable that contains a filename, I want to be able to insert
 the date and time just before for the .jpg
 for example if my filename is 'pic.jpg' I want it to read 'pic_Monday 15th
 of January 2003 05:51:38 AM.jpg (or if anyone else knowshow to write the
 time and time all in numbers it would be appreciated as I'm using ate(l
 dS of F Y h:i:s A) which obviously is a bit long.

You could just use Unix time http://php.net/time and then format it as a
human-readable date later.

Or, use 20030115055138 so you have no spaces as a compromise between
human-comprehensible (with practice) and icky filenames with spaces.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Tomcat and php in Suse 9.2

2005-04-18 Thread Richard Lynch
On Thu, April 14, 2005 2:30 am, Andreas Persson said:
 I have installed tomcat and added php-support with help of the php-servlet
 but it seem like php cant find any of the extensions installed. Like
 mysql. I have the php4-mysql package installed.

 If i run php -i from the commandline its telling me that I have
 mysql-support and a small php-script runned from the commandline verifies
 this.

 But if i run phpinfo() from a php-page under tomcat there is no support
 for mysql (or anyother extension). It tells me that its using /etc/php.ini
 and I have enabled the mysql extension in it.

 Anyone who knows why tomcat failes to find the php-extensions?

What I know about Tomcat could fit in a matchbook with room for all the
technological things Microsoft has done right over the years. :-)

WILD GUESSES:
#1.
What *user* does PHP report in ?php phpinfo();?
Can that user read the extension .so files?

#2.
What path is set for extensions in etc/php.ini?

What path do you see when you do command line:
php -i | grep php.ini

Is that /etc/php.ini?

If not, what path is set for extensions in *THAT* php.ini file -- cuz that
works.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to unset a post variable

2005-04-18 Thread Richard Lynch
On Mon, April 18, 2005 9:42 pm, Chris Kay said:

 unset($_POST['buttonNew']);
 wont work?

Sure it works

It's just not useful in the context of this thread :-)

How do you know to unset it the second time when they hit refresh (aka
reload) though?

I should have said won't solved that specific problem

You can change $_POST all you want, but it doesn't change that fact that
that's what the browser *sent* to you.

To reliable detect a reload of a page, you need to somehow change
something in between load and reload and you have to tie it to that
user, filling in that form, at that time.

There's no easy way to do that unless *YOU* somehow notate each FORM you
send out, and then mark it as used when it comes back.

 On Mon, Apr 18, 2005 at 08:25:04PM -0700, Richard Lynch wrote:
 On Fri, April 15, 2005 5:08 am, Mario de Frutos Dieguez said:
  I have another little question hehe :D, i have a page with a form
 where
  the user insert data and can click in a new,edit or delete button.
 I've
  make that when a button is clicked the page refresh and in the head of
  the page i have conditions like this: if ($_POSt[buttonNew]!=) {
  insert commands.. } , etc
 
  My question is, how can i unset $_POST[buttonNew] or leave it empty
  because when the user refresh the page make insert commans again
 because
  the $_POST[buttonNew] arent empty.

 The POST data is sent by the browser, so you can't really alter that...

 But you can bury an http://php.net/md5 or other random token in the
 FORM,
 and put that token in a table in your database, and then on the first
 POST, you mark that token as used

 On the second POST, a re-load, you can detect that the token was used
 and do whatever you want.  Re-direct the user, ignore them completely,
 give them an error message, blow up their computer.  Well, okay, you can
 do almost whatever you want.

 --
 Like Music?
 http://l-i-e.com/artists.htm

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] How to unset a post variable (SOLVED)

2005-04-18 Thread Mario de Frutos Dieguez
Richard Lynch escribió:
On Mon, April 18, 2005 9:42 pm, Chris Kay said:
 

unset($_POST['buttonNew']);
wont work?
   

Sure it works
It's just not useful in the context of this thread :-)
How do you know to unset it the second time when they hit refresh (aka
reload) though?
I should have said won't solved that specific problem
You can change $_POST all you want, but it doesn't change that fact that
that's what the browser *sent* to you.
To reliable detect a reload of a page, you need to somehow change
something in between load and reload and you have to tie it to that
user, filling in that form, at that time.
There's no easy way to do that unless *YOU* somehow notate each FORM you
send out, and then mark it as used when it comes back.
 

On Mon, Apr 18, 2005 at 08:25:04PM -0700, Richard Lynch wrote:
   

On Fri, April 15, 2005 5:08 am, Mario de Frutos Dieguez said:
 

I have another little question hehe :D, i have a page with a form
   

where
 

the user insert data and can click in a new,edit or delete button.
   

I've
 

make that when a button is clicked the page refresh and in the head of
the page i have conditions like this: if ($_POSt[buttonNew]!=) {
insert commands.. } , etc
My question is, how can i unset $_POST[buttonNew] or leave it empty
because when the user refresh the page make insert commans again
   

because
 

the $_POST[buttonNew] arent empty.
   

The POST data is sent by the browser, so you can't really alter that...
But you can bury an http://php.net/md5 or other random token in the
FORM,
and put that token in a table in your database, and then on the first
POST, you mark that token as used
On the second POST, a re-load, you can detect that the token was used
and do whatever you want.  Re-direct the user, ignore them completely,
give them an error message, blow up their computer.  Well, okay, you can
do almost whatever you want.
--
Like Music?
http://l-i-e.com/artists.htm
--
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
   


 

Thx for all, i do it and works perfectly :D
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php