Re: [PHP] Credit Card encryption

2010-05-30 Thread Miles Thompson
On Sun, May 30, 2010 at 11:50 AM, tedd tedd.sperl...@gmail.com wrote:

 At 12:43 PM +0200 5/30/10, Peter Lind wrote:

 On 30 May 2010 07:49, Paul M Foster pa...@quillandmouse.com wrote:
 -snip-


  Does anyone have a better solution?


 I'm sorry if the following sounds a bit harsh, but in matters like
 these I prefer blunt directness.

 A few notes. 1) one-way encryption means no decrypting - that's what
 one-way is (like a one-way street, there's no driving the other
 direction). You're looking for encryption that can be decrypted, not
 one-way encryption which is otherwise known as hashing. 2) do not
 store credit card information. Just don't. It's downright stupid to do
 so, because it's a huge risk for very little gain.  3) farm out risks
 like these to companies that specialize in dealing with them - you
 will with 100% certainty not be able to do as good a job as these.

 The question to ask is not: how to store credit card information
 securely? The question to ask is: do I really want to be the next
 person in the internet spotlight because my setup turned out to have a
 security hole I overlooked?


 Paul:

 Let me be equally blunt. Petter is absolutely right!

 Do NOT have your client store customer credit card information on a server
 -- period! That's the stuff people go to jail over. Instead, use a credit
 card clearing house to do the heavy work, that's what they get paid for.

 Besides, most credit card processing agencies even require that you use the
 customer's data (cc number, expiry date and CCS) to make the sale and then
 immediately dispose of it afterwards, usually within 24 hours under a signed
 agreement. Holding that information for more than 24 hours can be a criminal
 offense regardless of what type of hashing you use.

 While many of my customers have made the argument that they keep hard-copy
 records of their customer's credit-card information in-house and they don't
 understand why they can't do the same online -- I reply that hard-copy kept
 in a safe behind brick and mortar in far more secure that digital data
 behind any security code open to the world. There isn't a security system
 out there that can't be hacked. If the client insists on keeping this
 information online, then find another client because at some time, someone
 is going to jail and it's not going to be me.

 So, let the people who can keep up with technology (a continued effort and
 expense) worry about hackers -- just use their services and sleep at night.


 Cheers,

 tedd




To add my two cents - if you plan to store card information, in the eyes of
the Payment Card Industry you will have to be Tier One compliant.

How high are the standards? Visit hackerguardian.com  and take the free
test. We *thought* it might be cool to store the CC info for a new
enterprise, provide convenient one-click shopping, etc, so we ran through
the questionnaire at that level. It would take more time to design,
implement and test the security and audit systems than to write the app.
Furthermore, since we were doing the new project in the cloud we could not
meet the requirements for physical security.

So we settled for Tier4 - we take  the information as part of the
transaction, https to CC processor, get an OK or Not OK back, and no
cardholder info stored on our server at all, apart from the transaction
number.

Cheers - Miles Thompson
~~
The piano keys are black and white,
But they sound like a million colours in your mind
Spider's Web - Katie Melua


Re: [PHP] Ubuntu and Apache

2009-10-24 Thread Miles Thompson
Brian,

You're not doing anything wrong. Apache runs as www-data in Ubuntu, so any
file created by Apache will belong to that owner:group.

Add yourself to the www-data group and life will become easier.

Cheers - Miles

On Sat, Oct 24, 2009 at 7:42 PM, Brian Hazelton bdh_2...@comcast.netwrote:

 I know this is not quite on topic but I do not know where else to turn. I
 needed to reinstall ubuntu and now I cannot change myself to be the owner of
 var www. I had been able to change myself to the owner of it and create,
 delete and modify any files I wanted before I had to reinstall. Now it seems
 the change is not taking effect. What happens  is I use the sudo chown
 command and it shows that I am the owner. I have a script that creates a
 file when I go to the page and it creates a file and has www-data as the
 owner, not me. What am I doing wrong?
 Thanks,
 Brian

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




-- 
Miles Thompson
~~
The piano keys are black and white,
But they sound like a million colours in your mind
Spider's Web - Katie Melua


Re: [PHP] Language translation

2009-07-26 Thread Miles Thompson
gettext -not PHP, but a GNU project.
PHP hooks: http://ca.php.net/manual/en/book.gettext.php, which
contains a link to the project.

In the past I've coded arrays of prompts, this is a more native solution.

Cheers - Miles

On Sat, Jul 25, 2009 at 10:37 PM, Skip Evanss...@bigskypenguin.com wrote:
 Hey all,

 We got a new project and language translation of content is a major
 priority. I've googled around and seen lots of options, but I'd like to hear
 from the list about more real world experiences about what some of you found
 and what both you as a coder and the client were most satisfied with.

 Big Hugs,
 Skip

 --
 
 Skip Evans
 Big Sky Penguin, LLC
 503 S Baldwin St, #1
 Madison WI 53703
 608.250.2720
 http://bigskypenguin.com
 
 Those of you who believe in
 telekinesis, raise my hand.
  -- Kurt Vonnegut

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



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



Re: [PHP] CMS

2009-07-08 Thread Miles Thompson
We have used both Joomla! and Drupal for clients and for our own use -
and they're OK. We have probably standardized on Drupal.

The big advantage is that they manage all the CRUD, and you spend 80%
of your time bending either one to do the non-standard 20% which you
absolutely *must* have.

Typo3 we flirted with but never took to the dance.

Ate a bit of CAKE as well, and again the 80:20 rule applies.

Cheers - Miles

On Wed, Jul 8, 2009 at 6:31 PM, madunixmadu...@gmail.com wrote:
 Dear ALL,

 What  are the experiences you have with various open source CMS
 products (Comparison of PHP-based CMS) such as  (Drupal, Joomla,
 OpenCMS, Typo3, eZ publish ..etc.)

 Security, Bugs, Performance, Support, Developer Community, learning
 curve, appearance..etc

 Thanks
 -mu

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



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



Re: [PHP] Search functionality in website.

2008-12-29 Thread Miles Thompson
On Mon, Dec 29, 2008 at 10:47 AM, Tiji varghese tij...@yahoo.co.in wrote:

 Hi all,I would like to set up search functionality on my website. I'm using
 PHP and Mysql. Most of the pages contain static text in the html and is not
 database driven. I need some idea on how should I go about it without moving
 everything to database driven functionality. Please help.Thanks in advance!


  Add more friends to your messenger and enjoy! Go to
 http://messenger.yahoo.com/invite/


ht-dig (or digg)


Re: [PHP] Credit Card processing: Chase PaymenTech

2008-12-14 Thread Miles Thompson
On Sun, Dec 14, 2008 at 6:04 PM, Chris dmag...@gmail.com wrote:

 phphelp -- kbk wrote:

 Hello - - ---  -- - --

 I need to develop Credit Card processing for my current application. We
 have our own shopping cart. We have been trying in vain to get technical
 information from PaymenTech for *months* -- but it seems that Chase sold
 part of it, or split it off into a separate company -- or something. in any
 case, they seem extremely distracted and unresponsive.

 By doing some heavy googling, I was able to find some code from a PHP
 developer's web site, mostly for the format of the xml strings to pass to
 them.

 I can't believe that they don't have a processing object for PHP already
 available, but it seems not. I see in the archives a couple of requests to
 the group for code, but the most recent was a couple of years old. So, I'll
 ask again:

 Anybody have modules, code, tips, land mines, or any other information for
 doing credit card processing with PaymenTech that you would be willing to
 share?


 I don't have anything for you but if they're that bad with responses can
 you switch to another payment provider? Might save you a lot of headaches,
 especially if something goes wrong (or they change something).

 --
 Postgresql  php tutorials
 http://www.designmagick.com/ http://www.php.net/unsub.php

We have experience with two: Beanstream (also known as Online Mart) which is
a branch fo toronto-Dominion Bank. Their system is cURL based. fabulously
reliable, and we would have used it for our own company except that it
supports only CAN and USD.

The second is WorldPay, a subsidiary of The Royal Bank of Scotland. Supports
a raft of credit cards and just about any currency you care for. Downside?
Your customers are taken to a WorldPay site - which you can sort of decorate
like your own - and then are sent back to your site. They also rely on
*timing* for completion of transactions. Sort of lousy.

Nevertheless, we will see.

General reflection? All these companies seem to want your business, but then
are hellaciously slow in providing basic information, responding to
questions, etc.

Good luck - you will need it in some measure.

Cheers - Miles


Re: [PHP] Output to matrix printer

2008-10-14 Thread Miles Thompson
On Tue, Oct 14, 2008 at 6:23 PM, Dušan Novaković [EMAIL PROTECTED] wrote:

 I have some request to sent text to matrix printer to print ticket for
 theater. Is it possible to do that whit some php functions? Main point
 is how to control length of paper that will be drawn inside and to
 print text on a specific place. It would be nice if somebody can write
 the code about this as example.

 Thnx, Dusan

 --
 made by Dusan


Decide on the font you will use - either 10 or 12 characters per inch.
A line is usually 1/8 high.

So you essentially have a matrix running at n characters per inch
horizontally, and m fractions of an inch vertically.

Fit your print into this matrix - some people do it with an array, others
just work the spaces.

Provide a test ticket so the operator can get the printer lined up. With
a  tractor feed, after that you are good for a whole box of tickets.

Oh - one more thing - you may have to advance a number of lines so the
ticket can be torn off after printing, then reverse feed the same number.

Another tip - set your page length just to the height of the ticket.

You really want to exploit the basic native font built into the printer.

Hope this helps - Miles


[PHP] Randomly missing a function

2008-07-17 Thread Miles Thompson
An online signup script is randomly missing part of the task. These scripts
are involved:
sub_signup.php
   include/cc_proc.php - does the CC (credit card) processing
   include/user_maint.php - inserts the new subscriber into the database

When the CC processing finishes, with the success flag, user_maint.php is
included, and a few lines later the createUser($params) function therein is
called to create the user. Every mysql_ function in user_maint.php is
backstopped with a die() if it fails. But sometimes it appears that the call
to this script, or the createUser() function just isn't made.

What seems to happen, randomly, is that the script charges on so to speak,
sending an advisory email to the office manager that there is a new
subscriber, and calling sub_signup_thanks.php, which displays a completion
message, etc.

In all of these cases the credit card processing has succeeded. Sometimes
people have tried to sign up two or three times, the card processes, but no
addition is made to the database. It's driving us nuts! Any thoughts?

Regards - Miles

Infrastructure: Apache 2.2, PHP 5.x, MySQL 5

Code:
switch ($ret) {
case CC_SUCCESS:
require 'include/user_maint.php';
$cctype = cc_getCardType($cc);
if ($cctype == 'Visa') $cctype = 'VISA';
elseif ($cctype == 'MasterCard') $cctype = 'M-C';
//Shouldn't happen in case CC_SUCCESS, but better safe than sorry
else die('We don\'t support this credit card');

$params = array(
'firstname'   = $first,
// various fields
'postal_code' = $postal_code,
'pay_method'  = $cctype
);
// createUser is a function in user_maint
createUser($params);
// sendEmail is func in user_maint, advises office manager
sendEmail('New subscriber!!!', Already paid $amount by credit
card, $fields);
require 'sub_signup_thanks.php';//Grabs authCode from $result
return;

} //other situations dealt with, and properly closed


Re: [PHP] Randomly missing a function

2008-07-17 Thread Miles Thompson
MIcah,

Duh!! So damned obvious.

We'll try that.

Thanks - Miles


On Thu, Jul 17, 2008 at 5:42 PM, Micah Gersten [EMAIL PROTECTED] wrote:

 Try returning a value from CreateUser and checking it before sending the
 E-Mail.

 Thank you,
 Micah Gersten
 onShore Networks
 Internal Developer
 http://www.onshore.com



 Miles Thompson wrote:
  An online signup script is randomly missing part of the task. These
 scripts
  are involved:
  sub_signup.php
 include/cc_proc.php - does the CC (credit card) processing
 include/user_maint.php - inserts the new subscriber into the database
 
  When the CC processing finishes, with the success flag, user_maint.php is
  included, and a few lines later the createUser($params) function therein
 is
  called to create the user. Every mysql_ function in user_maint.php is
  backstopped with a die() if it fails. But sometimes it appears that the
 call
  to this script, or the createUser() function just isn't made.
 
  What seems to happen, randomly, is that the script charges on so to
 speak,
  sending an advisory email to the office manager that there is a new
  subscriber, and calling sub_signup_thanks.php, which displays a
 completion
  message, etc.
 
  In all of these cases the credit card processing has succeeded. Sometimes
  people have tried to sign up two or three times, the card processes, but
 no
  addition is made to the database. It's driving us nuts! Any thoughts?
 
  Regards - Miles
 
  Infrastructure: Apache 2.2, PHP 5.x, MySQL 5
 
  Code:
  switch ($ret) {
  case CC_SUCCESS:
  require 'include/user_maint.php';
  $cctype = cc_getCardType($cc);
  if ($cctype == 'Visa') $cctype = 'VISA';
  elseif ($cctype == 'MasterCard') $cctype = 'M-C';
  //Shouldn't happen in case CC_SUCCESS, but better safe than sorry
  else die('We don\'t support this credit card');
 
  $params = array(
  'firstname'   = $first,
  // various fields
  'postal_code' = $postal_code,
  'pay_method'  = $cctype
  );
  // createUser is a function in user_maint
  createUser($params);
  // sendEmail is func in user_maint, advises office manager
  sendEmail('New subscriber!!!', Already paid $amount by credit
  card, $fields);
  require 'sub_signup_thanks.php';//Grabs authCode from $result
  return;
 
  } //other situations dealt with, and properly closed
 
 



Re: [PHP] How to secure Flash Video? [Solved?]

2008-01-06 Thread Miles Thompson
Tedd,

As Casey noted, there's no totally secure methodolgy, but your's is close
enough - everything is wrapped in the Flash movie, so even if the movie is
sent on to someone else, that someone has to be approved.

We've been doing something similar for several years now, validating against
a database and when validation succeeds, issuing a key stored in the
database and as a Flash (ach, can't remember the name, but Flash's
equivalent of a cookie.)

As for people wanting total security - unplug everything and go split
wood. Most security breaches are internal, and usually all that's necessary
is to keep honest people from straying down  the wrong path.

Cheers - Miles

On Jan 5, 2008 1:16 AM, tedd [EMAIL PROTECTED] wrote:

 Hi gang:

 Here's my logic, so what's wrong with it?

 My sole concern here is to protect a Video from being stolen and/or
 being viewed remotely while allowing approved users to view it.

 It is a fact that anything you present to a user is theirs. There's
 no stopping them from downloading a Video if they have permission to
 do so. In fact, that's exactly what they do when they view a Video --
 they can't view it in their browser unless their browser has it.

 Now, I have investigated several ways to protect videos and prevent
 caching. Some methods are very complex -- but complexity does not
 always guarantee security. Complexity is more likely to present
 problems in its application. Sometimes the simplest method is best.

 The simplest protection method I can think of can be done by using
 Flash Video Actionscript in concert with php/mysql.

 It's a simple matter to have the Video run the following prior to
 displaying:

 theXML.load(http://example.com/security.php)

 That's similar to a javascript onload function.

 Upon loading the Video, the Video will run the script security.php
 which in-turn will check to see if an approved user is attempting to
 view the Video. This done by simply checking a user-id session
 variable in the script that delivers the Video.

 If that session variable (user-id ) is empty, then the security.php
 returns nothing.

 If that session session is not empty, then the script will check the
 user-id against the database to see if the user has permission to
 view the Video. If the user does not have permission, then the
 security.php script returns nothing.

 If everything checks, then the security.php script will return a key
 and the Video will check that key against an internal key -- if a
 match is made, then the video plays.

 Now, please note that this will also prohibit the user, even after
 paying for the Video, from downloading the Video for future plays
 because the Video will always check for a key.

 Even if the user downloads the Video and takes the Video to a remote
 player, the Video will still try to run the security script seeking a
 key. If the security script is not there, then it fails.  Even if the
 user figures out that the Video requires a key, the still user has no
 way to determine what that internal key is.

 So, I think this will work. What say all of you? Where have I screwed up?

 And, please no one liners that solve the entire mess and make me look
 like a fool.

 Cheers,

  tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

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




Re: [PHP] Emailing dilemma

2007-11-27 Thread Miles Thompson
  On Nov 26, 2007 3:21 PM, George Pitcher
  [EMAIL PROTECTED] wrote:
 
   Hi,
  
   I have almost 30 websites that use PEAR::Mail to send emails on
  behalf of
   users at universities (one site for each) to lecturers at the same
   university.
  
   The problem I have is that if a lecturer sets an 'Out of Office'
 status,
   it
   gets bounced back to my server instead of to the user at the
 university.
  
   I did have the 'From' set to the user's email address, but that wasn't
   very
   successful ats it caused problems with the universities' anti-spam
   systems.
  
   I've tried using ini_set('sendmail_from',$useremail); but that doesn't
   seem
   to work either.
  
   Can anyone point me in the right direction, please?
  
  
   Cheers
  
   George in Edinburgh
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 




 -Original Message-
 From: Miles Thompson [mailto:[EMAIL PROTECTED]
 Sent: 26 November 2007 8:44 pm
 To: PHP List
 Subject: Re: [PHP] Emailing dilemma


 George,

 Had this problem a year ago, although I'm not using PEAR. Have a look at
 http://ca3.php.net/manual/en/function.mail.php
 and this down in the additional_parameters(optional) section:

 For example, this can be used to set the envelope sender address
 when using
 sendmail with the *-f* sendmail option.

 It is not well documented, don't know if this helps, but it may get you
 started.

 Cheers - Miles




 On Nov 27, 2007 10:13 AM, George Pitcher [EMAIL PROTECTED]
 wrote:
 Miles,

 I see that tha manual talks about a trusted sender list
 (/etc/mail/trusted-users). Do you know if there is something similar for a
 Windows NT server?

 Cheers

 George


Sorry George, can't help you as my experience with Windows mail servers is
zero.
Miles


Re: [PHP] Emailing dilemma

2007-11-26 Thread Miles Thompson
George,

Had this problem a year ago, although I'm not using PEAR. Have a look at
http://ca3.php.net/manual/en/function.mail.php
and this down in the additional_parameters(optional) section:

For example, this can be used to set the envelope sender address when using
sendmail with the *-f* sendmail option.

It is not well documented, don't know if this helps, but it may get you
started.

Cheers - Miles

On Nov 26, 2007 3:21 PM, George Pitcher [EMAIL PROTECTED] wrote:

 Hi,

 I have almost 30 websites that use PEAR::Mail to send emails on behalf of
 users at universities (one site for each) to lecturers at the same
 university.

 The problem I have is that if a lecturer sets an 'Out of Office' status,
 it
 gets bounced back to my server instead of to the user at the university.

 I did have the 'From' set to the user's email address, but that wasn't
 very
 successful ats it caused problems with the universities' anti-spam
 systems.

 I've tried using ini_set('sendmail_from',$useremail); but that doesn't
 seem
 to work either.

 Can anyone point me in the right direction, please?


 Cheers

 George in Edinburgh

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




Re: [PHP] MPEG Properties

2007-10-25 Thread Miles Thompson
Check out ffmpeg-php
http://sourceforge.net/projects/ffmpeg-php/

Miles


On 10/25/07, Bill Medley [EMAIL PROTECTED] wrote:

 Hello, all.

 Thanks for your help in advance. I'm trying to figure out how to get PHP
 to
 retrieve MPEG File Properties, specifically the length of the video file
 in
 seconds.

 Thanks,

 -B

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




Re: [PHP] combining 2 arrays

2007-10-16 Thread Miles Thompson
array_merge() function?

If your db is MySQL, look at this thread, Google being your friend:
http://lists.mysql.com/mysql/204616

Cheers - Milesx

On 10/16/07, Ladislav Andel [EMAIL PROTECTED] wrote:

 Hi list!
 I read data from 2 databases and for the purpose of displaying the
 information at my web interface as one piece
 I need to combine the data into one array first.. Here is my problem:

 Firstly, it reads from first DB and get this array: (it's a sum of
 server names in table)

 arrayDB1 = array(array('8', 'SER'),  array('5','Asterisk'))

 When finished then it starts reading from second DB
 where I would get

 arrayDB2 = array(array('6', 'XIP'),  array('4','Asterisk'))


 Is there any function where I would get
 result = array(array('8', 'SER'),  array('9','Asterisk'),
 array('6','XIP'))

 Probably, it would be best to add number of Asterisk while cycling
 through data of second DB.
 The problem could be when databases have thousands of rows in each DB.

 I'm just asking in case you know a better approach.

 Thank you,
 Lada

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




Re: [PHP] amfphp

2007-09-03 Thread Miles Thompson
Nathan,

The web server, MySQL and PHP are all running on the web server. Localhost
is a default address for the MySQL host; to use another you will have to set
it up.

There's nothing wrong with localhost - fits right in with the web server /
PHP environment.
They are all running locally.

Not a v. good explanation I'm afraid, but hope it helps.

Miles Thompson


On 9/3/07, Nathan Wallis [EMAIL PROTECTED] wrote:

 Hey there,



 I am running amfphp on my webserver locally and it works well when I use
 localhost, so I change localhost to my computers local IP address which is
 192.168.1.2 and then test it from another machine.  Nothing happens, the
 remote procedure does not get called.



 Any ideas on this?



 Thanks,



 Nathan




Re: [PHP] Display paragraphs from a mysql db

2007-06-24 Thread Miles Thompson

On 6/24/07, nitrox . [EMAIL PROTECTED] wrote:


hi all,
  I have a news section on a website that im coding that isnt displaying
properly. Every paragraph in each news post is being displayed as one big
paragraph. how can i display my paragraphs in proper form? The field the
news story is stored in is set as longtext.
here is a link to view.
http://area51.chalkthree.com/index.php?pg=3

the first update shows what im having an issue with. each item in the
numbered list should be on a seperate line. there are some line breaks as
well for new paragraphs that arent displaying properly.

here is the code i have:

while($myrow = mysql_fetch_array($newsresults))
  {
 print br;
 print $myrow['news_topic'];
 print  ;
 print $myrow['news_author'];
 print;
 print $myrow['topic_date'];
 print br;
 print $myrow['news_message'];
 print br\n;
 }



nl2br() as found at http://php.ca/nl2br, as well as the other functions on
that page.

Works well - although you may to futz a little bit with the variations on
break tags.

Cheers - Miles Thompson


Re: [PHP] taking a single payment online

2007-06-08 Thread Miles Thompson

Googling for: online payment services
returns a slew of hits, among them
  www.auctionbytes.com/cab/pages/payment*
*based in the UK.

I don't believe you are going to find a fully automatic PHP connection for
most of these services.

HTH - Miles
*
*
On 6/8/07, Ross [EMAIL PROTECTED] wrote:


Hi,


I have a clinet with a small hotel. I want to send a link to customers
requesting cash similar to paypal. If there total booking is £320 I want
to
send them a link to pay £32 online. Is there an alternative non-paypal way
to do this? Other gateways with good PHP based API.

thanks,


R.

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




Re: [PHP] TableName with space

2007-06-05 Thread Miles Thompson

On 6/5/07, karthi keyan [EMAIL PROTECTED] wrote:


Hi,

  How can I create a table with spaces Order details in MSSQL using PHP?
  I am able to create manually the table name with space by providing the
name in Double Quotes. Is there a way out to do this using PHP?

  Thanks
  Karthik.



Why would you want to? Apart from not having to change / search through
lines of legacy code.

Use order_details or orderDetails or  OrderDetails or orderdetails but DON'T
curse yourself with a space  in a table which you will have to quote every
time it's used.

Cheers - Miles


Re: [PHP] PHP debugger

2007-05-25 Thread Miles Thompson

On 5/25/07, Jochem Maas [EMAIL PROTECTED] wrote:

Miles Thompson wrote:



 Suggestions will be most welcome. Also, I'm not married to this, so if
 anyone thinks there is a better debugger, please jump in.

I'm not going to jump in there ... I almost drown in that quagmire
everytime I have to get a debugger setup working ... but ...


 Regards - Miles Thompson

 PS Why are we doing this? Because we are getting tired of debugging
 with Javascript alert()  boxes. /mt

 PPS And we are using those because of Joomla!  Some things are buried
 so deeply we cannot use print() or echo(). /mt

2 things:

1. when you have no hair left whatsoever:

var_dump($foo); exit;

2. error_log() is your friend  tail the log and run the code.

just a thought.



Hey Jochem,

It's been a long slog, and I'm still playing with test programs to
figure out how things work. It sure isn't like using a desktop
debugger, especially as we are doing it all remotely.

Thanks for your comments - Miles

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



[PHP] Re: [PHP-INSTALL] Mailparse extension

2007-05-22 Thread Miles Thompson

On 5/21/07, Tim Donnelly [EMAIL PROTECTED] wrote:

I should preface this by saying, I am not a PHP person.  I have been able to 
install php in the past and get things to work, but this time I am having fits.

I am running php 5.2.1, apache 1.3.34, OpenSuSE 10.0 on a 64bit AMD platform.

I have compiled php with the following statement:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-pspell' 
'--enable-mbstring' '--with-mysql' '--with-libdir=/lib64' '--enable-mailparse'

and installed mailparse 2.1.1 via PECL.  Running pecl list confirms that 
mailparse 2.1.1 stable is installed.  I have added the line:

extension=mailparse.so

to my php.ini file.

However, my email server software (@Mail v5.04) says mailparse is not 
installed.  I attempted to run the code posted by wberrier at yahoo dot com 
found here http://us2.php.net/mailparse  and all I got was a blank screen.  As 
I said, I'm not a php person do I don't know if this is conclusive proof of a 
problem or not.

Can anybody help me?  I can provide additional information if needed.

Thanks

Tim Donnelly
Systems/Network Administrator
Colorado Alliance of Research Libraries
(303)759-3399 x106



To start, run a phpinfo.php script which contains phpinfo(). That will
reliably tell you if mailparse is installed.

Did you restart your web server after adding the module and editing php.ini?

Does mailparse, by any chance, need a [mailparse] section in php.ini
to set its parameters?

Are you certain there is not an old instance of Apache running?

Hope this helps - Miles

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



Re: [PHP] PHP debugger

2007-05-16 Thread Miles Thompson



-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]
Sent: 15 May 2007 08:21
To: PHP List
Subject: [PHP] PHP debugger


I am trying to load a PHP debugger in our most recent build of PHP 5.2.1.

The debugger which I am trying to set up is the free, pre-compiled
Linux version of dbg ( DBG 2.15.5 dbg modules), from
http://dd.cron.ru/dbg/, and all of the instructions have been followed
as posted on the NuSphere site.

Yes, Apache has been stopped and restarted!!

There is no difference in the output from phpinfo(). The line
with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru;
does not appear.

PHP is compiled without debugging, but I did consider that was for the
purpose of debugging PHP itself, not scripts.

Suggestions will be most welcome. Also, I'm not married to this, so if
anyone thinks there is a better debugger, please jump in.

Regards - Miles Thompson

 snipped some trivial comments




On 5/16/07, Arno Kuhl [EMAIL PROTECTED] wrote:

If you don't see any change in phpinfo then maybe it's not picking up the
dbg extension in your php.ini. Presumably you've also put the other debugger
directives in your ini?

You can also try download the trial version of PHPEd from Nusphere, install
that, and check how it configures the debugger. The trial lasts a month I
think, so maybe you'll sort out your problems in that time anyway. Just be
sure to completely uninstall it afterwards because I think the free dbg
version is not the same as the version integrated in PHPEd. Any version
differences cause the extension to not load, though in that case it should
report an error. You can't use the dbg integrated in PHPEd after uninstall
because it doesn't work without PHPEd.

Arno



From my php.ini 

; added debug extension dbg.so-5.2.x and
; see [debugger] section of this file -  20050515 - mthompson
;
extension=dbg.so  ;dbg.so-5.2.x

and the [debugger] section ...
; Added [debugger] section 20050515 - mthompson
; Note:  DBG versions 2.15 (free) does not support debugger.hosts_allow,
; debugger.hosts_deny or debugger.ports settings.
;
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow= inserted domain and IP number here
debugger.hosts_deny=ALL
debugger.ports=7869, 1/16
; end [debugger] section

Couple of notes:
1. Tried this with extension pointing to both dbg.so and dbg.so-5.2.x.
(The latter is what the instructions specified, but that did not seem
correct.)

2. Also tried it, in combination with above, with  debugger.hosts_allow,
debugger.hosts_deny and debugger.ports all commented out.

3. PHP version is 5.2.1, compiled from source on a Ubuntu Edgy Eft server.

I'm wondering it I should download the source and compile it. That
might be a better way home than assuming the binary is correct.

Arno, your suggestion to install the NuSphere editor is a good one.
I'm just reluctant to add more junk to my Windows box and to allow
something other than atp-get / dselect to mess with server
configuration. (Although it is a development box, so errors are not
terminal!)

Thanks to everyone for suggestions.

Regards - Miles

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



Re: [PHP] PHP debugger

2007-05-16 Thread Miles Thompson

On 5/16/07, Arno Kuhl [EMAIL PROTECTED] wrote:

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]
Sent: 16 May 2007 02:15
To: PHP List
Subject: Re: [PHP] PHP debugger



 -Original Message-
 From: Miles Thompson [mailto:[EMAIL PROTECTED]
 Sent: 15 May 2007 08:21
 To: PHP List
 Subject: [PHP] PHP debugger


 I am trying to load a PHP debugger in our most recent build of PHP 5.2.1.

 The debugger which I am trying to set up is the free, pre-compiled
 Linux version of dbg ( DBG 2.15.5 dbg modules), from
 http://dd.cron.ru/dbg/, and all of the instructions have been followed
 as posted on the NuSphere site.

 Yes, Apache has been stopped and restarted!!

 There is no difference in the output from phpinfo(). The line
 with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru;
 does not appear.

 PHP is compiled without debugging, but I did consider that was for the
 purpose of debugging PHP itself, not scripts.

 Suggestions will be most welcome. Also, I'm not married to this, so if
 anyone thinks there is a better debugger, please jump in.

 Regards - Miles Thompson
 snipped some trivial comments


On 5/16/07, Arno Kuhl [EMAIL PROTECTED] wrote:
 If you don't see any change in phpinfo then maybe it's not picking up the
 dbg extension in your php.ini. Presumably you've also put the other
debugger
 directives in your ini?

 You can also try download the trial version of PHPEd from Nusphere,
install
 that, and check how it configures the debugger. The trial lasts a month I
 think, so maybe you'll sort out your problems in that time anyway. Just be
 sure to completely uninstall it afterwards because I think the free dbg
 version is not the same as the version integrated in PHPEd. Any version
 differences cause the extension to not load, though in that case it should
 report an error. You can't use the dbg integrated in PHPEd after uninstall
 because it doesn't work without PHPEd.

 Arno

From my php.ini 
; added debug extension dbg.so-5.2.x and
; see [debugger] section of this file -  20050515 - mthompson
;
extension=dbg.so  ;dbg.so-5.2.x

and the [debugger] section ...
; Added [debugger] section 20050515 - mthompson
; Note:  DBG versions 2.15 (free) does not support debugger.hosts_allow,
; debugger.hosts_deny or debugger.ports settings.
;
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow= inserted domain and IP number here
debugger.hosts_deny=ALL
debugger.ports=7869, 1/16
; end [debugger] section

Couple of notes:
1. Tried this with extension pointing to both dbg.so and dbg.so-5.2.x.
(The latter is what the instructions specified, but that did not seem
correct.)

2. Also tried it, in combination with above, with  debugger.hosts_allow,
debugger.hosts_deny and debugger.ports all commented out.

3. PHP version is 5.2.1, compiled from source on a Ubuntu Edgy Eft server.

I'm wondering it I should download the source and compile it. That
might be a better way home than assuming the binary is correct.

Arno, your suggestion to install the NuSphere editor is a good one.
I'm just reluctant to add more junk to my Windows box and to allow
something other than atp-get / dselect to mess with server
configuration. (Although it is a development box, so errors are not
terminal!)

Thanks to everyone for suggestions.

Regards - Miles

--

Hi Miles

I'm not sure I follow your configuration - are you running on Windows or
Linux? You shouldn't need to compile anything as far as I'm aware, just use
the binaries.

I'm using PHPEd 5.0 for Windows, so my config won't be the same as yours.

My ini setup is:


extension=php_dbg.dll-4.4.x

[debugger]
debugger.enabled=On
debugger.profiler_enabled=On


I've been using PHPEd for about 3 years so there are several dbg files in my
extensions dir, but the latest is php_dbg.dll-4.4.x (that is the actual
file name in extensions directory) which coincides with the name in the ini
file, and the timestamp coincides with the ver 5.0 release date. According
to your description for your Linux box I reckon you should be using
dbg.so-5.2.x in your ini file and in your extensions dir.

From previous experience I know the dbg extension is very fussy. You can't
specify more than one dbg in your ini, and the dbg must be the correct one
for your platform and your version of php. You can't change the name of the
file, and if the binary is for one specific ver of php then you must have
that ver of php running. Any error here and it just doesn't work.

Hope that helps

Cheers
Arno



Arno,

Arno,

Thanks for providing the relevant bits of your php.ini. You just
reinforced all of the docs in a very positive way.

So in php.ini the lines in the [debugger] section which are not
supported by the free version are now commented out, the extension is
back to its original name and that's the name pointed to in php.ini.
Apache has been stopped and restarted.

Our version

[PHP] PHP debugger

2007-05-15 Thread Miles Thompson

I am trying to load a PHP debugger in our most recent build of PHP 5.2.1.

The debugger which I am trying to set up is the free, pre-compiled
Linux version of dbg ( DBG 2.15.5 dbg modules), from
http://dd.cron.ru/dbg/, and all of the instructions have been followed
as posted on the NuSphere site.

Yes, Apache has been stopped and restarted!!

There is no difference in the output from phpinfo(). The line
with DBG v2.11.30, (C) 2000,2004 by Dmitri Dmitrienko, http://dd.cron.ru;
does not appear.

PHP is compiled without debugging, but I did consider that was for the
purpose of debugging PHP itself, not scripts.

Suggestions will be most welcome. Also, I'm not married to this, so if
anyone thinks there is a better debugger, please jump in.

Regards - Miles Thompson

PS Why are we doing this? Because we are getting tired of debugging
with Javascript alert()  boxes. /mt

PPS And we are using those because of Joomla!  Some things are buried
so deeply we cannot use print() or echo(). /mt

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



Re: [PHP] Make eclipse-php recognise custom extension as php ?

2007-04-27 Thread Miles Thompson

On 4/27/07, Don Don [EMAIL PROTECTED] wrote:


Hi all, i've changed my server's apache config to recognize my custom
extension for php files. And all my development filenames now come with this
new extension.

  However my IDE (Php Eclipse) will not recognise this new extension as a
php file, even though it opens it up but it looses all the php features (
e.g. syntax highlighting, flags, errors, warnning, intellisence etc)

  How can i make php-eclipse recognise my new custom extension as a php
file ?

  Cheers



Use .php extension? Or rewrite PHPEclipse or its configuration file?

There is such a thing as being too clever.

M.


[PHP] No mail() function

2007-04-27 Thread Miles Thompson

Does anyone have any ideas?

PHP 5.2 was compiled from source, the mail path is set to /usr/sbin/postfix
in php.ini, and Apache has been restarted. The mail path shows up in
phpinfo().

A  trivial PHP script, written to see if mail could be sent from PHP,
returns this error:

*Fatal error*: Call to undefined function mail() in *
/var/www/junk/testmail.php* on line *9

*The docs say that mail is a core function, like so:
There is no installation needed to use these functions; they are part
of the PHP core

It's a UBUNTU server, so when compiling I sudo'ed and configure / make /
checkinstall (instead of make install) worked fine.

However, in phpinfo() under the standard  heading there is no :
Path to sendmail /usr/sbin/sendmail -t -i
like there is on our production server.

Suggestions and advice will be welcomed.

Regards - Miles Thompson


Re: [PHP] Dreamhost! PHP as CGI!???

2007-04-13 Thread Miles Thompson

On 4/13/07, Richard Davey [EMAIL PROTECTED] wrote:


Micky Hulse wrote:

 Lol, funny you should mention that... Within a few days of getting an
 account, my server went down with a bunch of other folks... I guess it
 was a DOS attack or something.

It will be the first of many :)

Oh and hey... you'll soon experience the sporadic will it or won't it
nature of their Control Panel loading too. I always loved that one.

 Oooh, excellent. Actually, I had other folks suggest Pair too. Only
 reason why my client and I picked DH was the price. I guess I get what I
 pay for.

Abso-frigging-lutely.

 Hmm, pair may be worth the extra $$. Do you think the Webmaster plan
 is decent for a small but soon-to-be growing site?

It will cope with your needs *easily* and the best thing about them -
they can scale-up your account at any time, to whatever you need, as you
grow. Some HUGE sites are hosted comfortably on Pair. Even php.net ;)

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk



Have a look at www.hub.org.  They host PostgreSQL world wide, you get a
virtual machine, not a virtual host, and  they are v. helpful in setting up
software.

Miles


[PHP] Location of .so files on Linux box

2007-04-10 Thread Miles Thompson

This probably belongs in php-install, but here goes.

Where should extension files be located? In php.ini the default entry for
extension_dir is:
   extension_dir= ./

That's fine, but relative to which directory (locations in parentheses)?
  Where php.ini is located? (/usr/share/lib)
  Where apache2 loads it modules? (/usr/lib/apache2/modules)

I'm puzzled and could not find any clues in the documents. Apache2 is not
complaining on a restart. If I run PHP from the command line, it complains
that it cannot find the extensions, but I understand that.

Regards - Miles Thompson


Re: [PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-04 Thread Miles Thompson

On 4/4/07, Mario Guenterberg [EMAIL PROTECTED] wrote:


On Tue, Apr 03, 2007 at 08:56:12PM -0300, Miles Thompson wrote:
 Mario,

 Boy it's been a long day - it seems that every item I had in by
configure
 batch had to be installed; then at the very end of the day it finally
got to
 the --with-mysql. Had quite a scramble tryingto find the correct dev
 environment, then finally I was down to to two warning errors, one
of  which
 was for sqlite.

 Tried a make, but it wouldn't go, so I ran configure again, explicitly
 stating with no sqlite.

 Tried make again and it completed.

 Ran checkinstall and it packaged the puppy, installed it and signed off
with
 a pleasant note on how to uninstall if necessary.

 Tomorrow we'll see how it  works, and I hope I did not clobber mysql as
part
 of this.

 There's an incompatibility between bzip2 and prefork-apache2-dev (or
 something like that). Running one clobbers the other, so since I needed
 apxs2 more than bzip2, that was dropped from the configuration.

 If you're interested I'll post another update tomorrow.


Hi Miles,

can you post your ./configure options.
apache2-prefork-dev is the right devel package and in my environment
that works fine with bzip2 and sqlite. Have you installed the
libsqlite0-dev and libsqlite3-dev packages and the libbz2-dev
package?

I've written a little install shellscript for my own use.

Greetings
Mario

--
sig snipped



Mario,

The contents of my configuration file are included below. I''m checking for
the packages you mentioned and will add them. I'm feeling a lot more
confident, having achieved a successful make and install - this is not
something I do every day.

Appreciate your advice - Miles

#! /bin/sh
./configure --prefix=/usr/share --datadir=/usr/share/php \
--bindir=/usr/bin \
--with-apxs2=/usr/bin/apxs2 \
--with-mysql=/usr/include/mysql  \
--with-mysqli \
--without-sqlite \
--without-pdo-sqlite \
--with-gd --enable-gd-imgstrttf --enable-gd-native-ttf \
--with-zlib-dir=/usr/lib \
--with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib \
--with-tiff-dir=/usr/lib --with-ttf-dir=/usr/lib \
--with-freetype-dir=/usr/lib \
--enable-ftp \
--enable-memory-limit \
--enable-safe-mode \
--enable-bcmath \
--enable-calendar \
--enable-ctype --with-ftp \


Re: [PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-03 Thread Miles Thompson

Mario,

That did it - when I tried to reload the phpinof.php script Apache did not
know what to do with the file.

Now I'll drag the compiler from it's dusty corner and start from scratch.

Thanks a million - Miles


On 4/2/07, Mario Guenterberg [EMAIL PROTECTED] wrote:


On Mon, Apr 02, 2007 at 04:52:02PM -0300, Miles Thompson wrote:
 This probably belongs under php-install, but thought I would try here
first,
 and it comes under the general header of Be careful what you wish for.

 On a new Ubuntu (Debian) server I installed this version of PHP because
I
 wanted some 5.2 features. It's the hardened version, and not the one we
 want.

 I have done the conventional aptitude remove php5, and then went to
all of
 the directories returned by whereis php5 and manually removed them.

 I've rebooted both the server and my own computer, and still a
 http://localhost/phpinfo.php returns the phpinfo() data AND shows
 configuration file paths: etc/php5/apache2 and /etc/php5/apache2/conf.d
 which have been deleted.

Try dpkg --purge php-5.2.1 or so.
You may have only the php binaries (CLI) removed.
This removes the config-scripts at all.
Apt-get remove libapache2-mod-php5 removes your apache2 modules and
the dpkt --purge libapache2-mod-php5 removes all the config scripts
of them.

I have build php 5.2.1 from source on Ubuntu 6.10 and it works
fine. Installad in /usr/local for some system reasons and of course
a easy way to upgrade.

Greetings
Mario
--
-
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
-






Re: [PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-03 Thread Miles Thompson

Mario,

Boy it's been a long day - it seems that every item I had in by configure
batch had to be installed; then at the very end of the day it finally got to
the --with-mysql. Had quite a scramble tryingto find the correct dev
environment, then finally I was down to to two warning errors, one of  which
was for sqlite.

Tried a make, but it wouldn't go, so I ran configure again, explicitly
stating with no sqlite.

Tried make again and it completed.

Ran checkinstall and it packaged the puppy, installed it and signed off with
a pleasant note on how to uninstall if necessary.

Tomorrow we'll see how it  works, and I hope I did not clobber mysql as part
of this.

There's an incompatibility between bzip2 and prefork-apache2-dev (or
something like that). Running one clobbers the other, so since I needed
apxs2 more than bzip2, that was dropped from the configuration.

If you're interested I'll post another update tomorrow.

Regards - Miles Thompson

On 4/3/07, Mario Guenterberg [EMAIL PROTECTED] wrote:


On Tue, Apr 03, 2007 at 08:50:31AM -0300, Miles Thompson wrote:
 Mario,

 That did it - when I tried to reload the phpinof.php script Apache did
not
 know what to do with the file.

 Now I'll drag the compiler from it's dusty corner and start from
scratch.

Not the debian/ubuntu way but sometimes the best solution ;-)

 Thanks a million - Miles
:-)

Greetings
Mario

--
-
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
-




[PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-02 Thread Miles Thompson

This probably belongs under php-install, but thought I would try here first,
and it comes under the general header of Be careful what you wish for.

On a new Ubuntu (Debian) server I installed this version of PHP because I
wanted some 5.2 features. It's the hardened version, and not the one we
want.

I have done the conventional aptitude remove php5, and then went to all of
the directories returned by whereis php5 and manually removed them.

I've rebooted both the server and my own computer, and still a
http://localhost/phpinfo.php returns the phpinfo() data AND shows
configuration file paths: etc/php5/apache2 and /etc/php5/apache2/conf.d
which have been deleted.

Does anyone have experience with this beastie? A steer in the right
direction would be appreciated, especially as I set up a new server about
once every decade or so.

Cheers - Miles


Re: [PHP] Cannot remove PHP Version 5.2.1-0.dotdeb.1

2007-04-02 Thread Miles Thompson

Thanks Mario, I'll try that tomorrow morning.
Much appreciated - Miles

On 4/2/07, Mario Guenterberg [EMAIL PROTECTED] wrote:


On Mon, Apr 02, 2007 at 04:52:02PM -0300, Miles Thompson wrote:
 This probably belongs under php-install, but thought I would try here
first,
 and it comes under the general header of Be careful what you wish for.

 On a new Ubuntu (Debian) server I installed this version of PHP because
I
 wanted some 5.2 features. It's the hardened version, and not the one we
 want.

 I have done the conventional aptitude remove php5, and then went to
all of
 the directories returned by whereis php5 and manually removed them.

 I've rebooted both the server and my own computer, and still a
 http://localhost/phpinfo.php returns the phpinfo() data AND shows
 configuration file paths: etc/php5/apache2 and /etc/php5/apache2/conf.d
 which have been deleted.

Try dpkg --purge php-5.2.1 or so.
You may have only the php binaries (CLI) removed.
This removes the config-scripts at all.
Apt-get remove libapache2-mod-php5 removes your apache2 modules and
the dpkt --purge libapache2-mod-php5 removes all the config scripts
of them.

I have build php 5.2.1 from source on Ubuntu 6.10 and it works
fine. Installad in /usr/local for some system reasons and of course
a easy way to upgrade.

Greetings
Mario
--
-
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
-

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iQIVAwUBRhFizDUZahlMISn3AQIJaBAAkb0tlZFXTO/6yRgZGf0tP4+U1eiTGnMR
r+jqzCiYD3EA6vg7Qlf7K97nn+Jo9CwuYLC2WXRIWGoHK8Mor5UqWPLX6mRFut2w
d19ksKv605Dq1FuweNzTAZo9SiJwG8DsZ9Kj0Xboysu5098g/mV+mTvcnyONDmDU
6XiLqHkfITkUES/Hn3Nb0mOSNI7K41lipm/3TrWqPep1Fs/QUyDb/wtLRzfrcScm
CmdDCE+nBsKtCdtcZD3VDNN4F3O4x2ZbM1yAp9+S5yQn0b1kK4HoAJ99dpCR+Q4V
C+O5VFDr515dujlMo4+CcGPe63xLvU8wn2f5P1vcXcQFPEBj5zJYZGQSPWfrVeBa
H0R7sNraBOL+JJD1c5eSYIbZBCjFnaKyMzlQCJ/qgmG/t1akzNJdNlBJ15lMn8dd
d8nsa5Za/19ULJR0cPq0CyjAgd1+S0/ykUOGDa2S0uIhURB3AJ/xf2ffH23XbI6m
So5maXF2I9hsOwYkZgxv4Kv+HhgJAQesFj7FwBjljXcPXYlXX3DWzC1VwzTKik3F
kHviM3PH9XSoGlizwIAwBKlq3sY/CnUo7xoWvmapVvpJDEumi2AvgpDkBl27ogEV
Rh7wx0twS8WCSytNSz3XeFJIwmdtrQudXBbNGBSOU6NOk3NwbMhKt5JX2RL7omwE
D0lQzqENPDY=
=cWaV
-END PGP SIGNATURE-




Re: [PHP] best framework (pear vs zend framework)

2007-03-01 Thread Miles Thompson

Yay!! Someone else working with qcodo.

If I was starting afresh, that's what I would use.

Current project is based on Joomla! - there is a lot to assimilate and much
of it is old-style coding.

Cheers - Miles






Re: [PHP] Classified Ads Script

2007-02-20 Thread Miles Thompson

On 2/19/07, Matt Arnilo S. Baluyos (Mailing Lists) 
[EMAIL PROTECTED] wrote:


Hello everyone,

I'm planning to put up a local classified ads website and I'm looking
for an open-source script for this.

I've already had some links from Google and Sourceforge but I'd like
to get some opinions on people who've already run a classifieds
website as to what they're using and what they think of it.

Best Regards,
Matt

--
Stand before it and there is no beginning.
Follow it and there is no end.
Stay with the ancient Tao,
Move with the present.

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

We use GeoClassifieds by GeoDesic Solutions. With a little bit of effort I

was able to tie it in with our subscriber database.
There is a free version, and if I remember correctly the basic version is
what we use.

Far cheaper to even buy the basic than to write your own, although our
situation is simplified because classifieds are offered free to subscribers.
Therefore I have no experience of how well anything associated with the
payment side, incentives, etc. works.

Regards - Miles


Re: [PHP] Redisplay file name on failed upload

2007-02-13 Thread Miles Thompson

Thanks guys - I guess the staging area is the way we'll go. (This is from
gmail, I'm not used to it, so if I included all of the prev msgs, please
forgive me.)

Thanks - Miles


[PHP] Redisplay file name on failed upload

2007-02-13 Thread Miles Thompson

When a file upload fails, not because of a problem with the upload itself,
is there anyway of assigning the value captured by

  input name=upldFile type=file

when the form is redisplayed?

The failure may not be due to a problem with the file being uploaded, but
because the user failed to complete a keywords field or some other bit of
wanted information.

Is it possible to assign form[ upldFile ] = C:\somepath\somefile
or
form[ upldFile ] = $_FILES['userfile']['name']

The script which does the validation is the same one which contains the
upload form. I suspect we're completely out of luck - apart from validating
with JavaScript.

Regards - Miles


Re: [PHP] Recommend a PHP Framework

2007-02-10 Thread Miles Thompson

Most frameworks rely on a dtabase, but have a look at this:

http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html






Re: [PHP] most powerful php editor

2007-01-24 Thread Miles Thompson

At 09:41 AM 1/24/2007, Roman Neuhauser wrote:


# [EMAIL PROTECTED] / 2007-01-24 13:57:03 +0200:
 and also in these days I'm looking for 19 inch (or more) wide LCD
 sceerns to able to fit longer lines in my screen...

Number of reading errors people make grows with line length,
this has been known for as long as I remember.  You're increasing the
probability of bugs in the code, and get tired sooner because following
long lines requires more energy.


Good point Roman. Just think how that would cut down traffic on the list!
The most powerful editor should have a setting MAX_WORDS_PER_LINE = 11. g

More seriously, many times I've taken a It's right, but not working, 
dammit! SQL statement,

broken it up so it's listed vertically and discovered the error.

Rather than a wide monitor, I'd like to have a tall one - say 21 square.

How did we ever live with 12 terminal windows - huge to KayPro folk.

Cheers - Miles



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.8/649 - Release Date: 1/23/2007



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



Re: [PHP] most powerful php editor

2007-01-21 Thread Miles Thompson

At 08:21 AM 1/21/2007, Robert Cummings wrote:


On Sat, 2007-01-20 at 22:54 -0200, Vinicius C Silva wrote:
 hi everyone!

 i'd like to ask something maybe commonly asked here. what is the most
 powerful php editor?


EditPlus or UltraEdit - particularly like the former because I can edit 
files on the server with its very transparent FTP functions. On top of that 
they do v. nice syntax highlighting in other languages, even Actionscript.


If I could figure out a way to do the same (remote editing) with Eclipse 
I'd probably invest the time in it; code hinting / completion would be 
nice, particularly with frameworks like Qcodo.


Which then leads me towards ZEND, although I've never used it.

These observations have probably not been at all helpful. g

Regards - Miles

PS You're not forgetting source code control, are you? /mt 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.17.3/642 - Release Date: 1/20/2007

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



RE: [PHP] What makes a PHP expert

2007-01-18 Thread Miles Thompson

At 09:55 AM 1/18/2007, Jay Blanchard wrote:


snip

First I would consider number of years of programming experience
including how many years a programmer had been using PHP. I would
examine some code and look for organization, documentation, and
consistency. Is the programmer published (articles, books, etc) which
may not count against expertise?

An expert encompasses so much more than skills. For instance, I could be
an expert on football because I understand history of the game, have
been published, understand game planning and execution, and have played
at the wide receiver position. Only the last 2 items really require
skills.

--


Good answer Jay.

Whenever someone refers to me as an expert I raise the shields. I've been 
humbled too many times, and a remark like that is usually a precursor to 
getting bitten by.


A harbour pilot received a fawningl ompliment, from a quite gorgeous 
tourist, that he must know where all the deep water channels were. No 
ma'm he replied, but I know where the rocks are.


Yep.

Cheers - Miles


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.14/636 - Release Date: 1/18/2007

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Miles Thompson

At 11:39 AM 1/11/2007, Scott Bounds wrote:

Hello all. I seem to be having a terrible tim ewith something that is so 
simple it makes me sick.  I have a server running FC2.  it has Apache 
2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have the 
exact versions but fatigue and frustration has taken over.  I can get them 
if you really need them.  Here's the major problem.  When I try and view a 
simple php page in the browser, it doesn't display anything that has to do 
with the php tags.  By that I mean it won't recognize the  php directives 
(I guess).  I made a simple page (the infamous phpinfo ()  page) right out 
of the books.  Saved it as test.php just like it said.  Made sure that 
apache is running and browsed to the page. Nothing, no errors, no 
nothing.  I have made up some other pages (mostly from some php books - 
real simple ones) to view and they all display the same action.


Now when these machines (I actually have a couple of these servers and 
they all act the same) were installed, it was from FC2 CD's with the 
webserver full package.  There were all kinds of php files installed, 
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems 
to be all there.


Can anyone out there help me figure out how to make this work?  I would be 
truly indebted to you, put you on my Christmas card list, etc.


Thanks in advance to all of you kind and wonderful people.

Scott


Scott,

Have a look at the instructions for setting up PHP. (It's been such a long 
time I do not remember where the different bits are.)


I do remember, however, that the php.ini file has to be in the right place, 
and that in httpd.conf you have to recognize the .php extension along with 
.htm, and .html.


Finally, you have to stop and rstart Apache so httpd.conf will be read again.

This is v. sketchy, but hope it helps.

Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007

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



Re: [PHP] reading MS Excel?

2006-12-28 Thread Miles Thompson

At 09:49 AM 12/28/2006, William Stokes wrote:


Is it possible to read Excel files and store the info to DB? If so how?

Thanks
-Will



Yes - but rather than re-invent the wheel, google for php read excel.

Your solution may be there. Once you have read the information, then the 
rest is just an INSERT into the database.


Cheers - Miles



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.28/606 - Release Date: 12/28/2006

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



Re: [PHP] Merry Christmas!

2006-12-25 Thread Miles Thompson

At 07:20 AM 12/25/2006, Robert Cummings wrote:


WhoooOO! Hope you all have a great Christmas day. If
you don't celebrate Christmas, then I hope you have a great Christmas
day anyways *lol*. If this post offends you due to it's promotion of
Christmas then I apologize and hope you have a great anal retentive
Christmas day!!! :B

Merry Christmas,
Rob.



Hey Rob,

It's now Christmas night here in Nova Scotia.

We had a  great day. The weather was mild, so we had apcnic lunch on the 
way to visit my sister and her family; then had the big family get-together 
there. We missed our oldest, he's in Ottawa visiting his girlfriend, but 
then our job is to raise them to leave the nest. Besides, she's a lovely girl.


Merry Christmas to everyone - Miles


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.26/601 - Release Date: 12/24/2006

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



Re: [PHP] Problem with manual running PHP script

2006-10-27 Thread Miles Thompson

At 08:22 AM 10/27/2006, Rosen wrote:


Hi,
I have scheduled php script, which runs with c:\php\php.exe php test.php,
i.e. without browser. I give working dir the directory of the script.
When I start it from the browser all is ok.
But when I start manualy sctipt with c:\php\php.exe text.php ll.txt the
script gives me an error( in ll.txt): Call to undefined function:
ocilogon() in  
This is function for connect to Oracle database.
When I try to connect to MySQL database with the same script ( just for
test) , there in no problem.

Can someone help me ?

Thanks in advance,
Rosen


Run a phpinfo.php, with one function in it: phpinfo(). Do this from the 
command line to check that PHP, from the command line, has the module 
necessary to connect to Oracle. Sounds like it doesn't.


I've not worked much with PHP on Windows, so I guess you would make certain 
you have the .dll for Oracle and enabled it in PHP.


The browser and the command line are two completely different environments.

Miles



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.14/501 - Release Date: 10/26/2006

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



RE: [PHP] [funny] The state of Java Development

2006-10-27 Thread Miles Thompson

At 06:04 PM 10/27/2006, you wrote:


UGH This stupid list server stripped out the inline image. WTF!?

Here, I put it on my site http://daevid.com/junk/Java_Dev.jpg

DÆVID



They have the same staff trainer as Chapters / Indigo has in Canada. 
Chapters also threw out 1/4 of the books and replaced them with seasonal 
items - candles, scents, notepaper - you know, that ssort of stuff.


Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.14/501 - Release Date: 10/26/2006

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



Re: [PHP] Re: postback for php

2006-10-18 Thread Miles Thompson

At 11:48 AM 10/18/2006, M.Sokolewicz wrote:


Ross wrote:
Looked on google and not found a satisfactory answer. Doies anyone have a 
funtion to do this?


R.
please explain, in details, what it is you're looking for. postback for 
php - a function to do this doesn't mean squat to most people. Please EXPLAIN.


- tul


Yes, not a helpful description. Maybe he means a callback function which 
would do something like

echo 'a href='. $_SERVER['PHP_SELF'] .'Please try again/a';
and he may have to pass a variable string.

M.



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/480 - Release Date: 10/17/2006

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



Re: [PHP] Re: Best open source project/framework to support a php training course?

2006-09-27 Thread Miles Thompson

At 07:02 AM 9/27/2006, Tony Marston wrote:


If you want a web application framework that your students can play with may
I suggest http://www.radicore.org  This is already being used as a training
aid by a university in the far east, so it must have some merit.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

Pinocchio007 [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I am in charge of outlining a PHP/mySQL course (intro and advanced) for an
 education institute. I would like to include in the course program an
 in-depth study of an existing open-source project, allowing the students
 to
 be confronted, from an early stage, to a real-world environment. My
 problem
 is simple: which project/framework to choose in order to bring the current
 best practice to our students, and prepare them for the future. Not
 being
 a professional PHP developer myself, I would appreciate any
 recommendation.
 Which OS project would you include? Which framework? And why?

 My first idea was osCommerce, then somebody recommended Typo3,
 followed
 by a go for Joomla. Well, I am hesitating.
 Anybody can recommend an article/paper comparing the different PHP
 frameworks/application architectures?
 Is there a list where such topics are discussed?

 Thanks for your help and recommendations.

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



For a start, there are a lot of frameworks, with passionate adherents and 
users, so there is no one best.


I wouldn't suggest a framework - how about a component that works with 
something else. The AMFPHP project which provides a data link to Flash, or 
PDO (Persistent Data Objects)?


If you really think a framework is the way to go, contact Michael Ho, whose 
QCODO framework is somewhat different than many others as it has evolved 
from VB roots and is a code-generation framework. It works v. cleverly with 
the database, is highly modular, has a reasonably active group of 
developers working on custom controls, etc. PHP5 and MySQL 5 - definitely 
current. You might also have a look at Seagull or Cake, the latter being a 
PHP-like adaptation of Ruby on Rails.


The thing to remember is that PHP is a templating language and doesn't 
necessarily need another structure built atop it.  If you take students 
down the framework path watch that they do not stop learning PHP but start 
learning the templating language instead.


PHP Architect has run some interesting articles on frameworks, and Chris 
Shifflet has a regular security column - always worth reading.


Hope this has been helpful - Miles


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006

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



Re: [PHP] Download files outside DocumentRoot Dir

2006-09-25 Thread Miles Thompson

At 01:44 AM 9/25/2006, Ramiro wrote:


Hi,
i'm trying to find a good solution to this problem. I want download files
from a directory outside DocumentRoot.

This files cannot be downloaded through direct url like
http://site/test.zip. It must be downloaded after user login.

I know i can do that using some functions like fread() + fopen() or
readfile(), than i would echo file buffer to browser with correct headers.
But, reading then dumping file to browser is a big problem to server.

I've made one test that shows me i will eat 1.8% of RAM (i've used ps
aux at Linux, in a server with 2Gb of RAM) to download a 30Mb file at
60kb/s speed. So, imagine what a dump-php-script can do with 50 to 100
concurrently downloads. Probably i will need 1 TeraByte of RAM to provide
downloads ;)

Theres my question now. Is there other way to protect files against direct
downloading? (Obligating users to login and denying direct-url's).

I also know i can check referer by using Mod_Rewrite at Apache. But it isn't
secure, since referer cannot be sent or be fake.

Please, help me ;)

Thank you !

Script i used to test:
?
$url = test.tar.gz;

header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header(Content-Disposition: attachment; filename=\.basename($url).\;);
header('Content-Length: ' . filesize($url));
@readfile($url) OR die();
?

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


This is the contents of a script used to fetch .swf's. The script is called 
from a Flash movie.


$filenam =  $_REQUEST[filenam];
if ($filenam){
$contents = file_get_contents( ../above_root/ . $filenam );
echo $contents;
}else{
echo Not found;
}

HTH - Miles


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.8/455 - Release Date: 9/22/2006

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



Re: [PHP] +AFs-OT+AF0- Working with version control

2006-09-22 Thread Miles Thompson

At 06:21 PM 9/21/2006, Chris W. Parker wrote:


Hello,

This is off topic but I wanted to get the list member's opinions on the
subject as it will probably benefit someone else.

Currently I don't use version control at all. What I do instead is have
one directory that contains my development website and one directory
that contains the live website which I do not directly modify. When I
need to fix something or add a new feature I edit the development site
and copy the files that I've changed.

Sometimes I will start on a new feature before I am able to finish a
previous one. This is a major problem when the features overlap and I
have to edit the same file for both features. Even if I finish one of
the features I cannot publish the files because the other feature is not
ready yet.

What I'm looking to the list for is how I can overcome this through
version control.

What I'm thinking I'd do is create a base level (say v1.0) that I then
create a branch for every new feature and then merge those things
together. The issue I see in this case is the merging.

Is this a sound strategy or should I just realize that I can't publish
until all current features enhancements are completed?


Thanks,
Chris.



Not OT at all.

Use Subversion.
For a nice Windows interface - Tortoise. Sorry, I can't rememberthe name 
ofthe Linux interface.


Miles




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.7/454 - Release Date: 9/21/2006

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



Re: [PHP] Excessive Php scripting?

2006-09-06 Thread Miles Thompson

At 02:02 AM 9/6/2006, Justin Madru wrote:

I'm creating a simple personal web server. On a few of the pages is a html 
table. I was thinking of making it a php script, and the script would just 
output the html code for _one_ row. I would be calling the same very small 
php script maybe _30+_ times in the same page.


My server is only 500MHz and 160MB ram, so I want to know if I should make 
it a php script or just html? Would calling the same function 30+ times 
_bog_down_ my server or would it actually _improve_performance_ (because 
of caching)?


an example script:

function print_table_row($name, $address, $os, $wiki)
{
echo 'tr
 td class=t_program
  a href=', $address, '', $name, '/a
 /td
 td class=t_program', $os, '/td
 td class=t_program
  a href=http://en.wikipedia.org/wiki/', $wiki, '(more 
info)/a /td

/tr';
}


Well, I'm a programmer, so even if the info was fairly static I'd stick it 
in an array and the then loop through the array, calling your function. to 
me, that's simpler.


OTH - just build am HTML table.

Either way, no big deal. I doubt you'll see much of a speed difference

Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 9/5/2006

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



[PHP] OT - PHP Hosting Service in UK?

2006-09-05 Thread Miles Thompson


I have a Canadian client, presently living in England, who is setting up a 
vary basic web site. The business is located in the UK, it  makes sense to 
have the web hosting service in the UK as well.


Would anyone who is happy with a UK hosting service offering PHP 
(preferably 5) and MySQL please make a suggestion. (I'm willing to accept 
one or two outages a years, more importantly, if there is a problem with 
email, etc., are they responsive?)


Regards - Miles Thompson
(902) 440-2010
Ask the fruitful question.


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/437 - Release Date: 9/4/2006

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



Re: [PHP] Dynamically assigning var namesi

2006-08-01 Thread Miles Thompson

At 02:49 PM 8/1/2006, bob pilly wrote:


Hi all

Does anyone know if you can assign a new variable name based on the 
contents of another variable in PHP? If so whats the syntax to do this?


 I am parsing a text file that has tens of preset attributes and some of 
these have hundreds of sub attributes. For example the text file contains 
flight details, on every flight there can be up to 500 passengers but 
there are generally only 50 so i dont want to have declare 500 vars when 
i hardly ever use them. What i am trying to do is count the amount of 
pasengers present and dynamically create the variables based on 
this.$surname1,$surname2 etc...


 Im not sure whether this is a sane way to approach this problem or not. 
Any advice or pointing to relevant documentation about either syntax for 
this or ways of tackling this sort of problem (im sure it must be a 
regular occurance in the coding world??) would be greatly appreciated!!


Thanks in advance for any help or advice.

Cheers

Bob



Use arrays - check the array_push() function.
Or - and I'm winging it here - an array of objects, assuming PHP will let 
you do so.


Then with all of the other wonderful functions PHP has for managing arrays 
you're away to the races.


Alternately, if PHP will not allow arrays of objects, use parallel arrays.

Either method will be much easier than trying to create $var1, $var2,  ... 
$var


Regards - Miles Thompson




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/404 - Release Date: 7/31/2006

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



Re: [PHP] card scanners and PHP

2006-07-26 Thread Miles Thompson

At 04:31 PM 7/26/2006, Jay Blanchard wrote:


For our retail application (written in PHP) we are looking for a class
that will work with a scanner to scan a driver's license or business
card and populate the forms properly with that data. I have found a
product (IDScan) that may work with PHP, but I was hoping to find others
to compare it to. Anyone have or know of anything like this?

Thanks!



Jay,


Do you mean a magnetic stripe reader?
Information is scattered all over business cards.

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.4/399 - Release Date: 7/25/2006

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



Re: [PHP] Sort Array

2006-07-18 Thread Miles Thompson

At 10:51 AM 7/18/2006, weetat wrote:


Hi


I have the array below : How to sort the array by Model and Country?

Thanks

array(

  TBA0123456 = array(Country=Singapore,Model=WS8234),
  TBA0123458 = array(Country=Indonesia,Model=WS2234),
  TBA0123459 = array(Country=Vietnam,Model=WS7234),
  TBA0123452 = array(Country=England,Model=WS1234),
  TBA0123451 = array(Country=Germany,Model=WS6234),

)


You do not way how the array is created.

If from a database, add  SORT by Model, Country  to your query and let 
the database do the work. Otherwise, read up on ar_multisort(), but I do 
not think you are going to find a built-in way of sorting one array on two 
indexes or key values.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 7/17/2006

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



Re: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Miles Thompson


George,

You always have the interesting challenges served to you.

Is this at the client or the server end? Controlled through the browser? 
Only at the browser on the server?

I think there's a discussion about .com objects in the manual.

Have fun - Miles

At 09:16 AM 6/27/2006, George Pitcher wrote:


Hi,

I have been asked to look at extending one of my CMS systems to incorporate
integration to a library management system, as well as LDAP and Active
Directory. The requirement also asks for scanning and OCR of documents to be
controlled by the CMS.

Does anyone have any experience of implementing the scanning into a PHP
application?

MTIA

George

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



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 6/26/2006

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



RE: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Miles Thompson

At 11:33 AM 6/27/2006, Arno Kuhl wrote:


-Original Message-
From: Stut [mailto:[EMAIL PROTECTED]
Sent: 27 June 2006 03:11
To: Peter Lauri
Cc: 'George Pitcher'; php-general@lists.php.net
Subject: Re: [PHP] Controlling a scanner with PHP


Peter Lauri wrote:
 Probably nobody, as PHP is a Server Side Scripting Language.

If there's one thing I hate it's needless pigeonholing. PHP is not a
Server Side Scripting Language. It is a scripting language for sure,
but is by no means limited to being used on a server never mind on a web
server.


-Stut
-


Stut, that's an interesting point you raised. I know it's moving off the
original topic, but when you say by no means limited to being used on a
server never mind on a web server, what is it that interprets the code and
where does the output go to, or the input come from? I also thought it
always had to be run under a web server, and would be interested to know
what the other options/opportunities are.

Cheers
Arno


Arno,

You can do the cron job thing and call it from the command line.

You can also write GUI apps using PHP-GTK+. It's sort of in transition now 
between version 1 and version 2.


Did this for a client as there was some database work we wanted to do on 
the local machine, fetching information from time to time from the database 
on the web. Works quite well and is saving them a lot of time.


By now we're way OT on the scanner question. g

Cheers - Miles Thompson




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.5/376 - Release Date: 6/26/2006

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



Re: [PHP] templating

2006-06-22 Thread Miles Thompson

At 08:10 AM 6/22/2006, Ryan A wrote:


Hi,

A pal of mine needed some help on his project, he is
using a header and footer file to template his
project... but its gotten a bit complicated as he has
a few dynamic parts in the header and footer files, so
I told him to go with a proper templating method of
templating the whole page rather than includ()ing the
top and bottom.

After having a better look at his scripts, I am just
not sure if something big (like SMARTY for instance)
would be good for him. He just needs maybe 5 template
pages, same pages, different color.

Searching google I see literally hundreds of
templating solutions can anyone recommend a simple
one or should I tell him to just use str_replace() for
tags like: {{menu_here}} {{header_here} etc?
Something like SMARTY would be like using a nuke to
kill a fly (IMHO) esp since this project will not
expand to anything much bigger or complicated.

Thanks!
Ryan



Ryan,

Don't forget, PHP itself is a templating language. Just do a standard page, 
with includes for headers and footers, menus, and content.


If he wants to change colour, then load a different stylesheet for a given 
page or content section.


This way he can use the tool that's right in front of him, he's not adding 
another layer, he does not have to learn another language - the template 
system written in PHP, and he hones his PHP skills.


Whew!  Hope this is helpful.

Regards - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.2/372 - Release Date: 6/21/2006

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



Re: [PHP] getting subdirectory

2006-05-23 Thread Miles Thompson

At 02:29 PM 5/23/2006, Dallas Cahker wrote:


how do I get the subdirectory that a page is being pulled from.

say I have three sites running the same script and I need to determine which
site is which.

http://www.domain.com/subdir1
http://www.domain.com/subdir2
http://www.domain.com/subdir3

and subdir1, subdir2 and subdir3 all need different header and different db
and so on.

how would i get that I am in site subdir3 and not in subdir1?



Check phpinfo(), particularly SCRIPT_FILENAME or REQUEST_URI or 
SCRIPT_FILENAME in the Apache Environment section, and everything following 
_SERVER[REQUEST_URI] in the PHP Variables section.


But why not just put the appropriate header in the subdirectory you are using?

Cheers - Miles



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 5/22/2006

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



Re: [PHP] Development Environments/Automation

2006-05-15 Thread Miles Thompson

At 02:01 PM 5/15/2006, Brian Anderson wrote:


Hello,

I am being asked to find some sort of development environment for 
PHP/MySQL, if is exists, in which it has some sort of 
automation/wizzardry. What is being done is a mass of MSAccess interfaces, 
forms, reports, etc. are needing to be re-written in php and connected to 
a MySQL database instead of the Access.


What is being asked for is something that although being able to build 
some interfaces through wizzards/gui's, that is be somewhat logical, and 
streamlined in its management of code and html.  Something that implements 
some kind of smarty tag or similar woould be good instead of say... 
Macromedia which can do some fairly bloated and cumbersome things with 
logic and markup. Also, It would need to be flexible enough to manage 
projects back and forth between wizzards, and hand coding so that one 
wasn't limited to the narrow applications of the wizzard.


Does something like this exist?

I have played around with Macromedia, and another app called CodeCharge 
Studio. I hope that I am asking the right or at least an intelligent question.


-Brian


Do you mean a framework?

Have a look at Qcodo, Cake, etc. Qcodo allows you to preserve your 
interface while making logic / database changes.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 5/14/2006

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



Re: [PHP] Rhumb Lines

2006-05-05 Thread Miles Thompson

At 11:01 AM 5/5/2006, Leonard Burton wrote:


HI All,

I need to calculate Rhumb Lines in an application and have not found a
good formula for doing such.

Does anyone know of an existing Class/Function that will calculate Rhumb 
Lines?


Thanks and Be Well,

--
Leonard Burton, N9URK
[EMAIL PROTECTED]

The prolonged evacuation would have dramatically affected the
survivability of the occupants.


Leonard,

What an interesting problem. You might have better luck on a GIS or ocean 
racing list.


But a quick look revealed this link: 
http://www.geocities.com/capecanaveral/2265/msail.htm

and the JavaScript can be picked off with reveal source.

Let us know how it works out.

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.5.4/332 - Release Date: 5/4/2006

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



Re: [PHP] What editor do you use?

2006-05-04 Thread Miles Thompson

At 03:35 PM 5/4/2006, John Nichel wrote:


Nicolas Verhaeghe wrote:

I am currently looking for a good PHP editor for Windows. I know, the
question must have been asked so many times, but I thought I could ask it
again now that a few editors have evolved, others have appeared.


It has been asked, and usually starts a flame war.

STFA


And after scratching the bald spot a bit, enlightenment. No, that's not the 
name of an editor, but


Search The Fine Archives - because yes, this has been done to death.

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.392 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006

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



Re: [PHP] Paged Results Set in MySQL DB with one result

2006-05-03 Thread Miles Thompson

At 03:51 PM 5/3/2006, Phillip S. Baker wrote:


Greetings Gents,

I have an interesting problem I would like some ideas on for a solution.
I cannot seem to find any code examples on the net, though I might not be 
looking in the right place really.


I have some articles stored in a MySQL DB.
What I want is if the article is above a certain length in characters, to 
page article through a few pages for site readability.


So I would want to print X number of words/characters.
Save the where the pointer is, move on to the next page, and display the 
same amount and so on for as many pages as needed.


I know about pulling paged results using the limit function but that would 
not seem to apply as really I would want to page the results within one 
record (one field really).


Does anyone have any ideas??
Thanks

Phillip


Ideas mentioned thus far are all good. At the end of 2005 we changed 
allnovascotia.com, a daily business digest, from continuous strip, to 
separate articles. Each article is stored in a database; the retrieved text 
is delivered via Flash. Presentation consists of headlines on left, story 
on the right in an htmlText control; clicking a headline loads the story 
into the htmlText control.


Subscribers like the new format because the whole issue was getting rather 
long, and now they can gun down the headlines and quickly read the lead 
paras and decide whether or not they want more of that story.


However - why do you  think paging an article improves readability? What it 
does do is control the amount of text you display on a page so  you can 
profitably surround it with advertising. It has no effect on readabilty -- 
that depends on the quality of the writing, clarity and size of font, and 
line length.


So, give them good dynamic design, a legible font, the ability to resize 
the type and ensure that the pieces are well-edited and written for easy 
reading in a browser.


Guess I'm an iconoclast, but when I see an artificially paged article I 
look for the Print View link so I can read it all at once. Heresy!  Maybe 
that's another reason for paging -- you get more hits on the site.


Guess this has been more like a semi-rant, and probably not helpful. g

Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.5.2/329 - Release Date: 5/2/2006

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



Re: [PHP] PHP Standard style of writing your code

2006-04-29 Thread Miles Thompson

At 03:19 AM 4/29/2006, Robert Cummings wrote:


On Sat, 2006-04-29 at 02:08, Paul Novitski wrote:
  IMHO, vertical aligned brackets can be messy when nesting
 relatively-small blocks (and seems to me like a lot of wasted space)

nsip
 like a use, not a waste.

 OK, OK, I'll stop.  Think I'll go out and get wasted~

Drink with friends... that way you have someone to brace you when you're
fall down drunk.

Cheers,
Rob.


Poorstyle:

drunken(){
echo Lopsided me;
}

Goodstyle:

drunken()
{
echo Supported me;
}

But the question arises, in goodstyle - should one indent the braces?

I used to code goodstyle, more and more it's poorstyle - nad the 
computer doesn't care, and Ultraedit can match braces, which helps when I 
get lost. I wish UE would also fold code.


With tongue firmly in cheek - cheers - Miles



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date: 4/28/2006

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



Re: [PHP] PHP and CakePHP: How to use the $html-selectTag()

2006-04-11 Thread Miles Thompson

At 11:54 PM 4/10/2006, Pham Huu Le Quoc Phuc wrote:


Hi everybody!
I'm a newbie. My question maybe very funny. But please answer to me if you
have any ideas.
I use $html-selectTag(), I don't know how to use OnChange.
When User choose a item on SelectTag, I want Browser to redirect another
page and get current value.

Thank so much!


Cake is written in PHP, but your question concerns Cake, not PHP.

Have you asked in the Cake-PHP Google group?
http://groups.google.com/group/cake-php

or checked the wiki at the main Cake site?

Please understand, there are so many frameworks and  CMS's that those 
questions specific to them would choke the list.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.4.1/307 - Release Date: 4/10/2006

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



Re: [PHP] Completing forms offline with PHP/MySQL

2006-04-07 Thread Miles Thompson

At 01:06 PM 4/7/2006, Kevin Davies - Bonhurst Consulting wrote:


Hi,

Apologies if this is the wrong place for this question, but I'm sure there
are some experts out there who might be able to point me in the right
direction... :)

I'm doing some work at the moment where remote teams can submit reports
through to our database when connected over the internet to our server.
However, I've been asked to look in the possibility of the teams completing
the form offline, and uploading when they have access to a connection.

It looks like I might be able offer something like Microsoft InfoPath forms
(better recommendations?) to generate an XML file, and then use a PHP file
to upload the file into the database. Additionally, I could also do with
this process uploading a number of other files (e.g. images, text files) to
the server.

Does anyone have any experience in this area, and would be able to recommend
a solution?

Thanks in advance for your help...

Kevin



PHP-GTK+
GTK+ front end, laid out using wGlade (which creates an XML-like file with 
a .glade extension), and of course, PHP for all of your logic.


Works

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release Date: 4/6/2006

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



RE: [PHP] code obfuscating

2006-04-07 Thread Miles Thompson

At 04:05 PM 4/7/2006, you wrote:


[snip]
Am seeking for a solution to obfuscate php code on the server side, so
if i decide to sell php closed source applications, i can encode the
source code.

Thanks for your help
[/snip]

No problem, we are always glad to answer questions. You're welcome.

and the truly useful suggestion issnipped


Hey Jay,

Better add to that.  Bring the light down slowly as the pouring rain 
ascends - critical.


Miles



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.5/303 - Release Date: 4/6/2006

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



Re: [PHP] IF or SWITCH

2006-04-06 Thread Miles Thompson

At 05:56 PM 4/6/2006, John Nichel wrote:

snip
I remember IF constructs from BASIC and PASCAL, but no switch statements 
(somebody correct me if I'm wrong).  But what I'm wondering is how in the 
world did you do conditional checking if there were no switches, and you 
don't use IF's?  Did you not code error handling, different cases based on 
user input, status of a data stream, etc in all the years prior to 
something like switch being introduced???


--
John C. Nichel IV


Ye gods -- I'm getting old. I had to look this up.
Yup - Pascal has

case operator of
.. statements ...
otherwise
.. statement
end;

And you can group cases.

Forgotten all that - had to look it up.

What  I think happens is that we are merrily noodling along in our code, 
and a condition rears its head. Simple - if .. else. Then things get a bit 
more complicated, and so we end up with nested if .. elseif .. else constructs.


Personally I like the clarity of switch, but don't use it often because I 
generally try to avoid messy nests of conditions.


Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.5/302 - Release Date: 4/5/2006

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



Re: [PHP] IF or SWITCH

2006-04-06 Thread Miles Thompson

At 11:40 PM 4/6/2006, Kevin Waterson wrote:


This one time, at band camp, Robert Cummings [EMAIL PROTECTED] wrote:

 I'm gonna go out on a limb here and say WRONG!

 Run yourself a benchmark.

benchmarks can be hazardous, but lets look at them at their most basic 
level. By this

I mean how folks use them every day...

http://www.phpro.org/benchmarks/if-switch-benchmark.html

Kind regards
Kevin
--



Actually, a minimal victory.
If it can be used, I'd go for the clarity of switch.

M.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.5/302 - Release Date: 4/5/2006

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



Re: [PHP] Re: PHP AJAX Framework - Suggestions Please

2006-04-03 Thread Miles Thompson

At 06:25 PM 4/3/2006, Andrei Verovski (aka MacGuru) wrote:


Hi,

Many thanks for everyone who have replied. Its seems Manuel's suggestion
regarding iFrame sounds really good. BTW, I am using Savant as template
engine, and integrate it with Manuel Forms Generation and Validation would be
a good idea (there is a Smarty plugin for this class, but I am using Savant).

Basically, I have a problem porting my own FileMaker database with many
multi-page forms (plus large tables and big drop-down lists, displaying
thousands of items). Things made quickly with native GUI tools often very
difficult to port to Web-based GUI.

snip

Andrei,

Had to do the same thing a couple of years ago, one of the fields involved 
European phone numbers. No matter what native export method I tried, the 
phone numbers ended up getting converted to exponential notation.


IIRC when dumping the data FileMaker saw that field as numbers and treated 
it accordingly. So I dumped it, sucked it into FoxPro, opened up the .dbf 
header and changed the field to character, and saved it. Then it could be 
imported into Access ( which was what the customer wanted.)


Hope this is helpful - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006

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



Re: [PHP] microsoft PHP ?

2006-04-02 Thread Miles Thompson

At 11:38 AM 4/2/2006, tedd wrote:


At 4:20 PM -0500 4/1/06, Joe Wollard wrote:

Leave poor Zouari alone! I for one think that Microsoft buying Zend would be
the best thing to happen to PHP, EVAR!


You might not think that way if you had been developing in M$ QuickBASIC 
for the Mac. One day M$ just said Nope, the line isn't making the money 
we want, so we're dropping it. There were a lot of developers who were 
left hanging -- I wouldn't want to be there again.


If at all possible, I choose any alternative over what M$ provides.

tedd
--


Ditto to what Tedd just wrote - a major client has a project stranded 
forever in VB6 because MSFT broke the model with VB.NET. There are 
constructs and structures which were perfectly legitimate when it was first 
conceived, when VB4 was the current version.


So - when I was asked to write a little app to maintain some subscriber 
billing info and create some reports on the desktop side, which could have 
been done in Excel, I opted for PHP, PHP-GTK and MySQL. There was a 
learning curve with PHP-GTK's layout (Glade helped a lot!!) but this will 
continue to work, Windows or Linux, and should run on later Macs.


Great feeling!

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006

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



Re: [PHP] php 5 installation problem

2006-03-17 Thread Miles Thompson

At 01:39 AM 3/17/2006, - Edwin - wrote:


Hi!

On Thu, 16 Mar 2006 20:45:29 -0400
Miles Thompson [EMAIL PROTECTED] wrote:

 At 06:23 PM 3/16/2006, Anthony Ettinger wrote:

 [...]
 Is there a drawback to running php5 as CGI?

 Anthony,

 I really don't know, because computers are much faster, so
 there may not be the time lags there were 10 years ago.

 As I understand CGI, the web server sees that the page is of
 type .php, starts up PHP, PHP processes the page, the web
 server shuts down PHP and sends out the results. The overhead
 of starting and stopping PHP (or Perl, etc.) was the
 complaint.

 When PHP is loaded as an Apache module there is not startup /
 shutdown overhead.

 If I have this wrong, or if PHP5 as a CGI stays resident and
 there is no penalty, will someone please correct me.

No, nothing wrong there, I think.

But there are other differences. (Like some functions not
working, etc.) Pros and cons, one might say. Anyway, here
are some results of a quick google search:

  http://www.google.com/search?q=php+CGI+module+difference

Hmm.. I just couldn't find it but there should be a page
about it on www.php.net ... (^_-)

 Regards - Miles

HTH,

- Edwin -



Thanks Edwin. I guess it was too late and I couldn't formulate a proper 
search expression.


I'd like to hear Chris Shiflet's opinion on the security advantages of 
running PHP5 as CGI. Why, after years of running PHP as an Apache module, 
the sudden conversion to CGI operation?


I've noticed occasional references of PHP5 having issues with CPanel. Is 
it simply easier for ISPs, given the intense competitive cost pressures 
they are under, to not wrestle with these issues, but to say Here it is as 
a CGI if you want it.


Regards - Miles Thompson


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] print page from php

2006-03-17 Thread Miles Thompson

At 09:57 AM 3/17/2006, Reinhart Viane wrote:


All,

I have a web page with the results from several database queries.
Now this page has an undefined horizontal and vertical size.

Does anyone know if there is a php script available that will automatically
split the webpage into parts that can fit on an A4 page?

Or do I have to set boundaries on the size of the tables the queried data
will be shown in.

Hope this makes any sense,

Thanks in advance,

Reinhart Viane

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



CSS is probably the best solution
http://www.w3.org/TR/REC-CSS2/page.html#q16
found whle googling

http://www.google.ca/search?hl=enq=printing+CSS+mediabtnG=Google+Search

This is a good article: http://css-discuss.incutio.com/?page=PrintStylesheets
and as always, A List Apart has CSS Design: going to Print at 
http://www.alistapart.com/stories/goingtoprint/


I have seen examples of two-column pages, but do not know if the pages 
broke correctly when the matter was longer than one page.


Alternately, display in tables and make certain you have a TH so your 
header can repeat.


Hope this steers you in the right direction - Miles. 



--
Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] Re: [PHP-DEV] Re: Problem

2006-03-16 Thread Miles Thompson

At 07:47 AM 3/16/2006, Bikram Suri wrote:


I changed that it was windows but still did not change anything. I even
reinstalled wamp but still
the include_path variable in phpinfo(); shows c:\php5\pear

Please help as this putting a stop on my work

regards and thank you for all the help


--
Bikram Suri


Have you done a search across all drives and directories for all instances 
of php.ini?

Is there one somewhere on the path shown under Apache Environment in phpinfo()?
Have you checked the setup instructions for non-WAMP installation of PHP5? 
They may tell where php.ini is located. There's obviously one lying around 
somewhere that's getting read.


Not much help, I'm afraid, but in these situations one tends to flail or 
repeatedly try the same solution.


Good luck - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] php 5 installation problem

2006-03-16 Thread Miles Thompson

At 05:40 PM 3/16/2006, Anthony Ettinger wrote:


dreamhost let's you choose php4 or 5, as I'm sure others do as well.

snipped all 'dat stuff

A little more on dreamhost.
PHP5 is installed as CGI, not Apache module.

Does anyone have any experience with Nexcess.net -- advertisers on back 
page of PHP | Architect?


At hub.org you can install anything - virtual server.

Cheers - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] php 5 installation problem

2006-03-16 Thread Miles Thompson

At 06:23 PM 3/16/2006, Anthony Ettinger wrote:


On 3/16/06, Miles Thompson [EMAIL PROTECTED] wrote:
 At 05:40 PM 3/16/2006, Anthony Ettinger wrote:

 dreamhost let's you choose php4 or 5, as I'm sure others do as well.
 snipped all 'dat stuff

 A little more on dreamhost.
 PHP5 is installed as CGI, not Apache module.

Is there a drawback to running php5 as CGI?

--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html


Anthony,

I really don't know, because computers are much faster, so there may not be 
the time lags there were 10 years ago.


As I understand CGI, the web server sees that the page is of type .php, 
starts up PHP, PHP processes the page, the web server shuts down PHP and 
sends out the results. The overhead of starting and stopping PHP (or Perl, 
etc.) was the complaint.


When PHP is loaded as an Apache module there is not startup / shutdown 
overhead.


If I have this wrong, or if PHP5 as a CGI stays resident and there is no 
penalty, will someone please correct me.


Regards - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] MySQL NOT IN Query not working

2006-03-16 Thread Miles Thompson

At 08:41 PM 3/16/2006, Kevin Murphy wrote:


Anyone want to point me to why this isn't working:

$hr_query = select dp_lname,dp_fname,dp_id
FROM dir_all
WHERE dp_id NOT IN (SELECT sup_id FROM dir_title2)
ORDER BY dp_lname;

There are two tables, dir_all (the main list of everyone) and
dir_title2 (supplemental). If someone is in dir_title2 then the
sup_id is the same as their dp_id. What I am trying to do is get a
list of every person in dir_all that is NOT in dir_title2. Any
thoughts as to what am doing wrong?

--
Kevin Murphy
Webmaster - Information and Marketing Services
Western Nevada Community College
www.wncc.edu
(775) 445-3326


Kevin,

Looks like an older version of MySQL.
Check your version: subqueries were not supported until ver 4.1.

The older docs at MySQL give a work around.

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] to check idle time of users

2006-03-15 Thread Miles Thompson

At 09:32 AM 3/15/2006, suresh kumar wrote:


in windows,if user idle for 1 minute,his desktop
screen is changed to screen saver.i like to implement
the same logic in my project if user is idle for 3
minutes its session will have to automatically
destroy.i am waiting for or response.



Fergawdsake - read the bloody manual!!

Hint anything associated with session is a good place to start 
looking.  You ask question after question that can be solved by checking 
the docs.


Further hint - you're earning a rep for asking questions easily resolved 
from the docs. Two things can now happen: people will filter you out, or 
when you have a real problem it will not be looked at.


And don't be so damned arrogant you end with i am waiting for or (sic) 
reponse. No one on this list is another's servant.


Regards - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] determining client's external IP

2006-03-13 Thread Miles Thompson

At 02:39 PM 3/13/2006, tedd wrote:


Jochem wrote:


life is not that simple here are some functions I wrote as an attempt to
to better than 'REMOTE_ADDR' - interested if these allow you to retrieve the
same IP as whatismyip.com:


-snip-

A most impressive piece of code -- thank you, it works great!

While you appear to get down to the person's IP, where would one get the 
assorted associated details, such as the IP location text, Reverse IP (if 
any) and Reverse DNS?


For example, such as that provided by:

http://whois.sc

Do these people have access to dB's that civilians don't?

tedd
--

http://sperling.com



Tedd,

Try this link.
http://www.ip2location.com/articles/article2.htm

ip2location.com also have a free database of IP's.

Google turns up others, they are all roughly similar.

HTH - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] database connection pool

2006-03-11 Thread Miles Thompson

At 06:17 AM 3/11/2006, Khai wrote:


Hello,

My name is Khai.  I am new to PHP.  I am well versed with mod_perl and 
apache.  With mod_perl, I can use Apache::DBI to cache database 
connections.  Is there a module for PHP that does the same thing ?


Thank you,

Khai

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



Do you mean persistent connections?

That depends on the database and the functions provided for it in PHP. 
Check the connection function(s) in the manual for the database you use.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] equivalent of perl's ithread

2006-03-11 Thread Miles Thompson

At 06:33 AM 3/11/2006, Khai wrote:

As of perl 5.6, perl has a concept of interpreter thread (called 
ithread).  Basically, any variable that you want to be shared across 
threads, you have to explicitly shared it.  This apply not only to regular 
variables, but also apply to super global variables such as $_, making it 
easy to write threadsafe modules in perl.


Does PHP has an equivalent concept?  If I am developing php pages that are 
to be run under apache2 threaded worker mpm, can I use $_SERVER variable ?


Thanks
Khai


Check the archives for thread safety and running PHP under Apache 2. The 
URL is:

http://marc.theaimsgroup.com/?l=php-generalr=1w=2
My information may be out of date, but the last I read was that PHP itself 
was OK, but some modules were not thread-safe.


Regards - Miles



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.1/279 - Release Date: 3/10/2006

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



Re: [PHP] Poker stats GET/POST page devleopment

2006-03-07 Thread Miles Thompson

At 12:26 PM 3/7/2006, The Doctor wrote:


Someone wishes to develop a site using PHP/SQL .


Here are the specs:

The site the client is looking for is not a gaming site.

It is a site where players register to keep track of their winnings on 
GAMING sites.  It will have a freeroll side(where players get points not 
money)  and a Money tour side where players will win money and points.


This site will request (GET) data from the gaming sites for the registered 
members and compile(POST) the info into the db.  A number of queries will 
need to be set up ie.


top 10 - 20 - 50 for free roll
top 10 - 20 - 50 for money tour

List of registered members   by date registered

List of registered members   by points earned

List of registered members   by money won

List of registered members   by last name alphabetacally

We should also have a db of all the poker sites which we could concatenate 
with other queries.


ie.  registered members placements in xxxpokerroom.com  etc.

I hope all this makes sense to you.  Let me know if any of this is not doable.

P.S. They want to able to administer to the site themselves... We could 
set up a secure sign in and allow them access to the CGI bin through html 
pages or shtml pages.  Not too familiar with the CMS side of things for 
something like this.


end of client request.


How doable is this and what Can I use in the process?

SQL options are MySQL and PostGresQL.

Member - Liberal International
This is [EMAIL PROTECTED]   Ici [EMAIL PROTECTED]
God Queen and country! Beware Anti-Christ rising!
Canada's New CONservatives - Same old Tory.


Yes, this is doable, but do you have permission to query the results on the 
gaming sites? I should think they would be very reluctant to release that 
information.


PostGreSQL would let you do subqueries, so some operations will be a little 
simpler.


So -- yes you can do it, using PHP - Ruby - Python - Perl or ??? What's the 
real question?


Cheers - Miles in Nova Scotia. 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 3/6/2006

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



Re: [PHP] Incremental Date Based ID

2006-03-07 Thread Miles Thompson

At 08:46 PM 3/7/2006, Kevin Murphy wrote:


I'm trying to set up an ID field that works like this for news
articles that are posted to a website.

2006-03-05a
2006-03-05b

I know how to generate the date, and I am pretty sure I can generate
the letter code based on counting the number of rows and then
assigning the next letter (we will never have more than 26 in a
day... usually its closer to 1 or 2 per day).

The problem is if there has been something deleted.

2006-03-05a
2006-03-05c

If I then Count the rows with this date I get an answer of 2, and so
the next letter should be c but there already is a c because b
got deleted.

So, is there any way of generating this style ID number automatically?

--
Kevin Murphy
Webmaster - Information and Marketing Services
Western Nevada Community College
www.wncc.edu
(775) 445-3326



Why make it so HARD??
Having gone that far, just timestamp your id. Not a  timestamp in the sense 
of it being triggered whenever a record was changed, but the time it 
was  created.


Better yet - use your publish date and assign a  sequence number to the 
article. Doesn't matter what the number is, but you can then use it to 
roughly - or accurately - sequence articles for publication. If articles 
have same sequence number they'll appear in whatever order they were added 
to the database.


For a count of the articles, just count(pub_date).

And yes, if you insist, you can generate the number automatically. Just 
establish a table for id values. It has two fields, table_name and id_value.
Write a function to grab the current id_value, then increment and store it. 
Note grab first, then increment and store. I still think this is much more 
work than you need.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 3/6/2006

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



Re: [PHP] Re: Incremental Date Based ID

2006-03-07 Thread Miles Thompson

At 09:05 PM 3/7/2006, Kevin Murphy wrote:


Well, part of the issue is that I want to be able to use this as part
of the link:

/news.php?article=2006-03-05a
/news.php?article=2006-03-05b

which i will eventually do a htacess rewrite to make it look like

/news/2006-03-05a.php
/news/2006-03-05a.php

I don't think I can do that with just the Unix timestamp.

snip

Why not - treat the number as a string and assign that to the file.
I was under the impression you were storing the articles in a database.

Alternately, create a directory for each year, one for each month within 
the year, one for each day within the month, then sequence alphabetically 
within the day. Does this resemble the structure of the MS knowledgebase? Yep!


The first year Allnovascotia.com was published we did something like that, 
although the articles just had regular titles.


In any event - have fun.

Cheers - Miles

PS Convention in this group is to bottom post. /mt 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 3/6/2006

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



RE: [PHP] Mysql Rows

2006-03-06 Thread Miles Thompson

At 10:56 AM 3/6/2006, tedd wrote:


As such, if you don't renumber, then the only thing left is to use a
timestamp, I guess.
[/snip]

No, if you have gaps you can still step through sequentially, like 14,
15, 18, 19, 20...


It's the gaps that are the problem.

I have no problem understanding why there are gaps in a dB and dealing 
with them. After all I've been juggling memory and bit-twiddling longer 
than I want to admit, so I understand holes in stuff. But what I am 
trying to solve is the simple thing of presenting records to a civilian 
such that there are no gaps in his record keeping.


I don't want to have to explain to my client why his dB has gaps in it. I 
don't want to listen to him asking why those gaps aren't filled. In fact, 
I don't want to raise the issue at all if I can get around it.


One way I found to get around this problem was to simply renumber the id 
filed in the table -- but, I received considerable advice against that 
from this list. I'm still not certain as to why that shouldn't be 
considered a good solution, but the feelings of the group are don't 
do it.


So, I'm still trying to find a simple way around this problem. Either I 
renumber the id field OR provide an external counter to present to the 
user. I don't see any other solutions, does anyone?


Thanks.

tedd


Tedd,

Why does he even have to see gaps? Just present the info, unless he wants 
to see the ID.


If wonders why there are gaps, then just tell him that happens when someone 
is deleted.


If he wants the gaps filled - then keep a table of the holes and 
recycle those numbers when new members are added. But there will still be 
occasional gaps.


But if you renumber the ID field, you have seamless crap, because the 
number is absolutely meaningless. Today I'm 2345, tomorrow 2344 because one 
member's been deleted, next day I'm 2322 because a lot of people were 
deleted but the day after that 2367 because a lot of people signed up.


If the client wants the number of current people, then SELECT Count(*) ... 
gets it for you.


Why are we still chasing this thread?

Regards - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.1.2/274 - Release Date: 3/3/2006

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



Re: [PHP] Mysql Rows

2006-03-04 Thread Miles Thompson

I hope the following will be helpful, and it is a bit of a rant ..

rant
The row number DOES NOT MATTER and is absolutely irrelevant. MySQL is a 
relational database from which information is gathered by means of 
comparing fields to key values.  Even if you are using an auto-incremented 
primary key it serves ONLY AS A LABEL to UNIQUELY identify each row.


If you need sequential numbers, as for membership, devise a script to 
manage them and recycle them, if that's what you want.


For the number of returned rows, check mysql_row_count (or similar function).

Recognize that an ORDER BY condition will change the apparent row number.
/rant

I am v. curious as to why you need to know which row is used for jimmy.

Regards - Miles


At 07:51 PM 3/3/2006, benifactor wrote:


i need to find a way to find out what number of a row is in a database...

for example:

//this is the database
Username: Chuck Password: adsasa
Username: jimmy Password: adsf
Username: stewart Password: dfds

the information i need is what row jimmy resides on..

this is what i tried:

function i_gun ($user) {
global $username;
$gun = mysql_query(select * from users);
while ($d = mysql_fetch_array($gun)) {
while($d[username] != $user) {
$i = $i + 1;
}
}
}

but it always returns 1. can sombody tell me what i am doing wrong or 
point me in the right direction in the manual? plase and thank you



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 268.1.2/274 - Release Date: 3/3/2006

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



Re: [PHP] SQL request on DBase file...

2006-02-10 Thread Miles Thompson

At 07:27 PM 2/10/2006, David BERCOT wrote:


Hi,

I have to rewrite an application from ASP. In this application, I
receive DBase files which may be saved into Oracle.
In ASP, I used a generic driver and I made SQL requests on these files.
It is possible with PHP on Linux ?
Do you have some examples ?

Thank you very much.

David.


Come on -- read the manual. There's a section .dbf files.

Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.4/255 - Release Date: 2/9/2006

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



Re: [PHP] global variable declaration

2006-02-08 Thread Miles Thompson

At 10:46 AM 2/8/2006, suresh kumar wrote:


hai,
   this is my sample code:
i am having user table  with SponsorID as one 
field in mysql  database,this is my query;


  for($j=0;$j5;$j++):
   $result=mysql_query(select * from user where SponsorID='$id[$j]' );
  endfor;

  in  above code when i   print  mysql_num_rows($result) inside for 
loop its output is  5.when i  print outside the for loop its o/p is 0.I 
searched weberdev.com website  and declared  $result as global.but same 
output 0.i want $result  variable to be  available outsibe the forloop 
and  all other  part of my code.i am looking forward suggestions from ur side.


   A.suresh




Did you read up on global vars and use of the global key word in functions?

Also check mysql_query() in the docs and what it returns. It's more of a 
handle than anything else.


Finally, given you example you will have to use $result inside your loop.

Regards - Miles Thompson  



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/253 - Release Date: 2/7/2006

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



Re: [PHP] Window close.

2006-02-07 Thread Miles Thompson

At 03:42 AM 2/7/2006, Labunski wrote:


It can'tbe done with PHP, cause it must be client side script, aka
Javascript:

javascript: window.close();

--


Actually, expand it a little bit, and you avoid the JS Alert.

function close_opener(){
parentwin = window.self;   // Make handle for current 
window named parentwin
parentwin.opener = window.self;// Tell current window that it 
opened itself
parentwin.close(); // Close window's parent (e.g. 
the current window)

}

Can't take credit for it, had a similar problem years ago when I had to pop 
a window up to establish a session and immediately destroy it. And that was 
because I could not set a session from within Flash, nor access a session 
from Flash.


Regards - Miles Thompson


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/252 - Release Date: 2/6/2006

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



Re: [PHP] Sound

2006-02-06 Thread Miles Thompson

At 12:17 PM 2/6/2006, Paul Novitski wrote:


At 07:15 AM 2/5/2006, tedd wrote:
Does anyone know a way to generate a sound (bell, click, tone, peep, 
buzz, word) from php?


Hi Tedd,

I was about to tell you that ringing a bell from PHP wasn't possible, 
since PHP is executed on the server, but I searched for 
http://php.net/bell and found this:

http://php.net/manual/en/function.newt-bell.php

Unless the Newt functions are an extension you're looking for, I suspect 
you're off-track.  A bell or other terminal sound is a time-specific 
event.  PHP generally executes in background, generating data to be 
downloaded to the client and rendered there in real time.  When exactly 
would you have a bell rung?  I believe you need to look to a client-side 
script for this type of functionality.  Unless you want a bell to ring on 
the server while it's executing a script for the client?


Making wings for angels.
M. 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.2/251 - Release Date: 2/4/2006

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



RE: [PHP] Unique Names for Variable in Loop

2006-02-02 Thread Miles Thompson


No need to subscript them, my_name_array[] will work just fine.

Miles

At 03:49 PM 2/2/2006, Programmer wrote:




$x = 0;
my_name_array = array();

While($row=mysql_fetch_array($result))
{
my_name_array[$x] = $row[last_name];
}

Jeremy Schreckhise

-Original Message-
From: Albert Padley [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 1:15 PM
To: php-general@lists.php.net
Subject: [PHP] Unique Names for Variable in Loop

I must be brain dead today since I can't get my syntax correct.

Simple MySQL query to return a list of last_name. No problem. Each
last name returned needs to be assigned to a unique variable like
name1, name2, name3, etc.

Somebody just kick me in the right direction.

Thanks.

Al Padley

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

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



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.0/248 - Release Date: 2/1/2006

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



Re: [PHP] Re: How to get a network drive name

2006-02-02 Thread Miles Thompson

At 09:30 AM 2/2/2006, Barry wrote:


Ibrahima TALL wrote:

Hi barry and thanks for your response !
Your solution seems to be restrictive for me and for my application 
clients because in such situation, they will be obligated to have a 
config file in which they must define all the network drive names and to 
update it whenever a new drive is mapped.
i prefer to wait to be sure that there is no php/javascript solution 
before considering another solution.


So to understand it correctly. You want to get the Network name from the 
User which is surfing the Site?


If you want the Network names in your local Network, i think over shell 
this is possible. But getting the Network name from the User browsing a 
webseite, i don't think something like that exists in PHP.


Barry



WHOA!!  Who's drive /network names are we getting?
Mine are mine are mine, and *NOT* the business of any Internet script. Period.

Having said that, remember, PHP is a server-side language, so trot off to a 
Java list and investigate the Windows API. Shudder!!!


Cheers - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.0/248 - Release Date: 2/1/2006

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



Re: [PHP] Performance question

2006-02-01 Thread Miles Thompson

At 12:02 PM 2/1/2006, Mathieu Dumoulin wrote:


This is more a How would you do it than a How can i do it question.

Didn't have time to try it, but i want to know how mysql_seek_row acts 
with large result sets.


For example im thinking of building a node tree application that can have 
dual direction links to nodes attached to different places.


I was wondering if i could actually have two result sets that query 
everything sorted by ID (Links and Nodes) then just seek the rows i need 
instead of dumping everything in php memory. When i mean large i mean 
really large, more than the standard possible 2 mbs of data allowed by 
most php servers.


That's where the how you'd do it comes into play. I think i'd just query 
my tables, loop them but keep only the line (to do a data_seek later on) 
and ID in some kind of an hash table or simply an array. This would make 
it relatively fast without taking too much memory.


This is my solution, how do you people see it without dumping everything 
to memory or by making recursive SQL calls (which will obviously slow 
everything down i'm pretty sure)


Mathieu Dumoulin
Programmer analyst in web solutions
[EMAIL PROTECTED]


I don't get it - what are you trying to do? Why? What is being visualized 
in the tree structure?


Building trees is expensive, you're essentially duplicating the index of 
the database, and if you fetch the data it's in memory regardless of how 
you present it.


The mysql_data_seek needs the row number - but by  then you're on the 
client side, if this is to respond to a link.


Maybe I just don't see it - or maybe you're confusing server side and 
client side.


Regards - Miles Thompson 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.25/247 - Release Date: 1/31/2006

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



Re: [PHP] SQL in XML [was PHP and DBase...]

2006-01-31 Thread Miles Thompson

At 03:08 PM 1/31/2006, David BERCOT wrote:


  Hi,
 
  I'd like to connect to DBase files (.dbf) in order to do SQL requests.
  Do you know if it is possible ?
  If yes, do you have an example ?
  I'm working on Debian with PHP5.
 
  Thank you very much.
 
  David.
 Blind?

 http://de.php.net/dbase

OK. I should have made such a search ;-)
So, it is possible... I'll try...

But, finally, I wonder if I shouldn't use XML files instead ?
Is it possible, directly, to make a SQL request on a XML file ?

In fact, I was looking for a file format which would be modifing on
Windows and on Linux. So, I thought about dbf. But now...

Thank you very much.

David.



David,

If I remember correctly, there are a lot of caveats surrounding .dbf files.
If it is data you have to manage, why not use MySQL / PostgresSQl / Firebird?

Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.25/246 - Release Date: 1/30/2006

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



Re: [PHP] Collecting info about columns in a table

2006-01-30 Thread Miles Thompson


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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

Re: [PHP] PHP hosting with multiple domains?

2006-01-30 Thread Miles Thompson


http://www.hub.org

All the flexibility you need, as well as being fast, courteous and responsive.

Miles

At 01:34 PM 1/30/2006, [EMAIL PROTECTED] wrote:

I know every month or so someone asks What's a good web hosting company 
to use for my PHP projects?.. I have most of the responses archived and 
have searched online a bit, but I have a specific wish and was hoping 
someone else had already found a good hosting company that'd let me do 
what I want.


I want PHP (either 4 or 5, I'm not too picky) and MySQL.

The thing I'm having trouble nailing down is one that might let me host 
multiple domains under a single hosting account and share bandwidth and HD 
space.   I have a couple of domains that aren't really doing anything 
right now (none of my domains really generate any traffic right now but 
could in the future).  But instead of paying to upgrade the storage of one 
domain then paying again to upgrade the storage of another one...  I'd 
like them to share harddrive space and bandwidth.


Failing that, Doster (the registrar I use) can let me point a domain to a 
subdirectory on another domain  (ie.  http://www.altdomain.com actually 
lives at http://www.maindomain.com/altdomain).



The hosting company I'm with right now is great for the fact that I locked 
my domains in at $20/year before they upped their prices (yeah... twenty 
per year) but they're kind of mom  pop and I'd like some place a little 
bigger and more professional even if it means paying more per month.


I'm more interested in storage space than bandwidth right now, but that 
may change later (as the stuff being stored is accessed of course).


I don't need many email addresses or databases.  Don't need a shell 
account.  Cron jobs/scheduled tasks (of PHP scripts) would be really nice.


hah.. I'll stop now.  Think you get the idea.  The convenient management 
of multiple domains with a hosting provider is my ultimate goal.


Thanks.

-TG

___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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



Re: [PHP] Embedding HTML in PHP

2006-01-30 Thread Miles Thompson


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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

[PHP] Test message - is there content?

2006-01-30 Thread Miles Thompson

I've noticed the past couple of posts to the list do not show any content.
So this is a test.

If you see content, please reply to me directly, not on the list.

Thanks and regards - Miles Thompson


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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



Re: [PHP] query regarding forms

2006-01-28 Thread Miles Thompson

At 11:20 AM 1/28/2006, suresh kumar wrote:


hi,
i am having 3 files  Login.php,home.php and
home1.php when i entered username and passwd in my
first login page i want want i entered as username and
passwd in my third page ie home1.php.

A.suresh


That's nice.

Now go check out the basic tutorials on the main PHP page. Click Getting 
help, then the links under the heading Sample Code. When the PHP Links 
page loads, scroll down to Tutorials.


http://ca3.php.net/links.php

Work through a couple, then check out how PHP does sessions so you do not 
have to pass stuff through the URL.


Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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



Re: [PHP] questions regarding PHP and Forms

2006-01-28 Thread Miles Thompson

At 05:39 PM 1/28/2006, Paul Goepfert wrote:


Thanks for the help everyone.  I have decided to use javascript to
deal with my second problem.  I understand that this is not a
JavaScript fourm but I am having some trouble getting my JS function
to work correctly.

Here is my JS code.

function getEquipment ()
{
var mylist = document.getElementById(equip);
if (mylist.options[mylist.selectedIndex].value==other)
{
document.writeln(tr);
document.writeln(  td align=leftOther/td);
document.writeln(  tdinput type=text 
name=other size=20/td);

document.writeln(/tr);
}
}

This is my code for where the function is called

select name=equipment size=1 id=equip onChange=getEquipment()
option value=treadmillTreadmil/option
option value=exercise bikeExercise 
Bike/option

option value=otherOther/option
option value=rowing machine
selectedRowing Machine/option
  /select

My problem is when the page loads in a web browser the Option Other
is selected every time. From what you can see from my code   Rowing
machine is the one that I want to be shown when the page loads.

Anyway can anyonne tell me why my code is not executing correctly.  I
am not too familiar with java script.  What I am trying to accomplish
is if Other is selected then add a new table row below the drop down
menu with the content that I have in the function.

If no one can help with this would someone please direct me to a Java
Script  Forum.

Thanks

Paul


[EMAIL PROTECTED]

Registration is required.

MT 



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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



Re: [PHP] PHP Job Opening in UAE

2006-01-27 Thread Miles Thompson


UAE = United Arab Emirates?

Do you want people on-site, or to work remotely?

Miles

At 02:05 PM 1/27/2006, M Saleh EG wrote:


Login Innovations, a new media  internet solutions studio in UAE is looking
for a resident-in-house PHP developer with at least 2 years experience.

Skills required:
OO knowledge and PHP5
PEAR aware
Framework and code libraries integration
CMS integration
SQL and PL-SQL (MySQL 4.x, MySQL 5)
XML and AJaX is plus

Send your resume to [EMAIL PROTECTED]



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.14.23/242 - Release Date: 1/26/2006

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



  1   2   3   4   5   >