Re: [PHP] Malformed UTF-8 Data in JSON [SOLVED]

2010-07-15 Thread Benjamin Hawkes-Lewis
On 15 Jul 2010, at 04:12, Dave M G wrote: Yes, stripslashes() was the problem. I've removed it and the code works. However, it seems that when I send JSON data from a Javascript file, stripslashes() is necessary. That's why I had it there. I'm not entirely sure what's going on there, so

Re: [PHP] How to alter the schema of a database to introduce newfeatures or change the current features

2010-07-15 Thread Pete Ford
On 15/07/10 06:03, Paul M Foster wrote: On Wed, Jul 14, 2010 at 09:28:53PM -0700, Slith One wrote: I'm developing an app using Zend Framwork using Git for version control. What is the best approach for updating the schema and the database when one of us makes an update to the db structure?

Re: [PHP] How to alter the schema of a database to introduce newfeatures or change the current features

2010-07-15 Thread Ashley Sheridan
On Thu, 2010-07-15 at 09:07 +0100, Pete Ford wrote: On 15/07/10 06:03, Paul M Foster wrote: On Wed, Jul 14, 2010 at 09:28:53PM -0700, Slith One wrote: I'm developing an app using Zend Framwork using Git for version control. What is the best approach for updating the schema and the

Re: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Pete Ford
On 15/07/10 09:14, Ashley Sheridan wrote: ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin produces when you make the changes in there. Thanks, Ash http://www.ashleysheridan.co.uk Yeah, scripting ALTER TABLE commands ... :) -- Peter Ford, Developer

Re: [PHP] Problem when adding special characters to an XML file

2010-07-15 Thread te0t3l
Hi again, Now I download the editing XML file and open it in windows with notepad and save with utf-8 encode, then upload the file again and can see the correct characters, what's the problem? I'm specifying the correct encoding when process the form and editing the XML file: $XML = new

Re: [PHP] Problem when adding special characters to an XML file

2010-07-15 Thread Richard Quadling
On 15 July 2010 12:01, te0t3l te0...@gmail.com wrote: Hi again, Now I download the editing XML file and open it in windows with notepad and save with utf-8 encode, then upload the file again and can see the correct characters, what's the problem? I'm specifying the correct encoding when

[PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed the postgresql php module and mdb2 driver. Restarted the web

RE: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Bob McConnell
From: Pete Ford On 15/07/10 09:14, Ashley Sheridan wrote: ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin produces when you make the changes in there. Yeah, scripting ALTER TABLE commands ... :) We maintain two files for every schema, site_schema.pgsql and

Re: [PHP] How to alter the schema of a database to introducenewfeatures or change the current features

2010-07-15 Thread Richard Quadling
On 15 July 2010 13:29, Bob McConnell r...@cbord.com wrote: From: Pete Ford On 15/07/10 09:14, Ashley Sheridan wrote: ALTER TABLE is the way to go. If in doubt, look at the SQL phpMyAdmin produces when you make the changes in there. Yeah, scripting ALTER TABLE commands ... :) We maintain

Re: [PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
Michael A. Peters wrote: I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed the postgresql php module and mdb2

Re: [PHP] Problem when adding special characters to an XML file

2010-07-15 Thread te0t3l
Thanks for your offer Richard, but I solved the problem deleting the UTF-8 encoding label in the XML file like this: before: ?xml version=1.0 encoding=utf-8? label/label after: ?xml version=1.0?

[PHP] set different .htaccess rules

2010-07-15 Thread Dušan Novaković
Hello all, I have problem with protecting files inside of folder. So, I have one folder with files inside and the idea is to be able to see those files (format is not important) only when you are logged in system. I can't use solutions like to set some wierd name so that actually user is hardly

[PHP] Recent Influx of Unrelated Discussions

2010-07-15 Thread Daniel Brown
Also known as off-topic posts. We're all guilty of them, but has anyone recently noticed that there is a significant number (about 35% of all traffic) that is off-topic? There have been questions on databases, JavaScript, WordPress, Apache directives, and more none of which were even

Re: [PHP] Stumped - MDB2 pgsql

2010-07-15 Thread Michael A. Peters
Michael A. Peters wrote: Michael A. Peters wrote: I need to switch from MySQL (where everything is peachy) to Postgresql - reason I need to switch is I need to use PostGIS and I don't see a need to run two databases. I got Postgresql installed (stock CentOS / RHEL 5) and installed the

[PHP] user login and access + headers already sent

2010-07-15 Thread Carlos Sura
Hello mates, I'm developing a user registration and access level system... And I wonder... Is there any way to avoid to put code in every header page? Because, almost every page contains javascript, so almost every page cotains html tags... And its annoying to look at this: Warning:

Re: [PHP] user login and access + headers already sent

2010-07-15 Thread Richard Quadling
On 15 July 2010 16:38, Carlos Sura carlos_s...@hotmail.com wrote: Hello mates, I'm developing a user registration and access level system... And I wonder... Is there any way to avoid to put code in every header page? Because, almost every page contains javascript, so almost every page cotains

Re: [PHP] user login and access + headers already sent

2010-07-15 Thread kranthi
i prefer using a template engine like smarty http://www.smarty.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Determining the similarity between a user supplied short piece of text (between 5 and 15 characters) and a list of similar length text items.

2010-07-15 Thread Richard Quadling
Hi. It seems that users cannot enter a vehicle registration 100% accurately. We have recently released a small mobile web app which allows service engineers/inspectors to enter a vehicle registration number and a pin number to get service history for the vehicle. We are getting around a 40%

Re: [PHP] user login and access + headers already sent

2010-07-15 Thread Ashley Sheridan
On Thu, 2010-07-15 at 15:38 +, Carlos Sura wrote: Hello mates, I'm developing a user registration and access level system... And I wonder... Is there any way to avoid to put code in every header page? Because, almost every page contains javascript, so almost every page cotains html

RE: [PHP] user login and access + headers already sent

2010-07-15 Thread Carlos Sura
Hello Richard, Thank you for your answer, I'm looking now... Kranthi, seems to be a pretty good solution, I will give it a try. Thank you. From: kranthi...@gmail.com Date: Thu, 15 Jul 2010 21:24:15 +0530 To: rquadl...@googlemail.com CC: carlos_s...@hotmail.com;

[PHP] integrating lib (C++) into php

2010-07-15 Thread Tom Sparks
I have found lib that looks like it dose what i need How do I integrating this lib into php? dose php support C++ libs? http://libnoise.sourceforge.net/tutorials/tutorial1.html#gcc tom_a_sparks Light travels faster then sound, which is why some people appear bright, until you hear them speak

Re: [PHP] Determining the similarity between a user supplied short piece of text (between 5 and 15 characters) and a list of similar length text items.

2010-07-15 Thread Ashley Sheridan
On Thu, 2010-07-15 at 16:54 +0100, Richard Quadling wrote: Hi. It seems that users cannot enter a vehicle registration 100% accurately. We have recently released a small mobile web app which allows service engineers/inspectors to enter a vehicle registration number and a pin number to

Re: [PHP] Determining the similarity between a user supplied short piece of text (between 5 and 15 characters) and a list of similar length text items.

2010-07-15 Thread Daniel P. Brown
On Thu, Jul 15, 2010 at 11:54, Richard Quadling rquadl...@gmail.com wrote: I'm looking for is a way to compare what they've entered against a known list and to provide my 10 best guesses. Look into the following functions and families: levenshtein() similar_text() You

Re: [PHP] integrating lib (C++) into php

2010-07-15 Thread Daniel P. Brown
On Thu, Jul 15, 2010 at 12:02, Tom Sparks tom_a_spa...@yahoo.com.au wrote: I have found lib that looks like it dose what i need How do I integrating this lib into php? dose php support C++ libs? http://libnoise.sourceforge.net/tutorials/tutorial1.html#gcc You could build it as an

Re: [PHP] integrating lib (C++) into php

2010-07-15 Thread shiplu
Sure. All you have to do is write a php extension. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List

Re: [PHP] user login and access + headers already sent

2010-07-15 Thread Paul M Foster
On Thu, Jul 15, 2010 at 04:56:50PM +0100, Ashley Sheridan wrote: On Thu, 2010-07-15 at 15:38 +, Carlos Sura wrote: Hello mates, I'm developing a user registration and access level system... And I wonder... Is there any way to avoid to put code in every header page? Because, almost

RE: [PHP] user login and access + headers already sent

2010-07-15 Thread Carlos Sura
Hello paul, thank you for your answer. I'm already fixing all my mess with your suggestions. It is nice to know where to ask to get a good answer. Regards, Carlos Sura. Date: Thu, 15 Jul 2010 12:22:23 -0400 From: pa...@quillandmouse.com To: php-general@lists.php.net Subject: Re:

RE: [PHP] set different .htaccess rules

2010-07-15 Thread Tommy Pham
-Original Message- From: Dušan Novaković [mailto:ndu...@gmail.com] Sent: Thursday, July 15, 2010 7:46 AM To: php-general@lists.php.net Subject: [PHP] set different .htaccess rules Hello all, I have problem with protecting files inside of folder. So, I have one folder with files

[PHP] Weird behavior of exec()

2010-07-15 Thread Leonardo
Hi everybody. I need to use exec() to run a background php script, but it's not working properly. Take a look at this sample: a.php ? echo ' File A (1) '; exec('php b.php output.txt '); echo ' File A (2) '; ? b.php ? echo 'File B'; ? output.txt (begins with 64

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 10:51 AM, Leonardo wrote: Hi everybody. I need to use exec() to run a background php script, but it's not working properly. Take a look at this sample: a.php ? echo ' File A (1) '; exec('php b.php output.txt '); echo ' File A (2) '; ? b.php ?

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Leonardo
Em 15/07/2010 18:19, Shawn McKenzie escreveu: On 07/15/2010 10:51 AM, Leonardo wrote: Hi everybody. I need to use exec() to run a background php script, but it's not working properly. Take a look at this sample: a.php ? echo ' File A (1) '; exec('php b.php output.txt');

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Shawn McKenzie
On 07/15/2010 04:40 PM, Leonardo wrote: Bad habit. I know. Did it fix it? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Weird behavior of exec()

2010-07-15 Thread Leonardo
Em 15/07/2010 18:54, Shawn McKenzie escreveu: On 07/15/2010 04:40 PM, Leonardo wrote: Bad habit. I know. Did it fix it? Not really. The server allows short open tags. So, nothing changed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] set different .htaccess rules

2010-07-15 Thread kranthi
i would use a single point of entry to solve this problem 1. keep the files outside your doc root 2. in the php file files.php check for an authorized user, if so allow the user to download the file the path http://site.com/files/we23h4hk234hjksdjrjkl23jfasdf will actually be