Re: [PHP] Character set problems

2008-04-04 Thread Robert Cummings
On Thu, 2008-04-03 at 21:56 -0700, Rob Gould wrote: I'm having a hard time figuring out why my character sets and data look when when viewed in phpAdmin when browsing the table-columns, but then I go to show the data on my web-page with PHP, I get garbage-characters where I should be

Re: [PHP] APC FastCGI != upload progress ?

2008-04-04 Thread steve
I think FastCGI is buffering the upload, which is good I guess, just nice to know. I'll put a comment in the php manual. The deflate thing is a FastCGI bug, I searched the list and found a fix. I thought mod_fastcgi was dead (it didn't even compile on Apache 2.2). It looks like there was a release

Re: [PHP] preg_replace Question

2008-04-04 Thread Per Jessen
Richard Luckhurst wrote: e.g $amount = $524.00 however only 4.00 is displayed in the %Amount field on the html page. I tried dropping the .00 from $amount to see if this might be a length issue and then %Amount was just 4 Am I doing something obviously wrong here? I have checked the php

[PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Angelo Zanetti
Hi all, I am looking at options for creating a dynamic dropdown list. Ok here is the scenario: All values in the dropdown list (select/option field) are coming from the database. So there will be 2 dropdown lists. First one say gets (for example) a list of cars, Then once the car is

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Zoltán Németh
Angelo Zanetti írta: Hi all, I am looking at options for creating a dynamic dropdown list. Ok here is the scenario: All values in the dropdown list (select/option field) are coming from the database. So there will be 2 dropdown lists. First one say gets (for example) a list of cars,

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Richard Heyes
I would like to know if its possible to do this without posting as well as without the use of JS. Realistically, no. You could do it with VBScript, but then you're restricted to Internet Explorer. This is not desirable as I will be getting the values from the the DB using PHP, unless I can

[PHP] How to write simpleXML object to a file

2008-04-04 Thread It Maq
Hi, I am reading an xml file. After that i modify one node. IN the xml object that i'm handling it is modified but not in the original file. Can you tell me how i can make the modification to an xml file or how to write an xml object to a file? Thank you

[Fwd: Re: [PHP] Character set problems]

2008-04-04 Thread Ryan Yagatich
Forwarding back to the list, since I'm one of those evil people that uses HTML to write email :) Original Message Robert Cummings wrote: snip So, based on the headers I'm using, and the myphpAdmin settings, is there something I'm missing? I guess I was assuming since the

Re: [PHP] Character set problems

2008-04-04 Thread Rob Gould
mysql_query(SET NAMES utf8); This above line of code fixed my character problems. Yay! Was curious though - - - -is there a place somewhere in the cPanel or myPHPAdmin on my ISP (www.bluehost.com), where I can just have this happen automatically, or do I need to put this in my code

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Ryan Yagatich
Angelo Zanetti wrote: Hi all, I am looking at options for creating a dynamic dropdown list. snip Is there any other idea or thing I can do? Im thinking maybe AJAX but this is for a mobile site (WAP/xHTML) site and Im not sure if the functionality will work on these devices. You're

Re: [PHP] How to write simpleXML object to a file

2008-04-04 Thread Zoltán Németh
It Maq írta: Hi, I am reading an xml file. After that i modify one node. IN the xml object that i'm handling it is modified but not in the original file. Can you tell me how i can make the modification to an xml file or how to write an xml object to a file? $xml-asXML('whatever.xml');

[PHP] Why my mails are not received by Hotmail users?

2008-04-04 Thread thomas Armstrong
Hi. I created this script to send emails: --- $mailFromEmail = [EMAIL PROTECTED]; $mailFromName = MYDOMAIN; $mailTo = [EMAIL PROTECTED]; $mailHeaders = From: $mailFromName $mailFromEmail\n . Content-Type: text/plain; . charset=UTF-8; format=flowed\n . MIME-Version: 1.0\n .

Re: [PHP] Why my mails are not received by Hotmail users?

2008-04-04 Thread Ryan Yagatich
thomas Armstrong wrote: Hi. I created this script to send emails: --- $mailFromEmail = [EMAIL PROTECTED]; $mailFromName = MYDOMAIN; $mailTo = [EMAIL PROTECTED]; $mailHeaders = From: $mailFromName $mailFromEmail\n . Content-Type: text/plain; . charset=UTF-8;

RES: [PHP] Why my mails are not received by Hotmail users?

2008-04-04 Thread Thiago Pojda
These emails hit even my M$ Outlook spam filter (which is not very good at this job) Try sending something else, as Ryan said. -Mensagem original- De: Ryan Yagatich [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 4 de abril de 2008 11:31 Para: thomas Armstrong Cc:

Re: [PHP] Why my mails are not received by Hotmail users?

2008-04-04 Thread Wolf
thomas Armstrong [EMAIL PROTECTED] wrote: Hi. I created this script to send emails: --- $mailFromEmail = [EMAIL PROTECTED]; $mailFromName = MYDOMAIN; $mailTo = [EMAIL PROTECTED]; $mailHeaders = From: $mailFromName $mailFromEmail\n . Content-Type: text/plain; .

[PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
Guys, Some users often open two different sessions in my application by opening a new browser instance (not Open in new window {they all use IE}). This actually works better than expected, the two sessions are almost indepedent. The thing is: almost. Sometimes one session displays data from

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Ryan Yagatich
Thiago Pojda wrote: snip Does anyone know how to fix this? Add a hidden PHPSESSID field in every form (instead of cookies) would solve my problem or is this a server-side thing? you mean like session.use_trans_sid in php.ini? Regards, Ryan Yagatich -- Pantek, Inc. -

[PHP] using php to backup mysql database?

2008-04-04 Thread paragasu
anyone know how to backup a mysql database using PHP? i want to write one php function to allow admin to download the mysql database backup (mysqldump maybe?) .. and how to restore the database backup from web based admin? i am using a shared server and the php scripts executed under the www-data

[PHP] exec return values

2008-04-04 Thread Philip Thompson
Is there a set list of return values/error codes returned by exec? I am running this command on a windows box and getting the following error: exec (net use /delete i: /y, $output, $ret); print_r ($output);// Array() echo Return: $ret; // Return: 2 I tested this statement with the

Re: [PHP] using php to backup mysql database?

2008-04-04 Thread paragasu
i know phpmyadmin.. the points is, i am writing an application. i want the admin of the website i wrote, to be able to do backup/restore from the main administration area. this admin do not have access to phpmyadmin.

Re: [PHP] using php to backup mysql database?

2008-04-04 Thread Robert Cummings
On Fri, 2008-04-04 at 23:40 +0800, paragasu wrote: i know phpmyadmin.. the points is, i am writing an application. i want the admin of the website i wrote, to be able to do backup/restore from the main administration area. this admin do not have access to phpmyadmin. If you know

Re: [PHP] LDAP in php

2008-04-04 Thread Nathan Nobbe
On Thu, Apr 3, 2008 at 4:10 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Nathan Nobbe schrieb: and its a little more complicated to map to sql than one might initially suspect http://www.openldap.org/doc/admin24/intro.html#LDAP%20vs%20RDBMS Yes, that's why I decided to try a php LDAP

RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Ryan Yagatich [mailto:[EMAIL PROTECTED] Ryan you mean like session.use_trans_sid in php.ini? /Ryan Never heard of it, just RTFM'ed and it looks like the solution. I'll be trying it and reply with the results. Thanks! Thiago -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] everything as classes

2008-04-04 Thread robert
Hi After spending yesterday afternoon I cleaned up my code and simplified in many places. I really like the idea to use Static class for single use database operations. Thank you very much to you that responded with comments. -robert On Apr 3, 2008, at 11:23 AM, Richard Heyes wrote:

Re: [PHP] Character set problems

2008-04-04 Thread viraj
in most php apps, they use a separate database connection class. just locate the function where it does mysql_select_db(), you can place the line right after it selects the db. this will set name for each connection, so no need to specifically set name every time you execute a query. or if you

RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Ryan Yagatich [mailto:[EMAIL PROTECTED] Ryan you mean like session.use_trans_sid in php.ini? /Ryan How does this thing work anyway? As far as I read, it adds the session id to every (default behavior) href and a hidden field in forms, right? I *think* it just does that when you have

Re: [PHP] using php to backup mysql database?

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 11:27 AM, paragasu [EMAIL PROTECTED] wrote: anyone know how to backup a mysql database using PHP? i want to write one php function to allow admin to download the mysql database backup (mysqldump maybe?) .. and how to restore the database backup from web based admin?

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 2:37 PM, Thiago Pojda [EMAIL PROTECTED] wrote: De: Ryan Yagatich [mailto:[EMAIL PROTECTED] Ryan you mean like session.use_trans_sid in php.ini? /Ryan How does this thing work anyway? As far as I read, it adds the session id to every (default behavior)

RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Daniel Brown [mailto:[EMAIL PROTECTED] On Fri, Apr 4, 2008 at 2:37 PM, Thiago Pojda [EMAIL PROTECTED] wrote: De: Ryan Yagatich [mailto:[EMAIL PROTECTED] Ryan you mean like session.use_trans_sid in php.ini? /Ryan How does this thing work anyway? As far as I read, it adds the

Re: [PHP] exec return values

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 11:34 AM, Philip Thompson [EMAIL PROTECTED] wrote: Is there a set list of return values/error codes returned by exec? I am running this command on a windows box and getting the following error: exec (net use /delete i: /y, $output, $ret); print_r ($output);//

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 2:57 PM, Thiago Pojda [EMAIL PROTECTED] wrote: De: Daniel Brown [mailto:[EMAIL PROTECTED] ?php echo http://www.domain.com/script.php?.session_name().=.session_id(); ? I think it was supposed to add those stuff automagically...? Not quite sure I understood.

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 9:33 AM, Ryan Yagatich [EMAIL PROTECTED] wrote: Angelo Zanetti wrote: Hi all, I am looking at options for creating a dynamic dropdown list. snip Is there any other idea or thing I can do? Im thinking maybe AJAX but this is for a mobile site (WAP/xHTML)

RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Daniel Brown [mailto:[EMAIL PROTECTED] Probably because of the fear of session hijacking and spoofing. The thing is, a handwritten cookie is just as effective for that, by changing the PHPSESSID (or equivalent). In any case, a 32-byte hexadecimal hash should be sufficient security for

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Nitsan Bin-Nun
*im really sorry for interupting* The session.use_trans_sid setting automaticly adds sid=**(32-chars-sess-id)** to the url's of the website, it should solve your problem try to use it if you have an access to php.ini otherwise, my suggestion is to forward a compiled (coded or something like

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 3:48 PM, Thiago Pojda [EMAIL PROTECTED] wrote: De: Daniel Brown [mailto:[EMAIL PROTECTED] Probably because of the fear of session hijacking and spoofing. The thing is, a handwritten cookie is just as effective for that, by changing the PHPSESSID (or equivalent).

[PHP] Posting Summary for Week Ending 4 April, 2008: php-general@lists.php.net

2008-04-04 Thread PostTrack [Dan Brown]
Posting Summary for PHP-General List Week Ending: Friday, 4 April, 2008 Messages| Bytes | Sender ++-- 295 (100%) 393216 (100%) EVERYONE 26 (8.8%)

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Daniel Brown
On Fri, Apr 4, 2008 at 3:58 PM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: *im really sorry for interupting* The session.use_trans_sid setting automaticly adds sid=**(32-chars-sess-id)** to the url's of the website, it should solve your problem try to use it if you have an access to

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Nathan Nobbe
On Fri, Apr 4, 2008 at 1:11 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Fri, Apr 4, 2008 at 9:33 AM, Ryan Yagatich [EMAIL PROTECTED] wrote: Angelo Zanetti wrote: Hi all, I am looking at options for creating a dynamic dropdown list. snip Is there any other idea or thing

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Nitsan Bin-Nun
After reading the rest of the conversation, I think the best solution is the next thing: First, if I got this correct, you can extract the makes select-element from the mysql using a query? if so, then extract it and host is in a temp variable. The next thing is writing down a js code, that

RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
-Mensagem original- De: Nitsan Bin-Nun [mailto:[EMAIL PROTECTED] snip The session.use_trans_sid setting automaticly adds sid=**(32-chars-sess-id)** to the url's of the website, it should solve your problem /snip ME - I added session.use_trans_sid = 1 to the beggining of my php.ini

Re: [PHP] Dynamic dropdown lists (select)

2008-04-04 Thread Nathan Nobbe
On Fri, Apr 4, 2008 at 2:19 PM, Nitsan Bin-Nun [EMAIL PROTECTED] wrote: After reading the rest of the conversation, I think the best solution is the next thing: First, if I got this correct, you can extract the makes select-element from the mysql using a query? if so, then extract it and host

Re: [PHP] Multi sessions - IE

2008-04-04 Thread Nitsan Bin-Nun
Usually my system are templates and OOP based, so if you change the main function that handles the links... btw I dont know if you thought about this, in order to deny any kind of session fixation and X/CSRF (cross site forgeries) you better write down some $_GET forwarded token system ;) CSRF -

[PHP] PostTrack Updates

2008-04-04 Thread Daniel Brown
Some changes take effect with the PostTrack metrics system with this week (will show up in next week's report). There's one bug fix and a new feature added, in which some of you may be really interested. CHANGELOG Fixed a bug that would (seemingly random) split a user's post

[PHP] How to jump to line number in large file

2008-04-04 Thread Steve McGill
Hello, I have code where it is appropriate for me to jump to certain lines in a text file and edit that particular line. I need to keep a record of the byte position of every line so that I can fseek to it. I need to do in-line editing so I don't want to write the entire file out again etc. I

Re: [PHP] How to jump to line number in large file

2008-04-04 Thread Greg Bowser
fseek($handle, 1, SEEK_CUR); // or fseek($handle, $pos) $t = fgetc($handle); This probably won't help you, but given a quick glance, it looks like you're incrementing the file pointer by 2 positions on each iteration of your while loop. The fgetc() function returns the character at the

Re: [PHP] using php to backup mysql database?

2008-04-04 Thread paragasu
On Sat, Apr 5, 2008 at 2:42 AM, Daniel Brown [EMAIL PROTECTED] wrote: On Fri, Apr 4, 2008 at 11:27 AM, paragasu [EMAIL PROTECTED] wrote: anyone know how to backup a mysql database using PHP? i want to write one php function to allow admin to download the mysql database backup (mysqldump

Re: [PHP] PostTrack Updates

2008-04-04 Thread Robert Cummings
?php echo On Fri, 2008-04-04 at 17:23 -0400, Daniel Brown wrote:\n ? ?php echo Some changes take effect with the PostTrack metrics\n ? ?php echo system with this week (will show up in next week's\n ? ?php echo report). There's one bug fix and a new feature added, \n ? ?php echo in which some

Re: [PHP] PostTrack Updates

2008-04-04 Thread Jim Lucas
Robert Cummings wrote: ?php echo On Fri, 2008-04-04 at 17:23 -0400, Daniel Brown wrote:\n ? ?php echo Some changes take effect with the PostTrack metrics\n ? ?php echo system with this week (will show up in next week's\n ? ?php echo report). There's one bug fix and a new feature added, \n ?

Re: [PHP] PostTrack Updates

2008-04-04 Thread Robert Cummings
On Fri, 2008-04-04 at 22:39 -0700, Jim Lucas wrote: Robert Cummings wrote: ?php echo On Fri, 2008-04-04 at 17:23 -0400, Daniel Brown wrote:\n ? ?php echo Some changes take effect with the PostTrack metrics\n ? ?php echo system with this week (will show up in next week's\n ? ?php echo