php-general Digest 13 Jun 2005 14:52:51 -0000 Issue 3510

Topics (messages 216875 through 216887):

Re: PHP ImageCreateFrom.. malfunctioning in last PHP releases...
        216875 by: Richard Lynch

Re: news php 5.0.5/5.1
        216876 by: JamesBenson

Delivery failed
        216877 by: Mail Administrator

Re: Compilation trouble on OS X
        216878 by: Marcus Bointon
        216880 by: Marcus Bointon

php extension with pthreads
        216879 by: Nikunj Gupta

Re: Oracle Interface
        216881 by: Shane Presley
        216882 by: Jay Blanchard
        216884 by: Shane Presley

Re: [nyphp] IBM's PHP Strategy - New York PHP June Meeting - Designer Training 
June 27th
        216883 by: Hans Zaunere

Re: reverse MD5 ???
        216885 by: Jason Barnett

Optimizing Help
        216886 by: jack jackson
        216887 by: Chris Ramsay

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


----------------------------------------------------------------------
--- Begin Message ---
On Sun, June 12, 2005 7:37 pm, M said:
> I use ImageCreateFromString PHP functions to resize (thumbnails and so)
> dynamically my JPG images.
>
> I use third party WEB hosting provider , so I have no control about new
> releases and updates of server softwares.
>
> I have not changed my images in last 3 years (they are used for virtual
> stores), they appeared beautiful in these 3 years, but from some days
> ago, they are appearing with terrible filter colors (all blue for
> instance, some entirely black and so). When bypassing image PHP
> functions, images again appear beautiful in my page, but site
> performance to show product catalogs gets terrible, not to say
> impossible for customers browse on it.
>
> I wrote web provider to check what changed in their PHP environment, but
> I am afraid they will answer none has changed.
>
> I use the following sequence of commands to rebuild thumb images:
>
> $orimage = ImageCreateFromString(string)         to get original image
> from opened JPG file
> $thumb =  ImageCreate(new-width, new-height) to create empty new
> thumbnail

Make this one be ImageCreateTrueColor()
http://php.net/imagecreatetruecolor

> ImageCopyResized($thumb,$origame,....)  to fill thumbnail
> ImageJpeg($thumb)  to show thumbnail
>
> I checked by increasing 'quality' parameter  ImageJpeg($thumb,'',100)
> but result continue to be wrong.
>
> Is anobody else experiencing these problems lately?, how did you solve
> it?

I believe something changed in the GD library where lo-res internal images
were not promoted to hi-res or something like that...

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

--- End Message ---
--- Begin Message ---
5.1.0 BETA, http://www.php.net/downloads.php






mbneto wrote:
Hi,

I've looked at php.net but could not find info regarding if/when are
we going to have further 5.0.x versions and what will change in php
5.1.

Any pointers (besides the php-devel) ?

--- End Message ---
--- Begin Message ---
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

Message could not be delivered

file attachment: message.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help & Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 

--- End Message ---
--- Begin Message ---
On 12 Jun 2005, at 04:17, Richard Lynch wrote:

I vaguely recall an issue with mb_* where people saw this nifty new
feature and turned it on having no idea what it was, and, well, they
didn't really want that feature turned on at all...

This could be the same thing.

Or not.

Try ./configure --without-mbstring

Unfortunately I'm deliberately enabling mbstring because I need multibyte string support, along with mbregex... If I could live without these extensions I wouldn't need to recompile.

I just tried compiling on a clean install of 10.4, with a clean install of fink (I'm using some fink packages like apache2, JPEG, PNG, etc) and I'm still getting the ld problem I mentioned. Think I may have to report it as a bug and see what comes of that.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
On 13 Jun 2005, at 10:52, Marcus Bointon wrote:

I just tried compiling on a clean install of 10.4, with a clean install of fink (I'm using some fink packages like apache2, JPEG, PNG, etc) and I'm still getting the ld problem I mentioned. Think I may have to report it as a bug and see what comes of that.

A little perseverance always helps... I went through my configure command and removed a few possibly obsolete directives. I then ran into a dependency on gdbm that I can't explain, but after adding that in, I'm happy to report that it now works. For the record, here's my working config while building PHP 5.0.4 on OS X 10.4.1 as an apache2handler using fink libraries, also notable is that it also enables both mysql and mysqli extensions simultaneously:

'./configure' \
'--disable-overload' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-dba' \
'--enable-exif' \
'--enable-ftp' \
'--enable-gd-imgstrttf' \
'--enable-gd-native-ttf' \
'--enable-mbregex' \
'--enable-mbstring' \
'--enable-mcal' \
'--enable-pcntl' \
'--enable-shmop' \
'--enable-soap' \
'--enable-sockets' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-track-vars' \
'--enable-wddx' \
'--sysconfdir=/etc' \
'--with-apxs2=/sw/sbin/apxs' \
'--with-bz2' \
'--with-config-file-path=/etc' \
'--with-config-file-scan-dir=/etc/php.d' \
'--with-curl' \
'--with-dom=/usr' \
'--with-freetype2-dir=/sw' \
'--with-gd' \
'--with-gdbm=/sw' \
'--with-gettext=/sw' \
'--with-iconv' \
'--with-imap-ssl=/sw' \
'--with-jpeg-dir=/sw' \
'--with-png-dir=/sw' \
'--with-ldap' \
'--with-mcrypt=/sw' \
'--with-mhash=/sw' \
'--with-mysql=/usr/local/mysql' \
'--with-mysqli=/usr/local/mysql/bin/mysql_config' \
'--with-openssl' \
'--with-pcre' \
'--with-pear' \
'--with-png' \
'--with-ttf' \
'--with-xml' \
'--with-xsl' \
'--with-zlib' \
'--without-oci8'

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
hi
i am new to php and am building my first php extension. i have a code
in cpp that uses pthreads for carrying out the job. i tried to convert
this into a php extension but was unable to do so despite a number of
tries.

i am able to compile the extension that i build but am unable to load it.
the error that i get is ::

PHP Warning:  Unknown(): Unable to load dynamic library
'/home/y/lib/php/20020429/perfext.so' -
/home/y/lib/php/20020429/perfext.so: Undefined symbol
"pthread_exit" in Unknown on line 0

i have used the line

PHP_ADD_LIBRARY_WITH PATH to include pthread library and also used
-pthread in the cppflags.

do i need to do anything else for creating such an extension.

--- End Message ---
--- Begin Message ---
On 6/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Fri, June 10, 2005 8:48 am, Shane Presley said:
> > Where can I find some info on integrating Oracle and PHP?
> 
> http://php.net/oracle
> 
> pretty much covers it.

Thanks!  You're right, that looks pretty straight forward.  Although I
do have two additional questions...

How do I find out how my PHP was compiled? The documentation states:
  You have to compile PHP with the option --with-oracle[=DIR], where
DIR defaults to your environment variable ORACLE_HOME.

But I'm using PHP from the Red Hat default install (I didn't compile it).

Also, do you know if this is Oracle version independent.  More
specifically will this work with Oracle 10g?

Thanks
Shane

--- End Message ---
--- Begin Message ---
[snip]
How do I find out how my PHP was compiled? The documentation states:
  You have to compile PHP with the option --with-oracle[=DIR], where
DIR defaults to your environment variable ORACLE_HOME.

But I'm using PHP from the Red Hat default install (I didn't compile
it).

Also, do you know if this is Oracle version independent.  More
specifically will this work with Oracle 10g?
[/snip]

To find out how your PHP was compiled create a test page with this
only...

<?php

phpinfo();

?>

And then load the page from your web server. It will return a wealth of
information to you. As far as Oracle compatability it would be hard to
know with the info you provided, but you'll find out things like PHP
version when you do the test page.

--- End Message ---
--- Begin Message ---
On 6/13/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> To find out how your PHP was compiled create a test page with this
> only...
> 
> <?php
> 
> phpinfo();
> 
> ?>
> 
> And then load the page from your web server. It will return a wealth of
> information to you. As far as Oracle compatability it would be hard to
> know with the info you provided, but you'll find out things like PHP
> version when you do the test page.
> 

Thanks!  So it looks like PHP wasn't compiled with the needed variable.

PHP Version 4.3.2

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect'
'--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db4=/usr'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gettext'
'--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-regex=system'
'--with-xml' '--with-expat-dir=/usr' '--with-pcre-regex=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--enable-mbregex'
'--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared'
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal'
'--with-apxs2filter=/usr/sbin/apxs'

However, there is a section about dbx...

dbx support     enabled
dbx version     1.0.0
supported databases     MySQL ODBC PostgreSQL Microsoft SQL Server
FrontBase Oracle 8 (oci8) Sybase-CT

Not sure what that is?

Shane

--- End Message ---
--- Begin Message ---
FYI for those in the tri-state area.

> -----Original Message-----
> From: Hans Zaunere [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 12, 2005 2:50 PM
> To: [EMAIL PROTECTED]
> Subject: [nyphp-announce] IBM's PHP Strategy - New York PHP June Meeting
> 
> New York PHP June Meeting
> --------------------------
> 
>         When: June 28th, 2005 at 6:30pm *sharp*
>        Where: 590 Madison Avenue, Room 1219 (12th floor)
> Post-Meeting: TGI Fridays at Lexington and 56th
> 
> NEW RSVP POLICY:
> You must RSVP within 30 days of the meeting you will attend and must
> RSVP
> for every meeting.
> 
> This means you likely need to RSVP!  Please
> http://www.nyphp.org/rsvp.php to
> check your RSVP status.  If there are any questions, contact us at
> http://www.nyphp.org/contact.php
> 
> 
> IBM's PHP Strategy
> 
> Join us this month as we hear from David Boloker, CTO of Emerging
> Technology
> in the IBM Software Group. Dave and his team will speak about IBM's PHP
> strategy, contributions, and upcoming products.
> 
> The team from IBM will also discuss the recent Zend Technologies
> partnership
> and demonstrate some PHP applications and extensions that are in the
> works.
> This meeting promises to be a great opportunity to ask questions about
> IBM's
> PHP roadmap.
> 
> The presenters will cover the following topics:
> 
> IBM's PHP Strategy (David Boloker)
> - Why PHP
> - The Zend relationship
> - What are we doing and where are we going
> 
> PHP Technologies and IBM (Stewart Nickolas)
> - PDO status and efforts
> - Web services
> 
> Composite Applications using Mambo (Dan Gisolfi)
> - Building composite applications with open source components and
> frameworks
> 
> 
> Thanks to Dan Krook and Platinum sponsor IBM for providing a great
> presentation space with seating for plenty.
> 
> As a service to our community, New York PHP meetings are always free and
> open to the public.
> 
> Come prepared with a business card to enter book raffles.
> 
>         When: June 28th, 2005 at 6:30pm *sharp*
>        Where: 590 Madison Avenue, Room 1219 (12th floor)
> Post-Meeting: TGI Fridays at Lexington and 56th
> 
> Join us after the meeting for good food and discussion!
> 
> NEW RSVP POLICY: RSVP online at http://www.nyphp.org/rsvp.php
> 
> 
> 
> 
> Designer Track Training Seat Available
> --------------------------------------------------------------
> 
> We have a couple seats available in the upcoming training in June.  If
> you'd
> like to attend see http://www.nyphp.org/contactedu and learn more at
> http://www.nyphp.org/content/training/twodaycourse.php
> 
> 
> 
> PHP Turns 10
> --------------------------------------------------------------
> 
> Thanks to all those who showed up for our informal get together on June
> 8th
> for PHP's tenth birthday.  Lots of good development discussion was had!
> 
> 
> ---
> New York PHP
> http://www.nyphp.org
> 
> AMP Technology
> Supporting Apache, MySQL and PHP
> 

--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
On Fri, June 10, 2005 3:01 pm, Jason Barnett said:

That is incredibly interesting stuff, many thanks for that link!  So the
position seems to be that it may not be feasible to reverse MD5, but it
is now feasible to create forged documents / binaries / whatever that
result in exactly the same MD5 hash as the original.


No.


Richard, did you actually go to the site that Greg showed and look at the example? Two very different (as in content) postscript documents... same MD5 hash.


I actually tried it out for myself... and indeed the two different
documents produced the exact same MD5 sum.


That's a one in a billion chance...

So, if your binary file HAPPENS to match that meaningless string, you
could use that OTHER meaningless string instead...


Again I say... did you look at the other "meaningless" string in the example? I don't pretend to understand how the authors made it work, but it wasn't just some "meaningless" string that they got to match.

I'll bet neither of the two strings has any real-world "meaning"

They just happen to be the two strings that are "easy" to find that have
the same MD5.

This has absolutely NO meaning in real-world uses of MD5.

You'd have heard a LOT more screaming and wailing and gnashing of teeth if
this mattered. :-)


Unless of course most people dismiss it the same way that you seem to be dismissing it. ;)

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

--- End Message ---
--- Begin Message ---
Hello,
Recently with the help of several of you I got a script working. It's
complex, I'm still new, some parts of it came from other authors and I
adapted it, and generally despite the fact that it seems to work
perfectly at this point, I am certain that there is bloat, repetition
and simply useless crap.

I'd like to know if anyone can have a look and help me optimize what I
have. For example, there are several mysql queries - would it be
possible to combine them somehow? I use the image upload section twice
because I couldn't figure out how to make it work using different vars
within the same section. That kind of newbie stuff.

The code is here: http://hashphp.org/pastebin.php?pid=3701

Thanks in advance!

--- End Message ---
--- Begin Message ---
Hey there Jackson,

The first thing I would consider would be to see if you can classify
the code into chunks that do a certain job, and then rewrite them as
functions. I would also consider looping through arrays for repetitive
jobs (lines 258 -> 270 for example).

Down the line you could consider the use of classes, your own or ready
made -  such as the ever useful PEAR (http://pear.php.net). I
personally found that the greatest saver of time to be the re-use of
code that I know works well for given situations.

HTH

Chris

--- End Message ---

Reply via email to