php-general Digest 7 Sep 2003 14:50:04 -0000 Issue 2283

Topics (messages 161881 through 161910):

Linux Issues
        161881 by: Stephen Craton
        161882 by: Dan Anderson
        161883 by: Dan Anderson
        161884 by: Stephen Craton
        161885 by: andu
        161904 by: Stephen Craton
        161906 by: Stephen Craton
        161909 by: Miles Thompson

Re: Too Advanced? Re: Cookies & Hidden Image
        161886 by: Chris Shiflett
        161887 by: Chris Shiflett

Date class and Span.php
        161888 by: Nelson Goforth
        161899 by: Mika Tuupola

Re: [imagick] converting to variable instead of file
        161889 by: Evan Nemerson
        161907 by: Decapode Azur
        161908 by: Decapode Azur

Re: Encrypt/Serialize Source Code for Sale
        161890 by: Evan Nemerson
        161905 by: Charles Kline

Problem with include();
        161891 by: Ty Lamb
        161894 by: Raditha Dissanayake
        161910 by: Curt Zirzow

Re: PHP code generation
        161892 by: electroteque
        161896 by: Manuel Lemos

Error when using built in functions
        161893 by: Ben C.
        161895 by: Raditha Dissanayake

Want to change shell to bash for only one file
        161897 by: Scott
        161898 by: Evan Nemerson

Apache Error After Running Config PEAR-Package Application
        161900 by: Nilaab Y.

highlighting multi term search results
        161901 by: jonas_weber.gmx.ch
        161902 by: Catalin Trifu

Looking for a real good editor with some specific featrues ...
        161903 by: Daniel Szasz

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

This isn't really a PHP issue but I have no where else to go to get help really. 
Hopefully someone here can still help me.

I am running Windows XP and have decided to install Mandrake Linux on top of it just 
for the heck of it. So, Friday I downloaded the latest ISO files from an FTP server 
and today I put in the burnt CDs and it takes me to the boot screen for it. I push 
enter (as it says to enter the setup) and it takes me to a blank screen and just sits 
there, doing nothing except flashing the Caps Lock and Scroll Lock lights on my 
keyboard.

I went to the online manual for Mandrake and it said to add the text "noauto" which I 
did for the boot sequence. Same error. Any ideas what's going on and how to fix it?

Thanks,
Stephen Craton

--- End Message ---
--- Begin Message ---
> I went to the online manual for Mandrake and it said to add the text "noauto" which 
> I did for the boot sequence. Same error. Any ideas what's going on and how to fix it?

Did you run an md5 sum of your burnt isos?  What about double checking
the burnt CD against the iso?  Try redownloading and reburning. Chances
are you didn't get a complete iso or had a bad burn.

-Dan

--- End Message ---
--- Begin Message ---
Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!  

-Dan

On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> Hello,
> 
> This isn't really a PHP issue but I have no where else to go to get help really. 
> Hopefully someone here can still help me.
> 
> I am running Windows XP and have decided to install Mandrake Linux on top of it just 
> for the heck of it. So, Friday I downloaded the latest ISO files from an FTP server 
> and today I put in the burnt CDs and it takes me to the boot screen for it. I push 
> enter (as it says to enter the setup) and it takes me to a blank screen and just 
> sits there, doing nothing except flashing the Caps Lock and Scroll Lock lights on my 
> keyboard.
> 
> I went to the online manual for Mandrake and it said to add the text "noauto" which 
> I did for the boot sequence. Same error. Any ideas what's going on and how to fix it?
> 
> Thanks,
> Stephen Craton

--- End Message ---
--- Begin Message ---
Thanks for the replies.

I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
bought the 8.1 CDs a while back)

I've also tried making a floppy disk but still no luck with 8.1. In 9.1, I
can't get the autorun screen to make the floppy disk.

Thanks,
Stephen Craton

----- Original Message ----- 
From: "Dan Anderson" <[EMAIL PROTECTED]>
To: "Stephen Craton" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, September 06, 2003 10:09 PM
Subject: Re: [PHP] Linux Issues


> Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
>
> -Dan
>
> On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > Hello,
> >
> > This isn't really a PHP issue but I have no where else to go to get help
really. Hopefully someone here can still help me.
> >
> > I am running Windows XP and have decided to install Mandrake Linux on
top of it just for the heck of it. So, Friday I downloaded the latest ISO
files from an FTP server and today I put in the burnt CDs and it takes me to
the boot screen for it. I push enter (as it says to enter the setup) and it
takes me to a blank screen and just sits there, doing nothing except
flashing the Caps Lock and Scroll Lock lights on my keyboard.
> >
> > I went to the online manual for Mandrake and it said to add the text
"noauto" which I did for the boot sequence. Same error. Any ideas what's
going on and how to fix it?
> >
> > Thanks,
> > Stephen Craton
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>

--- End Message ---
--- Begin Message ---
On Sat, 6 Sep 2003 22:41:29 -0500
"Stephen Craton" <[EMAIL PROTECTED]> wrote:

> Thanks for the replies.
> 
> I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
> bought the 8.1 CDs a while back)
> 
> I've also tried making a floppy disk but still no luck with 8.1. In 9.1, I
> can't get the autorun screen to make the floppy disk.

Try another distro, I recommend Slackware or Debian. Another option is to get one
of the distros which run from the cd with the option to copy it to hard drive like
Knoppix, they have more advanced auto-configuration software.

> 
> Thanks,
> Stephen Craton
> 
> ----- Original Message ----- 
> From: "Dan Anderson" <[EMAIL PROTECTED]>
> To: "Stephen Craton" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Saturday, September 06, 2003 10:09 PM
> Subject: Re: [PHP] Linux Issues
> 
> 
> > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
> >
> > -Dan
> >
> > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > > Hello,
> > >
> > > This isn't really a PHP issue but I have no where else to go to get help
> really. Hopefully someone here can still help me.
> > >
> > > I am running Windows XP and have decided to install Mandrake Linux on
> top of it just for the heck of it. So, Friday I downloaded the latest ISO
> files from an FTP server and today I put in the burnt CDs and it takes me to
> the boot screen for it. I push enter (as it says to enter the setup) and it
> takes me to a blank screen and just sits there, doing nothing except
> flashing the Caps Lock and Scroll Lock lights on my keyboard.
> > >
> > > I went to the online manual for Mandrake and it said to add the text
> "noauto" which I did for the boot sequence. Same error. Any ideas what's
> going on and how to fix it?
> > >
> > > Thanks,
> > > Stephen Craton
> >
> > -- 
> > 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
> 
> 
> 


____
Regards, Andu Novac

--- End Message ---
--- Begin Message ---
Well, I'm wanting one with a really nice GUI and great functionality. I'll
check into Debian and Slackware later today after church. Any other good
recomendations?

Thanks,
Stephen Craton
----- Original Message ----- 
From: "andu" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, September 06, 2003 11:02 PM
Subject: Re: [PHP] Linux Issues


> On Sat, 6 Sep 2003 22:41:29 -0500
> "Stephen Craton" <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the replies.
> >
> > I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
> > bought the 8.1 CDs a while back)
> >
> > I've also tried making a floppy disk but still no luck with 8.1. In 9.1,
I
> > can't get the autorun screen to make the floppy disk.
>
> Try another distro, I recommend Slackware or Debian. Another option is to
get one
> of the distros which run from the cd with the option to copy it to hard
drive like
> Knoppix, they have more advanced auto-configuration software.
>
> >
> > Thanks,
> > Stephen Craton
> >
> > ----- Original Message ----- 
> > From: "Dan Anderson" <[EMAIL PROTECTED]>
> > To: "Stephen Craton" <[EMAIL PROTECTED]>
> > Cc: "PHP List" <[EMAIL PROTECTED]>
> > Sent: Saturday, September 06, 2003 10:09 PM
> > Subject: Re: [PHP] Linux Issues
> >
> >
> > > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
> > >
> > > -Dan
> > >
> > > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > > > Hello,
> > > >
> > > > This isn't really a PHP issue but I have no where else to go to get
help
> > really. Hopefully someone here can still help me.
> > > >
> > > > I am running Windows XP and have decided to install Mandrake Linux
on
> > top of it just for the heck of it. So, Friday I downloaded the latest
ISO
> > files from an FTP server and today I put in the burnt CDs and it takes
me to
> > the boot screen for it. I push enter (as it says to enter the setup) and
it
> > takes me to a blank screen and just sits there, doing nothing except
> > flashing the Caps Lock and Scroll Lock lights on my keyboard.
> > > >
> > > > I went to the online manual for Mandrake and it said to add the text
> > "noauto" which I did for the boot sequence. Same error. Any ideas what's
> > going on and how to fix it?
> > > >
> > > > Thanks,
> > > > Stephen Craton
> > >
> > > -- 
> > > 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
> >
> >
> >
>
>
> ____
> Regards, Andu Novac
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message ---
Another question if you will...

When downloading Linux ISOs or whatever, which do I need? What is the
difference between i386, PPC, and all those other exactly? How do I know
which I need?

Thanks,
Stephen Craton

----- Original Message ----- 
From: "Stephen Craton" <[EMAIL PROTECTED]>
To: "andu" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Sunday, September 07, 2003 8:35 AM
Subject: Re: [PHP] Linux Issues


> Well, I'm wanting one with a really nice GUI and great functionality. I'll
> check into Debian and Slackware later today after church. Any other good
> recomendations?
>
> Thanks,
> Stephen Craton
> ----- Original Message ----- 
> From: "andu" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Saturday, September 06, 2003 11:02 PM
> Subject: Re: [PHP] Linux Issues
>
>
> > On Sat, 6 Sep 2003 22:41:29 -0500
> > "Stephen Craton" <[EMAIL PROTECTED]> wrote:
> >
> > > Thanks for the replies.
> > >
> > > I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
> > > bought the 8.1 CDs a while back)
> > >
> > > I've also tried making a floppy disk but still no luck with 8.1. In
9.1,
> I
> > > can't get the autorun screen to make the floppy disk.
> >
> > Try another distro, I recommend Slackware or Debian. Another option is
to
> get one
> > of the distros which run from the cd with the option to copy it to hard
> drive like
> > Knoppix, they have more advanced auto-configuration software.
> >
> > >
> > > Thanks,
> > > Stephen Craton
> > >
> > > ----- Original Message ----- 
> > > From: "Dan Anderson" <[EMAIL PROTECTED]>
> > > To: "Stephen Craton" <[EMAIL PROTECTED]>
> > > Cc: "PHP List" <[EMAIL PROTECTED]>
> > > Sent: Saturday, September 06, 2003 10:09 PM
> > > Subject: Re: [PHP] Linux Issues
> > >
> > >
> > > > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
> > > >
> > > > -Dan
> > > >
> > > > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > > > > Hello,
> > > > >
> > > > > This isn't really a PHP issue but I have no where else to go to
get
> help
> > > really. Hopefully someone here can still help me.
> > > > >
> > > > > I am running Windows XP and have decided to install Mandrake Linux
> on
> > > top of it just for the heck of it. So, Friday I downloaded the latest
> ISO
> > > files from an FTP server and today I put in the burnt CDs and it takes
> me to
> > > the boot screen for it. I push enter (as it says to enter the setup)
and
> it
> > > takes me to a blank screen and just sits there, doing nothing except
> > > flashing the Caps Lock and Scroll Lock lights on my keyboard.
> > > > >
> > > > > I went to the online manual for Mandrake and it said to add the
text
> > > "noauto" which I did for the boot sequence. Same error. Any ideas
what's
> > > going on and how to fix it?
> > > > >
> > > > > Thanks,
> > > > > Stephen Craton
> > > >
> > > > -- 
> > > > 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
> > >
> > >
> > >
> >
> >
> > ____
> > Regards, Andu Novac
> >
> > -- 
> > 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
>
>
>

--- End Message ---
--- Begin Message ---
You're way off topic for the PHP list, and if you are asking this kind of question you are probably going to need a lot of support.


If you were in Maritime Canada I'd suggest you post these questions to NSLUG; if not, post to a Linux Users Group near you. Google for your region/country. I'd also recommend buying a boxed version as you appear to be having trouble with your ISO images.

If you insist on dloading, get Knoppix as it will run from the CD, then you can go from there. Verify the MD5 checksum's against what you downloaded.

Regards - Miles Thompson



At 09:36 AM 9/7/2003 -0500, you wrote:
Another question if you will...

When downloading Linux ISOs or whatever, which do I need? What is the
difference between i386, PPC, and all those other exactly? How do I know
which I need?

Thanks,
Stephen Craton

----- Original Message -----
From: "Stephen Craton" <[EMAIL PROTECTED]>
To: "andu" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Sunday, September 07, 2003 8:35 AM
Subject: Re: [PHP] Linux Issues


> Well, I'm wanting one with a really nice GUI and great functionality. I'll > check into Debian and Slackware later today after church. Any other good > recomendations? > > Thanks, > Stephen Craton > ----- Original Message ----- > From: "andu" <[EMAIL PROTECTED]> > Cc: "PHP List" <[EMAIL PROTECTED]> > Sent: Saturday, September 06, 2003 11:02 PM > Subject: Re: [PHP] Linux Issues > > > > On Sat, 6 Sep 2003 22:41:29 -0500 > > "Stephen Craton" <[EMAIL PROTECTED]> wrote: > > > > > Thanks for the replies. > > > > > > I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I > > > bought the 8.1 CDs a while back) > > > > > > I've also tried making a floppy disk but still no luck with 8.1. In 9.1, > I > > > can't get the autorun screen to make the floppy disk. > > > > Try another distro, I recommend Slackware or Debian. Another option is to > get one > > of the distros which run from the cd with the option to copy it to hard > drive like > > Knoppix, they have more advanced auto-configuration software. > > > > > > > > Thanks, > > > Stephen Craton > > > > > > ----- Original Message ----- > > > From: "Dan Anderson" <[EMAIL PROTECTED]> > > > To: "Stephen Craton" <[EMAIL PROTECTED]> > > > Cc: "PHP List" <[EMAIL PROTECTED]> > > > Sent: Saturday, September 06, 2003 10:09 PM > > > Subject: Re: [PHP] Linux Issues > > > > > > > > > > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/! > > > > > > > > -Dan > > > > > > > > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote: > > > > > Hello, > > > > > > > > > > This isn't really a PHP issue but I have no where else to go to get > help > > > really. Hopefully someone here can still help me. > > > > > > > > > > I am running Windows XP and have decided to install Mandrake Linux > on > > > top of it just for the heck of it. So, Friday I downloaded the latest > ISO > > > files from an FTP server and today I put in the burnt CDs and it takes > me to > > > the boot screen for it. I push enter (as it says to enter the setup) and > it > > > takes me to a blank screen and just sits there, doing nothing except > > > flashing the Caps Lock and Scroll Lock lights on my keyboard. > > > > > > > > > > I went to the online manual for Mandrake and it said to add the text > > > "noauto" which I did for the boot sequence. Same error. Any ideas what's > > > going on and how to fix it? > > > > > > > > > > Thanks, > > > > > Stephen Craton > > > > > > > > -- > > > > 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 > > > > > > > > > > > > > > > ____ > > Regards, Andu Novac > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

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

--- End Message ---
--- Begin Message ---
--- Nicole <[EMAIL PROTECTED]> wrote:
> The problem is accessing the cookie when the script is called via
> the image tag. If the script is called directly, the cookie is
> accessible.
> 
> http://trackerurl/blahblah/script.php --- called directly can see
> the Cookie
> 
> <img src=http://trackerurl/blahblah/script.php height=1 width=1>
> --- does not see the Cookie

Is this with Internet Explorer by chance? If so, see if your results differ
when using a different browser. If you can call the resource
(http://trackerurl/blahblah/script.php) directly and get different results than
when the resource is referenced as an img tag, then something is definitely
abnormal.

You might be running into a P3P problem, which I can explain further if my
suspicions are correct. Something that would *really* help us is the HTTP
request and HTTP response from these two transactions:

1. http://trackerurl/blahblah/script.php is accessed directly by the browser.
2. The browser accesses a page that references
http://trackerurl/blahblah/script.php in an img tag.

If you are running Windows (my assumption, no offense intended), you can use
ethereal to get this information.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

--- End Message ---
--- Begin Message ---
--- Mark Charette <[EMAIL PROTECTED]> wrote:
> It's not a "PHP" thing, it's an HTML protocol thing ...

I think you mean HTTP. :-) HTML is a markup language.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

--- End Message ---
--- Begin Message --- I am trying to use the Date class and am having trouble with it. Since I'm just starting to use PEAR modules I'm not sure if I'm missing something simple or just what.

Date.php calls for an include of a file called Span.php, but the file does not exist in the date subdirectory. I've found some references to that file being missing, so I located a file by that name in the CVS directory and installed it. However, it 'includes' Date.php, the very file that calls it, so I'm unsure that I've got the right thing.

However, I commented out those includes and I do not get an error, but I'm unable to get any return from Span.php.

I'm trying to use the method addSpan($span), but I have no idea how to 'phrase' the $span variable. If I want to add a span of 6 months, how do I do so? Anyone out there with some experience with this module who can help me?

Thank you,
Nelson

         _________________________________________________
         Nelson GOFORTH                                 Lighting for Moving Pictures
         +1.303.322.5042                                
http://www.earthnet.net/~ngoforth/film

--- End Message ---
--- Begin Message ---
On Sat, 6 Sep 2003, Nelson Goforth wrote:

> Date.php calls for an include of a file called Span.php, but the file 
> does not exist in the date subdirectory.  I've found some references to 
> that file being missing, so I located a file by that name in the CVS 
> directory and installed it.  However, it 'includes' Date.php, the very 
> file that calls it, so I'm unsure that I've got the right thing.

        It seems that the current package misses the file. Until
        the package is fixed you can get it from cvs.

        http://chora.php.net/cvs.php/pear/Date/Date

-- 
Mika Tuupola                      http://www.appelsiini.net/~tuupola/

--- End Message ---
--- Begin Message ---
maybe create a fifo and write to that, then read from php?


On Saturday 06 September 2003 04:17 pm, Decapode Azur wrote:
> I had thought too that it is possible to write a temp file for this image,
> but it would be much better i think if there was another way...
>
> Is it really impossible to prevent from this hard disk access ?

--- End Message ---
--- Begin Message ---
finaly I did it this way : (pasted at the end of the mail)

But the problem is the result is very dirty,
considering the result with other way to do this.

top-left is the image in XPM-format
top-right is the image in PNG-format
bottom-left is a classic php-gtk-script displaying an XPM image
bottom-right is the php-script below loading and displaying a PNG img

Why is the result so bad ?

=======================================
<?php
if ( !extension_loaded( 'gtk' ) )
        strstr( PHP_OS, 'Linux' ) ? dl('php_gtk.so') : dl('php_gtk.dll');

$handle = imagick_readimage( 'images/img.1.png' );
if ( imagick_iserror( $handle ) ) {
        $reason      = imagick_failedreason( $handle );
        $description = imagick_faileddescription( $handle );
        print "handle failed!\nReason: $reason\nDescription: 
$description\n";
        exit;
        }
imagick_convert( $handle, 'XPM' );
if ( !( $image_data  = imagick_image2blob( $handle ) ) ) {
        $reason      = imagick_failedreason( $handle );
        $description = imagick_faileddescription( $handle );
        print "imagick_image2blob() failed\nReason: $reason\nDescription: 
$description\n";
        exit;
        }

$head = '!/\*\s*XPM\s*\*/\s*static\s*char\s*\*\[\]\s*=\s*{\s*/\*\s*columns 
rows colors chars-per-pixel\s*\*/\s*!';
$image_data = preg_replace( $head, '', $image_data );
$image_data = preg_replace( '!/\*\s*pixels\s*\*/\s*!m', '', $image_data );
$image_data = preg_replace( '!"\s*};\s*$!', '', $image_data );
$image_data = preg_replace( '!(^"|",$)!m', '', $image_data );

$image_data = explode( "\n", $image_data );

$win = &new GtkWindow();
$win->connect( 'destroy', create_function( '', 'Gtk::main_quit();' ) );
$win->set_usize( 256, 256 );
$win->realize();

$transp = &new GdkColor( 1, 0, 0 );
list( $pixmap, $mask ) = Gdk::pixmap_create_from_xpm_d( $win->window, 
$transp, $image_data );
$image = &new GtkPixmap( $pixmap, $mask );

$box = &new GtkVbox();
$box->add( $image );
$win->add( $box );
$win->show_all();

Gtk::main();

?>

--- End Message ---
--- Begin Message ---
finaly I did it this way : (pasted at the end of the mail)

But the problem is the result is very dirty,
considering the result with other way to do this.

http://grincheux.codelutin.org/~monnier/image.3.php.png
top-left is the image in XPM-format
top-right is the image in PNG-format
bottom-left is a classic php-gtk-script displaying an XPM image
bottom-right is the php-script below loading and displaying a PNG img

Why is the result so bad ?

=======================================
<?php
if ( !extension_loaded( 'gtk' ) )
        strstr( PHP_OS, 'Linux' ) ? dl('php_gtk.so') : dl('php_gtk.dll');

$handle = imagick_readimage( 'images/img.1.png' );
if ( imagick_iserror( $handle ) ) {
        $reason      = imagick_failedreason( $handle );
        $description = imagick_faileddescription( $handle );
        print "handle failed!\nReason: $reason\nDescription: 
$description\n";
        exit;
        }
imagick_convert( $handle, 'XPM' );
if ( !( $image_data  = imagick_image2blob( $handle ) ) ) {
        $reason      = imagick_failedreason( $handle );
        $description = imagick_faileddescription( $handle );
        print "imagick_image2blob() failed\nReason: $reason\nDescription: 
$description\n";
        exit;
        }

$head = '!/\*\s*XPM\s*\*/\s*static\s*char\s*\*\[\]\s*=\s*{\s*/\*\s*columns 
rows colors chars-per-pixel\s*\*/\s*!';
$image_data = preg_replace( $head, '', $image_data );
$image_data = preg_replace( '!/\*\s*pixels\s*\*/\s*!m', '', $image_data );
$image_data = preg_replace( '!"\s*};\s*$!', '', $image_data );
$image_data = preg_replace( '!(^"|",$)!m', '', $image_data );

$image_data = explode( "\n", $image_data );

$win = &new GtkWindow();
$win->connect( 'destroy', create_function( '', 'Gtk::main_quit();' ) );
$win->set_usize( 256, 256 );
$win->realize();

$transp = &new GdkColor( 1, 0, 0 );
list( $pixmap, $mask ) = Gdk::pixmap_create_from_xpm_d( $win->window, 
$transp, $image_data );
$image = &new GtkPixmap( $pixmap, $mask );

$box = &new GtkVbox();
$box->add( $image );
$win->add( $box );
$win->show_all();

Gtk::main();

?>

--- End Message ---
--- Begin Message ---
Take a look at Turck MMCache (free) and Zend Encoder (not).

http://www.turcksoft.com/en/e_mmc.htm
http://www.zend.com/store/products/zend-encoder.php



On Saturday 06 September 2003 01:59 pm, Charles Kline wrote:
> What methods are available (ups and downs) for encrypting and
> serializing php applications for sale?
>
> Thanks,
> Charles

--- End Message ---
--- Begin Message --- Thanks. This is one I had not turned up in my search. Much appreciated.

- Charles

On Sunday, Sep 7, 2003, at 00:44 US/Eastern, Evan Nemerson wrote:

Take a look at Turck MMCache (free) and Zend Encoder (not).

http://www.turcksoft.com/en/e_mmc.htm
http://www.zend.com/store/products/zend-encoder.php



On Saturday 06 September 2003 01:59 pm, Charles Kline wrote:
What methods are available (ups and downs) for encrypting and
serializing php applications for sale?

Thanks,
Charles

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


--- End Message ---
--- Begin Message ---
/index.php
has 
include("/code/includes/page_header.php");
 
/docs/aaryn/dmb/dave.php
has
include("/code/includes/page_header.php");
 
Both are identical lines of code.  Index.php works but dave.php returns the
following:
 
Warning: Failed opening '/code/includes/page_header.php' for inclusion
(include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4
 
but if I change the code in dave.php to
include '../../../code/includes/page_header.php';

It works.
 
Why?
 
Is there any way around this?  Please tell me I'm doing something wrong and
it's not supposed to work like this!!!
 
Ty...

--- End Message ---
--- Begin Message --- Hello,
It's often said that includes should have relative paths instead of absolute paths. This ensures that your script still works when you move it to a different server. So if an error has forced you to use rel paths consider it a blessing in disguise :-)



Ty Lamb wrote:


/index.php
has include("/code/includes/page_header.php");


/docs/aaryn/dmb/dave.php
has
include("/code/includes/page_header.php");

Both are identical lines of code.  Index.php works but dave.php returns the
following:

Warning: Failed opening '/code/includes/page_header.php' for inclusion
(include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4

but if I change the code in dave.php to
include '../../../code/includes/page_header.php';

It works.

Why?

Is there any way around this?  Please tell me I'm doing something wrong and
it's not supposed to work like this!!!

Ty...





--
http://www.radinks.com/upload
Drag and Drop File Uploader.

--- End Message ---
--- Begin Message ---
* Thus wrote Ty Lamb ([EMAIL PROTECTED]):
> /index.php
> has 
> include("/code/includes/page_header.php");
>  
> /docs/aaryn/dmb/dave.php
> has
> include("/code/includes/page_header.php");
>  
> Both are identical lines of code.  Index.php works but dave.php returns the
> following:
>  
> Warning: Failed opening '/code/includes/page_header.php' for inclusion
> (include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4
>  
> but if I change the code in dave.php to
> include '../../../code/includes/page_header.php';

ahh.. so your code/ is at your webroot (the same directory as
index.php?)  I would have expected the /code to look at
  c:\code\includes\page_header.php

But it seems that this isn't the case and I'm not familiar with how
windows handles the absolute path.

> 
> It works.
>  
> Why?
>  
> Is there any way around this?  Please tell me I'm doing something wrong and
> it's not supposed to work like this!!!

What I would suggest is to setup your include_path to look
something like:
  include_path=".;c:\php4\pear;c:\path\to\code\includes"

Then your include will simply be
  include("page_header.php");


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
what is the whole point of it again ?

and how do they do this ??

http://www.meta-language.net/screenshots.html

-----Original Message-----
From: Manuel Lemos [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 07, 2003 12:48 PM
To: Chris Hubbard
Cc: [EMAIL PROTECTED] Php. Net
Subject: [PHP] Re: PHP code generation


Hello Chris,

On 09/05/2003 02:11 PM, Chris Hubbard wrote:
> I'm working on a code generation project.  Is there anyone on the list who
> has experience building these things, and, would like to discuss
> architecture/patterns/structure of code generation off-list?

You may want to take a look at Metastorage project which is based on
massive code generatiom based on meta-programming:

http://www.meta-language.net/metastorage.html

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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

--- End Message ---
--- Begin Message --- Hello,

On 09/07/2003 02:37 AM, Electroteque wrote:
what is the whole point of it again ?

The point of code generation is to reduce significantly the amount of time it takes to develop code that tends to be repetitive and so it is tedious to write manually.


Metastorage generates classes to implement a data access API . The data model is defined at an high level using a XML based format named CPML (Component Persistence Markup Language).

Metastorage FAQ explains in more detail what is the point of it:

http://www.meta-language.net/metastorage-faq.html#advantages


and how do they do this ??

http://www.meta-language.net/screenshots.html

Actually these are browser screenshots of HTML forms generated by the classes produced with Metastorage.


--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/



-----Original Message-----
From: Manuel Lemos [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 07, 2003 12:48 PM
To: Chris Hubbard
Cc: [EMAIL PROTECTED] Php. Net
Subject: [PHP] Re: PHP code generation


Hello Chris,


On 09/05/2003 02:11 PM, Chris Hubbard wrote:

I'm working on a code generation project.  Is there anyone on the list who
has experience building these things, and, would like to discuss
architecture/patterns/structure of code generation off-list?


You may want to take a look at Metastorage project which is based on
massive code generatiom based on meta-programming:

http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
I am having problems using the following functions; trim(), ucwords(), and
others.  Do I have a setting wrong?

Ben

--- End Message ---
--- Begin Message --- what's the error message?

Ben C. wrote:

I am having problems using the following functions; trim(), ucwords(), and
others.  Do I have a setting wrong?

Ben





--
http://www.radinks.com/upload
Drag and Drop File Uploader.

--- End Message ---
--- Begin Message ---
I am trying to temporarily change from tcsh to bash.  I need to use bash for
a particular command that I am doing a shell_exec on.  Currently:
_SERVER["SHELL"] = tcsh

How do I execute my call using bash instead?

Scott

--- End Message ---
--- Begin Message ---
Can you just pipe your command to bash? I honestly have no experience w/ tcsh, 
but bash->bash you could do

echo dd if=/dev/zero of=/dev/hda | /bin/sh

Of course, you might want to use a different command... ;)



On Sunday 07 September 2003 01:25 am, Scott wrote:
> I am trying to temporarily change from tcsh to bash.  I need to use bash
> for a particular command that I am doing a shell_exec on.  Currently:
> _SERVER["SHELL"] = tcsh
>
> How do I execute my call using bash instead?
>
> Scott

--- End Message ---
--- Begin Message ---
Hello Everyone,

Here goes: I recently started looking into PHP's PEAR project and I set
everything up correctly. The database abstraction package works wonders, I
love it. So I know that PEAR is working. However, when I try to include()
the Config package into my application it gives me Apache's "500 Internal
Server Error". I looked in the error log and this is what it said:

"[Sun Sep 07 03:36:14 2003] [error] [client 127.0.0.1] Premature end of
script headers: c:/php/php.exe"

Has anyone experienced anything like that while using a PEAR package? This
problem seems to be specific only to the Config package, because most of the
other packages that I've tested are fine, including the DB package.

There's also another thing I noticed, too. I wanted to check to see if the
file had been included or not. So I tested if the file_exists(), and it
does. Then I tested it with both the include() and include_once() functions.
The include() one didn't work. The include_once() worked because it didn't
throw an Apache-like error, but as soon as I started to spawn a new object
from that Config Class, it threw the PHP error:

"Fatal error: Cannot instantiate non-existent class: config in
e:\localhost\xenonsol\xenon_0.3.1\Config.php on line 9"

Any help would be greatly appreciated. I thank anyone in advance for helping
me out with this. I love PEAR so far, it's almost like the idea Microsoft
has, but I hope it will be far better than ASP.NET in the near future. In
fact I KNOW it will because it's so public and out-in-the-open. Anyone can
improve on these packages at any time. So, there's my two cents worth...

Thanks,
Nilaab

--- End Message ---
--- Begin Message --- hi, i'm working on a function that highlights search results. problem: a search input like "te est"; two terms that match one word ("test"). the mysql query matches entries like this but my function isn't able to highlight them the right way:

<?
function highlight($src_terms, $src_terms_int, $result) {
$i = 0;
while ($i < $src_terms_int) {
$result = preg_replace('/('.$src_terms[$i].')/si', '<b>'.$src_terms[$i].'</b>', $result);
$i++;
}
return $result;
}


$search = "te est"; // user input to search for
$src_terms = explode(" ", $search);
$src_terms_int = count($src_terms);

$result = "this is just a test"; // result from database

print highlight($src_terms, $src_terms_int, $result);
?>

output: this is just a <b>te</b>st
(after the first term is highlighted the second one can't be found anymore.)


someone has an idea how to work around this?

thanks for your effort!
jonas


ps: please also let me know if you know of a website that might help, i didn't find anything useful. thanks!

--- End Message ---
--- Begin Message ---
    Hi,

> <?
> function highlight($src_terms, $src_terms_int, $result) {
> $i = 0;
>    while ($i < $src_terms_int) {
>    $result = preg_replace('/('.$src_terms[$i].')/si',
> '<b>'.$src_terms[$i].'</b>', $result);
    Here the $result is changed to '<b>te</b>st' on the first search.
    Obviously on the second replace the term will not be found anymore!
>    $i++;
>    }
> return $result;
> }
>
> $search = "te est"; // user input to search for
> $src_terms = explode(" ", $search);
> $src_terms_int = count($src_terms);
>
> $result = "this is just a test"; // result from database
>
> print highlight($src_terms, $src_terms_int, $result);
> ?>

Cheers,
Catalin

--- End Message ---
--- Begin Message ---
Hello

I'm working in programming for many years and I'm looking now for an editor
for php good like the borland editor in Delphi/CBuilder..
Also I will be glad to b something with the same shortcuts like there ( i'm
talking about classic shortcuts) since I'm working with that when wordstar
was the best editor.

Thanks a lot.

Daniel

--- End Message ---

Reply via email to