Re: [PHP] avi to wmv convert
Try looking up ffmpeg. It can convert between many video formats, runs on linux or windows(compile under mingw) and can be called via backtick, system() or exec() functions. I use it from a php script to convert flash FLV files to MPG. At 04:03 AM 8/21/2004, Peter Clarke wrote: John Nichel wrote: Peter Clarke wrote: John Nichel wrote: Jay Blanchard wrote: [snip] In what manual? [/snip] TFM! I'm sorry, I didn't quite catch that. Could you hold my hand, and point it out to me? If you were a real pal, you would write the code for me too. ;) The only manual I know of is at www.php.net It provides a tool for searching the online documentation. Searching for 'avi' produces just one result of: http://www.php.net/function.getimagesize in which a user posts about finding dimensions etc from media files. I cannot find anywhere that mentions converting avi files to wmv files. The point of the razzing is to get one to do some research. If you don't see it in the manual, chances are PHP cannot do it on it's own. Without seeing any 'video' functions listed in 'THE MANUAL', I would hazard a guess that converting between two different video formats is a bit beyond the scope of PHP. Not to say that this cannot be done, as I'm sure there is an API out there that PHP can interact with, but someplace like Google would be a better place to start a search like there. Agreed, my issue is with the pure unhelpfulness of the responses to the question. The response was: "There are a few listed in the manual." which is totally wrong. Peter -- 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] Re: Reading the documentation
Octavian Rasnita wrote: Hi all, I have 2 questions: 1. Do PHP libraries have a documentation included inside of them like in case of Perl's modules? 2. If yes, how can I read that documentation? Thank you. Teddy that would depend on what you understand under the term "PHP libraries", if you mean the actual C files, then no, if you mean the PHP extensions, eg. mysql, mcrypt, XML, etc. then yes, they do have documentation (most of them), which can be found in the PHP Manual available on php.net. If you're talking about the PECL extensions, then they usually don't have much, if any, documentation about it. It basically means you'd need to read the C code for it and find out yourself... hope that helped, - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Reading the documentation
Ok, thank you. Well, it seems that PHP libraries don't have the documentation included... This is too bad, because it is much harder to search in the PHP manual, and some libraries that might be downloaded from different sites and made by different programmers won't have the documentation included in the PHP manual. I thought PHP also have a kind of program like perldoc for perl which can display the documentation for a built in function, for a library that was installed, plus different tutorials... I guess it would be a good idea to implement such a thing in PHP also, including a documentation in comments, with some special marks... Teddy - Original Message - From: "M. Sokolewicz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 22, 2004 11:29 AM Subject: [PHP] Re: Reading the documentation > Octavian Rasnita wrote: > > Hi all, > > > > I have 2 questions: > > > > 1. Do PHP libraries have a documentation included inside of them like in > > case of Perl's modules? > > > > 2. If yes, how can I read that documentation? > > > > Thank you. > > > > Teddy > that would depend on what you understand under the term "PHP libraries", > if you mean the actual C files, then no, if you mean the PHP extensions, > eg. mysql, mcrypt, XML, etc. then yes, they do have documentation (most > of them), which can be found in the PHP Manual available on php.net. If > you're talking about the PECL extensions, then they usually don't have > much, if any, documentation about it. It basically means you'd need to > read the C code for it and find out yourself... > > hope that helped, > - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sending email
Hi all, I want to send a test message with the following specifications: 1. The message is sent by [EMAIL PROTECTED] 2. The message is sent to the following recipients: [EMAIL PROTECTED], [EMAIL PROTECTED] 3. The message has the subject: [EMAIL PROTECTED] 4. The message has the following header: From: Me<[EMAIL PROTECTED] To: Multiple recipients 5. The body of the message is: Test Can I use mail() function for this? Thank you. Teddy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sending email
Octavian Rasnita wrote: Hi all, I want to send a test message with the following specifications: 1. The message is sent by [EMAIL PROTECTED] 2. The message is sent to the following recipients: [EMAIL PROTECTED], [EMAIL PROTECTED] 3. The message has the subject: [EMAIL PROTECTED] 4. The message has the following header: From: Me<[EMAIL PROTECTED] To: Multiple recipients 5. The body of the message is: Test Can I use mail() function for this? Thank you. Teddy sure you can :) just do mail('[EMAIL PROTECTED], [EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'test', 'From: Me <[EMAIL PROTECTED]>'); more info: (http://www.php.net/manual/en/function.mail.php) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending email
Hi Octavian Rasnita, Yes You can use mail() function for this purpose. Just separate each reciepent address by a comma (,) . $to="[EMAIL PROTECTED],[EMAIL PROTECTED]"; $header="from:Me <[EMAIL PROTECTED]> \r\n"; $subject="[EMAIL PROTECTED]"; $body="test"; mail($to, $subject, $body, $header); Will do the needfull. zareef ahmed --- Octavian Rasnita <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to send a test message with the following > specifications: > > 1. The message is sent by [EMAIL PROTECTED] > > 2. The message is sent to the following recipients: > [EMAIL PROTECTED], > [EMAIL PROTECTED] > > 3. The message has the subject: [EMAIL PROTECTED] > > 4. The message has the following header: > From: Me<[EMAIL PROTECTED] > To: Multiple recipients > > 5. The body of the message is: > > Test > > Can I use mail() function for this? > > Thank you. > > Teddy > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > = Zareef Ahmed :: A PHP Developer in Delhi(India). Homepage :: http://www.zasaifi.com ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Class Con- and Destructor Inheritance
Hello there. I was experimenting a bit with the constructors and destructors, and found that this code: class First { public function __construct () { echo "Hello, World!\n"; } public function __destruct () { echo "Goodbye, World!\n"; } } class Second extends First { } $second = new Second; ?> Outputs Hello, World! Goodbye, World! , yet the PHP manual (http://www.php.net/manual/en/language.oop5.decon.php) says: Note: Parent constructors are not called implicitly. In order to run a parent constructor, a call to parent::__construct() is required. Is this an error in the manual or in PHP itself? Should I report it somewhere? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sending email
Thank you all, but how can I send the message from the [EMAIL PROTECTED] email adress, but in the header of the message to put [EMAIL PROTECTED] Something like giving the following commands to an SMTP server: telnet mail.server.com 25 helo mail.server.com mail from:[EMAIL PROTECTED] rcpt to: [EMAIL PROTECTED] data From: Two<[EMAIL PROTECTED]> To: ZZZ<[EMAIL PROTECTED]> Subject: subject test body . So the message is sent from the [EMAIL PROTECTED] email address and goes to [EMAIL PROTECTED] But when the message is received, it appears with the data from the body of the message (after the "data" command), meaning from [EMAIL PROTECTED] to [EMAIL PROTECTED] And another question is why it appears the following error message (under Windows 2000): PHP Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in... I don't want to set that in php.ini, but I have put "From: [EMAIL PROTECTED]" as the fourth parameter of the mail() function, however, it still gives me that error. I am running a local smtp server. Thank you much. Teddy - Original Message - From: "M. Sokolewicz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 22, 2004 1:31 PM Subject: [PHP] Re: Sending email > Octavian Rasnita wrote: > > > Hi all, > > > > I want to send a test message with the following specifications: > > > > 1. The message is sent by [EMAIL PROTECTED] > > > > 2. The message is sent to the following recipients: [EMAIL PROTECTED], > > [EMAIL PROTECTED] > > > > 3. The message has the subject: [EMAIL PROTECTED] > > > > 4. The message has the following header: > > From: Me<[EMAIL PROTECTED] > > To: Multiple recipients > > > > 5. The body of the message is: > > > > Test > > > > Can I use mail() function for this? > > > > Thank you. > > > > Teddy > sure you can :) > > just do > mail('[EMAIL PROTECTED], [EMAIL PROTECTED]', '[EMAIL PROTECTED]', > 'test', 'From: Me <[EMAIL PROTECTED]>'); > > more info: > (http://www.php.net/manual/en/function.mail.php) > > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OO in PHP5.0 - Referencing Object or not?!
hello together look at the following code ... why is this .. -- code start if ( is_object($this->getManagerObject()->getDataFieldManager()) ) { for ( $j = 0; $j < $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ ) { if ( $this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $this->getManagerObject()->getDataFieldManager(), $this->getManagerObject()->getDataFieldManager()->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } -- code end .. about 2 seconds slower than this .. -- code start $l_objDataFieldManager = $this->getManagerObject()->getDataFieldManager(); if ( is_object( $l_objDataFieldManager ) ) { for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ ) { if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $l_objDataFieldManager, $l_objDataFieldManager->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } unset($l_objDataFieldManager); -- code end ??? i just read, that objects in php 5 automatically returned as reference? in my code it doesn't seems like that!! ps: variable m_objData contains a lot of data from a mysql db thanks for answers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Commercial Java Extention for php 5
Is there any commercial java extention for php 5 ?
Re: [PHP] managing cvs from php
Michal, The directories have a 777 (ok unsecure but just a test) setting. Any tips of how can I get the stderr or a better way to do this cvs interface ? On Thu, 19 Aug 2004 11:45:26 -0400 (EDT), Michal Migurski <[EMAIL PROTECTED]> wrote: > > $cmd = "cd ".$pathToFile." ; /usr/bin/cvs ci -m '".$logMsg."' ".$file ; > > > > passthru($cmd) ; > > > > If I echo the $cmd and paste in a shell the command works. When I > > execute from web nothing happens and no output is seen > > (error_reporting(E_ALL)) > > Does the apache user have read/write privileges on the files in that > directory? CVS makes heavy usage of stderr, so that may be a reason you > are not seeing output. > > - > michal migurski- contact info and pgp key: > sf/cahttp://mike.teczno.com/contact.html > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: OO in PHP5.0 - Referencing Object or not?!
Raffael Wannenmacher wrote: hello together look at the following code ... why is this .. -- code start if ( is_object($this->getManagerObject()->getDataFieldManager()) ) { for ( $j = 0; $j < $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ ) { if ( $this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $this->getManagerObject()->getDataFieldManager(), $this->getManagerObject()->getDataFieldManager()->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } -- code end .. about 2 seconds slower than this .. -- code start $l_objDataFieldManager = $this->getManagerObject()->getDataFieldManager(); if ( is_object( $l_objDataFieldManager ) ) { for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ ) { if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $l_objDataFieldManager, $l_objDataFieldManager->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } unset($l_objDataFieldManager); -- code end ??? i just read, that objects in php 5 automatically returned as reference? in my code it doesn't seems like that!! ps: variable m_objData contains a lot of data from a mysql db thanks for answers. As you can read in some of the posts here, it only SEEMS like the objects are passed by reference (it's a conspiracy!). I'm not sure if it'll help you, but try using the ampersand (&) symbol to force passing-by-reference. Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Text from file into database
Hi, I have a file, test.txt. The containig of this file is: line 1 line 2 line 3 -- and so on I want to create a script that will read each line of the file and insert it to database. I am new to php and maybe you could help me Thanks
Re: [PHP] Text from file into database
Phpu wrote: Hi, I have a file, test.txt. The containig of this file is: line 1 line 2 line 3 -- and so on I want to create a script that will read each line of the file and insert it to database. I am new to php and maybe you could help me http://us2.php.net/fopen http://us2.php.net/fgets Then try the chapter in the manual for whatever database you're using... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Text from file into database
Phpu wrote: Hi, I have a file, test.txt. The containig of this file is: line 1 line 2 line 3 -- and so on I want to create a script that will read each line of the file and insert it to database. I am new to php and maybe you could help me Thanks I depends on what kind of database you wish to use (you probably have MySQL, though PostgreSQL would be preferable). If you have a large amount of lines I recommend you use prepared statements. But first of all, tell us which database you're going to use. Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text from file into database
Phpu wrote: Hi, I have a file, test.txt. The containig of this file is: line 1 line 2 line 3 -- and so on I want to create a script that will read each line of the file and insert it to database. I am new to php and maybe you could help me for just two columns of data this could be just a waste of effort unless you have several thousand records. BTW as someone already mentioned to another poster you should not use PHP* as your name when posting. Thanks -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: OO in PHP5.0 - Referencing Object or not?!
Daniel Schierbeck wrote: Raffael Wannenmacher wrote: hello together look at the following code ... why is this .. -- code start if ( is_object($this->getManagerObject()->getDataFieldManager()) ) { for ( $j = 0; $j < $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ ) { if ( $this->getManagerObject()->getDataFieldManager()->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $this->getManagerObject()->getDataFieldManager(), $this->getManagerObject()->getDataFieldManager()->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } -- code end .. about 2 seconds slower than this .. -- code start $l_objDataFieldManager = $this->getManagerObject()->getDataFieldManager(); if ( is_object( $l_objDataFieldManager ) ) { for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ ) { if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == $this->getID() ) { $l_objDataField = new GalleryDataField( $l_objDataFieldManager, $l_objDataFieldManager->m_objData[$j] ); $l_objDataField->generateXML(); $l_strData .= $l_objDataField->getXML(); unset($l_objDataField); } } } unset($l_objDataFieldManager); -- code end ??? i just read, that objects in php 5 automatically returned as reference? in my code it doesn't seems like that!! ps: variable m_objData contains a lot of data from a mysql db thanks for answers. As you can read in some of the posts here, it only SEEMS like the objects are passed by reference (it's a conspiracy!). I'm not sure if it'll help you, but try using the ampersand (&) symbol to force passing-by-reference. Cheers, Daniel if i put de ampersand ( & ) everywhere, where it should pass as reference, the script runs as longer as without ampersand.. its really confusing !!! ... "In PHP 5, the infrastructure of the object model was rewritten to work with object handles. Unless you explicitly clone an object by using the clone keyword you will never create behind the scene duplicates of your objects. In PHP 5, there is neither a need to pass objects by reference nor assigning them by reference. Note: Passing by reference and assigning by reference is still supported, in case you want to actually change a variable’s content (whether object or other type)." -> source: http://www.zend.com/php5/andi-book-excerpt.php "Be warned, though—normal variables (i.e. those which aren’t objects) are still copied (from my experiments with the beta), so if you need to pass one by reference you still need to use the & reference operator." -> source: http://www.sitepoint.com/print/1192 do u have a url to a document where this attitude/behavior is explained for real, in detail?! thenks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] matching system - anyone seen any?
I wonder if anyone have come across a script/system that already has this feature, else I would need to do it all over again. The scenario is this : I want people to select the movies they have seen and rate them 1/10. Movies not available in the "polling" system they can add, and rate them. This way the database is constantly growing, and ratings are constantly added. You can rate as many films you want, or noen if you like. Then, after you have rated you can "match" your ratings to find other people that match your selections. More like matching a profile really. There would be some sort of system inside here which could build a form of profile based on your ratings, and then compare theese profiles. I havnt really started planning how this would work, or should work, but first mainly if anyone has seen such a system around. Looking for existing wheels... :D -- Kim Steinhaug - There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. - www.steinhaug.com - www.easywebshop.no - www.easycms.no www.webkitpro.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Gd Library error compiling
PHP5, with GD on Linux (Slackware 10.0) ./configure goes just fine, but when I try 'make', there's an error. this is how I configured it: ./configure --prefix=/usr/local/php5 --with-zlib --with-pear=/usr/share/pear --with-mysql=/usr/local/mysql --includedir=/usr/include --without-sqlite --disable-cgi --with-apxs2=/usr/local/apache2/bin/apxs --with-freetype-dir=/usr/include/freetype2 --enable-gd-native-tt --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-xpm-dir=/usr/local/lib --with-gd=/usr/local/include this is some off the output (the GD part): + checking for GD support... yes checking for the location of libjpeg... /usr/local/lib checking for the location of libpng... /usr/local/lib checking for the location of libXpm... /usr/local/lib checking for FreeType 1.x support... no checking for FreeType 2... /usr/include/freetype2 checking for T1lib support... no checking whether to enable truetype string function in GD... no checking whether to enable JIS-mapped Japanese font support in GD... no checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes checking for XpmFreeXpmImage in -lXpm... yes checking for gdImageString16 in -lgd... yes checking for gdImagePaletteCopy in -lgd... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromGif in -lgd... yes checking for gdImageGif in -lgd... yes checking for gdImageWBMP in -lgd... yes checking for gdImageCreateFromJpeg in -lgd... yes checking for gdImageCreateFromXpm in -lgd... yes checking for gdImageCreateFromGd2 in -lgd... yes checking for gdImageCreateTrueColor in -lgd... yes checking for gdImageSetTile in -lgd... yes checking for gdImageEllipse in -lgd... no checking for gdImageSetBrush in -lgd... yes checking for gdImageStringTTF in -lgd... yes checking for gdImageStringFT in -lgd... yes checking for gdImageStringFTEx in -lgd... yes checking for gdImageColorClosestHWB in -lgd... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageGifCtx in -lgd... yes checking for gdCacheCreate in -lgd... yes checking for gdFontCacheShutdown in -lgd... yes checking for gdNewDynamicCtxEx in -lgd... yes checking for gdImageCreate in -lgd... yes + - if you have something to say about this, go ahead; I just started to use Linux and this is the first time I did this. I've installed PHP 4 on a Windows box, with the gd library and that worked. - this is the error I get when I 'make' the configuration: + (everything above this contains no errors) ext/gd/gd.lo(.text+0x1be8): In function `zif_imagecolormatch': /usr/local/php5/ext/gd/gd.c:902: undefined reference to `gdImageColorMatch' ext/gd/gd.lo(.text+0x4242): In function `zif_imagerotate': /usr/local/php5/ext/gd/gd.c:1215: undefined reference to `gdImageRotate' ext/gd/gd.lo(.text+0x5823): In function `zif_imagexbm': /usr/local/php5/ext/gd/gd.c:1837: undefined reference to `gdImageXbmCtx' ext/gd/gd.lo(.text+0x8218): In function `zif_imageline': /usr/local/php5/ext/gd/gd.c:2305: undefined reference to `gdImageAALine' ext/gd/gd.lo(.text+0x9a01): In function `zif_imageellipse': /usr/local/php5/ext/gd/gd.c:2444: undefined reference to `gdImageEllipse' ext/gd/gd.lo(.text+0xe7d3): In function `php_image_filter_negate': /usr/local/php5/ext/gd/gd.c:4002: undefined reference to `gdImageNegate' ext/gd/gd.lo(.text+0xe89f): In function `php_image_filter_grayscale': /usr/local/php5/ext/gd/gd.c:4013: undefined reference to `gdImageGrayScale' ext/gd/gd.lo(.text+0xe97f): In function `php_image_filter_brightness': /usr/local/php5/ext/gd/gd.c:4036: undefined reference to `gdImageBrightness' ext/gd/gd.lo(.text+0xea66): In function `php_image_filter_contrast': /usr/local/php5/ext/gd/gd.c:4059: undefined reference to `gdImageContrast' ext/gd/gd.lo(.text+0xeb51): In function `php_image_filter_colorize': /usr/local/php5/ext/gd/gd.c:4082: undefined reference to `gdImageColor' ext/gd/gd.lo(.text+0xec1d): In function `php_image_filter_edgedetect': /usr/local/php5/ext/gd/gd.c:4093: undefined reference to `gdImageEdgeDetectQuick' ext/gd/gd.lo(.text+0xece9): In function `php_image_filter_emboss': /usr/local/php5/ext/gd/gd.c:4104: undefined reference to `gdImageEmboss' ext/gd/gd.lo(.text+0xedb5): In function `php_image_filter_gaussian_blur': /usr/local/php5/ext/gd/gd.c:4115: undefined reference to `gdImageGaussianBlur' ext/gd/gd.lo(.text+0xee81): In function `php_image_filter_selective_blur': /usr/local/php5/ext/gd/gd.c:4126: undefined reference to `gdImageSelectiveBlur' ext/gd/gd.lo(.text+0xef4d): In function `php_image_filter_mean_removal': /usr/local/php5/ext/gd/gd.c:4137: undefined reference to `gdImageMeanRemoval' ext/gd/gd.lo(.text+0xf034): In function `php_image_filter_smooth': /usr/local/php5/ext/gd/gd.c:4161: undefined reference to `gdImageSmooth' ext/gd/gd.lo(.text+0xf231): In function `zif_imageantialias': /usr/local/php5/ext/gd/gd
[PHP] Re: OO in PHP5.0 - Referencing Object or not?!
Raffael, object in PHP5 _are_ passed by reference. internally, objects are handles unique to a request, so all youre doing is passing a handle around. note, however, that simple variable access will _always_ be faster than method calls. this is true in C as well as PHP, except in PHP the effects are more noticeable since it is interpreted rather than compiled. l0t3k -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: OO in PHP5.0 - Referencing Object or not?!
L0t3k wrote: Raffael, object in PHP5 _are_ passed by reference. internally, objects are handles unique to a request, so all youre doing is passing a handle around. note, however, that simple variable access will _always_ be faster than method calls. this is true in C as well as PHP, except in PHP the effects are more noticeable since it is interpreted rather than compiled. l0t3k Just to get things straight: class Foo { public $foo = "bar"; } $obj1 = new Foo; $obj2 = $obj1; $obj3 = $obj2; $obj2 = NULL; echo $obj1->foo; ?> outputs bar while class Foo { public $foo = "bar"; } $obj1 = new Foo; $obj2 =& $obj1; $obj3 =& $obj2; $obj2 = NULL; echo $obj1->foo; ?> outputs Notice: Trying to get property of non-object in /free1go/a/o/www.aoide.1go.dk/lab/bar.php5 on line 16 Hence, there is a difference between references and object handles. When you pass by reference,for instance $foo =& $bar, where $bar is an object, $foo will point to whatever $bar is pointing to. When you write $foo = $bar, $foo will point to the same object as $bar, but $foo is not forever bound to $bar, as in the first example. It simply has the same object handle. Therefore, when you delete $bar ($bar = NULL), $foo will be intact when using =, but will be set to NULL as well when using =&. Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linkpoint API question
Solved. The first transaction should be a PREAUTH, and the second transaction should be a POSTAUTH. Linkpoint's documentation is incorrect where it lists the possible transaction types. POSTAUTH shows up as TICKET in the transaction report, but it doesn't work if you try to send it as TICKET. Nicely done, Linkpoint. Thanks to all for the help. :) - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [OFF] Double charges on credit cards
Solved. As suggested, the tech guy at EFS was on paint. The first transaction should be an AUTH, and the second transaction should be PRIOR_AUTH_CAPTURE, not just CAPTURE. Thanks everyone for confirming there was no way what the guy said could be true... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class Con- and Destructor Inheritance
On Sun, 22 Aug 2004 13:04:11 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote: > Hello there. I was experimenting a bit with the constructors and > destructors, and found that this code: > > > class First > { > public function __construct () > { > echo "Hello, World!\n"; > } > > public function __destruct () > { > echo "Goodbye, World!\n"; > } > } > > class Second extends First > { > > } > > $second = new Second; > > ?> > > Outputs > > Hello, World! > Goodbye, World! > > , yet the PHP manual > (http://www.php.net/manual/en/language.oop5.decon.php) says: > > Note: Parent constructors are not called implicitly. In order > to run a parent constructor, a call to parent::__construct() is > required. > > Is this an error in the manual or in PHP itself? Should I report it > somewhere? > No, this is not a bug. This means that if you define a new constructor / destructor, the parent class's won't be called unless you put it in the new ones. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO in PHP5.0 - Referencing Object or not?!
* Thus wrote Raffael Wannenmacher: > hello together > > look at the following code ... > > why is this .. > > -- code start >if ( is_object($this->getManagerObject()->getDataFieldManager()) ) >{ >for ( $j = 0; $j < > $this->getManagerObject()->getDataFieldManager()->getCount(); $j++ ) > ... > > -- code end > > .. about 2 seconds slower than this .. > > -- code start >$l_objDataFieldManager = > $this->getManagerObject()->getDataFieldManager(); > >if ( is_object( $l_objDataFieldManager ) ) >{ >for ( $j = 0; $j < $l_objDataFieldManager->getCount(); $j++ ) >{ >if ( $l_objDataFieldManager->m_objData[$j]['GI_ID'] == > $this->getID() ) >... This would be expected since each time through the loop, because the first one has to call a method returning an object of which its method is called returning another object of another method is then called upon each time the loop iteration occurs, vs. the latter where one method is called. >... > -- code end > > ??? > > i just read, that objects in php 5 automatically returned as reference? > in my code it doesn't seems like that!! The code execution time, in your case, has nothing to do with how the objects are being returned. You are calling several method() calls to access one object within a loop, you're second way of accessing the object is the more sensible way to approach this. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP4/5 MySQL nested query problem
I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely slw, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated. $qry = "select a,b from table1"; $result = mysqli_query($link,$qry); if (!$result) { echo mysql_error() . "\n"; } while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) { $sql = "select * from table2 where common=".$data[0]; $result2 = mysqli_query($link,$sql); if (!$result2) { echo mysql_error() . "\n"; } while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) { $linenum++; } mysqli_free_result($result2); } mysqli_free_result($result); mysqli_close($link); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class Con- and Destructor Inheritance
* Thus wrote Justin Patrin: > On Sun, 22 Aug 2004 13:04:11 +0200, Daniel Schierbeck <[EMAIL PROTECTED]> wrote: > > > > ... > > > > Note: Parent constructors are not called implicitly. In order > > to run a parent constructor, a call to parent::__construct() is > > required. > > > > Is this an error in the manual or in PHP itself? Should I report it > > somewhere? > > > > No, this is not a bug. This means that if you define a new constructor > / destructor, the parent class's won't be called unless you put it in > the new ones. Although not a bug, it is a little misleading, i've corrected it to explain when the constructor isn't called. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Gd Library error compiling
* Thus wrote Martin Visser: > PHP5, with GD on Linux (Slackware 10.0) > > > ./configure goes just fine, but when I try 'make', there's an error. > > this is how I configured it: > ./configure --prefix=/usr/local/php5 --with-zlib > --with-pear=/usr/share/pear --with-mysql=/usr/local/mysql > --includedir=/usr/include --without-sqlite --disable-cgi > --with-apxs2=/usr/local/apache2/bin/apxs > --with-freetype-dir=/usr/include/freetype2 --enable-gd-native-tt > --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib > --with-xpm-dir=/usr/local/lib --with-gd=/usr/local/include > >... > > this is the error I get when I 'make' the configuration: > + (everything above this contains no errors) > ext/gd/gd.lo(.text+0x1be8): In function `zif_imagecolormatch': > /usr/local/php5/ext/gd/gd.c:902: undefined reference to `gdImageColorMatch' This is usually due to header and library mismatch from my exprirence. >... > > I tried to compile PHP with only --with-gd (without --with-jpeg-dir etc) > and than I get an error: > Fatal error: Call to undefined function imagecreatefromjpeg() > > > does anyone know how to solve this problem? did you try it with: configure --with-gd or configure --with-gd=/usr/... You can leave in the --with-jpeg-dir directives, it simply sounds like you have mulitple versions (gd1 and gd2) on your system and things are getting confused when it gets compiled. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4/5 MySQL nested query problem
Kevin Wormington wrote: I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely slw, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated. $qry = "select a,b from table1"; $result = mysqli_query($link,$qry); if (!$result) { echo mysql_error() . "\n"; } while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) { $sql = "select * from table2 where common=".$data[0]; $result2 = mysqli_query($link,$sql); if (!$result2) { echo mysql_error() . "\n"; } while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) { $linenum++; } mysqli_free_result($result2); } mysqli_free_result($result); mysqli_close($link); Is there some fundamental reason you're using nested queries instead of a JOIN? PHP is generally slower in loops compared to Perl from the comparisons I've seen, but the real issue is why are you using nested queries to begin with... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Instant message
Hi, I have a site where people meet and talk. I want to be able to send instant messages to those who are online, but i do not know how to do it. I need java? Can i do it in php? Please give me a link or something to grab Thanks
[PHP] Submitting "get" form
Say I have a form like -> ... If this form is submitted, the $_GET['id'] variable *is not* available. If the method is changed to "post", the $_GET['id'] variable *is* available. Is this how forms are supposed to work??? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting "get" form
Gerard Samuel wrote: Say I have a form like -> ... If this form is submitted, the $_GET['id'] variable *is not* available. If the method is changed to "post", the $_GET['id'] variable *is* available. Is this how forms are supposed to work??? Yes. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting "get" form
--- Gerard Samuel <[EMAIL PROTECTED]> wrote: > Say I have a form like -> > > ... > > > > If this form is submitted, the $_GET['id'] variable *is not* available. > If the method is changed to "post", the $_GET['id'] variable *is* > available. > > Is this how forms are supposed to work??? Yes, when you use the GET method, the query string of the URL that your browser requests contains the form data. I think you want to have something like this in your form: Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4/5 MySQL nested query problem
My "real" application has inserts and does other various forms of processing in the loops which cannot be done from pure sql via join, etc. The test program I attached was just the minimum required to see the performance issue. I agree that PHP is probably a little slower that perl in loops, but not 5 seconds vs. several hours. Kevin On Aug 22, 2004, at 9:49 PM, John Holmes wrote: Kevin Wormington wrote: I have ran into an interesting query performance problem that occurs with both 4.3.7 and 5.0.1 against a MySQL 4.1 database. The test program (attached below) works, but performance is extremely slw, a perl version of the test program completes in less than 5 seconds with 80k records in table 1 and 138k records in table 2. The PHP program is taking something like 1 to 2 seconds per record. This only seems to occur when you have a query nested inside of another. My test program attached uses mysqli, but mysql functions yield the same result. Any ideas would be appreciated. $link = mysqli_connect("localhost","test","test","db"); $qry = "select a,b from table1"; $result = mysqli_query($link,$qry); if (!$result) { echo mysql_error() . "\n"; } while ($data = mysqli_fetch_array($result, MYSQLI_BOTH)) { $sql = "select * from table2 where common=".$data[0]; $result2 = mysqli_query($link,$sql); if (!$result2) { echo mysql_error() . "\n"; } while ($data2 = mysqli_fetch_array($result2,MYSQLI_BOTH)) { $linenum++; } mysqli_free_result($result2); } mysqli_free_result($result); mysqli_close($link); Is there some fundamental reason you're using nested queries instead of a JOIN? PHP is generally slower in loops compared to Perl from the comparisons I've seen, but the real issue is why are you using nested queries to begin with... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- 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] php4 classes, extending same class
I have the following classes being inherited: User extends School I have two classes: Profile extends User and Buddies extends User being used in the same .php file. I get a "Fatal error: Cannot redeclare class school in ..." I can see why this is happening but three questions, 1. Does php5 allow for multiple extends? e.g. Profile extends User extends School 2. Programmatically, how can I resolve this sort of issue besides not using this class and making a new class with a different name? 3. Is there a way to uninclude a included file? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [OFF] - Fraudulent web orders - any ideas?
--- Markus Mayer <[EMAIL PROTECTED]> wrote: > On Monday 16 August 2004 17:03, Brian Dunning wrote: > > I think I may have solved it by an even simpler > method: I emailed the > > perpetrator to "thank him for all of his orders" > to see what he'd say. > > :-) Great idea! (me shows the thumbs up) > > > Anyone know who the "proper authorities" are, to > whom I could give my > > It doesn't matter where the fraud comes from, its > worth following up because > my guess is you could be dealing with a small part > of some organised credit > card fraud group. My best suggestion is to give the > FBI a quick call or look > at their web site. Although the orders may be > foreign (what location comes > back when you put the IP address into > http://www.geobytes.com/IpLocator.htm), > as far as I know, this is something the FBI can > handle, and if they don't, I > would expect they know who does. > > Hope this helps. > > best regards > Markus I just got caught up on my mailing lists so sorry about the late reply, but you could always start charging cards when the order is ready to be shipped instead of when the card is submitted to you. - Grant ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting "get" form
Chris Shiflett wrote: Yes, when you use the GET method, the query string of the URL that your browser requests contains the form data. I think you want to have something like this in your form: Thanks John/Chris for the explanations... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Instant message
Hello, On 08/22/2004 09:07 PM, Phpu wrote: I have a site where people meet and talk. I want to be able to send instant messages to those who are online, but i do not know how to do it. I need java? Can i do it in php? You may find some classes here precisely for that purpose: http://www.phpclasses.org/browse/class/66.html -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] After upgrading PHP, Session Values not stored properly
Hi, We recently upgraded PHP on our web server to version 4.3.8. After upgrading sessions are not working properly. Please help to configure the latest version. There is a log-in module on our web site. After successfully entering the log-in information, a session variable is created to track the user. But this value is not carried while loading other pages. So it returns to log-in module again. On the server , the session file is created (/tmp - path for session files) and the values are also saved in the file. The values are not retrieved properly by the following pages after log-in. The same log-in module was working perfectly with the older version 4.3.2. This is the LoadModule entry in the httpd.conf file for Apache. LoadModule php4_module modules/mod_php4-4.3.8.so Server Version System - FreeBSD 4.7-RELEASE-p27 FreeBSD 4.7-RELEASE-p27 #33: Mo i386 Server API - Apache/1.3.27 OpenSSL/0.9.6 (Unix) PHP/4.3.8 Session Settings on this server () Session Support - enabled Registered save handlers - files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 On On session.bug_compat_warn On On session.cache_expire180 180 session.cache_limiter nocache nocache session.cookie_domain no valueno value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_fileno valueno value session.entropy_length 0 0 session.gc_divisor 100 100 session.gc_maxlifetime 14401440 session.gc_probability 1 1 session.namePHPSESSID PHPSESSID session.referer_check no valueno value session.save_handlerfiles files session.save_path /tmp/tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookiesOff Off session.use_trans_sid On On Regards Sheni R Meledath [EMAIL PROTECTED]
[PHP] Output Compression issue (a bit long/rantish, but looking for ideas to fix)
Ok, I know what it does, but Im currently trying to track some "oddity" down. My script works fine when output compression is turn off (its off in php.ini, and ob_start('gz_handler') is not being used. If I turn on compression via ob_start('gz_handler'), I get sporadic problems with page loading. Here is what I mean by "sporadic". Im going to use the php website as an example. If you visit www.php.net, and try to click the documentation link, www.php.net/docs.php does not load, and you will still be at www.php.net. Once you are at this stage, depending on the circumstances of this "oddity" you may end up clicking the documentation link several times before the actual www.php.net/docs.php page actually loads. This "oddity" occurs at random, so sometimes you will be able to get to www.php.net/docs.php immediately, and sometimes you have to click the link several times, before the resulting page loads. So this "oddity" happens in my code, that displays the website, in the scripts that produce my RSS files (which is very loosely tied to the main site, enough to call it a separate entity), and it happens in Chora (http://horde.org/chora/). All three, enable compression via ob_start('gz_handler') I dont think its a browser problem, as I've experienced this "oddity" on IE and Gecko browsers. Whenever I visit my CVS via Chora for the first time since the browser was started, and this "oddity" occurs, it generates empty session files, till the actual Chora front page is loaded. This is just to show of what may be happening behind the scenes. And just to point out, that even after Im able to get into Chora, at some random future time, the "oddity" may occur again... I would appreciate any help in this matter. Thank You for your assitance. -- php.ini snip -- output_buffering = 4096 ;output_handler = zlib.output_compression = Off implicit_flush = Off -- end php.ini snip -- -- php -- hivemind# php -v PHP 4.3.6 (cli) (built: Jun 2 2004 02:14:13) Copyright (c) 1997-2004 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies -- end php -- -- WebServer OS -- hivemind# uname -rsp FreeBSD 4.10-RELEASE i386 -- End WebServer OS -- -- WebServer -- hivemind# httpd -v Server version: Apache/1.3.31 (Unix) Server built: Jun 1 2004 22:30:12 hivemind# httpd -l Compiled-in modules: http_core.c mod_so.c -- End WebServer -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] After upgrading PHP, Session Values not stored properly
Sheni R. Meledath wrote: session.use_trans_sid On On Im currently running FBSC 4.10/php 4.3.6, and the only difference with our session setup is session.use_trans_sid. Mine is off. For sessions to get lost means that either a) You have cookies disabled in the browser b) You are not using the SID constant in links/or not using session.use_trans_sid So are you using cookies? If you accept cookies, are cookies stored in the browser? If you are not using cookies, are you manually adding the SID constant to links, or is session.use_trans_sid actually working by adding the session id to your links (check the source of the page)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] After upgrading PHP, Session Values not stored properly
Hi Gerard, Many thanks. We are using cookies to store the session ID. The session on other sites are working perfectly. The same problem on this site is experienced by other users also. Also the same log-in module was working perfectly with the older PHP version. At 10:20 AM 8/23/2004, Gerard Samuel wrote: Sheni R. Meledath wrote: session.use_trans_sid On On Im currently running FBSC 4.10/php 4.3.6, and the only difference with our session setup is session.use_trans_sid. Mine is off. For sessions to get lost means that either a) You have cookies disabled in the browser b) You are not using the SID constant in links/or not using session.use_trans_sid So are you using cookies? If you accept cookies, are cookies stored in the browser? If you are not using cookies, are you manually adding the SID constant to links, or is session.use_trans_sid actually working by adding the session id to your links (check the source of the page)? Regards Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php