OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 18 Apr 2005 21:09:12 -0000 Issue 3405

php-general-digest-helplists.php.net
Date: Mon Apr 18 2005 - 16:09:12 CDT


php-general Digest 18 Apr 2005 21:09:12 -0000 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 -0000 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:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


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

attached mail follows:


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

attached mail follows:


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-general&w=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=PHP&submitform=Find+search+plugins

attached mail follows:


Mário Gamito <mailto:liststuxdoit.com>
    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.

attached mail follows:


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:

> phpelectroteque.org 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
>

attached mail follows:


* Dan Rossi <phpelectroteque.org>:
> 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:
>
> > phpelectroteque.org 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:matthewgarden.org | http://vermontbotanical.org

attached mail follows:


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:
>
>> phpelectroteque.org 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
>>
>

attached mail follows:


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

$recipients = jimemail.com,patemail.com,kevinemail.com,

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

jimemail.com, patemail.com, kevinemail.com

many thanks,

Ross

attached mail follows:


$recipients = 'jimemail.com,patemail.com,kevinemail.com,';

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

----- Original Message -----
From: "Ross" <rossaztechost.com>

> I have a large group of email addesses serperated by commas. I need to
trim
> off the very last comma
>
> $recipients = jimemail.com,patemail.com,kevinemail.com,
>
>
> Also how would I add a space after every comma? to give
>
> jimemail.com, patemail.com, kevinemail.com
>
>
> many thanks,
>
> Ross

attached mail follows:


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 = jimemail.com,patemail.com,kevinemail.com,
>
>
> Also how would I add a space after every comma? to give
>
> jimemail.com, patemail.com, kevinemail.com
>
>
> many thanks,
>
> Ross
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


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

attached mail follows:


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBCY78PLT98C3rkVDYRAoSIAJ9JyTySU41XjXIj71/iC4W3cdjC4ACfU/qt
bn/Ju62MiMwYrl8istc3SYQ=
=/DwH
-----END PGP SIGNATURE-----

attached mail follows:


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.

attached mail follows:


Message-ID: <20050418124656.27144.qmaillists.php.net>
To: php-generallists.php.net
From: "Satyam" <satyamsatyam.com.ar>
Date: Mon, 18 Apr 2005 14:46:58 +0200
Subject: Re: mysql blob datatype for documents

"Dave Bosky" <Dave.Boskyhtcinc.net> 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

attached mail follows:


(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
sasha.dolgygmail.com

attached mail follows:


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

attached mail follows:


[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 form....spell it out

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

attached mail follows:


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

attached mail follows:


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/

attached mail follows:


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBCY7/iLT98C3rkVDYRAi4ZAJ9tIballDnQR5vEBu4XMLLYKwfK/QCfZT4a
Re8anId7K4D7JnfTWCb5dLE=
=PzIZ
-----END PGP SIGNATURE-----

attached mail follows:


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 <buorbitel.bg> 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
disguised.jedigmail.com

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

attached mail follows:


To: php-generallists.php.net, Roel Wuyts <Roel.Wuytsulb.ac.be>
Message-ID: <4263C317.20809telesuite.com>
Date: Mon, 18 Apr 2005 10:24:23 -0400
From: Jason Barnett <jason.barnetttelesuite.com>
MIME-Version: 1.0
CC: seworldcs.colorado.edu,
  "squeak-dev lists.squeakfou" <squeak-devlists.squeakfoundation.org>,
  vw-nc <vwnccs.uiuc.edu>, esug-info Board' <esug-infoesug.org>,
  ruby-talkruby-lang.org, ecoop-infoecoop.org, php-generallists.php.net
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enig5FB84C21A21315829440C31A"
Subject: Re: CFP: DLS05: ACM Dynamic Languages Symposium

--------------enig5FB84C21A21315829440C31A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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-general&w
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitformnd+search+plugins

--------------enig5FB84C21A21315829440C31A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFCY8MXGK7BL3TShWoRAvWBAJ96XPVhq2spGuhu3h8sJ4RA2XDHQACghHWj
lV7EBErPw+cVcsCFWlUxKvE CB
-----END PGP SIGNATURE-----

--------------enig5FB84C21A21315829440C31A--

attached mail follows:


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-general&w=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=PHP&submitform=Find+search+plugins

attached mail follows:


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.

attached mail follows:


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-general&w=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=PHP&submitform=Find+search+plugins

attached mail follows:


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-general&w=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=PHP&submitform=Find+search+plugins

attached mail follows:


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.

attached mail follows:


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
johnkegworks.com

attached mail follows:


<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

attached mail follows:


See the register_global my friend maybe it is set off
----- Original Message -----
From: "Greg Deckler" <gdecklerdispatch.com>
To: <php-generallists.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
>

attached mail follows:


On 4/18/05, Chris Ramsay <raz.netgmail.com> 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/

attached mail follows:


On 4/15/05, Mike Smith <mikeosmithgmail.com> 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=barcode&hl=en&lr=&ie=UTF-8&oe=ISO-8859-1&c2coff=1&client=pub-2951707118576741&cof=FORID:1%3BL:http://files.phpclasses.org/graphics/googlesearch.jpg%3BLH:50%3BLW:256%3BGL:1%3BBGC:A3C5CC%3BT:%23000000%3BLC:%230000ff%3BVLC:%23663399%3BALC:%230000ff%3BGALT:%23663399%3BGFNT:%230000ff%3BGIMP:%230000ff%3BDIV:%23222222%3BLBGC:A3C5CC%3BAH:center%3BS:http://www.phpclasses.org/search.html%3B&domains=www.phpclasses.org&sitesearch=www.phpclasses.org&start=10&sa=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

attached mail follows:


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

attached mail follows:


On 4/18/05, Eric Wood <ericinterplas.com> 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

attached mail follows:


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, php-general-digest-helplists.php.net wrote:

> From: "Matt Babineau" <mattcriticalcode.com>
> Date: April 17, 2005 2:15:25 PM PDT
> To: <php-generallists.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: mattcriticalcode.com

attached mail follows:


Message-ID: <20050418180110.62681.qmailweb30505.mail.mud.yahoo.com>
Date: Mon, 18 Apr 2005 11:01:10 -0700 (PDT)
From: I Poop Rainbows <llacookyahoo.com>
To: php-generallists.php.net
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re:Php + flash, need some help making a small .FLA

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

attached mail follows:


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

attached mail follows:


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

******************************************************************************
==============================================================================