php-general Digest 20 Aug 2008 08:48:35 -0000 Issue 5634
Topics (messages 278363 through 278379):
Re: Semi-ADVERT, not really spam, sorry for it
278363 by: Colin Guthrie
278365 by: Jochem Maas
278367 by: Jochem Maas
278371 by: Robert Cummings
278374 by: Jochem Maas
Re: php-general Digest 19 Aug 2008 20:38:46 -0000 Issue 5633
278364 by: Cox, Chris
Re: "make install" doesn't seem to work on "downgrade" on OS X -- anyone else
seen this?
278366 by: Jochem Maas
Re: undefine variable
278368 by: Jochem Maas
Re: pdo compilation question
278369 by: Jochem Maas
Re: SESSION problem
278370 by: Ford, Mike
Re: Tool Tip in pdf
278372 by: Micah Gersten
278379 by: Subhranil
Image Generation
278373 by: Alex Chamberlain
278376 by: Ashley Sheridan
PDO, sqlite write requests (INSERT) don't working
278375 by: KLEIN Stéphane
278377 by: KLEIN Stéphane
278378 by: Ashley Sheridan
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:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Jay Blanchard wrote:
Uh dood....you might want to do a little shopping once in a while. I
think I may be the 2ns oldest on the board and I buy new underwear once
a year whether I need it or not.
Oh..... *buy new* once a year??? I thought the rule was *change*.....
ugg... better fire up the incinerator...
Col
--- End Message ---
--- Begin Message ---
Wolf schreef:
---- tedd <[EMAIL PROTECTED]> wrote:
<!-- SNIP -->
I've freelanced longer than most these guys have been alive.
Cheers,
tedd
See, I knew you were one of the wise ancient ones! Kluthluu!! ;)
Lovecraft! nice one :-)
Hey Tedd, not sure I needed underwear info but it got me thinking,
we could start using it as a metric for hacking experience ... my guess
my guess is I measure about third of a pair of Tedd's Y-fronts, 1/3TYF ;-)
I'm assume they have to be Y-Fronts if they're that old, lol.
@Stut: good points about freelancing, it's also worth noting that a freelancer
charging 'top dollar' will probably not end up costing anymore than someone
charging half as much because they generally get the job done in half the time
and,
as Stut pointed out, they're liable to deliver stuff that you can rely on rather
than have to pray it works.
Wolf
--- End Message ---
--- Begin Message ---
Robert Cummings schreef:
On Tue, 2008-08-19 at 14:36 +0200, Jochem Maas wrote:
Jay Blanchard schreef:
[snip]
PS - for those that know, I'm back ... with a vengeance.
[/snip]
That explains why I didn't sleep well last night. :)
glad to know I haven't lost my touch :-P
Perv!
you have no idea :-P really, and even if you could imagine, the
reality is much worse :-)
judging by you guys though I'm in good company :-)
;)
Cheers,
Rob.
--- End Message ---
--- Begin Message ---
On Tue, 2008-08-19 at 23:51 +0200, Jochem Maas wrote:
> Robert Cummings schreef:
> > On Tue, 2008-08-19 at 14:36 +0200, Jochem Maas wrote:
> >> Jay Blanchard schreef:
> >>> [snip]
> >>> PS - for those that know, I'm back ... with a vengeance.
> >>> [/snip]
> >>>
> >>> That explains why I didn't sleep well last night. :)
> >> glad to know I haven't lost my touch :-P
> >
> > Perv!
>
> you have no idea :-P really, and even if you could imagine, the
> reality is much worse :-)
>
> judging by you guys though I'm in good company :-)
I only took a few psychology courses in university so my ability to help
you is limited. But I guess it's better than nothing... even if my focus
was on the rather generous portion of girls in those classes compared to
the stingy numbers experience in my comp sci courses :B
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
Robert Cummings schreef:
On Tue, 2008-08-19 at 23:51 +0200, Jochem Maas wrote:
Robert Cummings schreef:
On Tue, 2008-08-19 at 14:36 +0200, Jochem Maas wrote:
Jay Blanchard schreef:
[snip]
PS - for those that know, I'm back ... with a vengeance.
[/snip]
That explains why I didn't sleep well last night. :)
glad to know I haven't lost my touch :-P
Perv!
you have no idea :-P really, and even if you could imagine, the
reality is much worse :-)
judging by you guys though I'm in good company :-)
I only took a few psychology courses in university so my ability to help
you is limited. But I guess it's better than nothing... even if my focus
was on the rather generous portion of girls in those classes compared to
the stingy numbers experience in my comp sci courses :B
now I know Im in good company. :-D
Cheers,
Rob.
--- End Message ---
--- Begin Message ---
Does anyone know why the unsubscribe email address is bouncing. Are there any
other ways to unsubscribe?
Chris Cox 415.681.3665 (direct/fax)
Candidate Generation Recruiter
http://www.intuit.com/careers
View Sailen Saha's profile on LinkedIn
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2008 1:39 PM
To: [EMAIL PROTECTED]
Subject: php-general Digest 19 Aug 2008 20:38:46 -0000 Issue 5633
php-general Digest 19 Aug 2008 20:38:46 -0000 Issue 5633
Topics (messages 278296 through 278362):
Re: pdo compilation question
278296 by: Thijs Lensselink
Semi-ADVERT, not really spam, sorry for it
278297 by: V S Rawat
278298 by: metastable
278299 by: Colin Guthrie
278301 by: Stut
278302 by: Jochem Maas
278303 by: Stut
278304 by: V S Rawat
278305 by: V S Rawat
278307 by: V S Rawat
278308 by: metastable
278309 by: Jochem Maas
278310 by: Jochem Maas
278311 by: Jay Blanchard
278312 by: metastable
278313 by: Stut
278314 by: Stut
278316 by: Thijs Lensselink
278317 by: Jochem Maas
278318 by: Jason Pruim
278319 by: Jochem Maas
278320 by: Stut
278321 by: Jason Pruim
278324 by: Wolf
278329 by: V S Rawat
278336 by: Stut
278340 by: V S Rawat
278349 by: V S Rawat
278351 by: Robert Cummings
278352 by: Robert Cummings
278353 by: Stut
278354 by: Robert Cummings
278355 by: tedd
278356 by: Wolf
278357 by: Jay Blanchard
278358 by: tedd
278359 by: Boyd, Todd M.
278360 by: Robert Cummings
278361 by: Ashley Sheridan
278362 by: Jay Blanchard
Re: PHP Script/Thread ID thingie
278300 by: Jochem Maas
278322 by: Herman Gomez
278326 by: Jochem Maas
mail() and exim4
278306 by: Chris Haensel
278315 by: Per Jessen
278327 by: Jochem Maas
Re: File download problem
278323 by: Stefano Noffke
278325 by: Ashley Sheridan
278328 by: Stefano Noffke
278330 by: Stefano Noffke
278332 by: Ashley Sheridan
278337 by: tedd
VCard
278331 by: Hlio Rocha
278333 by: Stut
278334 by: Aschwin Wesselius
278335 by: Ashley Sheridan
loop weirdness
278338 by: Dan Shirah
278339 by: Stut
278341 by: Dan Shirah
278342 by: Stut
278343 by: Dan Shirah
278344 by: Stut
278345 by: clive
278346 by: clive
"make install" doesn't seem to work on "downgrade" on OS X -- anyone else seen
this?
278347 by: Weston C
278348 by: Jason Pruim
278350 by: Weston C
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:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Weston C schreef:
On Tue, Aug 19, 2008 at 9:43 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:
Is there a particular reason you are downgrading?
I'm pretty happy with some of the features in 5.3, but have been asked
to work with a codebase that turned out to have some issues under 5.3
that didn't show up under 5.2.x. I'd love to have the time to dig and
give feedback on the issues for the improvement and quicker release of
5.3, but unfortunately work has to be a higher priority. :(
I hack on a Mac, and when Leopard first came out (I have no experience
on Mac prior to Leopard) even compiling php was nigh on impossible ... It took
me three days to get something compiling, problems were due to borked libs
like libxml IIRC ... I'm no expert on compiler/links environment variables and
things of
that ilk. But theses days compiling and reinstalling php works fine
(at least on my Leopard install), seems all the crufty lib problems have been
fixed with updates.
the first thing I did was remove/disable the standard apache & php installs
e.g. move /usr/bin/php
to something like /usr/bin/php-mac and disable the Personal Webserver (or
whatever the frak its
called). you'll also need to install XCode (1.3Gigs) for some libs and use
something
like macports to install some other libs ... depending on your requirements.
I must admit that the number one reason I rolled my own php is because I need
the
firebird/interbase extension and that's never supplied as standard.
give us some more details on what you system setup is and exactly what your
trying to do. 'downgrading' is too vague.
in the mean time here is what my custom php configure line looks like, it might
provide some inspiration:
'./configure' '--with-config-file-path=/etc' '--sysconfdir=/private/etc' '--prefix=/usr/local/php5' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--with-apxs2=/usr/local/httpd/bin/apxs' '--with-xsl=/usr' '--with-tidy=/opt/local'
'--enable-mbstring' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/opt/local' '--with-png-dir=/opt/local'
'--with-zlib-dir' '--enable-sockets' '--enable-exif' '--with-mcrypt=/opt/local' '--enable-soap' '--with-mysql=/usr/local/mysql'
'--with-mysql-sock=/private/tmp/mysql.sock' '--with-mysqli=/usr/local/mysql/bin/mysql_config'
'--with-pdo-mysql=/usr/local/mysql/bin/mysql_config' '--with-freetype-dir=/opt/local'
'--with-xpm-dir=/Developer/SDKs/MacOSX10.5.sdk/usr/X11' '--with-ldap' '--with-xmlrpc' '--enable-soap' '--enable-sqlite-utf8'
'--enable-ftp' '--enable-sockets' '--with-bz2' '--enable-zip' '--enable-pcntl' '--enable-sockets' '--enable-shmop'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-bcmath' '--with-gettext=/opt/local' '--with-curl'
'--with-mcrypt=/opt/local' '--with-interbase=/opt' '--without-iconv' '--enable-cli' '--with-sqlite'
'--with-config-file-scan-dir=/etc/php.d'
-W
--- End Message ---
--- Begin Message ---
Michael S. Dunsavage schreef:
On Sun, 2008-08-17 at 22:26 +0100, Ashley Sheridan wrote:
Hi Michael,
...
Heh, actually that wasn't the problem after all. Well php still yells @
me about it, but it does work. In fact someone on this list helped me
before, sorry if I can't remember your name who it was :).
it's always worthing looking that kind of thing up, people love to see their
name in lights you know.
on a technical note, it sounds like your script is relying on register_globals
being turned on ... this is a bad thing, most notably when your not properly
up to speed on the security issues this can bite you in the ass, also
register_globals has been depreciated.
code that handles form submissions should be doing something like the
following to check for and validate input:
$selectedStated = isset($_POST['selected_state'])
? intval($_POST['selected_state'])
: null
;
I encourage you to read up on input validation, etc ... phpsec.org is
a good place to start IIRC.
But it
wasn't writing to the DB and I discovered I had to change the
permissions (it was a backup I had restored) and restart mysql. But you
have a lot of useful information in your list, so I'll be keeping it.
--- End Message ---
--- Begin Message ---
Thijs Lensselink schreef:
Quoting Tim Rupp <[EMAIL PROTECTED]>:
...
Thanks in advance,
Tim
you are loading extensions of an older PHP version. Do an ls -als on
/usr/local/lib/php. you will find a directory with a higher date. That's
your new extension path. Just change the location in the php.ini to
reflect the new location.
I'd second that, I'd also say that you might consider compiling the
extensions in statically and save the hassle of having to load the .so files,
if you still don't get anywhere.
--- End Message ---
--- Begin Message ---
Been on holiday, so coming to this party a bit late, but....
On Sat 16/08/2008 15:06 Stut wrote:
> On 16 Aug 2008, at 14:46, tedd wrote:
> > At 2:11 PM +0100 8/16/08, Stut wrote:
> >> Ahh, I see the problem. You've never been able to use numbers as
> >> keys at the root level of the $_SESSION array. It's not a bug, it's
> >> just the way it is. I've just checked the documentation and can't
> >> find an obvious reference to this limitation which is kinda annoying.
Well at http://www.php.net/manual/en/session.examples.php there's a big fat
Note at the top of the page which includes the following: "The keys in the
$_SESSION associative array are subject to the same limitations as regular
variable names in PHP, i.e. they cannot start with a number and must start with
a letter or underscore.".
[ -- SNIP -- ]
> > Let me play the age-card -- in every language I've programmed in for
> > the last 43 years an array can have numeric indexes -- except php's
> > SESSION.
>
> I wish I understood the reason why it's like this but I've never
> looked into the session extension in that level of detail, but I doubt
> such a limitation would exist if there was not a very good reason for
> it.
One word suffices here: register_globals! Or, if that doesn't suffice: if
register_globals is turned on, all the $_SESSION entries are automatically
registered as global variables -- so any numeric indexes will obviously be
invalid and will "disappear". For consistency's sake, PHP enforces the
restriction even with register_globals off.
Cheers!
Mike
--
Mike Ford, Electronic Information Developer,
Libraries & Learning Innovation,
C507, Civic Quarter Campus, Leeds Metropolitan University,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: [EMAIL PROTECTED] Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--- End Message ---
--- Begin Message ---
Which PDF generator are you using?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Subhranil wrote:
> Hi Micah,
> Sorry for late reply. Actually 15th August is our INDEPENDENCE DAY and I was
> out of work.
> I am a newbie. I have very little knowledge about pdf. Could you please give
> some tip for wraping the text
>
> Thanks,
> Subhranil.
>
>
>
> Micah Gersten wrote:
>
>> Why not wrap the text?
>>
>> Thank you,
>> Micah Gersten
>> onShore Networks
>> Internal Developer
>> http://www.onshore.com
>>
>>
>>
>> Subhranil wrote:
>>
>>> Hi all,
>>>
>>> I am creating a pdf where text size of cell is not fixed.
>>> My problem is if one text is too long than that cell then it overlap the
>>> next cell.
>>>
>>> I wish to show the part of the text which are loneger than cell size and
>>> put
>>> a tool tip on that cell which show the complete text.
>>>
>>> Is it possible ? Looking for any suggestion.
>>>
>>> Thanks,
>>> Subhranil.
>>>
>>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>
>
--- End Message ---
--- Begin Message ---
I am using fpdf.
Micah Gersten wrote:
>
> Which PDF generator are you using?
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> Subhranil wrote:
>> Hi Micah,
>> Sorry for late reply. Actually 15th August is our INDEPENDENCE DAY and I
>> was
>> out of work.
>> I am a newbie. I have very little knowledge about pdf. Could you please
>> give
>> some tip for wraping the text
>>
>> Thanks,
>> Subhranil.
>>
>>
>>
>> Micah Gersten wrote:
>>
>>> Why not wrap the text?
>>>
>>> Thank you,
>>> Micah Gersten
>>> onShore Networks
>>> Internal Developer
>>> http://www.onshore.com
>>>
>>>
>>>
>>> Subhranil wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am creating a pdf where text size of cell is not fixed.
>>>> My problem is if one text is too long than that cell then it overlap
>>>> the
>>>> next cell.
>>>>
>>>> I wish to show the part of the text which are loneger than cell size
>>>> and
>>>> put
>>>> a tool tip on that cell which show the complete text.
>>>>
>>>> Is it possible ? Looking for any suggestion.
>>>>
>>>> Thanks,
>>>> Subhranil.
>>>>
>>>>
>>> --
>>> 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
>
>
>
--
View this message in context:
http://www.nabble.com/Tool-Tip-in-pdf-tp18980527p19065222.html
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Hi,
I need to generate an online proof for vinyl lettering. Customers specify
the text, font, colour, maximum frame size (mm) (ie the width and height it
must fit into), and whether or not they want to keep aspect ratio (ie not
distort the lettering).
I want to represent all this on a single image. So it would display a border
with their width and height on, and inside this would be the text in the
appropriate colour and font – if they decide to keep aspect ratio the text
would not be distorted. If they do not, it would be. The image would always
be 300px wide by 150px high (these would need to be constants that I could
change from time to time).
I’ve got a very basic proof working using a GD wrapper, but I don’t think GD
is powerful enough to do it all, nor do I recon my programming skills are up
for it. Has anybody got any advice on how to tackle this, even if it is just
bits of the problem??
Thanks,
Alex Chamberlain
No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.6/1621 - Release Date: 19/08/2008
18:53
--- End Message ---
--- Begin Message ---
I don't think GD has a built-in function to scale an image the way you
are asking, and to do it on a pixel by pixel basis from within a
function is going to be a very time consuming and memory costly process.
Have you thought about using ImageMagik to do this? I know that you can
exec() out to this from within Windows and Linux, and ImageMagik is free
to use (as far as I'm aware) so it could be just what you need.
Ash
www.ashleysheridan.co.uk
--- Begin Message ---
Hi,
I need to generate an online proof for vinyl lettering. Customers specify
the text, font, colour, maximum frame size (mm) (ie the width and height it
must fit into), and whether or not they want to keep aspect ratio (ie not
distort the lettering).
I want to represent all this on a single image. So it would display a border
with their width and height on, and inside this would be the text in the
appropriate colour and font – if they decide to keep aspect ratio the text
would not be distorted. If they do not, it would be. The image would always
be 300px wide by 150px high (these would need to be constants that I could
change from time to time).
I’ve got a very basic proof working using a GD wrapper, but I don’t think GD
is powerful enough to do it all, nor do I recon my programming skills are up
for it. Has anybody got any advice on how to tackle this, even if it is just
bits of the problem??
Thanks,
Alex Chamberlain
No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.6/1621 - Release Date: 19/08/2008
18:53
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- End Message ---
--- Begin Message ---
Hi,
it's the first time I use sqlite in PHP script.
All read requests work perfectly but I don't get on execute write
requests.
Example :
<?php
try { $dbh = new PDO("sqlite:../example1.sqlite", '', ''); }
catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); }
var_dump($dbh);
$firstname = "foobarbbar";
$lastname = "barbarbar";
try {
$sql = "INSERT INTO contact (firstname, lastname)
VALUES('".addslashes($firstname)."', '".addslashes($lastname)."')";
$result = $dbh->exec($sql);
var_dump($result);
} catch(PDOExecption $e) {
print "Error!: " . $e->getMessage() . "</br>";
}
?>
$ ls ../ -lha
...
-rw-rw-rw- 1 stephane stephane 237K 2008-08-19 21:09 example1.sqlite
...
When I launch this script INSERT request don't work, nothing is inserted in
contact table.
var_dump($result) return : bool(false)
Have you already see this issue ? What is my mistake ?
Thanks for your help,
Stephane
--- End Message ---
--- Begin Message ---
Le Wed, 20 Aug 2008 07:48:02 +0000, KLEIN Stéphane a écrit :
> Hi,
>
> it's the first time I use sqlite in PHP script.
>
> All read requests work perfectly but I don't get on execute write
> requests.
>
> Example :
>
> <?php
> try { $dbh = new PDO("sqlite:../example1.sqlite", '', ''); } catch
> (PDOException $e) { echo "Connection failed: " . $e->getMessage(); }
>
> var_dump($dbh);
>
> $firstname = "foobarbbar";
> $lastname = "barbarbar";
>
> try {
> $sql = "INSERT INTO contact (firstname, lastname)
> VALUES('".addslashes($firstname)."', '".addslashes($lastname)."')";
> $result = $dbh->exec($sql);
> var_dump($result);
> } catch(PDOExecption $e) {
> print "Error!: " . $e->getMessage() . "</br>";
> }
> ?>
>
> $ ls ../ -lha
> ...
> -rw-rw-rw- 1 stephane stephane 237K 2008-08-19 21:09 example1.sqlite ...
>
> When I launch this script INSERT request don't work, nothing is inserted
> in contact table.
>
> var_dump($result) return : bool(false)
>
> Have you already see this issue ? What is my mistake ?
I found my mistake :
$ chmod ugo+rwX ../
It was the directory that had bad authorization.
Regards,
Stephane
--- End Message ---
--- Begin Message ---
Hi KLEIN, I think the problem is where you are connecting to your
database. I've not used SQL lite before, but the function spec says that
you have too many arguments. It suggests connecting like this:
if ($db = new SQLiteDatabase('filename'))
Also, do you need to specify the sqlite: protocol before the path? Does
the system even know what this path is? One further note; you are using
a relative path, but is it relative to the right location? Does it have
to be relative to the system runtime or the PHP file? Try an absolute
path to see if that fixes it.
Ash
www.ashleysheridan.co.uk
--- Begin Message ---
Hi,
it's the first time I use sqlite in PHP script.
All read requests work perfectly but I don't get on execute write
requests.
Example :
<?php
try { $dbh = new PDO("sqlite:../example1.sqlite", '', ''); }
catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); }
var_dump($dbh);
$firstname = "foobarbbar";
$lastname = "barbarbar";
try {
$sql = "INSERT INTO contact (firstname, lastname)
VALUES('".addslashes($firstname)."', '".addslashes($lastname)."')";
$result = $dbh->exec($sql);
var_dump($result);
} catch(PDOExecption $e) {
print "Error!: " . $e->getMessage() . "</br>";
}
?>
$ ls ../ -lha
...
-rw-rw-rw- 1 stephane stephane 237K 2008-08-19 21:09 example1.sqlite
...
When I launch this script INSERT request don't work, nothing is inserted in
contact table.
var_dump($result) return : bool(false)
Have you already see this issue ? What is my mistake ?
Thanks for your help,
Stephane
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- End Message ---