[PHP] Re: How to "download" a multi-part file at the "server" side?

2013-11-02 Thread Ajay Garg
I just came across http://www.w3schools.com/php/php_file_upload.asp, and tested it.. It works fine, when the file is uploaded via a form. It does seem that the client-method might indeed play a role. Here is my Java code for uploading the file ::

[PHP] Re: How to upstream code changes to php community

2013-08-12 Thread David Robley
Shahina Rabbani wrote: > Hi, > > I have done some modifications to the php source code and i tested it with > php bench and I observed some improvement. > > I wanted to upstream these code changes to PHP community. > I searched the wed but i didnt find proper guide to upstream the code to > php

[PHP] Re: how to see all sessions sets in server

2013-08-05 Thread Alessandro Pellizzari
Il Sun, 04 Aug 2013 20:47:37 +0430, Farzan Dalaee ha scritto: Please use better quoting. > So best way is use a script(javascript) to send ajax to server every 5 > second to check users is logged in or not? Is that okey? It depends. > I want to write chat module like facebook and i need a solut

Re: [PHP] Re: how to see all sessions sets in server

2013-08-04 Thread Ashley Sheridan
On Sun, 2013-08-04 at 13:27 +0100, Tim Streater wrote: > On 04 Aug 2013 at 11:28, Ashley Sheridan wrote: > > > Like Matijn said, unless you're using some kind of client-side method to > > continually poll the server, you can't know if they've just closed their > > browser. There are Javascript

[PHP] Re: how to see all sessions sets in server

2013-08-04 Thread Tim Streater
On 04 Aug 2013 at 11:28, Ashley Sheridan wrote: > Like Matijn said, unless you're using some kind of client-side method to > continually poll the server, you can't know if they've just closed their > browser. There are Javascript events for exiting a page, but they don't > work correctly on Safa

[PHP] Re: how to see all sessions sets in server

2013-08-04 Thread Alessandro Pellizzari
Il Sun, 04 Aug 2013 13:32:55 +0430, Farzan Dalaee ha scritto: > hi i want to write online user module for my site and i want to check > $_SESSION['userID'] to find all users id who loged in but when i echo > this code its return only current user detail how i can see all > sessions? You can't. >

[PHP] Re: How to delete 3 months old records in my database?

2013-08-02 Thread Jim Giner
On 8/2/2013 6:58 AM, Karl-Arne Gjersøyen wrote: Hello again, folks! I wish to delete records in my database that is older than 3 months. $todays_date = date('Y-m-d'); $old_records_to_delete = ??? if($old_records_to_delete){ include(connect.php); $sql = "DELETE FROM table WHERE date >= '$old_re

[PHP] Re: How to extract php source code from joomla

2013-07-23 Thread Tedd Sperling
On Jul 23, 2013, at 12:15 AM, elk dolk wrote: > I study for MSc degree at university. > > Are you in an advanced class? Ok, congratulations -- you are studying for an MSc -- but that didn't answer the question. So, let me repeat the question: [1] "Are you in an advanced PHP class?" [2] "Or

Re: [PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-02 Thread Tamara Temple
Csanyi Pal wrote: > Tamara Temple writes: > > My ../apache2/conf.d directory is a symlink to the ../conf.d > > directory. This might indeed be the problem. > > Yes. > My system was Debian Squeeze and I just upgraded it to Debian > Wheezy. Some configuration files and directories remains from Squ

[PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-02 Thread Csanyi Pal
Tamara Temple writes: > Csanyi Pal wrote: >> Tamara Temple writes: >> > Csanyi Pal wrote: >> >> It is interesting.. that when I switch to English language for >> >> Moodle installation ( on the web interface ), then I get not this >> >> error, but if I switch back to Hungarian language for ins

Re: [PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-02 Thread Tamara Temple
Csanyi Pal wrote: > Tamara Temple writes: > > Csanyi Pal wrote: > >> It is interesting.. that when I switch to English language for > >> Moodle installation ( on the web interface ), then I get not this > >> error, but if I switch back to Hungarian language for installation, I > >> get it again.

[PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Csanyi Pal
Tamara Temple writes: > Csanyi Pal wrote: >> It is interesting.. that when I switch to English language for >> Moodle installation ( on the web interface ), then I get not this >> error, but if I switch back to Hungarian language for installation, I >> get it again. > > I am completely unfamili

Re: [PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Tamara Temple
Csanyi Pal wrote: > It is interesting.. that when I switch to English language for > Moodle installation ( on the web interface ), then I get not this error, > but if I switch back to Hungarian language for installation, I get it > again. I am completely unfamiliar with Moodle, have no idea what

[PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Csanyi Pal
Tamara Temple writes: > Csanyi Pal wrote: >> I have installed following packages related to this issue: >> curl, libcurl3, libcurl3-gnutls, php5-curl. > > All good. > >> I have in >> /etc/php5/mods-available/curl.ini >> ; configuration for php CURL module >> ; priority=20 >> extension=curl.so >

[PHP] Re: How to enable cURL php extension on Debian Wheezy?

2013-06-01 Thread Csanyi Pal
Adam Szewczyk writes: > On Sat, Jun 01, 2013 at 09:41:33PM +0200, Csanyi Pal wrote: >> Hi, >> >> I just upgraded Squeeze to Wheezy, and have difficulties with cURL PHP >> extension: I can't enable it. >> >> I have installed following packages related to this issue: >> curl, libcurl3, libcurl3-g

Re: [PHP] Re: how to insert html code with PHP

2013-04-11 Thread tamouse mailing lists
On Thu, Apr 11, 2013 at 1:12 PM, Rafnews wrote: > On 11.04.2013 19:19, Jim Giner wrote: >> >> On 4/11/2013 10:48 AM, Rafnews wrote: >>> >>> On 11.04.2013 13:34, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently n

Re: [PHP] Re: how to insert html code with PHP

2013-04-11 Thread Rafnews
On 11.04.2013 19:19, Jim Giner wrote: On 4/11/2013 10:48 AM, Rafnews wrote: On 11.04.2013 13:34, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently named. i need in each page to find a particular tag, let's say ... (so based on its I

[PHP] Re: how to insert html code with PHP

2013-04-11 Thread Jim Giner
On 4/11/2013 10:48 AM, Rafnews wrote: On 11.04.2013 13:34, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently named. i need in each page to find a particular tag, let's say ... (so based on its ID and tagname) and inside it to insert

[PHP] Re: how to insert html code with PHP

2013-04-11 Thread Rafnews
On 11.04.2013 13:34, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently named. i need in each page to find a particular tag, let's say id="#submenu">... (so based on its ID and tagname) and inside it to insert my PHP/HTML code. how

Re: [PHP] Re: how to insert html code with PHP

2013-04-11 Thread Rafnews
On 11.04.2013 14:14, Jim Giner wrote: On 4/11/2013 7:34 AM, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently named. i need in each page to find a particular tag, let's say ... (so based on its ID and tagname) and inside it to insert

[PHP] Re: how to insert html code with PHP

2013-04-11 Thread Jim Giner
On 4/11/2013 7:34 AM, Rafnews wrote: Hi, I would like to insert a piece of HTML code inside several pages. all pages are differently named. i need in each page to find a particular tag, let's say ... (so based on its ID and tagname) and inside it to insert my PHP/HTML code. how can i do that ?

Re: [PHP] Re: How to limit source IP in PHP

2012-09-18 Thread Tonix (Antonio Nati)
Il 18/09/2012 16:24, Daniel Brown ha scritto: On Tue, Sep 18, 2012 at 9:15 AM, Ian wrote: Hi Curtis, I am suffering from sleep deprivation due to a new family addition and I fail to see how your code will prevent a malicious user from binding to an IP that I do not want him to. It appears to

Re: [PHP] Re: How to limit source IP in PHP

2012-09-18 Thread Daniel Brown
On Tue, Sep 18, 2012 at 9:15 AM, Ian wrote: > > Hi Curtis, > > I am suffering from sleep deprivation due to a new family addition and I > fail to see how your code will prevent a malicious user from binding to > an IP that I do not want him to. It appears to be an example of how to > bind to an I

[PHP] Re: How to limit source IP in PHP

2012-09-18 Thread Ian
On 14/09/2012 20:08, Curtis Maurand wrote: > On 9/14/2012 7:20 AM, Ian wrote: >> On 12/09/2012 14:53, Tonix (Antonio Nati) wrote: >>> Is there a way to force a PHP script to bind to a prefixed IP? >>> >>> Actually, while you can assign more IPs to Apache for listening, >>> assigning domains to spec

Re: [PHP] Re: How to limit source IP in PHP

2012-09-14 Thread Curtis Maurand
On 9/14/2012 7:20 AM, Ian wrote: On 12/09/2012 14:53, Tonix (Antonio Nati) wrote: Is there a way to force a PHP script to bind to a prefixed IP? Actually, while you can assign more IPs to Apache for listening, assigning domains to specific IPs, it looks like any PHP script can freely choose whi

[PHP] Re: How to limit source IP in PHP

2012-09-14 Thread Ian
On 12/09/2012 14:53, Tonix (Antonio Nati) wrote: > > Is there a way to force a PHP script to bind to a prefixed IP? > > Actually, while you can assign more IPs to Apache for listening, > assigning domains to specific IPs, it looks like any PHP script can > freely choose which IP to bind. Instead

Re: [PHP] Re: How to use wsdl files?

2012-08-31 Thread Louis Huppenbauer
Hi there 2012/8/31 Michelle Konzack > Hello Matijn Woudt, > > Am 2012-08-30 16:44:53, hacktest Du folgendes herunter: > > You could start by looking at the PHP SoapClient [1], which takes a > > URI to a WSDL descriptor as argument. You can enter the URL to the > > WSDL file there, like this: > >

[PHP] Re: How to use wsdl files?

2012-08-30 Thread Michelle Konzack
Hello Matijn Woudt, Am 2012-08-30 16:44:53, hacktest Du folgendes herunter: > You could start by looking at the PHP SoapClient [1], which takes a > URI to a WSDL descriptor as argument. You can enter the URL to the > WSDL file there, like this: > $client = new > SoapClient("http://ec.europa.eu/ta

Re: [PHP] Re: How to best set per-site PHP session storage under suPHP/WordPress?

2012-08-13 Thread Philip Amadeo Saeli
* Ian [2012-08-13 09:50:51 +0100]: > On 13/08/2012 06:01, Philip Amadeo Saeli wrote: > > I'm administering WordPress sites under suPHP on a CentOS LAMP server > > and would like to know how I can set PHP to keep the session files under > > the WP user's dir without having do duplicate the entire p

[PHP] Re: How to best set per-site PHP session storage under suPHP/WordPress?

2012-08-13 Thread Ian
On 13/08/2012 06:01, Philip Amadeo Saeli wrote: > I'm administering WordPress sites under suPHP on a CentOS LAMP server > and would like to know how I can set PHP to keep the session files under > the WP user's dir without having do duplicate the entire php.ini file > for each WP site while still m

[PHP] Re: How to write and read serial or parallel port

2012-07-27 Thread Ian
On 26/07/2012 13:37, Alex Nikitin wrote: > Real question is > why in the world would you want to use PHP for this to begin with. Hi, I cannot speak for the OP, but personally I am doing this so I can hook up to a web application and re-use existing code. Regards Ian -- -- PHP General M

[PHP] Re: How to write and read serial or parallel port

2012-07-26 Thread Ian
On 26/07/2012 11:12, viper wrote: > hi all! > > is it possible to write and read data on a COM or LPT port? > is there any function or class in PHP? > > anyone has already done something similar? > > thanks, > viper > Hi, There is a class here: php-serial http://code.google.c

[PHP] Re: how to walk async recursively over an object, doing work (in right order) per leaf

2012-06-14 Thread rene7705
oops; printNextLevel : function (pvCmd) { if ( typeof pvCmd.val == 'object' && typeof pvCmd.val.hmStats == 'object' && typeof pvCmd.val.hmData == 'object' ) { //if (pvCmd.keyValueName && pvCmd.keyValueName!='')

[PHP] Re: how to walk async recursively over an object, doing work (in right order) per leaf

2012-06-14 Thread rene7705
I think I've got it figured out now.. My solution is to async build up a flat list of items (from the recursive object) to process first, then do another async loop (which I'll build soon) to do the work per item, and when that's done, replace the placeholder with the result. This code works on a

Re: [PHP] Re: How to send XML requests from PHP?

2012-05-09 Thread ma...@behnke.biz
Michelle Konzack hat am 8. Mai 2012 um 20:25 geschrieben: > Hello Jim Lucas, > > Am 2012-05-08 11:08:13, hacktest Du folgendes herunter: > > Look into cURL http://php.net/curl > > I know "curl" but I do not know, HOW to send the XML stuff. $ch = curl_init (); curl_setopt ( $ch , CURLOPT_URL

Re: [PHP] Re: How to send XML requests from PHP?

2012-05-08 Thread Jim Lucas
On 05/08/2012 11:25 AM, Michelle Konzack wrote: Hello Jim Lucas, Am 2012-05-08 11:08:13, hacktest Du folgendes herunter: Look into cURL http://php.net/curl I know "curl" but I do not know, HOW to send the XML stuff. The XML code is generated using a temp file for logging, which mean, I can

[PHP] Re: How to send XML requests from PHP?

2012-05-08 Thread Michelle Konzack
Hello Jim Lucas, Am 2012-05-08 11:08:13, hacktest Du folgendes herunter: > Look into cURL http://php.net/curl I know "curl" but I do not know, HOW to send the XML stuff. The XML code is generated using a temp file for logging, which mean, I can see any changes on the system... Thanks, Greetin

[PHP] Re: How to use a variable variable in an array walk?

2011-12-13 Thread Al
On 12/13/2011 5:43 PM, Nils Leideck wrote: Anyone?:-( is my description too unclear? On 11.12.2011, at 11:25, Nils Leideck wrote: this is my first post to the PHP general list. I have an issue with a variable variable (http://php.net/manual/en/language.variables.variable.php) My use c

[PHP] Re: How to use a variable variable in an array walk?

2011-12-13 Thread Nils Leideck
Anyone?:-( is my description too unclear? On 11.12.2011, at 11:25, Nils Leideck wrote: > this is my first post to the PHP general list. > I have an issue with a variable variable > (http://php.net/manual/en/language.variables.variable.php) > > My use case: > > I have an array called $myAr

[PHP] Re: how to use echo checkboxes in php when i don't have access to $_POST

2011-05-28 Thread Negin Nickparsa
i mean my tables in Mysql

[PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-28 Thread Mitch
On 4/14/2011 6:16 PM, Mikhail S wrote: How to write a PHP coding to list out all files and directories as links to them? This is somewhat similar to some index pages. When new file or folder is added to the directory, HTML page should display the newly created file/folder together with previous

Re: [PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-16 Thread Ashley Sheridan
On Sat, 2011-04-16 at 15:02 -0500, Shawn McKenzie wrote: > On 04/14/2011 06:16 PM, Mikhail S wrote: > > How to write a PHP coding to list out all files and directories as links to > > them? > > > > This is somewhat similar to some index pages. When new file or folder is > > added to the directory

[PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-16 Thread Shawn McKenzie
On 04/14/2011 06:16 PM, Mikhail S wrote: > How to write a PHP coding to list out all files and directories as links to > them? > > This is somewhat similar to some index pages. When new file or folder is > added to the directory, HTML page should display the newly created > file/folder together wi

[PHP] Re: How to write a PHP coding to list out all files and directories as links to them?

2011-04-14 Thread David Robley
Mikhail S wrote: > How to write a PHP coding to list out all files and directories as links > to them? > > This is somewhat similar to some index pages. When new file or folder is > added to the directory, HTML page should display the newly created > file/folder together with previous ones after

[PHP] Re: How to send a GPG signed EMail with a PDF attached?

2010-12-29 Thread Michelle Konzack
Hello Tommy Pham, Am 2010-12-29 10:38:39, hacktest Du folgendes herunter: > Phpclasses.org naturally may not have all possible solutions. Thus, the > existence of search engines like google. Try keywords 'php mime encode > gpg'. Already done and it returns 56.000 results where the first 500

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Shawn McKenzie
On 09/12/2010 02:38 AM, Tamara Temple wrote: > > On Sep 11, 2010, at 10:46 PM, Shawn McKenzie wrote: >> It could however be a problem if there is a BOT or something that >> continually submits to your page. In that case (and in general) I would >> recommend using a form token that helps guard aga

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-12 Thread Tamara Temple
On Sep 11, 2010, at 10:46 PM, Shawn McKenzie wrote: It could however be a problem if there is a BOT or something that continually submits to your page. In that case (and in general) I would recommend using a form token that helps guard against this. I've seen this on some sites, but I'm un

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread Shawn McKenzie
On 09/11/2010 11:52 AM, Tamara Temple wrote: > I have a general question and am looking for best practices. > > Suppose I present a user with a form for editing an entry in a table, > i.e., the form has filled in values from the existing table entry. > > Now, suppose they click on 'submit' withou

[PHP] Re: How to set socket_read time out

2010-07-19 Thread Gary .
On Mon, Jul 19, 2010 at 9:45 AM, Gary wrote: > How can I get calls to scoket_read to timeout if the server stops > responding? Sorry. Found it: socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array('sec' => 1, 'usec' => 0)); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] Re: how to use HTML Symbol Entities with mail() ?

2010-07-06 Thread cr.vegelin
From: Ashley Sheridan To: Manuel Lemos Cc: cr.vege...@gmail.com ; php-general@lists.php.net Sent: Saturday, July 03, 2010 1:22 PM Subject: Re: [PHP] Re: how to use HTML Symbol Entities with mail() ? On Fri, 2010-07-02 at 22:58 -0300, Manuel Lemos wrote: Hello, on 07/01/2010 10:34

Re: [PHP] Re: how to use HTML Symbol Entities with mail() ?

2010-07-03 Thread Ashley Sheridan
On Fri, 2010-07-02 at 22:58 -0300, Manuel Lemos wrote: > Hello, > > on 07/01/2010 10:34 AM cr.vege...@gmail.com said the following: > > Hi List, > > > > I am working on generated emails, using the mail() function. > > Works fine, but when including characters like ∧ (= ∧) or ∨ > > (= ∨) > > in

[PHP] Re: how to use HTML Symbol Entities with mail() ?

2010-07-02 Thread Manuel Lemos
Hello, on 07/01/2010 10:34 AM cr.vege...@gmail.com said the following: > Hi List, > > I am working on generated emails, using the mail() function. > Works fine, but when including characters like ∧ (= ∧) or ∨ (= > ∨) > in the message, these characters are displayed as ? in the emails. > > Snipp

[PHP] Re: how to update array keys and keep element order ?

2010-05-21 Thread Al
On 5/21/2010 5:56 AM, cr.vege...@gmail.com wrote: How do I update an array key without disturbing the element order ? Suppose an existing array("FR", values ...) where I want to change 0 => "FR" to "country" => "FR" and keep the original element order. TIA, Cor I short on time; but, it se

[PHP] Re: How to prevent duplicate record insertion after refreshing php page

2010-05-19 Thread Nathan Rixham
Deva wrote: Hi, If I do refresh after submission of a form, records are getting stored multiple times. I have two pages. /submission-form/ and /thank-you/ I was trying header('Location: /thank-you/'); on submission-form page after successful validation and insertion into db. Still if I do refres

Re: [PHP] Re: how to overload accessible methods

2010-04-16 Thread Ryan Sun
thanks for all your reply, since all these classes have main entry in cron.php, I have moved validation there. Richard, your solution seems interesting, maybe I can use it later :) On Thu, Apr 15, 2010 at 4:46 AM, Richard Quadling wrote: > On 13 April 2010 17:25, Ryan Sun wrote: >> this is a cla

Re: [PHP] Re: how to overload accessible methods

2010-04-15 Thread Richard Quadling
On 13 April 2010 17:25, Ryan Sun wrote: > this is a class for corntab job, and the validation is very simple, > just check if the status of user is active when cron job runs, if not, > throws an exception, other developers won't want to overwrite this > validation. > which method of user class wil

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Ryan Sun
this is a class for corntab job, and the validation is very simple, just check if the status of user is active when cron job runs, if not, throws an exception, other developers won't want to overwrite this validation. which method of user class will be called is configurable via website backed page

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Nathan Rixham
Ryan Sun wrote: > I'm writing an abstract parent class which only contain a validate > method, other developers will extend this class and add many new > public methods, every new methods will need to perform a validate > first. Won't it be good if validate get called automatically before > every

Re: [PHP] Re: how to overload accessible methods

2010-04-13 Thread Ashley Sheridan
On Tue, 2010-04-13 at 12:03 -0400, Ryan Sun wrote: > I'm writing an abstract parent class which only contain a validate > method, other developers will extend this class and add many new > public methods, every new methods will need to perform a validate > first. Won't it be good if validate get

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Ryan Sun
I'm writing an abstract parent class which only contain a validate method, other developers will extend this class and add many new public methods, every new methods will need to perform a validate first. Won't it be good if validate get called automatically before every method call so that they d

[PHP] Re: how to overload accessible methods

2010-04-13 Thread Nathan Rixham
Ryan Sun wrote: > As we all know, __call() can overload non-accessible methods, > eg. > Class User > { > public function __call($name, $args) > { > //validate user > $this->_validate(); > > $this->_{$name}($args); > } > private function _validate() >

[PHP] Re: how to get the local time

2010-03-15 Thread Gary
You should be able to get the local time for Sweden by adding However, I dont know about getting the local time of someone visiting from a different time zone. gary "saeed ahmed" wrote in message news:b10025e1003151310j483caed1mef9ec76874a53...@mail.gmail.com... > hi friends, > > I'm tryin

[PHP] Re: How to change a filename for download (e.g. jpeg, pdf etc.)

2010-01-25 Thread Richard
Hi, > Can anyone point me to tutorials on how to change a filename for each > download? My goal is to give the downloader a random name for a picture or a > document, so he will never know what the original filename is. Try adding a Content-Disposition header: -- Richard Heyes HTML5 canvas gra

[PHP] Re: how to retrieve a dom from innerHTML......

2010-01-20 Thread Pete Ford
I am on the top of the world! Borlange University wrote: hello, i can obnot retrieve a select ject from div innerHTML. what i want to do is that when a page is loaded, first selector,say #1, would be shown in the first div by sending a request.then i choose one option from #1, fire change event o

[PHP] Re: How to make the PHP know the real SCRIPT_FILENAME?

2009-11-17 Thread Dong Wang
ur... you mean use this in the php script? but the php-cgi still doesn't know which scriptfile to execute, isn't it? php-cgi tries to find the aimed script using SCRIPT_FILENAME, but this variable is changed by the mod_proxy_fcgi, so php-cgi can not find the real scriptfile, that's the point, I th

[PHP] Re: How to call DLL in Javascript

2009-11-17 Thread Nathan Rixham
Peter wrote: > Hi All, > > I want to call dll in javascript > > I tried the following script, but i got the error message 'ActiveXObject > is undefined' > (Note : i have the feedback.dll in the same path only) > > > > > > function comEventOccured() > { > >try{ >var myobject; >

[PHP] Re: How to make the PHP know the real SCRIPT_FILENAME?

2009-11-17 Thread Nathan Rixham
Dong Wang wrote: > I am trying to use PHP as backend, which communicate with apache-2.3's > mod_proxy_fcgi > > But I have noticed that the SCRIPT_FILENAME has been changed to > "proxy:balancer://xx", it cann't be recognized by the remote PHP > backend. So the request failed. > In my opinion,

[PHP] Re: How to create CA certificate with PHP

2009-11-12 Thread Tanveer Chowdhury
thank you. I will have a look at it and will come up if any question. On Wed, Nov 11, 2009 at 11:47 PM, Manuel Lemos wrote: > Hello, > > on 11/10/2009 08:28 PM Tanveer Chowdhury said the following: >> Hello all, >> >> Using openssl, I can create CA certificate by using the linux command line. >>

[PHP] Re: How to create CA certificate with PHP

2009-11-11 Thread Manuel Lemos
Hello, on 11/10/2009 08:28 PM Tanveer Chowdhury said the following: > Hello all, > > Using openssl, I can create CA certificate by using the linux command line. > > But this thing I want to do using PHP that is I want to add some information > in the openldap regarding a user and also would like

[PHP] Re: how to replace many spaces with one space?

2009-10-25 Thread Al
Jeffry Lunggot wrote: Hi, how to replace many spaces in any string of character with one space? Regrads Be careful about the word "spaces" do you mean exactly " "; or white spaces defined by "\s", which include spaces, tabs CRLFs. If you want specifically spaces and not all white spac

Re: [Fwd: Re: [PHP] Re: How to take output from an include, and embed it into a variable?]

2009-09-25 Thread Robert Cummings
Carl Furst wrote: You mean like this ? $file string = file_get_contents(urlencode($file_path)); $result = eval($file_string); ?> Well I see a few problems with this. One is that scope is not lexical. In other words if $foo exist

[Fwd: Re: [PHP] Re: How to take output from an include, and embed it into a variable?]

2009-09-25 Thread Carl Furst
<mailto:hp...@xentra.ro>] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net <mailto:php-general@lists.php.net> Subject: [PHP] Re: How to take output from an

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-25 Thread Phpster
is the actual source of the document. Not the data the script would output when ran. The ob_* functions are the only way that I know of to do what you are asking -Original Message- From: Puiu Hrenciuc [mailto:hp...@xentra.ro] Sent: Wednesday, September 23, 2009 1:36 PM To: php-g

Re: Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-25 Thread Geert Tapperwijn
hp.net/function.fopen >>>>> >>>>> worth trying. Easier than output buffering >>>>> >>>>> >>>>> >>>> This would not work. fopen would open the file for read. What you >>>> would be >>>> read

Re: Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-24 Thread Carl Furst
pt would output when ran. The ob_* functions are the only way that I know of to do what you are asking -Original Message- From: Puiu Hrenciuc [mailto:hp...@xentra.ro] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net Subject: [PHP] Re: How to take output from

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Jim Lucas
d not work. fopen would open the file for read. What you would be >> reading is the actual source of the document. Not the data the script would >> output when ran. >> >> The ob_* functions are the only way that I know of to do what you are asking >> >>> ---

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Ben Dunlap
> $file = 'invoicetable_bottom.php'; > fopen("http://yoursite.com/folder/$file","r";); > > http://tr.php.net/function.fopen > > worth trying. Easier than output buffering Easier in what sense? It would end up requiring more code than output-buffering because you'd have to read from the file after

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Ashley Sheridan
uld be > reading is the actual source of the document. Not the data the script would > output when ran. > > The ob_* functions are the only way that I know of to do what you are asking > > > -Original Message- > > From: Puiu Hrenciuc [mailto:hp...@xentra.ro]

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Jim Lucas
way that I know of to do what you are asking > -Original Message- > From: Puiu Hrenciuc [mailto:hp...@xentra.ro] > Sent: Wednesday, September 23, 2009 1:36 PM > To: php-general@lists.php.net > Subject: [PHP] Re: How to take output from an include, and embed it into a > va

RE: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Mert Oztekin
utput buffering -Original Message- From: Puiu Hrenciuc [mailto:hp...@xentra.ro] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net Subject: [PHP] Re: How to take output from an include, and embed it into a variable? Hi, The simplest way (actually the single way I kno

[PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Puiu Hrenciuc
Hi, The simplest way (actually the single way I know :) ) would be to capture the output using output buffering functions, something like this: // start output buffering ob_start(); // include the file that generates the HTML (or whatever content) include ""; // get output buffer content $

[PHP] Re: how to strip empty lines out of a txt using preg_replace()

2009-09-04 Thread Clancy
On Fri, 4 Sep 2009 14:58:55 +0200, ralph_def...@yahoo.de ("Ralph Deffke") wrote: >Hi all, I'm a bit under stress, maybe somebody knows the regex on a snap. >using PHP_EOL would be great. Here is a function which works for files pasted from browser screens: function clean_up($dirty_file)

Re: [PHP] Re: How to output a NULL field?

2009-08-27 Thread Martin Scotta
l@lists.php.net; David Stoltz > Subject: Re: [PHP] Re: How to output a NULL field? > > > One option then, might be to format the result with SQL using a CASE > WHEN THEN statement or ISNULL / IFNULL to set it to empty string > > -- > > Bastien > > Cat, the

RE: [PHP] Re: How to output a NULL field?

2009-08-27 Thread David Stoltz
You're a genius - that works! -Original Message- From: Bastien Koert [mailto:phps...@gmail.com] Sent: Wednesday, August 26, 2009 2:02 PM To: Andrew Ballard Cc: Shawn McKenzie; php-general@lists.php.net; David Stoltz Subject: Re: [PHP] Re: How to output a NULL field? One o

Re: [PHP] Re: How to output a NULL field?

2009-08-26 Thread Bastien Koert
On Wed, Aug 26, 2009 at 12:06 PM, Andrew Ballard wrote: > On Tue, Aug 25, 2009 at 3:22 PM, Shawn McKenzie wrote: >> First off, if the value is NULL in the database then in PHP it will be >> the string "NULL" and not a null value as far as I remember. > > I've not seen this happen. I've found, depen

Re: [PHP] Re: How to output a NULL field?

2009-08-26 Thread Andrew Ballard
On Tue, Aug 25, 2009 at 3:22 PM, Shawn McKenzie wrote: > First off, if the value is NULL in the database then in PHP it will be > the string "NULL" and not a null value as far as I remember. I've not seen this happen. I've found, depending on the database and the data access library used to interf

[PHP] Re: How to output a NULL field?

2009-08-25 Thread Shawn McKenzie
Shawn McKenzie wrote: > First off, if the value is NULL in the database then in PHP it will be > the string "NULL" and not a null value as far as I remember. Second, > you cant use a function/method in empty(). Thirdly, the string "NULL" > is not empty. I'm not sure what DB class you're using h

[PHP] Re: How to output a NULL field?

2009-08-25 Thread Shawn McKenzie
David Stoltz wrote: > $rs->Fields(22) equals a NULL in the database > > My Code: > > if(empty($rs->Fields(22))){ > $q4 = ""; > }else{ > $q4 = $rs->Fields(22); > } > > Produces this error: > Fatal error: Can't use method return value in write context in > D:\Inetpub\wwwroot\evaluation

[PHP] Re: How to download and configure php mvc website locally

2009-08-22 Thread Shawn McKenzie
Sumit Sharma wrote: > Hi all, > The site I have download was developed using cake php. Now when trying to > access the website it is showing a blank page. As Sudheer suggested I went > to error log and noted down the errors there, which are as follows: > > [Thu Aug 20 14:10:16 2009] [error] [clien

Re: [PHP] Re: How to download and configure php mvc website locally

2009-08-21 Thread Paul M Foster
On Wed, Aug 19, 2009 at 11:00:46PM -1000, Sumit Sharma wrote: > Hi all, > The site I have download was developed using cake php. Now when trying to > access the website it is showing a blank page. As Sudheer suggested I went > to error log and noted down the errors there, which are as follows: >

Re: [PHP] Re: How to download and configure php mvc website locally

2009-08-20 Thread Nitebirdz
On Wed, Aug 19, 2009 at 11:00:46PM -1000, Sumit Sharma wrote: > Hi all, > The site I have download was developed using cake php. Now when trying to > access the website it is showing a blank page. As Sudheer suggested I went > to error log and noted down the errors there, which are as follows: > >

Re: [PHP] Re: How to download and configure php mvc website locally

2009-08-20 Thread Ashley Sheridan
On Wed, 2009-08-19 at 23:00 -1000, Sumit Sharma wrote: > Hi all, > The site I have download was developed using cake php. Now when trying to > access the website it is showing a blank page. As Sudheer suggested I went > to error log and noted down the errors there, which are as follows: > > [Thu A

[PHP] Re: How to download and configure php mvc website locally

2009-08-20 Thread Sumit Sharma
Hi all, The site I have download was developed using cake php. Now when trying to access the website it is showing a blank page. As Sudheer suggested I went to error log and noted down the errors there, which are as follows: [Thu Aug 20 14:10:16 2009] [error] [client 127.0.0.1] File does not exist

RE: [PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ford, Mike
> -Original Message- > From: Ralph Deffke [mailto:ralph_def...@yahoo.de] > Sent: 11 August 2009 01:45 > > u... > try > echo ""; > for( $i=0 ; $i<10; $i++){ > echo "something " . (($a = $a^1) ? "red\n" : "green\n"); > } The ^ operator is one that has an assigning version, so the abov

Re: [PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Adam Randall
age- >> From: Adam Randall [mailto:randa...@gmail.com] >> Sent: Monday, August 10, 2009 6:41 PM >> To: php-general@lists.php.net >> Subject: Re: [PHP] Re: how to say "inverse your value" (to a boolean)? >> >> http://us3.php.net/manual/en/language.operat

RE: [PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Daevid Vincent
://www.youtube.com/watch?v=qItugh-fFgg) > -Original Message- > From: Adam Randall [mailto:randa...@gmail.com] > Sent: Monday, August 10, 2009 6:41 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Re: how to say "inverse your value" (to a boolean)? > &g

Re: [PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Adam Randall
http://us3.php.net/manual/en/language.operators.comparison.php Find "Ternary" on that page. It's a shortened conditional: cond ? true : false Adam. On Mon, Aug 10, 2009 at 6:27 PM, John Butler wrote: >>  echo "something " . (($a = $a^1) ? "red\n" : "green\n"); > > Re: The "?" char in this

Re: [PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread John Butler
echo "something " . (($a = $a^1) ? "red\n" : "green\n"); Re: The "?" char in this line above.. where in the php docs can I read about what that is doing? I have not come across this construct before today, from you guys. thanks -John -- PHP General Mailing List (http://www.php.net/) To u

[PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Ralph Deffke
u... try echo ""; for( $i=0 ; $i<10; $i++){ echo "something " . (($a = $a^1) ? "red\n" : "green\n"); } echo ""; watchout the brackets ! cheers ralph_def...@yahoo.de "John Butler" wrote in message news:52842d6f-dd45-44a6-ae06-2e58ef8f6...@gmail.com... > quick Q: > I have this inside a fore

[PHP] Re: how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Ralph Deffke
with XOR try this $a = 0; echo $a ^ 1; $a = 1; echo $a ^ 1; hope that helps ralph ralph_def...@yahoo.de "John Butler" wrote in message news:52842d6f-dd45-44a6-ae06-2e58ef8f6...@gmail.com... > quick Q: > I have this inside a foreach{} that I want to alternate between on > and off so I can alte

  1   2   3   4   5   6   7   8   9   >