php-general Digest 10 Jan 2009 12:54:36 -0000 Issue 5893
Topics (messages 285922 through 285939):
Re: Couple of beginner questions
285922 by: Eric Butera
Re: Using MDB2 outside the PEAR framework?
285923 by: Murray
285939 by: Murray
Re: First steps towards unix and php
285924 by: Ashley Sheridan
Re: imagejpeg, imagecreatefromjpeg both choke
285925 by: Ashley Sheridan
Re: Convert CMYK values to RGB values?
285926 by: Phpster
285927 by: Shawn McKenzie
285928 by: John Corry
Apache File Quesiton
285929 by: Gary
285930 by: Phpster
285932 by: Murray
Re: hello
285931 by: Paul Scott
285933 by: Robert Cummings
285934 by: Daniel Brown
285935 by: Paul M Foster
285936 by: Robert Cummings
285937 by: Robert Cummings
com_event_sink question
285938 by: Jason Paschal
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On Fri, Jan 9, 2009 at 5:53 PM, <c...@l-i-e.com> wrote:
>
> I'm talking about having PHP rip through .html files without any
> <?php echo *;?>
> inside of them.
>
> You added <?php echo *; ?>
>
> Don't do that. :-)
>
> ln -s foo.html foo.php
>
> Surf to both and time it.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Is this better?
$ cat hello-world.html
Hello World
$ ab -c 50 -t 30 http://localhost/benchmarks/hello-world.html
Requests per second: 4030.52 [#/sec] (mean)
Time per request: 12.405 [ms] (mean)
Time per request: 0.248 [ms] (mean, across all concurrent requests)
Requests per second: 4730.00 [#/sec] (mean)
Time per request: 10.571 [ms] (mean)
Time per request: 0.211 [ms] (mean, across all concurrent requests)
Transfer rate: 1529.37 [Kbytes/sec] received
Requests per second: 4866.09 [#/sec] (mean)
Time per request: 10.275 [ms] (mean)
Time per request: 0.206 [ms] (mean, across all concurrent requests)
Transfer rate: 1573.24 [Kbytes/sec] received
Requests per second: 4313.09 [#/sec] (mean)
Time per request: 11.593 [ms] (mean)
Time per request: 0.232 [ms] (mean, across all concurrent requests)
Transfer rate: 1394.62 [Kbytes/sec] received
$ mv hello-world.php hello-world.html
$ ab -c 50 -t 30 http://localhost/benchmarks/hello-world.php
Requests per second: 2649.66 [#/sec] (mean)
Time per request: 18.870 [ms] (mean)
Time per request: 0.377 [ms] (mean, across all concurrent requests)
Transfer rate: 685.87 [Kbytes/sec] received
Requests per second: 2774.03 [#/sec] (mean)
Time per request: 18.024 [ms] (mean)
Time per request: 0.360 [ms] (mean, across all concurrent requests)
Transfer rate: 718.05 [Kbytes/sec] received
Requests per second: 2722.94 [#/sec] (mean)
Time per request: 18.363 [ms] (mean)
Time per request: 0.367 [ms] (mean, across all concurrent requests)
Transfer rate: 704.79 [Kbytes/sec] received
Requests per second: 2769.77 [#/sec] (mean)
Time per request: 18.052 [ms] (mean)
Time per request: 0.361 [ms] (mean, across all concurrent requests)
Transfer rate: 717.00 [Kbytes/sec] received
--- End Message ---
--- Begin Message ---
I'm still experiencing problems making use of my imported MDB2 classes.
General querying appears to work fine, but performing something like
$mdb2->quote($variable) causes the application to come to a halt, without
any error messages (at least, without any displayed while debugging through
Netbeans 6.5).
What I did was copy into my application directories the following:
- MDB2.php
- PEAR.php
- All files under subdirectory MDB2
I added the directory where MDB2.php and PEAR.php are located to the
include_path, as well as the MDB2 subdirectory.
I know this is probably a longshot, but I was wondering if anyone on the
list has any ideas if I should be including any other subdirectories, or if
I should have copied anything else across from the PEAR installation to get
functions such as $mdb2->quote() to work?
Other than that, does anyone know of a resource where I can ask questions
such as the above to people more actively involved with the MDB2 project?
Unfortunately, this is driving me bonkers and means I'm not spending quality
time on the actual development of the application I'm trying to build.
M is for Murray
On Sat, Dec 27, 2008 at 3:50 PM, Murray <planetthought...@gmail.com> wrote:
> Thanks John and Mattias,
>
> It looks like your advice has helped me achieve my goal.
>
> Thanks again!
>
> M is for Murray
>
>
>
> On Sat, Dec 27, 2008 at 2:05 PM, Mattias Thorslund
> <matt...@thorslund.us>wrote:
>
>> As far as I recall, having done this, all that is required for a basic
>> MDB2 is the PEAR base class and the driver classes for the platforms you
>> want to support.
>>
>>
>>
>> Murray wrote:
>>
>>> Hi All,
>>>
>>> I'm wondering if it's possible or practical to implement MDB2 in my web
>>> application, but without requiring a PEAR installation on the destination
>>> server?
>>>
>>> Essentially, I'd like to include MDB2 entirely within my web application,
>>> so
>>> I can make use of db abstraction even on servers where PEAR isn't and
>>> can't
>>> be installed.
>>>
>>> Any suggestions?
>>>
>>> Many thanks in advance,
>>>
>>> M is for Murray
>>>
>>>
>>>
>>
>>
>
--- End Message ---
--- Begin Message ---
Just for the record, it appears (so far) that the fix for my problem was
REMOVING the path to the normal PEAR directory from my 'include_path'
string. I guess a conflict was taking place where files were being loaded
both from the included subdirectories in my application and the PEAR
directories themselves.
M is for Murray
On Sat, Jan 10, 2009 at 9:47 PM, Murray <planetthought...@gmail.com> wrote:
> Hi Richard,
>
> Where would I find that article, if you think it might help me get MDB2
> working properly?
>
> Many thanks in advance,
>
> M is for Murray
>
>
> On Sat, Jan 10, 2009 at 9:32 PM, Richard Heyes <rich...@php.net> wrote:
>
>> > ...
>>
>> FWIW, for anyone considering the same, it can be done easily by not
>> using the PEAR installer, and copy/pasting the code from the PEAR
>> website. I wrote an article on appliction structure which illustrates
>> this, having a PEAR "installation" directory alongside your htdocs
>> directory.
>>
>> --
>> Richard Heyes
>>
>> HTML5 Graphing for FF, Chrome, Opera and Safari:
>> http://www.rgraph.org (Updated January 4th)
>>
>
>
--- End Message ---
--- Begin Message ---
On Thu, 2009-01-08 at 17:33 -0600, Skip Evans wrote:
> Ross McKay wrote:
> > You should also check out editors and IDEs - STFW for previous posts
> > made to this and other groups. Then pick Geany ;)
> >
>
> Hey Ross & all,
>
> I used Kate on Ubuntu for a code editor. I just read through a bit about
> Geany (was not familiar with it), but don't see too much more it would
> do for me than Kate.
>
> What are some of your favorite features of Geany I should be aware of?
>
>
> --
> ===========================================
> Skip Evans
> Big Sky Penguin, LLC
> 503 S Baldwin Street
> Madison, Wisconsin 53703
> 608.250.2720
> http://bigskypenguin.com
>
I love Kate (the editor that is ;) ) I use it for editing everything
from PHP and HTML, to C++ and C#. It's a damn good editor, and the bonus
of the plugins is particularly useful too.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On Fri, 2009-01-09 at 09:25 -0800, Brian Dunning wrote:
> Same thing, no output at all. I can access the image directly in my
> browser and it's fine.
>
> On Jan 9, 2009, at 7:52 AM, Zechim wrote:
>
> > try,
> >
> > header('Content-type: image/jpeg');
> > $image = imagecreatefromjpeg($your_file);
> > imagejpeg($image,"", 100);
> > imagedestroy($image);
> >
> > zechim
>
>
Are you sure it's a valid Jpeg that GD can understand? It may be a
Jpeg2000, which GD can't yet handle, as it allows for CMYK images and
lossless compression.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
I found a function on phpbuilder.com but can't copy it on the iPod
keyboard. I did a google on php rbg to cmyk value
Bastien
Sent from my iPod
On Jan 9, 2009, at 6:43 PM, Brian Dunning <br...@briandunning.com>
wrote:
I think your short answer is the right one. This explains why I
didn't find that cmyk_to_rgb() function on php.net. Thanks... :-(
On Jan 9, 2009, at 3:14 PM, c...@l-i-e.com wrote:
Short Answer:
You can't.
:-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
c...@l-i-e.com wrote:
> Short Answer:
>
> You can't.
> :-)
>
> http://en.wikipedia.org/wiki/CMYK
>
> Long Answer:
> You probably can, but not in some way that makes sense to discuss here on
> PHP-general.
>
> The external links in the above article should get you started.
>
May not always come out with the best colors, but the rough formula is:
Black = minimum(1-Red,1-Green,1-Blue)
Cyan = (1-Red-Black)/(1-Black)
Magenta = (1-Green-Black)/(1-Black)
Yellow = (1-Blue-Black)/(1-Black)
Write your own little functions to convert.
--
Thanks!
-Shawn
http://www.spidean.com
--- End Message ---
--- Begin Message ---
Have you looked here?
http://www.google.com/custom?domains=www.phpclasses.org&q=cmyk+to+rgb&sa=Search&sitesearch=www.phpclasses.org&client=pub-2951707118576741&forid=1&channel=5742870948&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23663399%3BGL%3A1%3BDIV%3A%23222222%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AA3C5CC%3BLBGC%3AA3C5CC%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000%3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BLH%3A50%3BLW%3A256%3BL%3Ahttp%3A%2F%2Ffiles.phpclasses.org%2Fgraphics%2Fgooglesearch.jpg%3BS%3Ahttp%3A%2F%2Fwww.phpclasses.org%2Fsearch.html%3BFORID%3A1%3B&hl=en
Without looking at any of their code, I do notice that some class
descriptions look promising.
John Corry
On Fri, Jan 9, 2009 at 8:03 PM, Shawn McKenzie <nos...@mckenzies.net> wrote:
> c...@l-i-e.com wrote:
>> Short Answer:
>>
>> You can't.
>> :-)
>>
>> http://en.wikipedia.org/wiki/CMYK
>>
>> Long Answer:
>> You probably can, but not in some way that makes sense to discuss here on
>> PHP-general.
>>
>> The external links in the above article should get you started.
>>
>
> May not always come out with the best colors, but the rough formula is:
>
> Black = minimum(1-Red,1-Green,1-Blue)
> Cyan = (1-Red-Black)/(1-Black)
> Magenta = (1-Green-Black)/(1-Black)
> Yellow = (1-Blue-Black)/(1-Black)
>
> Write your own little functions to convert.
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Not sure how to word this, but I have just installed the XAMMP package with
Apache, PHP for the purpose of having a testing server.
My confusion is the location of the files. I am using Dreamweaver CS3, and
all of my sites were in My Douments\Sites. When I was trying to set up the
testing server in DW, I directed it to http://localhost. I was pretty sure
it was not going to work, and I was right. I then created a folder in
C:\xammp\htdocs\ and directed it to there...again no go.
Part of my confusion is that if I create a page as I normally do, and it is
stored in My documents\Sites\sitename, then there is no file that is then
created in the C:\xammp\htdocs\.
So, does it make sense for me to simply put all of my local files in the
tester server root folder? Or am I going about it wrong?
Thanks
Gary
--- End Message ---
--- Begin Message ---
Check the httpd.conf file for the location of the web dir. It's the
documentroot directive
Bastien
Sent from my iPod
On Jan 9, 2009, at 9:13 PM, "Gary" <gwp...@ptd.net> wrote:
Not sure how to word this, but I have just installed the XAMMP
package with
Apache, PHP for the purpose of having a testing server.
My confusion is the location of the files. I am using Dreamweaver
CS3, and
all of my sites were in My Douments\Sites. When I was trying to set
up the
testing server in DW, I directed it to http://localhost. I was
pretty sure
it was not going to work, and I was right. I then created a folder in
C:\xammp\htdocs\ and directed it to there...again no go.
Part of my confusion is that if I create a page as I normally do,
and it is
stored in My documents\Sites\sitename, then there is no file that is
then
created in the C:\xammp\htdocs\.
So, does it make sense for me to simply put all of my local files in
the
tester server root folder? Or am I going about it wrong?
Thanks
Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
In general, as Phpster points out, your development will take place in
directories underneath your htdocs directory, which, if you installed XAMPP
into the root directory on C:, would be something like
C:\xampp\htdocs\yourdevdirectory.
Depending on how XAMPP is configured (you can make many changes, for
example, to the Apache conf files to determine Apache's behaviour), you
would probably use a URL of http://localhost/yourdevdirectory/index.php etc
to access your actual application.
This is not to mention that you can go on to setup virtual sites, so that
you could access your site as http://yourapplicationname/index.php.
M is for Murray
On Sat, Jan 10, 2009 at 12:13 PM, Gary <gwp...@ptd.net> wrote:
> Not sure how to word this, but I have just installed the XAMMP package with
> Apache, PHP for the purpose of having a testing server.
>
> My confusion is the location of the files. I am using Dreamweaver CS3, and
> all of my sites were in My Douments\Sites. When I was trying to set up the
> testing server in DW, I directed it to http://localhost. I was pretty
> sure
> it was not going to work, and I was right. I then created a folder in
> C:\xammp\htdocs\ and directed it to there...again no go.
>
> Part of my confusion is that if I create a page as I normally do, and it is
> stored in My documents\Sites\sitename, then there is no file that is then
> created in the C:\xammp\htdocs\.
>
> So, does it make sense for me to simply put all of my local files in the
> tester server root folder? Or am I going about it wrong?
>
> Thanks
>
> Gary
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Fri, 2009-01-09 at 18:15 -0500, Phpster wrote:
> -12C in Toronto
>
Meh! 30C - 35C in Cape Town, South Africa almost every day for the last
month. It has been a scorcher this year!
-- Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
--- End Message ---
--- Begin Message ---
On Sat, 2009-01-10 at 05:20 +0200, Paul Scott wrote:
> On Fri, 2009-01-09 at 18:15 -0500, Phpster wrote:
> > -12C in Toronto
> >
>
> Meh! 30C - 35C in Cape Town, South Africa almost every day for the last
> month. It has been a scorcher this year!
Grumble, grumble... did I mention freshwater falls from the sky and
forms vertical piles outside my home?
:)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
On Sat, Jan 10, 2009 at 01:57, Robert Cummings <rob...@interjinn.com> wrote:
>
> Grumble, grumble... did I mention freshwater falls from the sky and
> forms vertical piles outside my home?
You have a camera for a reason, Rob. Snap a few shots and we'll
help pick out the next Interjinn logo. ;-P
--
</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!
--- End Message ---
--- Begin Message ---
On Sat, Jan 10, 2009 at 01:57:09AM -0500, Robert Cummings wrote:
> On Sat, 2009-01-10 at 05:20 +0200, Paul Scott wrote:
> > On Fri, 2009-01-09 at 18:15 -0500, Phpster wrote:
> > > -12C in Toronto
> > >
> >
> > Meh! 30C - 35C in Cape Town, South Africa almost every day for the last
> > month. It has been a scorcher this year!
>
> Grumble, grumble... did I mention freshwater falls from the sky and
> forms vertical piles outside my home?
>
High of 72 degrees in central Florida. Now, where did I put my swimsuit?
;-}
Paul
--
Paul M. Foster
--- End Message ---
--- Begin Message ---
On Sat, 2009-01-10 at 02:59 -0500, Daniel Brown wrote:
> On Sat, Jan 10, 2009 at 01:57, Robert Cummings <rob...@interjinn.com> wrote:
> >
> > Grumble, grumble... did I mention freshwater falls from the sky and
> > forms vertical piles outside my home?
>
> You have a camera for a reason, Rob. Snap a few shots and we'll
> help pick out the next Interjinn logo. ;-P
How do YOU know I have a camera... is that why I feel like I'm being
watched?
;)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
On Sat, 2009-01-10 at 03:10 -0500, Paul M Foster wrote:
> On Sat, Jan 10, 2009 at 01:57:09AM -0500, Robert Cummings wrote:
>
> > On Sat, 2009-01-10 at 05:20 +0200, Paul Scott wrote:
> > > On Fri, 2009-01-09 at 18:15 -0500, Phpster wrote:
> > > > -12C in Toronto
> > > >
> > >
> > > Meh! 30C - 35C in Cape Town, South Africa almost every day for the last
> > > month. It has been a scorcher this year!
> >
> > Grumble, grumble... did I mention freshwater falls from the sky and
> > forms vertical piles outside my home?
> >
>
> High of 72 degrees in central Florida. Now, where did I put my swimsuit?
> ;-}
*throws snowball at you*
:)
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
Hello all,
Can i just create a function for the particular event i want to respond to?
Or do all possible events have to be dealt with in your class?
If I just make the function for the one event I want to respond to, will the
COM's other events stay intact?
Thank you,
Jason
--- End Message ---