php-general Digest 26 Feb 2006 20:15:09 -0000 Issue 3986
php-general Digest 26 Feb 2006 20:15:09 - Issue 3986 Topics (messages 231096 through 231112): Parsing PHP variables in XML document 231096 by: Ivan Nedialkov 231100 by: Bogdan Ribic 231101 by: Bogdan Ribic 231104 by: chris smith Re: How do I read Exif data without a file? 231097 by: Sameer N Ingole 231107 by: tedd 231110 by: Sameer N Ingole Re: How can I make postgre execute file with SQL code, on windows platform 231098 by: Bogdan Ribic 231099 by: chris smith Cookies in non-frame sites 231102 by: emil.vanster.nu 231103 by: chris smith 231105 by: Bogdan Ribic Re: Linux distributions and tools for Linux/Apache/PHP/MySQL dev 231106 by: Jens Kleikamp installing freetds 231108 by: blackwater dev Re: email to db 231109 by: Manuel Lemos Re: PHP upgrade on Go Daddy virtual server 23 by: Gerry Danen Re: Expat + PHP Examples... 231112 by: Weber Sites LTD Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: php-general@lists.php.net -- ---BeginMessage--- Hi, I have the following problem. I want to import data into my site via PHP XML Parser, but I also want to include php string variables into the .xml file and when the xml file is parsed the variables are replaced whit the corresponding string. So far all my attempts have been unsuccessful. Here is the parser i have used ?php class XMLParser { var $filename; var $xml; var $data; function XMLParser($xml_file) { $this-filename = $xml_file; $this-xml = xml_parser_create(); xml_set_object($this-xml, $this); xml_set_element_handler($this-xml, 'startHandler', 'endHandler'); xml_set_character_data_handler($this-xml, 'dataHandler'); $this-parse($xml_file); } function parse($xml_file) { if (!($fp = fopen($xml_file, 'r'))) { die('Cannot open XML data file: '.$xml_file); return false; } $bytes_to_parse = 512; while ($data = fread($fp, $bytes_to_parse)) { $parse = xml_parse($this-xml, $data, feof($fp)); if (!$parse) { die(sprintf(XML error: %s at line %d, xml_error_string(xml_get_error_code($this-xml)), xml_get_current_line_number($this-xml))); xml_parser_free($this-xml ); } } return true; } function startHandler($parser, $name, $attributes) { $data['name'] = $name; if ($attributes) { $data['attributes'] = $attributes; } $this-data[] = $data; } function dataHandler($parser, $data) { if ($data = trim($data)) { $index = count($this-data) - 1; // begin multi-line bug fix (use the .= operator) $this-data[$index]['content'] .= $data; // end multi-line bug fix } } function endHandler($parser, $name) { if (count($this-data) 1) { $data = array_pop($this-data); $index = count($this-data) - 1; $this-data[$index]['child'][] = $data; } } } $url = 'data.xml'; $myFile = new XMLParser($url); echo PRE; print_r($myFile-data); echo /PRE; $foo3 = foo3; ? here is a sample XML file ?xml version='1.0'? !DOCTYPE chapter SYSTEM /just/a/test.dtd [ !ENTITY plainEntity FOO entity !ENTITY systemEntity SYSTEM xmltest2.xml ] document data foo1 /data data foo2 /data data ?php echo $foo3; ? /data data foo4 /data data foo5 /data /document and what I get is: Array ( [0] = Array ( [name] = DOCUMENT [child] = Array ( [0] = Array ( [name] = DATA [content] = foo1 ) [1] = Array ( [name] = DATA [content] = foo2 ) [2] = Array ( [name] = DATA ) [3] = Array ( [name] = DATA [content] = foo4 ) [4] = Array ( [name] = DATA [content] = foo5 ) ) ) ) So I want $myFile-data[0][child][2][content] to
Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev
On Sat, Feb 25, 2006 at 01:41:06PM -0900, Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! Before I get into what distib to use there are a few things i'd like to point out: 1) Avoid using the packaging system the OS provides for the developement server. If you do, you will be under the control of the OS for your choice of versions of webserver, db server, php, or any dependency that is needed for those. 2) Avoid using your desktop OS as your developement server. With most distribs it is probably best you use the packaging system to manage upgrades and be on the latest package system avaiaible. By following rule 1, it is rather easy to set up a system that can handle multiple versions of any combination of your main tools required for development. For example, I have my development machine able to test and run php apps with php 3.x, 4.x, 5.0.x and 5.1.x.. and soon perhaps php 6.x. I can also control easily wich version of apache I want to use, 1.x, 2.0.x or 2.2.x. Of course db mysql 4.1 or 5.0 and the latest pgsql. For rule 2, what you work with vs what you are developing things for on your devel server should be isolated. If you find out there is a security update for Firefox and so you go and update your system and silently it updated some libraries that were required by one of your development apps, your development app will be upgraded without you even knowing. If you can't do rule 1 or 2 cause well you dont have the money for two different machines, or you dont have the time to install manually the developement apps needed, try to use a distrib for the machine you plan on eventually publishing your code on. I've never used Ubuntu, but another distrib i usually recommend is Gentoo. The learning curve for gentoo is probably a little high but the package system is very flexible, and besides it is based on the BSD port system :) HTH, Curt. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing PHP variables in XML document
Hi, I have the following problem. I want to import data into my site via PHP XML Parser, but I also want to include php string variables into the .xml file and when the xml file is parsed the variables are replaced whit the corresponding string. So far all my attempts have been unsuccessful. Here is the parser i have used ?php class XMLParser { var $filename; var $xml; var $data; function XMLParser($xml_file) { $this-filename = $xml_file; $this-xml = xml_parser_create(); xml_set_object($this-xml, $this); xml_set_element_handler($this-xml, 'startHandler', 'endHandler'); xml_set_character_data_handler($this-xml, 'dataHandler'); $this-parse($xml_file); } function parse($xml_file) { if (!($fp = fopen($xml_file, 'r'))) { die('Cannot open XML data file: '.$xml_file); return false; } $bytes_to_parse = 512; while ($data = fread($fp, $bytes_to_parse)) { $parse = xml_parse($this-xml, $data, feof($fp)); if (!$parse) { die(sprintf(XML error: %s at line %d, xml_error_string(xml_get_error_code($this-xml)), xml_get_current_line_number($this-xml))); xml_parser_free($this-xml ); } } return true; } function startHandler($parser, $name, $attributes) { $data['name'] = $name; if ($attributes) { $data['attributes'] = $attributes; } $this-data[] = $data; } function dataHandler($parser, $data) { if ($data = trim($data)) { $index = count($this-data) - 1; // begin multi-line bug fix (use the .= operator) $this-data[$index]['content'] .= $data; // end multi-line bug fix } } function endHandler($parser, $name) { if (count($this-data) 1) { $data = array_pop($this-data); $index = count($this-data) - 1; $this-data[$index]['child'][] = $data; } } } $url = 'data.xml'; $myFile = new XMLParser($url); echo PRE; print_r($myFile-data); echo /PRE; $foo3 = foo3; ? here is a sample XML file ?xml version='1.0'? !DOCTYPE chapter SYSTEM /just/a/test.dtd [ !ENTITY plainEntity FOO entity !ENTITY systemEntity SYSTEM xmltest2.xml ] document data foo1 /data data foo2 /data data ?php echo $foo3; ? /data data foo4 /data data foo5 /data /document and what I get is: Array ( [0] = Array ( [name] = DOCUMENT [child] = Array ( [0] = Array ( [name] = DATA [content] = foo1 ) [1] = Array ( [name] = DATA [content] = foo2 ) [2] = Array ( [name] = DATA ) [3] = Array ( [name] = DATA [content] = foo4 ) [4] = Array ( [name] = DATA [content] = foo5 ) ) ) ) So I want $myFile-data[0][child][2][content] to be equal to $foo3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How do I read Exif data without a file?
Niels wrote: I think you misunderstand the situation. [snip] I've got a database of images (image data) and their exif data, I'm not uploading any files. I want to make new entries in that DB, new images that are thumbnails of the present images. I can do that without creating files, but I can't get exif data of these thumbnails, because there are no files. The exif data for the thumbnails isn't the same as for the full images. In PHP its not easy to keep EXIF data of JPEG or TIF files as it is if you use PHP functions to recreate the temporary files in some dir. Basically when you use tempnam() it creates a temporary file. To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image). You cannot preserve exif data with any of PHP functions available. You probably have to use some specially developed code to write exif data. I tried this class http://www.zonageek.com/software/php/jpeg/ I tried to use it but either it could not write all the exif data or I was not calling required functions properly.. It requires pear.. Other you can try is http://pel.sourceforge.net/ But both of these will require you to write a resized image and then write exif data (common for both, original and resized) retrieved from the original image to the new thumbnail you generated with additional image specific exif info. Best is to maintain thumbnails.. with exif data written in it too. Regards, -- Sameer N. Ingole Blog: http://weblogic.noroot.org/ --- Better to light one candle than to curse the darkness. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I make postgre execute file with SQL code, on windows platform
Hi Chris, Goal was to get postgre to execute/import an sql dump file, ie not to write import-export functionality myself. In the end, I used piping, something like this: system(type $filename | \C:\Program Files\PostgreSQL\8.1\bin\psql.exe\ -h localhost -p 5432 X6tmp \postgres\); But thanx anyway :) Boban. chris smith wrote: pg_connect($connection_string); pg_query(drop schema public); import data or am I missing something here? You might be better of not doing this with php. Create the dump on the first machine. Copy the dump (scp, rsync, copy via samba-mounted drive, whatever) import it It depends what your end goal is. -- Open source PHP code generator for DB operations http://sourceforge.net/projects/bfrcg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I make postgre execute file with SQL code, on windows platform
Goal was to get postgre to execute/import an sql dump file, ie not to write import-export functionality myself. In the end, I used piping, something like this: system(type $filename | \C:\Program Files\PostgreSQL\8.1\bin\psql.exe\ -h localhost -p 5432 X6tmp \postgres\); But thanx anyway :) Boban. Which is why I said: - You might be better of not doing this with php. Create the dump on the first machine. Copy the dump (scp, rsync, copy via samba-mounted drive, whatever) import it - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parsing PHP variables in XML document
Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include $xml_file; $content = ob_end_flush(); and then parse the $content string. If you are doing this from within a function and you want access to global variables, you should import all global variables first, via extract($GLOBALS); Btw, this is just an idea, and untested - use at your own risk :) Boban. Ivan Nedialkov wrote: Hi, I have the following problem. I want to import data into my site via PHP XML Parser, but I also want to include php string variables into the .xml file and when the xml file is parsed the variables are replaced whit the corresponding string. So far all my attempts have been unsuccessful. Here is the parser i have used ?php class XMLParser { var $filename; var $xml; var $data; function XMLParser($xml_file) { $this-filename = $xml_file; $this-xml = xml_parser_create(); xml_set_object($this-xml, $this); xml_set_element_handler($this-xml, 'startHandler', 'endHandler'); xml_set_character_data_handler($this-xml, 'dataHandler'); $this-parse($xml_file); } function parse($xml_file) { if (!($fp = fopen($xml_file, 'r'))) { die('Cannot open XML data file: '.$xml_file); return false; } $bytes_to_parse = 512; while ($data = fread($fp, $bytes_to_parse)) { $parse = xml_parse($this-xml, $data, feof($fp)); if (!$parse) { die(sprintf(XML error: %s at line %d, xml_error_string(xml_get_error_code($this-xml)), xml_get_current_line_number($this-xml))); xml_parser_free($this-xml ); } } return true; } function startHandler($parser, $name, $attributes) { $data['name'] = $name; if ($attributes) { $data['attributes'] = $attributes; } $this-data[] = $data; } function dataHandler($parser, $data) { if ($data = trim($data)) { $index = count($this-data) - 1; // begin multi-line bug fix (use the .= operator) $this-data[$index]['content'] .= $data; // end multi-line bug fix } } function endHandler($parser, $name) { if (count($this-data) 1) { $data = array_pop($this-data); $index = count($this-data) - 1; $this-data[$index]['child'][] = $data; } } } $url = 'data.xml'; $myFile = new XMLParser($url); echo PRE; print_r($myFile-data); echo /PRE; $foo3 = foo3; ? here is a sample XML file ?xml version='1.0'? !DOCTYPE chapter SYSTEM /just/a/test.dtd [ !ENTITY plainEntity FOO entity !ENTITY systemEntity SYSTEM xmltest2.xml ] document data foo1 /data data foo2 /data data ?php echo $foo3; ? /data data foo4 /data data foo5 /data /document and what I get is: Array ( [0] = Array ( [name] = DOCUMENT [child] = Array ( [0] = Array ( [name] = DATA [content] = foo1 ) [1] = Array ( [name] = DATA [content] = foo2 ) [2] = Array ( [name] = DATA ) [3] = Array ( [name] = DATA [content] = foo4 ) [4] = Array ( [name] = DATA [content] = foo5 ) ) ) ) So I want $myFile-data[0][child][2][content] to be equal to $foo3 -- Open source PHP code generator for DB operations http://sourceforge.net/projects/bfrcg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parsing PHP variables in XML document
Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( Bogdan Ribic wrote: Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include $xml_file; $content = ob_end_flush(); and then parse the $content string. If you are doing this from within a function and you want access to global variables, you should import all global variables first, via extract($GLOBALS); Btw, this is just an idea, and untested - use at your own risk :) Boban. -- Open source PHP code generator for DB operations http://sourceforge.net/projects/bfrcg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies in non-frame sites
Hello, Most sites today seems to be based on this style: include(top); include(current_page); include(bottom); If one wants to set cookies from current_page, how should that be handled with as clean source as possible? Before I had the top and bottom output as functions that are called from each page, so I can call header stuff before it's executed. But it's not a very good looking approach. I did it like this in every page: include(top_bottom_lib); // cookie stuff echo getTopPage(); // page stuff echo getBottomPage(); I hope you understand my problem. Thanks Best regards Emil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies in non-frame sites
Most sites today seems to be based on this style: include(top); include(current_page); include(bottom); If one wants to set cookies from current_page, how should that be handled with as clean source as possible? From the php manual: Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including html and head tags as well as any whitespace. If output exists prior to calling this function, setcookie() will fail and return FALSE. So it has to go before ALL output otherwise it will fail. You're stuck with putting it in the 'top' file or at least before you echo any output. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Parsing PHP variables in XML document
On 2/26/06, Bogdan Ribic [EMAIL PROTECTED] wrote: Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( You can turn it off with a htaccess file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cookies in non-frame sites
You can also use output buffering, write cookies from anywhere, and at the end of execution buffers will auto-flush. [EMAIL PROTECTED] wrote: Hello, Most sites today seems to be based on this style: include(top); include(current_page); include(bottom); If one wants to set cookies from current_page, how should that be handled with as clean source as possible? Before I had the top and bottom output as functions that are called from each page, so I can call header stuff before it's executed. But it's not a very good looking approach. -- Open source PHP code generator for DB operations http://sourceforge.net/projects/bfrcg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Linux distributions and tools for Linux/Apache/PHP/MySQL dev
Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! c Just for editing php files under linux I found the eclipse plugin http://www.phpeclipse.de. Very nice screenshot: http://www.flickr.com/photo_zoom.gne?id=101196627size=o Also it seems that there will be a more powerfull php environment for eclipse in the future by Zend and IBM. http://www.eclipse.org/proposals/php-ide/ - promising! :) Best Regards, Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How do I read Exif data without a file?
Sameer said: To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image). No, that's not correct. You can take an image from a db, create a thumbnail while it is in memory and display it. You don't need to make it a file first. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] installing freetds
I am a linux newbie but just compiled freetds on my fedora box. I used the basic options: ./configure make make install make clean According to the docs it should install to /usr/local/freetds After all this I don't have a freetds folder in /local/. If I go into /usr/local/bin, I do have a tsql which I believe are part of freetds so I think it installed. Where do I set the directory when I recompile php --with-mssql? Thanks!
[PHP] Re: email to db
Hello, on 02/24/2006 11:28 PM Mark said the following: Does anyone know if its possible or how difficult it would be to have a user send an email from outlook express to a websites mysql database and update records. If the message goes to an address with a POP3 mailbox, you can always get the message body using a POP3 client script using for instance a class like this: http://www.phpclasses.org/pop3class -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - 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
Re: [PHP] Re: How do I read Exif data without a file?
tedd wrote: Sameer said: To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image). No, that's not correct. You can take an image from a db, create a thumbnail while it is in memory and display it. You don't need to make it a file first. That *is* correct. You must rewrite the resized file to some place and that place can be /dev/foo (memory or disk). I did not say you must write it to /disk/. Regards, -- Sameer N. Ingole Blog: http://weblogic.noroot.org/ --- Better to light one candle than to curse the darkness. PS: Please reply to the list only. You probably hit reply all. I got two copies of same message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP upgrade on Go Daddy virtual server
Have you tried GoDaddy support? On 2/25/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: Has anybody heard (or done it himself) how to upgrade PHP on a Go Daddy virtual server? Current version is 4.3.11 and I'd like to upgrade to 5.1.2. All I know is that this server is a Red Hat Fedora 2. I have SSH access and root as well.
RE: [PHP] Expat + PHP Examples...
I'm not sure if this is the same thing (expat and patxml) http://www.weberdev.com/ViewArticle-441.html http://www.weberdev.com/ViewArticle-444.html berber -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED] Sent: Sunday, February 26, 2006 12:19 AM To: PHP General Subject: [PHP] Expat + PHP Examples... Hi there! I've found out that I can use expat XML, but I can't figure out HOW to use... it seems simple, but I tried and can't figure it out... I'd like to get retrieve info from http://www.frisim.com/frisim/servlet/rss?searchString=google and convert it to html... I've read a lot a of text for Expat, but found no really good example (I found one at phpbuilder.com but with links that went to xml-files that didn't exists ): Someone who have used expat.. ..and can give me a hint... /G -- 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: Parsing PHP variables in XML document
Well isn't there a way instead of using only variables, to use sth like ?php echo $foo; ? I tried it but it doesnt work The parser returns blank! On Sun, 2006-02-26 at 12:02 +0100, Bogdan Ribic wrote: Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( Bogdan Ribic wrote: Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include $xml_file; $content = ob_end_flush(); and then parse the $content string. If you are doing this from within a function and you want access to global variables, you should import all global variables first, via extract($GLOBALS); Btw, this is just an idea, and untested - use at your own risk :) Boban. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP upgrade on Go Daddy virtual server
Can't help. They basically tell you you are on your own. -Original Message- From: Gerry Danen [mailto:[EMAIL PROTECTED] Sent: Sunday, February 26, 2006 12:15 PM To: Nicolas Verhaeghe Cc: PHP General (E-mail) Subject: Re: [PHP] PHP upgrade on Go Daddy virtual server Have you tried GoDaddy support? On 2/25/06, Nicolas Verhaeghe [EMAIL PROTECTED] wrote: Has anybody heard (or done it himself) how to upgrade PHP on a Go Daddy virtual server? Current version is 4.3.11 and I'd like to upgrade to 5.1.2. All I know is that this server is a Red Hat Fedora 2. I have SSH access and root as well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] recompiling php
I am trying to recompile php 5 with freetds so am using this : ./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686' '--with-mssql=/usr/local/freetds' Things seem ok so I do make and at the end of make I get this error: /usr/bin/ld:ext/mssql/php_mssql.lo: file format not recognized; treating as linker script /usr/bin/ld:ext/mssql/php_mssql.lo:2: syntax error collect2: ld returned 1 exit status make: *** [libphp5.la] Error 1 I then did make install and of course got the same error: /usr/bin/ld:ext/mssql/php_mssql.lo: file format not recognized; treating as linker script /usr/bin/ld:ext/mssql/php_mssql.lo:2: syntax error collect2: ld returned 1 exit status make: *** [libphp5.la] Error 1 I then do make clean. Of course, it doesn't seem to regenerate the libphp5.so so once I restart apache, and check out phpinfo, it shows the old configuration. What's wrong? Thanks!
Re: [PHP] Re: How do I read Exif data without a file?
tedd wrote: Sameer said: To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image). No, that's not correct. You can take an image from a db, create a thumbnail while it is in memory and display it. You don't need to make it a file first. That *is* correct. You must rewrite the resized file to some place and that place can be /dev/foo (memory or disk). I did not say you must write it to /disk/. Sameer N. Ingole I don't want to argue semantics of what is a file, nor diction, but if that is what you meant, then what *is* clear is that your statement wasn't. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: How do I read Exif data without a file?
On Sunday 26 February 2006 10:59, Sameer N Ingole wrote: In PHP its not easy to keep EXIF data of JPEG or TIF files as it is if you use PHP functions to recreate the temporary files in some dir. Basically when you use tempnam() it creates a temporary file. To get the thumbnails you must rewrite the resized file to some place (if you want real thumbnail image). You cannot preserve exif data with any of PHP functions available. You probably have to use some specially developed code to write exif data. I tried this class http://www.zonageek.com/software/php/jpeg/ I tried to use it but either it could not write all the exif data or I was not calling required functions properly.. It requires pear.. Other you can try is http://pel.sourceforge.net/ But both of these will require you to write a resized image and then write exif data (common for both, original and resized) retrieved from the original image to the new thumbnail you generated with additional image specific exif info. Best is to maintain thumbnails.. with exif data written in it too. Regards, Thank you for your answer. I wasn't trying to write exif data to an image, just to read it. I've got it all working now. //Niels -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP upgrade on Go Daddy virtual server
Nicolas Verhaeghe wrote: Can't help. They basically tell you you are on your own. http://us2.php.net/manual/en/install.php -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parsing PHP variables in XML document
Ivan, Did you try entering the code with debugger, or at least printing out what output buffer was holding, ie $content var in my example? Can you post exact code? Also, is short_tags turned on or off in php.ini? If it is on, php will get confused on first line of your xml file, it will think that ?xml is a php openning tag. In your original code you were calling the parser that was expecting $foo3 to be set, but you were setting the $foo3 *after* parsing, are you sure you're not making a mistake like that again? Ivan Nedialkov wrote: Well isn't there a way instead of using only variables, to use sth like ?php echo $foo; ? I tried it but it doesnt work The parser returns blank! -- Open source PHP code generator for DB operations http://sourceforge.net/projects/bfrcg/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Constant Scope
Can I give visibility to a class constan. some thing like this class foo { } -- *** Si se encuentra bien, no se preocupe. Se le pasarĂ¡.
[PHP] Constant Scope
Can I give visibility to a class constant. something like this class foo { private const = aaa; protected const = bbb; public const = ccc; } I dont want the user of my class can access to the constant. and I cant use public static fields because I dont want the content can be modified even inside the class.
Re: [PHP] Constant Scope
Adrian Cid Almaguer wrote: Can I give visibility to a class constant. something like this class foo { private const = aaa; protected const = bbb; public const = ccc; } I dont want the user of my class can access to the constant. and I cant use public static fields because I dont want the content can be modified even inside the class. Mark it as static: http://au.php.net/manual/en/language.oop5.static.php -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail function
Dear all, I wanna mail to x user that x can't see my IP address. Do you know same function? --Mohsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] QUARANTINED:
The message from Post Office, sent on 2/27/2006 05:43 was quarantined because it contained either an executable file, a batch file or a screen saver file. All of these types of attachments are considered security risks. Please consult your mail administrator who can release the message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Unicode
I learned PHP from an old O'Reilly book, and regarding Unicode it said PHP's strings are always encoded in UTF-8. Since then I never gave it much thought, though I see a lot of ranting and wailing about lack of Unicode support in PHP. I also see a bunch of articles about work-arounds and fixes and good things to come in version 6. Meanwhile I've been messing with a bunch of Chinese and Japanese text in PHP 4 and it seems to be working just fine. What am I missing? Are all these rants just old, am I lucky, or what? I imagine I'm just not understanding the whole thing, and I would really appreciate somebody pointing me in the right direction. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php