[PHP] Re: include_path ???

2004-07-25 Thread Lester Caine
D_angle wrote:
This is taken right out of the download of PHP 5 zip file
"php-5.0.0-Win32.zip". Opening the "php.ini-recommended" it states the
following configuration
What is in the php.ini in your windows directory?
THAT is the copy that PHP is using.
( Is there something missing in the install notes - this is the second 
time I've had to mention where the php.ini is located ;) )

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: select * on all current?

2004-07-27 Thread Lester Caine
Louie Miranda wrote:
now its working,
i was wondering if we can do max(dateposted) on update?
mysql> update datafiles set status = '1' where max(dateposted);   
 ERROR : Invalid use of group function
WHERE dateposted = max(dateposted);
Perhaps ( works in Firebird :) )
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Browsers on terminal server

2004-08-05 Thread Lester Caine
I am using
$_SERVER["REMOTE_ADDR"]
to get address of the browser accessing the system and then using
gethostbyaddr() to get the machine name.
This worked great until I came to a site using M$ Terminal Server to 
provide the terminals. We still need to know what machine we are talking 
to, so we can identify the room, and flag the correct set of displays, 
but $_SERVER["REMOTE_ADDR"] seems to be giving only the IP address of 
the TS machine.

Anybody been here already. Is it possible to identify the terminal that 
is browsing on the other side of TS. Any pointers to some help to 
restore operation in this situation.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Browsers on terminal server

2004-08-05 Thread Lester Caine
Lester Caine wrote:
I am using
$_SERVER["REMOTE_ADDR"]
to get address of the browser accessing the system and then using
gethostbyaddr() to get the machine name.
This worked great until I came to a site using M$ Terminal Server to 
provide the terminals. We still need to know what machine we are talking 
to, so we can identify the room, and flag the correct set of displays, 
but $_SERVER["REMOTE_ADDR"] seems to be giving only the IP address of 
the TS machine.

Anybody been here already. Is it possible to identify the terminal that 
is browsing on the other side of TS. Any pointers to some help to 
restore operation in this situation.
OK is is even more of a problem!
Two terminals running browsers via terminal server on one machine both 
accessing PHP on a second machine. Problem - they both use the same 
session, so what ever you do in one is 'seen' by the other.

Does this mean that any browsers running on terminal server are totally 
useless as far as web access ?

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Further on Terminal Server

2004-08-05 Thread Lester Caine
OK I've established that I have to go to server side cookie management 
since all ten terminals are using the one copy of browser on the 
Terminal Server. OR is this because the log on to terminals server is 
generic. Would the problem be solved if the users have to log into 
Terminal Server every time, rather than just loging into the PHP 
application as happens currently?

I have spent four hours going through articles on the Microsoft site, 
and nothing seems to address the problem. And I'm still waiting for 
answers on one of their list from this morning.

I still need to be able to security check against client machine name, 
but it looks as if that one simply gets crossed of as not possible with 
the setup - which we did advise against and now have more reasons who 
NOT to use it. All they need is to add a browser to the clients but the 
customer is paying the annual bill for M$ so ... ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Problem with class and tree-like struct

2004-08-07 Thread Lester Caine
Martin Schneider wrote:
Ah, i forgott to pass the paramter as a reference...
Many mistakes only become visible at the moment you hit  ;)
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ImageColorTransparent Problem

2004-08-09 Thread Lester Caine
Kevin wrote:
Yes, I have tried making the image with imagecreate() function and it was
transparent. Using imagecreate() function I was only able to make 256 colors
but the image was transparent. I want real colors so I used
imagecreatetruecolor() and now the same is not transparent.
THAT is a bug in IE as far as I have established. PSP kept insisting on 
switching to palette mode when I select transparent, and on asking 
elsewhere I was told IE can't handle anything more.
Since I can't create the picture - I haven't had a chance to check in 
Mozilla/Firefox :)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Access CLIENTNAME

2004-08-09 Thread Lester Caine
At the risk of getting my head bitten off I ask this again, as I am not 
getting any help anywhere.

I'm running a PHP system that relies on knowing the location of the 
terminal to handle a lot of '911' (999) type things. I know that 
REMOTE_ADDR can not be relied on, but with fixed IP addresses on a local 
network it works fine. However I now have a customer who has a Terminal 
Server thin client network, and REMOTE_ADDR only reports the server 
address. In order to restore the facilities I need to gain access to the 
CLIENTNAME environmental variable from the browser and return it to PHP.

I've already got the simple bodge - they type it on on login - which is 
simply a joke when coming to use the system. I have a TS logon batch 
file which copies the CLIENTNAME variable to a file from which it could 
be accessed. BUT I have yet to find any way to pass the information.

Can anybody kick me in the right direction, or do I have to stick with a 
drop down list in the logon box and expect everybody to know where they 
are?

Surely VOIP is going to run into this problem soon isn't it? (Not that I 
can see how TS can actually handle the microphone and camera anyway ;) )

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Access CLIENTNAME

2004-08-09 Thread Lester Caine
Scot L. Harris wrote:
I'm running a PHP system that relies on knowing the location of the 
terminal to handle a lot of '911' (999) type things. I know that 
REMOTE_ADDR can not be relied on, but with fixed IP addresses on a local 
network it works fine. However I now have a customer who has a Terminal 
Server thin client network, and REMOTE_ADDR only reports the server 
address. In order to restore the facilities I need to gain access to the 
CLIENTNAME environmental variable from the browser and return it to PHP.

This won't work?
function get_ip() {
   if (isSet($_SERVER)) {
   if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) {
   $realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
   } elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) {
   $realip = $_SERVER["HTTP_CLIENT_IP"];
   } else {
   $realip = $_SERVER["REMOTE_ADDR"];
   }
   } else {
   if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
   $realip = getenv( 'HTTP_X_FORWARDED_FOR' );
   } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) {
   $realip = getenv( 'HTTP_CLIENT_IP' );
   } else {
   $realip = getenv( 'REMOTE_ADDR' );
   }
   }
   return $realip;
}
No - neither HTTP_X_FORWARDED_FOR or HTTP_CLIENT_IP are returned for any 
browser running on Terminal Server. Just REMOTE_ADDR which is the 
address of the server not the client. Would be nice if HTTP_CLIENT_IP 
COULD be returned, and it would make sense.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: php tools

2004-08-10 Thread Lester Caine
Matthew Weier O'Phinney wrote:
So, you basically need a text editor with good syntax highlighting for
X/HTML, PHP, CSS, SQL, and javascript. As I said, I have that in Vim. I
also know EditPlus has that and is either shareware or freeware. 

If you're looking for an IDE, can't help you.
Eclipse + phpeclipse
http://www.eclipse.org/
http://sourceforge.net/projects/phpeclipse
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MySQL & PHP Examples & Training Providers Required

2004-08-11 Thread Lester Caine
Robby Russell wrote:
Not to start a SQL war, but have you consider PostgreSQL as well in your
decisions?
And how about Firebird, Oracle has roots from the same original 
development in the 1980's.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: MySQL & PHP Examples & Training Providers Required

2004-08-11 Thread Lester Caine
Justin Patrin wrote:
On Wed, 11 Aug 2004 18:20:23 -0400, Lukasz Karapuda <[EMAIL PROTECTED]> wrote:
Why I chose to reply to your email is because PHP is not usually used for
the development of more complex functionality like the Web site module that
we have developed.
I beg to differ. Many large and complex sites are written in PHP.
There are also many large and complex programs written in PHP which
are in production use. Take TYPO3, for example: http://www.typo3.org
I'll second that, PHP is an excellent choice for website development - 
especially when supported by the correct web server and database ;)

MANAGING a PHP project can be fun. Remember to track all changes to 
EVERY file, but the ability to drop into a particular function and make 
corrections and changes means that little niggles do not need to wait 
for a full system update like we have with older Builder C++ based 
applications.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Cannot Load DLLs (WinXP, Apache 2, PHP 5)

2004-08-20 Thread Lester Caine
Rory McKinley wrote:
Sorry Philip, but I have to disagree
I did an install on Wednesday of this week. I placed an entry for my PHP 
folder in the PATH and it made no difference. Only once I had 
overwritten the libmysql.dll in the Windows system folder with the 
version that ships with PHP5 did I get everything to play nicely together.
What was the order in your PATH entry?
I suspect that the copy in the system folder was being found first.
PATH is very badly managed now in windows, it's fine if you only have 
one copy of a file, but you can not rely on it if old copies exist 
elsewhere in the PATH.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Popup with recent IE updates

2004-08-26 Thread Lester Caine
A couple of sites are reporting problems with pages which include .css 
style pop-ups. The information is being displayed at the top of the page 
rather than in a pop-up. This seems to be happening on sites where 
recent IE 'security fixes' have been applied.
Anybody else starting to see it, and more important, anybody got a fix ( 
other than our usual suggestion to switch to Mozilla ;) )
As far as I can see the html generated by PHP for the pages is the same, 
but I'm just cross checking that.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Popup with recent IE updates

2004-08-26 Thread Lester Caine
Raditha Dissanayake wrote:
and what has this got to do with PHP?
Lester Caine wrote:
A couple of sites are reporting problems with pages which include .css 
style pop-ups. The information is being displayed at the top of the 
page rather than in a pop-up. This seems to be happening on sites 
where recent IE 'security fixes' have been applied.
Anybody else starting to see it, and more important, anybody got a fix 
( other than our usual suggestion to switch to Mozilla ;) )
As far as I can see the html generated by PHP for the pages is the 
same, but I'm just cross checking that.
The PHP application is working fine everywhere else. If you are bothered 
about me asking for help getting it working with crappy browsers just 
don't bother to post at all!!!!

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Popup with recent IE updates

2004-08-26 Thread Lester Caine
Jason Wong wrote:
Lester Caine wrote:

The PHP application is working fine everywhere else. If you are bothered
about me asking for help getting it working with crappy browsers just
don't bother to post at all
OK here are the 'facts':
- "This seems to be happening on sites where recent IE 'security fixes'"
- "The PHP application is working fine everywhere else."
What can one reasonably conclude from the above?
I would suggest you find out what the IE updates were and figure out how it 
affected your pages.
Have updated both w2k machine on site and a local w2k machine to latest 
version of IE via 'Windows update'. Machine on site is still showing a 
problem with the  for the pop-up being displayed as text above the 
top of the proper page, while the local machine has no problem. No other 
site has a problem with the code, and only some of the machines on the 
problem site show a problem. Both XP and W2k machines are affected, but 
not all, and updating versions has not cleared problem.

It is beginning to look as if the .css is being corrupted somewhere. We 
have tried wiping cache, and also renaming the .css file so that a 
different copy has to be used, all without success.

Loading Mozilla on the problem machines gives a clean page with the 
correct pop-up's so I simply don't know what to try next. When this sort 
of thing was happening during development it was usually tracked to 
faulty PHP, but that is not definitely not the case this time.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Popup with recent IE updates

2004-08-27 Thread Lester Caine
Jason Wong wrote:
On Friday 27 August 2004 01:28, Lester Caine wrote:
[yada yada]
Loading Mozilla on the problem machines gives a clean page with the
correct pop-up's so I simply don't know what to try next. When this sort
of thing was happening during development it was usually tracked to
faulty PHP, but that is not definitely not the case this time.
So why are you asking on the PHP list then? Look to save you looking it up:
  www.microsoft.com
Spent a couple of unpaid hours there yesterday. The only thing that came 
up was pop-up blocking with SP2, but we have avoided that like the 
plague - and it is not being supplied for W2k copies of IE anyway. The 
CODE is designed to work with any browser, and IE is NOT my preferred 
choice, but I was hoping someone who is not an IE only developer would 
have come across the same problem! PHP is building the page correctly 
and a source dump from the problem machines gives an exact match with a 
source dump from a working machine, so YES the problem is pure IE crap, 
but I have never had a reply to ANY post to a Microsoft list and I NEED 
to fix this before the end of the month
The customer HAS accepted that we advised that IE may cause problems, 
but since a number of other sites are running correctly .
They have had to hold up a switch to XP because a number of other legacy 
applications failed :)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Popup with recent IE updates

2004-08-27 Thread Lester Caine
Miles Thompson wrote:
Most likely this is a consequence of Windows XP SP2, one of its side 
effects is blocking of popups in IE.
Strange, like smokers becoming non-smokers.
No SP2 stuff added - and unlikely to be added
This problem is affecting a couple of W2k machines as well
Check Sunbelt Software for some workarounds, they identified the problem 
about 12 da ago.
I'll grasp any straw ...
Can't see anything that is related though.
Current thinking is corrupt copy of IE that has been used to load the 
machines, as they do not have a public internet connection, the install 
and updates are from a local copy. So I have permission to wipe a 
problem machine and rebuild from scratch to see what happens.
I could do without this waste of time ;(

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Popup with recent IE updates

2004-08-27 Thread Lester Caine
Lester Caine wrote:
Miles Thompson wrote:
Most likely this is a consequence of Windows XP SP2, one of its side 
effects is blocking of popups in IE.
Strange, like smokers becoming non-smokers.
No SP2 stuff added - and unlikely to be added
This problem is affecting a couple of W2k machines as well
OK got a handle on this now. The customer had installed XP on the W2k 
machine that ran Apache and PHP (And not told us ;) ). Switched to the 
Firebird machine ( which they had not touched and still had W2k ) and 
the problem goes away. No answers, but Apache+PHP+XP seems to be the 
problem. We have restored the web server to W2k, and everything works 
fine again.

So don't know what goes wrong, but were running Apache 2.0.50, PHP5.0.0 
on XP-SP1 and probably style sheets were going wrong. Switch back to W2k 
SP3 and all is fine (SP4 screws up various other network apps) so we 
stay with that until Linux is acceptable :)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Download installer not found [***SPAM***] **SPAM USA 64.246.30.37 BODY**

2004-08-29 Thread Lester Caine
Devx wrote:
I click PHP 5.0.1 installer 
<http://www.php.net/get/php-5.0.1-installer.exe/from/a/mirror> link 
download at http://www.php.net/get/php-5.0.1-installer.exe/from/a/mirror .
But i see download not found.

 Download not found
This mirror site is improperly setup, and thus has no copy of the 
executable file you requested. Please select a different mirror site 
<http://th.php.net/mirrors> to get the file, until this site gets fixed.

same PHP 4.3.8 installer 
<http://www.php.net/get/php-4.3.8-installer.exe/from/a/mirror> 
link,please fix.
So which mirror were you using?
http://th.php.net/mirrors is working for me and gives the same list I 
get from the UK mirrors, but it may be that you have an old cookie that 
needs clearing?

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: List of cities

2004-08-29 Thread Lester Caine
Harlequin wrote:
Does anyone know of a site that or resource available where I could pull a
list of ALL UK cities and towns for an option list...?
I started out with 100+, then expanded this list to over 200 but still get
complaints that certain towns are not listed.
I have a fairly complete Postcode table - 400Mb in Firebird. This gives 
me nearly 1500 postal towns. Do you really want that in a single drop 
down list?
I can supply it as a list if you want really want it, but I think you 
need a rethink.
(eMail direct if you do want it)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: List of cities

2004-08-29 Thread Lester Caine
Torsten Roehr wrote:
Does anyone know of a site that or resource available where I could pull a
list of ALL UK cities and towns for an option list...?
I started out with 100+, then expanded this list to over 200 but still get
complaints that certain towns are not listed.
Ask the UK postal service (or whatever it is called). They should have such
a list/directory containing all cities with zip codes in digital form
(probably on CD-ROM).
It's a chargeable item - with annual subscription - depending on the 
number of users.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP site ?

2004-09-04 Thread Lester Caine
Jack Gates wrote:
I replaced this:
$address = getenv("REMOTE_ADDR");
with this
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
and now I am getting exactly what I was trying to get.
This will work fine for networks that provide their own 'REMOTE_ADDR', 
but once proxies are in the way, you will see a proxy address rather 
than the real machine.

My own connection gives
You are host81-138-11-136.in-addr.btopenworld.com
for the osCommerce site. Probably good enough, but not really me ;)
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Users of RDBMS

2004-09-09 Thread Lester Caine
John Nichel wrote:
M. Sokolewicz wrote:
John Nichel wrote:
Joshua D. Drake wrote:
PHP != MySQL
MySQL != RDBMS
Please tell me you're kidding.
that's a funny one... could've sworn it actually was one...
All this time the MySQL AB people have been lying to us.  It's actually 
an Excel spreadsheet. ;)
Well RDBMS things like Foreign Key's and constraints used to be 
documented but did not actually work, so what else was not provided ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php_printer

2004-09-09 Thread Lester Caine
Anybody got php_printer running?
If I give printer_open an invalid printer name, error. Give it a valid 
(shared) printer name, not error, but using the $handle in 
printer_set_option gives an 'invalid printer handle error'

What do I need to do next to check this out?
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: php_printer

2004-09-10 Thread Lester Caine
Lester Caine wrote:
Anybody got php_printer running?
If I give printer_open an invalid printer name, error. Give it a valid 
(shared) printer name, not error, but using the $handle in 
printer_set_option gives an 'invalid printer handle error'

What do I need to do next to check this out?
OK looking further into this I find that 'printer' is no longer present 
on pecl is it being dropped or has it moved elsewhere?

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] List Etiquette

2004-09-22 Thread Lester Caine
Jason Wong wrote:
Have fun driving on the wrong side of the road.
What side is that? Doesn't it depend on national preference?
Not personal preference for certain.
That depends on if there IS a national preference. Having seen drivers 
in some countries there still seems to be a difference of opinion ;)

So even legal requirements can't enforce some preferred activities, so I 
shall continue to bottom post, or just not quote which ever is 
appropriate :) I have all the messages archived, so I don't need every 
extra copy anyway.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PHP websites (www/uk/us2)

2004-10-15 Thread Lester Caine
Graham Cossey wrote:
I was wondering what the difference is between the various PHP sites linked
to in this list, are they mirrors and what determines which site you get
directed to when doing a search from www.php.net?
If you download you will be directed to a mirror, and that will then be 
used as your default location. I tend to use the uk one myself.

The problem comes when you quote links and include your mirror in that - 
just a problem that the Internet has yet to overcome. Perhaps local ip 
addresses could be picked up by an ISP for things like google or php - 
that would help reduce long distance traffic ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: anchor name on URL

2008-11-19 Thread Lester Caine

Yeti wrote:

Just battling that fiasco myself. Konqueror and Dolphin combination just
does not work for me which is a pity - and KDE4 . I was pointed to xfce
which seems to be much more practical :)

Having ditched the Windows 'development machine' everything is now on a nice
linux box, but I was pulling my hair out with KDE4 


I think one has to look at KDE4 as the bloaded windows manager many
Windows switchers are looking for. With all its handy apps one does
not have to worry about how to get programs one had pre-installed
under Windows. For many unexperienced users it should make life alot
easier. Whereas for the other 25% KDE still is a great window manager,
but one should choose the "must-haves" before compiling it. With all
its useless tools/apps or whatever it takes alot of time to compile
(compare that to the linux kernel lol) and speaking for me, I don't
want 2 Gigs of never used data on my disk.


Forgot to hit - reply all - again :(
List emails should reply to the list :)
I think you have hit the nail on the head. Except that the 25% have 
problems finding things that have moved ...
The one thing I needed was 'marbles' which was supposed to be KDE4 only, 
but it works fine under xfce, so I'm slowly culling anything else I 
don't need


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Open Project

2008-11-23 Thread Lester Caine

Nathan Rixham wrote:
I've had a look through the two frameworks that Alex and Craige have 
sent through, done a lot of thinking and came to a decision, well more 
of an idea. I'd be interested in thoughts / comments.



Snip definition of a 'framework ;)

and really no point going any further here..

Thoughts? (open to all obviously)


Modular framework that you can add your own modules to, but provides the 
base authentication ( also modular ), smarty, ADOdb, mime handling and 
selectable editors for content?

www.bitweaver.org

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using DateTimeZone

2008-12-04 Thread Lester Caine
I'm looking to tidy up things a bit by clearing out a lot of old code 
and switching to using the internal DateTime functions.


Information is stored in the databases UTC normalized, and we get around 
the problem of getting a real tz offset by getting the users to register 
it rather than simply relying on the browser. So dates and times are 
displayed either UTC or user local time. The server defaults are not 
relevant, as only the user details should be used.


The thing that I am having a little trouble establishing is the correct 
way to take a UTC unix epoch timestamp from the data and display it with 
the users timezone offset.


$dateTimeZoneUser = new DateTimeZone("user's setting");
$dateTimeUser =
new DateTime( date( "U", $datetime_to_display ), $dateTimeZoneUser );
$date = $dateTimeUser->format( DATE_ATOM );

Is giving results wildly different from 2008
So how is one supposed to handle epoch values?

I little aside while sorting the lookup table for timezones, 
DateTimeZone::listIdentifiers() apparently should accept a country code, 
but again I can't seem to find out how to make it work. Would I expect 
it to return just values for the country requested?



Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using DateTimeZone

2008-12-04 Thread Lester Caine

Lester Caine wrote:
I'm looking to tidy up things a bit by clearing out a lot of old code 
and switching to using the internal DateTime functions.


Information is stored in the databases UTC normalized, and we get around 
the problem of getting a real tz offset by getting the users to register 
it rather than simply relying on the browser. So dates and times are 
displayed either UTC or user local time. The server defaults are not 
relevant, as only the user details should be used.


OK cracked the first bit - need an '@' in place of the "U"

The thing that I am having a little trouble establishing is the correct 
way to take a UTC unix epoch timestamp from the data and display it with 
the users timezone offset.


$dateTimeZoneUser = new DateTimeZone("user's setting");
$dateTimeUser =
new DateTime( date( "U", $datetime_to_display ), $dateTimeZoneUser );

new DateTime( '@'.$datetime_to_display, $dateTimeZoneUser );

$date = $dateTimeUser->format( DATE_ATOM );

Is giving results wildly different from 2008
So how is one supposed to handle epoch values?
That gives me the correct date - but changing the timezone makes no 
difference to the output - seems to be displaying local timezone only.


I little aside while sorting the lookup table for timezones, 
DateTimeZone::listIdentifiers() apparently should accept a country code, 
but again I can't seem to find out how to make it work. Would I expect 
it to return just values for the country requested?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using DateTimeZone

2008-12-04 Thread Lester Caine

Lester Caine wrote:

Lester Caine wrote:
I'm looking to tidy up things a bit by clearing out a lot of old code 
and switching to using the internal DateTime functions.


Information is stored in the databases UTC normalized, and we get 
around the problem of getting a real tz offset by getting the users to 
register it rather than simply relying on the browser. So dates and 
times are displayed either UTC or user local time. The server defaults 
are not relevant, as only the user details should be used.


OK cracked the first bit - need an '@' in place of the "U"

The thing that I am having a little trouble establishing is the 
correct way to take a UTC unix epoch timestamp from the data and 
display it with the users timezone offset.


$dateTimeZoneUser = new DateTimeZone("user's setting");
$dateTimeUser =
new DateTime( date( "U", $datetime_to_display ), $dateTimeZoneUser );

new DateTime( '@'.$datetime_to_display, $dateTimeZoneUser );

Completing the circle slowly 
$dateTimeUser = new DateTime( '@'.$datetime_to_display);
$dateTimeUser->setTimeZone( $dateTimeZoneUser );


$date = $dateTimeUser->format( DATE_ATOM );


But of cause the bit of the jigsaw I forgot is that this needs 
translating to the correct language. format does not respect 'setlocale' 
setting? How do I get this translated to the users language as well as 
their timezone?



Is giving results wildly different from 2008
So how is one supposed to handle epoch values?
That gives me the correct date - but changing the timezone makes no 
difference to the output - seems to be displaying local timezone only.


I little aside while sorting the lookup table for timezones, 
DateTimeZone::listIdentifiers() apparently should accept a country 
code, but again I can't seem to find out how to make it work. Would I 
expect it to return just values for the country requested?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using DateTimeZone

2008-12-04 Thread Lester Caine

Jochem Maas wrote:

Lester Caine schreef:

Lester Caine wrote:

Lester Caine wrote:

I'm looking to tidy up things a bit by clearing out a lot of old code
and switching to using the internal DateTime functions.

Information is stored in the databases UTC normalized, and we get
around the problem of getting a real tz offset by getting the users
to register it rather than simply relying on the browser. So dates
and times are displayed either UTC or user local time. The server
defaults are not relevant, as only the user details should be used.

OK cracked the first bit - need an '@' in place of the "U"


The thing that I am having a little trouble establishing is the
correct way to take a UTC unix epoch timestamp from the data and
display it with the users timezone offset.

$dateTimeZoneUser = new DateTimeZone("user's setting");
$dateTimeUser =
new DateTime( date( "U", $datetime_to_display ), $dateTimeZoneUser );

new DateTime( '@'.$datetime_to_display, $dateTimeZoneUser );

Completing the circle slowly 
$dateTimeUser = new DateTime( '@'.$datetime_to_display);
$dateTimeUser->setTimeZone( $dateTimeZoneUser );


$date = $dateTimeUser->format( DATE_ATOM );

But of cause the bit of the jigsaw I forgot is that this needs
translating to the correct language. format does not respect 'setlocale'
setting? How do I get this translated to the users language as well as
their timezone?


DATE_ATOM is a locale independent format AFAICT.

Documenting that may be useful ;)
But I switched to other formats and the bottom line seems to be that 
like DATE_ATOM - '@'. is timezone independent, so one has to apply the 
required timezone AFTER loading the 'epoch'. $dateTimeZoneUser is only 
used if there is no 'timezone' information contained IN the supplied 
time? More missing information from the documentation?



secondly, and I think this is rather odd, DateTime uses the same
formatting code as date() ... which only does english, to quote:

http://php.net/date>
   To format dates in other languages, you should use the setlocale() and 
strftime()  functions instead of date().


Yep ... a right pain converting from ADOdb Date structure and format
Along with the problem that DateTime does not handle genealogical dates 
either - which ADOdb::Date does.



and seeing as you don't seem to be able to retrieve the timestamp
that the DateTime object represents in order to feed it to strftime()
you shit out of luck. ... well you could do something like the following
but it makes me feel like maybe one should avoid DateTime until
it's somewhat more flexible/complete:

The problem is how to add daylight saving *TO* ADOdb dates
That is without breaking anything else.


format(DATE_ATOM))), "\n";

?>

BUT what I need is the GMT/BST flag - or the equivalent in that local :(
I'm structuring a question on internals about the things that do not 
work right in DateTime ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using DateTimeZone

2008-12-04 Thread Lester Caine

Lester Caine wrote:

format(DATE_ATOM))), "\n";

?>


Does not work!
Have to do

date_default_timezone_set( $user_timezone ) );
if ( is_numeric( $user_time )) {
$dateTimeUser = new DateTime( '@'.$user_time );
} else  {
$dateTimeUser = new DateTime( $user_time );
}
$disptime = strtotime($dateTimeUser->format(DATE_W3C));
echo strftime( $format, $disptime );

Even to get the right day!

But as yet I have not seen ANYTHING other than English text :(
The next battle is to get it translated.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Firebird Backup

2009-01-07 Thread Lester Caine

Sándor Tamás (HostWare Kft.) wrote:

Hi,

I don't know if it's Firebird or PHP question.

Bit of both - probably worth moving to the firebird-php list
http://groups.yahoo.com/group/firebird-php/

I want to use remote administration on one of my pages, at least do a 
backup for a Firebird database. Because the database file is located on 
a different intranet machine, I have to use service manager to do backup.

So I tried:

$svc_mgr = ibase_service_attach(FBSERVER, FBUSER, FBPASS);
if ($svc_mgr)
{
  $bkp = ibase_backup($svc_mgr, $source_db, $dest_file, 
IBASE_BKP_NO_GARBAGE_COLLECT, true);

}

ibase_service_detach($svc_mgr);

The bad thing: if I include "server:" in $source_db string, it gives me 
an "unkown ISC 0 error".
When I simply put the database alias in $source_db, it freezes the whole 
apache, but at least it starts the backup...
Then, when I turn off verbose, it does nothing at all, but gives back a 
"true" value.


So I think the closest solution is the second one, but does anybody have 
any idea why it shuts down apache? And what can I do to prevent this?


I use Firebird 2.1, PHP 5.2.8 and Apache 2.2.3 on WinXP (as a 
development environment)
ibase_backup is not something we would use normally. I think that things 
have advanced somewhat since the function was created, and I suspect it 
simply does not know about those changes. I've not checked what 
ibWebAdmin does currently :(
One of the nice features of Firebird is the ability to backup while 
still working with the database, and so it's more normal to have backup 
happening as a background task, or via one of the management tools.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Firebird Backup

2009-01-07 Thread Lester Caine

Sándor Tamás (HostWare Kft.) wrote:

Sure, you're right. I wouldn't normally do this, but this is the only way.

I took a look at ibWebAdmin. It simply calls the host machine's Firebird 
gbak utility. So I had to know the exact path to this utility on the 
linux based web server. But I don't know. In fact I don't have any 
access to this machine, only FTP and of course, web.


The PHP installation doesn't even let me to do exec_command().


It's difficult to manage a site when all the best tools are switched off 
:( - I'm surprised Firebird is actually available :)


We probably need to add further testing for the ibase_service_attach 
facilities, and look at what is missing. This is probably one that needs 
a bug opening on the php tracker, but I suspect it's actually an area 
where the fbird_ version of php_interbase may be a required split? Not 
using Interbase, I don't know how different this area of facilities are 
nowadays. One of the reasons for discussion on the php-firebird list so 
we can bounce questions to the firebird development team.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sorry

2009-01-08 Thread Lester Caine

Nathan Rixham wrote:
I keep hitting reply all in thunderbird and double posting; apologies 
for the additional noise (can't promise i won't keep doing it though :p)


Having hit 'reply all' in seamonkey ;)
That is the only way to reply to a number of lists such as the PHP ones. 
You WILL have to keep doing it to reply easily to these lists until a 
'reply list' button appears for those lists that don't like a simply 
'reply'. Personally I'm in the 'this is a list - so should be the reply 
address', but currently the 'I may not want to reply to the list' camp 
has control :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Content Management

2009-01-30 Thread Lester Caine
Jason Todd Slack-Moehrle wrote:
> Hi All,
> 
> I am looking for an open-sourced CMS that is PHP/MySQL based.
> 
> I would like something simple to setup, but also would be good for a
> storefront as I want to use it for my indie business.
> 
> Thoughts?

bitweaver
www.bitweaver.org
'One stop shop' for cms with commerce ;)
(commerce is an add-on not included in the basic downloads)

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simple open source CMS as a starting point

2009-02-12 Thread Lester Caine

dzenan.cause...@wise-t.com wrote:

I need simple CMS sistem that I could use as a staring point (to save some
time in setting up the structure) in developing my own CMS. The code
should be simple to understand so that I can easily get on and start
building on it. It would be of great help if it already had features like
statistics, rss feeds, and multi-language support (visitors can click on
the flag at the top of the page and have the pages display the content in
that particular language), but if it doesn't it's okay I would build them.

For example Joomla seems to be too powerfull, and pretty diffucult to
understand at the coding level in order to customize it to serve my
specific needs.

Does anyone know of any promising open source CMS project that I could use
in this respect?


bitweaver ...
http://bitweaver.org
Just select the packages you want when you install, and add other
facilities latter as you need them ...

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RE: non-auto increment question

2009-02-26 Thread Lester Caine

PJ wrote:

Being rather new to all this, I understood from the MySql manual that
the auto_increment is to b e used immediately after an insertion not
intermittently. My application is for administrators (the site owner &
designates) to update the database from and administration directory,
accessed by user/password login... so there's really very little
possibility of 2 people accessing at the same time.
By using MAX + 1 I keep the id number in the $idIn and can reuse it in
other INSERTS


The real way of doing this is via a facility in the sql standard called 
SEQUENCE. Libraries like ADOdb emulate this for MySQL which does not 
support it. The method provides a unique series of numbers, so that if 
two people are adding things they do not get the same one. As has been 
pointed out, AUTOINC only knows the number after the event, but often 
you DO need to know the number to populate the detail tables, and while 
writing the master and getting the 'last_id' can work, a simple call to 
get the next value of the sequence is tidier.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Database Abstraction Class

2009-03-07 Thread Lester Caine

( Sorry Eric - forgot to change the email address again :( )

Eric Butera wrote:

On Sat, Mar 7, 2009 at 8:04 AM, Michael A. Peters  wrote:

In some earlier thread (I really don't want to dig to find it) I argued for
running mysql_real_escape_string right on the _POST

I must concede I was definitely wrong about that.

The right place to do it is in a database abstraction class that does the
actual insert for you, so that if you need to move your app to a different
DB backend you just need to add the proper support to your abstraction class
for the new DB.

Let it take care of the escaping when it inserts.

Anywhoo, that being said, does anyone have a suggestion for a good database
abstraction class?

Preferably one that already has decent support for several open source
databases?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


PDO.  :)  Anything else is a waste of cpu cycles.


But it only does data abstraction - not database abstraction ;)
ADOdb allows transparent SQL

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] htmlentities is incomplete: does not cover rsquo etc

2009-03-14 Thread Lester Caine

Heddon's Gate Hotel wrote:
Thanks Jan, it's much clearer now.  My knowledge about character 
encodings has multiplied 100-fold in the last 24 hours' research.


Would it be a good idea for the PHP Manual to address some of these 
issues, by explaining good practice in encoding arbitrary user input in 
forms (for example), for the benefit of those, like me, for whom 
character sets are a bit of a black art?


Also I still cannot persuade get_html_translation_table to list those 
non-Latin1 entities.  This is not an important issue, since it appears 
to be only an information function, but it would be nice if it were 
consistent with htmlentities and html_entity_decode.


This probably one of the reasons some of us think that getting a stable 
PHP6 based on unicode out of the door would probably be a lot more use 
to people than PHP5.3 ;)

Eliminate character sets and the black art goes away?

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQL -- finding whether there's a transaction started

2009-04-26 Thread Lester Caine

Bogdan Stancescu wrote:

Hello list,

I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits the existing
transaction, and setting a savepoint silently fails outside
transactions. And I was unable to find any non-destructive way of
retrieving that information -- is there any?


I don't use MySQL, having been embeded with a 'real' database since 
before MySQL even thought about transactions ;) but your question does 
not make sense from a functional point of view.


The whole point of a transaction is to bundle together a packet of work. 
If any part of the packet fails, then it can be rolled back to a known 
place. If you are doing a package of work within your library, you would 
use your own transaction. If you are processing data for a higher level 
function, either that function would pass you the transaction handle, or 
IT would handle your return and roll back or carry on as required.


Or am I simply missing something because MySQL still does not ACTUALLY 
support real transactions? ( This discussion may be better on the 
PHPDatabase list )


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] shell_exec problem with bsdtar

2009-05-13 Thread Lester Caine
I'm trying to emulate Linux facilities on the windows servers, and have 
found bsdtar can be renamed tar.exe so that it will work the same as a 
shell_exec( "tar" ) call in Linux.


The full paths are used to the files and the command line returns the 
extracted file name when run at a command prompt, and similar commands 
for unzip and unrar work fine, later in the check list, but using the 
'tar' and also 'bsdtar' command simply returns NULL, and the extracted 
file is not created.


Any ideas what I've got wrong?

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] shell_exec problem with bsdtar

2009-05-14 Thread Lester Caine

Lester Caine wrote:
I'm trying to emulate Linux facilities on the windows servers, and have 
found bsdtar can be renamed tar.exe so that it will work the same as a 
shell_exec( "tar" ) call in Linux.


The full paths are used to the files and the command line returns the 
extracted file name when run at a command prompt, and similar commands 
for unzip and unrar work fine, later in the check list, but using the 
'tar' and also 'bsdtar' command simply returns NULL, and the extracted 
file is not created.


Any ideas what I've got wrong?


OK - had a sleep on it, and started again fresh.

The bottom line is that WHAT shell_exec returns is rather variable. 
There is a comment about returning windows errors on the manual page, 
but in fact 2> may not JUST contain errors, it also has the normal 
return from some programs. So 2> 'output' may be generally required to 
find out what has been returned, if the shell_exec return is NULL.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WHY ARE lists.php.ne USER EMAIL BEING PUBLISH ON THE INTERNET

2009-05-22 Thread Lester Caine

Andrew Williams wrote:

WHY IS php-general@lists.php.net PUBLISHING USER EMAIL ON THE INTERNET:

http://www.google.co.uk/search?q=sumitphp5%40gmail.com&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enGB303GB303&aq=t


Many private lists are redistributed via archive services. Not a lot we 
can do about it as the information is quite open. When you have been 
around a few more years you will reach a decent figure on your own email 
name search ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] General Web Development Editor/IDE

2009-05-24 Thread Lester Caine

Casey wrote:

Hi list,

I'm looking for a nice, user (i.e. me) friendly general-purpose IDE,
where most of my work will be done in PHP.

I'm considering using Dreamweaver CS4 as my IDE, where I will disable
most of the WYSIWYG elements and use all of the other features that I
need/want (contextual syntax coloring and project management).

But before I try that, are there any suggestions from all you experts out there?


Eclipse + PHPEclipse and you don't even have to worry about the 
windows/linux question. Runs transparently on both ( apart from the path 
differences ) and you can handle all of the extra things such as html, 
css, phpdoc, xml ... without moving outside the IDE.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php dev environment

2009-05-24 Thread Lester Caine

Paul M Foster wrote:

On Sun, May 24, 2009 at 10:32:23AM +0100, Nathan Rixham wrote:


Hi All,

A recent post just reminded me of something I did a while ago that may
be of use to many of you (and its sitting doing nothing), it's a kind of
how to for getting a full development environment up and running simply.


Eclipse PDT 2 + extras
http://wiki.voom.me/wiki/Eclipse-PDT2-Perfect-Setup

Subversion auto props
http://wiki.voom.me/wiki/SubversionAutoProps

PHP Tools - XDebug, PHPDocumentor, PHP Code Sniffer, PHPUnit
http://wiki.voom.me/wiki/VoomWorkingEnvironment#SettingUpTheLocalPHPPEAREnvironment

(Ubuntu Specific - Continuous Integration)
XDebug, PHPDocumentor, PHP Code Sniffer, PHPUnit, Cruise Control,
phpUnderControl
http://nathan.voom.me/wiki/PHP-ContinuousIntegration

All that should save a few days of work setting up configuring and
exploring.

Servers & Bandwidth courtesy of Dan Brown @ Parasane - thanks mate.
http://parasane.net/

Hope it helps somebody!


That's no development environment! There's no Vim! ;-}


http://www.viplugin.com/viplugin/

But the above list does need PHPElipse rather than PDT ;)

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php dev environment

2009-05-25 Thread Lester Caine

Lester Caine wrote:

Paul M Foster wrote:

On Sun, May 24, 2009 at 10:32:23AM +0100, Nathan Rixham wrote:


Hi All,

A recent post just reminded me of something I did a while ago that may
be of use to many of you (and its sitting doing nothing), it's a kind of
how to for getting a full development environment up and running simply.


Eclipse PDT 2 + extras
http://wiki.voom.me/wiki/Eclipse-PDT2-Perfect-Setup

Subversion auto props
http://wiki.voom.me/wiki/SubversionAutoProps

PHP Tools - XDebug, PHPDocumentor, PHP Code Sniffer, PHPUnit
http://wiki.voom.me/wiki/VoomWorkingEnvironment#SettingUpTheLocalPHPPEAREnvironment 



(Ubuntu Specific - Continuous Integration)
XDebug, PHPDocumentor, PHP Code Sniffer, PHPUnit, Cruise Control,
phpUnderControl
http://nathan.voom.me/wiki/PHP-ContinuousIntegration

All that should save a few days of work setting up configuring and
exploring.

Servers & Bandwidth courtesy of Dan Brown @ Parasane - thanks mate.
http://parasane.net/

Hope it helps somebody!


That's no development environment! There's no Vim! ;-}


http://www.viplugin.com/viplugin/

or http://www.vimplugin.org/


But the above list does need PHPElipse rather than PDT ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] change server time

2009-05-25 Thread Lester Caine

Sumit Sharma wrote:

Hi,

What I mean is my windows time is set to local time but when I use any date
function in PHP it shows time in GMT on web browser and to change this I
have to use putenv("TZ=asia/calcutta");

Thus:

1 There is no problem with Windows time its according to IST.
2 Problem start with PHP, which displays GMT time by default.
3 To solve this I was advised to change the OS time which is already
changed.

Now I am not aware how the php date functions picking GMT time and from
where?


Basic time is always UTC ( GMT is the same ) and so unless you TELL it 
otherwise, PHP displays UTC. That way if you have clients accessing from 
different time zones they get a consistent time.


If you want to display a particular time zone for a client, then you 
need to know what timezone that client is in, which is where 
"TZ=asia/calcutta" sets it globally for your site. Windows does not 
provide sufficient data to identify the timezone and so PHP defaults to 
it not being set.


http://us2.php.net/manual/en/book.datetime.php covers the date functions 
that were added in PHP5.1, and which replace the earlier methods since 
they actually handle daylight saving as well, something that TZ and the 
earlier browser based time zone information simply ignores ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP vs ASP.NET

2009-05-28 Thread Lester Caine

Olexandr Heneralov wrote:

Hi!
Guys, you of course, know that  ASP.NET becomes more and more popular in the
world.
I have a question for everyone:
Can it happen so that PHP will be replaced with ASP.NET?


Perhaps when it runs on Linux servers?
Personally I'm moving more stuff OFF Windows servers and onto Linux than 
the other way.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [php] unable to use rar_open ()

2009-06-23 Thread Lester Caine

HELP! wrote:

I have install the windows
php_rar.dll<http://kromann.info/php5_2-Release/php_rar.dll> extension
model in window  but I have problem using the functions

function extractZip( )
{
   $rar_file = rar_open('example.rar') or die("Failed to open Rar archive");
$entries_list = rar_list($rar_file);
 print_r($entries_list);
}
extractZip( );

*Fatal error*: Call to undefined function rar_open() in  on line *4*


Have you catually enabled it in php.ini?
And restarted Apache/IIS ?
--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mysql_query blocking

2009-06-28 Thread Lester Caine

Daniel Kolbo wrote:

Hello,

When a MySQL table is locked a php call of mysql_query() that requires
that table will hang as the request blocks at the MySQL server until the
table is unlocked.  Is there a way to stop a mysql_query from hanging
(by setting a time limit)?


Daniel
I can understand you asking the question here, but I suspect that the 
answer may come better from a list who has people who are more expert in 
MySQL?


Personally - with Firebird - this is not a problem that ever arises 
since 'locking' is not something one would normally do and has only 
appeared IN Firebird because people 'expect' that is how a database 
works. Even if using it would actually be wrong :) The problem is that 
the database is the problem rather than PHP, hence the questions about 
which type of tables you are using in MySQL.


From my personal experience, it's the way that you are using the 
database that may be wrong if it relies on 'locking' to achieve 
something that is not properly managed IN the database. Any database can 
provide 'locking', if that is really required, by additional flagging in 
the database - if the database itself does not provide the function 
properly. Such as setting an 'edit' flag on a record showing who is 
changing it, which can then be used to advise that fact to other users.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] exasperated again - shot in the foot

2009-07-01 Thread Lester Caine

Stuart wrote:

3) Google/Bing it (yeah, Bing's never gonna catch on like that!)


Of cause it would be nice to see the Bing clockwork toys that run it ...
I couldn't help giggle when they announced they were naming it after a 
toy manuafacturer :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Apache module PHP 5.3 on Windows

2009-07-02 Thread Lester Caine

Jonathan Tapicer wrote:

What version, VC6 or VC9, TS or NTS? I use VC6 TS and the dll is there...


Of cause no one has asked yet which version you use if you have to test 
BOTH Apache and IIS ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Obeying the rules (was Simple login form with cookies)

2009-07-09 Thread Lester Caine

Tony Marston wrote:
Where I put my answers depends on the context, so saying that IT MUST ALWAYS 
BE AT THE BOTTOM doesn't wash with me.


That is a sentiment I would agree with - but for one flaw!
The number of people who seem to think that answering with a single line 
at the top and then including all the advertising and dross that the 
previous top posted failed to trim as well 
Top posting has a bad press simply because people are too lazy to think, 
and in many cases, INCLUDING the original message is a waste of 
everybody's time ... the one liner is adaquate!


The rule should be - if you top post then CHECK that the the rest of the 
message NEEDS to be included - please .


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book

2009-08-07 Thread Lester Caine

Tony Marston wrote:
Don't be so pedantic. PHP 6 does not exist in a live, production-ready 
version. It is still under development and has not even reached the beta 
stage. Anyone who writes a book which documents the features of PHP 6 is 
being very premature as those features may change at any moment. The 
features will not be frozen until the first GA release.


Actually has anybody seen a copy of the book? Does it cover anything other 
than the original roadmap for PHP6? It certainly will not have any correct 
examples for 'namespace' since they were not even documented at the end of 
2007 ( I assume that the book took more than a few months to update an print 
in April 2008 )


Of cause the debate needs to be 'What is holding up an alpha release of PHP6'. 
Much of the talk some years ago WAS of that happening 2007/8 and at that time 
I had been running a PHP6 development machine for some time. It's probably 2 
years since I updated it, since there was little point in doing any more 
testing at present?


As far as I am aware the hold-up is still as to whether PHP6 should simply be 
native Unicode? My personal view is that this IS the correct way forward and 
that PHP5.?.? remains as the single byte character version in parallel? Even 
though 'English' is the only language I use, my customers are world wide, and 
while Unicode character strings can be handled quite happily in PHP5, the 
simple fact that you have to ask 'is this Unicode' and use a different set of 
functions should not be a factor nowadays?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where is interbase.dll?

2009-08-13 Thread Lester Caine

Sándor Tamás (HostWare Kft.) wrote:

Hi,

I downloaded PHP 5.3.0, and since then I can't use fbird_connect. When I 
inspected the installed files, I realized that php_interbase.dll is not there!
Where is it? Or where can I get it?


http://tech.groups.yahoo.com/group/firebird-php/files/
The discussion on the problem with this in windows is also on the php-firebird 
list.


Bottom line - for a number of useful php extensions - is to stick with 
PHP5.2.x for the time being. The change of rules for PHP5.3 has blocked a 
number of extensions from being built since they require VC6 or VC9 versions 
of everything.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Another date exercise

2009-08-16 Thread Lester Caine

tedd wrote:

Hi gang:

Here's another exercise to consider.

This is a date entry problem where the user can enter a date in various 
forms, but the return will be in a consistent format.


For example, a user might enter a date in the form of:

August 5, 2009
Aug 05 2009
Aug 5, 9
08/05/09
8-5-9
8 05 2009
8,5,9

Or any combination thereof.

However, the resultant date will be standardized to: Aug 5, 2009.

Extra points for solving this for Euro as well as US date formats (i.e., 
5 Aug, 2009 vs Aug 5, 2009).  And, extra extra points for accommodating 
month brevity, such as "A" for August and "Mar" for March and so on.


But the real problem here is 05/08/09 is still August 5 2009 .
So teaching customers to use 2009.08.05 removes the hassle of needing to know 
where your target site is based!


But as has been said, the real solution is a date picker.

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2009-08-25 Thread Lester Caine
mike bode wrote:
> I have posted the question in another thread a bit down, but only buried
> within the thread, so please excuse me when I ask again.
> 
> I want to use some PHP code from a web site
> (http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm), and I am
> following their instruction how to implement it.

Mike it is probably worth pointing out that PHP5.3 has a LOT of changes
that will be flagged with warnings when running PHP5.2 or earlier code.
Since it will be some time (if ever) before the existing code samples
are updated, then switching display_errors off in php.ini will be the
only way of hiding them. This does not help of cause if you ARE trying
to do additional development and these additional error messages get in
the way :(

Certainly some major projects are simply not yet compatible with PHP5.3

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] which CMS are you using and why?

2007-04-08 Thread Lester Caine

Fernando Cosso wrote:

Well that's the question.
I have to start a new project and I have to decide the CMS.
I have thought mambo will do, but looking at the documentation, it
disappointed me a little.
I need a documentation with examples of the objects, functions and all that
stuff. The project has to be mature (That why I like mambo). The cms has to
be flexible, with a very large community.


bitweaver
www.bitweaver.org

--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] keeping credit card info in session

2007-04-08 Thread Lester Caine

[EMAIL PROTECTED] wrote:

Thanks a lot every one. These are great replies.

I guess I should have explained a bit more about what I'm doing.

first of all, this is not my site, it's for a client of mine.

second, I did suggest using a paypal API or a paid site to take care of this, 
but my client said no. She has a credit card processing account and how she 
works with it right now, is that interested users email her, she calls them, 
gets their credit card info and charges their card manually without the card 
present.


so, this is not really my problem, it's what she's been doing before and wants 
to continue doing. All she asked me to do is that as part of the form that 
people send their requests through, now she wants their credit card info as 
well. So that she doesn't have to call them.


Then *SHE* has to obey the rules laid down by the provider of that service. 
She may well be breaking the rules if she does not take the card number over 
the phone. The second you ask for a credit card number electronically you need 
*ALL* of the security you can get. I have seen a number of cases of sites that 
did not follow the rules and within minutes of a transaction being completed 
the card number is being used on the other side of the world 
( My next door neighbour got stung after using the British Airways site - one 
you would have expected to be secure )


And the reason I'm keeping cc info in the session for a few steps, is to take 
them to confirmation page, and then the reciept page. and after wards, I want 
to keep it in there untill the client logs in to the admin page and sees new 
requests, charges them and then deletes them for ever.


So now I've got two different responses, some people say do it, but use 
encryption/decryption methods, and some people say don't do it. But if I don't 
do it, that means I tell my client that I can't do it and I lose the job.


Some jobs you do walk away from. One has to know when it is worth all the time 
you are going to pump into solving a problem that you will not actually get 
paid for. If YOU are setting up the security for using Credit Cards *YOU* may 
well be held liable when it gets cracked. So it is safer to pass the risk to 
the card companies where possible and use an existing security system where 
someone else takes the blame.


Starting point - what does it say in the agreement that your client currently 
has with her credit card account?


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Design Dilemma - Database Data Abstraction

2007-04-09 Thread Lester Caine

Martin Alterisio wrote:

I have a dilemma on a design where I humbly ask your help. I'm working on
the model part of a web application (not to be understood in the "web2.0"
way, but in a more general way, where anything mounted on HTTP is a web
application) done in PHP5 following the MVC design pattern. But the strong
point is that the result must be those-who-never-RTFM-proof. But that's not
my dilemma, I only mention this so that no RoR concept or similar is thrown
into the table, that is, NO ActiveRecord.

The solution I presented is to access, and act upon, a database as if they
were PHP arrays, meaning that a table is presented as an array of records.
Here comes my dilemma. But first let me explain a bit about the scenario so
far:


I snip there - too much detail without defining the problem ;)

Database Data Abstraction normally refers to using a common internal structure 
which can be loaded from a range of database engines. It sounds as if you have 
no requirement to 'Abstract' the database, only to come up with a persistent 
object layer under a single database engine?


You have indicated that you are looking for a multi-user system, and so the 
raw data must be in the database, but as you have seen, the flexibility 
afforded by any database engine is difficult to duplicate. The thing to 
remember is that you should ONLY be reading the data you need for the current 
user, and so your persistent objects do not need to be as complex as you seem 
to be looking for. It is always faster to ask the database for an answer than 
to copy everything to PHP in order to work with it. With any decent database 
you can provide views of the data in a suitable format for the arrays you need 
display on the user interface.


I tried to find something suitable to point you at, but it's difficult
http://www.appelsiini.net/~tuupola/php/DB_DataContainer/
Is probably in line with your current outline?

--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine

Satyam wrote:
Store all of your dates as GMT. Perform all date based calculations 
around GMT also, and then offset the values for localised display only.


This way you only need to store the GMT offsets for each user, i.e. 
GMT+1 or GMT-8 when it comes to displaying the dates to them. The 
trick is to use a constant base date for all data, and only being the 
user timezones into play when needed.


Actually, I find that it is better not to bother storing anything for 
the user at all.  At the first chance, get some JavaScript to read the 
local time of the client machine and send it back to the server, either 
with the login data, using some AJAX or along with any link the user 
might click on the welcome screen, for example, the language choice.  
Then use the offset from his local time to the server time for every 
time information, substract it from any time information you read from 
them, add it to anything you send them.  This works whether the user is 
registered or not, whether he/she travels or remains in the same time 
zone and spares you the trouble of keeping your IP to country to 
timezone table updated.  It assumes that the user updates the time zone 
on his/her machine and if he doesn't it means she doesn't care, so why 
should you. (some travellers prefer to keep their portable machines set 
to their home-base time zone)


Of cause the major fault with this is that it can only display the CURRENT 
time offset. You *ALSO* need the users Daylight Saving Zone as well. This has 
been giving us great fun since the winter dates and times need a different 
offset to the summer ones. Something that simplistic browser time offset does 
not supply. :(


The only way to get this working properly at present is to get the user to set 
their time/daylight settings in their profile, and then you can provide the 
correct offset for all days on a calendar. Remember that for users WITH a 
daylight saving offset, one day each year has 23 hours and one 25 hours ;)


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine

Satyam wrote:

Of cause the major fault with this is that it can only display the 
CURRENT time offset. You *ALSO* need the users Daylight Saving Zone as 
well. This has been giving us great fun since the winter dates and 
times need a different offset to the summer ones. Something that 
simplistic browser time offset does not supply. :(


The point is that you don't store the time offset in any user profile or 
anywhere but a session variable, which you keep for the duration of the 
session so it lasts only while the user is connected, whether logged in 
or not, profile or not.  Next time he/she connects you get the new 
offset.  If the time has changed due to daylight savings or the user 
travelling elsewhere, you'll get a new offset.


The only time it fails is if the user is connected while the time switch 
is happening, but so will most of the clocks, watches and whatever is on 
at the time.


Please read what I wrote.

The time offset from the browser is only of use to map CURRENT time. It is no 
use to display dates and times stored in the database that are reliant on the 
daylight saving offset. If TOMORROW is after the change in daylight saving, 
then the browser offset will not give you the right offset for tomorrows. The 
problem is convincing people that there *IS* a real problem, and trying to 
display the correct times JUST from a timezone offset is wrong for at least 
half of the year! You need to know that the time is changing tonight so that 
you can display tomorrows calendar correctly?


--
Lester Caine - G8HFL
-
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] User Account Management

2009-09-11 Thread Lester Caine

Waynn Lue wrote:

Hello all,

We're building out a system that allows for user account creation/password
management, and we're hoping to use existing open source software so we
don't have to reinvent the wheel.  I know of Drupal, and Zend Framework (and
maybe CodeIgniter?), but do people have specific preferences for either, and
recommendations for other products that I haven't heard of?  It should just
support basic account creation, being able to login/authenticate, change
your password, storing user information like names and email addresses, etc.

I tried searching for "account management php" but ended up getting a lot of
CMS suites.


That is because this is a - how long is a piece of string type question ;)

PEAR has the AUTH package which is supposed to provide authentication, 
but still needs a certain amount of 'wrapping' to make it usable.


The question has to be 'What are you wanting to secure?'

Personally I'm using bitweaver - which is a CMS system, but I have my 
own modules added to it to provide the functions I want, while bitweaver 
itself provides user management, content editing with full history in 
various wiki or html formats, mime handling and all the other generic 
bits. You just add the bits you want, or pinch a module and adjust it to 
your own purposes - without needing to worry about the core functions :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PDO with text in BLOB's

2009-09-13 Thread Lester Caine
I'm having fun with a project that has moved exclusively to PDO, and I'm 
now trying to restore firebird as an alternative database. The problem I 
am having is with text fields in firebird which are BLOB SUB_TYPE TEXT. 
These are essentially TEXT in other databases, and I'm used to ADOdb 
simply loading them with text strings what ever the database is using 
behind them. On PDO it would seem that these fields can only be 
connected to streams? How does one load a simple long string into one of 
these fields?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] שנה טובה!

2009-09-20 Thread Lester Caine

Dotan Cohen wrote:

I think this is an English language list.


The OP was just wishing everyone a happy new year. I then replied back
asking him not to CC the list with such matters, but in a flash of
brilliance CCed the list (bad, gmail, bad!) myself. I apologize.


Actually all that was needed was an extra couple of lines in your reply 
- in english ;)


Had it not been a case of 'happy new year', and someone was looking for 
help getting directed to the right place, then the occasional message 
here should not be frowned at. Being totally linguistically challenged ( 
even in English ;) ) I do understand the frustration when the best 
support seems to be in another language. Especially when 'google' 
directs you to those pages even with 'English' is selected!


And knowing that there is a large Jewish presence in PHP - I believe 
'Rosh Hashanah' is the correct translation?


On a more serious note - but I'm not actually complaining this time - 
can we please get back to a roadmap to get PHP6 out of the door! Even 
only using ASCCI internally, the amount of contact details that are 
filling my own address book that require Unicode makes me glad that at 
least the linux desktop is unicode agnostic and can handle these 
messages! So isn't it about time we had a version of PHP that does not 
require 'jiggery pokery' to cope with any text?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbie: Array of objects iteration

2009-10-08 Thread Lester Caine

Fernando Castillo Aparicio wrote:

I think you are just looking for the key in the wrong place. Try:

foreach ( $records as $record ) {
foreach( $record as $column=>$value ) {

echo "$column is $value\n";
}
}

You've got the columns names in each record, not in the global recorset.


print_r($record); often helps - you can see what is actually returned 
and check that you have names rather than numbers for the fields ;)


print_r($records); becomes a little large if you have a lot of results 
so use with care :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_SESSION variables

2009-10-24 Thread Lester Caine

Ron Piggott wrote:

Instead of doing:

$_SESSION['order'][$reference]['quantity'] = 0;

Is there a way to get remove that part of the array altogether?


unset?
unset($_SESSION['order'][$reference]['quantity']);

Can't seem to reach php.net to confirm, but I use it myself ;)

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: What PHP version are you using?

2009-11-02 Thread Lester Caine

Israel Ekpo wrote:

On Mon, Nov 2, 2009 at 2:15 PM, John Black wrote:


Bob McConnell wrote:


I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
the proprietary bits. I don't understand why they are so far behind on a
build that was just released last month, but our hosting service only
provides what's in the official release.


I just check the CentOS repo and the repo lists
php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
So CentOS is as upto date as RedHat, the way it should be.


That is not good.
5.1.6 was released in August 2006.
More than 3 years ago. There are a lot of bug fixes since then
http://www.php.net/ChangeLog-5.php
It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.


There are very good reasons why a 'long time supported' build does not 
keep replacing packages all the time. It is gauranteed NOT to change 
them, so compatibility problems introduced by PHP such as the 'date' 
problem will not come up and bit ANY of their customers.


I believe that there is a new version due on a couple of 'long time 
supported' distributions, but the current 'instability' with PHP5.3 
potentially requiring changes to deployed applications is the sort of 
thing that these builds are supposed to avoid. I'll be staying with 
5.2.x for a while simply because I know that is stable with my current 
code base.


So it IS good that a stable and understood build of PHP is used as no 
one would gaurantee that later builds will not introduce problems - 
especially following a change of minor versions.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Wiki recommendation?

2009-11-26 Thread Lester Caine

Skip Evans wrote:

Hey all,

Thanks much for the recommendations. I'll check them out.

We don't need fine grained control over access; basically admins that 
can modify content and the public who cannot.


But right now DocuWiki is sounding good, and I'd rather, for some 
strange reason, not use a DB, although I can't justify that in any 
rational way. I mean, MySQL is already on the machine.


Perhaps good enough reason for NOT wanting to use a database ;)
Although a lot more stable than it used to be - but until one can run a backup 
transparently at intervals is it really suitable for live data? My own live 
sites just mirror to a backup machine including a backup of the database 
automatically.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP APACHE SAVE AS

2009-11-27 Thread Lester Caine

Julian Muscat Doublesin wrote:

Hello Everyone,

I have installed PHP, Apache and MySQL on a Windows 7 machine :(. I
would prefer linux or unix :)

These have been setup and working correctly. However when I access a php
page. I get the save as dialog. Has anyone ever experinced such a situation.
Can anyone please advise.

Thank you very much in advance.


Apache obviously does not know how to handle the .php files, so you need to 
update httpd.conf so it can both handle them and load php.


Things get a little tricky depending on WHICH pache and php which you do not 
say, but http://uk3.php.net/manual/en/install.windows.apache2.php should point 
you in the right direction ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2009-12-01 Thread Lester Caine

Lars Kristiansson wrote:

Hi!

This is probably the wrong forum. Please redirect me if im out of place.

I would like to find out what IP address my visitor uses when visiting a 
php script page on my domain. This page would contain a form in which 
the visitor would state his/her message.


My goal is to create purchase-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?


http://uk3.php.net/manual/en/reserved.variables.server.php
'REMOTE_ADDR'

But don't rely on it to be the same each time for a customer. If they are on a 
shared connection then the ISP may give them a different IP each time they 
access the internet.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] logic operands problem

2009-12-07 Thread Lester Caine

Merlin Morgenstern wrote:
You have described the problem very well. This is exactly where I can 
not find a solution.


the page number translates to the following: 1= first page 2= following 
pages 3= all pages


This are the options a user has while booking a product on my site. Now 
if ther is a new
client that wants to book all pages, I need to query the table to find 
out if the spot is available.
The spot would be full if page 1 has more results then 3 , OR all 
following pages have more then 3 results. So to find out if "all pages" 
option would be available I need to query the db to retrieve all 
results, that are (page = 3) OR (page = 1 XOR 2)


Am I wrong?


Yes I think you are! And XOR may be wrong here. XOR is a binary operator, so 
think of the number as 0b0011 for 3 0b0010 for 2 and 0b0001 for 1 ...

1 XOR 2 will give a result of 0b0011 - so = 3

What you are trying to do just seems wrong in general.
'if page 1 has more results then 3' requires you count the number of page 1 
records and compare with the number of page 3 records. And the same with page 2 
results.


I don't think you are giving enough detail to know exactly what you are trying 
to achieve, but what you are describing so far does not make sense 'logically'. 
If you are trying to book a 'set' of pages but can't if one of that set is 
already booked, then I don't think you can do this with a single query. You need 
to check each 'page' individually. If this was room booking, then one would have 
to check there are no other bookings for a day in the period for that particular 
room. Or putting it another way, there are no days in the period when all rooms 
are booked, but in this case you still need to know that a particular room is 
available for the whole period.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP 5.3 Code Documentor

2009-12-10 Thread Lester Caine

Andrew Mason wrote:

Hi all,
Is anyone aware of a code documentation generator like phpdoc or
doxygen that supports the PHP 5.3 namespaces ?

I tried adding support to doxygen myself but didn't have a whole lot
of luck and didn't have huge amounts of time to spend on learning
flex/yacc.


Well it is on the todo list for phpdoc's but I don't think anybody has time to 
implement it :(
That and the fact that many of us are still on 5.2 for various reasons and can't 
test it ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQL Appeal from Monty

2009-12-13 Thread Lester Caine

Lenin wrote:

You might also like this:
Come on Monty - Lukas Smith http://bit.ly/5lmwwD


I've been watching some of this debate with interest, but I'll stay with a 
database that has none of the baggage that MySQL has always had, and IS 
currently replacing Oracle in many large sites :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with XPath query

2009-12-14 Thread Lester Caine

Christoph Boget wrote:

You are missing a quote after widgetType:


Yeah, I realized that about 2 minutes after I sent the message.  Man,
I'm dumb. :p  I was banging my head against the wall for a while
because of that.  I guess when you bring your stupidity public, you'll
find the solution yourself that much quicker. ;)


I often find that it's quicker to ask - because invariably the answer presents 
itself the second you hit send ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQL Appeal from Monty

2009-12-14 Thread Lester Caine

Philip Thompson wrote:

On Dec 14, 2009, at 12:51 AM, Lester Caine wrote:


Lenin wrote:

You might also like this:
Come on Monty - Lukas Smith http://bit.ly/5lmwwD

I've been watching some of this debate with interest, but I'll stay with a 
database that has none of the baggage that MySQL has always had, and IS 
currently replacing Oracle in many large sites :)

--
Lester Caine - G8HFL


Do share your db of interest... (and please don't say MSSQL).


It's on my sig 
Firebird
It was Jim Starkey who wrote the original code for it and who MySQL poached to 
try and create a version of MySQL with the same power. Something which has not 
been completed.

I've been running Firebird since it's closed source Interbase days last century!

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What is the difference between the two streams 5.3 and 5.2 versions and What is the need for maintaining two streams?

2010-01-04 Thread Lester Caine

Varuna Seneviratna wrote:

Since there are two stable versions 5.3 and 5.2 .What is the difference
between these two streams and What is the need for maintaining two streams?


PHP5.3 introduced a number of 'improvements' that require many third party 
packages to be re-worked. Something which has still to be completed in many 
cases. In addition a number of key parts are not now available in Windows builds 
of PHP5.3, so many of us do not have the option as yet to switch TO the 5.3 
branch in production. Until PHP5.3 is fully supported and complete, 5.2 still 
needs to be maintained!


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] parse date field

2010-01-14 Thread Lester Caine

John Taylor-Johnston wrote:

How do I parse a date field from mysql?

I was hoping this would work:

$mydata->birthday = "2007-02-13";
This just stores a string to the variable $mydata->birthday - where did you 
define $mydata->birthday as a data object?

$mydata->birthday = date("2007-02-13");


#What month is it?
echo date("F", $mydata->birthday);
#What year is it?
echo date("Y", $mydata->birthday);

What am I missing? All I get is December 1969. Hmmm?

I am looking at the manual:
http://ca.php.net/manual/en/function.date.php
http://ca.php.net/manual/en/function.mktime.php
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Open Source CMS

2010-01-21 Thread Lester Caine

Hendry wrote:

Hi,

Anyone can share your favorite PHP open source CMS to work with and
what's the reason? I'm looking for something that easily extensible.
I've googled and found severals but I'm still confused, some from the


Bitweaver is nice and modular, load what you want to use, wiki, articles, forum, 
blog, galleries etc. OR take a package and tailor it for your own needs 

bitweaver.org

If you must - it will work with MySQL, but it handles all the good databases as 
well :)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2010-01-25 Thread Lester Caine

SED wrote:

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.


http://uk.php.net/manual/en/function.tempnam.php any use ...

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Do you use a public framework or roll your own?

2010-01-26 Thread Lester Caine

Daevid Vincent wrote:
 
I'm not looking to start a holy war here or re-hash the tired debate. 
I just want some hard cold numbers to look at.


"Do you use a public framework or roll your own?"
http://www.rapidpoll.net/8opnt1e


I'm not sure quite what to answer here. I've been using bitweaver for some time 
now, but I'm not sure that I would classify it as a 'public framework' since I 
also roll my own packages to go with it. It think I need a 'Tailor your own from 
open source project' ?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] database abstraction layer

2010-02-02 Thread Lester Caine

Lars Nielsen wrote:

Hi List

I am trying to make a Database Abstraction Layer so I can which the DB
of my application between MySQL and Postgresql. I have been looking at
the way phpBB does it, and it seems that it is only then php-functions
which are different. The SQL seems to be the same.

Is it save to assume that I can use the same SQL, or should i make some
exceptions?


Simple SQL is almost identical. But there are many of the more advanced 
functions that have major differences. Check out ADOdb for an existing 
abstraction layer that handles a lot of them.

http://adodb.sourceforge.net/

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] database abstraction layer

2010-02-03 Thread Lester Caine

Ashley Sheridan wrote:

On Tue, 2010-02-02 at 23:19 +0100, Rene Veerman wrote:


function getMax($table, $field)


If I saw this sort of code I'd be appalled! It's possibly the worst way
to get the auto increment value. You won't notice it testing the site
out on your own, but all hell will break loose when you start getting a
lot of hits, and two people cause an auto increment at the same time!


ADOdb handles SEQUENCE correctly across all databases. Since MySQL does not 
understand SEQUENCE or GENERATOR, ADOdb simulates it with a dummy table which 
autoincrements and gets around the problem. Then one can use a secure generic 
GetID ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Manual problems

2010-02-09 Thread Lester Caine

James McLean wrote:

On Wed, Feb 10, 2010 at 2:26 PM,   wrote:

On Thu, 04 Feb 2010 02:39:03 +0100, joc...@iamjochem.com (Jochem Maas) wrote:

as for using IE6 ... WTF ... you do realise this is essentially a web 
developers mailing list right?

The interesting things in my websites go on behind-the-scenes, in the PHP, and 
produce
relatively straightforward HTML. I have avoided the well-known bugs in IE6, and 
think my
webpages display correctly on any of the modern browsers, but as Microsoft 
delights in
rearranging everything in every update, and making the features you need ever 
harder to
find, I stick to IE6 for my everyday work.


Wow. Ignoring the issue that IE6 will soon be EOL (finally), and
ignoring how bad it is at handling anything even remotely modern, your
workstation must be a haven for virii, spyware and malware... IE6 has
just about the worst security track record out there, at least on the
desktop anyway.

If you must have IE6 for whatever reason, stick it on Windows
installed on a VM and upgrade your main workstation browser to
something more recent. At least a VM can be backed up at a known-good
point and if^H^Hwhen it gets compromised it can be deleted easily and
replaced with your backup.

I'll make it easy for you: http://www.getfirefox.com :)


Since a large section of our USER base is still tied to W2k and does not have 
access to install other software, the call for IE6 to die is STILL somewhat 
premature!
What is needed is someone to kick M$ to sort the mess out by at least allowing 
IE8 to install on W2k machines, rather than telling hundreds of councils they 
have to replace ALL their computers :(


The alternative is to convince M$ controlled councils that Firefox is OK and 
that using it will not invalidate their contracts - but then all the work 
currently being done to convert legacy setups to work with *IE7* would have to 
be scrapped and reworked on Firefox. Many of my customers have only just got 
funds to start an *IE7* roll out! Redoing all that work for IE8 is yet another 
problem for which money is not available.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Manual problems

2010-02-10 Thread Lester Caine

Shawn McKenzie wrote:

Lester Caine wrote:

Since a large section of our USER base is still tied to W2k and does not
have access to install other software, the call for IE6 to die is STILL
somewhat premature!
What is needed is someone to kick M$ to sort the mess out by at least
allowing IE8 to install on W2k machines, rather than telling hundreds of
councils they have to replace ALL their computers :(

The alternative is to convince M$ controlled councils that Firefox is OK
and that using it will not invalidate their contracts - but then all the
work currently being done to convert legacy setups to work with *IE7*
would have to be scrapped and reworked on Firefox. Many of my customers
have only just got funds to start an *IE7* roll out! Redoing all that
work for IE8 is yet another problem for which money is not available.


Support of any type for Win2K is over in 5 months.  Better upgrade.


With ALL councils in the UK having to cut jobs to meet their budget allocation, 
there is no way they can afford to waste money on replacing perfectly functional 
kit! I'm at a site in the morning that have just MOVED dozens of W2k machines 
into their relocated support office simply because replacing them is out of the 
question. They are closing down an office to save money! Simply because M$ say 
something is not a good enough reason to waste money. YES going open source 
would be a very good idea, but then all the staff would have to be retrained and 
that is another budget string with no available funds :(


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL insert () values (),(),(); how to get auto_increments properly?

2010-02-13 Thread Lester Caine

Rene Veerman wrote:

Hi.

I'm looking for the most efficient way to insert several records and
retrieve the auto_increment values for the inserted rows, while
avoiding crippling concurrency problems caused by multiple php threads
doing this on the same table at potentially the same time.



Any clues are greatly appreciated..
I'm looking for the most sql server independent way to do this.


Rene
The 'correct' way of doing this is to use a 'sequence' which is something 
introduced in newer versions of the SQL standard. Firebird(Interbase) has had 
'generators' since the early days (20+ years) and these provide a unique number 
which can then be inserted into the table.


ADOdb emulates sequences in MySQL by creating a separate table for the insert 
value, so you can get the next value and work with it, without any worries. The 
only 'problem' is in situations were an insert is rolled back, a number is lost, 
but that is ACTUALLY the correct result, since there is no way of knowing that a 
previous insert WILL commit when several people are adding records in parallel.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SQL insert () values (),(),(); how to get auto_increments properly?

2010-02-13 Thread Lester Caine

Ashley Sheridan wrote:

But getting the number of rows isn't really all that useful, as it won't
tell you what the auto increment id values are, and if any inserts fail,
it won't tell you which ones.


Which is one of the reasons that MySQL still has problems with consistency ;)
Auto-increment only has limited use, you need to have a mechanism outside of the 
transaction to manage the values, and handle those insertions on a one by one 
basis. A transaction can only ALL be rolled back or committed. If some part 
fails, then the whole should fail . If you need to detect failures, they 
need to be done one at a time.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Uninstalling PHP?

2010-02-26 Thread Lester Caine

Austin Powers wrote:

"How can I completely uninstall PHP so that I can start again?"


Not knowing the Mac I'm fishing ;)
How did you INSTALL PHP? We normally do this via a 'package manager' of some 
sort, where you find the 'PHPxx' and select it. Uninstalling is simply a matter 
of 'deslecting' it.
If you loaded this from a 'command line' script then I would think that perhaps 
this is a book that needs a health warning :(


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Want to learn to work with Zend Framework?

2010-03-05 Thread Lester Caine

Jochen Schultz wrote:

 >  and not drugs, money or sex!

So everyone should post their ads here, which are related to PHP?

I think not.


As someone who gets totally pigged off with the amount of 'advertising' that 
gets rammed down our throats, I should probably agree. But in this particular 
case, while I may not like it, Zend are one of the major supporters of PHP and 
actually need to make money to continue that support.


Now if someone wants to advertise alternative courses using Eclipse and 
PHPEclipse ... 1000EUR does seem somewhat steep ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR clases don't work with PHP 5.3

2010-03-05 Thread Lester Caine

Michael A. Peters wrote:

Martín Marqués wrote:

A few days ago I upgraded my development server with PHP 5.3, and
found that some pear packages stopped working giving FATAL ERRORs,
like this (this one is from package Image_Graph):

PHP Fatal error: Call to undefined method
Image_Graph_Plotarea_Element::Image_Graph_Element() in
/usr/share/php/Image/Graph/Layout.php on line 73

I found that the problem is when calling the parents constructors like
parent::ClassName.

Changing that fixes the problem, but there are alot of clases with
this problem.

Are these problems being addressed?



I found similar problems with some of the pear stuff I use when I tried
5.3.0 awhile back. For the present, I am just sticking with 5.2.x branch
and will give some time for the various pear maintainers to work out the
kinks.

One thing you can do is file bug reports with the pear components you
use. I did not because I moved my test server back to 5.2.x thus I would
have no way of testing whether the fixes actually worked, but if you
have a box you can dedicate to 5.3.x testing, file the bug reports and
it will bring the problem to the attention of the pear maintainers.

Some pear packages are better maintained than others.


It is not just PEAR that needs a lot of work to make it compatible with PHP5.3 !
pecl needs some TLC as well, along with a large number of projects providing 
third party add-ons, or using PHP.


We need to keep 5.2.x supported as a switch to PHP5.3 IS NOT a simple option, 
and will take a lot longer before it is a practical one for many users.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Event Handling

2010-03-15 Thread Lester Caine

Alex Major wrote:

I'm currently looking at building a web application, however I've run into
an area of development I've not come across before. The web site in its
basic form allows users to send cars from a point and then the car will
arrive at another point. When the car is set on its way, the start time,
travel duration and end time are all known and stored in a MySQL database,


The question HAS to be asked ... how do you know the actual travel time ;)
I think I would be expecting to have to enter something on arrival ....

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] any reason *not* to use PEAR DB module when accessing mysql?

2010-03-19 Thread Lester Caine

la...@garfieldtech.com wrote:

Add me to the list of people recommending PDO.  It's much nicer to work
with than the ext/mysql API, and frankly more secure since you get
prepared statements. It won't get you complete database independence for
a number of reasons (mostly due to databases being too unstandardized
because they all suck in different ways; I say this as someone who has
written an abstraction layer atop PDO and it wasn't easy), but it will
get you part way there and even if you only ever use MySQL is a nicer
API to work with.


Of cause ADODB will actually use PDO for those databases that are currently 
available in it, and the generic drivers for those which are not currently 
supported by PDO ;) One can also check performance by switching between PDO 
driver and generic if you want to ...


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Lester Caine

Per Jessen wrote:

Teus Benschop wrote:


On Tue, 2010-03-23 at 19:08 -0700, Tommy Pham wrote:

The response time, max 5 seconds, will be tested on local gigabit LAN
to ensure the adequate response (optimized DB&  code&  proper
hardware) without worrying about users' connection limit and site's
upload bandwidth limit (which can easily rectify).  Then thereafter
will be doing stress test of about 10 concurrent users.  As for the
major queries, that's where threads come in, IMO, because those
queries depend on 1 primary parameter (category ID) and 1 secondary
parameter (language ID).  This particular site starts with 500
products about 15 categories, without many of those mentioned
filters, later grew to its current state.


The bottle neck looking at speed in this example seems to be the
database backend, not PHP. What would be needed is a fast database,
and SQL queries optimized for speed. Teus.


+1.


Seconded ...
My own servers spend 75% of the time in firebird and 25% in apache/php, and when 
I need some extra performance I just add a second machine for firebird with a 
lot more memory. PHP is not the bottleneck and while the computer is 99.5% idle 
anyway I don't see any need for threading any time soon.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Lester Caine

Rene Veerman wrote:

and btw, complexity of design can go up considerably when you have to
deal with more than 1 php and 1 mysql server, because the language
forces inefficient constructs _and_ is "stuck on 1 server"


Switch to a real database?
MySQL still needs to grow up as well :)

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Lester Caine

Rene Veerman wrote:

jeez dude, you're assuming that all software problems are best solved
by a sql solution.
imo, they're NOT. example? any realtime system with real work to do.

please stop pretending you know the proper design of all software that
is made or yet has to be made.
both a ya.


I run real time systems for offices that count serving time in seconds. I know 
currently where the bottlenecks are, and adding 'threading' to PHP is not a 
solution. I fact adding much of the dross that has been added to PHP5 is 
ACTUALLY slowing down performance. I have PHP5.3 and PHP5.2 running on similarly 
loaded sites, and PHP5.2 is faster! I am just pointing out that on *MY* REAL 
applications, the SQL element is a major part of the processing time, and yes 
moving some of the table lookups to be hard coded arrays in PHP would make a 
difference, but then complicates configurability, so keeping them in the 
database makes life easier.


The proper design is the one that meets the customers requirements and gets the 
bills paid. Processing the raw statistics required for my own sites is best done 
away from PHP, so using the right tools for the job is the important thing?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Will PHP ever "grow up" and have threading?

2010-03-24 Thread Lester Caine

Per Jessen wrote:

Rene Veerman wrote:


what you're suggesting is highly intrusive in my work-style, one that
you're not affected by at all.


Hmm, you're the one suggesting a change, I'm suggesting no change.  How
can "no change" be intrusive?


in fact if you make things more difficult for me, i have less time to
release opensource code of my own.


Well, we can't have that, so how about we stick to "no change", thereby
not making anything more difficult for you.  It will remain exactly as
difficult as it is today.


That sounds very good to me! I'm STILL working through the warnings PHP5.3 
introduced. It it improve anything. No . 5.2 still works just as well! Ican 
well understand why people stayed with PHP4 for so long - but I never used that 
myself.


Perhaps we need PHPforDummies and PHPforPros ... I'll stick with the Dummies 
version, if I want the pro version I can go back to C++. ;)


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   >