php-general Digest 22 Jan 2006 12:45:15 -0000 Issue 3920

2006-01-22 Thread php-general-digest-help

php-general Digest 22 Jan 2006 12:45:15 - Issue 3920

Topics (messages 229016 through 229026):

testing
229016 by: Jason Parkils

this is a test
229017 by: Jason Parkils

XMPP Gateways
229018 by: Jason Parkils

Re: [PHP-DB] auto_increment and INSERT INTO
229019 by: tg-php.gryffyndevelopment.com
229021 by: Ron Piggott (PHP)

security of uploaded gif files
229020 by: jonathan
229025 by: Rory Browne

Graphs
229022 by: Weber Sites LTD
229023 by: Ron Eggler (Paykiosks)
229024 by: David Robley

Controling buffer: php/smarty or apache?
229026 by: robert mena

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

---End Message---
---BeginMessage---
this is a test
---End Message---
---BeginMessage---
Can PHP interact with GoogleTalk like this bot built in ASP I think:

 - add the following user to your GTalk: [EMAIL PROTECTED]
 - send it a msg
---End Message---
---BeginMessage---
Try:

?php
  mysql_query(INSERT INTO table VALUES ('$variable_1', '$variable_2'););
  $auto_increment_variable = mysql_insert_id();
?


-TG




= = = Original message = = =

I have various tables where a column is set to auto_increment in my
table structure.  I have been using the following INSERT query format: 

INSERT INTO table VALUES ('$auto_increment_variable','$variable_1',
'$variable_2')

and then in applications where I have needed to know the value of the
$auto_increment_variable I have immediately queried the table for
$variable_1 and $variable_2 and used

$reference = mysql_result($result,$i,reference);

to determine what numeric value was assigned.

Is there a way I may find out what value was assigned to the
$auto_increment_variable when the INSERT INTO query is issued?

Thanks.

Ron


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
---End Message---
---BeginMessage---
That is the function I was looking for.  Thanks.  Ron

On Sat, 2006-01-21 at 23:47 -0500, [EMAIL PROTECTED] wrote:
 Try:
 
 ?php
   mysql_query(INSERT INTO table VALUES ('$variable_1', '$variable_2'););
   $auto_increment_variable = mysql_insert_id();
 ?
 
 
 -TG
 
 
 
 
 = = = Original message = = =
 
 I have various tables where a column is set to auto_increment in my
 table structure.  I have been using the following INSERT query format: 
 
 INSERT INTO table VALUES ('$auto_increment_variable','$variable_1',
 '$variable_2')
 
 and then in applications where I have needed to know the value of the
 $auto_increment_variable I have immediately queried the table for
 $variable_1 and $variable_2 and used
 
 $reference = mysql_result($result,$i,reference);
 
 to determine what numeric value was assigned.
 
 Is there a way I may find out what value was assigned to the
 $auto_increment_variable when the INSERT INTO query is issued?
 
 Thanks.
 
 Ron
 
 
 ___
 Sent by ePrompter, the premier email notification software.
 Free download at http://www.ePrompter.com.
 
---End Message---
---BeginMessage---
what is the best way to prevent malicious code from being uploaded  
via a .gif file? A friend showed me how php could be embedded within  
the .gif file. Does this problem also exist for .jpeg's?


thanks,

jon
---End Message---
---BeginMessage---
I'd be a bit skeptical about the possibly of embedding PHP code inside
a GIF file. Could you outline how he performed the task?

On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
 what is the best way to prevent malicious code from being uploaded
 via a .gif file? A friend showed me how php could be embedded within
 the .gif file. Does this problem also exist for .jpeg's?

 thanks,

 jon

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


---End Message---
---BeginMessage---
What is the best (Free) way to create good looking graphs with PHP?

Sincerely 
 
berber 
 
Visit the Weber Sites Today, 
To see where PHP might take you tomorrow. 
PHP code examples : http://www.weberdev.com 
PHP  MySQL Forums : http://www.weberforums.com
Learn PHP  MySQL Playing Trivia : http://www.webertrivia.com
PHP Web Logs : http://www.weberblogs.com 
Web Development Index http://www.weberindex.com 
Web Templates http://www.webertemplates.com
Search for PHP Code from your browser http://toolbar.weberdev.com 
Free Uptime Monitor : http://uptime.weberdev.com
PHP content for your site : http://content.weber-sites.com
---End Message---
---BeginMessage---
What kind of do u wanna have?

Am Sonntag, den 22.01.2006, 10:46 +0200 schrieb Weber Sites LTD:

 What is the best (Free) way to create good looking 

php-general Digest 23 Jan 2006 01:24:59 -0000 Issue 3921

2006-01-22 Thread php-general-digest-help

php-general Digest 23 Jan 2006 01:24:59 - Issue 3921

Topics (messages 229027 through 229048):

Re: Graphs
229027 by: Michael Crute
229030 by: tedd

Re: security of uploaded gif files
229028 by: PHP Superman
229029 by: Mark Krenz
229031 by: tedd
229032 by: Sameer N Ingole
229036 by: PHP Superman
229037 by: jonathan
229038 by: Rory Browne

php5 iterate an object
229033 by: Henrik Gemal

XML and special characters
229034 by: Adam Hubscher
229039 by: tedd
229041 by: Adam Hubscher

cookie question
229035 by: tedd

Question about Thumbnailing, Watermarking, and Modifying images/video/flash 
dynamicly
229040 by: Jon Grimes

Devenix Live CD PHP4 and PHP5 project needs help
229042 by: Pete Savage

Re: PHP not seeing MySQL functions
229043 by: PHP Superman
229046 by: John Nichel

exec php.exe in windows
229044 by: Dave Kennedy
229048 by: Chuck Anderson

Re: Controling buffer: php/smarty or apache?
229045 by: David Tulloh

Re: problem with large arrays in php 4.3.2
229047 by: Jesse Guardiani

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---
On 1/22/06, Weber Sites LTD [EMAIL PROTECTED] wrote:
 What is the best (Free) way to create good looking graphs with PHP?


Jpgraph is my favorite. Its got a pretty clean OO API and decent
documentation. Plus its PHP5 compatible.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.
---End Message---
---BeginMessage---

What is the best (Free) way to create good looking graphs with PHP?

Sincerely

berber


berber:

Best? -- whatever way that you like.

If you like any of these, just ask I'll provide code.

http://xn--ovg.com

Last three.

tedd
--

http://sperling.com/
---End Message---
---BeginMessage---
i think you guys are talking about the using the gd library, it may be
possible so when you upload check for any php code or other data

On 1/22/06, Rory Browne [EMAIL PROTECTED] wrote:

 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?

 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 
  jon
 
  --
  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




--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
---End Message---
---BeginMessage---

  Perhaps this would be a problem if you wrote a PHP program to reverse
stenography on images it receives and execute them. ;-)


On Sun, Jan 22, 2006 at 10:58:37AM GMT, Rory Browne [EMAIL PROTECTED] said the 
following:
 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?
 
 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 
  jon
 
  --
  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
 


-- 
Mark S. Krenz
[EMAIL PROTECTED]
---End Message---
---BeginMessage---

i think you guys are talking about the using the gd library, it may be
possible so when you upload check for any php code or other data

On 1/22/06, Rory Browne [EMAIL PROTECTED] wrote:


 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?

 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 

   jon



I have placed data within the header of jpg files (lot's of room 
there) and used that data for keeping track of images, but I don't 
see how one can make embedded text executable code.


Would be very interested in how to do 

Re: [PHP] Graphs

2006-01-22 Thread Ron Eggler (Paykiosks)
What kind of do u wanna have?

Am Sonntag, den 22.01.2006, 10:46 +0200 schrieb Weber Sites LTD:

 What is the best (Free) way to create good looking graphs with PHP?
 
 Sincerely 
  
 berber 
  
 Visit the Weber Sites Today, 
 To see where PHP might take you tomorrow. 
 PHP code examples : http://www.weberdev.com 
 PHP  MySQL Forums : http://www.weberforums.com
 Learn PHP  MySQL Playing Trivia : http://www.webertrivia.com
 PHP Web Logs : http://www.weberblogs.com 
 Web Development Index http://www.weberindex.com 
 Web Templates http://www.webertemplates.com
 Search for PHP Code from your browser http://toolbar.weberdev.com 
 Free Uptime Monitor : http://uptime.weberdev.com
 PHP content for your site : http://content.weber-sites.com
 


Re: [PHP] Graphs

2006-01-22 Thread Michael Crute
On 1/22/06, Weber Sites LTD [EMAIL PROTECTED] wrote:
 What is the best (Free) way to create good looking graphs with PHP?


Jpgraph is my favorite. Its got a pretty clean OO API and decent
documentation. Plus its PHP5 compatible.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] security of uploaded gif files

2006-01-22 Thread PHP Superman
i think you guys are talking about the using the gd library, it may be
possible so when you upload check for any php code or other data

On 1/22/06, Rory Browne [EMAIL PROTECTED] wrote:

 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?

 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 
  jon
 
  --
  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




--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


Re: [PHP] security of uploaded gif files

2006-01-22 Thread Mark Krenz

  Perhaps this would be a problem if you wrote a PHP program to reverse
stenography on images it receives and execute them. ;-)


On Sun, Jan 22, 2006 at 10:58:37AM GMT, Rory Browne [EMAIL PROTECTED] said the 
following:
 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?
 
 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 
  jon
 
  --
  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
 


-- 
Mark S. Krenz
[EMAIL PROTECTED]

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



Re: [PHP] Graphs

2006-01-22 Thread tedd

What is the best (Free) way to create good looking graphs with PHP?

Sincerely

berber


berber:

Best? -- whatever way that you like.

If you like any of these, just ask I'll provide code.

http://xn--ovg.com

Last three.

tedd
--

http://sperling.com/

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



Re: [PHP] security of uploaded gif files

2006-01-22 Thread tedd

i think you guys are talking about the using the gd library, it may be
possible so when you upload check for any php code or other data

On 1/22/06, Rory Browne [EMAIL PROTECTED] wrote:


 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?

 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 

   jon



I have placed data within the header of jpg files (lot's of room 
there) and used that data for keeping track of images, but I don't 
see how one can make embedded text executable code.


Would be very interested in how to do that.

tedd

--

http://sperling.com/

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



Re: [PHP] security of uploaded gif files

2006-01-22 Thread Sameer N Ingole

Rory Browne wrote:


I'd be a bit skeptical about the possibly of embedding PHP code inside
a GIF file. Could you outline how he performed the task?

On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
 


what is the best way to prevent malicious code from being uploaded
via a .gif file? A friend showed me how php could be embedded within
the .gif file. Does this problem also exist for .jpeg's?

thanks,

jon
   


If it is really possible, I am very much interested in knowing.
jon, can you show how to do that?

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



[PHP] php5 iterate an object

2006-01-22 Thread Henrik Gemal

I have an object that looks like this:

Test Object
(
[config] = TestConfig Object
(
[file:protected] = test.conf
[kill:protected] = 1
)

[location:private] = test
}


I'm trying to write an PHP5 iterator that can iterate over an object but 
I'm not sure how. The manual for PHP5 iterators seems to only work with 
arrays. How do I iterate over an object and only get the name of the 
attribute (config) and not the entire name (Test::config)


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



[PHP] XML and special characters

2006-01-22 Thread Adam Hubscher

I've been having a tough time with parsing XML files and special characters.

I have attempted every applicable engine, last try SAX, to attempt at 
parsing a (rather large, 17.8mb) xml file.


The problem I hit, is when it hits a UTF8 encoded character. I've 
attempted at decoded the file before it hits the parser, I've attempted 
even ENCODING it (god knows why that'd work, it didnt, lol). I've tried 
html_entities, etc. Nothing as such has worked.


I've also tried simply removing the character, and low/behold, it 
worked! Darned thing...


§µÖÕÔÓÒ

Those are the characters so far that have caused me problems. I'd give 
the utf8 encoded equivalent, but I'm not sure of it off the top of my head.


My code, varies so much that I'm not sure it'd be useful to type it out. 
The issue seems not to be with my code, as when I parse the file 
manually with a whole bunch of inefficient regex statements, everything 
works out peachy. The problem with that way again is, it eats system 
resources for a very long time (remember, 17mb file, and its all plain 
text? :)).


Any suggestions as to how I could get around this seemingly impossible 
road block thats been placed by what seems to be the xml engines :O..


Thanks!

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



[PHP] cookie question

2006-01-22 Thread tedd

Hi:

Please review --

http://xn--ovg.com

 -- the Set and Get cookie demo (i.e., 1  2). The code is shown.

If you go from Set Cookie to Get Cookie, everything is OK.

If you cut the url, quit the browser, start the browser again, paste 
the url and return to the page, everything is OK. The browser finds 
the cookie.


However, if you go directly from:

http://xn--ovg.com

to Get Cookie, the cookie is gone -- why?  What's happening here?

Any ideas, suggestions, or solutions welcomed.

Thanks.

tedd
--

http://sperling.com/

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



Re: [PHP] security of uploaded gif files

2006-01-22 Thread PHP Superman
sorry guys if i'm wrong, but


?php


 header(Content-type: image/png);
 $im = imagecreate(1, 1)
 or die(Cannot Initialize new GD image stream);
 $background_color = imagecolorallocate($im, 252, 255, 255);
 $text_color = imagecolorallocate($im, 233, 14, 91);
 imagestring($im, 1000, 1000, 1000,  My Text, $text_color);
 imagepng($im);
 imagedestroy($im);

   ?



if you have the required gd library, and  a user changes the above to
exec(); a command, you might be in trouble, i might be wrong though... but
if you successfully hide the directory and dont tell the user where he
placed the file i think it would be pretty secure



On 1/22/06, Sameer N Ingole [EMAIL PROTECTED] wrote:

 Rory Browne wrote:

 I'd be a bit skeptical about the possibly of embedding PHP code inside
 a GIF file. Could you outline how he performed the task?
 
 On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
 
 
 what is the best way to prevent malicious code from being uploaded
 via a .gif file? A friend showed me how php could be embedded within
 the .gif file. Does this problem also exist for .jpeg's?
 
 thanks,
 
 jon
 
 
 If it is really possible, I am very much interested in knowing.
 jon, can you show how to do that?

 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




--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


Re: [PHP] security of uploaded gif files

2006-01-22 Thread jonathan
this is a little my fault. the example my friend showed me was a  
retracing of the example he saw in Pro PHP Security (p284).  
Basically, the short of the example is that  a valid gif image could  
be uploaded with the extension .php and pass a getimagesize because  
it would have the necessary bytestream to think that it is a gif but  
that arbitrary php code could be appended at the end. To get around  
this, you just need to check for a valid file extension (.gif etc...)  
and mimetype.


-jonathan


On Jan 22, 2006, at 2:58 AM, Rory Browne wrote:


I'd be a bit skeptical about the possibly of embedding PHP code inside
a GIF file. Could you outline how he performed the task?

On 1/22/06, jonathan [EMAIL PROTECTED] wrote:

what is the best way to prevent malicious code from being uploaded
via a .gif file? A friend showed me how php could be embedded within
the .gif file. Does this problem also exist for .jpeg's?

thanks,

jon

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



Re: [PHP] security of uploaded gif files

2006-01-22 Thread Rory Browne
Or put it in a directory with no PHP or CGI.

On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
 this is a little my fault. the example my friend showed me was a
 retracing of the example he saw in Pro PHP Security (p284).
 Basically, the short of the example is that  a valid gif image could
 be uploaded with the extension .php and pass a getimagesize because
 it would have the necessary bytestream to think that it is a gif but
 that arbitrary php code could be appended at the end. To get around
 this, you just need to check for a valid file extension (.gif etc...)
 and mimetype.

 -jonathan


 On Jan 22, 2006, at 2:58 AM, Rory Browne wrote:

  I'd be a bit skeptical about the possibly of embedding PHP code inside
  a GIF file. Could you outline how he performed the task?
 
  On 1/22/06, jonathan [EMAIL PROTECTED] wrote:
  what is the best way to prevent malicious code from being uploaded
  via a .gif file? A friend showed me how php could be embedded within
  the .gif file. Does this problem also exist for .jpeg's?
 
  thanks,
 
  jon
 
  --
  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



Re: [PHP] XML and special characters

2006-01-22 Thread tedd

I've been having a tough time with parsing XML files and special characters.

-snip-

Any suggestions as to how I could get around this seemingly 
impossible road block thats been placed by what seems to be the xml 
engines :O..


Adam:

I believe that these special character will be with us for a long 
while. I suggest that you review the Unicode database for these 
characters and my suggestion is to use the code-points (HEX 
equivalences) for these characters. For example, 0061 is a small a, 
2022 is a bullet, 2713 is a check-mark and so on. Most language 
glyphs of the world are represented in the Unicode database.


HTH's

tedd

--

http://sperling.com/

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



[PHP] Question about Thumbnailing, Watermarking, and Modifying images/video/flash dynamicly

2006-01-22 Thread Jon Grimes
I'm currently working on a media based site that serves up user submitted
videos/images/flash games/etc. The owner wants an easy way to generate
thumbnails for the content so that we don't have to depend on the user to
submit one.  We would also like to attach a small intro clip to the video
content and possibly watermark it.  I would like to automate all this and
make it part of the content submission process.

So what I'm looking for is:

A way to generate a thumbnail for a video/image/flash movie

A way to attach an intro clip to a video file.

A way to Watermark a video or image file.


I'm an experienced Linux user/admin/developer so i am interested in all
possible options,  be it a php/c library,  a prebuilt php solution, or some
command line tools which i can just control with php/cron jobs.

Ive been looking for info on this subject for some time,  i know other sites
use it and that its possible,  but most information I've found has been less
than helpful.

Thanks in advance.


Re: [PHP] XML and special characters

2006-01-22 Thread Adam Hubscher

tedd wrote:
I've been having a tough time with parsing XML files and special 
characters.


-snip-

Any suggestions as to how I could get around this seemingly impossible 
road block thats been placed by what seems to be the xml engines :O..



Adam:

I believe that these special character will be with us for a long 
while. I suggest that you review the Unicode database for these 
characters and my suggestion is to use the code-points (HEX 
equivalences) for these characters. For example, 0061 is a small a, 
2022 is a bullet, 2713 is a check-mark and so on. Most language 
glyphs of the world are represented in the Unicode database.


HTH's

tedd


Oh, I understand that they'll be here for a while.

The problem is the XML file is not my own, rather, its generated by 
another service that I am creating a stemmed service for. I feel I have 
asked much of the owner of that service in creating a properly formed 
XML file (he was simply using pseudo xml that was, although nice and 
organized, unable to be parsed.. period, and took forever with pregs, at 
least now running through an XML generator the script itself takes less 
time on his part too, and hes thankful for that.)


There are usernames listed in the file that use these special characters.

Rather than have him have to well, go through and edit the 3 some 
odd users that are indexed... unless there is a way for the xml writer 
to do hex codes instead of unicode codes automatically... (and in that 
partake, is there any way to read them automatically with a parser?), 
then the idea is feasible.


Other than that, I'm trying to find a solution to parse the existing 
file with the unicode data that causes a fatal error in the parser.


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



[PHP] Devenix Live CD PHP4 and PHP5 project needs help

2006-01-22 Thread Pete Savage
Hi,
This seemed like the most sensible place to start to ask for help.  I'm
currently working on Devenix, a project based on the knoppix live cd.
It will eventually be a complete php design and test studio on a live
cd, carry around a memory stick and save everything onto it, basically
enabling you to work on any computer anywhere and get straight back to work.

My PROBLEM is this.  I need to install php4 and php5, my reasons?  I
want to make it a studio capable of assisting with code migration and
testing from 4 to 5.  php4 is already installed via the debian apt
source.  I initially tried installing php5 by compiling from clean
source, but only ran into problems.  I am now working on modifying the
php5 source tar from the apt-sources to install into a different dir to
avoid conflict with php4.

I added teh prefix line to the common configure line in the debian/rules
file, but this screwed up the libapachemodule rebuild when i tried to
rebuild the pacakge.  Please any advice here would be greatly
appreciated.  And any people wishing to help on the project would be
fantastic.  There is no website yet, once this stumbling block is
overcome, the ball will start rolling.

Thanx

Pete

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



Re: [PHP] PHP not seeing MySQL functions

2006-01-22 Thread PHP Superman
did you uncomment the line that adds the proper php
module(mysqli_blahblahblah.dll)?

On 1/16/06, Jonathan Duncan [EMAIL PROTECTED] wrote:

 I just got a new web server with RedHat Enterprise Linux 4 on it.  It came
 with MySQL 4.1.x and PHP 4.3.9 on it.  I uninstalled the MySQL 4 and put
 MySQL 5 on it.  When I run a PHP script that has a DB connection in it I
 get:

 Fatal error: Call to undefined function: mysql_connect() in
 /var/www/html/mysqltest.php on line 5

 I check the PHPINFO and see:

 Configure Command has '--with-mysql=shared,/usr'

 And dbx supported databases has 'MySQL'

 However, there is no MySQL section.

 I checked in the '/etc/php.ini' file and see:

 [MySQL]
 mysql.allow_persistent = On
 mysql.max_persistent = -1
 mysql.max_links = -1
 mysql.default_port =
 mysql.default_socket =
 mysql.default_host =
 mysql.default_user =
 mysql.default_password =
 mysql.connect_timeout = 60
 mysql.trace_mode = Off


 What is missing that would keep me getting the missing functions error?  I
 restarted apache of course.

 Thanks,
 Jonathan

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




--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


[PHP] exec php.exe in windows

2006-01-22 Thread Dave Kennedy
Env:
Windows XP
PHP 4.3.10 (cgi-fcgi)
 
I am trying to capture the html output of Balance.php to a file:
The code loops over month and branch to build up a report in
export/Balance.html
 
exec('c:\php\php -q Balance.php export=all branch=branch month=month
login=admin password=admin  export/Balance.html');
 
This command works in Linux when called from a web page.
In Windows it works from the command line 
but from a web page it hangs - a cmd and php process are left running in
the Windows Task Manager
 
Any help would be greatly appreciated


Re: [PHP] Controling buffer: php/smarty or apache?

2006-01-22 Thread David Tulloh
The browsers use a whole bunch of different ways to figure out how it
should render the page and if it should do it on the fly or wait until
the page is fully downloaded.

Assuming the content you are testing is the same for the static and
dynamic pages you should probably start looking for little things that
may be different.  From what I've read, adding extra column information
to the table tag and making sure the doctype is correct so you don't end
up in quirks mode are both large factors.

Using 'wget ---save-headers' and 'diff' will help you find any small
difference between the pages.


David

robert mena wrote:
 Hi,
 
 I am facing a strange problem.  My site, even tough designed to appear
 quickly at user's browser, appears at once.  If I test the static HTML
 version it starts to appear as downloaded If I test the php generated
 version the page seems render as a whole.
 
 I am using smarty as a template and it seems to be related to a buffer
 somewhere: php/smarty or apache.
 
 I've used microtime and from the begin of the php script until after the
 smarty-display it takes from 0.05s (min) to 0.32s (max)
 
 Any tips of how can I figure out what is slowing down my site?
 
 tks
 

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



Re: [PHP] PHP not seeing MySQL functions

2006-01-22 Thread John Nichel

PHP Superman wrote:

did you uncomment the line that adds the proper php
module(mysqli_blahblahblah.dll)?


How would loading the mysqli modules help the poster with the mysql 
functions?


How would loading Windoze dll's help the poster on a Linux box?


On 1/16/06, Jonathan Duncan [EMAIL PROTECTED] wrote:


I just got a new web server with RedHat Enterprise Linux 4 on it.  It came

-^

with MySQL 4.1.x and PHP 4.3.9 on it.  I uninstalled the MySQL 4 and put
MySQL 5 on it.  When I run a PHP script that has a DB connection in it I
get:

Fatal error: Call to undefined function: mysql_connect() in

---^

OP, chance are, your RHEL box has the improved mysql (mysqli) libriaries 
set-up.  Try mysqli_connect.  If this isn't the case, then your 
libraries are not being loaded when you start Apache.  Check your error 
logs.


http://us2.php.net/mysqli

--
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: problem with large arrays in php 4.3.2

2006-01-22 Thread Jesse Guardiani
Jesse Guardiani jesse at wingnet.net writes:

 
 Hello,
 
 I have an old version of php (4.3.2) that is acting rather strangely. I'm
 searching two large arrays (approx 22,000 records in each) using
 array_diff_key() from the PEAR PHP_Compat library:
 
 $result = $args[0];
 foreach ($args[0] as $key1 = $value1) {
 for ($i = 1; $i !== $array_count; $i++) {
 foreach ($args[$i] as $key2 = $value2) {
 if ((string) $key1 === (string) $key2) {
 unset($result[$key2]);
 break 2;
 }
 }
 }
 }
 
 And I'm getting aweful performance. I know it's a ton of records (22,000 *
 22,000), but it shouldn't take 16 minutes on a P4 Xeon 2.4ghz!
 
 Has anyone seen this before? Is this a bug? Or are my math skills lacking and
 this is perfectly normal performance for the size of the data set?
 
 Thanks!


I've conducted a little multi-language benchmark to see how other languages
compare to PHP with regard to associative arrays of this size:
http://www.guardiani.us/index.php/Hash_Array_Benchmark

The result in short? PHP is a pretty typical performer, IMO.

Thanks!

P.S. Please read the disclaimer carefully before submitting criticism. Unless
you have a neat optimization to share or code from another language to
contribute, I've probably heard it already and don't care. :)

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



[PHP] Re: exec php.exe in windows

2006-01-22 Thread Chuck Anderson

Dave Kennedy wrote:


Env:
Windows XP
PHP 4.3.10 (cgi-fcgi)

I am trying to capture the html output of Balance.php to a file:
The code loops over month and branch to build up a report in
export/Balance.html

exec('c:\php\php -q Balance.php export=all branch=branch month=month
login=admin password=admin  export/Balance.html');

This command works in Linux when called from a web page.
In Windows it works from the command line 
but from a web page it hangs - a cmd and php process are left running in

the Windows Task Manager

Any help would be greatly appreciated

 

Sounds similar to something I had going on. In Control Panel - 
Administrative Tools - Services (I don't know of a shorter way to get 
there), I had to right-click on the Apache service and under Log On - 
check Allow service to interact with desktop.


I run run Php as an Apache module, but you may want to give that a try.

--
*
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*

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



[PHP] Upgrading to 4.4.2

2006-01-22 Thread [EMAIL PROTECTED]
Hello


I've started work for a client who has their own server running PHP 4.1.1.
If I upgrade them to PHP 4.4.2, will there be any issues I'd need to
look out for?

Is there a general process (or checklist) I should follow when
upgrading PHP versions to find where potential the may be potential
code problems?


Thank you for your assistance

Tim

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



[PHP] Can PHP works with telnet?

2006-01-22 Thread HoWang Wang
Hi all,

Recently I got a job to write a PHP webpage to display some infomation
which have to obtain from telnet. Telnet is the only way to query the
software. I have made a quick search on php.net but I can't found amy
extension support telnet. Is there any way to do so? Or it is impossible
with PHP but can be done with external binaries?
Please help, thanks.

HoWang Wong

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



Re: [PHP] Upgrading to 4.4.2

2006-01-22 Thread [EMAIL PROTECTED]
Hi Amol,

  On 1/23/06, Amol Hatwar [EMAIL PROTECTED] wrote:
  Just make sure a phpinfo() before and after the upgrade match :)

That _just_ crossed my mind! This will help in making sure I setup all
the settings correctly.

Thanks
Tim

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



Re: [PHP] Can PHP works with telnet?

2006-01-22 Thread Steve Clay
Sunday, January 22, 2006, 8:56:01 PM, HoWang wrote:
 software. I have made a quick search on php.net but I can't found amy
 extension support telnet. Is there any way to do so? Or it is impossible

Try http://www.geckotribe.com/php-telnet/ which uses fsockopen [1].
CURL [2] /claims/ telnet support, but this post [3] leads me to believe
it's pretty limited.

[1] http://us2.php.net/function.fsockopen
[2] http://us2.php.net/curl
[3] http://curl.haxx.se/mail/lib-2005-09/0013.html

Steve
-- 
http://mrclay.org/

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



[PHP] Use of Ampersand in php

2006-01-22 Thread Nirmalya Lahiri
Hi everybody,
 Can any one tell me, what is the use of ampersand '' in php? Is it
a pointer operator like 'C' language? Kindly note the example

?php
$a=1;
$b= $a;
$c=$a;
echo $b,$c;
?

 After running this example I got result 1 for both variable $b and
$c. Why so?

--Nirmalya

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: [PHP] XML and special characters

2006-01-22 Thread Adam Hubscher

Adam Hubscher wrote:

tedd wrote:

I've been having a tough time with parsing XML files and special 
characters.


-snip-

Any suggestions as to how I could get around this seemingly 
impossible road block thats been placed by what seems to be the xml 
engines :O..




Adam:

I believe that these special character will be with us for a long 
while. I suggest that you review the Unicode database for these 
characters and my suggestion is to use the code-points (HEX 
equivalences) for these characters. For example, 0061 is a small a, 
2022 is a bullet, 2713 is a check-mark and so on. Most language 
glyphs of the world are represented in the Unicode database.


HTH's

tedd


Oh, I understand that they'll be here for a while.

The problem is the XML file is not my own, rather, its generated by 
another service that I am creating a stemmed service for. I feel I have 
asked much of the owner of that service in creating a properly formed 
XML file (he was simply using pseudo xml that was, although nice and 
organized, unable to be parsed.. period, and took forever with pregs, at 
least now running through an XML generator the script itself takes less 
time on his part too, and hes thankful for that.)


There are usernames listed in the file that use these special characters.

Rather than have him have to well, go through and edit the 3 some 
odd users that are indexed... unless there is a way for the xml writer 
to do hex codes instead of unicode codes automatically... (and in that 
partake, is there any way to read them automatically with a parser?), 
then the idea is feasible.


Other than that, I'm trying to find a solution to parse the existing 
file with the unicode data that causes a fatal error in the parser.
ee dee da da da? sect;eth; -- those that look like html entities are 
the represented characters. I was mistaken, they are html entities, 
which is even odder to me.


I apologize for earlier referring to utf8, they do not decode with utf8, 
they decode with html entities. however, i continue to try methods to 
get it to read... still it does not read properly.


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



[PHP] Houston PHP Users Group February Meeting Details

2006-01-22 Thread Joao Prado Maia

Hi,

I'm sending the February meeting details to this mailing list in hopes of 
getting through to some Houston-based PHP developer that is not aware of 
our local Users Group.


The group started out in Meetup.com, but recently we built our own website 
(http://houstonphp.org) to increase the interactivity level between our 
members and with that improve the participation in our monthly meetings.


We meet at the University of Houston on the first Thursday of every month. 
We usually have members that do a few presentations each month, on a topic 
related to PHP and Web Development in general.


If you are interested in joining us and do some networking with other 
professionals in the Houston area, please visit our website at:


  http://houstonphp.org

Or our Meetup group page at:

  http://php.meetup.com/121/events/4827290/

Next month's details (Thursday, February 2nd, 7:00pm) are the following:

Marc Mojica will give a presentation about quickly creating PHP-based web 
applications with Macromedia Dreamweaver. This presentation should be 
highly interesting to new PHP developers that want to get started quickly, 
and also to experienced developers that want to easen up the design/layout 
development of a web application.


Joao Prado Maia will present about development with CVS, a revision 
control system used by most of today.s open source projects. I.ll go over 
the details of creating a CVS repository, importing modules and start 
tracking changes to your files. If you are interested, feel free to start 
reading Open Source Development with CVS, a free book available online.


We will also have our usual Tips  Tricks session at the end of the 
meeting, with good tips about interesting PHP components, MySQL tools, 
Firefox extensions, AJAX/JavaScript libraries and other web development 
related topics.


The meeting location and driving directions (with a easy to 
follow map) are available at the following URL:


  http://houstonphp.org/?page_id=4

Hope to see you all in there!

Joao Prado Maia
Organizer

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



Re: [PHP] Use of Ampersand in php

2006-01-22 Thread Michael Hulse

On Jan 22, 2006, at 7:04 PM, Nirmalya Lahiri wrote:

Can any one tell me, what is the use of ampersand '' in php?


This might help:

http://us2.php.net/manual/en/language.references.php

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



[PHP] PHP SSH2

2006-01-22 Thread Vedanta Barooah
hello all,
this is in regard to PECL ssh2 ( http://pecl.php.net/package/ssh2 ) : how to
i print the output of the command executed using ssh2_exec?
thanks,
vedanta


Re: [PHP] Can PHP works with telnet?

2006-01-22 Thread Geoff
In the php manual, in the fsockopen() page, in the user comments, I 
found this:

--
Found this php class to use telnet from here:
http://cvs.adfinis.ch/cvs.php/phpStreamcast/telnet.class.php
There's no docs and a lot of it's in french though so maybe it will 
help someone to have my working code. This code is used to telnet 
into a pix and execute the shun command.


//---telnet.class.php usage example-
   $telnet = new telnet;
// Next line is for logging.  
//By default you need to create a folder called /log and give it 
//the rights your webserver is running.
   $telnet-setLog(1,mylog);
   $telnet-set_host(myhost.myplace.com);
//You need to set the prompt to what you know its going to be,
//then call wait_prompt...which waits for what you just set
   $telnet-set_prompt(Password: );
   $telnet-connect();
   $telnet-wait_prompt();
   $telnet-write(mypassword);
//Have to change the prompt...in my example this is the 
//prompt that a pix will change to after loggin in.
   $telnet-set_prompt(pix );
   $telnet-wait_prompt();
   $telnet-write(en);
   $telnet-set_prompt(Password: );
   $telnet-wait_prompt();
   $telnet-write(enable_password);
//When you go into enable mode in a pix the prompt changes
   $telnet-set_prompt(pix# );
   $telnet-wait_prompt();
   $telnet-write(shun  . $shun_address);
   $telnet-wait_prompt();
   $telnet-write(clear xlate);
   $telnet-wait_prompt();
   $telnet-write(write mem);
   $telnet-wait_prompt();
   $telnet-write(exit);
   $telnet-disconnect();

--

In that same manual page, there is lots of other information and 
suggestions on making telnet connections.

Note that cURL will also allow telnet.

Geoff.


On 23 Jan 2006 at 9:56, HoWang Wang wrote:

 Hi all,
 
 Recently I got a job to write a PHP webpage to display some infomation
 which have to obtain from telnet. Telnet is the only way to query the
 software. I have made a quick search on php.net but I can't found amy
 extension support telnet. Is there any way to do so? Or it is impossible
 with PHP but can be done with external binaries?
 Please help, thanks.
 
 HoWang Wong
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 !DSPAM:43d445e0116957800291649!
 

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



[PHP] Re: exec php.exe in windows

2006-01-22 Thread Dave Kennedy
Chuck
I tred what you suggested - but it did not help
Btw I am using IIS on Windows
 
Sounds similar to something I had going on. In Control Panel - 
Administrative Tools - Services (I don't know of a shorter way to get 
there), I had to right-click on the Apache service and under Log On - 
check Allow service to interact with desktop.
 
I run run Php as an Apache module, but you may want to give that a try.