php-general Digest 16 Apr 2005 06:00:30 -0000 Issue 3400

2005-04-16 Thread php-general-digest-help
php-general Digest 16 Apr 2005 06:00:30 - Issue 3400 Topics (messages 213153 through 213175): Re: dynamic image will not print properly 213153 by: DuSTiN KRySaK Re: Amazon/eBay API 213154 by: Matthew Fonda 213161 by: Warren Vail 213170 by: Manuel Lemos

php-general Digest 16 Apr 2005 18:59:57 -0000 Issue 3401

2005-04-16 Thread php-general-digest-help
php-general Digest 16 Apr 2005 18:59:57 - Issue 3401 Topics (messages 213176 through 213210): Are sessions unreliable? 213176 by: Dasmeet Singh 213177 by: Warren Vail 213182 by: Dasmeet Singh 213200 by: Matthew Weier O'Phinney Re: Any experience with

[PHP] Re: Setting permissions such that file can be included but not open directly

2005-04-16 Thread Dasmeet Singh
Dasmeet Singh wrote: Hi! I use a page to authorize a user and based on certain criterias (user group etc) include a file in another directory (named private)... Everything is working fine but the problem is anyone goign directly to private/includefile.php can run the script without authorising

[PHP] Are sessions unreliable?

2005-04-16 Thread Dasmeet Singh
Hi! I store some user info in sessions.. it works fine but sometimes what happens is that the user id stored in session get changed.. and it happens only sometimes.. Can it be browser problem? or this is common? Thanks - Free cPanel Web Hosting

RE: [PHP] Are sessions unreliable?

2005-04-16 Thread Warren Vail
I have had similar things happen but in every case it turned out to be a program bug in my code. It was usually something I looked at over and over and I saw the way it was supposed to work, but because I missed a detail it was not working that way. I would suggest you find someone to look over

Re: [PHP] Any experience with multi-language PHP sites?

2005-04-16 Thread Burhan Khalid
Richard Davey wrote: Hi all, [ snipped ] I'm interested in knowing of any problems I should be looking out for while designing this - what happens to Japanese characters for example when stored in a MySQL text field? Any issues re: displaying them again once extracted? Or on validating

[PHP] Chat Script

2005-04-16 Thread sukalyan banga
Hi! I am finding a chat script from which I can use that script as a private chatting work at my own URL.

Re: [PHP] snort database not appearing in phpmyadmin

2005-04-16 Thread Burhan Khalid
Mark Sargent wrote: Mark Sargent wrote: Hi All, I've installed phpmyadmin and have a snort database in mysql, but, it doesn't appear in phpmyadmin. I know it's there, because base is using it to display info from snort on the machine. Why wouldn't it appear in phpmyadmin. It appears with the

Re: [PHP] Sessions and frames

2005-04-16 Thread Gustav Wiberg
Hi there! Thanx a lot, i thought it was like that, but I wasn't sure /G @varupiraten.se - Original Message - From: Chris W. Parker [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED]; PHP General php-general@lists.php.net Sent: Friday, April 15, 2005 1:26 AM Subject: RE: [PHP]

Re: [PHP] Are sessions unreliable?

2005-04-16 Thread Dasmeet Singh
Hi! Warren Thanks for such a detailed reply... I am already looking into the code... Just wanted to ask... I recently updated Red Hat's kernel.. and this problem seems to started appearing after that... is there a possibility of any connection between these two? Warren Vail wrote: I have had

[PHP] Re: Determining array type

2005-04-16 Thread zini10
i dont think there is a pre-made function but u can use : (! --untested at all --! ) function determine_array($a) { $numric=0; $assoc=0; foreach($a as $index=$value) { if(is_numeric($index)){ $numric=1; } else{ $assoc=1; } } return $numric+$assoc*2; } then results

Re: [PHP] Determining array type

2005-04-16 Thread Burhan Khalid
NSK wrote: We have two kinds of arrays in PHP: $array[name] = George $array[0] = George How can I determine (with a function returning true/false for example) which type of array I am working with? There aren't two kinds of arrays, there is only one array type: There are no different indexed and

Re: [PHP] Mysql insert problems

2005-04-16 Thread Burhan Khalid
Andy Pieters wrote: Hi Whilst you are searching the net, you might also want to search for 'sql injection'. This is no joke! Please use the mysql_escape_string on each variable you get from the user side. Use mysql_real_escape_string() instead. -- PHP General Mailing List (http://www.php.net/)

[PHP] A question

2005-04-16 Thread Khorosh Irani
Hello How I can find that php is installed as cgi or as apache module? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: A question

2005-04-16 Thread Amir Mohammad Saied
phpinfo() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Access Denied-phpMyAdmin

2005-04-16 Thread Mark Sargent
Hi All, I can access the database from the terminal on Fedora 3, [EMAIL PROTECTED] bin]# ./mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.10a-standard Type 'help;' or '\h' for help. Type

Re: [PHP] Any experience with multi-language PHP sites?

2005-04-16 Thread Marek Kilimajer
Burhan Khalid wrote: I've found that matching the character set of HTML to what is expected from your users is the best compromise when coming to display searching. This is a must, not a compromise. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Access Denied-phpMyAdmin

2005-04-16 Thread Marek Kilimajer
Mark Sargent wrote: Hi All, I can access the database from the terminal on Fedora 3, [EMAIL PROTECTED] bin]# ./mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.10a-standard Type 'help;' or

Re: [PHP] Re: A question

2005-04-16 Thread Khorosh Irani
How I can find it in phpinfo() ? On 4/16/05, Amir Mohammad Saied [EMAIL PROTECTED] wrote: phpinfo() -- 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:

Re: [PHP] Access Denied-phpMyAdmin

2005-04-16 Thread Mark Sargent
Marek Kilimajer wrote: Mark Sargent wrote: Hi All, I can access the database from the terminal on Fedora 3, [EMAIL PROTECTED] bin]# ./mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version:

[PHP] forwarding email messages directly from a maildir

2005-04-16 Thread mbneto
Hi, I'd like to make a script that opens my maildir (~login/Maildir/.Junk/cur) and forwards all messages to a specific address in order to train the spam engine. Any tips about this ? tks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Access Denied-phpMyAdmin

2005-04-16 Thread Andre Dubuc
On Saturday 16 April 2005 07:18 am, Mark Sargent wrote: Marek Kilimajer wrote: Mark Sargent wrote: Hi All, I can access the database from the terminal on Fedora 3, [EMAIL PROTECTED] bin]# ./mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor. Commands end

Re: [PHP] Re: A question

2005-04-16 Thread Rory Browne
you write a script containing ?php phpinfo(); ? and ?php phpinfo(); ? only. You access that script through your web browser, and it will return a variety of useful information. Amongst it will be information labeled as SERVER API. If you are running as an apache module, Apache will appear in the

[PHP] Two tables (Slightly 0T)

2005-04-16 Thread Ryan A
Hey, My host has MySql 4.0.x so I cant really use the nested selects of 4.1 :-( please tell me how you solved something like this; I have two tables: users_online (username , dateandtime) users_details (cno, username, has_image, image_name) 1a) I have to select x records from users_online where

Re: [PHP] Two tables (Slightly 0T)

2005-04-16 Thread Petar Nedyalkov
On Saturday 16 April 2005 17:06, Ryan A wrote: Hey, My host has MySql 4.0.x so I cant really use the nested selects of 4.1 :-( please tell me how you solved something like this; I have two tables: users_online (username , dateandtime) users_details (cno, username, has_image, image_name)

Re: [PHP] Two tables (Slightly 0T)

2005-04-16 Thread Ryan A
Hey, Thanks for replying. Will look up join. BTW this is a question for the [MySQL General] list at [EMAIL PROTECTED] I know its largly a MySql question, but I am using it via PHP...and thats why I wrote the OT in the subject...didnt want to tick anyone off. Cheers, Ryan On 4/16/2005

[PHP] Re: Two tables (Slightly 0T)

2005-04-16 Thread Matthew Weier O'Phinney
* Ryan A [EMAIL PROTECTED]: My host has MySql 4.0.x so I cant really use the nested selects of 4.1 :-( please tell me how you solved something like this; I have two tables: users_online (username , dateandtime) users_details (cno, username, has_image, image_name) 1a) I have to select x

Re: [PHP] Are sessions unreliable?

2005-04-16 Thread Matthew Weier O'Phinney
* Dasmeet Singh [EMAIL PROTECTED] : Just wanted to ask... I recently updated Red Hat's kernel.. and this problem seems to started appearing after that... is there a possibility of any connection between these two? Probably not, unless you're using shared memory for sessions. Warren Vail

Re: [PHP] Re: Two tables (Slightly 0T)

2005-04-16 Thread Ryan A
Hey, Thanks for replying. I know, I need to start brushing up on my Sql, problem is I rarely need to use much other than a simple select,update,insert. Sorry I didnt write my where query before...this is what i am using: SELECT last_online from `members_online` WHERE last_online

[PHP] reducing array size

2005-04-16 Thread pete M
Is there an easy way to trim an array ? I'm using array_unshift to push elemnts onto the front of an array but I want to limit the size to 20 ?? Is there an easy way to do this without looping and unsetting the elements ?? tia Pete -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: A question

2005-04-16 Thread trlists
On 16 Apr 2005 Khorosh Irani wrote: How I can find it in phpinfo() ? Another (simpler) approach is: echo php_sapi_name(); which will return 'cli', 'cgi', etc. -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] round?

2005-04-16 Thread Chris Knipe
Hi, I'm not sure if round() is what I am after. I want to round whole numbers to the closest 10 - thus, not decimals, etc. For example. 11.23 = 10 14.76 = 10 15.23 = 20 18.53 = 20 Thanks, -- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by... - Douglas

Re: [PHP] round?

2005-04-16 Thread trlists
On 16 Apr 2005 Chris Knipe wrote: I'm not sure if round() is what I am after. I want to round whole numbers to the closest 10 - thus, not decimals, etc. Just use a precision of -1. For example round(125, -1) will return 130. -- Tom -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] reducing array size

2005-04-16 Thread Jason Wong
On Saturday 16 April 2005 23:07, pete M wrote: Is there an easy way to trim an array ? I'm using array_unshift to push elemnts onto the front of an array but I want to limit the size to 20 ?? Is there an easy way to do this without looping and unsetting the elements ?? array_slice(),

[PHP] query error

2005-04-16 Thread pete M
I've got a database table with a whole list of windows file paths. eg Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk Advent Tower

[PHP] Re: query error

2005-04-16 Thread Satyam
I believe the \ preceding the last % makes it a literal % not the wildcard % pete M [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've got a database table with a whole list of windows file paths. eg Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk Advent

[PHP] trying to send mail via localhost

2005-04-16 Thread AndreaD
When trying to send mail via localhost I get the following error Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Any ideas?/ RH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Chat Script

2005-04-16 Thread Dasmeet Singh
Sukalyan Banga wrote: Hi! I am finding a chat script from which I can use that script as a private chatting work at my own URL. see this :) http://www.hotscripts.com/PHP/Scripts_and_Programs/Chat_Scripts/index.html - Free cPanel Web Hosting

[PHP] image handling

2005-04-16 Thread Dasmeet Singh
I have a form on my website that allows users to upload photographs.. 1. How to find out the file type they are uploading..like jpeg or png or gif? 2. Also is there any way to find out size and resolution of the image? Thanks in advance :) - Free cPanel Web Hosting

[PHP] Re: trying to send mail via localhost

2005-04-16 Thread Satyam
I think the specs are in RFC 822. You should find if there. Satyam AndreaD [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When trying to send mail via localhost I get the following error Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Any ideas?/ RH --

Re: [PHP] image handling

2005-04-16 Thread Justin Gruenberg
On 4/16/05, Dasmeet Singh [EMAIL PROTECTED] wrote: I have a form on my website that allows users to upload photographs.. 1. How to find out the file type they are uploading..like jpeg or png or gif? 2. Also is there any way to find out size and resolution of the image?

Re: [PHP] Reverse plural forms to singular for search

2005-04-16 Thread Brian A Anderson
I was looking into that a month or so ago. Here's an article that mentions the Porter Stemming Algorithm http://www.scit.wlv.ac.uk/seed/docs/mypapers/stemalg.html and the official home http://www.tartarus.org/~martin/PorterStemmer/ I don't know if this is of interest. -Brian Anderson -

Re: [PHP] Re: A question

2005-04-16 Thread Rory Browne
On 4/16/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 16 Apr 2005 Khorosh Irani wrote: How I can find it in phpinfo() ? Another (simpler) approach is: not as versitile though. php_sapi_name() is better suited to situations where you will do something differently depending on the

Re: [PHP] Re: trying to send mail via localhost

2005-04-16 Thread Rory Browne
I'm not expert, on this area, but unless I'm mistaken, that happens when the email address you are sending the mail to doesn't exist. For example if you try to send a mail to [EMAIL PROTECTED], when the actual address is [EMAIL PROTECTED], the username monk will not exist. Check your 'to' address.

[PHP] Re: trying to send mail via localhost

2005-04-16 Thread Labunski
Hi, Unless I'm mistaken, it's cause of bad SMTP address in your php.ini file, and so (if you haven't installed SMTP server on your PC), you have to set the SMTP line in your php.ini file to your internet provider's smtp address. For example, I'm on Windows and my internet provider's smtp address

Re: [PHP] Streaming video BLOBs from MySQL

2005-04-16 Thread J J
Hmmm... not sure how this is done. I see someone added an example that they use substring to load 10mb of data at a time from the blob. The part I don't understand is how they loop the statements and continue to stream data to the user. If I make one pass and get 1mb of the blob...the browser

Re: [PHP] Streaming video BLOBs from MySQL

2005-04-16 Thread Chris Boget
If I make one pass and get 1mb of the blob...the browser is simply going to load that 1mb only, right? How do I keep looping and refreshing the users browser, or in this case, flash player? Thanks for any ideas! Look into flush(); thnx, Chris -- PHP General Mailing List

[PHP] Parse Error on mysql_query

2005-04-16 Thread Bagus Nugroho
Hi, I'm beginning to learn PHP/MySQL, i have problem 'parse error' when using 'mysql_query' although it was simple code, like this : = 1 ?php 2 $host = localhost; 3 $user = root; 4 $pass = alpha; 5 $konek = mysql_connect($host,$user,$pass); 6 if (!$konek) { 7 die

Re: [PHP] Parse Error on mysql_query

2005-04-16 Thread Philip Hallstrom
Add a ; to the end of line 16. On Sun, 17 Apr 2005, Bagus Nugroho wrote: Hi, I'm beginning to learn PHP/MySQL, i have problem 'parse error' when using 'mysql_query' although it was simple code, like this : = 1 ?php 2 $host = localhost; 3 $user = root; 4 $pass = alpha; 5 $konek =

[PHP] Session variables are not stored when set in implicitly called constructor!??

2005-04-16 Thread Adam
Hallo everybody, hope I am writing to correct mailinglist(^_^*)... I have troubles with sessions and descructor in php5. Can not set session variable in destructor when it's called implicitly. Do You know solution please? I think problem is that session is stored before imlicit object destruction

[PHP] Another array sorting Problem

2005-04-16 Thread Webmaster
Hi, I have a multidimensional array looking linke this Rowid title kat 123 nr1 3 442 nr2 2 547665 nr3 5 4532nr4 3 3244nr5 1 124 nr6 2 776

Re: [PHP] Another array sorting Problem

2005-04-16 Thread Philip Hallstrom
Hi, I have a multidimensional array looking linke this Rowid title kat 123 nr1 3 442 nr2 2 547665 nr3 5 [snip] I now need to sort that array first by kat and second on rowid, so it would throw out: Nr5 Nr6 Nr2 [snip]

Re: [PHP] Streaming video BLOBs from MySQL

2005-04-16 Thread Ryan A
On 4/17/2005 2:08:43 AM, Chris Boget ([EMAIL PROTECTED]) wrote: If I make one pass and get 1mb of the blob...the browser is simply going to load that 1mb only, right? How do I keep looping and refreshing the users browser, or in this case, flash player? Thanks for any ideas!