Re: [PHP] static Logging class?

2013-03-03 Thread Lars Nielsen
Thanks a lot Larry! This PSR-3 looks just the way to do such things! :-) I hope i chat with you at DrupalCon Praha! http://www.linkedin.com/profile/view?id=18644639 Best regards Lars Nielsen > Make a real classed object that you pass to various objects that need > it. Otherwise you mak

[PHP] static Logging class?

2013-03-03 Thread Lars Nielsen
just want to log to a file) Best regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Friday - Return of Brain Teasers

2012-10-07 Thread Lars Nielsen
have you includefiles in the $cowbell array and then require the next one! ;-) -- Lars Nielsen LFWeb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Easiest way to create a web service based on a WSDL document

2012-08-31 Thread Lars Nielsen
http://www.php.net/manual/en/soapserver.soapserver.php Best Regards Lars Nielsen www.lfweb.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Performance / AB issue?

2012-05-15 Thread Lars Nielsen
> >> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg >> wrote: >>> >>> >>> Sent from my iPhone 5 Beta [Confidential use only] >>> >>> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >>> >>>> >>

Re: [PHP] Performance / AB issue?

2012-05-15 Thread Lars Nielsen
> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg > wrote: >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >> >>> >>>> >>>> On 10 mei 2012, at

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Lars Nielsen
> On Fri, May 11, 2012 at 9:53 AM, Camilo Sperberg > wrote: >> >> >> Sent from my iPhone 5 Beta [Confidential use only] >> >> On 11 mei 2012, at 07:09, "Lars Nielsen" wrote: >> >>> >>>> >>>> On 10 mei 2012, at

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Lars Nielsen
> > On 10 mei 2012, at 23:26, Lars Nielsen wrote: > >> >>> >>> >>> Sent from my iPhone 5 Beta [Confidential use only] >>> >>> On 10 mei 2012, at 17:40, Matijn Woudt wrote: >>> >>>> On Thu, May 10, 2012 at 9:04 AM, L

Re: [PHP] Performance / AB issue?

2012-05-10 Thread Lars Nielsen
> > > Sent from my iPhone 5 Beta [Confidential use only] > > On 10 mei 2012, at 17:40, Matijn Woudt wrote: > >> On Thu, May 10, 2012 at 9:04 AM, Lars Nielsen wrote: >>> Hi there, >>> >>> I have apache-2.22/php 5.3.10 set up on a dedicated se

[PHP] Performance / AB issue?

2012-05-10 Thread Lars Nielsen
apache. If I stress-test the site with : ab -c 50 -n 1500 http://sitename/static.html it works fine. I have set apache's errorlog to debug. But it writes nothing, either in the virtualhost or in the server-file. Can anyone give a hint about what can be wrong? Best regards LFWeb Lars Ni

Re: [PHP] SOAP

2012-01-17 Thread lars
Hey there, If you are running php5 then ot is relativly easy to use the SoapClient object. It also supports ssl. Look it up in the phpmanual. Regards Lars Nielsen > Hello! > > > > I am looking for some help on Web Services (SOAP) client. > > > > Is there anyone here

Re: [PHP] Zend Amf and Drupal?

2011-10-30 Thread Lars Nielsen
d PHP/Drupal? Regards Lars Nielsen lør, 29 10 2011 kl. 12:53 +0200, skrev Lars Nielsen: > Hey List, > > I am making a webservice in Drupal with AMF Zend to provide some methods > to a Flash app. I have now managed to use standard Drupal services > (node,user and files) and I have m

[PHP] Zend Amf and Drupal?

2011-10-29 Thread Lars Nielsen
says that it expects zero arguments but I have provided 4 arguments. I have posted some info here : http://drupal.org/node/1323678 Can you give me some guidelines? or pointers on what to do? Kind Regards Lars Nielsen www.lfweb.dk / www.gearworks.dk -- PHP General Mailing List (http://www.php.net

Re: [PHP] starting php by asking basic questions

2011-10-16 Thread Lars Nielsen
nual/en/getting-started.php which gives a basic introduction to php-concepts. What is you preferred spoken language? Try to google for "php basic tutorial" or "php getting started". Try somthing similar in you own language. Regards Lars www.lfweb.dk -- PHP General Mailing L

Re: [PHP] Generate CMS based on database schema

2011-09-30 Thread Lars Nielsen
webinterface build on top of drush to provide a gui to manage installations and configurations. Regards Lars fre, 30 09 2011 kl. 14:35 -0400, skrev Marc Guay: > Howdy, > > I'm looking for a FOSS equivalent to PHPMaker, or at least something > which comes close to it. For those w

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

2011-05-28 Thread Lars Nielsen
ot;$row[0]"; > echo""; > }//for > echo""; > }//if > > i can't use $_POST because it's not in html > how can i insert my items that are checked into table? Hey, You are generating HTML output from PHP! Right? Then why dont you have access to $_POST ??? /Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Lars Nielsen
n the copyright notice, adding an > additional year the site's up. I'd appreciate some suggestions i'm > very likely overthinking this. > > Thanks. > Dave. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net

[PHP] database abstraction layer

2010-02-02 Thread Lars Nielsen
that I can use the same SQL, or should i make some exceptions? Regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can I get the IP address from a visitor?

2009-12-01 Thread Lars Kristiansson
-orders written on unique files, and to separate them my idea was to baptize files with the IP addresses, which would ive each visitor an unique purchase-order... Any hints to a newbie? Cheers, Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: PHP String convention

2009-11-04 Thread Lars Torben Wilson
2009/11/4 Nathan Rixham : > Nick Cooper wrote: >> >> Hi, >> >> I was just wondering what the difference/advantage of these two >> methods of writing a string are: >> >> 1) $string = "foo{$bar}"; >> >> 2) $string = 'foo'.$bar; > > 1) breaks PHPUnit when used in classes (need to bug report that) > 2)

Re: [PHP] PHP String convention

2009-11-04 Thread Lars Torben Wilson
2009/10/28 Warren Vail : > The curly braces look like something from the smarty template engine. > > Warren Vail Odd. I always thought the curly braces in the Smarty engine looked like something from PHP. :) Torben > -Original Message- > From: Kim Madsen [mailto:php@emax.dk] > Sent:

Re: [PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
lør, 24 10 2009 kl. 12:15 +0200, skrev John Black: > Lars Nielsen wrote: > > Can anyone recommend an IDE with both subversion and ftp integration? > > I have played a little with eclipse but find the integrations a little > > dificult to manage. > > Idealy I want a lo

Re: [PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
Hi, No I have not tryed that yet. Giving it a shot now! :-) Thanks /Lars lør, 24 10 2009 kl. 12:15 +0200, skrev John Black: > Lars Nielsen wrote: > > Can anyone recommend an IDE with both subversion and ftp integration? > > I have played a little with eclipse but find the integr

[PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
. Can anyone give me a hint? Regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to bypass (pipe) curl_exec return value directly to a file?

2009-10-13 Thread Lars Torben Wilson
2009/10/13 Andrea Giammarchi : > >> > curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); >> >> I wouldn't recommend setting this to 0 unless you're very sure that >> the connection will succeed; otherwise, your script will hang >> indefinitely waiting for the connection to be made. > > agreed, it's just

Re: [PHP] How to bypass (pipe) curl_exec return value directly to a file?

2009-10-13 Thread Lars Torben Wilson
2009/10/13 Andrea Giammarchi : > >> $ch = curl_init($url); >> $fp = fopen('/tmp/curl.out', 'w'); >> curl_setopt($ch, CURLOPT_FILE, $fp); >> curl_exec($ch); >> >> Error checking etc. is of course left up to you. :) > > oops, I sent directly the file name. Let me reformulate the code then: > > > set_

Re: [PHP] How to bypass (pipe) curl_exec return value directly to a file?

2009-10-13 Thread Lars Torben Wilson
2009/10/12 m.hasibuan : > Newbie question. > I need to download a very large amount of xml data from a site using CURL. > > How to bypass (pipe) curl_exec return value directly to a file, without > using memory allocation? > > set_time_limit(0); > $ch = curl_init($siteURL); > curl_setopt($ch, CURLO

[PHP] php exception handling

2009-10-11 Thread Lars Nielsen
and then just write eg "An error occurred" or so on the webpage. Can anyone give me a hint about how to achieve this? Regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable name as a variable?

2009-10-05 Thread Lars Torben Wilson
On Mon, 5 Oct 2009 16:56:48 +0200 Dotan Cohen wrote: > I need to store a variable name as a variable. Note quite a C-style > pointer, but a way to access one variable who's name is stored in > another variable. > > As part of a spam-control measure, a certain public-facing form will > have dummy

Re: [PHP] POST without POSTing

2009-09-30 Thread Lars Torben Wilson
On Thu, 1 Oct 2009 00:24:41 -0400 Daniel Brown wrote: > On Thu, Oct 1, 2009 at 00:16, Paul M Foster > wrote: > > > > However, assuming it *wasn't*, I've found the following example > > from a google search (thank goodness for google's "hinting" or I > > couldn't have found it): > > > > $fp = fso

Re: [PHP] POST without POSTing

2009-09-30 Thread Lars Torben Wilson
On Thu, 1 Oct 2009 00:16:27 -0400 Paul M Foster wrote: > On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote: > > > On Wed, Sep 30, 2009 at 23:29, Paul M Foster > > wrote: > > > > > > I'm not sure how to do this. Please no exotic external libraries > > > my shared hosting provider does

Re: [PHP] Issue of upgrading from to 5.x

2009-09-28 Thread Lars Torben Wilson
Chris Streatfield wrote: Here's a little problem I'm just discovering. The issue has been brought to my attention by a couple of my clients when their mail() replies were suddenly turning up with zero variable content. I have several html/php contact/subscribe forms which return a mail reply

[PHP] modules in php?

2009-09-26 Thread Lars Nielsen
Hi, I am developing a cms and I want to make it able to use modules. Ex a statistics module. Can you give som examples or pointers to where i can start reading without getting lost in the details? regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] variable

2009-09-24 Thread Lars Nielsen
Hi Grega I think you might want to have a look at the array's section of the php manual. http://www.php.net/array regards Lars tor, 24 09 2009 kl. 19:10 +0200, skrev Grega Leskovšek: > Suppose I have a variable $i = 0 or 1 or 2 > and I have variables $item0, $item1 and $item2 >

Re: [PHP] Re: Creating file name with $variable

2009-09-21 Thread Lars Torben Wilson
On Mon, 21 Sep 2009 00:43:24 +0200 "Ralph Deffke" wrote: > Hi Haig, > > it would be better if u tell us what purpose u want to solf with this > approuch. Its hard to understand for a prov why u want to create a > filename .php > .php files are scrips containing functions or classes, > called/ins

Re: [PHP] Question: Correcting MySQL's ID colomn when removing an entry

2009-09-20 Thread Lars Torben Wilson
On Sun, 20 Sep 2009 12:07:39 +0430 "Parham Doustdar" wrote: > Hello there, > I'm guessing that when a row in a MySQL table is removed, the ID > colomns of the rows which come after that row are not changed. For > example: 1 2 > 3 > 4 > > Now, if I want to remove the third rows, the ID colomn wou

Re: [PHP] php.ini in cgi vs php.ini in cli

2009-09-15 Thread Lars Torben Wilson
On Tue, 15 Sep 2009 10:11:56 -0400 Andres Gonzalez wrote: > Lars, > > Thank you for your response. The function that raised this error is > from my own > extension module. I was not aware of phpinfo() and your suggestion to > run it helped > me resolve this issue. Turns

Re: [PHP] php.ini in cgi vs php.ini in cli

2009-09-14 Thread Lars Torben Wilson
On Mon, 14 Sep 2009 18:21:11 -0400 Andres Gonzalez wrote: > In the php configurations directories /etc/php5, there are 2 > subdirectories, one for > cgi and one for cli. There is a php.ini file in each of these > directories. > > What would cause a difference of behavior in these 2 environment

Re: [PHP] server name that the user agent used

2009-09-14 Thread Lars Torben Wilson
Tom Worster wrote: On 9/13/09 10:24 PM, "Tommy Pham" wrote: --- On Sun, 9/13/09, Tom Worster wrote: From: Tom Worster Subject: [PHP] server name that the user agent used To: "PHP General List" Date: Sunday, September 13, 2009, 8:21 PM when using apache with one vhost that responds to a fe

Re: [PHP] get an object property

2009-09-13 Thread Lars Torben Wilson
Tom Worster wrote: On 9/13/09 3:21 AM, "Lars Torben Wilson" wrote: On 9/12/09 9:50 AM, "Tom Worster" wrote: but let me give you a more different example: $a and $b are normally both objects, each with various members including a prop q, but sometimes $a is false. i

Re: [PHP] get an object property

2009-09-13 Thread Lars Torben Wilson
Tom Worster wrote: On 9/12/09 9:50 AM, "Tom Worster" wrote: On 9/12/09 1:32 AM, "Lars Torben Wilson" wrote: Tom Worster wrote: if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value o

Re: [PHP] get an object property

2009-09-11 Thread Lars Torben Wilson
Tom Worster wrote: if i have an expression that evaluates to an object, the return value from a function, say, and i only want the value of one of the objects properties, is there a tidy way to get it without setting another variable? to illustrate, here's something that doesn't work, but it wou

Re: [PHP] accessing variable from inside a class

2009-09-04 Thread Lars Nielsen
_get_contents($c->template_dir.$templateFile) : die('Error:Template file '.$template_dir.$templateFile.' not found'); } /Lars fre, 04 09 2009 kl. 14:49 -0700, skrev James Colannino: > Lars Nielsen wrote: > &

[PHP] accessing variable from inside a class

2009-09-04 Thread Lars Nielsen
} I run Fedora 10, apache 2.2.11 and php 5.2.9. I get an error saying that $template_dir is undefined. Regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] safe_mode and inclusion of files don't work as documented

2009-08-31 Thread Lars Torben Wilson
2009/8/31 Nico Sabbi : > Lars Torben Wilson ha scritto: >> Hi Nico, >> >> First the obligatory "safe_mode is deprecated and not recommended" >> speech. . .but I guess you've already seen that in the docs and >> decided to use it anyway. >> >

Re: [PHP] safe_mode and inclusion of files don't work as documented

2009-08-28 Thread Lars Torben Wilson
2009/8/28 Nico Sabbi : > Hi, > I'm testing one of my sites in safe_mode, but I'm experiencing some > strangeness that is not documented. > > The settings are: > in php.ini: > include_path = > ".:/server/home/apache/php4/:/var/php/5.2/pear/:/usr/php/lib/ezcomponents-2008.2.2/" > > in the virtualhost

Re: [PHP] Re: page works on public web site, but not on my computer

2009-08-27 Thread Lars Torben Wilson
2009/8/27 mike bode : > I understand, but that's not an option. I am not interested in getting into > a Linux vs. Windows fight here, let's just say that I am stuck with Windows. > > Now, somthing's gotta be seriously wrong here. I have tried now 4 or 5 > different scripts for the photo gallery tha

Re: [PHP] Re: page works on public web site, but not on my computer

2009-08-25 Thread Lars Torben Wilson
2009/8/25 mike bode : > I just de-installed, then re-installed MySQL, Apache and PHP 5.3. No > changes. The script does not work on my computer. > > Now I get in addition to the error message below this: > > [Tue Aug 25 21:29:11 2009] [error] [client 127.0.0.1] PHP Deprecated: > Function eregi() is

Re: [PHP] php cms?

2009-08-25 Thread Lars Nielsen
tir, 25 08 2009 kl. 17:05 -0400, skrev Bastien Koert: > On Tue, Aug 25, 2009 at 4:35 PM, Lars Nielsen wrote: > > Hey list, > > > > I am going to use a cms for some sites and I have looked a little at > > Typo3, Joomla and php-fusion. > > Can anyone recommend a sys

[PHP] php cms?

2009-08-25 Thread Lars Nielsen
Hey list, I am going to use a cms for some sites and I have looked a little at Typo3, Joomla and php-fusion. Can anyone recommend a system where it is easy to customize the "templates"? regards Lars Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

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

2009-08-25 Thread Lars Torben Wilson
2009/8/25 David Stoltz : > if(empty($rs->Fields(22))){ Hi David, You cannot call empty() on a function or class method like that. From the manual: Note: empty() only checks variables as anything else will result in a parse error. In other words, the following will not work: empty(trim($nam

Re: [PHP] What if this code is right ? It worked perfectly for years!!

2009-08-24 Thread Lars Torben Wilson
2009/8/24 Paul M Foster : > On Mon, Aug 24, 2009 at 10:37:11AM -0700, Chris Carter wrote: > >> >> Is there any alternative method to do this !!! Sending email through PHP? >> > > Sure. You can use a class like PHPMailer rather than the built-in mail() > function. But it's not going to matter if the

Re: [PHP] What if this code is right ? It worked perfectly for years!!

2009-08-24 Thread Lars Torben Wilson
2009/8/24 Chris Carter : > > Hi, > > The code below actually takes input from a web form and sends the fields > captured in an email. It used to work quite well since past few years. It > has stopped now. I used Google's mail servers (google.com/a/website.com) > >  $fName = $_REQUEST['fName'] ; >

Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-22 Thread Lars Torben Wilson
Aargh. Slipped on the trigger there--premature Send. See below for what I meant to send: 2009/8/22 Lars Torben Wilson : > 2009/8/22 Keith : >> Thanks! Torben. >> I got the point now and it works! :-) >> I'm doing this because the statements of each cases is quite l

Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-22 Thread Lars Torben Wilson
default: break; } > "Lars Torben Wilson" wrote in message > news:36d4833b0908202323p3c858b5fn6a1d6775aa7f8...@mail.gmail.com... >> >> 2009/8/20 Keith : >>> >>> Hi, >>> I encounter a funny limitation here with switch case as below: >

Re: [PHP] array() returns something weird

2009-08-22 Thread Lars Torben Wilson
2009/8/22 Szczepan Hołyszewski : >> Hm. . .it does look odd. Searching the bugs database at >> http://bugs.php.net does turn up one other report (at >> http://bugs.php.net/bug.php?id=47870 ) of array() returning NULL in >> certain hard-to-duplicate circumstances on FreeBSD, > > Yes, I found it even

Re: [PHP] array() returns something weird

2009-08-22 Thread Lars Torben Wilson
2009/8/22 Szczepan Hołyszewski : >> What it looks like to me is that something is causing $foo to be a >> string before the '$foo[] = "bar";' line is encountered. What do you >> get if you put a gettype($foo); just before that line? >> >> >        $foo=null; >> >        $foo[]="bar";      // <-- $f

Re: [PHP] array() returns something weird

2009-08-22 Thread Lars Torben Wilson
2009/8/22 Szczepan Hołyszewski : > Hello! > > I am almost certain I am hitting some kind of bug. All of a sudden, array() > stops returning an empty array and starts returning something weird. The weird > thing behaves as NULL in most circumstances (e.g. gettype() says NULL), > except: > >        $

Re: [PHP] daemon without pcntl_fork

2009-08-22 Thread Lars Torben Wilson
2009/8/20 Jim Lucas : > Lars Torben Wilson wrote: >> 2009/8/19 Per Jessen : >>> Jim Lucas wrote: >> >> [snip] >> >>> I probably wouldn't have chosen PHP for the first one, but there's no >>> reason it shouldn't work.  For the se

Re: [PHP] Is there limitation for switch case: argument's value?

2009-08-20 Thread Lars Torben Wilson
2009/8/20 Keith : > Hi, > I encounter a funny limitation here with switch case as below: > The value for $sum is worked as expected for 1 to 8, but not for 0. > When the $sum=0, the first case will be return, which is "sum=8". > Is there any limitation / rules for switch case? Thanks for advice! >

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Lars Torben Wilson
2009/8/19 Per Jessen : > Jim Lucas wrote: [snip] > I probably wouldn't have chosen PHP for the first one, but there's no > reason it shouldn't work.  For the second one, did you mean to > write "serial port"?  That's a bit of a different animal, I'm not sure > how far you'll get with php. > >> He

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Lars Torben Wilson
2009/8/18 Per Jessen : > Lars Torben Wilson wrote: > >> Again, that's not a daemon. If it is sufficient to run a background >> process then that's fine, but that doesn't make it a daemon (although >> it shares some things in common with a daemon). The backgr

Re: [PHP] daemon without pcntl_fork

2009-08-18 Thread Lars Torben Wilson
2009/8/18 Per Jessen : > Jim Lucas wrote: > >> Does anybody know how to use PHP as a daemon without the use of >> pcntl_fork. >> > > Sure. Just start it and leave it running. > >> I want to launch a daemon out of the /etc/rc.local when the system >> starts. > > Yep, I do that all the time. > >> Any

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Lars Torben Wilson
2009/8/17 Jim Lucas : > I want this to be a system that works out of the box.  For the most part. > > I am expecting to have phone system vendors and low-level IT personal trying > to install this thing. > > I don't want to have to field tons of questions on "How do I compile this > p&#*(_fork thin

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Lars Torben Wilson
2009/8/17 Jim Lucas : > Does anybody know how to use PHP as a daemon without the use of pcntl_fork. > > http://php.net/pcntl_fork Hi Jim, AFAIK you can't. Read on. . . > I don't want to have to have a person have a special/custom compilation > of PHP just to run a simple daemon. > > My system:  

Re: [PHP] share code between sites

2009-06-21 Thread Lars Nielsen
Yeah maybe thats the way to do it. It certantly sounds like a working solution. søn, 21 06 2009 kl. 16:02 -0400, skrev Eddie Drapkin: > The same document root and different Vhosts? > > On Sun, Jun 21, 2009 at 4:01 PM, Lars Nielsen wrote: > > Hey List > > > > Is there

[PHP] share code between sites

2009-06-21 Thread Lars Nielsen
Hey List Is there any good approach to share code between multiple sites? The code might be on the same server but on different domains. best regards Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mirroring website

2009-06-21 Thread Lars Nielsen
Thanks for the cents. I will try a combination of multiple configuration files and rsync! /Lars søn, 21 06 2009 kl. 16:39 +0100, skrev Richard Heyes: > Hi, > > > I have the following issue! I want to develop my website on my local > > machine, and then upload the entire d

[PHP] mirroring website

2009-06-21 Thread Lars Nielsen
newer approach? By the way... I'm using Fedora linux with LAMP (php5) best regards Lars Nielsen www.mit-web.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fgets function for very large files

2009-05-24 Thread Lars Torben Wilson
2009/5/24 shahrzad khorrami : > :-o > I want to divide this large csv file with programming to small one! If you're on *nix: % man split Regards, Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] New PHP User with a simple question

2009-01-24 Thread Lars Torben Wilson
2009/1/24 Christopher W : > At least I hope it is simple... > > I am trying to get an HTML menu link to set a variable's value. For > example, when a user clicks the "Home" button on my page it would cause > $page = "home"; or clicking the "About Us" button will set $page="about_us"; > etc. > > I

Re: [PHP] To check for existing user in database

2009-01-22 Thread Lars Torben Wilson
2009/1/16 Shawn McKenzie : > Lars Torben Wilson wrote: >> 2009/1/15 tedd : >>> At 9:46 AM -0800 1/15/09, Chris Carter wrote: >>> >>> Chris: >>> >>> That's not the way I would do it. After establishing a connection with the >>>

Re: [PHP] distinguish between null variable and unset variable

2009-01-21 Thread Lars Torben Wilson
2009/1/21 Daniel Brown : > On Wed, Jan 21, 2009 at 20:27, Jack Bates wrote: >> How can I tell the difference between a variable whose value is null and >> a variable which is not set? > >Unfortunately, in PHP - like other languages - you can't. > >A variable is considered to be null if: >

Re: [PHP] To check for existing user in database

2009-01-15 Thread Lars Torben Wilson
2009/1/15 tedd : > At 9:46 AM -0800 1/15/09, Chris Carter wrote: > > Chris: > > That's not the way I would do it. After establishing a connection with the > database, I would use the query: > > $query "SELECT email FROM owners WHERE email = '$emailAddress' ": > $result = mysql_query($query) or die(

Re: [PHP] print a to z

2009-01-15 Thread Lars Torben Wilson
2009/1/15 Leon du Plessis : > I used that notation before, and it did not work 100%. > Adapt as follows: > > for ($i = 'a'; $i <= 'z'; $i++) >if ($i == "aa") break; else echo $i; It's weird, but true--the simple '<=' breaks the loop. However, in the above example, you don't need the 'else'; t

Re: [PHP] String variable

2009-01-11 Thread Lars Torben Wilson
2009/1/11 Ashley Sheridan : > On Sun, 2009-01-11 at 14:36 +, Ashley Sheridan wrote: >> On Sun, 2009-01-11 at 08:59 -0500, MikeP wrote: >> > Hello, >> > I am trying yo get THIS: >> > where ref_id = '1234' >> > from this. >> > $where="where ref_id="."'$Reference[$x][ref_id]'"; >> > >> > but i cer

Re: [PHP] Re: Re: How to count transfered kBytes in File-Download

2009-01-03 Thread Lars Torben Wilson
2009/1/3 Ashley Sheridan : > On Sat, 2009-01-03 at 17:39 -0500, Eric Butera wrote: >> On Sat, Jan 3, 2009 at 5:19 PM, Michelle Konzack >> wrote: >> > Am 2009-01-03 10:16:43, schrieb Eric Butera: >> >> On Sat, Jan 3, 2009 at 9:23 AM, Ashley Sheridan >> >> > I don't think this is actually possible.

Re: [PHP] running python in php timeout

2008-12-29 Thread Lars Torben Wilson
2008/12/29 brad : > Hi, > > I'm executing a python script from php that runs quite a long time (15+ > minutes) and ends up timing out. Is there a way I can execute the python > code and move on executing the remaining php code on the page? > Thanks! Hi Brad, It's a little tough to say for sure si

Re: [PHP] Regular expressions (regex) question for parsing

2008-12-22 Thread Lars Torben Wilson
2008/12/22 Jim Lucas : > Rene Fournier wrote: >> Hi, I'm looking for some ideas on the best way to parse blocks of text >> that is formatted such as: >> >> $sometext %\r\n-- good data >> $otherstring %\r\n-- good data >> $andyetmoretext %\r\n

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-22 Thread Lars Torben Wilson
2008/12/22 German Geek : > agree, ++$i wont save u nething, it just means that the variable is > incremented after it is used: You meant ". . .before it is used:", right? Torben > $i = 0; > while ($i < 4) echo $i++; > > will output > 0123 > > while > > $i = 0; > while ($i < 4) echo ++$i; > > wi

Re: [PHP] More microptimisation (Was Re: [PHP] Variable as an index)

2008-12-22 Thread Lars Torben Wilson
2008/12/22 Nathan Nobbe : > On Mon, Dec 22, 2008 at 3:10 PM, Clancy wrote: > >> On Mon, 22 Dec 2008 10:20:09 +1100, dmag...@gmail.com (Chris) wrote: >> >> >I'd call this a micro-optimization. If changing this causes that much of >> >a difference in your script, wow - you're way ahead

Re: [PHP] Variable as an index

2008-12-21 Thread Lars Torben Wilson
2008/12/21 German Geek : > Yes, i agree with this. Even if it takes a few nano seconds more to write > out more understandable code, it's worth doing it because code management is > more important than sqeezing out the last nano second. And then also an > $var = "Hello"; > echo "$val World"; > > ha

Re: [PHP] gethostbyaddr and IPv6

2008-11-21 Thread Lars Torben Wilson
2008/11/21 Glen Carreras <[EMAIL PROTECTED]>: > > > On 11/22/2008 12:10 AM, Lars Torben Wilson wrote: >> >> Hi Glen, >> >> Works for me. IPv6 support was added in 2001. You didn't say what >> version of PHP you are having this problem with, so it&#

Re: [PHP] gethostbyaddr and IPv6

2008-11-21 Thread Lars Torben Wilson
2008/11/21 Glen C <[EMAIL PROTECTED]>: > Hello, > > Does gethostbyaddr actually work for anyone while looking up an IPv6 > address? I can't seem to get it to work. For example: > > echo gethostbyaddr ( '2001:470:0:64::2' ); > > should return "ipv6.he.net" but instead I get the following error: >

Re: [PHP] in_array breaks down for 0 as value

2008-11-20 Thread Lars Torben Wilson
2008/11/20 Stut <[EMAIL PROTECTED]>: > On 20 Nov 2008, at 06:55, Yashesh Bhatia wrote: >> >> I wanted to use in_array to verify the results of a form submission >> for a checkbox and found an interesting >> behaviour. >> >> $ php -v >> PHP 5.2.5 (cli) (built: Jan 12 2008 14:54:37) >> $ >> >> $ cat

Re: [PHP] Invalid Arguements

2008-11-20 Thread Lars Torben Wilson
2008/11/19 Robert Cummings <[EMAIL PROTECTED]>: > On Wed, 2008-11-19 at 19:49 +, Ashley Sheridan wrote: >> On Wed, 2008-11-19 at 08:31 -0600, Terion Miller wrote: >> > I am still getting the Invalid arguement error on this implode: >> > >> > if (isset($_POST['BannerSize'])){$BannerSize = >> > i

Re: [PHP] in_array breaks down for 0 as value

2008-11-19 Thread Lars Torben Wilson
2008/11/19 Yashesh Bhatia <[EMAIL PROTECTED]>: > Hi. > > I wanted to use in_array to verify the results of a form submission > for a checkbox and found an interesting > behaviour. > > $ php -v > PHP 5.2.5 (cli) (built: Jan 12 2008 14:54:37) > $ > > $ cat in_array2.php > $node_review_types = array

Re: [PHP] Count the Number of Elements Using Explode

2008-11-01 Thread Lars Torben Wilson
2008/10/31 Stut <[EMAIL PROTECTED]>: > On 31 Oct 2008, at 17:32, Maciek Sokolewicz wrote: >> >> Kyle Terry wrote: >>> >>> -- Forwarded message -- >>> From: Kyle Terry <[EMAIL PROTECTED]> >>> Date: Fri, Oct 31, 2008 at 9:31 AM >>> Subject: Re: [PHP] Count the Number of Elements Using

Re: [PHP] Dynamically creating multi-array field

2008-10-27 Thread Lars Torben Wilson
2008/10/27 Martin Zvarík <[EMAIL PROTECTED]>: > > Hi, I am aware of this, but explaining my problem in this case would take me > an hour --- and eventually would lead to a) misunderstanding, b) weird > solution, c) no solution... Forgive me if I misunderstand, but it seems like you are willing to

Re: [PHP] Dynamically creating multi-array field

2008-10-27 Thread Lars Torben Wilson
2008/10/26 Martin Zvarík <[EMAIL PROTECTED]>: > PHP Version 5.2.4 > > $node = '[5][1][]'; > ${'tpl'.$node} = 'some text'; > > print_r($tpl); // null > ?> > > > I really don't like to use the EVAL function, but do I have choice?? > This sucks. Hi there, While this question can spur some neat solu

Re: [PHP] PHP5 & Commercial Development

2007-02-07 Thread Lars Gunther
developed without these? Probably, but why limit your arsenal? Lars Gunther -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] imap_mail and outgoing mailserver configurations

2005-09-29 Thread Lars Demel
hi, i have a problem with imap_mail. the mails i always send with this function contents in the header field 'from' always the server where php is installed. in our system php and the mail server are installed on different machines. so i think that might be the problem. but we configured in t

Re: [PHP] Locking in PHP (Question for PHP Gurus)

2005-04-06 Thread Lars B. Jensen
I would use a cronjob to make the entry rather than a user, why let the poor guy wait for you to create the content You may have 2 requests both trying to create the new cache entry, but that is much cleaner than having to deal with locking. Do a tempnam() to get a temp file to write to and the

Re: [PHP] if question

2005-04-06 Thread Lars B. Jensen
> I need to test if a variable value is 3 or 6 or 9 or 12 or 15 or 18 ... goes if ($variable%3 == 0) #do something -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com

Re: [PHP] Help with proper post method...

2005-04-05 Thread Lars B. Jensen
very quick and *very* dirty, put this in top of your file extract($_POST); and voila, you bypassed "registerglobals off" -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com

Re: [PHP] Anybody getting these also?

2005-04-05 Thread Lars B. Jensen
yep -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "Andy Pieters" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 06, 2005

Re: [PHP] functions vs classes

2005-04-03 Thread Lars B. Jensen
many projects. It's precisely the same, if you include a file with your class or include a file with your functions, whats the difference ? none. -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.

Re: [PHP] PHP logo is freaked in phpinfo();

2005-03-31 Thread Lars B. Jensen
Is someone playing games with me I have a rabbit photo which has taken over the php logo in my phpinfo(), I also saw a dog in a logo on a mirror for the php manual :) Its kinda cute, interested how its done. yeah, we hacked your server and changed the logo ... just for the fun of it -- Lars B

Re: [PHP] Re: ISO encoding of subject in mail?

2005-03-29 Thread Lars B. Jensen
with mbstring functions, as some is buggy for some languages (in my case Japanese) -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net

Re: [PHP] php-help

2005-03-09 Thread Lars B. Jensen
The manual to the rescue http://jp2.php.net/stripslashes There is alot of good information in the manual, think it would benefit you alot going through some of it, especially the central chapters -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resourc

  1   2   3   4   5   6   >