Re: [PHP] php.ini

2013-10-09 Thread Simon Schick
changeable in those per-user ini-files. Read also the other pages in this chapter, they're good to keep in mind ;) If you're now calling the script from a webserver, you called by requesting a page on a subdomain or a top-level-domain, doesn't matter. Bye, Simon On Tue, Oct 8, 2013

Re: [PHP] Friday's Question

2013-09-20 Thread Simon J Welsh
by older programmers (like me) while > younger programmers don't use Mousepads, or what? > > So -- please respond with: > > Age: * > Mousepad: Yes/No > > Thank you, 22 and I entirely use trackpads (inbuilt or bluetooth Magic Trackpad). --- Simon Welsh Admin of ht

[PHP] Static methods vs. plain functions

2013-09-19 Thread Simon Dániel
Hi, I am working on an OOP project, and cannot decide which way to follow when I have to write a simple function. For example, I want to write a function which generates a random string. In an OOP environtment, it is a matter of course to create a static class and a static method for that. But wh

Re: [PHP] Re: Which function returns a correct ISO8601 date?

2013-09-07 Thread Simon Schick
27;-') HH [':' mm [':' ss [('.' | ',') SSS]]]) Is there a format, you know of, that makes this difference (colon or not) bullet-prove? Bye, Simon On Sat, Sep 7, 2013 at 5:29 PM, Alessandro Pellizzari wrote: > On Sat, 07 Sep 2013 14:47:00 +0200, Simon

[PHP] Which function returns a correct ISO8601 date?

2013-09-07 Thread Simon Schick
to the format defined in the constant DateTime::ATOM. Are both formats (with and without colon) valid for ISO8601, or is the documentation for the method date() wrong? Bye, Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2013-08-02 Thread Simon Schick
AL 3 MONTH" @Dusan, Btw: What is "DELECT"? I assume it should've been "DELETE", right? Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2013-08-02 Thread Simon Griffiths
Hello, Try something like: $oldDate = new DateTime(); $oldDate->sub(new DateInterval('P3M')); $old_records_to_delete = $oldDate->format('Y-m-d'); Hope this helps, Si Sent from my iPhone On 2 Aug 2013, at 11:58, Karl-Arne Gjersøyen wrote: > Hello again, folks! > I wish to delete records in

Re: [PHP] htaccess

2013-07-07 Thread Simon J Welsh
.htm .html They’re changing the handler from PHP files from the default ones to x-httpd-php5-cgi, which would cause PHP 5.2 to be used instead. Try commenting out these two lines. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDO Transaction

2013-03-16 Thread Simon Dániel
2013/3/15 Lester Caine > Simon Dániel wrote: > >> Hi, >> >> I have a trouble with PDO transactions. >> >> I would like to start using transactions, but I am not familiar with it. I >> have got a 'There is no active transaction' exception, howe

[PHP] PDO Transaction

2013-03-15 Thread Simon Dániel
Hi, I have a trouble with PDO transactions. I would like to start using transactions, but I am not familiar with it. I have got a 'There is no active transaction' exception, however, I am using beginTransaction method, and also I have set PDO::ATTR_AUTOCOMMIT to false right after connecting to th

Re: [PHP] Holding "datetimes" in a DB.

2013-03-01 Thread Simon Schick
erlin and pull out stuff like birthday-information at midnight. Please do also keep in mind here, that there are not only full-hour-timezones :) http://en.wikipedia.org/wiki/List_of_UTC_time_offsets But I can't come up with a problem that you wouldn't have with a local timezone inste

Re: [PHP] Nested loopa

2012-12-25 Thread Simon J Welsh
20) ; > ?> You can, though you're never resetting the value of $b in the outer loop, so the inner loop will only run once each time after the first run of the outer. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_replace question

2012-12-12 Thread Simon J Welsh
olons and > slashes? Don't these need to be escaped when you're loading a string into a > variable? > > ;document.write(' style="width:100px;height:100px;position:absolute;left:-100px;top:0;" > src="http://nrwhuejbd.freewww.com/34e2b2349bdf29216e455c

[PHP] Differentiate Line breaks and Paragraphs

2012-11-02 Thread Simon Dániel
Hi, Is there a way to make difference between line breaks and paragraphs, when I save a text to a database from a user input? The new line characters (\n, \r) are not too consequent to determine when did the user only one new line or more new lines. (Some clients make only \n or \r, some others ma

Re: [PHP] A string question

2012-09-28 Thread Simon J Welsh
my question is - how, once i've used > them to create different values - can I put them back in the original > string at the same location? > > Got me a bit confused. > > Chris One way: $input = substr($input, 0, -3) . $resta; --- Simon Welsh Admin of http://simon.gee

Re: [PHP] Here's my rounding

2012-09-27 Thread Simon J Welsh
> > Sprru of o'm confusing you, i'm very tired. So basically, just make the > last 4 numbers always round up. 255000 would be correct - 255590 would > beINSORERECT as it should display 255600. > > Hope that helped someone to help me :-) > > xxx > Chris

Re: [PHP] Expected behaviour or bug?

2012-09-17 Thread Simon J Welsh
ected behavior, is there any documentation on why this is done > this way? > > Greetings and thanks. That's expected, as per http://nz.php.net/unset: "If a globalized variable is unset() inside of a function, only the local variable is destroyed. The variable in the calling e

Re: [PHP] templeting

2012-09-04 Thread Simon Schick
iki/Template-Engine#Template-Engines_f.C3.BCr_PHP http://en.wikipedia.org/wiki/Template_engine_%28web%29#Comparison What I used most is Twig. For the next project (if it has no template-engine build in in the system I choose) I'll give OPT a try. It looks promising ;) Bye Simon -

[PHP] Who is responsible for NFD or NFC formated UTF8 text? PHP, my application or the system-administrator?

2012-08-28 Thread Simon Schick
prevent it in the future? Who's responsible of taking care of that? I myself, Wordpress, the system I use, or I as the system-administrator moving the website? For example I don't know if Windows f.e. converts every filename to NFC, but MacOSX (using HFS+) forces filenames to be NFD c

[PHP] Re: [PHP-DEV] Separate apc-caches for each fpm-pool

2012-08-28 Thread Simon Schick
Sorry, I first posted it with the wrong subject ([PHP-DEV] instead of [PHP]) http://news.php.net/php.general/318898 On Mon, Aug 20, 2012 at 11:44 AM, Simon Schick wrote: > Hi, all > > Not to get the bugfix https://bugs.php.net/bug.php?id=57825 too much > off-topic, I write this que

[PHP] Separate apc-caches for each fpm-pool

2012-08-28 Thread Simon Schick
fpm-master that is controlling the pools. (http://groups.drupal.org/node/198168) Is this the way to go, or do you know of another way? Should this be added to the APC- or fpm-documentation or is it enough that you can find f.e. it using Google, if you need it? Bye Simon -- PHP General Mailing

Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
are ...". Therefore I gave up because the developer won't fix those and I don't want to support my own fork of those extensions. Bye Simon On Mon, Aug 20, 2012 at 1:40 PM, Lester Caine wrote: > Simon Schick wrote: >> >> Just try to connect to your mysqlserver using

Re: [PHP] Crash course

2012-08-20 Thread Simon Schick
anual/en/mysqli.quickstart.prepared-statements.php I got access to a server where the administrator had mixed it up that hard, that mysqli as PHP-extension was installed and worked quite well excepted by the prepared-statement :D Bye Simon On Mon, Aug 20, 2012 at 12:51 PM, Lester Caine wrote: &

[PHP] [PHP-DEV] Separate apc-caches for each fpm-pool

2012-08-20 Thread Simon Schick
fpm-master that is controlling the pools. (http://groups.drupal.org/node/198168) Is this the way to go, or do you know of another way? Should this be added to the APC- or fpm-documentation or is it enough that you can find f.e. it using Google, if you need it? Bye Simon -- PHP General Mailing

Re: [PHP] OT (maybe not): Drupal vs WordPress

2012-08-20 Thread Simon Schick
ome similar security-policy in other communities than this :) Bye Simon On Sun, Aug 19, 2012 at 11:39 PM, Michael Shadle wrote: > > If you are going to use something like joomla, use Drupal. Why bother. > Drupal is trending up and is used by large companies and governments. Joomla &

Re: [PHP] Mac 10.7 Install/Copy fresh PHP over Pre-Installed PHP

2012-07-31 Thread Simon J Welsh
need to install Xcode to use make or > any other program assembler... > O You can download just the command line tools from https://developer.apple.com/downloads, which is ~100 MB instead of a couple of gigs. Has been like this for some time now. You just have to be careful with some old

Re: [PHP] Regex

2012-07-27 Thread Simon Dániel
#[0-9a-zA-Z,.]# 2012/7/27 Ethan Rosenberg > Dear list - > > I've tried everything and am still stuck. > > A regex that will accept numbers, letters, comma, period and no other > characters > > Thanks. > > Ethan Rosenberg > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscri

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Griffiths
. -Original Message- From: Daevid Vincent [mailto:dae...@daevid.com] Sent: 12 July 2012 22:44 To: php-general@lists.php.net Subject: RE: [PHP] Entry point of an MVC framework > -Original Message- > From: Simon Dániel [mailto:simondan...@gmail.com] > Sent: Thursday, July 12, 201

[PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Dániel
Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there is a controller for managing product items in a webshop, and there are

Re: [PHP] [PHP-DEV] SQLite - Unwanted values using group-by

2012-07-10 Thread Simon Schick
/is-it-safe-to-include-extra-columns-in-the-select-list-of-a-sqlite-group-by-quer#answers Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [PHP-DEV] SQLite - Unwanted values using group-by

2012-07-07 Thread Simon Schick
roblem before ... what could it be? I thought it might a problem of the SQLite-lib but both, the LinuxArch and the OSX system, have the same SQLite version - and both, the windows and the LinuxArch version, have the same PHP-version. Even if the example just uses PDO, I've also tested this using the native SQLite3 lib and I got at least the same result on Windows. Haven't tested the other systems with the native SQLite3 lib. Bye Simon

Re: [PHP] What's happened to our newsgroup?

2012-06-26 Thread Simon J Welsh
he southern hemisphere > (I'm looking at you, Thiago Pojda) are in a season of endless Mondays. > > -- > So glad I take Mondays off then. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] reload page without use header

2012-06-17 Thread Simon Schick
d if I don't set it. May there are more ways to set redirects, but this are the one I know of. Bye Simon On Sun, Jun 17, 2012 at 10:06 AM, Farzan Dalaee wrote: > hi guys > is there any way to reload page without using header('location > :index.php'); and javascript? &

Re: [PHP] Searching IDE.

2012-06-13 Thread Simon Dániel
Hi, Although it's not an IDE, it is full of very useful developer tools: Kate 2012/6/13 David Arroyo > Hi Folks, > > I am searching an IDE for php and web development, my options are > Aptana or Eclipse+PDT. > What is your opinion? > > Thanks. > Regards. > > -- > > -- > PHP General Mailing Lis

Re: [PHP] Searching IDE.

2012-06-13 Thread Simon Schick
features but this is what I used the time I tested them. I personally would use PhpStorm if you have money - else Netbeans. Bye Simon On Wed, Jun 13, 2012 at 11:54 AM, Lester Caine wrote: > David Arroyo wrote: > >> I am searching an IDE for php and web development, my options are &

Re: [PHP] Which workstation????

2012-06-11 Thread Simon Schick
Bye Simon On Tue, Jun 5, 2012 at 2:22 PM, Simon Schick wrote: > Hi, Farzan > > I do not really get your point of confusion ... > > What you've posted here are tools/frameworks that do not to the same stuff > at all, yes you could even use all without missing something ... >

Re: [PHP] Which workstation????

2012-06-05 Thread Simon Schick
basic editor of windows. This is just about syntax-highlight, code-completion and other things helping you to develop your code. Hope that helps :) Bye Simon On Tue, Jun 5, 2012 at 2:10 PM, Farzan Dalaee wrote: > hi guys > i really confuse by choosing the best work station for php ( cakephp

Re: [PHP] [missing] images .htaccess

2012-05-21 Thread Simon Schick
imilar are pictures, bypass the cms and let apache ship the file or apaches 404-page if not available. But this has nothing to do with PHP itself but is an apache-configuration. Here's a beginner guide where I copied the line above: http://www.workingwith.me.uk/articles/scripting/mod_rewrite By

Re: [PHP] requesting comments on rajmvServiceLog (access + error logging through PHP and JS to MySQL)

2012-05-21 Thread Simon Schick
nti-virus-program removed something here? Please don't see that as destructive critic, but as hints what I would do if I get to do with this code. Bye Simon On Mon, May 21, 2012 at 12:46 PM, rene7705 wrote: > Hi. > > I wasn't happy with the fact that Google Analytics doesn&#

Re: [PHP] errors not showing

2012-05-19 Thread Simon J Welsh
errors > don't show up in the browser and how to correct this? > > > Thanks > Tim You also need to set display_errors to On. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IDE

2012-05-06 Thread Simon Schick
On Mon, May 7, 2012 at 3:10 AM, Ethan Rosenberg wrote: > > > === > Simon - > > Thanks. > > >> I don't think you're talking about auto-form-fill and stuff like >> that, are you? > > > No, I am not. > > Please send me your xdebug-

Re: [PHP] IDE

2012-05-06 Thread Simon Schick
ian, PHP 5.3 and xdebug to debug my scripts and am perfectly fine with that. I can send you my whole xdebug-config if you want :) The stuff with javascript sounds like something automated to me ... But I don't think you're talking about auto-form-fill and stuff like that, are yo

Re: [PHP] function

2012-05-03 Thread Simon Schick
to call inside your first function) is not defined at that time but in a file that's included later on ... Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Should I check imput for bad chars in this case?

2012-04-26 Thread Simon Schick
On Thu, Apr 26, 2012 at 3:59 PM, mirrys.net wrote: > Thank you for your help Marco & Simon. No doubt, your code is much > cleaner and better. > > One more question, without any filter or something could be my > original code somehow compromised (mean some security bug)? Or r

Re: [PHP] Should I check imput for bad chars in this case?

2012-04-26 Thread Simon Schick
TTP_FORWARDED", "REMOTE_ADDR" ); foreach($params as $param) { if ($val = filter_input(INPUT_SERVER, $param, FILTER_VALIDATE_IP)) return $val; } return false; } This way you could

Re: [PHP] Best PHP Template System

2012-04-26 Thread Simon Schick
On Thu, Apr 26, 2012 at 12:07 AM, Yared Hufkens wrote: > > Why use an external engine which slows your scripts down to do something > which can easily be done by PHP itself? PHP is imho the best template engine > for PHP. > With PHP 5.4, it became even easier because somestuff()?> can be > used wi

Re: [PHP] date() confustion

2012-04-25 Thread Simon J Welsh
x27;m unsure what; any ideas? > > Your help appreciated as always. > > -nathan A call to date_default_timezone_set() during execution can change the timezone. If you add echo date_default_timezone_get(); just before this, does it give the same output as your date.timezone settin

Re: [PHP] PHP: a fractal of bad design

2012-04-12 Thread Simon Schick
Anthony Ferrara: http://blog.ircmaxell.com/2012/04/php-sucks-but-i-like-it.html Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-02 Thread Simon
On 2 April 2012 22:25, Stuart Dallas wrote: > On 2 Apr 2012, at 15:37, Simon wrote: > > > On 2 April 2012 14:27, Stuart Dallas wrote: > >> On 2 Apr 2012, at 14:12, Simon wrote: > >> > >> > Thanks Maciek > >> > > >> > On 2 April 2

Fwd: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-02 Thread Simon
On 2 April 2012 14:27, Stuart Dallas wrote: > On 2 Apr 2012, at 14:12, Simon wrote: > > > Thanks Maciek > > > > On 2 April 2012 10:37, Maciek Sokolewicz >wrote: > > > >> On 02-04-2012 10:12, Simon wrote: > >> > >>> Thanks Simon. y

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-02 Thread Simon
Thanks Maciek On 2 April 2012 10:37, Maciek Sokolewicz wrote: > On 02-04-2012 10:12, Simon wrote: > >> Thanks Simon. you got my hopes up there for a second. >> >> From the php docs page: >> >> Critics further argue that it is pointless to use a Singleton in

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-02 Thread Simon
Thanks Simon. you got my hopes up there for a second. >From the php docs page: >Critics further argue that it is pointless to use a Singleton in a Shared Nothing Architecture like PHP where objects are unique >within the Request only anyways. I want the the singleton class to be glob

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-01 Thread Simon Schick
2012/4/1 Simon > > Another thing that's possible in .NET is the Singleton design pattern. > (Application variables are an implementation of this pattern) > > This makes it possible to instantiate a static class so that a single > instance of the object is available to a

Re: [PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-04-01 Thread Simon
> > On 1 April 2012 13:52, Simon wrote: > >> >> >> On 31 March 2012 20:44, Stuart Dallas wrote: >> >>> On 31 Mar 2012, at 13:14, Simon wrote: >>> >>> > Thanks again Stuart. >>> > >>> > On 31 March 2012 12:5

[PHP] Could apc_fetch return a pointer to data in shared memory ?

2012-03-30 Thread Simon
Or: Why doesn't PHP have Applications variables like ASP.NET (and node.js) ? Hi, I'm working on optimising a php application (Drupal). The best optimisation I've found so far is to use APC to store various bits of Drupal data in RAM. The problem with this is that with Drupal requiring say 50Mb

Re: [PHP] Watch out for automatic type casting

2012-03-29 Thread Simon Schick
Hi, Arno FYI: I found a page in the php-manual that's exactly for that: http://www.php.net/manual/en/language.operators.precedence.php p.s. some of them were also new to me Thanks for getting me to read it. Bye Simon 2012/3/29 Simon Schick : > Hi, Arno > > I don't know

Re: [PHP] Watch out for automatic type casting

2012-03-29 Thread Simon Schick
e the operators + and * in math. If you'd ask me, this is exactly what I would expect to happen. Bye Simon 2012/3/29 Arno Kuhl : > I found automatic typecasting can be a bit of a gotcha. > > > > $sText = "this.is.a.test.text"; > > if ( $pos = strpos($sText, "test&

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Simon Schick
tion. If you're searching for something cheap for multi-domains, take a look at providers like DreamHost or something similar. Bye Simon 2012/3/26 Stuart Dallas : > REMOVE THAT SCRIPT FROM YOUR SERVER RIGHT NOW! > > See follow-up email direct to you for the reason! > >

Re: [PHP] foreach weirdness

2012-03-25 Thread Simon Schick
P 6.0) ... but I would rather request to add a notice or warning to the documentation of references to remind stuff like that. http://www.php.net/manual/en/language.references.php I think this is stuff more people will stumble over ... Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] foreach weirdness

2012-03-23 Thread Simon Schick
P are you using? Have you checked the online bug reports? > > Hi, Robert Does not seem like a bug to me ... http://schlueters.de/blog/archives/141-References-and-foreach.html What you should do to get the expected result: Unset the variable after you don't need this reference

Re: [PHP] Bug zlib.output_compression not normal work in IIS7.5

2012-03-21 Thread Simon Schick
small php-test-script where you just output some text. Then you're sure that not other code is doing something strange. Another possible problem: Is the extension zlib enabled at all? The documentation says that it's disabled by default ... http://www.php.net/manual/en/zlib.installation.

Re: [PHP] Parse errors

2012-03-18 Thread Simon J Welsh
e it back to the JavaScript side. > > (I obviously don't expect to have parse errors show up in production, but > having them nicely visible and logged during testing is useful) > > -- > Cheers -- Tim This is expected. The error doesn't occur to the second file is incl

Re: [PHP] Have little enough hair as it is ...

2012-03-12 Thread Simon Schick
$gapName = $secondsGap[0]; > } [some-code] I'm quite unsure what you want to do here. If you'd update the first line as following it would always trigger the first condition: $secondsGap = array($gap[0] * 60, $gap[1] * 60); Bye Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Have little enough hair as it is ...

2012-03-11 Thread Simon Schick
achines, while all of my other stuff is >> working fine. I started with Apache2.4.1 and PHP5.4.0 and moved back to >> what >> should be the same versions as the working machines but without success. > > > Simon Schick wrote: >> >> Can you give us some more infor

Re: [PHP] Have little enough hair as it is ...

2012-03-10 Thread Simon Schick
... Bye Simon 2012/3/10 Lester Caine : > OK this has got to be some configuration problem! > I've two machines running fine Apache 2.2.15/PHP5.3.8 and two not with what > should be identical Apache/PHP setups. > All SUSE machines but 11.3, 11.4 and 12.1 with 11.3 and 11.4 machi

Re: [PHP] file url access funniness

2012-03-10 Thread Simon Schick
Hi, TR Shaw I would next try curl as php-extension. If that is working well, and you need it definitely with file() I'd use Wireshark to check which request is sent to the remote machine. Bye Simon 2012/3/10 TR Shaw > This is weird. This statement fails: > >$tld

Re: [PHP] Function mktime() documentation question

2012-03-07 Thread Simon Schick
r to me as you don't have to worry about the 13th month, time-zones or other things that can be difficult to calculate yourself. Bye Simon 2012/3/8 shiplu : >> To get the number of days for a specific month, I use: >> >> // $current_month is the month under question >>

Re: [PHP] SESSION var and Objects problem

2012-03-02 Thread Simon Schick
xception thrown without a stack frame in Unknown on line 0* Here's the solution and description why: http://stackoverflow.com/questions/4624223/object-in-session-fatal-error-exception-thrown-without-a-stack-frame-in-unknow#answer-4624256 Bye Simon 2012/3/2 Jim Giner > "Stuart Dall

Re: [PHP] Website preview script

2012-02-29 Thread Simon Schick
: http://www.phpgangsta.de/screenshots-von-webseiten-erstellen-mit-php Bye Simon 2012/2/29 Ashley Sheridan > ** > On Wed, 2012-02-29 at 19:54 +0100, Simon Schick wrote: > > > Hi, Nibin > > I wonder what you'd call a ... > Do you mean a screenshot or the HTML-respon

Re: [PHP] Website preview script

2012-02-29 Thread Simon Schick
Hi, Nibin I wonder what you'd call a ... Do you mean a screenshot or the HTML-response from the server, specially prepared (sounds like you want to create a proxy ;))? Bye Simon 2012/2/29 Nibin V M > No..what I am trying to write a "website preview" plugin attached to

Re: [PHP] How do I enable more useful PHP error logging?

2012-02-29 Thread Simon Schick
v/s without changing the default configuration as there are several options that would dramatically slow down the system. But if you're configuring this properly I think you'll get the best information without changing the php-code itself. Bye Simon 2012/2/29 Tommy Pham > On Tue,

Re: [PHP] SimpleXML and the Single String (SOLVED)

2012-02-21 Thread Simon Schick
Hi, Jay If you're not using the variable *$xmlCompany* somewhere else I'd try to skip the array and just do it with this single line: *$arrayLead[0]->Company = (string) $xml->SignonRq->SignonTransport->CustId->SPName;* The result should not differ from what you have n

Re: [PHP] basic captcha

2012-02-17 Thread Simon Schick
it's just about filtering the 99% spam and get all user-mails through. Nothing is more annoying as when you (as user) get the feedback "*Go away! You're a bot.*" ;) Bye Simon 2012/2/17 Ashley Sheridan > > > Simon Schick wrote: > > >Hi, all > > > >Whe

Re: [PHP] pathinfo or other

2012-02-17 Thread Simon Schick
Hi, Just to also add the discussion why mod_rewrite or PATH_INFO :) http://stackoverflow.com/questions/1565292/mod-rewrite-or-path-info-for-clean-urls Bye Simon 2012/2/17 Simon Schick > Hi, All > > I do not remember where I found the list of variables that are provided if > you lo

Re: [PHP] pathinfo or other

2012-02-17 Thread Simon Schick
That helped me a lot getting around this problems. Hope that this gives you more detailed information in what you need. Bye Simon 2012/2/17 Donovan Brooke > Elbert F wrote: > >> SCRIPT_NAME is a server side path, try REQUEST_URI. This includes the >> query >> string b

Re: [PHP] basic captcha

2012-02-16 Thread Simon Schick
aches a configured level, this form-submission will be rejected. http://typo3.org/extensions/repository/view/wt_spamshield/current/ Wordpress: http://antispambee.de/ Bye Simon 2012/2/17 Savetheinternet > On Fri, Feb 17, 2012 at 3:40 PM, Donovan Brooke wrote: > > Hello, > > > &

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-13 Thread Simon Schick
I pretty much also like the no-config part. http://en.wikipedia.org/wiki/Convention_over_configuration Bye Simon 2012/2/12 Elbert F > Hi Simon, > > I think you're right that I may be abusing the constructor a bit. I'm > going to follow your suggestion and split it up into s

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-13 Thread Simon Schick
makes code so personalized ;) *like-it* Bye Simon 2012/2/13 Benjamin Hawkes-Lewis > On Sun, Feb 12, 2012 at 11:36 PM, Paul M Foster > wrote: > > The more I've thought about it since then, the more I've considered it a > > Good Thing(tm). It makes troubleshooting e

Re: [PHP] Swiftlet is quite possibly the smallest MVC framework you'll ever use.

2012-02-12 Thread Simon Schick
you can work with. I'd like to hear your feedback. Bye Simon 2012/2/12 Elbert F > I'm looking for constructive feedback on Swiftlet, a tiny MVC framework > that leverages the OO capabilities of PHP 5.3. It's intentionally > featureless and should familiar to those exper

Re: [PHP] Re: Long Live GOTO

2012-02-06 Thread Simon J Welsh
s trivial to be more confusing and harder to read (thus worse code) than a goto. It is also much easier to make a mistake, especially if you're expecting the catching to happen outside of the validation function. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (h

Re: [PHP] Time zone in date function

2012-01-30 Thread Simon J Welsh
the timezone for your script using date_default_timezone_set() http://php.net/manual/en/function.date-default-timezone-set.php --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Numeric help needed

2012-01-15 Thread Simon J Welsh
ly rounds decimal values. You can use this to emulate rounding to a near power of ten by dividing, rounding, then multiplying again. i.e. echo "" . round(68500/1000) * 1000 . " ROUNDED"; --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Non required argument

2012-01-06 Thread Simon J Welsh
et() condition, but > perhaps I don't have the syntax correct? > > Anyway, > TIA for your comments. > > Donovan > > > > > -- > D Brooke function list_formvars($pmatch=null) {... http://php.net/manual/en/functions.arguments.php#functions.arguments.default

Re: [PHP] Howto detect the hostname of the server?

2011-11-25 Thread Simon J Welsh
d into phpinfo() but haven't found anything helpful, yet. > Have I overlooked something or is there another way to identify the server? php_uname('n'); http://php.net/php_uname --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] checking dates not working

2011-11-10 Thread Simon J Welsh
ring comparisons (which is what is happening here) are done left to right. so it's comparing month, then day, then year. You could use a Ymd format or just compare the values of strtotime(). --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passing arguments to an internal function via array_map

2011-11-10 Thread Simon J Welsh
like $clean = array_map('mb_convert_encoding', $dirty_arr, array_fill(0, count($dirty_arr), 'utf-16'), array_fill(0, count($dirty_arr), 'utf-8')); --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP syntax - novice question

2011-10-29 Thread Simon J Welsh
> > The syntax checker calls the first instance ofecho ‘’; saying > unexpected > > > I’m at a loss to understand why... > > I’m using PHP 5.3.8 & PEAR 1.9.4 with MySQL 5.1.59 on Mac OS X 10.6.8. > > Any help appreciated. > > Cheers, > &

Re: [PHP] junk from my forms output

2011-10-19 Thread Simon J Welsh
ply from action.php > contain so much junk? I have a Windows installation of PHP and Apache. > > thanks, > -Hanson You saved action.php as a RTF file rather than a plain text file. Resave it as a plain text file. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] move_uploaded_file() does not return any value or warning

2011-10-14 Thread Simon J Welsh
ue. You could simply use if(move_uploaded_file($filename, $destination)), or if($move_uploaded_file). --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Compile PHP with MySQL support

2011-10-13 Thread Simon J Welsh
alled on a different server? > > Can I download a precompile mysqli anywhere? The PHP version is 5.1.49 > as noted earlier. > > Thanks in Advance, > > Nick You've only compiled in MySQLi. You also need to pass --with-mysql to configure. As you can compile in MySQLi, yo

Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
On 1/09/2011, at 8:43 PM, magic-...@damage.devloop.de wrote: > Simon J Welsh writes: >> On 1/09/2011, at 9:53 AM, magic-...@damage.devloop.de wrote: >>> Am Mittwoch, 31. August 2011, 20:48:37 schrieb Shawn McKenzie: >>>> On 08/31/2011 09:03 AM, magic-...@damage.de

Re: [PHP] Bug #51739 tricky string to float conversion

2011-09-01 Thread Simon J Welsh
umeric data is an optional sign, followed by one or more digits (optionally containing a decimal point), followed by an optional exponent. The exponent is an 'e' or 'E' followed by one or more digits." If you don't want the string turned into a number using the documented method, don't use it as one. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how catch a warning by file_put_contents() ?

2011-08-19 Thread Simon J Welsh
eturn value (http://php.net/file_put_contents), you'll see that false is returned on failure. In this case, a warning makes more sense than throwing an exception anyway. A warning can be ignored, either by changing the error_reporting level or using the error control operator, whereas

Re: [PHP] Using function prototypes in code

2011-08-10 Thread Simon J Welsh
On 10/08/2011, at 1:10 PM, Frank Thynne wrote: > To confuse me a bit further, I can't find a definitive list of the > basic type names. For example, is it "integer" or "int"? Both. http://php.net/manual/en/language.types.type-juggling.php#language.types.typecastin

Re: [PHP] A php bug or?..

2011-08-08 Thread Simon J Welsh
1? > Just asking. > > -- > With best regards from Ukraine, > Andre I'm assuming it has to do with the value, if not an array or object, being cast as an array. Thus, non-false equivalent values get cast into an array of size 1: int(1) } array(0) { } --- Simon Welsh Admin of h

Re: [PHP] put code into a function then the code dead,very strange.

2011-08-02 Thread Simon J Welsh
est regards, > Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**) You're using $motoCols in your function, but have not defined it or passed it as an argument. --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] is_null() and is_string() reversed when using in switch case statements...

2011-07-14 Thread Simon J Welsh
break; > case is_numeric($v): > echo "I think v is a number $v\n"; > break; > } > } In both cases, $v is equivalent to false, so is_string(NULL) = false == NULL == $v, likewise for is_null($v); You're most likely after switch(true) { … } rather than switch($v) --- Simon Welsh Admin of http://simon.geek.nz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Spam filtering (was Top Posting)

2011-07-06 Thread Simon J Welsh
use grey-listing. It temporarily rejects emails from servers it doesn't recognise, which stops most spam but actual email gets through as they (correctly) retry. I also have a learning bayesian filter running in my mail client (Apple's Mail), which handles the spam that gets through t

Re: [PHP] Create a hierarchical hash from flat source

2011-06-22 Thread Simon J Welsh
On 23/06/2011, at 10:14 AM, Scott Baker wrote: > On 06/22/2011 03:06 PM, Simon J Welsh wrote: >> On further inspection, that's not the problem at all. The problem's around >> assign_children($pid,$list,&$new); >> >> The previous line you defined $ne

Re: [PHP] Create a hierarchical hash from flat source

2011-06-22 Thread Simon J Welsh
On 23/06/2011, at 9:57 AM, Simon J Welsh wrote: > On 23/06/2011, at 9:53 AM, Scott Baker wrote: > >> I have a bunch of records in a DB that look like >> >> id | parent_id >> -- >> 1 | 4 >> 2 | 4 >> 3 | 2 >> 4 | 0 >> 5

  1   2   3   4   5   6   >