Re: [PHP] Help with Class

2005-09-07 Thread Jason Davidson
I would have guessed unset($sqk); to work, but also try $sdk = null;

Jason

On 9/7/05, Ian Barnes [EMAIL PROTECTED] wrote:
 
 Hi,
 
 
 
 I am writing a site where I need to access multiple classes of the same 
 name
 located under certain directories. The reason for each directory is 
 because
 the class under that directory talks only to the files in that directory 
 and
 cant do multiple (its not my software)
 
 
 
 I have it so that I choose which ones I want to post to via checkboxes. 
 I
 then do a foreach loop and here it is:
 
 
 
 foreach ( $forums as $num=$val )
 
 {
 
 $db = new db ( 'localhost' , 'user' ,
 'pass' , 'db' );
 
 $sql = 'SELECT * FROM table WHERE id =
 '.$val.'';
 
 $result = $db-get($sql);
 
 $fetchd = mysql_fetch_array ( $result );
 
 $forumid = $fetchd['forumid'];
 
 $posterid = $fetchd['posterid'];
 
 $title = $_POST['title'];
 
 $desc = $_POST['desc'];
 
 $post = $_POST['post'];
 
 require_once (
 $fetchd['path'].'sdk/ipbsdk_class.inc.php' );
 
 $SDK = new ipbsdk;
 
 $info = $SDK - get_info ( $posterid );
 
 $postername = $info['name'];
 
 echo Forum ID:.$forumid;
 
 echo BRTitle:.$title;
 
 echo BRDesc:.$desc;
 
 echo BRPost:.$post;
 
 echo BRPosterID:.$posterid;
 
 echo BRPosterName:.$postername;
 
 echo BR;
 
 }
 
 
 
 See at the end of that foreach loop I need to unset the class $SDK so I 
 can
 re-init it from another dir. How can I do this? I have tried some of the
 following:
 
 Unset ( $SDK);
 
 Unset ($GLOBALS['SDK'] );
 
 
 
 
 
 Can anyone shed any light on my predicament ?
 
 
 
 Thanks in advance
 
 Cheers
 
 Ian
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] Assign values in foreach-loop

2005-09-07 Thread Jason Davidson
In case it hasnt been said already, as long as your array has numeric and 
consecutive keys, you could use 'for' instead of 'foreach'. 

Jason

On 9/7/05, Gustav Wiberg [EMAIL PROTECTED] wrote:
 
 
 - Original Message -
 From: Sabine [EMAIL PROTECTED]
 To: PHP general php-general@lists.php.net
 Sent: Wednesday, September 07, 2005 7:14 PM
 Subject: [PHP] Assign values in foreach-loop
 
 
  Hello to all,
 
  is it possible to assign values to the array for which I do the
  foreach-loop?
 
  foreach ($_SESSION['arr1'] as $arr1) {
  foreach ($_SESSION['arr2'] as $arr2) {
  if ($arr1['id'] == $arr2['id']) {
  $arr1['selected'] = true;
  }
  } }
 
  I think $arr1 is only a temp-var, so the assignment won't reflect on
  $_SESSION['arr1'] . Is that right?
  Surely I can do it with a for-loop, but those arrays are a bit complex 
 and
  a foreach would be much easier to read.
 
  Thanks in advance for your answers
  Sabine
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  No virus found in this incoming message.
  Checked by AVG Anti-Virus.
  Version: 7.0.344 / Virus Database: 267.10.18/91 - Release Date: 
 2005-09-06
 
 
 Hi there!
 
 Why not set $_SESSION['arr1'] = true ?
 
  foreach ($_SESSION['arr1'] as $arr1) {
  foreach ($_SESSION['arr2'] as $arr2) {
  if ($arr1['id'] == $arr2['id']) {
  $_SESSION['arr1'] = true;
  }
  } }
 
  I think $arr1 is only a temp-var, so the assignment won't reflect on
  $_SESSION['arr1'] . Is that right?
 
 I might add that is not always a good thing to use true or false with
 sessions. Use 1 and 0 instead. (or two diffrent numbers or anything else 
 but
 true or false)
 
 /G
 http://www.varupiraten.se/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] Object Scope

2005-09-06 Thread Jason Davidson
I prefer to make the object on each page load, passing only the member id 
thru the session. 

Jason

On 9/6/05, Chuck Brockman [EMAIL PROTECTED] wrote:
 
 What is the best practice for calling objects that are to be used
 throughout a users site visit. For example, I have a members class
 with two classes that extend this class. Is it best to instantiate
 the object in the $_Session scope or make individual calls to the
 class/object.
 
 For example:
 
 class members {
 var $iMemberID;
 var $iProfileID;
 var $dbServer;
 var $dbUser;
 var $dbPassword;
 var $dbDSN;
 var $_dbServer;
 var $_dbUser;
 var $_dbPassword;
 var $_dbDSN;
 
 function members($dbServer, $dbUser, $dbPassword, $dbDSN){
 $this-_dbServer = $dbServer;
 $this-_dbUser = $dbUser;
 $this-_dbPassword = $dbPassword;
 $this-_dbDSN = $dbDSN;
 }
 }
 
 I have created a _global.php file that instantiates the object such as:
 
 if(!isset($_SESSION[objMember])){
 $_SESSION[objMember] = new members($aSiteSettings[sDBServer],
 $aSiteSettings[sDBLogin], $aSiteSettings[sDBPassword],
 $aSiteSettings[sDSN]);
 }
 
 Or am I way off base altogether (wouldn't be too suprises)?
 
 Thanks!
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] Apache Linux question

2005-09-06 Thread Jason Davidson
If you compiled it, you can goto the src directory, and log under config.log
Jason

On 9/6/05, Georgi Ivanov [EMAIL PROTECTED] wrote:
 
 It is no clear which option you are looking for.
 If it's PHP compile options use :
 ?php
 echo phpinfo();
 ?
 This will give you information you need.
 
 On Tuesday 06 September 2005 16:39, Feris Thia C. wrote:
  Hi All,
 
  If I already install my Apache on linux system, then is it possible to
  check what configuration settings I provided when compiling the source 
 ??
 
  Regards,
 
  Feris
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] CookieMonster

2005-09-01 Thread Jason Davidson
You can.. Dont include the expire argument.. or set it to 0.

Jason

On 9/1/05, Philip Hallstrom [EMAIL PROTECTED] wrote:
 
  Simple question I guess..
 
  How do I set a cookie so it will never expire? (I don't want it to 
 expire)
 
 You can't really... I could delete it and that would be the same as
 expiring it...
 
 Best you can do is set it to expire 100 years in the future or some
 such... see the manual for SetCookie() for more info...
 
 -philip
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] CookieMonster

2005-09-01 Thread Jason Davidson
You are right, ignore my post. 

Jason

On 9/1/05, John Nichel [EMAIL PROTECTED] wrote:
 
 Jason Davidson wrote:
  You can.. Dont include the expire argument.. or set it to 0.
 
 No. Do this, and the cookie will expire when you close the browser window.
 
 --
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] Re: Saturdays and Sundays

2005-09-01 Thread Jason Davidson
Here is an another approach.. if you glance at a calendar, youll notice that 
the only times there are 5 sats in a month, is when the 1st of 30 day month 
falls on a fri or sat.. or in a 31 day month, a thur, fri, or say.. 

So, you could simply test the weekday the first of the month has, and the 
number of days in the month.. and the num of sats in the month is either 4.. 
or 5. :)

Jason

On 9/1/05, Brian P. O'Donnell [EMAIL PROTECTED] wrote:
 
 Sorry, I made a mistake. See below:
 Brian P. O'Donnell [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  Shaun [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Hi,
  
   Is it possible to get the number of saturdays and sundays for a given
  month
   / year?
  
   Thanks for your help.
 
  Here's another way to do it. Each function will return either 4 or 5. If
 you
  need both Saturdays and Sundays, just call both functions:
 
  ?
 
  function get_saturdays($month, $year) {
 
  $sat = 4;
 
  // time stamp of noon on the first day of the month
  $first_day = mktime(12, 0, 0, $month, 1, $year);
 
  switch ($month) {
  case 1:
  case 3:
  case 5:
  case 7:
  case 8:
  case 10:
  case 12:
  if (date(w, $first_day)  3) {
  $sat++;
  }
  break;
  case 2:
  if ((date(L, $first_day) == 1)  (date(w, $first_day)  5)) {
  $sat++;
  }
  break;
  case 4:
  case 6:
  case 9:
  case 11:
  if (date(w, $first_day)  4) {
  $sat++;
  }
  break;
  }
 
  return($sat);
 
  }
 
  function get_sundays($month, $year) {
 
  $sun = 4;
 
  // time stamp of noon on the last day of the month
 
 The following line referenced a variable in the other function. DUH!
 It should be:
 $last_day = mktime(12, 0, 0, $month, date(t, mktime(12, 0, 0, $month,
 1, $year)), $year);
 
 
  switch ($month) {
  case 1:
  case 3:
  case 5:
  case 7:
  case 8:
  case 10:
  case 12:
  if (date(w, $last_day)  3) {
  $sat++;
  }
  break;
  case 2:
  if ((date(L, $last_day) == 1)  (date(w, $last_day)  1)) {
  $sat++;
  }
  break;
  case 4:
  case 6:
  case 9:
  case 11:
  if (date(w, $last_day)  2) {
  $sat++;
  }
  break;
  }
 
  return($sun);
 
  }
 
  ?
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] ID based on position?

2005-08-31 Thread Jason Davidson
You could LIMIT your query to the record number you are looking for, and 
grab the last element in the array from your result set. But this is a 
serious hack, and I am really wondering why you need to do what your asking, 
it seems (without knowing more) that you are tackling the problem in the 
wrong direction,

Jason

On 8/31/05, Gustav Wiberg [EMAIL PROTECTED] wrote:
 
 Hi there!
 
 Is there any function in PHP that gives an ID from a MySQL-db based on 
 which
 position the record has in the table?
 
 
 Let's say, there's a table like this:
 
 1. Record1 ID 33
 2. Record2 ID 76
 3. Record3 ID 100
 
 
 If I know position 2, I want to get ID 76. Is the only way to loop through
 the recordset?
 
 /G
 @varupiraten.se http://varupiraten.se
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 



Re: [PHP] Query Returning Error

2004-10-13 Thread Jason Davidson
should Query01 have a $ in front of it, i assume its a var

Jason

Harlequin [EMAIL PROTECTED] wrote: 
 
 Morning all.
 
 this is such a basic question I'm embarrassed to ask but the query worked 
 fine a few minutes ago and now returns an error:
 
 I get an error:
 
 Parse error: parse error, unexpected '=' in sample.php on line 2
 
 [CODE]
 // Authenticate User:
Query01 = SELECT * FROM Users
WHERE UserID='$_POST[TXT_UserID]'
AND UserPassword='$_POST[TXT_UserPassword]';
$Result01 = mysql_query($Query01) or die(Error 01:  . mysql_error());
 [/CODE]
 
 WTF...?
 
 -- 
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 - 
 
 -- 
 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] php err msg/issue...

2004-10-13 Thread Jason Davidson
I gather $rec is empty.. :)  make sure there is something in it before
you assign it to that object member.

Jason
[EMAIL PROTECTED] wrote: 
 
 hi...
 
 i'm dealing with an app that's throwing an err/warning msg.. i'm using php5,
 on a linux rh8.0 system.
 
 i believe the code was written for php4.
 
 the code is:
 
 if($rec)
  {
 $rs-append($setDefaults);
 $rs-rows[$rs-pos]-fields=$rec;  generates err msg...
 $rs-rows[$rs-pos]-id=-1;
 }
 
 $rec = Array ( [0] = 0 [1] = admin [2] = 21232f297a57a5a743894a0e4a801fc3
 [3] = [4] = TRUE )
 
 
 the err msg being generated is:
 Php-Txt-Db-Access Error:
 PHP Error: [2048] Creating default object from empty value [Line: 1537]
 [File: /var/www/html/blast/txtdbapi/resultset.php]
 
 
 i'm not sure why this is generated, or what's going on, or even how/why to
 correct it!! apparently this doesn't happen with php4, but i'm not certain.
 
 any thoughts/opinions/comments would be helpful...
 
 thanks
 
 -bruce
 
 -- 
 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] Need help with a string

2004-10-08 Thread Jason Davidson
prolly already mentioned, but what about explode using the commas

$strings = explode(',', $textString);

Greg Donald [EMAIL PROTECTED] wrote: 
 
 On Fri, 8 Oct 2004 11:38:23 -0500, Brent Clements
 [EMAIL PROTECTED] wrote:
  Given the following string:
  
  $textString = Share A Dream Come True Parade 3:00 SpectroMagic Parade 9:00,
 11:00 Wishes? nighttime spectacular 10:00
  
  I need to break the string up into pieces where as
  
  $string[1] = Share A Dream Come True Parade 3:00
  $string[2] = SpectroMagic Parade 9:00, 11:00
  $string[3] = Wishes? nighttime spectacular 10:00
  
  Granted this is pretty easy because I could just search for this stuff and
 break it up, but the string above can actually be different each time, for
 instance, next time it could be:
  
  $textString = Share A Dream Come True Parade 3:00, 5:00 SpectroMagic Parade
 9:00, 11:00 Wishes? nighttime spectacular 10:00
  
  I think my main issue is that I don't know how to keep the , XX:XX part
 combined with the previous part of the string.
 
 preg_match_all() is what you want to use.  You can easily match
 everything up to the time since it's formed with a :00 at the end
 each time.
 
 
 -- 
 Greg Donald
 Zend Certified Engineer
 http://gdconsultants.com/
 http://destiney.com/
 
 -- 
 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] Best and easy html text area replacement tool?

2004-10-05 Thread Jason Davidson
Whats this to do with PHP.. this should be in the javascript list.

Jason

Scott Chapman [EMAIL PROTECTED] wrote: 
 
 On Monday 04 October 2004 01:50 pm, Bosky, Dave wrote:
  I'm looking for an easy to use html textarea replacement script and figured
  this was the place to locate the most popular.
 Dave,
 I've done some research on this issue.  There are a few out there to look at:
 
 HTMLArea (http://www.interactivetools.com/products/htmlarea/)
 
 TinyMCE (http://tinymce.moxiecode.com/)
 
 WYSIWYGPro (http://www.wysiwygpro.com/)
 
 The big issue for me in my research is the ability to edit HTML on IE and also
 on Mozilla based browsers with no problems.  You will find that HTMLArea has
 problems in these areas.
 For instance, when you boldface something in a wysiwyg editor using IE, it will
 in-line CSS code around the text you are making bold.
 Mozilla browsers will put strong/strong around them.  They don't work across
 platforms.
 
 TinyMCE is free and deals with these issues fairly well, but it doesn't have a
 cross-platform spell checker.
 
 WYSIWYGPro costs money but it does it all and is made explicitly for use with
 PHP.
 
 If you don't care about cross-platform usability then HTMLArea would be a good
 choice. TinyMCE is rather new but actively developed.
 
 Good hunting!
 
 Scott
 
 -- 
 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] I'm looking to have a simple webpage send an email . ..

2004-10-04 Thread Jason Davidson
news.php.net [EMAIL PROTECTED] wrote: 
 
 Can anyone help me out?  I just need a simple single webpage to send an
 email from the server.
 

http://ca.php.net/manual/en/ref.mail.php

 -- 
 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] How to load another php page?

2004-10-02 Thread Jason Davidson
Arnold [EMAIL PROTECTED] wrote: 
 
 Hi,
 
 How can i load another php file (another.php) directly without an action
 (example: clicking on a button)?
 I'd like to do in my php script:
 
 if(isset($var1)) {  // load another.php }
 
 It is possible to include the file, but i just want to load the whole
 another.php file.
 I guess that there should be a php command like load, but i didnt found it
 yet.
 

What is wrong with include or include_once?



 Who can help me?
 
 Regards, Arnold
 
 -- 
 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



[PHP] PHP sandbox discussion

2004-10-01 Thread Jason Davidson
Hey fella's, i thought i would start a thread for once :)

Ive got a 'php sandbox', that im encorparating into a simple php
tutorial.  THe tutorial is much like any php tutoiral, and really, is
just for me to get more comfortable using and parsing xml with the dom
functions.  What i would like to discuss is, the kind of security to
apply on the sandbox.  

The sanbox is simply and iframe, with designmode turned on, that allows
a user to write some code, submit, and that code gets written to a
file, and then included again to show the output.  I like this method
over eval(), for a couple reasons, we can discuss that as well later if
you want.  One of the nice things about using designmode on an iframe,
is that you can use tabs and such for formating your code.  You can
also easily set the src of the frame to a .phps file, that will display
in classic highlighted format the sourcecode.  

Anywys.. heres the question.. what do you think is the most viable
solution for security. 
1.  run apache in chroot envirnment.
2.  run php in safe_mode
3.  simply str_replace all filesystem functions with nothing.
4.  use the disable_function settings to disable filesystem functions...

5. .all of these
6. none of these
7 . other.


THanks
Jason

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



Re: [PHP] Image Manipulation

2004-10-01 Thread Jason Davidson
Yes there is way, search for GD in the php manual, it will explain a
solution better than i will.

Jason

GH [EMAIL PROTECTED] wrote: 
 
 I would like to know if there is a way to have PHP determine the
 dimensions of an image (i.e. JPG or PNG) and if it more than Xpx wide
 or height have it scale it down proportionally to that width or
 height?
 
 -- 
 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] Naming conventions

2004-10-01 Thread Jason Davidson
Oh please dont start a thread on which is better .. 
but i beleive it was decided that camel case is the standard now.
Jason

Jensen, Kimberlee [EMAIL PROTECTED] wrote: 
 
 What do you use for your naming conventions for
 variables
 functions
 classes
 
 I'm trying to tell my students what the standard is currently. Are people using
 camel case or underscores or both?
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: Fri 10/1/2004 11:16 AM
 To:   [EMAIL PROTECTED]
 Cc:   
 Subject:  [BULK] - php-general Digest 1 Oct 2004 18:16:29 - Issue 3028
 
 php-general Digest 1 Oct 2004 18:16:29 - Issue 3028
 
 Topics (messages 198379 through 198445):
 
 php script run by cron job
   198379 by: Merlin
   198388 by: Nick Wilson
 
 Re: Zend PHP Certification test
   198380 by: Curt Zirzow
   198391 by: Greg Donald
   198436 by: Jay Blanchard
 
 How do I produce a random database query for each day or week?
   198381 by: I.A. Gray
   198383 by: Merlin
   198386 by: Graham Cossey
   198413 by: -{ Rene Brehmer }-
 
 Zend Optimizer not installed
   198382 by: Ox
   198384 by: Graham Cossey
   198387 by: Wee Keat
   198404 by: Dan Joseph
   198432 by: Ox
 
 Re: list of Months
   198385 by: Marek Kilimajer
   198408 by: afan.afan.net
   198439 by: Paul Bissex
 
 Re: mail() and Verizon
   198389 by: Sam Smith
   198443 by: Sam Smith
 
 How I can get x509 certificate distinguished name?
   198390 by: Diavolo
 
 PHP (anti) crash policy?
   198392 by: Olaf van der Spek
   198393 by: Marek Kilimajer
   198394 by: Manuel Lemos
   198395 by: Olaf van der Spek
   198396 by: Christophe Chisogne
   198397 by: Manuel Lemos
   198398 by: Marek Kilimajer
   198399 by: Olaf van der Spek
   198401 by: Christophe Chisogne
   198403 by: Manuel Lemos
   198405 by: Olaf van der Spek
   198409 by: Manuel Lemos
   198410 by: Olaf van der Spek
   198412 by: Olaf van der Spek
   198417 by: Manuel Lemos
   198418 by: Manuel Lemos
   198420 by: Olaf van der Spek
   198421 by: Olaf van der Spek
   198423 by: Olaf van der Spek
   198424 by: Manuel Lemos
   198425 by: Manuel Lemos
   198426 by: Olaf van der Spek
   198427 by: Manuel Lemos
   198429 by: Manuel Lemos
   198430 by: Olaf van der Spek
   198431 by: Olaf van der Spek
   198433 by: Olaf van der Spek
   198434 by: Manuel Lemos
   198435 by: Manuel Lemos
   198438 by: Marek Kilimajer
 
 Re: Suggestion for IN()
   198400 by: Daniel Schierbeck
   198402 by: Christophe Chisogne
   198406 by: Daniel Schierbeck
   198415 by: Ford, Mike
 
 successive imap_open calls result in failure
   198407 by: felix.compsoc.nuigalway.ie
   198411 by: raditha dissanayake
   198419 by: felix.compsoc.nuigalway.ie
   198422 by: Michael Sims
 
 Re: World time convertor
   198414 by: -{ Rene Brehmer }-
 
 Re: UNSUBSCRIBE
   198416 by: -{ Rene Brehmer }-
 
 Question about error_reporting()
   198428 by: Al
   198437 by: Greg Donald
   198440 by: Al
   198442 by: Greg Donald
 
 PHP Host with PayFlow Pro
   198441 by: Neal Carmine
 
 Image Manipulation
   198444 by: GH
 
 PHP sandbox discussion
   198445 by: Jason Davidson
 
 Administrivia:
 
 To subscribe to the digest, e-mail:
   [EMAIL PROTECTED]
 
 To unsubscribe from the digest, e-mail:
   [EMAIL PROTECTED]
 
 To post to the list, e-mail:
   [EMAIL PROTECTED]
 
 
 --
 
 
 
 

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



Re: [PHP] PHP sandbox discussion

2004-10-01 Thread Jason Davidson
Hey, yup it is kind of dangerous, there is no argument there.  
Currenly i have php running safemode, and apache is running with user
nobody.  This combination makes it imposible for any filesystem
commands to work on anything that isnt owned by nobody.. its an
interesting situatoin i beleive... ive enjoyed reading documentaiton on
these things.

Jason

[EMAIL PROTECTED] wrote: 
 
 
 Jason Davidson wrote:
 
 Anywys.. heres the question.. what do you think is the most viable
 solution for security. 
 1.  run apache in chroot envirnment.
 2.  run php in safe_mode
 3.  simply str_replace all filesystem functions with nothing.
 4.  use the disable_function settings to disable filesystem functions...
 
 5. .all of these
 6. none of these
 7 . other.
 
 
   
 
 All of those and a many more things besides!
 for example the mail() function can send mail through the localy 
 installed smtp server without a username and password so you need to 
 watch for the mail function or perhaps even attempts to open a socket on 
 localhost host. You will then need to watch out for include or fopen 
 urls that will eat up bandwidth or worse.
 all in all i think this is pretty dangerous.
 
 THanks
 Jason
 
   
 
 
 
 -- 
 Raditha Dissanayake.
 
 http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
 Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
 Graphical User Inteface. Just 128 KB | with progress bar.
 
 -- 
 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] Test - Is the list working?

2004-09-30 Thread Jason Davidson
sheesh.. ok, who is going to sign that denise character back up to the
list :P

Jason
Marek Kilimajer [EMAIL PROTECTED] wrote: 
 
 Jay Blanchard wrote:
  Odd stuff this morning.
  
 
 I think it's overloaded with unsubscribe requests.
 
 -- 
 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] Stored procedures in Mysql

2004-09-30 Thread Jason Davidson
I suppose if you are thinking that mysql and zend may have collaborated
to make stored procedures available in veriosn 5, then i suppose this
is on topic.. otherwise, check the mysql list.

Jason
Sagar C Nannapaneni [EMAIL PROTECTED] wrote: 
 
 Hi folks,
 
 I wonder whether Mysql supports procedures and triggers
 
 :?
 
 /sagar
 

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



Re: [PHP] simple date/now() question

2004-09-28 Thread Jason Davidson
Just select out records that are NOW() - (24 * 60 * 60)or if you use
datetime field instead of timestamp, which is prolly better off ofr many
reasons, use DATE_SUB(NOW(), INTERVAL 1 DAY) or something similar.  you
can get timestamps from datetime fields, if that is an issue for you...

Jason

Mag [EMAIL PROTECTED] wrote: 
 
 Hi,
 I have a field in the db called 
 
 join_date_time(timestamp 14) 
 
 which has data like:
 
 20040928170708
 20040916163619
 etc
 
 This keeps track of the customer join date, I need to
 know if the client has joined in the last 24hrs or
 more than 24hrs back...
 
 Anybody have a function for this? or can help? am a
 bit confused because reading on google I see that
 there are 2 possible problems as MySql has its own
 time and PHP its own time (most of the time!)
 
 Thanks,
 Mag
 
 =
 --
 - The faulty interface lies between the chair and the keyboard.
 - Creativity is great, but plagiarism is faster!
 - Smile, everyone loves a moron. :-)
 
 
   
 ___
 Do you Yahoo!?
 Declare Yourself - Register online to vote today!
 http://vote.yahoo.com
 
 -- 
 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] Loop within Loop help please

2004-09-28 Thread Jason Davidson
I see lots of references to modulus, which works fantastic.. but how
abut just testing if its equal to 20, then there isnt that extra
arthmitc call.. this is just another way to do the same thing.. take
your pick.. unless someone can see a bad reason for this method. 

$count = 0;
foreach . {
   if($count == 20) {
.
$count = 0;
} else {
$count++;
}
}


Nick Wilson [EMAIL PROTECTED] wrote: 
 
 hi everyone, 
 
 I have a simplified bit of code below:
 ?php
   foreach($someArray as $someVal) {
 //do some stuff
   }
 ?
 
 What i'd like to do is have a count inside that loop that will trigger
 some action every 20 iterations of the foreach. Like this:
 ?php
   $count=0;
   foreach($someArray as $someVal) {
 if($count is divisible by 20 exactly) {
   // do some stuff
 }
 //do some stuff
   }
 ?
 
 How might i do that?
 
 Much thanks...
 -- 
 Nick W
 
 -- 
 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] Loop within Loop help please

2004-09-28 Thread Jason Davidson
well, actually, the code resets the count var, so it makes absolutely no
difference how many iterations the loop makes, it could iterated
indefinately and still function identically. 

Jason

Andrew Kreps [EMAIL PROTECTED] wrote:
 
 On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson [EMAIL PROTECTED] wrote:
  I see lots of references to modulus, which works fantastic.. but how
  abut just testing if its equal to 20, then there isnt that extra
  arthmitc call.. this is just another way to do the same thing.. take
  your pick.. unless someone can see a bad reason for this method.
  
  $count = 0;
  foreach . {
 if($count == 20) {
  .
 
 The only thing wrong with this method is that it doesn't fit the
 problem's specifications.The original poster wanted a way to
 trigger the code every 20 iterations of an unknown sized loop
 (implying that the loop would have 40 or more items), whereas the
 solution above only triggers it on iteration 20.  Other than that,
 it's a perfectly wonderful piece of code.
 
 -- 
 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] Loop within Loop help please

2004-09-28 Thread Jason Davidson
Hey, im sorry, i didnt read the other responses to your post, ive posted
the same thing... 

Jason

Jason Davidson [EMAIL PROTECTED] wrote: 
 
 well, actually, the code resets the count var, so it makes absolutely no
 difference how many iterations the loop makes, it could iterated
 indefinately and still function identically. 
 
 Jason
 
 Andrew Kreps [EMAIL PROTECTED] wrote:
  
  On Tue, 28 Sep 2004 10:45:19 -0700, Jason Davidson [EMAIL PROTECTED]
 wrote:
   I see lots of references to modulus, which works fantastic.. but how
   abut just testing if its equal to 20, then there isnt that extra
   arthmitc call.. this is just another way to do the same thing.. take
   your pick.. unless someone can see a bad reason for this method.
   
   $count = 0;
   foreach . {
  if($count == 20) {
   .
  
  The only thing wrong with this method is that it doesn't fit the
  problem's specifications.The original poster wanted a way to
  trigger the code every 20 iterations of an unknown sized loop
  (implying that the loop would have 40 or more items), whereas the
  solution above only triggers it on iteration 20.  Other than that,
  it's a perfectly wonderful piece of code.
  
  -- 
  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
 
 

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



RE: [PHP] Loop within Loop help please

2004-09-28 Thread Jason Davidson
Well, elegance, is in the eye of the beholder !!.. but ya, i certainly
wasnt contesting the modulas solutiion, ive used mod in similar cases
myself, i was just adding some variety.

Jason

Jay Blanchard [EMAIL PROTECTED] wrote: 
 
 [snip]
 well, actually, the code resets the count var, so it makes absolutely no
 difference how many iterations the loop makes, it could iterated
 indefinately and still function identically. 
 [/snip]
 
 That is quite true, but which is more elegant?
 
 --
 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] Multiple pages of data.

2004-09-28 Thread Jason Davidson
Your not totally lost on it, your very cloes to your solution.  Keep
track of the LIMITs with php, and not mysql.  Pass the LIMIT
information to the next page, and use some aritihitc to determine the
next  and prvious limits for the link...
so you would have a var called $limit possibly, and your next and
previous links will pass this var + or - the number of posts per page,
so next would be $limit + 15..

Jason

Nick Patsaros [EMAIL PROTECTED] wrote: 
 
 I'm trying to build a bulletin style system right now.  I have topics
 and replies to each topic.  If a topic gets more than 15 replies I
 want them to start carrying over onto page 2 and then 3 and so on with
 15 replies per page.
 
 The key that I'm missing I guess is, how do I keep track of the last
 accessed row in the database?  So if I run a LIMIT 15 I can go back
 and pick up where I left on previously?  Using the primary key isn't
 going to help because if posts get deleted I would have less than 15
 per page.
 
 Maybe I'm totally lost on this though, if someone could give me a bit
 of help on the most efficient way to accomplish this.
 
 --Nick
 
 -- 
 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] Error with php

2004-09-28 Thread Jason Davidson
Can you show me an example.. 
wild guess without knowing what your doing, but, ? is the escape code
to exit php.. so its possible thats what is happening.. but please post
some code that cuases this problem.

Jason

Timothy Johnson [EMAIL PROTECTED] wrote: 
 
 This is my first time using php on a gentoo system. I seem to be having
 a problem everytime I use a  it exits out of the code and prints
 everything after that like as if it was pure text. So I am assuming the
 php engine doesnt even seen anything after that. Maybe I have something
 configured wrong also.
 
 -- 
 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] redirecting to another page

2004-09-25 Thread Jason Davidson
eh hem,,, that is a great question to consult the manual... but as for a
hint, search for header()

Jason

AMC [EMAIL PROTECTED] wrote: 
 
 Hi,
 
 What code do I use to redirect a user to a different page in php?
 
 Thanks
 
 -- 
 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] mailing to hotmail

2004-09-24 Thread Jason Davidson
Do you have reverse dns set up on your machine?

Jason

Diana Castillo [EMAIL PROTECTED] wrote: 
 
 for some reasons my mails I send to hotmail are never arriving,  (using 
 mail($email,$subject_line,$msg,$headers);)
 anyone ever heard of this?
 
 
 -- 
 Diana Castillo
 Global Reservas, S.L.
 C/Granvia 22 dcdo 4-dcha
 28013 Madrid-Spain
 Tel : 00-34-913604039 Ext 216
 Fax : 00-34-915228673
 email: [EMAIL PROTECTED]
 Web : http://www.hotelkey.com
   http://www.destinia.com
 
 -- 
 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] Virtual Host problem

2004-09-23 Thread Jason Davidson
your problem, as correctly outputted, is permission based, and as far as
i can tell, has nothing to do with PHP..


Jason

a.k.a kioto [EMAIL PROTECTED] wrote: 
 
 Hi all i've try to configure Apache with Virtual Host in the main
 configuration file of Apache i have modify like this:
 
 #NameVirtualHost *:80
  NameVirtualHost *
 #
 # VirtualHost example:
 # Almost any Apache directive may go into a VirtualHost container.
 # The first VirtualHost section is used for requests without a known
 # server name.
 #
 VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /usr/local/apache/users/default
 ServerName mordoch
 /VirtualHost
 
 VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /usr/local/apache/users/mysite
 ServerName mysite
 /VirtualHost
 
 VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /usr/local/apache/users/brothersite
 ServerName brother
 /VirtualHost
 
 I have insert a file index.php in all main folder of virtaul host:
 /usr/local/apache/users/default/index.php 
 /usr/local/apache/users/mysite/index.php
 /usr/local/apache/users/brothersite/index.php
 I have modified the file hosts in etc/hosts.
 
 39.244.88.126 mordoch
 127.0.0.1 mordoch
 127.0.0.1 localhost
 127.0.0.1 mysite
 127.0.0.1 brother
 
 When i try to view with my browser i type on my addressbar
 http://localhost i receive a message error like this:
 
 Warning: Unknown(/usr/local/apache_1.3.31/users/default/index.php):
 failed to open stream: Permission denied in Unknown on line 0
 
 Warning: (null)(): Failed opening
 '/usr/local/apache_1.3.31/users/default/index.php' for inclusion
 (include_path='.:/usr/local/php/lib/php') in Unknown on line 0
 
 I receive this error for all virtual host that i have create.
 The chmod of all folder is set to 777.
 What are the reason ?
 
 -- 
 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] Question on using png file in ezPdf class

2004-09-21 Thread Jason Davidson
Possibly you need to compile php with-png ??  im not sure of this, im
just taking a stab in the dark..
Jason

Chris Bruce [EMAIL PROTECTED] wrote: 
 
 Hello,
 
 I am using the PDF creation classes from http://www.ros.co.nz/pdf
 
 Everything is working great with the exception of not being able to use 
 a PNG image with the ezImage extension. JPG works but is not as crisp 
 as the image that I want to place is a logo. All file paths and 
 spellings are correct, the resulting PDF just has a whitespace where 
 the logo should be when I try to use a PNG.
 
 Has anyone who has used this class encountered a similar problem?
 
 Thanks.
 
 --
 
 Chris Bruce
 [EMAIL PROTECTED]
 
 Idextrus E-Business Architects
 http://www.idextrus.com
 3282 Wilmar Cres.
 Mississauga, ON
 L5L4B2
 CA
 905.828.9189 South Office
 705.361.0331 North Office
 
 
 This e-mail and its contents are privileged, confidential and
 subject to copyright.  If you are not the intended recipient,
 please delete this e-mail immediately.  Any unauthorized use
 or disclosure of the information herein is prohibited.
 

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



Re: [PHP] Configuring php.ini path

2004-09-21 Thread Jason Davidson
You can set it during compile time i think... if thast of any help

Jason

Jamie [EMAIL PROTECTED] wrote: 
 
 Im using php version 4.3.8 and im trying to setup a small webserver on my 
 usb memory stick so i can work on my php projects when im at college without 
 having to work ways arround the college firewalls and blocks on ftp.
 The only problem i have is that i cannot load the php.ini file from its 
 location at e:\php. i have tried setting the path to the php.ini file using 
 the PHPRC enviroment variable. I have tried it within the apache httpd.conf 
 file. With no change and i have tried it on the command line. It works by 
 using set at the command line. But at college i do not have access to the 
 command line. And when i add a variable using set PHPRC=e:/php. it does not 
 seem to work.
 
 Any help or idea's would be helpfull.
 
 Thanks
 Jamie 
 
 -- 
 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] List Etiquette

2004-09-20 Thread Jason Davidson
are we still on top posting.. shessh. i only top post cuase im lazy...

J

Octavian Rasnita [EMAIL PROTECTED] wrote: 
 
 
 - Original Message - 
 From: John Nichel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 20, 2004 7:06 AM
 Subject: Re: [PHP] List Etiquette
 
 
  Octavian Rasnita wrote:
  snip
   In other words it's easier for you to reach your Delete key when you top
   post than when you bottom post ???
   --
  
   Ok, I have bottom posted, and have trimmed the end of the message. But
 this
   was a little text only, while the header of this message is still there,
 and
   it is bigger.
   Well, I said that is harder to delete the head of the message and then
 go to
   the end and delete the tail also.
   That's why is easier to trim the message when top posting.
  
   It would be easier for everyone if everyone would use Outlook Express
 and
   not many other email clients that use a different style of headers they
 put
   in the message, or that put the cursor in other positions by default.
  
   But most users use Outlook Express as the email client, and not other
   programs...
   And this not only because it is included by default in Windows, but
 because
   for some features it is the best program, like the accessibilitty for
 the
   blind for example.
 
  Most use Outlook or Outlook Express?  I think you'd be hard pressed to
  find _most_ users of a mailing list which deals with something in the
  Open Source Community (like php) using a Microsoft mailer.  Most of the
  newbies, probably; but the people who are on this list, day in and day
  out, are more than likely not...even if they are using a Microsoft OS.
  However, the, my mail client puts the cursor at the top is still a
  pretty weak reason to top post.
 
 
 
 Why is it a pretty weak reason? I found it a very big one.
 You don't know how easy is to use an email client when you can't read but
 just listen to a robotic voice made by the computer. ...or you probably
 don't care. Well, in that case, why should I care that you don't like top
 posting?
 
 See, I have bottom posted this time. So? The trimmed part at the end of the
 message is much smaller than the one from the top of the message, so bottom
 posting doesn't help trimming the message as you said.
 
 Teddy
 
 -- 
 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] Creating a new window

2004-09-20 Thread Jason Davidson
this is javascript question isnt it.. but to end the thread quickly...
just dont put your js in the button.. just print it ..

print scriptwin-=open(...);win.focus();/script;

that wiill open a win when the browser parses it.

Jason


Todd Cary [EMAIL PROTECTED] wrote: 
 
 I am using PHP to create a button on a window so that a new window is 
 created when the button is clicked using javaScript.  Is there a way to 
 create a new window inline; that is create a window on top of the 
 current window without having the surfer press a button?
 
 Here is my current onClick code:
 
 input name=btnView type=button value=View 
 onClick=MM_openBrWindow('claim_pdf.php?session_id=1095690357pdf_file=1000481.pdf','','toolbar=no,status=no,scrollbars=no,resizable=yes');
  
 
/td
 
 Todd
 
 -- 
 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] Auto escaping an apostrophy...

2004-09-20 Thread Jason Davidson
Turn off magic_quotes_gpc in the php.ini file, they are bad bad abd.. 
magic_quotes_gpc 0

Jason

Todd Cary [EMAIL PROTECTED] wrote: 
 
 I have noticed that an apostrophy is automatically escaped with a \, 
 or at least appears to be if the surfer enters an apostrophy in a text 
 field.  Has this always been the case or is there a setting in the 
 php.ini file that contols this?
 
 Todd
 
 -- 
 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] very basic php mysql question

2004-09-20 Thread Jason Davidson
add mysql_error() to your die string so you can report what the error
is.

Jason

AMC [EMAIL PROTECTED] wrote: 
 
 Thanks,
 
 the script runs now, but I cannot open a connection. I know the user name,
 and password are correct. What could be the cause?
 
 ?php
 
 
 
 $user = aclark;
 
 $host = localhost;
 
 $password = ajaxx;
 
 $database = corrigent;
 
 $connection = mysql_connect($host, $user, $password) or die(can't open damn
 connection);
 
 $db = mysql_select_db($database, $connection) or die(can't open damn
 database);
 
 $query = select * from customer;
 
 $result = mysql_query($query) or die (couldn't execute query);
 
 while ($row = mysql_fetch_array($result))
 
 {
 
 extract($row);
 
 echo $company;
 
 }
 
 ?
 
 Matthew Sims [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  
   I have a php page with the code below. The page doesn't show the record
   from
   the database when it runs and I'm not sure why. I'm not getting any
 error
   message, just a blank page. There is one record in the tabele I'm trying
   to
   query.
   I'm brand new to php so I'd really appreciate the help.
  
   ? php
  
  
  
   $user = aclark;
  
   $host = localhost;
  
   $password = ajaxx;
  
   $database = corrigent;
  
   $connection = mysql_connect($host, $user, $password)or die(can't open
   damn
   connection);
  
   $db = mysql_select_db($database, $connection) or die(can't open damn
   database);
  
   $query = select * from customer;
  
   $result = mysql_query($query) or die (couldn't execute query);
  
   while ($row = mysql_fetch_array($result));
  
   {
  
   extract($row);
  
   echo $company;
  
   }
  
   ?
  
 
 
  Your while statment has a ; at the end of it.
 
  while ($row = mysql_fetch_array($result)) {
echo $row[company];
  }
 
  -- 
  --Matthew Sims
  --http://killermookie.org
 
 -- 
 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] mysql_connect does not connect

2004-09-19 Thread Jason Davidson
Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Raditha Dissanayake [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  Sam Hobbs wrote:
 
 
 I have posted over 12,000 messages in the CodeGuru.com Visual C++ forum,
  Do you have a life ?
 
 I hope the moderators protest posts such as this. 
 

i protest thats for sure, 
Raditha, please do not post rhetorical questions to the list :)

Jason


 -- 
 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] mysql_connect does not connect

2004-09-19 Thread Jason Davidson
uh huh.. was it your firewall :) :)  it was wasnt it.. im so bad, im so
bad it hurts, but i solved your problem, so come on, a cookie or
something..pat on the head, or how about, thanks for helping.

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Jason Wong [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 
  Would you mind spilling the beans? I'm sure everyone is dying to know what 
  the
  resolution of this thread is.
 
 I definitely mind. I don't believe in rewarding bad behavior. It is 
 reasonable to contribute to the productive development of solutions, but the 
 attitude in this group is not productive. I have the impression that the 
 real reason you want answers is so that you can continue in unproductive 
 directions.
 
 -- 
 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] empty variable

2004-09-19 Thread Jason Davidson
as suggeted the isset and empty functions are usefull, 
or if you know it may be set, but could be empty, how about just
if($variable) {

}

that is the same as
if($var == )

Chris Mach [EMAIL PROTECTED] wrote: 
 
 What is the best way to determine if a variable is empty?
 
 I have a feeling there is a better way than the way I'm doing it now...
 
 if ($variable == )
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.766 / Virus Database: 513 - Release Date: 18-Sep-2004

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



Re: [PHP] empty variable

2004-09-19 Thread Jason Davidson
if youdo 
if($var) {

}

and var doesnt exist at all, thats an error.

if(isset($var)) {

}

will test to see if $var exists, but will not test the value of var, so
$var could be blank...

Jason

Pat [EMAIL PROTECTED] wrote: 
 
 So, you have to know, first, what is your meaning of your empty variabe:
 null, 0, , array()?
 
 For example, $var = 0;, empty($var) says true... but you?
 
 Jason Davidson [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  as suggeted the isset and empty functions are usefull,
  or if you know it may be set, but could be empty, how about just
  if($variable) {
 
  }
 
  that is the same as
  if($var == )
 
  Chris Mach [EMAIL PROTECTED] wrote:
  
   What is the best way to determine if a variable is empty?
  
   I have a feeling there is a better way than the way I'm doing it now...
  
   if ($variable == )
  
  
   ---
   Outgoing mail is certified Virus Free.
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.766 / Virus Database: 513 - Release Date: 18-Sep-2004
 
 -- 
 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: Re[2]: [PHP] mysql_connect does not connect

2004-09-18 Thread Jason Davidson
I may be unnaturally ugly (to the extent my mother cried when she held
me), and so i have a little extra hair here and there.. and my hands
are like hams.. but im no troll :P :P

Jason


Tom Rogers [EMAIL PROTECTED] wrote: 
 
 Hi All,
 
 I don't normally bother with these kind of meaningless threads as they
 waste valuable electrons but I did find this interesting
 
 http://www.urban75.com/Mag/troll.html
 
 
 PS This is not a dig at you Jason, it's just your post is the only one
 I didn't delete :)
 -- 
 regards,
 Tom
 
 -- 
 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] mysql_connect does not connect

2004-09-18 Thread Jason Davidson
oh booh, i replied to that, explicitly detailing you can simply
allow an open port for mysql rather than drop the whole firewall.  

Yes this type of comment cuases problems, or in your case, fixes your
problem... at least your mysql connection one.  so are you saying im
unreasonable, and unknowledgable, me, the person who although blasted
with a few emails, telling me i dont understand how localhost works,
had the correct solution to your problem .. 

thanks sam, glad to be of service.  BTW, good posts on PHP Internals,
have you noticed that the whole world is irrelevent and unreasonable,
well, except for you 

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 That is the type of comment that causes problems. Reasonable and 
 knowledgable people know it is not true and saying it just causes problems. 
 Of course, many people would advise to just ignore comments such as that and 
 I will in the future. I just want to make it clear for the benefit of others 
 that this is the type of comments that has caused problems.
 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  Windows XP Firewall, or any other firewall for that matter must be off.
 
 -- 
 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] filtering out text in a string

2004-09-18 Thread Jason Davidson
Search preg_replace or preg_match in the manual.

Jason

Merlin [EMAIL PROTECTED] wrote: 
 
 Hi there,
 
 I want to filter out ip adresses out of a given text string. They are inside a 
 logfile and values are seperated by tabs. I tryed sub_str which works fine if 
 you know the length of the characters. In case of the ip adress this is not the 
 case, since they are sometimes shorter than others.
 Has anybody an idea how to filter the ip adress out? Maybe magically with any 
 regex or somehow with tab recognicion.
 
 This is an example of parts of the text
 20:03:20[MSG]   192.168.0.129  bla bla
 
 I am stuck here, maybe someone has a good idea or knows how to do that.
 
 Thank you in advance,
 
 Merlin
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
The last paragraph refers to me :) and im quite proud of it now, ive
printed some of your emails out, and i keep them around, they really do
make me smile, not becuase im so much an a$$hole, but becuase, youve
already said, that altering your firewall allowed you to connect. 
Which not so coincidently, i suggested in the beginning.  You call it a
guess, an uneducated blunder maybe,  whatever helps you sleep at night

PS.. takes you half hour to drop your firewall.. sheesh,.. and for note,
and honestly, for your benefit, SP2 _will_ enable a _new_ firewall on
your computer, unless youve configured otherwise, there is a new
security center that will complain if your firewall is not enabled,
have you seen this complaint?

J


Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Jason Wong [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 
  The firewall is relevant depending on your circumstances. In any case it 
  would
  take you all of one minute to disable your firewall to test out this wild
  far out suggestion. At the most you would have lost one minute but you 
  would
  have either:
 
  - gained the satisfaction of saying I told you the firewall was 
  irrelevant,
  now go away and stop wasting my time with your ridiculous suggestions
 
  or
 
  - you would have found the cause of your problem
 
 It definitely takes more than a minute. It takes nearly a minute just to 
 logoff one user and I often have another user, the Administrator account, 
 also logged in. If the Administrator account is not lgged in already, then I 
 must log in to it to shutdown ZoneAlarm. Then the system must shutdown and 
 restart. While that is happening, I must unplug the cable modem to ensure I 
 get nothing from/to the outside, but that can be done in parrallel with 
 system shutdown. However I must stay at the system while this is happening; 
 I prefer to unplug the cable after the system disconnects from the modem. 
 Then I must log in to at least one account and start a few things, such as 
 Apache. Relatively speaking, Apache starts immediatley, so it is not very 
 relevant, but it does take time for my system to start. Then after the test 
 I must restart ZoneAlarm, restart the system and be sure to plug the modem 
 back in while the system starts. The whole operation is likely to take 
 nearly a half hour at least.
 
  Contrast that with the number of posts you have made denying that the 
  firewall
  could be a problem, and stating adamantly that you will not do 
  such-and-such
  a thing because it is 'not supposed' to happen like that.
 
 The problem is all the people that persist in saying the same thing. I am 
 smart enough to think of the things being suggested. It is the type of thing 
 that is very easy to suggest. I get frustrated by people suggesting things 
 just because they are easy to suggest. Therefore when people make a 
 suggestion that is more likely to be relevant it is difficult for me to 
 determine which ones are worthwhile. And again, I am able to think of things 
 such as eliminating the firewall as a possibility. It is okay for people to 
 suggest that, but unless they can show me something that clearly says it is 
 relevant, then they won't accomplish anything by insisting.
 
 One problem is that I get answers that are not accurate, so it is difficult 
 to know which ones are accurate.
 
 The most important thing is that unless people give me a clear explanation 
 of what they are saying, it is useless to insist. I don't mind a suggestion 
 as much as it is the insisting that causes problems. Therefore from my point 
 of view, it is the insistance by others that keep the discussion going (in 
 useless directions).
 
 There is one person in particular that tries too hard to help and then when 
 I politely say I am getting too much help I get criticized. That is not a 
 productive attitude.
 
 -- 
 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] Re: mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Yes yes, your always relevent, we are not... funny that you have the
problem and we do not though. 

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Jason Wong [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 
  I'm not familiar with MySQL under Windows, but I believe that there are
  different installers available from various sources. So saying Typical
  installation option doesn't really mean much.
 
 There is only one Windows installer available rom the MySQL web site and it 
 has an option that explicitly says Typical. Therefore in this context 
 Typical is extremely specific and relevant.
 
 -- 
 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: Fw: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Cheers on that, this thread has become amusement, that is payment enough

Jason


John Holmes [EMAIL PROTECTED] wrote: 
 
 Sam Hobbs [EMAIL PROTECTED] wrote in message
  One problem is that I get answers that are not accurate, so it is
  difficult to know which ones are accurate.
 
  You are correct about that. Personally, I not satisfied with the level of
  support I get from the people paid to monitor this list and help me out 
 when
  I have a problem, either. Just imagine if the people on this list were
  volunteers and just trying to help... good god, that'd be horrible,
  wouldn't it?
 
  ---John Holmes...
 
 -- 
 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: Fw: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Im not a john, but to add to confusion we could all sign with 'J'

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 John Holmes wrote:
  Sam Hobbs [EMAIL PROTECTED] wrote in message
  
  One problem is that I get answers that are not accurate, so it is
  difficult to know which ones are accurate.
  
  
  You are correct about that. Personally, I not satisfied with the level of
  support I get from the people paid to monitor this list and help me out 
  when
  I have a problem, either. Just imagine if the people on this list were
  volunteers and just trying to help... good god, that'd be horrible,
  wouldn't it?
  
  ---John Holmes...
  
 
 Damn, it's going to be hard to tell the John's apart on this list 
 soon.  ;)
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Hey, the reason it doesnt come in to play for you in linux, is becuase
mysql by default will connect through a unix socket, and not over
tcpip.  The unix socket is a connection thru the filesystem and not the
network.  Also, in linux, there is a virtual device for lopback, and the
firewall i dont beleive has any effect on the loopback device.  In
windows however, depending on what version, mysql will connect using
tcp/ip, unless told otherwise, in this case, Sam supplied localhost to
his connect function, which tells mysql explicitly to use the network
over a named pipe.

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 Steve Brown wrote:
  snip lots of garbage
  
  OK, I'm going to jump in and try and take a stab at this.  
  
  Sam, if you wouldn't mind answering a question: are you still unable
  to connect to your mysql server?
  
  I'll also add that your understanding of firwalls is lacking. 
  Regardless of where your server is (local or remote), there is still a
  client-server relationship happening.  If you are trying to connect to
  localhost/127.0.0.1 (use the latter as previously recommended), your
  system is acting as the server.  ANY consumer firewall (free or
  otherwise) is going to block incoming packets not related to an
  already established connection, regardless of where they originate.
  
  Lots of consumer firewalls are going filter traffic on localhost
  because lots of vicious spyware out there are starting to install
  daemons on systems then rewiriting the HOSTS files to pull ads from
  the localhost rather then hitting the marketers servers.  If you don't
  believe me, google for spyware HOSTS file.  To assume that your
  firewall (ZoneAlarm, XP, or otherwise) is not in play here is false.
 snip
 
 This is why I originally said that the firewall shouldn't 
 matter...coming from the *nix world, it doesn't.  Even if I close off 
 port 3306 with iptables/ipchains, it's still going to allow local 
 connections, since the request is coming from, and going too localhost. 
   I guess with Windows, you need to close internal and external 
 connections to be save. ;)
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Windows likely has some sort of loopback device, but i dunno how it
works

Ive also come accross people complaining that SP2 has funked up local
connections for various server/clients.  However, ive seen firewalls
cuase problems for mysql on both windows and linux, so ya.. who
knows... Sam knows.. apparently. :)

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 Jason Davidson wrote:
  Hey, the reason it doesnt come in to play for you in linux, is becuase
  mysql by default will connect through a unix socket, and not over
  tcpip.  The unix socket is a connection thru the filesystem and not the
  network.  Also, in linux, there is a virtual device for lopback, and the
  firewall i dont beleive has any effect on the loopback device.  In
  windows however, depending on what version, mysql will connect using
  tcp/ip, unless told otherwise, in this case, Sam supplied localhost to
  his connect function, which tells mysql explicitly to use the network
  over a named pipe.
  
  Jason
 
 Windows doesn't have a loopback device?  Ye Gods, what were they 
 thinking
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Another test you might do , is use something like tcpdump to snif your
network to see exactly how its attempting to connect, then you could
ascertain on your own (as you dont beleive me) if mysql is connecting
over the network or through the filesystem.

Jason

Jason Wong [EMAIL PROTECTED] wrote: 
 
 On Friday 17 September 2004 23:23, Sam Hobbs wrote:
  Jason Wong [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
   IIRC the OP did have a successful test case when connecting from the
   mysql client.
 
  Yes, I did get it to work.
 
 It would help in diagnosing your problem if you told us what connection 
 parameters you used when connecting with the mysql client that made it work?
 
 Also did you perform those dozen tests I outlined in a previous post.
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Insults are effective only where emotion is present.
   -- Spock, Who Mourns for Adonais?  stardate 3468.1
 */
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
hehehe.. im actually looking forward to reading responses on this
thread.. 

funny stuff. 

Jason

Jason Wong [EMAIL PROTECTED] wrote: 
 
 On Friday 17 September 2004 23:21, Sam Hobbs wrote:
 
  Again, it is okay to say this once but it is not useful to keep insisting.
  I am smart enough to be aware of the possibility and if and when other
  possibilities have been exahausted I would have tried the possibility of
  disabling the firewall or whatever. Insisting upon it from others is not
  productive; it is more likley to polarize me in the opposite direction and
  get us to where we are now. It is the emotional commentary that is most
  unproductive. I try to explain (unemotionally and in a reasonable manner)
  that I don't need the additional assertion that I must try something and
  the response to that becomes emotional.
 
 Being obstinate and contrarian does nothing to help resolve your problem. Time 
 for another:
 
 [quote from a Sam Hobbs post in reply to Jason Davidson]
  It is my understanding that the firewall is not supposed to be relevant. I
  have not seen anything saying it is supposed to be. If it is true that it
  is not supposed to be relevant, then simply saying it is just causes
  confusion. If you had said that the firewall is not supposed to be
  relevant, but try disabling it anyway, then I would say that I am totally
  able to think like that too. It is reasonable to try things like that to
  diagnose a bug.
 [quote]
 
 Would I be correct if I paraphrased the above as:
 
 The wrong way to get Sam Hobbs to try something that might help in solving his 
 problem:
 
 [JD] The firewall might be blocking your attempts to connect to mysql. Try 
 disabling it.
 [SH] Yeah and what makes you think that? I KNOW the firewal has nothing to do 
 with it. Get real (and go away).
 
 The right way to get Sam Hobbs to try something that might help in solving his 
 problem:
 
 [JD] The firewall has nothing to do with your problem. But try disabling it 
 anyway.
 [SH] Yeah that sounds reasonable. Thanks, I'll try that.
 
 
 
 How silly is that?
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 If money can't buy happiness, I guess you'll just have to rent it.
 */
 
 -- 
 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] sorting multidimensional array by a second level value

2004-09-17 Thread Jason Davidson
http://ca3.php.net/manual/en/function.array-multisort.php

this might do it.

Jason

Chris Lott [EMAIL PROTECTED] wrote: 
 
 I have an array $links like this:
 
 [1] = Array
 (
 [href] = http://www.poetrymagazine.org/epstein_sept_prose.html
 [description] = Thank You, No
 [time] = 2004-09-17T17:30:32Z
 )
 
 [2] = Array
 (
 [href] = http://110am.com/projects/manuscript/
 [description] = Manuscript
 [time] = 2004-09-16T19:25:14Z
 )
 
 I'd like to sort the array based on one of the values in the field
 href, description, or time. Is there a canonical way of doing this?
 
 c
 -- 
 Chris Lott
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
Im not sure who was doing that.  i missed that stuff i think.
Jason

John Holmes [EMAIL PROTECTED] wrote: 
 
 From: Jason Davidson [EMAIL PROTECTED]
  hehehe.. im actually looking forward to reading responses on this
  thread..
 
 Whatever happened to those monthly stat posts? most posts, most posts per 
 thread, etc...?? Who was doing that? I haven't seen one in a while.
 
 ---John Holmes... 
 
 

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



Re: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
HAHAHA, this thread is awsome though, you all  must admit the humor
involved here.  I hope this thread continues for a couple more days. 
or here is an idea for a thread
{PHP} globals.asp wont set my php vars

[EMAIL PROTECTED] wrote: 
 
 Amazing how long that thread is -- must be a record. Seems to be classic case 
 of 'ignore-the-obvious' or 'my-mind-is-made-up. Don't-confuse-me-with-facts'. 
 Perhaps I should start a new thread:
 
 [PHP} Can't get NULL to output anything!
 
 hehe
 Andre
 
 
 On Friday 17 September 2004 03:11 pm, Jason Davidson wrote:
  hehehe.. im actually looking forward to reading responses on this
  thread..
 
  funny stuff.
 
  Jason
 
  Jason Wong [EMAIL PROTECTED] wrote:
   On Friday 17 September 2004 23:21, Sam Hobbs wrote:
Again, it is okay to say this once but it is not useful to keep
insisting. I am smart enough to be aware of the possibility and if and
when other possibilities have been exahausted I would have tried the
possibility of disabling the firewall or whatever. Insisting upon it
from others is not productive; it is more likley to polarize me in the
opposite direction and get us to where we are now. It is the emotional
commentary that is most unproductive. I try to explain (unemotionally
and in a reasonable manner) that I don't need the additional assertion
that I must try something and the response to that becomes emotional.
  
   Being obstinate and contrarian does nothing to help resolve your problem.
   Time for another:
  
   [quote from a Sam Hobbs post in reply to Jason Davidson]
  
It is my understanding that the firewall is not supposed to be
relevant. I have not seen anything saying it is supposed to be. If it
is true that it is not supposed to be relevant, then simply saying it
is just causes confusion. If you had said that the firewall is not
supposed to be relevant, but try disabling it anyway, then I would say
that I am totally able to think like that too. It is reasonable to try
things like that to diagnose a bug.
  
   [quote]
  
   Would I be correct if I paraphrased the above as:
  
   The wrong way to get Sam Hobbs to try something that might help in
   solving his problem:
  
   [JD] The firewall might be blocking your attempts to connect to mysql.
   Try disabling it.
   [SH] Yeah and what makes you think that? I KNOW the firewal has nothing
   to do with it. Get real (and go away).
  
   The right way to get Sam Hobbs to try something that might help in
   solving his problem:
  
   [JD] The firewall has nothing to do with your problem. But try disabling
   it anyway.
   [SH] Yeah that sounds reasonable. Thanks, I'll try that.
  
  
  
   How silly is that?
  
   --
   Jason Wong - Gremlins Associates - www.gremlins.biz
   Open Source Software Systems Integrators
   * Web Design  Hosting * Internet  Intranet Applications Development *
   --
   Search the list archives before you post
   http://marc.theaimsgroup.com/?l=php-general
   --
   /*
   If money can't buy happiness, I guess you'll just have to rent it.
   */
  
   --
   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
 
 

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



Re: [PHP] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
hahahaha, what can i do in 30 minutes... hmm.. install almost any linux
distro, most windows distros.. i could disbaled and enable my firewall
about 180 times i could read just one of the long winded emails how
i obsfuscate the thread with irrelevant solutions and wild suggestions
of inaccuracy...sorry .. i had to ..

Jason

Curt Zirzow [EMAIL PROTECTED] wrote: 
 
 * Thus wrote Sam Hobbs:
  Jason Wong [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
  
   The firewall is relevant depending on your circumstances. In any case it 
   would
   take you all of one minute to disable your firewall to test out this wild
   far out suggestion. At the most you would have lost one minute but you 
   would
   have either:
  
   - gained the satisfaction of saying I told you the firewall was 
   irrelevant,
   now go away and stop wasting my time with your ridiculous suggestions
  
   or
  
   - you would have found the cause of your problem
  
  It definitely takes more than a minute. It takes nearly a minute just to 
  logoff one user and I often have another user, the Administrator account, 
  ...
  I must restart ZoneAlarm, restart the system and be sure to plug the modem 
  back in while the system starts. The whole operation is likely to take 
  nearly a half hour at least.
 
 Um.. you do realize you have more problems than php not being able
 to connect to the database.
  
 
 Curt
 -- 
 The above comments may offend you. flame at will.
 
 -- 
 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] reading from files

2004-09-17 Thread Jason Davidson
use the functoin file, it does exactly that.

http://ca3.php.net/manual/en/function.file.php

Jason

Merlin [EMAIL PROTECTED] wrote: 
 
 Hi there,
 
 I am wondering how to read lines from a file to a php array? I would like to 
 integrate a logfile into a html site. Is it possible to read line by line and to
 
 check how many lines there are in total?
 
 Thank you for any hint on that,
 
 Merlin
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
that takes the cake. :D :D

J

Matthew Sims [EMAIL PROTECTED] wrote: 
 
 
  [PHP} Can't get NULL to output anything!
 
  hehe
  Andre
 
 
 
 Check your firewall.
 
 -- 
 --Matthew Sims
 --http://killermookie.org
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
what is top posting


Jay Blanchard [EMAIL PROTECTED] wrote: 
 
 Did you just top post? Top posting === evil;
 
 -Original Message-
 From: Jason Davidson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 17, 2004 3:14 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] mysql_connect does not connect
 
 
 HAHAHA, this thread is awsome though, you all  must admit the humor
 involved here.  I hope this thread continues for a couple more days. 
 or here is an idea for a thread
 {PHP} globals.asp wont set my php vars
 
 [EMAIL PROTECTED] wrote: 
  
  Amazing how long that thread is -- must be a record. Seems to be
 classic case 
  of 'ignore-the-obvious' or 'my-mind-is-made-up.
 Don't-confuse-me-with-facts'. 
  Perhaps I should start a new thread:
  
  [PHP} Can't get NULL to output anything!
  
  hehe
  Andre
  
  
  On Friday 17 September 2004 03:11 pm, Jason Davidson wrote:
   hehehe.. im actually looking forward to reading responses on this
   thread..
  
   funny stuff.
  
   Jason
  
   Jason Wong [EMAIL PROTECTED] wrote:
On Friday 17 September 2004 23:21, Sam Hobbs wrote:
 Again, it is okay to say this once but it is not useful to keep
 insisting. I am smart enough to be aware of the possibility and
 if and
 when other possibilities have been exahausted I would have tried
 the
 possibility of disabling the firewall or whatever. Insisting
 upon it
 from others is not productive; it is more likley to polarize me
 in the
 opposite direction and get us to where we are now. It is the
 emotional
 commentary that is most unproductive. I try to explain
 (unemotionally
 and in a reasonable manner) that I don't need the additional
 assertion
 that I must try something and the response to that becomes
 emotional.
   
Being obstinate and contrarian does nothing to help resolve your
 problem.
Time for another:
   
[quote from a Sam Hobbs post in reply to Jason Davidson]
   
 It is my understanding that the firewall is not supposed to be
 relevant. I have not seen anything saying it is supposed to be.
 If it
 is true that it is not supposed to be relevant, then simply
 saying it
 is just causes confusion. If you had said that the firewall is
 not
 supposed to be relevant, but try disabling it anyway, then I
 would say
 that I am totally able to think like that too. It is reasonable
 to try
 things like that to diagnose a bug.
   
[quote]
   
Would I be correct if I paraphrased the above as:
   
The wrong way to get Sam Hobbs to try something that might help in
solving his problem:
   
[JD] The firewall might be blocking your attempts to connect to
 mysql.
Try disabling it.
[SH] Yeah and what makes you think that? I KNOW the firewal has
 nothing
to do with it. Get real (and go away).
   
The right way to get Sam Hobbs to try something that might help in
solving his problem:
   
[JD] The firewall has nothing to do with your problem. But try
 disabling
it anyway.
[SH] Yeah that sounds reasonable. Thanks, I'll try that.
   
   
   
How silly is that?
   
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications
 Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
If money can't buy happiness, I guess you'll just have to rent it.
*/
   
--
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
  
  
 
 -- 
 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] mysql_connect does not connect

2004-09-17 Thread Jason Davidson
haha

John Nichel [EMAIL PROTECTED] wrote: 
 
 How do I sync an Oracle and MSSQL database on an AIX system remotely 
 from Windows '95?
 
 p.s.  I found this email address on the php website, which means I've 
 been to the php website, therefore this is a php question.  Don't you 
 dare flame me.
 
 Jay Blanchard wrote:
  Did you just top post? Top posting === evil;
  
  -Original Message-
  From: Jason Davidson [mailto:[EMAIL PROTECTED] 
  Sent: Friday, September 17, 2004 3:14 PM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] mysql_connect does not connect
  
  
  HAHAHA, this thread is awsome though, you all  must admit the humor
  involved here.  I hope this thread continues for a couple more days. 
  or here is an idea for a thread
  {PHP} globals.asp wont set my php vars
  
  [EMAIL PROTECTED] wrote: 
  
 Amazing how long that thread is -- must be a record. Seems to be
  
  classic case 
  
 of 'ignore-the-obvious' or 'my-mind-is-made-up.
  
  Don't-confuse-me-with-facts'. 
  
 Perhaps I should start a new thread:
 
 [PHP} Can't get NULL to output anything!
 
 hehe
 Andre
 
 
 On Friday 17 September 2004 03:11 pm, Jason Davidson wrote:
 
 hehehe.. im actually looking forward to reading responses on this
 thread..
 
 funny stuff.
 
 Jason
 
 Jason Wong [EMAIL PROTECTED] wrote:
 
 On Friday 17 September 2004 23:21, Sam Hobbs wrote:
 
 Again, it is okay to say this once but it is not useful to keep
 insisting. I am smart enough to be aware of the possibility and
  
  if and
  
 when other possibilities have been exahausted I would have tried
  
  the
  
 possibility of disabling the firewall or whatever. Insisting
  
  upon it
  
 from others is not productive; it is more likley to polarize me
  
  in the
  
 opposite direction and get us to where we are now. It is the
  
  emotional
  
 commentary that is most unproductive. I try to explain
  
  (unemotionally
  
 and in a reasonable manner) that I don't need the additional
  
  assertion
  
 that I must try something and the response to that becomes
  
  emotional.
  
 Being obstinate and contrarian does nothing to help resolve your
  
  problem.
  
 Time for another:
 
 [quote from a Sam Hobbs post in reply to Jason Davidson]
 
 
 It is my understanding that the firewall is not supposed to be
 relevant. I have not seen anything saying it is supposed to be.
  
  If it
  
 is true that it is not supposed to be relevant, then simply
  
  saying it
  
 is just causes confusion. If you had said that the firewall is
  
  not
  
 supposed to be relevant, but try disabling it anyway, then I
  
  would say
  
 that I am totally able to think like that too. It is reasonable
  
  to try
  
 things like that to diagnose a bug.
 
 [quote]
 
 Would I be correct if I paraphrased the above as:
 
 The wrong way to get Sam Hobbs to try something that might help in
 solving his problem:
 
 [JD] The firewall might be blocking your attempts to connect to
  
  mysql.
  
 Try disabling it.
 [SH] Yeah and what makes you think that? I KNOW the firewal has
  
  nothing
  
 to do with it. Get real (and go away).
 
 The right way to get Sam Hobbs to try something that might help in
 solving his problem:
 
 [JD] The firewall has nothing to do with your problem. But try
  
  disabling
  
 it anyway.
 [SH] Yeah that sounds reasonable. Thanks, I'll try that.
 
 
 
 How silly is that?
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications
  
  Development *
  
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 If money can't buy happiness, I guess you'll just have to rent it.
 */
 
 --
 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
 
 
  
  
 
 Oh yeah, trimming posts is bad.
 
 -- 
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com
 
 -- 
 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] Code spacing causing HEADER problem?

2004-09-17 Thread Jason Davidson
You absolutely can not send anything to the browser before a header is
sent... 
so if you put a space in there, it gets sent to the client.. no good.. 
its not the code thats the problem . its that you escaped from php and
left space between.

Jason

BOOT [EMAIL PROTECTED] wrote: 
 
 I don't get this!
 
 Why does example (a) work for me but not example (b) ??? I realize that no
 output can be sent to the browser before the header but why would code
 linepace effect? Thanks for any info!
 
 
 (a)
 
 ?php $a = 1; ?
 ?php header(Location: 1.php);?
 
 
 (b)
 
 ?php $a = 1; ?
 
 ?php header(Location: 1.php);?
 
 -- 
 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] thumbnail of webpage

2004-09-17 Thread Jason Davidson
First, im not sure how you would capture a snapshot of the page, sinse
the page is rendered by the browser, and php is completely server side.
 Possibly there is a way to fopen a page or something, but... i dunno..

as for making thumbnail, using the gd extension, is quite easy.
check the manual for GD. 

Jason


Michael Mao [EMAIL PROTECTED] wrote: 
 
 Is there a way to capture a snapshot of a html page and save it as a jpg  
 using php?
 
 -- 
 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] Re: mysql_connect does not connect

2004-09-16 Thread Jason Davidson
woah, full functionality.. it has will still connect, at least, it will
still connect for me.  Where the functionality is missing, im not sure.
 But sinse the error is cant connect to localhost, i would say that it
strying to connect to localhost, and not being allowed.  

That said, im fully open to the idea that this may be the problem, im
just reporting that i have connected to a mysql version greater than
4.1 with mysql_connect.  

Jason

Curt Zirzow [EMAIL PROTECTED] wrote: 
 
 * Thus wrote Sam Hobbs:
  Janbro [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   Hi I connect to a MySQL 4.1 with the following String:
  
  
   if
   ($db_verbin=mysqli_connect($mysql_host,$mysql_user,$mysql_passw,$DB_n
   ame))
  
   watch the i in mysqli_connect!
  
   I think I've read somewhere that you are required to use that for the 4.1
   Versions, but you
  
   better look that up, I might be wrong there.
  
   Hope this helps
  
   JanBro
  
  
  When I do try mysqli_connect, I get:
  
  Fatal error:  Call to undefined function mysqli_connect()
  
  So obviously I need to do something to enable that. I will look into that 
  later, but I am still trying to get mysql_connect to work.
 
 RTFM.
 
 mysql:
   This MySQL extension doesn't support full functionality of MySQL
   versions greater than 4.1.0. For that, use MySQLi.
 
 mysqli:
   The mysqli extension is designed to work with the version 4.1.3 or
   above of MySQL.
 
 
 
 Curt
 -- 
 The above comments may offend you. flame at will.
 
 -- 
 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] mysql_connect does not connect

2004-09-16 Thread Jason Davidson
i am in total agreeance of this post.  Sinse the 'flame' war is
primarily between me and everyone else, especially sam hobbes, (not the
first time either), no more contributiuons to this thread from me.  I
hope it gets resolved, and i hope it gets posted as much so others can
search the archive of this thread for solutions.  

If anyone actually wants to discuss, and not argue, over the relevance
of a firewall in this sitiution, please start a new thread.  

Jason


Markus Mayer [EMAIL PROTECTED] wrote: 
 
 On Thursday 16 September 2004 05:06, Sam Hobbs wrote:
  It is my understanding that the firewall is not supposed to be relevant. I
 
 It is our experience at my employer that the firewall in XP-SP2, as well as 
 other firewalls that are available, are very relevant.
 
  have not seen anything saying it is supposed to be. 
 
 We also have not seen any documentation about problems with such things 
 after installing SP2, but we have problems.  Things that worked before don't 
 work any more, especially client side things.  Our three small Windoze 
 servers have given our Windoze administrator more than enough work recently.
 
  If it is true that it 
  is not supposed to be relevant, then simply saying it is just causes
  confusion. If you had said that the firewall is not supposed to be
  relevant, but try disabling it anyway, then I would say that I am totally
  able to think like that too. It is reasonable to try things like that to
  diagnose a bug.
 
 flame blocked by firewall.
 
  If you can find something in the MySQL documentation saying that the
  firewall needs to be disabled eventhough the server and client are the same
  system, then that would sure help. I am not asking you to; I am saying that
  that is what would help.
 
 SP2 is so new that its effects are still being evaluated by a lot of people.  
 At the moment, I think the best place to get information about its effects is 
 forums like this one.  Formal documentation will be updated in time as more 
 experience is gained.  The info I got from our Windows admin is that with 
 SP2, the MS SQL server on one machine was apparenty unaffected, but the MySQL 
 on another was.  Dropping the MS Firewall in SP2 allowed connections again.
 
 Client side, SP2 has caused nothing but problems for us to the point where we 
 as administrators are now saying to our users it was working before you 
 installed SP2, and after you installed SP2 it stopped working, so it's your 
 problem.  IE is especially problematic, and when someone calls up and says 
 they have a problem with IE and have installed SP2, our response is that we 
 no longer support IE and tell the users to install Mozilla, and if they still 
 have problems when they try Mozilla, they can call us back.  We haven't heard 
 from any of them again, and our help desk girls have always been able to 
 quickly sort out the problems users have when they first try Mozilla.
 
 I looked back in this thread and saw that you used Zone Alarm as a firewall.  
 You need to allow MySQL connections to localhost, and that regardless of 
 which firewall you use.  If you filter such connections out, PHP scripts will 
 not be able to connect to your MySQL server.  This is because PHP makes a TCP 
 connection to the MySQL server, also when it is running on the same machine 
 as you PHP/Apache (at least this is my understanding).  You can of course 
 continue refuse all external (that is not from localhost) connections to 
 whatever service is running on your machine.  I think something to this 
 effect has already been said in this thread, but at the moment I don't want 
 to search for the post.
 
 While the flame war in this thread has been amusing to read, it's amusement 
 value for me has more or less run out.  My impression is that you still don't 
 have the thing working, and the only solution left is to configure your 
 firewall to allow connections to your MySQL server from localhost.  If you 
 would do this, and it works, please post to the list to reflect this.  My 
 experience as an administrator tells me with a 99% certainty that this is 
 your problem.
 
 regards
 Markus
 
 -- 
 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] mysql_connect does not connect

2004-09-15 Thread Jason Davidson
Good day, im glad you seem to have resolved your problem, i shall
comment on your comments.

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 I appreciate your attempts to help, but you must understand that when 
 attempts to help just cause time to be wasted, then it might be appropriate 
 to not appreciate the help. 
Its no waste of time to attempt a solution, if it doesnt work, youve
eliminated that solution.  That is one step closer.

Then when I try to explain that you are not 
 helping, you make comments such as this, trying to blame me. If I am the 
 only person you do this to, then I can live with it. If however you do this 
 to others, then I hope you are told by others that you are trying too hard 
 to help and that you resort to insulting others when you don't help.

Im bashing my head on the wall now

 
 Perhaps there is some validity to what you are saying, but you are also 
 saying some things that are not valid, which makes it difficult or 
 impossible to determine what is valid. I do try to tell you in reasonably 
 polite and useful ways that much of what you say is not helpful. Obviously I 
 need to just ignore your help instead.
 
Now that you have figured out, that it is possible its your firewall,
which, many, and i think you claimed before was impossible, what
exactly makes you sure i said anything invalid.


Now that my rant is done, i made it clear, that i i have solved a
problem with your EXACT error msg before.  That makes this not a guess,
but an educated and experienced suggestion.  and yes, all forms of help
on this form are as such. 

Yup, im an a$$hole , i dont like being completely shutdown by people
requesting help, when i take the time to impart some experience... 

J


 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  There is an issue with sp2 and loopback, you can argue all you like, but
  many have had this problem, and many have resolved it. Mysql will not
  connect through udp, it will use tcp.  If you supply a hostname in your
  connect function, it will use tcpip to connect over a port, if oyu dont
  supply a hostname, or i beleive put a '.' in its place, it will attempt
  to connect through a named pipe which doesnt use the network.  In the
  time you spend writing this email, you could have attemped a suggested
  solution.
 
  A little more acceptance to help would gain a lot more respect from me,
  not that you probably care about others respect.
 
  And for further note, for the sake of discussion, as you have mentioned
  to me on a certain forum.  A firewall can absolutely interfere with a
  connection to mysql even if you are using localhost, if, and only if,
  that connection is being done over tcpip, which in unix, is rarely, but
  in windows, is not all that rare.
 
 -- 
 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] Re: mysql_connect does not connect

2004-09-15 Thread Jason Davidson
firewall, who would have thought

Jason Wong [EMAIL PROTECTED] wrote: 
 
 On Thursday 16 September 2004 06:14, Sam Hobbs wrote:
 
 [quote from another Sam Hobbs post]
  I am the original poster. The reason I avoid doing things like that is
  because it is a guess. It should not be necessary; the firewal should not
  be relevant. Sometimes people suggest things that are not likely to be a
  solution but are easy to suggest.
 [end quote]
 
  Apparently there is a problem with the internet being accessed. I tried to
  determine the problem but it is not clear. What I did to try to diagnose
  the problem is that I deleted from ZoneAlarm the configuration for the
  relevant programs. For those not familiar with ZoneAlarm, I essentially
  removed from it anything it knew about Apache, MySQL and php. I thne tried
  the
  mysql_connect, and ZoneAlarm asked if Apache could access the internet.
  However it behaved differently, depending on whether I was using an account
  with administrator privileges. If I was using administrator privileges,
  Apache tried to connect to address 0.0.0.0. If I was not using
  administrator privileges, Apache tried to connect to the DNS server
  address. However there are more details so assuming this is a bug I need to
  coordinate with someone to determine how to diagnose this.
 
  By removing Apache, MySQL and php from ZoneAlarm and then allowing Apache
  to access the internet when I did the mysql_connect, I am able to connect.
  I assume that this is not how it should be.
 
 So now are you fully convinced it's your firewall that's the root of your 
 problem?
 
 1) How are you connecting using mysql_connect()? Do you use IP addresses or 
 hostnames?
 2) What are your exact connection parameters when connecting as an admin 
 user?
 3) What are your exact connection parameters when connecting as an normal 
 user?
 
 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Moneyliness is next to Godliness.
   -- Andries van Dam
 */
 
 -- 
 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] checking multiple URL parameters

2004-09-15 Thread Jason Davidson
same way, if i understand your questoin... 
if your url looks like this

sometestpage.php?mov=somethingyear=1999
 - the queries are seperated by the '' char..

then 

$_REQUEST will have both mov and year elements in it
so just as $_REQUEST['mov'] worked, so would $_REQUEST['year']

Jason


Dustin Krysak [EMAIL PROTECTED] wrote: 
 
 Hi there, I am currently using the following code to display content 
 based on the URL parameters
 
  ?php
   if (isset($_REQUEST['mov'])) {
   $movie = ($_REQUEST['mov'])
   ?
 HTML CONTENT
  ?php
}
 
else {
?
OTHER HTML CONTENT
  ?php
 }
 
 ?
 
 now what I need to do is modify the code so that the script checks 2 
 URL parameters, and has 2 variables defined (from the URL parameter)...
 
 So I need to also check if $_REQUEST['year'] is set as well as the 
 original (both need to be set to get the first HTML content) AND I also 
 need to set the variable of $year = ($_REQUEST['year']
 
 direction?
 
 d
 
 -- 
 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] How I can create....

2004-09-15 Thread Jason Davidson
the reason it doesnt work, is becuase you have muddied the requests for
the client and the server.  PHP is completely server side, so putting a
php function name in onclick, which will execute client side code doesnt
work.  

the solution would be to have you button reload the page, or submit to
another page, that has your function call on it.  make sense?

Jason

Yusdaniel Rodriguez Espinosa [EMAIL PROTECTED] wrote: 
 
 Hello to everyone.
 
 I want to clean a field from my Data Base in MySQL from a button. But I don't
 know how i can create a button in PHP, the funtion of button is TRUNCATE
 TABLE(Table).
 
 I have a form in HTML but hi don't work because when I press the button he don't
 do anything, but when i press the button submit he work I don't know way!!!
 
 Here are the Form HTML Code:
 
 FORM Name=Form1 METHOD=post 
 Nick : INPUT TYPE=text NAME=nick SIZE=20 MAXLENGTH=20
 BR
 Email: INPUT TYPE=text NAME=email SIZE=28 MAXLENGTH=100
 BR
 Password: INPUT TYPE=password NAME=password SIZE=28 MAXLENGTH=20
 BR
 Nombre: INPUT TYPE=text NAME=nombre SIZE=28 MAXLENGTH=255
 BR
 INPUT TYPE=submit CLASS=boton VALUE=Registrar
 INPUT TYPE=reset name=Submit value=Restablecer
 INPUT TYPE=button name=CleanBD value=Limpiar BD
 onClick=?Limpiar()? 
 /FORM
 
 and here are the code in PHP:
 
 function Limpiar() {
 $servidor = localhost ;
 $usuario = usuario ;
 $contrasena = password ;
 $basededatos = bd ;
 $conectar = mysql_connect($servidor, $usuario, $contrasena);
 mysql_select_db($basededatos,$conectar) ; 
 $Limpiar = Truncate table bd;
 mysql_query($Limpiar);
 }
 
 how I cant create a button in PHP that he make the same function
 
 
 thanks
 
 Yusdaniel

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



Re: [PHP] Strip Everything But Letters and Numbers?

2004-09-15 Thread Jason Davidson
i think with perl regs.. as preg_replace is, you can just use a shortcut
command.. 
\w is any word char,
\d is any digit.. 
im not sure it will improve this solution any, but its something else :P

Jason

Marek Kilimajer [EMAIL PROTECTED] wrote: 
 
 Jeff Oien wrote:
  Is there an easy way to strip out everything but letters and numbers 
  from a string? I tried searching the archives and didn't come up with 
  much. Thanks.
  Jeff
  
 
 $string = preg_replace('/[^a-z0-9]/i', '', $string);
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
Windows XP Firewall, or any other firewall for that matter must be off.
Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 I have:
 PHP Version 5.0.1
 MySQL 5.0.1
 Apache 2.0.48
 Winows XP Pro SP2
 
 MySQL is working fine as best as I can see; I have tried the various samples 
 in the MySQL manual and I have executed the myTest sample provided with 
 MySQL. They all work.
 
 However I can't get mysql_connect to work; when I try:
 
 $conn = mysql_connect(localhost, root);
 
 I get:
 
 Warning: mysql_connect() [function.mysql-connect.chm]: Can't connect to 
 MySQL server on 'localhost' (10061)
 
 The host and user should be correct; I have not changed anything such as 
 that after installation. The password should still be blank. However I have 
 tried many, many other combinations but nothing that works.
 
 Is 10061 an error code? I can't find it in the PHP documentation.
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
Also, a google on the error returns hundreds of results..
http://www.google.ca/search?hl=enie=UTF-8q=Can%27t+connect+to+++MySQL+server+on+%27localhost%27+%2810061%29btnG=Searchmeta=

Jason

Jason Davidson [EMAIL PROTECTED] wrote: 
 
 Windows XP Firewall, or any other firewall for that matter must be off.
 Jason
 
 Sam Hobbs [EMAIL PROTECTED] wrote: 
  
  I have:
  PHP Version 5.0.1
  MySQL 5.0.1
  Apache 2.0.48
  Winows XP Pro SP2
  
  MySQL is working fine as best as I can see; I have tried the various samples 
  in the MySQL manual and I have executed the myTest sample provided with 
  MySQL. They all work.
  
  However I can't get mysql_connect to work; when I try:
  
  $conn = mysql_connect(localhost, root);
  
  I get:
  
  Warning: mysql_connect() [function.mysql-connect.chm]: Can't connect to 
  MySQL server on 'localhost' (10061)
  
  The host and user should be correct; I have not changed anything such as 
  that after installation. The password should still be blank. However I have 
  tried many, many other combinations but nothing that works.
  
  Is 10061 an error code? I can't find it in the PHP documentation.
  
  -- 
  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
 
 

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



Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
The webpage of coarse, is not local, regardless of where its hosted, so
a firewall will come into play when trying to connect.  
You dont have disable it, i should have been specifc i suppose, you must
allow for the mysql port to be open. :)
Whats for others to confirm, try it yourself and see if it works.

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  Windows XP Firewall, or any other firewall for that matter must be off.
  Jason
 
 Can someone else confirm that this is correct?
 
 For one thing, when I use MySQL directly outside of a web page, it works. 
 The sample C program works.
 
 For another thing, I doubt very immensely that everyone using mysql_connect 
 does not use a firewall. Even if anyone else does, I will not. It would have 
 been quite unreasonable for the developers of PHP to develop software with 
 that requirement, but I doubt it was.
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
Possible i should have checked your configurations, however, to itterate
my point slightly, here is some documentation, you may find it usefull
regardless of how you connect to your db.


http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html

Jason


Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  Also, a google on the error returns hundreds of results..
 
 http://www.google.ca/search?hl=enie=UTF-8q=Can%27t+connect+to+++MySQL+server+on+%27localhost%27+%2810061%29btnG=Searchmeta=
 
 
 One thing I did find in the results is that at least one person had problems 
 using (I think) phpMyAdmin. It supposedly uses mysql_connect. I am not aware 
 of installing phpMyAdmin in my system, so I will try installing and using 
 it. 
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
ok, well, i just posted a link for you to check out, it gives insight on
how mysql connects on different platforms, this will of use to you i
think, the last few bullets in the page i linked to are of some
importance to your error msg which says, cant connect to localhost, and
not, cant connect through socket...

again, link,,
http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 The firewall I am using is ZoneAlarm, the free version. I am nearly certain 
 that it does not allow specific ports to be opened, at least not for 
 specific addresses. So if this were a requirement, probably many others 
 would have that specific problem.
 
 However if nothing else works, I will try to look into this further when I 
 have time. At the moment I must spend time on something else.
 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  The webpage of coarse, is not local, regardless of where its hosted, so
  a firewall will come into play when trying to connect.
  You dont have disable it, i should have been specifc i suppose, you must
  allow for the mysql port to be open. :)
  Whats for others to confirm, try it yourself and see if it works.
 
  Jason
 
  Sam Hobbs [EMAIL PROTECTED] wrote:
 
  Jason Davidson [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Windows XP Firewall, or any other firewall for that matter must be off.
   Jason
 
  Can someone else confirm that this is correct?
 
  For one thing, when I use MySQL directly outside of a web page, it works.
  The sample C program works.
 
  For another thing, I doubt very immensely that everyone using 
  mysql_connect
  does not use a firewall. Even if anyone else does, I will not. It would 
  have
  been quite unreasonable for the developers of PHP to develop software 
  with
  that requirement, but I doubt it was.
 
  -- 
  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
 
 

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



Re: [PHP] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
Hey, i understand that, :)  however, a firewall may restrict _any_
access to a port, and if you are connected thru TCP/IP, then that port
may be restricted even if 'local'.  It is still a client server
relationship regardless where client and server reside.  

Of coarse, this may not be the issue he is having, but it is an issue i
have dealt with before, as retarded as you all seem to think it is.  

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 Jason Davidson wrote:
  The webpage of coarse, is not local, regardless of where its hosted, so
  a firewall will come into play when trying to connect.  
  You dont have disable it, i should have been specifc i suppose, you must
  allow for the mysql port to be open. :)
  Whats for others to confirm, try it yourself and see if it works.
  
  Jason
 
 You understanding of how this works is a bit off Jason.  If you make a 
 call to one of my web sites from your machine via a browser, the _only_ 
 port I need to have open to the outside is 80 (or whatever port I have 
 my web server running on), even if I make 1000 calls to a local db, but 
 this has nothing to do with how the web server talks to MySQL.  What is 
 meant by local here, is that the MySQL db and web server are on the same 
 machine. A firewall comes into play when your web browser requests a 
 page from my web server, but does not come into play when that page has 
 to connect to a local db before sending content to you.  Your remote 
 machine never talks to my local MySQL db.
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
And for more testimonies, sinse i fear im getting absolutely no credit
for having any knowledge of mysql and php.. :P  (i say that in jest of
coarse)
search this in google and see how many people fixed the very problem by
disabling or adjusting the firewall.

http://www.google.ca/search?hl=enie=UTF-8q=mysql+firewall+localhostbtnG=Searchmeta=

Cheers, and good luck

Jason

Jason Davidson [EMAIL PROTECTED] wrote: 
 
 ok, well, i just posted a link for you to check out, it gives insight on
 how mysql connects on different platforms, this will of use to you i
 think, the last few bullets in the page i linked to are of some
 importance to your error msg which says, cant connect to localhost, and
 not, cant connect through socket...
 
 again, link,,
 http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html
 
 Jason
 
 Sam Hobbs [EMAIL PROTECTED] wrote: 
  
  The firewall I am using is ZoneAlarm, the free version. I am nearly certain 
  that it does not allow specific ports to be opened, at least not for 
  specific addresses. So if this were a requirement, probably many others 
  would have that specific problem.
  
  However if nothing else works, I will try to look into this further when I 
  have time. At the moment I must spend time on something else.
  
  
  Jason Davidson [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   The webpage of coarse, is not local, regardless of where its hosted, so
   a firewall will come into play when trying to connect.
   You dont have disable it, i should have been specifc i suppose, you must
   allow for the mysql port to be open. :)
   Whats for others to confirm, try it yourself and see if it works.
  
   Jason
  
   Sam Hobbs [EMAIL PROTECTED] wrote:
  
   Jason Davidson [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Windows XP Firewall, or any other firewall for that matter must be off.
Jason
  
   Can someone else confirm that this is correct?
  
   For one thing, when I use MySQL directly outside of a web page, it works.
   The sample C program works.
  
   For another thing, I doubt very immensely that everyone using 
   mysql_connect
   does not use a firewall. Even if anyone else does, I will not. It would 
   have
   been quite unreasonable for the developers of PHP to develop software 
   with
   that requirement, but I doubt it was.
  
   -- 
   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
  
  
 
 -- 
 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] php/MYSQL remove duplicate records

2004-09-14 Thread Jason Davidson
you could select out all the DISTINCT email addresses, and delete the
table, and repopulate it with your selected rows add a constraint to
the table to make email column unique afterwards maybe.

Jason

Dustin Krysak [EMAIL PROTECTED] wrote: 
 
 Hi there - I have an extremely simple table that has a unique Id and an 
 email address. what I am looking for is an example of a PHP script 
 that will poll the MYSQL database and delete the duplicate records 
 leaving only 1 unique (email) record.
 
 can someone point me to the right place?
 
 thanks!
 
 d
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
There is an issue with sp2 and loopback, you can argue all you like, but
many have had this problem, and many have resolved it. Mysql will not
connect through udp, it will use tcp.  If you supply a hostname in your
connect function, it will use tcpip to connect over a port, if oyu dont
supply a hostname, or i beleive put a '.' in its place, it will attempt
to connect through a named pipe which doesnt use the network.  In the
time you spend writing this email, you could have attemped a suggested
solution.  

A little more acceptance to help would gain a lot more respect from me,
not that you probably care about others respect.

And for further note, for the sake of discussion, as you have mentioned
to me on a certain forum.  A firewall can absolutely interfere with a
connection to mysql even if you are using localhost, if, and only if,
that connection is being done over tcpip, which in unix, is rarely, but
in windows, is not all that rare.  

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 John Nichel [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  Jason Davidson wrote:
  The webpage of coarse, is not local, regardless of where its hosted, so
  a firewall will come into play when trying to connect.  You dont have 
  disable it, i should have been specifc i suppose, you must
  allow for the mysql port to be open. :)
  Whats for others to confirm, try it yourself and see if it works.
 
  Jason
 
  You understanding of how this works is a bit off Jason.  If you make a 
  call to one of my web sites from your machine via a browser, the _only_ 
  port I need to have open to the outside is 80 (or whatever port I have my 
  web server running on), even if I make 1000 calls to a local db, but this 
  has nothing to do with how the web server talks to MySQL.  What is meant 
  by local here, is that the MySQL db and web server are on the same 
  machine. A firewall comes into play when your web browser requests a page 
  from my web server, but does not come into play when that page has to 
  connect to a local db before sending content to you.  Your remote machine 
  never talks to my local MySQL db.
 
 
 Thank you. As I said previously, I did think that the firewall would not be 
 relevant.
 
 I don't know a lot about the TCP/IP stuff but I do know enough to write a 
 couple of simple programs. They are actually UDP programs. An example is my 
 UDP Send and Receive Using CAsyncSocket at:
 
 http://simplesamples.info/MFC/UDPSendReceive.php
 
 Using it, I can send and receive UDP packets within my system using 
 127.0.0.1 without any problem from my firewall.
 
 -- 
 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] mysql_connect does not connect

2004-09-14 Thread Jason Davidson
ok, your the boss on this, i give up :)  what does experience provide
anyways.. 
the important thing is, i can connect to my mysql database :)

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 And the relevant portion of that says external access, which is not 
 applicable here. I do not see anything else on that page that is relevant.
 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  ok, well, i just posted a link for you to check out, it gives insight on
  how mysql connects on different platforms, this will of use to you i
  think, the last few bullets in the page i linked to are of some
  importance to your error msg which says, cant connect to localhost, and
  not, cant connect through socket...
 
  again, link,,
  http://dev.mysql.com/doc/mysql/en/Can_not_connect_to_server.html
 
 -- 
 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] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Jason Davidson
There is nothing wrong with what your doing, i use this sort of thing
for all the big sites i make, i use a page class and use methods to
create the header and footer, so your concept is good.  I would
investigate your html_head() function, to make sure its actually
returning something.  Sinse your 'print'ing it, it must return some
text.
example
function html_head() {
 $html = html;

  return $html;
}

i prefer to escape from php inside my header fucntion, and just not
print it.. 
eg. 
function header() {
?
html
head
   title
?
}

then i call it with $page-header();

hope that helps?

Jason

Nick Wilson [EMAIL PROTECTED] wrote: 
 
 Hi all, 
 
 Say i have a php script like this:
 
 ?php
   print(html_head());
   // do loads of time taking stuff
   print(html_footer());
 ?
 
 How come I dont see the html header (it's just a function that returns a
 string with the html up till body) before the entire script has run?
 
 This goes against my understanding, why might this be and what might i
 use to get some output before the script has finished executing?
 
 Much thanks...
 -- 
 Nick W
 
 -- 
 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] Outputting HTML with PHP - Buffer Problem?

2004-09-12 Thread Jason Davidson
yup, you took the words from my mouth...

[EMAIL PROTECTED] wrote: 
 
 dirk wrote:
 
 The first function you need to call using ? echo header(); ? to see the
 output
 THe second function is not a real function because it has no return
 statement. In german you call this Prozedur. Don't know if it's the
 same as procedure in english. But you will call this piece ?
 header(); ? to see some output.
   
 
 The english word you are looking for is procedure. It is true that in 
 some programming languages 'functions that do not return values' are 
 called procedure but I don't think that practice is wide spread among 
 PHP programmers.
 
 -- 
 Raditha Dissanayake.
 
 http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
 Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
 Graphical User Inteface. Just 128 KB | with progress bar.
 
 -- 
 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] CSS not picked up

2004-09-11 Thread Jason Davidson
Possibly you dont have those fonts to see them?

Jason

Jeff Swanberg [EMAIL PROTECTED] wrote: 
 
 I have the following in my CSS (loaded on the main site page):
 
 /* FOOTER */
 
 .footer {
 font-family: Tahoma, Trebuchet MS;
 font-size: 9px;
 color: #BFBFBF;
 text-decoration: none;
 border: none;
 line-height: 1.25em;
 font-weight: bold;
 }
 
 .footer a:link {
 font-family: Tahoma, Arial, Trebuchet MS;
 font-size: 9px;
 color: #BFBFBF;
 text-decoration: none;
 border: none;
 line-height: 1.25em;
 font-weight: bold;
 }
 
 .footer a:visited {
 font-family: Tahoma, Arial, Trebuchet MS;
 font-size: 9px;
 color: #BFBFBF;
 text-decoration: none;
 border: none;
 line-height: 1.25em;
 font-weight: bold;
 }
 
 .footer a:hover {
 font-family: Tahoma, Arial, Trebuchet MS;
 font-size: 9px;
 color: #BFBFBF;
 text-decoration: none;
 border: none;
 line-height: 1.25em;
 font-weight: bold;
 }
 
 and the following in my PHP script
 
 div class=footer style=position:absolute; top:680px; left:60px; 
 width:500; height:2; vertical-align:bottom; z-index:1;
 © 2004 Keatley Photography - a 
 href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a - 206 240-5543
 /div/td/tr
 
 
 But, when I change the style.css file and upload it and then refresh the 
 browser, any changes to the font, style, etc to the footer class are not 
 picked up.  What should I look for??
 
 Jeff 
 
 -- 
 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] Remove punctuation

2004-09-09 Thread Jason Davidson
http://ca3.php.net/manual/en/function.str-replace.php

if you have the array of puncuation already, i think that is your
solution.

Jason

Jed R. Brubaker [EMAIL PROTECTED] wrote: 
 
 Hi all!
 
 I am creating a function that will remove punctuation from a string, 
 however, I am wondering if PHP has a function somewhere that will do the 
 same.
 
 Right now my approach is to cycle through an array of punctuation and remove 
 the items.
 
 Anything already exist?
 
 Thanks! 
 
 -- 
 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] Remove punctuation

2004-09-09 Thread Jason Davidson
i think str_replace is faster that ereg_replace

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 Jed R. Brubaker wrote:
  Hi all!
  
  I am creating a function that will remove punctuation from a string, 
  however, I am wondering if PHP has a function somewhere that will do the 
  same.
  
  Right now my approach is to cycle through an array of punctuation and remove 
  the items.
  
  Anything already exist?
  
  Thanks! 
  
 
 You don't have to cycle through an array...
 
 preg_replace ( /[\.,\;'\:]/, , $string )
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] Remove punctuation

2004-09-09 Thread Jason Davidson
ya, no doubt, i was going to repost my message, i should have said, that
manual suggests using str_replace over ereg_replace... without reason..
i just assumed it was speed and resources.. 

eitherway, both would work, try em both. :)
Jason


John Nichel [EMAIL PROTECTED] wrote: 
 
 Jason Davidson wrote:
  i think str_replace is faster that ereg_replace
  
  Jason
 
 We tested that theory a while back on here (I don't remember the subject 
 of the emails, so finding it would be kind of hard), and it came out to 
 be almost exactally the same speed.
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] Assigning one var to multiple vars

2004-09-09 Thread Jason Davidson
$var2 = $var3 = $var5 = all the same;

Jason

Matthew Sims [EMAIL PROTECTED] wrote: 
 
 
 Just mostly curious but is there a way to assign one variable to multiple
 variables in one single line?
 
 Rather than do this:
 
 $var2 = $var1;
 $var3 = $var1;
 
 Is there a method to perform a:
 
 ($var2,$var3) = $var1;
 
 -- 
 --Matthew Sims
 --http://killermookie.org
 
 -- 
 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] class packages

2004-09-08 Thread Jason Davidson
Out of curiosity, how would you prefer it?

the way you mentioend is basically how i do though.

Jason

Jed R. Brubaker [EMAIL PROTECTED] wrote: 
 
 As far as I can tell there is not an easy way yet to create packages in 
 PHP5.
 
 It seems the following is the best option:
 include('classes/help/Search.inc');
 
 // Inside Search.inc and in the same package
 include('OtherClass.inc');
 include('AnotherClass.inc');
 
 Is there a better way?
 
 Thanks! 
 
 -- 
 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] converting seconds since unix epoc to date array

2004-09-06 Thread Jason Davidson
How is the date stored, MySQL db??? if so, you can select dates out as
unix timestamps.  Otherwise i would use mktime or strtotime... 

Jason

Jason FB [EMAIL PROTECTED] wrote: 
 
 Can anyone tell me how to convert a date stored in the format 
 -MM-DD to an integer of seconds since unix epoc,
 
 then add $daysToAdd days to this value (I suppose if the integer was 
 a number of seconds it would have to be $daysToAdd*60*60*24 to get 
 the number of seconds to add)
 
 then convert the new value to a timestamp which I can output using the function
 
 string date ( string format [, int timestamp])
 
 I tried doing this with mktime() and couple different ways using 
 strtotime() and also with strftime() but I kept getting -1 as the 
 result for strtotime() indicating the function couldn't interpret the 
 given date.
 
 I've been through all the date-related functions in the manual I can 
 think of, but I'm stumpped on this one...

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



Re: [PHP] converting seconds since unix epoc to date array

2004-09-06 Thread Jason Davidson
beware of dates before 1969.

Justin French [EMAIL PROTECTED] wrote: 
 
 Jason,
 
 This seems to work fine for me:
 
 ?
 $daysToAdd= 5;
 $secondsToAdd = $daysToAdd * 86400;
 $dateIn   = 2004-07-24;
 $dateInStamp  = strtotime($dateIn);
 echo date('m/d/Y h:i:s',$dateInStamp+$secondsToAdd);
 ?
 
 ... as does the more condensed version:
 
 ? echo date('m/d/Y h:i:s',strtotime(2004-07-24)+(5*86400)); ?
 
 If strtotime() is returning -1, that means that it's having trouble 
 converting your -MM-DD date to a timestamp.  The common pitfall is 
 that you've got the month and day mixed up (-DD-MM), or that you're 
 not using 2 digit numbers on the day and month (and 4 digit on the 
 year).
 
 If you're having trouble with strtotime(), ech out the date you're 
 trying to convert, to make sure it's what you're expecting.
 
 
 It's also worth pointing out that we've made no considerations for 
 timezones, daylight savings, etc.
 
 UNIX timestamps are all GMT, so if the times you're seeing are not as 
 expected (and the dates you're collecting aren't GMT dates, then you'll 
 need to dig a lot deeper -- it's depends how much accuracy you want.
 
 Justin French
 
 On 07/09/2004, at 1:59 PM, Jason FB wrote:
 
  Can anyone tell me how to convert a date stored in the format 
  -MM-DD to an integer of seconds since unix epoc,
 
  then add $daysToAdd days to this value (I suppose if the integer was a 
  number of seconds it would have to be $daysToAdd*60*60*24 to get the 
  number of seconds to add)
 
  then convert the new value to a timestamp which I can output using the 
  function
 
  string date ( string format [, int timestamp])
 
  I tried doing this with mktime() and couple different ways using 
  strtotime() and also with strftime() but I kept getting -1 as the 
  result for strtotime() indicating the function couldn't interpret the 
  given date.
 
  I've been through all the date-related functions in the manual I can 
  think of, but I'm stumpped on this one...
 
 ---
 Justin French
 http://indent.com.au
 
 -- 
 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] Clean variables sent from forms

2004-09-04 Thread Jason Davidson
Make some field unique, so it wont work thats an easy solution,
there other ways..
Jason

Dre [EMAIL PROTECTED] wrote: 
 
 Hi,
 
 I'm trying to perform a database insertion for a new record from data I
 receive from a HTML form
 
 I send the data to the file containing the insertion script and insert the
 values using the $_POST['variable_name']
 
 every thing works fine, and the record get inserted correctly
 
 the problem is when I refresh this page (the one containing the database
 insertion script) a new record with the same data is inserted in the same
 table
 (I'm using an auto increamented id for this table) ..
 
 I was wondering if there is a way that I can delete all values sent from the
 form after the first insertion successeded
 Thanks in advance
 
 -- 
 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] Sessions Problems

2004-09-03 Thread Jason Davidson
Read up on 'named sessions'

I think that may be your solution

jason

Mark [EMAIL PROTECTED] wrote: 
 
 
 --- Octavio Herrera [EMAIL PROTECTED] wrote:
 
  No, I do not store two items with the same key, I just open another
  session
  in other page and it just overwrite session data of a previous
  session
 
 This is because (I believe) you can't open two cookie-based sessions
 with two browser windows and expect to have two separate sessions.
 
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 =
 Mark Weinstock
 [EMAIL PROTECTED]
 ***
 You can't demand something as a right unless you are willing to fight to death
 to defend everyone else's right to the same thing.
 ***
 
 
   
 ___
 Do you Yahoo!?
 Win 1 of 4,000 free domain names from Yahoo! Enter now.
 http://promotions.yahoo.com/goldrush
 
 -- 
 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] PHP Linux locate to html script?

2004-09-03 Thread Jason Davidson
I assume you mean locating something on the server, as this would be a
serious breech of security otherwise.  anyways, bickticks will run
shell comand line programs and return the output..
ie

print `locate myFile'`;

jason

BOOT [EMAIL PROTECTED] wrote: 
 
 Does anyone have a script that can be used to call linux's locate command
 and display the results in a browser?
 
 I don't think it would be that hard and will make an effort today...
 
 
 Thanks!
 
 -- 
 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] php does not get variable values in POST method

2004-09-02 Thread Jason Davidson
Its possible you had register globals turned on for your server, and its
not turned on now.  How do you retrieve these vars, try retrieving them
with $_REQUEST['myVarName'] or $_POST['myVarName']

Jason

Leticia Campos [EMAIL PROTECTED] wrote: 
 
 I developed an html/php form  in a Php version 4.0.6, working fine, but when
 a moved the files to another web server with Php 4.3.2 the file
 procesaadmision.php called in the Post method does not get any of the input
 html variables defined in the calling form.
 form ACTION=procesaadmision.php METHOD=POST 
 
 Thanks for any help
 
 Leticia Campos
 IT Programming
 
 -- 
 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] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
its possible to add HTML elements with DOM, im not sure what it has to
do with php though?

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Is it possible to use the DOM to add (HTML) elements to a page at the time
 the page is being shown? The HTML and VBScript shown below is a simplified
 version of what I need to do but of course I need to do it in PHP. Since PHP
 is server-side (right?) perhaps it is not possible.
 
 
 HTML
 HEAD
 TitleDynamic Table Demo/Title
 /HEAD
 
 Script Language=VBScript
 Sub Window_Onload
 Set NewRow = document.createElement(TR)
 Set NewCell = document.createElement(TD)
 NewCell.innerText = Cell Text
 NewRow.appendChild NewCell
 TableBody.appendChild NewRow
 End Sub
 /Script
 
 Body
 h1Dynamic Table Demo/h1
 
 Table Id=NewTable Cols=1 border=1 Width=50%
 TBody Id=TableBody
 /TBody
 /Table
 
 /Body
 /HTML
 
 -- 
 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] Dynamic HTML Creation

2004-08-28 Thread Jason Davidson
I suppose it was too much to ask for some clearification.  I hope
someone else helps you.  Good luck, by they way, the difference between
VBScript and Javascript is monumental when using Gecko based browsers.

Jason

Sam Hobbs [EMAIL PROTECTED] wrote: 
 
 Read the original question again; it is quite clear about the relevance to
 PHP.
 
 
 Jason Davidson [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  its possible to add HTML elements with DOM, im not sure what it has to
  do with php though?
 
 -- 
 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] Re: Newbie. Posting to backend MySQL database

2004-08-28 Thread Jason Davidson
If you just need to put it in the database, you dont need a form to do
that.. 
just open a connection to your db, and query it in. 

read about mysql functions in the php manual.. specifically
mysql_connect, mysql_select_db and mysql_query
, i beleive there is a functional example of all you need on the
introduction page for the mysql functions in the manual.

Jason


M. Sokolewicz [EMAIL PROTECTED] wrote: 
 
 Aidan wrote:
  Please help, I'm tearing what remains of my hair out here.
  I've got a MySQL database where I've defined one of the table fields as an
  integer.
  Using PSP I've passed a session variable and can echo it to the screen using
  ?php echo intval($clin_id) ?.  So the session variable exists and can be
  echoed
  I now want to pass this session variable to the database into the field I've
  defined as an integer
  
  I've set up a form to submit other variables to the backend database and
  they all work apart from this field.
  
  I'm using a hidden field to pass the variable and I am using
  
  input name=p_clin_id type=hidden id=p_clin_id
  value=intval('$clin_id')
 that line doesn't make any sense to me... what are you doing there? 
 you're freely mixing PHP and HTML without denoting what is what.
 an example that WOULD work would be:
 echo 'input name=p_clin_id type=hidden id=p_clin_id 
 value='.intval($clin_id).'';
 
 or maybe
 ?
 input name=p_clin_id type=hidden id=p_clin_id
   value=?php echo intval($clin_id);?
 ?php
 
 So, mixing HTML and PHP without denoting what is what is the first 
 mistake. The second one is the actual function call:
 intval('$clin_id');
 
 Now, when you put something between SINGLE quotes, it is read LITERALLY, 
 meaning it *will not* substitute variables for their value. eg:
 echo '$clin_id';
 
 will output:
 $clin_id
 
 However,
 echo $clin_id;
 will output the VALUE of $clin_id (eg. 12)
 
 So, I think that instead of
 intval('$clin_id') you actually meant intval($clin_id), or, cleaner, 
 intval($clin_id) (since intval isn't expecting a string anyway, and even 
 if it were, it would change it to one itself. No need to do extra work 
 for nothing.)
 
 The 3rd point about this all... if you get the value from the database, 
 and it's an integer there, then why are you converting it to an integer 
 AGAIN?? :| just using $clin_id instead of intval($clin_id) is surely 
 faster (seen as no extra functions need to be called).
 
  
  What I don't understand is that if I can echo the variable what am I missing
  in formatting a sessio variable to make it passable to the database.  It mus
  be something basic and I've looked through several books (from where I got
  the intval function) but obviously in the wrong place.
  
  I would be grateful for any advice.
 
 -- 
 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] oop too slow

2004-08-19 Thread Jason Davidson
When i have many many objects of the same type to build, i do something
like this...

function getEvents($sql = '') {
$events = $this-dbh-query(
SELECT cols, cols, FROM table,table 
WHERE blah blah balh ($sql ?  AND $sql : ''),'rows_array');  
 

$rv = array();  
foreach($events as $event) {
$rv[] = new CalendarEvent($event);
}

return $rv;
}

my event class takes an array of data and uses phps list function to
load its members.  In this case, i save 100s and 100s of queries ,
using just 1.  Its a massive improvment if it fits your scheme.  To get
one event, i create a method called getEvent($id) that is a wrapper to
getEvents, and only uses the first record.. of coarse, there is only
one record.. but ya.. cheers

Jason

Marcus Bointon [EMAIL PROTECTED] wrote: 
 
 on 19/8/04 9:49, Krzysztof Gorzelak at [EMAIL PROTECTED] wrote:
 
  Hi
  I'm trying my new php5 script, but it takes about 1.2s to generate my page.
  That is, how my oop model looks like :
  
  [category]
|||
  [photo]  [desc]   [products]
  
  
  [products]
  |
  [product]
  |||
  [photo] [desc] [keys]
  
  
  [keys]
  |
  [key]
  |
  [values]
  |
  [value]
  
Each object gets data from mysql by itself. The generation time of 1
  category [30 products, 10 keys, 5 values ~= 300 mysql queries] takes as I
  said more than a 1s (on quite fast machine). How can this model be improved?
  Do I create too many objects ? What are the oop solutions for such problem ?
 
 This is something that I've wrestled with too. If you make each item you
 deal with a clean, self-sufficient object, with self-storage, data hiding
 etc, it is inevitable that you run into this problem. It is a symptom of a
 fundamental clash between Relational DB and OO points of view. The only
 trick I have found to work around it that is OO-clean is to use factory
 methods or objects that create multiple objects from a single DB query, so
 as well as having a 'get' method that populates an object from a DB, make
 another means of creating an object from local data that has been obtained
 from a larger query that returned sufficient values to populate multiple
 items.
 
  I also use an extra table to create many-to-many relation betwean a product
  and a key. Is this the only way in mysql ?
  
  [product]
  |
  [product_id, key_id]
|
[key]
 
 Yes, that's the correct way to represent a M:M relation in a relational DB.
 The join table is an artefact of a relational model, rather than an OO one,
 so the answer is to hide the existence of this table within the objects at
 either end - so have product and key objects, but not product_key objects.
 Each object should have a method that retrieves instances of all the related
 objects of the other kind. This is really a different manifestation of the
 first problem.
 
 Ultimately the trick is to create separate factory objects or higher-level
 methods inside the existing objects that can create multiple instances from
 a single database query. Having said that, it's difficult to spot the best
 places to do this. For example, you might normally create multiple product
 objects from an array of database IDs like so:
 
 foreach($productids as $id)
 $products[] = new product($id);
 
 You can see that this would cause a query for each instantiation.
 
 With a product factory class, you might do this instead:
 
 $products = product_factory::get($productids);
 
 Which achieves the same result, but using only a single DB query (hidden
 inside the factory class, which does NOT call the product class in the same
 way!). The next problem is keeping your product_factory and product classes
 in sync - I'm sure there must be a nice pattern to deal with that somewhere.
 
 Marcus
 -- 
 Marcus Bointon
 Synchromedia Limited: Putting you in the picture
 [EMAIL PROTECTED] | http://www.synchromedia.co.uk
 
 -- 
 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] PHP HTML text editor issues...

2004-08-18 Thread Jason Davidson
Do you have magic quotes turned on in your php ini file?

Jason

Tim Traver [EMAIL PROTECTED] wrote: 
 
 Hi all,
 
 ok, I've made my own version of a file manager complete with a text editor, 
 and I'm having troubles figuring out some issues.
 
 I present the text to be edited retrieved from a file in a textarea box for 
 a user to edit, and then POST that to my PHP application, which then saves 
 it to disk.
 
 I have found it to break when the text file has intentional backslashes in 
 it. For instance, if you are editing a perl script, there are a lot of 
 times where you need lots of backslashes in a row.
 
 Does the POST data get urlencoded as it is coming in to the program, and 
 then PHP unencodes it to put it in the variable ? It seems that there is 
 some kind of translation.
 
 I've tried to use addslashes and stripslashes to prevent some of the 
 clobbering of the text, but it doesn't seem to be working. If I don't do 
 anything, it looks like PHP (or HTML) backslashes all quotes...
 
 I just want to get the EXACT text that is in the textarea to be saved to 
 disk...
 
 Here is an example of a line that gets clobbered :
 
   $value =~ tr/\0//d;
 
 I read the file in from disk using file_get_contents. Does that do any 
 translation ???
 
 Any help would be appreciated,
 
 Tim.
 
 
 
 
 
 SimpleNet's Back !
 http://www.simplenet.com
 

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



Re: [PHP] Techniques for doing story

2004-08-17 Thread Jason Davidson
THats kinda cool.  you see that there is also a page=2 query if you
click to a different page, so i would assume, they store the html in a
database for each page of a story. and then give a story_id to those
records.  so in the table, if there is 4 pages for story 12, then there
are 4 records all with story_id 12.  The path to the images is up to
you, i see that site oyu mentioned creates a directory structure using
the contributor, and date, then the directory images.. of coarse you
would need to know the dir path to your uploaded images 

Jason

rogue [EMAIL PROTECTED] wrote: 
 
 Hi all,
 
 I want to do something like this:
 
 http://www.cgnetworks.com/story_custom.php?story_id=2259
 
 Where we can publish an article, multiple page even and lay it out in a 
 nice design with images etc. How do you think this is done? These 
 stories are dynamically generated it seems since the page is passed in 
 the URL. I am just not sure where to start...
 
 Thanks,
 Rogue
 
 -- 
 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] Techniques for doing story

2004-08-17 Thread Jason Davidson
Friendly crew today. :)

Jason

John Nichel [EMAIL PROTECTED] wrote: 
 
 rogue wrote:
  Hi all,
  
  I want to do something like this:
  
  http://www.cgnetworks.com/story_custom.php?story_id=2259
  
  Where we can publish an article, multiple page even and lay it out in a 
  nice design with images etc. How do you think this is done? These 
  stories are dynamically generated it seems since the page is passed in 
  the URL. I am just not sure where to start...
 
 First : http://vzone.virgin.net/sizzling.jalfrezi/iniframe.htm
 Second : http://us4.php.net/manual/en
 Third : http://dev.mysql.com/doc/mysql/en/index.html
 
 And before you come to a mailing list
 
 http://www.google.com
 http://groups.google.com
 http://marc.theaimsgroup.com
 http://www.catb.org/~esr/faqs/smart-questions.html
 RTFM
 STFW
 STFA
 
 -- 
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]
 
 -- 
 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] Techniques for doing story

2004-08-17 Thread Jason Davidson
hehe, funny crew too :)

Matthew Sims [EMAIL PROTECTED] wrote: 
 
  Yea, But then I took his advice and found this
  http://www.catb.org/~esr/faqs/smart-questions.html#keepcool so I was
  not so offended :)
 
  I had all the other links, but that one and did not think my question
  was that out there for the list... oh well.
 
 
  On Aug 17, 2004, at 12:31 PM, Jason Davidson wrote:
 
  Friendly crew today. :)
 
  Jason
 
  John Nichel [EMAIL PROTECTED] wrote:
 
  rogue wrote:
  Hi all,
 
  I want to do something like this:
 
  http://www.cgnetworks.com/story_custom.php?story_id=2259
 
  Where we can publish an article, multiple page even and lay it out
  in a
  nice design with images etc. How do you think this is done? These
  stories are dynamically generated it seems since the page is passed
  in
  the URL. I am just not sure where to start...
 
  First : http://vzone.virgin.net/sizzling.jalfrezi/iniframe.htm
  Second : http://us4.php.net/manual/en
  Third : http://dev.mysql.com/doc/mysql/en/index.html
 
  And before you come to a mailing list
 
  http://www.google.com
  http://groups.google.com
  http://marc.theaimsgroup.com
  http://www.catb.org/~esr/faqs/smart-questions.html
  RTFM
  STFW
  STFA
 
  --
  John C. Nichel
 
 OMG, John. You broke through to someone. This could be good sign. Now if
 we can just get him to stop top posting he'll be ready for anything. ;)
 
 -- 
 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



  1   2   >