[PHP] Re: Submit Form Values To Parent

2005-12-01 Thread DvDmanDT
Like you do it if the target was the same window? PHP doesn't know which 
window is the target..

-- 

// DvDmanDT
mail: dvdmandt¤telia.com
msn: dvdmandt¤hotmail.com
Shaun [EMAIL PROTECTED] skrev i meddelandet 
news:[EMAIL PROTECTED]
 Hi,

 How can I get the form values submitted from an iframe where the target is 
 the parent window? 

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



[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
It's a pretty big difference, so there's logic for that.. You can't really
compare them.. Not in my opinion anyway..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Jerry Miller [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 There's a FAQ section entitled PHP and Other Languages,
 C isn't even listed among them!

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



[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
You should use ord() on each of the $cont{} ones..

 printf (%02x %02x %02x %02x, ord($cont{0}), ord($cont{1}),
ord($cont{2}), ord($cont{3}));

That'll probably work much better..

..

PHP != C++, or C for that matter.. C was designed to be as close as possible
to ASM, but high-level.. PHP is designed to be an easy to use web
application language.. One char in PHP is a string with the length of 1, not
a small integer.. Meaning that 'a' != 67 in php.. In C they would be equal..
Strings will be converted to integers by php, but you won't get the ascii
code, you'll get something like the results of atoi() or something like
that..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Jerry Miller [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Here's the code (with the domain name removed)
 that doesn't work, despite the poor documentation
 of the variable types:

 ?
 $dir = /home/domain_name/www/binary/;
 $dh = opendir ($dir);
 do
 {
 $file = readdir ($dh);
 }
 while (!strncmp ($file, ., 1));
 $filename = sprintf (%s%s, $dir, $file);
 $fh = fopen ($filename, r);
 $cont = fread ($fh, 4);
 echo file:BR;
 echo $filename;
 echo BRcont:BR;
 printf (%02x %02x %02x %02x, $cont{0}, $cont{1}, $cont{2},
 $cont{3});
 fclose ($fh);
 closedir ($dh);
 ?

 Here's the output of od -c glance_date up to the fourth byte:

 000 177   E   L   F

 All four bytes are non-zero!

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



[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
PHP files can be named whatever you want.. Just know that they are parsed on
the serverside, not the client side.. Therefore, text/php would be pretty
stupid to do.. And I don't know what you mean be that script thing, you
probably don't even understand what PHP is when you make that statement..

There's no problem with PHP.. I've done lots of binary work with it without
problems.. And I do have some experience with C as well.. And with C++.. You
probably just don't understand the idea of PHP.. The idea is definitly not
to be another C or C++.. It's to be an easy, but powerful, webscripting
language.. And it is..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Jerry Miller [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Is there an example of the UNIX od utility written
 in PHP?  Is such a useful task even possible??
 From what I've seen of strings, they're completely
 opaque, so what good does it do to be able to read
 binary-safe strings from a file???  Even the deprecated
 (why) $str{$inx} notation apparently results in
 another string, because trying to printf it with the
 %02x format always comes out with 00.  (Maybe
 that's why -- it's useless!)  As an experienced C
 programmer, I'm finding PHP to be as counter-intuitive
 for low-level work as Perl is.  I need to convert binary
 dumps of data structures into database table rows, and
 MySQL on my server doesn't support queries from C.

 I thought about writing a CGI script (in C) that
 would generate the hard-coded PHP output for
 each instance, but a URL that ends in .cgi is
 never intercepted by the PHP interpreter.  Worse
 yet, the SCRIPT LANGUAGE= SRC=
 that works perfectly well with JavaScript is
 likewise ignored if the language is PHP!  Finally,
 I'm not aware of a Content-type such as text/php.
 What exactly was the purpose of designing yet
 another inflexible language?!

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



[PHP] Re: Is this a bug?!!! I cna't believe! Sorry, if im wrong...

2005-01-30 Thread DvDmanDT
Well, unless I'm misstaken, the '= new' should only be used once with every
class, so your code doesn't really make sense. The reason is that you are
trying to set the A to the new a, not $a to the new a.. Now, A couldn't get
changed I suppose, so therefore, $arr[1] will be a reference to $a, which is
still a reference to A.. Something like that.. I can only guess it'll work
as expected ((wsx)(wsx)) if you change =new to =new..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
News.Php.Net [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 ?

  class A
  {
   var $name;
   function A($str)
   {
$this-name = $str;
   }
  }

  $arr = array();

 //Put to array to objects of class A,
 // where their attribute A::a is assigned a different value
 //objects are assigned to an array by reference

 $a = new A(qaz);
  $arr[0] = $a;

  $a = new A(wsx);
  $arr[1] = $a;


 //But watch the output!!!
 // It is (qaz)(qaz), which means that the attribute of a first
 // object assigned to array is outputted!!! WHY?!?!!!
  foreach($arr as $a)
  {
   echo (.$a-name.);
  }
 ?

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



Re: [PHP] Re: Avoiding NOTICEs on Array References

2005-01-26 Thread DvDmanDT
I'm pretty sure you can rely on the fact that they are undefined if not
checked.. It's somewhere in the HTML or HTTP standard.. Also, the manual
page of empty() says it won't generate errors if the variable isn't set.. So
empty() is probably the best way to go then..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
[EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 On 26 Jan 2005 Jason Barnett wrote:

  if (isset($_POST['checkboxfieldname'])) {
 /** do stuff */
  }

 Sorry, I should have mentioned that I knew about using isset -- it
 works OK for the checkbox example, though I'm not clear if this
 behavior is specified and therefore will not change -- i.e. can one
 rely on the fact that the checkbox field name is missing entirely from
 _POST if the box is not checked?  Or are there cases where it could be
 present but with an empty or NULL value?

 If one must check the value and not just the existence of the checkbox
 entry, or for other uses, e.g. where a flag may or may not be present,
 one is saddled with clumsy constructs like:

 if (($isset($array['index'])  ($array['index'] == 1)) ...

 I would prefer that the second expression return FALSE, or that
 $array['index'] where the index is not present simply return NULL -- or
 probably better, an option to avoid E_NOTICE level errors for such
 cases.

 --
 Tom

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



[PHP] Re: Image Resolution

2005-01-26 Thread DvDmanDT
Take a quick look at imagecopyresampled.. It can change the size of an image
pretty good.. Now I know nothing about PDFs really.. But I suppose you could
just scale it with the GD functions then place the result in a PDF.. Maybe
the PDF functions can scale as well though.. Although, try both, because
chances are the PDF functions will resize instead of resample, and
resampling gives a MUCH nicer result in most cases..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Martin Magnusson [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi,

 I have written a script that takes an uploaded jpeg-image and places it in
a
 PDF-file with the PDFLib functions in php. The original image file is
 560x420, 72 dpi. Later on the PDF-file will be printed, and our printshop
 requires at least 200 dpi. The format of the printed image should be A6
 (15,2x10,9 cm).

 Is it possible to change resolution like this?

 Thanks // Martin M

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



Re: [PHP] Re: Image Resolution

2005-01-26 Thread DvDmanDT
Hmm.. If PDFs are always 72dpi.. Then the OP would in other words need to
resize the PDF document (and everything on it) to 200/72 times the normal
size, and then the printer would print it correct? Hmm.. Isn't that pretty
much exactly what Richard Lynch said? Seems like a kinda ugly solution to
me, but it might be the way to go.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Richard Lynch [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 DvDmanDT wrote:
  Take a quick look at imagecopyresampled.. It can change the size of an
  image
  pretty good.. Now I know nothing about PDFs really.. But I suppose you
  could
  just scale it with the GD functions then place the result in a PDF..
Maybe
  the PDF functions can scale as well though.. Although, try both, because
  chances are the PDF functions will resize instead of resample, and
  resampling gives a MUCH nicer result in most cases..

 In my experience, the libPDF just embeds the full picture in the document,
 and lets the printer/renderer worry about the dpi...

 So if you put a 300-dpi image in a PDF (72-dpi) scaled at 1.0 and print
 it, the image still comes out 300-dpi.

 If you scale the image to 2.0, you get a 150-dpi image (or whatever it
 works out to) to get that image in that much space.

 There may be ways to change this, or maybe I was mis-interpreting what I
 saw in my PDFs on my printer, but that's what it seemed like to me.

 -- 
 Like Music?
 http://l-i-e.com/artists.htm

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



[PHP] Re: Problem with foreatch()

2005-01-16 Thread DvDmanDT
Well, it's spelled foreach, not foreatch, that's why you get the error..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Ben Edwards [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]

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



[PHP] Re: Comman line vs. phpinfo()

2005-01-16 Thread DvDmanDT
My guess is that something went wrong when you upgraded your PHP
installation.. Maybe you didn't recompile Apache with the new PHP version or
something..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Joseph E. Maxwell [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Just upgraded to php 4.3.10
 phpinfo() apparently stuck on


   PHP Version 4.3.5


 System FreeBSD xxx.com 4.9-STABLE FreeBSD 4.9-STABLE #0: Wed Nov i386
 Build Date Apr 11 2004 20:01:52



 Command line  ==
php -v
PHP 4.3.10 (cli) (built: Jan 15 2005 12:54:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


 Is this a php or an Apache problem. I did do an Apache restart !

 Thanks


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



Re: [PHP] Any idea when 4.3.11 will be released?

2005-01-16 Thread DvDmanDT
They aren't talking about it on internals.. Not much on QA neither.. So..
Don't expect a release tomorrow.. :p CVS version might be the best option if
that bug is a problem..:p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Gal [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi Jeffery,

 Thanks for the info.

 I'm happy to read that the problem has been fixed. but i don't intend to
 use a CVS version on a production machine.

 This is the reason i asked for info on the official 4.3.11 release date.
 Do you have any idea when it is planned ?

 Thanks,
 Gal


 Jeffery Fernandez wrote:
  Gal wrote:
 
  Hello,
 
  I'm Working in organization which also using php on the Windows
platform.
  Because of the security holes in the older version and a COM bug at
  PHP 4.3.10 (http://bugs.php.net/bug.php?id=31159) we are using a
  problematic version.
 
  Does anyone here knows - what is the status of the release of 4.3.11 ?
 
  Regards,
  Gal
 
  *[23 Dec 2004 2:43am CET] [EMAIL PROTECTED]
 
  This bug has been fixed in CVS.
 
  Snapshots of the sources are packaged every three hours; this change
  will be in the next snapshot. You can grab the snapshot at
  http://snaps.php.net/.
 
  cheers,
  JefferyFernandez
  http://melbourne.ug.php.net

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



[PHP] Re: How do you handle device detection?

2004-04-12 Thread DvDmanDT
But afaik that function is broken, and PHP isn't allowed to use that
browscap.ini so.. Better make a list of user_agents that are devices..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Lukasz Karapuda [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Richard,

 You would do that by looking at the user_agent parameter that is being
send
 by the browser to the server. PHP automatically places the user_agent
 information in the superglobal: $_SERVER['HTTP_USER_AGENT']. The
user_agent
 string might seems cryptic, therefore PHP provides you a built-in function
 for representing the user agent information in an object with properties
 representing the features of the browser. The function is get_browser().
 Link to documentation of this function:

 http://www.php.net/manual/en/function.get-browser.php

 Good luck,

 Lukasz Karapuda




 Richard Davey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi all,
 
  This is just a general question to get some ideas from the wider
  world as it were.
 
  Say you've finished your site. It looks lovely and works perfectly.
  You have a CSS file for modern browsers and one that degrades for
  text-only devices also. You even have a special small width version
  for PDAs and the like.
 
  So how do you go about detecting just what is looking at your site?
  How would you handle detecting and then serving the same site for a
  standard browser, a screen-reader, a PDA device or a WAP/mobile
  device?
 
  Any tips/suggestions gratefully listened to.
 
  --
  Best regards,
   Richard Davey
   http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] PHP based Voice Chat Module

2004-04-07 Thread DvDmanDT
That's because he post to the newsgroup, Cc to the list, and the list system
automaticly sends one to you personally.. :p


-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Raditha Dissanayake [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Pushpinder, 1 message  is enough! (i recieved 6 messages from you 3
 copies each of two messages.)
 As as i said PHP is not the best option you will have to look at varius
 commercial voice chat systems. possibly on google.





 Pushpinder Singh wrote:

  Sorry I did not answer your question in my earlier reply, Thats
  right the user will use a headset and microphone to communicate.
 
  Thanks
  Pushpinder
 
 
 
  On Wednesday, April 7, 2004, at 12:06 PM, Raditha Dissanayake wrote:
 
 
  What kind of voice chat are you talking about? are you refering to
  one user saying something into the microphone that the other users
  hears? If so php is not the best way to do it.
 
 


 -- 
 Raditha Dissanayake.
 -
 http://www.radinks.com/print/upload.php
 SFTP, FTP and HTTP File Upload solutions

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



Re: [PHP] PHP based Voice Chat Module

2004-04-07 Thread DvDmanDT
Hmm.. I'm pretty sure you can get Flash for Mac..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Pushpinder Singh [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Thanks Raditha,

  Yes we are primarily looking at a PHP chat module which will allow
 us conduct an audio conference. I know there are Flash Voice Chat
 versions but they are all for Windoze... we are primarily a MAC
 environment and our hosting company uses LINUX.

 Please advise on the best course of action //  Thanks again

 --Pushpinder




 On Wednesday, April 7, 2004, at 12:06 PM, Raditha Dissanayake wrote:

  Pushpinder Singh wrote:
 
  Hello everyone,
 
   I was wondering if anyone has used any PHP/MySQL based voice chat
  system. (for MAC OS X Platform)
 
  What kind of voice chat are you talking about? are you refering to one
  user saying something into the microphone that the other users hears?
  If so php is not the best way to do it.
 
 
 
 
  -- 
  Raditha Dissanayake.
  -
  http://www.radinks.com/print/upload.php
  SFTP, FTP and HTTP File Upload solutions
  -- 
  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] Re: PHP Access Violation using PEAR::Mail_smtp

2004-04-06 Thread DvDmanDT
Well, the reason noone replies I guess, is that noone knows.. I think your
best bets are to echo the steps in the class, and find exactly what causes
it to crash.. Also, you don't need a mailserver on localhost to use mail()..
I use mail() with my ISP's SMTP server, and I'm on XP (same thing work on
windows Me)..

Post when you find a solution, draws my intrest..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Ben Ramsey [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I've asked about PHP Access Violation errors before (this very same
 error, as a matter of fact), and every time I ask, I get no response.
 It's been 24 hours, and no one on php-general, pear-general, or #php and
 #pear in Freenode IRC has responded to this particular post.

 Do I smell bad?

 Please forgive me for refreshing my own post to the list, but this is an
 important question, and it is time-sensitive.  Any help or pointers
 would be greatly appreciated, as I cannot get around this issue at all.

 Thanks,
 Ben


 Ben Ramsey wrote:

  I'm getting the following error when using the Mail_smtp package from
PEAR:
 
  PHP has encountered an Access Violation at 0177A8B4
 
  It does not occur everytime I use it, but even when send() returns true,
  e-mail messages are not being sent.  However, it all worked fine a week
  ago when I was testing it, and I don't think anything has changed to my
  installation of PHP.
 
  I'm using PHP 5RC1 on a Windows Server 2003.  The localhost has no
  built-in mail functionality, so I cannot use mail().  I must use
  Mail_smtp to log in to the mail server.  I also have Net_SMTP and
  Net_Socket installed, and, like I said, when I first dropped in my code,
  all was working fine.
 
  My code is, as follows:
 
  code
  require_once 'Mail/smtp.php';
 
  $smtp_settings = array(
  'host' = 'localhost',
  'port' = '25',
  'auth' = 'LOGIN',
  'username' = 'username',
  'password' = 'password'
  );
 
  $to = [EMAIL PROTECTED];
  $msg = Line 1\nLine 2\nLine 3;
  $headers = array(
  'Subject'  = My Subject,
  'From' = [EMAIL PROTECTED],
  'Date' = date('r'),
  'Content-Type' = 'text/plain',
  'X-Mailer' = PHP/ . phpversion()
  );
 
  $mail = new Mail_smtp($smtp_settings);
 
  if ($mail-send($to, $headers, $msg)) {
  echo h2Sent successfully/h2;
  } else {
  echo h2Not sent/h2;
  }
  /code
 
  If I don't get the access violation error, I get the message Sent
  successfully.  Yet, I don't receive any messages.
 
  In the code for Mail_smtp (in Mail/smtp.php), I have added the following
  line just under the function declaration line for the send() method:
 
  echo test;
 
  When the access violation occurs, I get this line:
 
  PHP has encountered an Access Violation at 0177A8B4test
 
   From this, it appears to me that the access violation is not occurring
  when the class tries to send mail, but sometime earlier than that.
  However, I do not know much more about these Access Violoations, other
  than PHP is trying to access memory that it doesn't have permission to
  access.  I couldn't find anything at bugs.php.net or through Google that
  helped much with this problem.
 
  Any help would be greatly appreciated.  I am on a tight deadline, so any
  help ASAP would be even more greatly appreciated.  ;-)
 

 -- 
 Regards,
   Ben Ramsey
   http://benramsey.com
   http://www.phpcommunity.org/wiki/People/BenRamsey

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



[PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked as
experimental... Basicly, this would get currupt?

(wierd-var-test.php)
?
if($action=='post')
var_dump($_REQUEST);
else
{
?
form action=wierd-var-test.php?action=post
input type=text name=var
input type=submit
/form
?
}
?

Or are there some other details I've missed?
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
[EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 This problem only seems to be happening on one of the virtual hosts on
this
 system, and I cannot seem to figure out just what it is.

 I have a simple form posting to search.php, with a text input field, with
a
 name of 'search'. And since this site is an internal site, register
globals
 are on, as we are not worried about anyone misuing any of the variables in
 use.

 In any even, this problem was noticed about a week ago, and it did not
exist
 before.

 After inputting some text into the search box, in this example, 'var',
sans
 quotes, and i hit submit... on the next page, I am just having it return
 just $search for testing, and, it comes back sporadically with: 'var', but
 most of the time, it comes back with:

 var^!#ndda/form

 or

 var4194092d098240928d12ed

 or

 var#c0c0c0

 or

 varput type=text

 etc. etc. it seems soemthing is somehow corrupting the variables, and I
 cannot seem to figure out what it might be. This has been working fine
until
 about the past week, and I cannot think of any major changes that may have
 happened within the past week that could have caused this... and as I
 mentioned above, it only seems to be this one virtual host. And ai also
 compared with backups of all of y included files at the beginnings and
ends
 of each script from before this problem started happening, and I can see
no
 major changes in any of them. And, this is happening around all php
scripts
 on the site...

 I am running 4.3.4, with apache 2, FreeBSD 4.8, and the data is all stored
 on a vinum partition. The server has been rebooted, a fresh install of
 php... tried setting output buffering on and flushing it at the end of the
 script(s), however, they seem to get hacked up when doing that, so I stay
 away from that band-aid fix...I am using sessions as well, as a few
scripts
 within the site store session variables... and also using SMBAuth to do
 authentication from our domain controller...

 I've been pulling out my hair for 4 days straight on this issue, and I am
 all out of ideas, any help would be *GREATLY* appreciated!

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



Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Accutually, I intented ?action=post, and if($action=='post'), just forgot to
add method=post.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Blake Schroeder [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 One problem
 wrong
 form action=wierd-var-test.php?action=post
 right
 form action=wierd-var-test.php method=post
 ?action is a variable with a value of post

 -Blake


 DvDmanDT wrote:

 Hmm.. Are there any PHP settings that only applies to that vhost? Can you
 please try to run PHP as CGI few tries.. If the input is corrupt, that
 _could_ be caused by the Apache2 which accutually is marked as
 experimental... Basicly, this would get currupt?
 
 (wierd-var-test.php)
 ?
 if($action=='post')
 var_dump($_REQUEST);
 else
 {
 ?
 form action=wierd-var-test.php?action=post
 input type=text name=var
 input type=submit
 /form
 ?
 }
 ?
 
 Or are there some other details I've missed?
 
 

 -- 

 +-+-++
 | Blake Schroeder | Owner/Developer |lhwd.net|
 +--(http://www.lhwd.net)+--/3174026352\--+

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



Re: [PHP] Bug with multipart/form-data ?

2004-04-05 Thread DvDmanDT
Maybe the post_max_size is also exceeded, and therefore it's handled with
sense I think.. Otherwise I'm not sure I think this is handled the right
way, if it's only upload_max_filesize that's exceeded.

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
John W. Holmes [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 From: Jay Blanchard [EMAIL PROTECTED]
   [snip]
   I have a form in a page 1, that POSTs a file and some hidden's to page
   2. If
   the file size is bigger that the max in php.ini, in page 2,  $_POST is
   empty.
   [/snip]
 
  Why, of course it is! The php.ini sets the max file size $_POST will be
  empty because it would not be allowed to load. You have two choices;
 
  A. increase the max file size in the php.ini
  2. reduce the size of the file being uploaded.
 
  It is not a bug.

 I understand what you're saying, and maybe the OP will agree with me here,
 but does that seem like the natural way for it to be handled? Shouldn't
 $_FILES be empty and $_POST still have the rest of the posted data? PHP
 decides to reject the file, but why does it reject the rest of the post
 data, also?

 Maybe off-topic for this list, but if that's what the OP was talking
about,
 then I've got to kind of agree with him.

 ---John Holmes...

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



Re: [PHP] Session hell: register_globals off

2004-04-04 Thread DvDmanDT
Randall Perry [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Solved my main problem. I was assuming that variables registered with
 $_SESSION were passed by reference. Apparently they're passed by value.

Wouldn't make very much sense to pass by reference, would it? Seems to me
like that would kill all values after the script finish... The logic would
be the reverse, to make $order a reference to $_SESSION['order']... Oh, and
have a look at serialize().. :)

 I moved the line '$_SESSION['order'] = $order;' from the top of the page 1
 php code (before any properties for the order object are set), to the end
of
 the php code -- now everything's getting passed to page 2 ok.

 This is an important point that should probably be in the docs section on
 sessions.

 When I coded using session_register() with register_globals on registering
 the variable before making changes to it worked.

 The '[error] PHP Notice:  Undefined variable:  _SESSION' happened, I
think,
 because there were no session variables to pass so PHP killed the session.

That sound VERY wierd to me.. But possible I guess..

  Had a previous thread on this issue. Started working on it again and am
  running into new bugs, so thought I'd start a new thread.
 
  Read thoroughly through session examples in docs and here's how I tried
to
  pass an object from one page to another:
 
 
  page 1
  __
 
  // include class definition file
  include_once order_classes.php;
  // start session
  session_start();
  // create instance of class Order
  $order = New Order();
  // assign class instance to $SESSION[]
  $_SESSION['order'] = $order;
 
  page 2
  __
 
  // include class definition file
  include_once order_classes.php;
  // start session
  session_start();
  // assign $_SESSION['order'] object to variable
  $order = $_SESSION['order'];
 
 
  I'm getting the following error when page 2 loads:
  [error] PHP Notice:  Undefined variable:  _SESSION
 
  Any ideas?
 
 
 
 
 
  Pertinent PHP vars:
  ___
 
  Darwin systame.cniweb.net 7.2.0 Darwin Kernel Version 7.2.0: Thu Dec 11
  16:20:23 PST 2003; root:xnu/xnu-517.3.7.obj~1/RELEASE_PPC Power
Macintosh
 
  Build Date Apr 2 2004 12:58:17
 
  Configure Command  './configure' '--with-apxs=/usr/sbin/apxs'
'--with-pgsql'
  '--with-xml' '--with-openssl=/usr/local/ssl' '--with-pear'
  '--with-curl=/usr/lib'
 
  Apache/1.3.29 (Darwin) DAV/1.0.3 mod_perl/1.29 PHP/4.3.5 mod_jk/1.2.4
  mod_ssl/2.8.16 OpenSSL/0.9.7c
 
  register_globalsOff Off
 

 -- 
 Randall Perry
 sysTame

 Xserve Web Hosting/Co-location
 Website Development/Promotion
 Mac Consulting/Sales

 http://www.systame.com/

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



[PHP] Re: \n is not working!

2004-04-04 Thread DvDmanDT
 echo This doesn't work\n';  // Displays: This doesn't work\n

Seems to me like that would generate parse error.. :s But yea, we get your
point.. :)
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com

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



[PHP] Re: $HTTP_SESSION_VARS still holds original values even after unset?

2004-04-04 Thread DvDmanDT
Umm.. Use $_SESSION for that, and session_unregister() for the unsetting
with the old style code..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Andy B [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
how would you empty all the contents of $HTTP_SESSION_VARS when you dont
need them anymore but still keep the current session running? the problem
seems to be that when i try to fill them with something else (dont need the
original values anymore) but need new ones without destroying the session
itself they wont fill with new things. unset($HTTP_SESSION_VARS); does
nothing to help at all because they still have the same values that they
were originally filled with (and not to mention they are still in the
session)...

anybody have any ideas how to delete or empty out the array but keep the
session active ??

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



Re: [PHP] Re: $HTTP_SESSION_VARS still holds original values even after unset?

2004-04-04 Thread DvDmanDT
Use the session_* functions then..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Andy B [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Umm.. Use $_SESSION for that..

 wish i could but it wont work for the server that its going to run
 onthey still use php4.0.4pl1 believe it or not

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



[PHP] Re: PHP 4.2.3 || Can't unset $_SESSION!

2004-03-28 Thread DvDmanDT
It should be
unset($_SESSION['checker']);

try to use var_dump($_SESSSION); on another page, called test3.php, and let
us know what happends..

also, I hope you remember to use session_start(); and no
session_write_close(); on test2.php..

Otherwise, please mail me the files: dvdmandt at telia dot com...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Cf High [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey all.

 Strange problem here.

 I'm running on apache 1.3.26  php 4.2.3.

 In a test page, test1.php, I set $_SESSION['checker'] = 1;

 In another test page, test2.php, I unset($_SESSION['checker']);

 When I print_r($_SESSION) in test1.php, $_SESSION['checker'] is still set

 still equals 1!

 I've tried session_unregister($checker),
 session_unregister($_SESSION['checker']), unset($checker), etc. -- none of
 them unset this particular session var.  Very strange behavior.
 Interestingly, I can set $_SESSION['checker'] = 0 (instead of 1) in
 test2.php  that works fine when I print_r($_SESSION) in test1.php.

 Any clues as to why this might be happening?

 FYI, register globals is set to ON.

 Let me know if you need further details.

 TIA,

 --Noah



 --

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



[PHP] Re: Newbie question on Array

2004-03-28 Thread DvDmanDT
You can't do it that way.. You'll probably get parse error..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
[EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]

 Sorry, I am new and could not supply the correct search strings on search
 sites to answer by question.


 I am trying to construct an array with key-value from a resultSet which
will
 be used often within the page or between pages.

 Which looks like this:

  $optionBox=select used_1, rub from rub_table order by rub asc;
 $rs_box=mysql_query($optionBox,$con);
 $arr=Array(
 while($row=mysql_fetch_array($rs_box))
 {
'$row[used_1]' = '$row[rub]'  ,
 });

  ,--- This does not need to appear in the last loop.

 Is this possible?, if yes what is wrong with my code?.

 many thanks for your help..

 (._.)---Carlson

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



[PHP] Re: [4.3.4] Can't ksort a subarray

2004-03-25 Thread DvDmanDT
I'd do this I think:


uksort($A,'strcasecmp');
reset($A);
while(list($key,$val)=each($A))
{
uksort($A[$key],'strcasecmp');
}

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Richard A. Devenezia [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I have this little code.
 I want all arrays sorted case insensitive key order, but only the first
 dimension gets key sorted properly

 Thanks
 -- 
 Richard A. DeVenezia

 ?

 $A = array (
   C = array ( x = 1, Z = 2, y = 3)
 , b = array ( z = 1, Y = 2, x = 3)
 , A = array ( z = 1, X = 2)
 );
 print_r ($A);

 // sort dim1
 uksort ($A, strcasecmp);
 print_r ($A);

 // sort each dim2
 while (list($key,$dim2) = each ($A)) {
   uksort ($dim2, strcasecmp);
 }
 print_r ($A);

 ?

 It comes out

 Array
 (
 [A] = Array
 (
 [z] = 1
 [X] = 2
 )

 [b] = Array
 (
 [z] = 1
 [Y] = 2
 [x] = 3
 )

 [C] = Array
 (
 [x] = 1
 [Z] = 2
 [y] = 3
 )
 )

 I want

 Array
 (
 [A] = Array
 (
 [X] = 2
 [z] = 1
 )

 [b] = Array
 (
 [x] = 3
 [Y] = 2
 [z] = 1
 )

 [C] = Array
 (
 [x] = 1
 [y] = 3
 [Z] = 2
 )
 )

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



[PHP] Re: $_SESSION vs Database Call

2004-03-25 Thread DvDmanDT
Probably depends on how efficient your database server is setup as well as
what harddisks you use and so on.. Also depends on how much data it's about
I think..

I'd use sessions if I was you..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Chris Thomas [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Just wondering, what is faster / more effecient,  storing a value in the
 session variable which gets stored on the filesystem (from what i
 understand) or database calls to re-get the information?

 Chris

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



Re: [PHP] servers in php

2004-03-15 Thread DvDmanDT
.. You have never used PHP on win32, have you?

-- 
// DvDmanDT
MSN: dvdmandt?hotmail.com
Mail: dvdmandt?telia.com
Norbert Pfeiffer [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi Comex,

 forget Win-PHP, it only scarcely to 60% of the
 functions are supported. Everything which with
 Sockets, Pipes or the like to do has, became
 omitted.


 m. b. G. Norbert
 _
 normal:  02686-987103
 Notruf:  0177-2363368
 -
 e.o.m.

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



[PHP] Re: servers in php

2004-03-13 Thread DvDmanDT
I was thinking about this a while ago accutually.. It does seem like you can
use ticks to get a multithreaded server, with multiple connections, but I
can't say for sure.. :p

-- 
// DvDmanDT
MSN: dvdmandt?hotmail.com
Mail: dvdmandt?telia.com
Comex [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
I was wondering how to go about making a server in PHP that would accept
multiple connections..in windows, so I can't use forks.  I'd need to call
the program from itself but I don't know how the listening works.

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



[PHP] Re: header(Location: question

2004-02-29 Thread DvDmanDT
That will tell the browser The movie is there!Go there instead! umm..
Kinda like that anyway.. It lets the user download from there, and not your
server..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
John [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 when you use a command like this:
 header(Location:
http://www.highbandwidhtmirror.com/videos/download.mpg;);

 Is the user downloading off the mirror site or is your server downloading
 from the mirror and passing on to the end user. I want to save bandwidth
by
 having mirror urls of funny videos, so will this work?

 --
 **
 Free Nokia Ringtones US
 http://www.ring-tones.us
 **

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



[PHP] Re: Problems with ö or ä in script

2004-02-07 Thread DvDmanDT
It's because the HTML or HTTP or whateverdoesn't allow them.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Piet From South Africa [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 When using ö or ä the hyperlinks or photo references does not work even
 though it point correct like ../banner/Jörns Gästehaus/mainphoto.jpg, i
 tried specialchars but this does not seem  to work, can anyone tell me
why?

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



[PHP] Re: read file only half the file loads ...

2004-02-02 Thread DvDmanDT
The server or the connection seems to be the problem.. :s
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Philip J. Newman [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 loadimage.php has the following code in it.


 ?php
   $myimage=d:/website/images/no_access_php.jpg;
 // above is the file and the location is verified.
   header(Content-type: image/jpeg);
   readfile($myimage) ;
 ?

 Only half the image is shown ... it stops loading the image or the image
wont' load at all.

 Any Ideas what the problem could be?


 ---
 Philip J. Newman
 Master Developer
 PhilipNZ.com [NZ] Ltd.
 [EMAIL PROTECTED]

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
And once again, someone didn't search the archives before posting like you
are told to do on the mailing list page (this question is answered several
times daily)..

The bug is called register_globals being on on you production server and off
onn you development server.. Learn not to use register globals.. Use
$_GET['param'] instead... I'll quote myself:

The reason is the register_globals defaults to off last years or so, which
it says in the FAQ and in the manual, as well as in the mailing list
archives, which
you must have ignored even though it's a notice saying 'Check the archives
before posting a question, chances are it has already been asked and
answered a few times.' This question has been answered just about a million
times before..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi, everybody!

 I've just installed PHP on my workstation and it seems as I have some
 trouble. The simplest code does not work! Here it is:

 ?
 print_r($HTTP_GET_VARS);
 print(param =  . $param);
 ?

 I run it with URL like this http://localhost/myApp/test.php?param=qqq:
 I expect it to print 'param=qqq' string, though it does not! :(((
 Here is the output:

  Array ( [param] = qqq )
  Notice: Undefined variable: param in d:\phptest\test.php on line 4
  param =

 Though, the script produces expected output when uploaded to a
 production server.

 Where is the bug? Any ideas are greatly appreciated.

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
lol, I'm not upset.. But follow this group a month and you'll understand..
I've been following 8 months or so... Just about everyone asks... Many ppl
on php.windows as well.. Ppl in forums.. I'm thinking about suggesting the
solution to this problem should be posted on the mailing-lists.php page.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Many thanks, man. You are very helpful!
 I did try searching this news group. Nothing found.
 Will try to do my best next time to not upset you.
 Anyway, thanks for help.

 Dvdmandt wrote:
  And once again, someone didn't search the archives before posting like
you
  are told to do on the mailing list page (this question is answered
several
  times daily)..
 
  The bug is called register_globals being on on you production server and
off
  onn you development server.. Learn not to use register globals.. Use
  $_GET['param'] instead... I'll quote myself:
 
  The reason is the register_globals defaults to off last years or so,
which
  it says in the FAQ and in the manual, as well as in the mailing list
  archives, which
  you must have ignored even though it's a notice saying 'Check the
archives
  before posting a question, chances are it has already been asked and
  answered a few times.' This question has been answered just about a
million
  times before..
 

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
Yes, I know what you mean.. :)

If you use windows (or some other msn client), feel free to add me on MSN
and I'll be glad to help you out if you get problems.. :)

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I will follow, sure. The problem is that until last week i knew nothing
 about PHP (I used to practice java). And in a few weeks i have to be
 ready with a PHP application and possibly it should utilize fusebox
 framework. There are so many stuff to get to know in short time that
 sometimes it is easier just to ask than to search for something that you
 even don't know where to search, which terms to use.

 Dvdmandt wrote:
  lol, I'm not upset.. But follow this group a month and you'll
understand..
  I've been following 8 months or so... Just about everyone asks... Many
ppl
  on php.windows as well.. Ppl in forums.. I'm thinking about suggesting
the
  solution to this problem should be posted on the mailing-lists.php
page.. :p
 

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



[PHP] Re: Nested PHP

2004-02-01 Thread DvDmanDT
I think you are looking for the function eval()... Or
preg_replace('!e!e',$phpcode,'e');

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Russell Shaw [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi,
 I have php code embedded in html, that is read by apache.

 Is nested php code allowable such as:

 ?
$phpcode=? echo \ some html \ ?;
 ?
 ...
 html
 ...
body
  ? echo $phpcode ?
/body
 /html

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



[PHP] Re: php version difference - local installation very strict

2004-02-01 Thread DvDmanDT
Yes..
error_reporting=E_ALL  ~E_NOTICE
in php.ini is most likely what your server uses.. :p
Also, register_globals might give you problems.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Phillip Jackson [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi all,

 It seems that the version on my local apache installation is more strict
 than the version on my production server. How can i counteract this
without
 potentially having to upgrade 300+ pages in my entire app? is there a
 setting in php.ini that i could locally kill some of this debugging info?
 Some examples of errors i'm getting locally:


 Notice: A session had already been started - ignoring session_start() in
 %siteroot%\admin\menu.php on line 9

 Notice: Undefined index: success in %siteroot%\admin\menu.php on line 18

 Warning: Cannot modify header information - headers already sent by
(output
 started at c:\inetpub\www\tommiezito\admin\data_entry\start.php:14) in
 %siteroot%\admin\data_entry\start.php on line 37

 these errors are foreign to me as i have combed my code 100's of times
 before i deployed my app online 3 months ago. do i NEED this
newer,stricter
 version or can i install a deprecated one?

 any help would be amazing.

 ~pj

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



Re: [PHP] php version difference - local installation very strict

2004-02-01 Thread DvDmanDT
Once on every page... I include one file once, on each page, and in that one
I have session_start()...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Phillip Jackson [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 That's great advice... the only questions i have then:

 I only need to call session_start ONCE in my entire application per
instance
 of a session? when i published the application months ago to my production
 server i had errors on every page notifying me that a session had not been
 started so i could not call $_SESSION...

 ~pj


 Justin French [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  On Monday, February 2, 2004, at 10:14  AM, Phillip Jackson wrote:
 
   these errors are foreign to me as i have combed my code 100's of times
   before i deployed my app online 3 months ago. do i NEED this
   newer,stricter
   version or can i install a deprecated one?
 
  It's not newer and stricter, and it's not Apache -- it's PHP error
  notices set to a higher level that your production server.
 
  This is really around the wrong way -- your local (dev) server should
  be set to a high level of warning (mine's set to the highest) to
  encourage good programming practices, and should be set to none on the
  production (live) server to keep error messages out of the user
  experience.
 
  The long answer is to fix your application, and hunt down all these
  notices/warnings, so that your application is of better quality.
 
  The short answer is to set the error reporting on the live server to a
  lower level, so that these messages are suppressed.  You can do this
  either with ini_set()[1] or error_reporting()[2] at the top of every
  script (or in a header include for example), or at an application level
  with a .htaccess file in root directory.
 
  A sample of a .htaccess file would be:
 
  IfModule mod_php4.c
  php_flag register_globals off
  php_flag magic_quotes_runtime off
  php_flag magic_quotes_gpc on
  php_value url_rewriter.tags 'a=href'
  php_value error_reporting 'E_ALL  ~E_NOTICE'
  /IfModule
 
  I'm not 100% sure the last line is correct, because I'v always done it
  with ini_set() in my PHP application.
  [1] http://www.php.net/ini_set
  [2] http://www.php.net/error-reporting
 
 
  I would encourage you to fix your code as well as apply error reporting
  levels for both the production and live servers.
 
 
  Good luck,
 
  Justin French



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



[PHP] Re: Act as a Server

2004-01-31 Thread DvDmanDT
Ofcorse it can be done... Wouldn't be worth it though, and it would be
slooow as f I think...

... I really don't think it would be worth it accutually...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Stephen Craton [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Alright, I'm just looking for two answers: If it can be done and how? I
 don't want code though, that's up to me to figure out.



 I'm about make a script, somewhat like a mailing list, where users can
 contact each other through a web based system or by email. My question is,
 can I get PHP to somehow act as the server where all the emails come in?
 What I means is like if I were to send an email to [EMAIL PROTECTED], how could
I
 get PHP to pick the email up and distribute it out like a mailing list?
 Would this require the configuration file to be changed or what?



 Any help here would be appreciated. I don't think this has been done
before,
 or else I would have read their code and seen how they did it.



 Thanks,

 Stephen Craton

 http://www.melchior.us





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



[PHP] Re: shell_exec and accents

2004-01-29 Thread DvDmanDT
As I said somewhere else about an hour ago, use like Iconv or something like
that.. It's caused by different charsets.. Chances are quite big you want to
use iso-8859-1, but the shell command uses something else..

-- 
// DvDmanDT
MSN: dvdmandt?hotmail.com
Mail: dvdmandt?telia.com
Phpdiscuss - Php Newsgroups And Mailing Lists [EMAIL PROTECTED] skrev
i meddelandet news:[EMAIL PROTECTED]
 Hi,

 I'm using shell_exec to call a command that can return accented
 characters.  Unfortunately the accented characters are being transformed
 into other characters instead (for example, an acute e becomes a ',').

 How can I get the real output?

 I'm running on Windows 2000.  In the command prompt the command returns
 the accents correctly.

 Tim

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



Re: [PHP] sending a hex string as it is?

2004-01-29 Thread DvDmanDT
No need to ge that deep (socket_create and stuff)..
To send the HEX number 20 (also a space), you can do the following:

\x20;
chr(0x20);
chr(hexdec('20'));
pack('C',0x20);

All of those _should_ create a space...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Trevor Gryffyn [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Ahh..  Since you're not declaring what data type $var is, it must be
treating it as a string, even though I'd think it'd take it as an int if
you didn't put quotes around it.   That's one thing I like about PHP..
You can be as strict or lax as you want with the types.  But I can see
in this case where it'd cause an issue.

Well, you could try:

Intval($var)

That should force it to be an integer.


You know what, I think the real question here is how are you sending it
over the wire.   Sounds like you're sending it in some manner that
transmits it as text.  In which case you WILL get 32 30 for a 20..
And if you convert the 20 to an INT, you'll still get it because of the
way you're transmitting.

You're probably going to have to open a binary connection to whatever
you're doing.

Look into socket_create()

Sounds like you need something a little more low-level than what you're
using.

-TG

 -Original Message-
 From: Khoa Nguyen [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 29, 2004 8:51 AM
 To: David OBrien; [EMAIL PROTECTED]
 Subject: RE: [PHP] sending a hex string as it is?


 I guess I confused the matter by mentioning hex. The problem
 is the same
 with decimal number; for example
 ?php
 $var = 20;
 echo $var; // This will send 32 30 over the wire, not 14 (hex
 value of decimal 20)
  // How do I make it send 14?
 ?

 I guess echo function treats $var as a string. Maybe I am
 looking for
 a function that will sends a data stream as it is

 Thanks,
 Khoa

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



[PHP] Re: working with files

2004-01-28 Thread DvDmanDT
Did you try file(); ?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Tony [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 hi,

 i have problem with writing a reading to file
 i want to write emails in files. like this
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 etc..

 this is how I write to the file

 $handle = fopen($filename, a);
 fwrite($handle,$email\n,128);
 fclose($handle);


 ok it writes everything just fine but now i want to read the file line by
 line and print line by line.
 this is how i do it.

 ?php
 $handle = fopen ($filename, r);

 do {
 $data = fread($handle, 128);
 if (strlen($data) == 0) {
 break;
 }
 print ($databr);
 } while (true);
 fclose($handle);
 ?



 the problem i get then is everything is printed in one line.



 any help is appreciated.

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



Re: [PHP] sending a hex string as it is?

2004-01-28 Thread DvDmanDT
Did you consider following?
$var=\x10; ? Or dechex();?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Khoa Nguyen [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Thanks for the info Dave, but I still can't make it work:

?php
$var = 0x10; // decimal 16
echo $var; // case 1
echo strval($var);  // case 2
?

In both cases, I see 3136 (ASCII encoded of string 16) on the wire :-(

Any ideas?

Khoa

-Original Message-
From: David OBrien [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 2:08 PM
To: Khoa Nguyen; [EMAIL PROTECTED]
Subject: Re: [PHP] sending a hex string as it is?


At 02:03 PM 1/28/2004, Khoa Nguyen wrote:

$var = 0x8180;

How do I send $var to the browser as it is? In other words, if sniffing

on the wire, I should see 8180, not 38 31 38 30.


I think
http://www.php.net/manual/en/function.strval.php
would work here
-Dave

Thanks for your help.
Khoa

--
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] Re: working with files

2004-01-28 Thread DvDmanDT
I use to do this:
$lines=file($filename);
$num_lines=count($lines);
for($i=0;$i$num_lines;$i++)echo 'option
value='.$lines[$i].''.$lines[$i].'/option';

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Tony [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I'm new to php,
 and i tried file() no luck
 $lines = file('$filename');
 foreach ($lines as $line_num = $line) {
 print (option value=\$line\$line/option);

 }



 thanx for the help


 Dvdmandt [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Did you try file(); ?
 
  -- 
  // DvDmanDT
  MSN: dvdmandt¤hotmail.com
  Mail: dvdmandt¤telia.com
  Tony [EMAIL PROTECTED] skrev i meddelandet
  news:[EMAIL PROTECTED]
   hi,
  
   i have problem with writing a reading to file
   i want to write emails in files. like this
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   etc..
  
   this is how I write to the file
  
   $handle = fopen($filename, a);
   fwrite($handle,$email\n,128);
   fclose($handle);
  
  
   ok it writes everything just fine but now i want to read the file line
 by
   line and print line by line.
   this is how i do it.
  
   ?php
   $handle = fopen ($filename, r);
  
   do {
   $data = fread($handle, 128);
   if (strlen($data) == 0) {
   break;
   }
   print ($databr);
   } while (true);
   fclose($handle);
   ?
  
  
  
   the problem i get then is everything is printed in one line.
  
  
  
   any help is appreciated.

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



[PHP] Re: Print All parameters

2004-01-28 Thread DvDmanDT
This is what I do, to get EVERYTHING:

pre?
var_dump(get_defined_vars());
echo \r\n\r\n\r\n;
var_dump(get_defined_constants());
echo \r\n\r\n\r\n;
var_dump(get_defined_functions());
?/pre

But this will also get all functions and constants.. use only the first
command for only the variables..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Mike Mapsnac [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Is it possible to print all values of all variables in php file? Including
 global, local...
 Thanks

 _
 Get a FREE online virus check for your PC here, from McAfee.
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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



[PHP] PHP 1.0?

2004-01-27 Thread DvDmanDT
Hello everyone!

Does anyone have a copy of PHP 1.0? Today I managed to get PHP 2 working,
and I already had 3, 4 and 5 on my system.. So I want 1.0, just to have them
all.. So, anyone? Please? I really want it..

Any pointers / comments / files appriciated!

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com

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



[PHP] Re: RewriteRule REGEX ?

2004-01-25 Thread DvDmanDT
Are you sure you have both mod_rewrite and .htaccess installed on the new
apache then? Things like this is often very silly you know, you look past
the problem (I've done that several times)...

RewriteRule /articles\.php\?id=([0-9]+)$ /articles/$1

Although, I've never even used mod_rewrite so I'm not the right person to
ask...

Check the news server news.gmane.org, there you can find most of the Apache
lists..
gmane.comp.apache.user for example... Or on any server, try
alt.apache.configuration, comp.infosystems.www.servers.
You'll most likely get alot more help there, since those are pointed towards
apache rather than PHP...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Monty [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Actually, it's not the reverse that I want to do.

 Right now the pages on my site use this form of URL:

 domain.com/articles.php?id=999

 Now that I have upgraded my server to Apache 2, I'm going to use the
 ForceType and FollowSymLinks options to change the entire site to use this
 search-engine-friendly form of URL to access all pages:

 domain.com/articles/999

 But I don't want the old links to be broken once I change the site to this
 new type of URL. So, if someone types in domain.com/articles.php?id=999,
 instead of getting a 404 error, I'd like to use the RewriteEngine to
rewrite
 that URL to the valid new URL format: domain.com/articles/999.

 So, I thought this would work in my .htaccess file, but it doesn't:

 RewriteRule articles\.php?id=([0-9]+) articles/$1 [R]

 Do I have to escape the ? before id \? I tried it, but it didn't make a
 difference. I also tried /articles... but that didn't work, either.

 Monty

  From: [EMAIL PROTECTED] (Paul Chvostek)
  Newsgroups: php.general
  Date: Sat, 24 Jan 2004 13:39:25 -0500
  To: Monty [EMAIL PROTECTED]
  Subject: Re: RewriteRule REGEX ?
 
 
  On Sat, Jan 24, 2004 at 12:18:36PM -0500, Monty wrote:
 
  From This:  articles.php?id=999
  To This:articles/999
  ...
  What am I doing wrong??
 
  I suspect you may not be looking at the problem the right way.
 
  What exactly do you want to do?
 
  Normally, you'd go the other direction; that is, you'd have mod_rewrite
  recognize ^/articles/([0-9]+)$ and translate it to /articles.php?id=$1
  ... so that a request to the pretty URL gets served as an HTTP GET on
  the PHP script.
 
  I get the impression that you're expecting mod_rewrite to translate copy
  from inside your HTML files, as well as recognize and reverse the
  translation when the request comes back in.  Is that it?
 
  RewriteEngine on
  RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R]
 
  But I keep getting a 404 error for articles.php, which means that
something
  must be wrong with my RewriteRule because it's not matching. I've tried
  various tweaks and just can't get it to work.
 
  I bet if you create an articles directory in your documentroot, with
  with files named things like 999 in it, you'll stop seeing the 404's.
  Check your apache error_log.
 
  If what you're trying to achieve is to have existing HTML files get
  their embedded URLs translated, you're going to have to do that with an
  output filter.  You can do it with PHP, or use mod_sed ... lots of
  options.  But a rewrite rule won't change page content, it'll only
  rewrite the *requests* that come in.
 
  Of course, if you know all this already, and really are trying to point
  requests for /articles.php?id=123 to a file named 123 in the directory
  articles, then you'll still need to inspect your error_log.
 
  -- 
  Paul Chvostek [EMAIL PROTECTED]
  it.canadahttp://www.it.ca/
  Free PHP web hosting!http://www.it.ca/web/

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



[PHP] Re: RewriteRule REGEX ?

2004-01-24 Thread DvDmanDT
Did you try to remove that '^' ? That means start.. In other words you are
saying that the uri starts with articles, when I would think it starts with
/articles... Yes, that could really matter...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Monty [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 My server runs Apache 2.0. I am trying to do a simple URL rewrite so that
 old URLs will map to our new style of URLS...

 From This:  articles.php?id=999
 To This:articles/999

 In the .htaccess file for the htdocs folder that contains the web files, I
 put the following:

 RewriteEngine on
 RewriteRule ^articles\.php\?id=([0-9]+)$ articles/$1 [R]

 I've also tried this (no slash in front of ?):

 RewriteEngine on
 RewriteRule ^articles\.php?id=([0-9]+)$ articles/$1 [R]

 But I keep getting a 404 error for articles.php, which means that
something
 must be wrong with my RewriteRule because it's not matching. I've tried
 various tweaks and just can't get it to work.

 What am I doing wrong??

 Thanks.


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



[PHP] Re: Can we make .exe programs with php?

2004-01-24 Thread DvDmanDT
A while ago there was someone who announced a link to some program that
allowed you to make exe's (yes, it works)... Although, it's 100% uncompiled
(not even to bytecodes), so the only thing you gain is that it'll be easier
to run... :p

Also checkout this: http://binaryphp.sf.net
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Pehepe Php [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Can we make .exe programs with php? for example we can do it with delphi,
 vbasic.but can we do with php?

 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*
 http://join.msn.com/?page=features/junkmail

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



[PHP] Re: PHP has encountered an Access Violation at 00C4DA27

2004-01-22 Thread DvDmanDT
Personally, I would think XP is extremely buggy on the memory allocation
part... It seems unable to handle LOTS of allocations/reallocations after
eachother... I made a program, which can do one allocation 260 times or so..
Then it crashes... I haven't seen any logic at all in this...

for(i=1;i10;i++)free(calloc(i,sizeof(char)));

Basicly that crashes it, after a couple of loops... :s Doesn't make any
sense to me... Maybe I've missed something though...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Amk [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 PHP has encountered an Access Violation at 00C4DA27

 I'm getting this error a lot with an intensive script I'm running. Though
 I've also seen it with other, less intensive scripts in the same project.

 I will get the error 10 times in a row. Then have the script run ok
 for a while. This is on Windows XP SP1 with PHP 4.3.4 stock install except
 for GD image (v2.0.15) library extensions loaded. Using MySQL for the
 database running as a service (v 4.0.17).

 The script it's self is doing a lot of file reads/writes processing
several
 directories of files 1Mb-10Mb binary (save game files) parsing out various
 data including some png images which I'm processing using GD library of
 functions making four new images for each file processed and writing those
 to disc. Additionally for each folder a MySQL insert is done, and for each
 city an insert is done. Typically this is processing around 90 files and
 takes 10-20 seconds (when it works).

 I've increased the memory limit to 20mb limit using the php.ini. I've
tried
 using the
 cgi instead of the asapi module - which then just crashes, bringing up the
 dr watson 'report this error to MS or not' dialog instead of the access
 violation error.

 I've tried commenting out many of the image write functions from the
script,
 then the mysql calls to see if its the quanity of disk activity or the
mysql
 calls is contributing to the problem - but it didn't reduce the frequency
 and the problem persisited.

 Any help would be appreciated.

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



[PHP] Re: Is this possible ?

2004-01-18 Thread DvDmanDT
Do this:
function MyFunc($num=NULL)
{
if(isset($_POST[var])){
 $sql = mysql_query(select * from table_name where field=\$_POST[var]\
);

 $num = mysql_num_rows($sql); // I want to use this result outside this
function.

$returnsomething =blah blah;
 }
 return $returnsomething;
}

$numrows=0;
$res_arr=MyFunc($numrows);

Notice the , that'll make the value of $numrows changed... I did not test
this at all, but it should work.. If you only do MyFunc(); without any
parameters, it'll just return the result of the SQL statement..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Dave Carrera [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Hi List,

I have a function that makes a call to mysql based on certain vars.

---example

Function MyFunc(){
 if(isset($_POST[var])){
 $sql = mysql_query(select * from table_name where field=\$_POST[var]\
);
 $returnsomething =blah blah;
 }
 return $returnsomething;
}

And that all works fine no probs here but.

I want to use a result somewhere in my script that is not returned by
return. Let me show you...

---example

Function MyFunc(){
 if(isset($_POST[var])){
 $sql = mysql_query(select * from table_name where field=\$_POST[var]\
);

 $num = mysql_num_rows($sql); // I want to use this result outside this
function.

$returnsomething =blah blah;
 }
 return $returnsomething;
}

So $num contains a number that I want to use outside the function which is
not covered by return.

I know return stops a script and returns what I want it to return but how do
I send out of the function the var I want.

I have tried $GLOBAL[var]=$num; but that don’t work, but I thought I
would'nt anyway just tried it and yes I know I have to declare it inside my
new function using global $var; to use it.

So I ask is this achiveable or how can I do this.

Thank you in advance

Dave C


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004

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



[PHP] Re: /VAR is driving me crazy

2004-01-16 Thread DvDmanDT
I don't have any problems with it...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Boaz Yahav [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Hi

Does anyone have an idea what is so special about the string /VAR ?
If i create a form that submits to a php file and in the form i put the
string /VAR
anywhere in the text or just /VAR I get an 404 error from apache on an
existing
file. If i take the same form and remove the /VAR string all is ok.

I'm not sure if this is an apache issue or PHP. Did anyone encounter
such a behavior?

Sincerely

berber

Visit http://www.weberdev.com/  http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story

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



[PHP] Re: Installing PHP on 2nd Windows Drive

2004-01-13 Thread DvDmanDT
I have one Apache installed (well, 8 or 9, but one that I really use all
day), 4 PHP installs.. I have PHP 4 at C:\php, Apache at D:\Apache, PHP3 at
D:\php3, PHP5 at D:\PHP5, mysql at D:\mysql4, my webdocuments in c:\www,
D:\www2, G:\document..\\my documents
and so on.. No problems at all.. The only problem you'll get is that you
can't une the Apache installer twice without uninstalling the first one... I
use to just rename the Apache folder, uninstall (no files get removed), then
I rename back, then I reinstall to overwrite the files which needs to be
updated...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I got a preconfigured package - Apache 2.0/PHP/MySQL - up and running,
 then I installed Apache 1.3. Everything seems to be working fine, and
 I'm ready to start tweaking it.

 In the meantime, I bought a book about Apache, PHP and MySQL, which
 includes tutorials on downloading the programs individually.

 I don't want to mess up what I've already installed, but I have an
 external hard drive that I use for backing up my documents. Could I
 install new Apache, PHP and MySQL programs on that drive? They wouldn't
 interfere with the equivalent programs on the C drive, would they?

 In fact, is it possible to have PHP programs from two hard drives open
 at the same time? After all, I can open up documents on both drives with
 Windows Explorer.

 Of course, I guess I'd have to install Dreamweaver on the second drive,
 too, so I'd be able to test PHP and make sure it's working.

 Thanks.

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



[PHP] Re: Renaming and Moving php.ini and php4ts.dll Files

2004-01-13 Thread DvDmanDT
Depends on how you/they install it... If you run PHP as Apache/Isapi module,
php.ini should be located in \windows, and php4ts.dll should be placed
\windows\system32 (nt/2k/xp) or \windows\system (9x/me), however, I suggest
you only copy it there, and leave a copy where you found it... Accutually,
my system32 dir does not contain a php4ts.dll... The only place that file is
located for me is in C:\php..

And suddenly, you find yourself configuring the preconfigured package
manually anyway... : )

Oh, and btw, in windows explorer, select tools-folder properties (something
like that, my XP is swedish so I'm guessing on translations), goto the
second tab (display or something)... Here's my suggested settings:


 Hidden files and folders
(*) Show hidden files / folders
(  ) Don't show
 [ ] Hide extensions for known filetypes
 [ ] Hide protected system files


 [x] Display the contents of system folders


The ones I didn't mention isn't really important in my opnion, at least not
for now... If you have those settings, you should be able to locate php.ini
if you get complaints about already existing... You might get some warnings
about showing some files, but unless you plan on going into the system
folder, open up some random file, change the content and save it, you can
ignore those warnings... I mean, you wouldn't edit any of those if you
didn't know exactly what you were doing, right?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I have PHP installed on Windows XP Pro as part of a preconfigured
 package (XAMPP). I'm reading a book about installing and configuring PHP
 which says I should rename the php.ini-dist file to php.ini and move it
 to the Windows directory and move the php4ts.dll file to Windows\System\

 I found php4ts.dll and moved it, but when I try to rename php.ini-dist
 to php.ini, it says that file already exists - even though I can't see it.

 So I moved it to Windows\System\, THEN renamed it - but I got the same
 message. But I can't see php.inin in Windows\System\ either.

 I'm wondering if I should have left these alone since they're part of a
 preconfigured package and are supposed to be where I found them.

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



[PHP] Re: Installing PHP on 2nd Windows Drive

2004-01-13 Thread DvDmanDT
You could have several installs on the same drive, yes...
C:\wampp2 and c:\www\Apache, c:\www\php, C.\www\mysql and so on for
example.. Or, try this.. Create a folder names just testing123 in your C:
(C:\testing123), and create a .txt file in that directory...

Start-run, type 'cmd.exe'
In the console, type 'subst z: C:\testing123'

When you have done that, you'll find another drive named z:, which
accutually points to C:\testing123.. This was you could install several
XAMPP packages on the same drive.. However, the Z: will be gone after a
reboot, so add that command to like autoexec.bat, your startup folder, or
something like that if oyu plan on using it...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:

  I have one Apache installed (well, 8 or 9, but one that I really use all
  day), 4 PHP installs.. I have PHP 4 at C:\php, Apache at D:\Apache, PHP3
at
  D:\php3, PHP5 at D:\PHP5, mysql at D:\mysql4, my webdocuments in c:\www,
  D:\www2, G:\document..\\my documents
  and so on..

 So if I understand correctly, you could have several of each installed
 on the SAME DRIVE even?

 I'm thinking of creating two new folders on my C drive, then installing
 Apache, PHP and MySQL one at a time in the first folder, then installing
 that preconfigured package that seems to work so well in the second drive.

 The Apache installs would be 1.3 and 2.0, but the two installations of
 PHP and MySQL might be the same version, for all I know. That would be
 really convenient!

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



[PHP] Re: how to display a font with two words???

2004-01-13 Thread DvDmanDT
Rename the font... I think that's the only solution...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Matt Hedges [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Howdy,

 I'm trying to specify font face=Monotype Corsiva in my php document...
but
 can't b/c it's two words... if it was html I could just put , but since
I
 can't do that in php, does anyone know what to do?

 prob. a stupid question,
 thanks a lot,
 Matt

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



[PHP] Re: how to display a font with two words???

2004-01-13 Thread DvDmanDT
I just realized my misstake.. In GD you can't, in HTML it's possible.. Read
the other ppls replies..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Dvdmandt [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Rename the font... I think that's the only solution...

 -- 
 // DvDmanDT
 MSN: dvdmandt¤hotmail.com
 Mail: dvdmandt¤telia.com
 Matt Hedges [EMAIL PROTECTED] skrev i meddelandet
 news:[EMAIL PROTECTED]
  Howdy,
 
  I'm trying to specify font face=Monotype Corsiva in my php document...
 but
  can't b/c it's two words... if it was html I could just put , but
since
 I
  can't do that in php, does anyone know what to do?
 
  prob. a stupid question,
  thanks a lot,
  Matt

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread DvDmanDT
Well, server name is your main domain... Network domain... Hmm... Not sure
if that's where you enter your IP or your top-level domain...

Try network domain: geobop.org, servername: www.geobop.org... The installer
is just confusing really.. It's much easier to just open httpd.conf in
notepad.. It's very well explained.. :)

About PHP... Download PHP from snaps.php.net, to the right, there's windows
vversions of 4.3.* and 5.0.*... They are the development verisons however...
Usually works (I use them)...

If IIS is installed... Goto the services controll panel and disable it...

If you got dozens domains, mod_l33t is highly recommended, but it's only for
Apache 1.3 which I use under both Me, 2k and XP btw... Apache 2.0 just cause
problems with PHP... Well, I haven't really confirmed it yet, but if you
read on the php.net manual page, you'll see it's not recommended yet...
Unless you run as CGI which I wouldn't recommend for anything in this
world... It's much slower, and the computer is slowed down noticably after
about 50 requests... At least it was like that for me with my old setup...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Scratch the first two questions - I figured out the MIS Installer and
 downloaded it, and it looks like the IIS server isn't installed on my
 computer.

 But a couple other questions popped up when I began installing Apache:

 What do I type in for Network Domain and Server Name?

 I have over a dozen websites, or are they asking for information that
 relates to my computer?

 Or should I just pick my biggest website and list www.geobop.org under
 Network Domain, then get the Server Name from my ISP?

 Thanks.

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread DvDmanDT
Nothing wrong with having 3 versions of Apache 1.3 and 5 or so of Apache 2..
.:) I got PHP4.3.4, 3.0.17, 5.0RC1-dev, at least 5 different perl versions,
two versions of TCL, same with python, I got Apache modules for all of these
as well... Sure isn't nessecary, but I'm sure learning lots from it...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:

  If you got dozens domains, mod_l33t is highly recommended, but it's only
for
  Apache 1.3 which I use under both Me, 2k and XP btw... Apache 2.0 just
cause
  problems with PHP... Well, I haven't really confirmed it yet, but if you
  read on the php.net manual page, you'll see it's not recommended yet...
  Unless you run as CGI which I wouldn't recommend for anything in this
  world... It's much slower, and the computer is slowed down noticably
after
  about 50 requests... At least it was like that for me with my old
setup...
 

 Thanks for the tips, but there's one thing I should point out - I won't
 actually be using Apache with my online domains (at least, I don't think
 so). I'm just going to use it on my computer to preview and test web
 pages before I publish them to my websites, which are hosted by ISP's
 that use Apache servers.

 But if I'm using it only locally, and I also have PHP on my computer,
 then I should probably take your advice and download Apache 1.3.

 I'm not really sure what I'm talking about (yet), but it should become
 clearer once I get Apache installed!

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread DvDmanDT
Also, I feel like I wanna tell yo some about myself, so you don't make your
descissions cause of me.. I'm 14 years old, live in sweden, learning
programming in C right now (made my first PHP module a week ago.. :)) I also
play around some with Apache 1.3 Api... I've been using PHP since 4.1.. I've
helped lots of friends with installation though...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:

  If you got dozens domains, mod_l33t is highly recommended, but it's only
for
  Apache 1.3 which I use under both Me, 2k and XP btw... Apache 2.0 just
cause
  problems with PHP... Well, I haven't really confirmed it yet, but if you
  read on the php.net manual page, you'll see it's not recommended yet...
  Unless you run as CGI which I wouldn't recommend for anything in this
  world... It's much slower, and the computer is slowed down noticably
after
  about 50 requests... At least it was like that for me with my old
setup...
 

 Thanks for the tips, but there's one thing I should point out - I won't
 actually be using Apache with my online domains (at least, I don't think
 so). I'm just going to use it on my computer to preview and test web
 pages before I publish them to my websites, which are hosted by ISP's
 that use Apache servers.

 But if I'm using it only locally, and I also have PHP on my computer,
 then I should probably take your advice and download Apache 1.3.

 I'm not really sure what I'm talking about (yet), but it should become
 clearer once I get Apache installed!

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-12 Thread DvDmanDT
Swedish, English, and in few hours I'm gonna have french as well...
Although, my primary language would still be PHP... :s Sweden is a really
nice place really.. :)

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:

  Also, I feel like I wanna tell yo some about myself, so you don't make
your
  descissions cause of me.. I'm 14 years old, live in sweden, learning
  programming in C right now (made my first PHP module a week ago.. :)) I
also
  play around some with Apache 1.3 Api... I've been using PHP since 4.1..
I've
  helped lots of friends with installation though...
 

 Holy cow, you know more about computers than I do, speak two languages,
 and you're safe from President George W. Bush.

 I'm jealous! :)

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



[PHP] Re: PHP Installation Questions

2004-01-12 Thread DvDmanDT
Errm... Just unzip the php zip, so that php.exe is located in c:\php (or D:\
or something).. For example C:\php\php.exe... Then, find your Apache config
file in the Apache\conf folder, named httpd.conf.. Open it, scroll down to
the bottom, then add

LoadFile C:/PHP/php5ts.dll
LoadModule C:/PHP/php5Apache.dll
AddType application/x-httpd-php .php .php5
AddType application/x-httpd-php-source .phps

Then restart Apache, 'NET STOP Apache', 'NET START Apache' for example...
php.net/manual/en/, click install..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I'm running Windows XP Pro and just installed Apache 1.3. It appears to
 be running, so I guess I'm ready to install PHP.

 I visited http://snaps.php.net and downloaded the latest PHP program -
 CVS (5.0.x-dev). I'm reading the installation instructions at
 http://cvs.php.net/co.php/php-src/win32/install.txt and find them fairly
 confusing.

 First, it says, There are two main ways to install PHP for Windows:
 either manually or by using the InstallShield installer.

 I definitely want to do it the easy way, but how do I access the
 InstallShield installer?

 But it appears that I first have to do two other things:

 1. Stop Apache

 2. Decide whether I want to install PHP as a CGI or something else (a
 module?)

 So how do I stop Apache, and should I install PHP as a CGI or choose the
 other option? I'm going to be using PHP on websites, primarily to make
 server side includes and, eventually, to do some work with databases.

 The instructions say, Once the installation has completed the installer
 will inform you if you need to restart your system, restart the server,
 or just start using PHP.

 I assume this refers to using the InstallShield, which renders just
 about everything else on the installation instructions page moot, right?

 If I use the InstallShield, will I still have to install the Windows
 extensions, or are they installed automatically?

 Later, the instructions talk about Installing PHP on Windows with Apache
 1.3.x. It says, There are two ways to set up PHP to work with Apache
 1.3.x on Windows. One is to use the CGI binary (php.exe), the other is
 to use the Apache module dll. In either case you need to stop the Apache
 server, and edit your httpd.conf or srm.conf to configure Apache to work
 with PHP. We'll refer to either of these files with httpd.conf in the
text.

 Is this all done automatically if I use the InstallShield?

 Thanks.

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



[PHP] Re: PHP Installation Questions

2004-01-12 Thread DvDmanDT
There really should be one named httpd.conf.. Otherwise, that might be the
one named httpd if you have extensions on filenames off (not recommended in
any way)... Also, it should be
LoadModule php5_module C:/PHP/php5Apache.dll
sorry, my misstake.. :)

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:
  Errm... Just unzip the php zip, so that php.exe is located in c:\php (or
D:\
  or something).. For example C:\php\php.exe... Then, find your Apache
config
  file in the Apache\conf folder, named httpd.conf.. Open it, scroll down
to
  the bottom, then add
 
  LoadFile C:/PHP/php5ts.dll
  LoadModule C:/PHP/php5Apache.dll
  AddType application/x-httpd-php .php .php5
  AddType application/x-httpd-php-source .phps
 
  Then restart Apache, 'NET STOP Apache', 'NET START Apache' for
example...
  php.net/manual/en/, click install..


 H... I can't locate a file named httpd.conf, but the conf folder
 contains two files named httpd and httpd.default, which appear to be
 identical twins.

 They both end with this:

 #
 # 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 /www/docs/dummy-host.example.com
 #ServerName dummy-host.example.com
 #ErrorLog logs/dummy-host.example.com-error_log
 #CustomLog logs/dummy-host.example.com-access_log common
 #/VirtualHost


 * * * * * * * * * *

 So I'm assuming you're teling me to change it to this:

 #
 # 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 /www/docs/dummy-host.example.com
 #ServerName dummy-host.example.com
 #ErrorLog logs/dummy-host.example.com-error_log
 #CustomLog logs/dummy-host.example.com-access_log common
 #/VirtualHost

 LoadFile C:/PHP/php5ts.dll
 LoadModule C:/PHP/php5Apache.dll
 AddType application/x-httpd-php .php .php5
 AddType application/x-httpd-php-source .phps

 * * * * * * * * * *

 Right? And do you think I should do it to the httpd file, the
 httpd.default file or both?

 Thanks.

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



[PHP] Re: Ver 5.0 Questions ...

2004-01-12 Thread DvDmanDT
What's the real difference.. We are talking something like 1-2 months I
think... Although, there was thoughts about releasing 5.0 in 2002 as well
IIRC..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Chris Tenharmsel [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Dvdmandt wrote:

  Try beta3, or rc1-dev from snaps.php.net, if it works there, it'll work
in
  5.0, currently, it's bugfix only for RC1, and RC1 isn't very far from
the
  release, so I really don't think anyting would get changed... Also,
seems
  to me like objects and references are kinda the highest priority in 5.0
  (along with XML support), but that's only my impression..
 
  To view the history.. Check cvs, and read the NEWS file...
 

 Is there some current timeline for php5 though? like approximate release
 date, release month, anything?  We're evaluating whether or not we want to
 start a new project using PHP5 or PHP4, and I'd really like to make a push
 for PHP5.

 -Chris

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



[PHP] Re: PHP Installation Questions

2004-01-12 Thread DvDmanDT
Errm.. Ok, don't download the installer.. That'll just bring you more
problems.. :s The easiest way is to just download the *-win32.zip file, and
extract to c:\php, and possibly move all files cause the extraction proggy
might place them in C:\php\php-4.3.4... when you want them in C:\php... Now,
in php5, the dll's are placed somewhat different... Here's a snippet from my
httpd.conf:
###
# PHP 4
LoadFile C:/PHP/php4ts.dll
Loadmodule php4_module c:\php\sapi\php4apache.dll

# PHP 5  (deactivated)
# LoadFile D:/PHP5/php5ts.dll
# Loadmodule php5_module D:\php5\php5apache.dll

# Associate files
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


If you add them as the last lines, you don't need that AddModule line.. That
loadfile line is there to ease upgrades, you can workaround that if you move
some files...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 H... The first installation ended with this message:

 Sorry, the software to automatically configure the Apache httpd.conf
 file has not yet been written. You will have to configure Apache
 manually. See the install txt file for more details.

 It then occurred to me that I forgot to tell you that I'm installing PHP
 4.3.4; there was a problem with 5.0, so I downloaded 4.3.4 instead.

 So instead of adding this to my conf/httpd file:

 LoadFile C:/PHP/php5ts.dll
 LoadModule php5_module C:/PHP/php5Apache.dll
 AddType application/x-httpd-php .php .php5
 AddType application/x-httpd-php-source .phps

 I replaced every instance of php5 with php4, so the conf/httpd file ends
 like this:

 # 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 /www/docs/dummy-host.example.com
 #ServerName dummy-host.example.com
 #ErrorLog logs/dummy-host.example.com-error_log
 #CustomLog logs/dummy-host.example.com-access_log common
 #/VirtualHost

 LoadFile C:/PHP/php4ts.dll
 LoadModule php4_module C:/PHP/php4Apache.dll
 AddType application/x-httpd-php .php .php4
 AddType application/x-httpd-php-source .phps

 * * * * * * * * * *

 But I get the same error message.

 Then I replaced the four lines I added to the conf/httpd file with three
 lines I copied from the Installation.txt:

 LoadModule php4_module c:/php/sapi/php4apache.dll
 AddModule mod_php4.c
 AddType application/x-httpd-php .php

 I still get the same error message. However, on all three occasions when
 I clicked out of the error message, I got a message telling me PHP was
 successfully installed.

 Do you have a hunch what I should do next? Thanks.

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



Re: [PHP] Re: Ver 5.0 Questions ...

2004-01-12 Thread DvDmanDT
Don't expect it to be solved next few days.. There are some wierd problems I
think... Kinda like you don't really know what could cause them or
something...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Thomas Svenson [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi Chris,

 Chris TenHarmsel wrote:
  Well, we're interested in stability.  I figured since php4 had
  been out for a while in stable form, it would be more stable
  than php5.  Is this the case, or is there a good feeling that
  php5 will be considered stable in the next couple months?

 I've been playing around with PHP5 since before beta 2 and haven't
stumbled
 on any problems so far when coding using the new features (mainly the new
 oop model).

 However, I tried running a few PHP applications but they simply did not
work
 properly in PHP5. It's not a big problem for me since I'm going to build
my
 new project from scratch and have decided that, even if it isn't released
 yet, I'm going for PHP5 due to the new features in it.

 One thing that does disturb me a bit though is that very little is to be
 found about if the recommendation not to use Apache2 with PHP4 still seems
 to apply for PHP5 as well. It's a bit  confusing since Apache2 been stable
 for a long time. I am expecting that the issues not recommending it for
PHP4
 will be solved for PHP5.

 /Thomas

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



[PHP] Re: Function returns

2004-01-11 Thread DvDmanDT
Well... Definitly depends on what kind of function it is... However, instead
of echoing in a function, most ppl recommend echo do_it(), were do_it() is
function do_it()
{
return Hi;
}

There are many builtin functions without a return value, simply cause they
don't need to, or there's no real logic in doing so... If you have a
function named something like output_fmt($str), which is only meant to
format a string and output it, there might not need a return value... Maybe
the output itself, but you get the idea.. Some things just doesn't make
sense to return... And some things might return to a parameter... Right now
I can't think of an example though..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Shawn McKenzie [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Maybe a dumb question, but as good coding practice, should all functions
 return something even if they don't need to???

 Example:

 function do_it()
 {
echo hi;
 }

 --or--

 function do_it()
 {
return echo hi;
 }

 Also, if they do other things but really don't return anything, should
they
 return true maybe???

 Just curious!
 -Shawn

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



[PHP] Re: Ver 5.0 Questions ...

2004-01-11 Thread DvDmanDT
Try beta3, or rc1-dev from snaps.php.net, if it works there, it'll work in
5.0, currently, it's bugfix only for RC1, and RC1 isn't very far from the
release, so I really don't think anyting would get changed... Also, seems to
me like objects and references are kinda the highest priority in 5.0 (along
with XML support), but that's only my impression..

To view the history.. Check cvs, and read the NEWS file...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Peter [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]

 I was wondering if there is a timeline for version 5, if so where can I
 find it ...

 Also I am developing an application that I pass a lot of objects by
 reference, will that cause problems in version 5 ?

 As far as I can see in the http://www.php.net/zend-engine-2.php there is
 nothing there to suggest that this will be a problem

 thanks

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



[PHP] Re: Exception number: c0000005 (access violation

2004-01-11 Thread DvDmanDT
Doesn't that mean the threads try to access the same variable at the same
time? Or is it 'The memory could not be read/written'.. If it's the latter
one... Tends to happend on free() in my C programs/extensions in XP... It's
really strange accutually.. I'm starting to suspect some virus or something
in my system32 folder...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Gunter Sammet [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I have 4.3.5-dev (Build Dec-22-2003) installed on a W2K Dell Inspiron 7500
 and I am getting an error which I don't get with 4.1.1 and 4.3.4. Would
like
 to learn how to debug things like that. Here is a dump of Dr. Watson:

 Application exception occurred:
 App:  (pid=2228)
 When: 1/10/2004 @ 14:51:33.711
 Exception number: c005 (access violation)

 * System Information *
 Computer Name: DELL
 User Name: Administrator
 Number of Processors: 1
 Processor Type: x86 Family 6 Model 8 Stepping 3
 Windows 2000 Version: 5.0
 Current Build: 2195
 Service Pack: 4
 Current Type: Uniprocessor Free
 Registered Organization: SammySolutions.com ltd.
 Registered Owner: Gunter Sammet

 * Task List *
0 Idle.exe
8 System.exe
  148 smss.exe
  172 csrss.exe
  168 winlogon.exe
  220 services.exe
  232 lsass.exe
  384 svchost.exe
  436 svchost.exe
  488 spoolsv.exe
  512 ati2plab.exe
  536 ibserver.exe
  580 APACHE.exe
  708 regsvc.exe
  728 MSTask.exe
  732 APACHE.exe
  968 snmp.exe
 1028 stisvc.exe
 1060 vsmon.exe
 1112 WinMgmt.exe
 1136 svchost.exe
 1164 svchost.exe
  120 Explorer.exe
 1460 jusched.exe
 1448 interserver.exe
 1440 Atiptaxx.exe
 1420 EM_EXEC.exe
 1392 zapro.exe
  640 internat.exe
 1512 AirPlus.exe
 1520 trillian.exe
 1760 mysqld-nt.exe
 1796 PostCastServer..exe
 1820 gcdnssrv.exe
 1860 OUTLOOK.exe
  996 IEXPLORE.exe
 1916 IEXPLORE.exe
 1980 IEXPLORE.exe
 2020 IEXPLORE.exe
 2060 IEXPLORE.exe
 2100 IEXPLORE.exe
 2184 PHPEdit.exe
 2200 DBGLIS~1.exe
 2168 IEXPLORE.exe
 2280 IEXPLORE.exe
 2192 IEXPLORE.exe
 1084 APACHE.exe
 1020 APACHE.exe
 2228 php.exe
 1532 drwtsn32.exe
0 _Total.exe

 (0040 - 0040D000)
 (77F8 - 77FFB000)
 (1000 - 1015)
 (7C4E - 7C599000)
 (77E1 - 77E75000)
 (77F4 - 77F7C000)
 (7505 - 75058000)
 (7503 - 75044000)
 (7800 - 78045000)
 (7C2D - 7C332000)
 (77D3 - 77D9E000)
 (7502 - 75028000)
 (77A5 - 77B3C000)
 (779B - 77A4B000)
 (1F7C - 1F7F4000)
 (76B3 - 76B6E000)
 (6318 - 631E5000)
 (7171 - 71794000)
 (782F - 78538000)
 (00CC - 00CD6000)
 (6E42 - 6E426000)
 (75E6 - 75E7A000)
 (782C - 782CC000)
 (7798 - 779A4000)
 (7734 - 77353000)
 (7752 - 77525000)
 (7732 - 77337000)
 (7515 - 7515F000)
 (7517 - 751BF000)
 (7C34 - 7C34F000)
 (751C - 751C6000)
 (7795 - 7797A000)
 (773B - 773DF000)
 (7738 - 773A3000)
 (7783 - 7783E000)
 (7788 - 7790E000)
 (7C0F - 7C152000)
 (774E - 77513000)
 (774C - 774D1000)
 (7753 - 77552000)
 (7736 - 77379000)
 (777E - 777E8000)
 (777F - 777F5000)
 (74FD - 74FEE000)
 (7501 - 75017000)

 State Dump for Thread Id 0x738

 eax=0001 ebx=0005 ecx=0098 edx=00794010 esi=0012fd18
 edi=00ce
 eip=77fcc2e2 esp=0012fb0c ebp=0012fca4 iopl=0 nv up ei pl zr na po
 nc
 cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=
 efl=0246


 function: RtlAllocateHeap
 77fcc2ca 51   pushecx
 77fcc2cb 51   pushecx
 77fcc2cc 81ec7401 sub esp,0x174
 77fcc2d2 53   pushebx
 77fcc2d3 56   pushesi
 77fcc2d4 57   pushedi
 77fcc2d5 8b7d08   mov edi,[ebp+0x8]
 ss:00bd9b8a=
 77fcc2d8 897da4   mov [ebp+0xa4],edi
 ss:00bd9b8a=
 77fcc2db 8065b800 and byte ptr [ebp+0xb8],0x0
 ss:00bd9b8a=??
 77fcc2df 8b450c   mov eax,[ebp+0xc]
 ss:00bd9b8a=
 FAULT -77fcc2e2 0b4710   or  eax,[edi+0x10]
 ds:01789ee6=
 77fcc2e5 89450c   mov [ebp+0xc],eax
 ss:00bd9b8a=
 77fcc2e8 a9600f037d   testeax,0x7d030f60
 77fcc2ed 0f856aee jne _eFSQRT+0xe93 (77fcb15d)
 77fcc2f3 817d100080
 ss:00bd9b8a=
   cmp dword ptr [ebp+0x10],0x8000
 77fcc2fa 0f835dee jnb _eFSQRT+0xe93 (77fcb15d)
 77fcc300 837d1000 cmp   dword ptr [ebp+0x10],0x0
 ss:00bd9b8a=
 77fcc304 0f8424f8 je  RtlSizeHeap+0x228 (77fcbb2e)
 77fcc30a 8b4510   mov eax,[ebp+0x10]
 ss:00bd9b8a=
 77fcc30d 83c00f   add eax,0xf
 77fcc310 24f8 and al,0xf8
 77fcc312 8945e0

Re: [PHP] Returning Newbie (Disoriented)

2004-01-11 Thread DvDmanDT
PHP is pretty much the same, the only difference I've ever noticed in how to
install them...

About Foxserv, phpdev, phptriad, phperl and so on: They'll work nice and
great.. But within few days, you'll anyway find yourself changing the config
files manually. :p Installing all manually isn't hard at all... If you want
help, I can guide you through it... If you wanna use PHP/Apache, it's better
to setup them yourself.. That way you'll understand just about everything
better.. :)

Ryan: just wondering, does the acronym 'FH' mean anything to you (it was a
host)?
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com

Ryan A [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey,
 Sorry I cant answer all your questions but can answer one important one, I
 have tried foxserv and triad and quite a few others...finally what I
settled
 down to was phpdev (do a search on google to see where to download.) its
 packed with features and I have never had a problem with it from the time
I
 installed it. It installed pretty easy and the guy who makes it is real
cool
 and will help you via the forum. Also options to run other things like
 PERL

 By default it installs a pretty decient and recient version of php, mysql
 and apache.

 HTH.

 Cheers,
 -Ryan

 On 1/12/2004 1:40:05 AM, Freedomware ([EMAIL PROTECTED]) wrote:
  I've been lurking on this list for quite some time. I did a little
  homework, downloaded a preconfigured package (Apache, PHP and MySQL),
  and was beginning to learn the ropes when I had a rather severe hard
  drive crash, along with other computer and website problems. (Actually,
  I had only installed Apache and was trying to get it to work.)
 
  I'm
  now back up and running and would like to give it another shot.
  I'd
  like to ask a few questions. Some may be a bit redundant, but I want to
  make sure I'm
  starting out right.
 
  My operating system is Windows XP Pro, and
  I've already begun using the
  .php extension on my webpages in preparation for using PHP. (See
  http://www.geobop.org/test/index.php )
 
  Which PHP do you recommend I download - 3.0, 4.0 or 5.0? Your PHP
  tutorial at http://www.php.net/tut.php offers a link to preconfigured
  packages (Apache, PHP and MySQL). I noticed that the package that got
  the most votes by far is FoxServ (over 4,000 votes) -
  http://www.hotscripts.com/Detailed/9942.html  Therefore, I'm
  tentatively
  choosing it, due to its popularity.
 
  According to their website, at http://www.foxserv.net/portal.php,
  FoxServ is an Apache / mySQL / PHP installer package fo

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-11 Thread DvDmanDT
Perl is just an older language.. AFAIK, php can do all perl can do, and the
other way round.. Although, PHP is being developed more active than Perl it
seems... Maybe due to php being like at least 10 years younger (I think it's
accutually something like 25 years difference)... Perl is harder to read but
it's more.. well, you don't need to type as much in perl as in php.. Char
effiency or whatever.. Some ppl like perl, some php...

activestate.com, cpan.org

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Freedomware [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Ryan A wrote:

 It installed pretty easy and the guy who makes it is real cool
  and will help you via the forum. Also options to run other things like
  PERL

 Thanks for the tip. You raised one other question I have - PERL.

 I know nothing about it, but I just wondered how it fits into the big
 scheme of things. Am I correct in understanding that PHP is, in the
 broadest sense, a more user friendly PERL equivalent, and that people
 who have mastered PHP still use PERL for doing certain advanced
 functions that PHP can't handle?

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



Re: [PHP] Returning Newbie (Disoriented)

2004-01-11 Thread DvDmanDT
Just wondering... :) It was a host about a year ago.. Someone named Ryan was
in the team, and I have a slight memory of him trying pre configured
packages..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Ryan A [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey,

  Thanks for the tip. You raised one other question I have - PERL.
 
  I know nothing about it, but I just wondered how it fits into the big
  scheme of things. Am I correct in understanding that PHP is, in the
  broadest sense, a more user friendly PERL equivalent, and that people
  who have mastered PHP still use PERL for doing certain advanced
  functions that PHP can't handle?

 Sorry, cant answer that question either :-p coz I dont use PERL, but have
 been
 told to learn as its not that much different from PHP, I just feel its
nice
 to have
 that option...just in case.

 /***DvDman*
 Ryan: just wondering, does the acronym 'FH' mean anything to you (it was a
 host)?
 ***/
 Nope, no idea what the acronym 'FH' means...why?

 Cheers,
 -Ryan

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



[PHP] Re: Very confusing problem!

2004-01-07 Thread DvDmanDT
Like John said, make sure you have
$paging=new paging_class(); or $paging=new paging_class();
Is it exactly the same script (each php page) or is it just the class that
is the same? Cause if the latter one, maybe you create an instance of the
object in the main file, and not in the included one...

If that fails, make sure you turn notices on, make sure the register_globals
setting is the same on both servers.. Not sure how, but register_globals
seems to be able to break almost anything...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Aaron Wolski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey guys,

 Having a problem with a script I have used before in another project.

 First off. this is the error I am getting:

 Fatal error: Call to a member function on a non-object in
 /services/webpages/a/t/somedomain.com/secure/Store/index.php on line 140

 The line of code is this:

 $paging-query(SELECT * FROM ProductTable);

 At the top of the page I have this:

 require(../paging_class.php);

 I can post the paging_class.php file if anyone needs but it hasn't
 changed from when I used it on another site. The only thing that has
 changed is server type (current: Linux previously: BSD). Both are
 running PHP 4.3.2.


 ANY help is desparately appreciated!

 Thanks so much.

 Aaron



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



[PHP] Re: readfile from startpos to endpos

2004-01-05 Thread DvDmanDT
Like Matt Grimm said, add +14, and do fseek($file,$startPos);

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Jlake [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I've been looking around for a bit and can't quite find what I'm looking
to
 do.

 I want to read a file (from a pattern matched start position) to (a
pattern
 matched end position)

 $startPos = strpos($file, '!- start -');
 $endPos = strpos($file, '!- end -');

 $stuff = fread($file, ($endPos - $startPos));

 something like that ?

 Thanks,

 J.

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



[PHP] Re: Echo HTML code Verses breaking out of ?php ?

2003-11-21 Thread DvDmanDT
?HTML? is almost double as fast according to some stats I saw a while ago
(at phpbeginner.com).. But that's compared to HTML, using singlequotes is
faster ('HTML')... But I haven't confirmed those stats...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Joe Harman [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hello,

 I would like some opinions, or hopefully facts on a few things... Maybe
 some people can help me out here.

 A friend of mine and I were discussing which is best way to use PHP
 building dynamic pages, here are the 2 methods we are comparing.. They
 are in the simplest terms here... But try to imagine a very intesive PHP
 appliaction with huge MySQL queries...


 First Item
 -
 table width=500 border=0 cellspacing=0 cellpadding=0
   tr
 td?php echo Hello World; ?/td
   /tr
 /table


 Second Item
 -
 ?php
 echo table width=\500\ border=\0\ cellspacing=\0\
 cellpadding=\0\;
   echo tr;
 echo tdHello World/td;
   echo /tr;
 echo /table;
 ?


 Now I would say that the first item is the most efficient simply because
 you are not making PHP process the ECHO of HTML code... It's more
 efficient to let the browser do that since it has to interperat it
 anyhow. Am I correct assuming this?

 Thanks!
 Joe

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



[PHP] Re: GD question

2003-11-17 Thread DvDmanDT
$im=imagecreatetruecolor(9,9);
$im2=imagecreatefrompng('tile.png');
imagecopy($im,$im2,0,0,0,0,3,3);
imagecopy($im,$im2,3,0,0,0,3,3);
imagecopy($im,$im2,6,0,0,0,3,3);
imagecopy($im,$im2,0,3,0,0,3,3);
imagecopy($im,$im2,6,3,0,0,3,3);
imagecopy($im,$im2,0,6,0,0,3,3);
imagecopy($im,$im2,3,6,0,0,3,3);
imagecopy($im,$im2,6,6,0,0,3,3);
imagepng($im);
imagedestroy($im);imagedestroy($im2);

or something like that.. :s
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
René fournier [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
I want to write a function the creates a new image composited from a
3x3 tile. The idea is that the center tile will be a photo, and the
surrounding eight images will constitute a border and shadow to the
composited image. So... The eight border/shadow images will always be
the same, but the center image will be unique.

Anyways, I've been playing with GD functions for a little while, and
would appreciate any suggestions on how to accomplish this. I haven't
been able to find a good tutorial on this kind of thing
specifically—compositing tiles of images into a single image.

Any ideas?

...Rene=

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



[PHP] Re: From form to an array

2003-11-17 Thread DvDmanDT
Hmm... Intresting... Like... Hmm.. Name the elements of the second form like
input name=array1[LINE_NUM] input name=array2[LINE_NUM]

Then turn on register_globals, then you'll very automaticly have $array1 and
$array2..
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Jeff McKeon [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Is it possible to pass the values of a form directly into an array?

I have a multi level, dynamic form.  The first level (first form
actually) askes how many levels there are and gives you a field to enter
in that number.

Then upon submit of form1 it creates a new form (form2) that contains 2
fields for each level (the number of levels was entered in form1).  So
if you entered 2 in the first form, you'd be given another form with 2
lines, each containing 2 fields.

Ok, now on submit of this second form I want to take field1 from each
line and put it into $array1 and field2 from each line and put it into
$arrray2.

Then pass those array's to a function as elements.  Any idea how I can
do this?

Thanks,

Jeff

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



[PHP] Re: passing second function through a function

2003-11-17 Thread DvDmanDT
function call_some_function($function,$args=NULL)
{
eval($function($args)); // Or something like that..
$function(); // also works I think..
}
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Ian Truelsen [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 What I want to do is to call a function from within a function, but pass
 the secondary function name through the first function. Like this:

 function1(function2)

 Then call function2 from within function1. Unfortunately, I have been
 unable to figure out the proper syntax for calling the second function.

 Does anyone know if this is possible and what the proper syntax would be
 for calling a function from a variable name?

 -- 
 Ian Truelsen
 Email: [EMAIL PROTECTED]
 AIM: ihtruelsen
 Homepage: http://www.ihtruelsen.dyndns.org

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



[PHP] Re: Moving to php

2003-11-16 Thread DvDmanDT
PHP is 99% (if not 100%) backwards compitable... PHP is even stable on
WinME, and on XP.. Lots of ppl use it on 2k as well... Works fine.. And fast
(well, depending on your installation and configuration)... Oh, and about
support.. PHP on windows accutually have it's own official list/newsgroup
(php-win or php.windows).. :)

MySQL and PHP is very good friends.. :)

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Jim Van Heule [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I'm seriously considering moving to php from a competing 3rd party
 application. I have a few basic questions.

 1. What is the predominate OS platform php runs on? Recommended?

 2. I'm currently well versed in Win 2000  OS X. Are both Well
supported?

 3. When php comes out with a new major version (i.e. php 4 - 5), how
 backward compatible is it? Basically, will I need to do a lot of recoding
 each time there is a new version in order to upgrade? (This is the biggy.)

 4. We are currently standardized on MySQL. I'm assuming MySQL is the
 database of choice or am I wrong?

 -- 
 Jim

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



Re: [PHP] Re: Moving to php

2003-11-16 Thread DvDmanDT
Well, yes.. But chanses aren't all that big you'll find any bugs (at least
not windows specific), unless you try the w32api extension or bcompiler
combined with zend optimizer...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Derek Ford [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 DvDmanDT wrote:

 PHP is 99% (if not 100%) backwards compitable... PHP is even stable on
 WinME, and on XP.. Lots of ppl use it on 2k as well... Works fine.. And
fast
 (well, depending on your installation and configuration)... Oh, and about
 support.. PHP on windows accutually have it's own official list/newsgroup
 (php-win or php.windows).. :)
 
 MySQL and PHP is very good friends.. :)
 
 
 
 PHP on windows platforms isn't as good as it 'could be'. A lot of the
 windows oriented bugs go unfixed, because most core hackers don't care.
 The major opinion is why fix bugs on a buggy platform?.

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



Re: [PHP] Re: Moving to php

2003-11-16 Thread DvDmanDT
Cool.. Weird.. I've used PHP since 4.1.0, on windows ME/Apache 1.3, using
streams, sockets, w32api, gd, classes, printers and more, never ran into any
other problems that w32api and bcompiler combined with Zend stuff.. :s

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Derek Ford [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 DvDmanDT wrote:

 Well, yes.. But chanses aren't all that big you'll find any bugs (at
least
 not windows specific), unless you try the w32api extension or bcompiler
 combined with zend optimizer...
 
 
 
 I've ran into many. The ones that really take the cake are the streams
 bugs, which have been around since the inception of socket support.



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



[PHP] Re: PHP session won't die!

2003-11-08 Thread DvDmanDT
setcookie(session_name(),,0,/);
session_unset();
session_destroy();

or something like that...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
[EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
I cannot, for the love of Job, get a login session to die!   I am defining
my sessions using the $_SESSION superglobal, register_globals is off, and I
have tried about 15 combinations of unset(), session_unregister(),
session_destroy(), session_unset(), $_SESSION = array(), and even setcookie
using a time in the past.  As soon as a user gets back to a pagePlease, if
you can offer me any information on how a page with a session_start call,
everything is magically restored as though I never touched the sessions.
Please, if you have any idea what the DEFINATIVE way to absolutely and
completely kill this session is OR if you know where I should post this
question, I would be forever in debt!

Thanks for your time.

Rob.

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



Re: [PHP] BTML 2.0 released!!!

2003-11-07 Thread DvDmanDT
Oh.. I'm personally trying to avoid not top-posting, cause I think it's
nicer when ppl place the message at the top where I can read it instantly
without scrolling down.. :s So why bottompost?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Burhan Khalid [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Pablo Gosse wrote:

  Hi Burhan.  I have a quick question about what you write below that I
  don't want to post to the whole list?
 
  What is it meant to top post?  I've mainly been a lurker in forums
  such as phpbuilder and devshed until recently, but this list is proving
  to be a much better resource than those two.
 
  Can you please let me know what it means to top post when you have a
  moment?
 

 Top post means posting on top of the text (what you did). Always paste
 below the text that you are replying to (what I did).

 -- 
 Burhan Khalid
 phplist[at]meidomus[dot]com
 http://www.meidomus.com
 ---
 Documentation is like sex: when it is good,
   it is very, very good; and when it is bad,
   it is better than nothing.

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



Re: [PHP] BTML 2.0 released!!!

2003-11-07 Thread DvDmanDT
Well, that's a bit overdue... I don't reverse the order of my posts... But
anyway... I guess not everyone (you for example) follow threads like I do...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Jay Blanchard [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on mailing lists?

[snip]
Oh.. I'm personally trying to avoid not top-posting, cause I think it's
nicer when ppl place the message at the top where I can read it
instantly
without scrolling down.. :s So why bottompost?
[/snip]

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



[PHP] Re: PHP Themes/Wallpapers

2003-11-07 Thread DvDmanDT
Isn't there things like that on the official php.net site?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Phplover [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
Hi,

Wouldn't that be good if PHP is on the desktop.
I feel that we can show our support to PHP by putting wallpapers, themes or
ICON's.

I can't find any themes/wallpapers with PHP logo on the net.
If you find any pls let me know

Thanks  Regards,
___
PHPLover

Göd döësn't pläy dícë.
- Älbërt Ëínstëín



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



Re: [PHP] BTML 2.0 released!!!

2003-11-07 Thread DvDmanDT
Well, if the historians want to read it later, that's their problem... :D
J/k, but think about all mess they have to go through when reading the posts
with comments in the middle of the mails... In my opinion it's best to read
the entire thread anyway, cause ppl trim posts...

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Jason Wong [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 On Saturday 08 November 2003 03:35, Robert Cummings wrote:
  I disagree.

 Yes, I think you disagreed with me last time as well :-)

 And if you keep doing that I might to forced to start using InterJinn!

  I usually trim replies regardless of whether I top or bottom
  post.

 And kudos to you for that, but ...

  And while I didn't have to scroll to read this email, I often have
  to scroll for longer emails when it is bottom posted. Which seems kinda
  silly to me since I've already read the thread.

 ... but the mailing list is not about *you*. Who cares if *you* have
already
 read it because *you* was following the thread? Think about the future
 historians who will be reading these archives - and the incoherent mess
 they'll have to trawl through because of top-posting!

 -- 
 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 a cow laughed real hard, would milk come out her nose?
 -- Why Why Why n8
 */

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



[PHP] Re: hard(?) syntax problem

2003-11-04 Thread DvDmanDT
You could try
$tmp=constant(PL_ORT);
$value=$tmp[$key];

But I doubt it'll work..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Adam I Agnieszka Gasiorowski Fnord [EMAIL PROTECTED] skrev i
meddelandet news:[EMAIL PROTECTED]

 I want to access a value of an array
  by key, but the array is not a variable
  - it is a constant.

 How do I do it?

 I tried

 $value = PL_ORT[$key];

 , but this doesn't work (parse error)...

 I even tried

 $value = {PL_ORT[$key]};

 -- 
 Seks, seksiæ, seksolatki... news:pl.soc.seks.moderowana
 http://hyperreal.info  { iWanToDie }   WiNoNa)   (
 http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
 Poznaj jej zwiewne kszta³ty... http://www.opera.com 007

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



Re: [PHP] Idea for new operator

2003-10-27 Thread DvDmanDT
Will he get one?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Leif K-Brooks [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Larry E. Ullman wrote:

  I was feeling generous so I went back in time and added this
  functionality to PHP as of version 3. I call it the strcasecmp
  function. I placed the description and usage of the function in the
  PHP manual: http://www.php.net/strcasecmp

 That was nice of you, but he wanted an operator.

 -- 
 The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.

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



Re: [PHP] Randomizing 3 different numbers.

2003-10-27 Thread DvDmanDT
Dont you mean || at the last loop? You loop as long as 3 is equal to both 1
and 2, || would cause it to loop while it's equal to any of them..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Ray Hunter [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Before you add a number to a string make sure that the number is not in
 any of the other ones if they exist.

 Use a do-while loop on it...

 $one = rand( 1,20 );
 do {
   $two = rand( 1, 20 );
 }while( $two == $one );

 do {
   $three = rand( 1, 20 );
 }while( ($three == $one)  ($three == $two) );

 echo One: $one\n;
 echo Two: $two\n;
 echo Three: $three\n;

 HTH

 --
 Ray

 On Mon, 2003-10-27 at 05:26, Ian Gray wrote:
  I am tring to output 3 different random numbers between 1
  and 20 into 3 different strings.  Using Rand() for each
  string isn't sufficient as I may get the same number
  repeated for one of the other strings- eg 1,1,3 or 5,3,3 .
  It's important that I get three different numbers outputted
  into for example $one, $two, $three.
 
  Can anyone help?
 
  Ian
 
  =
 
  -
  Ian A. Gray
  Manchester, UK
  Telephone: +44 (0) 161 224 1635 - Fax: +44 (0) 870 135 0061 - Mobile:
+44 (0) 7900 996 328
  Business Enquiries:  +44(0)870 770 8832
  E-mail: [EMAIL PROTECTED]: www.baritone.uk.com
(Performance) www.vocalstudio.co.uk   (Vocal
Tuition)www.selectperformers.com   (Web design for professional musicians)
  -

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



[PHP] Re: function help simple redirect

2003-10-27 Thread DvDmanDT
$payment = 1;

function payment(){
global $payment;
if ($payment == 0){
header (Location: test_page.html);
}
elseif ($payment == 1) {
header (Location: test_page2.html);
}
}
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Frank Tudor [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Sorry I'm getting this error message

 Parse error: parse error, unexpected T_ELSEIF

 __
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 http://launch.yahoo.com/promos/britneyspears/

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



Re: [PHP] RE: function help redirect help

2003-10-27 Thread DvDmanDT
 Can you see the problem(s) now? Never underestimate the benefits of
writing
 clean code. :-)

Hehe, you should see my code..

function dp_neg($v1,$v2){
$neg = ((substr((string)$v1,0,1)==-)||((substr((string)$v2,0,1)==-)));
$bneg= ((substr((string)$v1,0,1)==-)((substr((string)$v2,0,1)==-)));
if(!$bneg  $neg){
$tmp=$v1*$v2;
$tmp=(string)$tmp;
$an=str_replace(-,+,$tmp);
}
else{
$an=-.($v1*$v2);
}
return $an;
}
function xyz($f,$s){
$f=s_str($f);
$s=s_str($s);
$t=($f==$s)?$f:s_str($f.$s);
return $t;
}
function s_str($str)
{$l=strlen($str);for($x=0;$x$l;$x++){$ar[]=$str{$x};}sort($ar);return
implode('',$ar);}
$e_a[0]=gs($e1);$e_a[1]=gs($e2);
$e_a[2]=gs($e3);$e_a[3]=gs($e4);
for($i=0;$i4;$i++){
$t[$i]=split(:,$e_a[$i]);}
$r[0][0]=dp_neg($t[0][3],$t[2][3]);
$r[0][1]=xyz($t[0][2],$t[2][2]);
$r[1][0]=dp_neg($t[0][3],$t[3][3]);
$r[1][1]=xyz($t[0][2],$t[3][2]);
$r[2][0]=dp_neg($t[1][3],$t[2][3]);
$r[2][1]=xyz($t[1][2],$t[2][2]);
$r[3][0]=dp_neg($t[1][3],$t[3][3]);
$r[3][1]=xyz($t[1][2],$t[3][2]);
for($i=0;$i4;$i++){
$exp .=
((substr($r[$i][0],0,1)==-)?$r[$i][0].$r[$i][1]:($r[$i][0].$r[$i][1])).
;}


No, that probably wont compile as that's only a little part of it, but still
a pretty easy part of it.. :)
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##

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



[PHP] Re: preg match compilation error

2003-10-27 Thread DvDmanDT
Start and end with same char, for example with a / or a #... Like
if(preg_match(#[^a-zA-Z0-9,._\+\()\-]#,$filename))


-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Luis Lebron [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I found a reqular expresion that I'm using to check for valid characters
in
 file names.

 Here's the sample code:

 if(preg_match([^a-zA-Z0-9,._\+\()\-],$filename))
 {
 //blah, blah, blah
 }

 However, when I run the script I get the following error:
 Warning: Compilation failed: unmatched parentheses at offset 17 in
 /home/httpd/sigmarapid/html/test/upload.php on line 137 (the line with the
 preg_match)

 I'm new to regular expressions so any help would be greatly appreciated.

 Luis R. Lebron
 Sigmatech, Inc


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



Re: [PHP] Code optimization: single vs. double quotes?

2003-10-27 Thread DvDmanDT
It's said that you shouldn't use tables for layout, but does people
accutually listen to that? And what instead?

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
Curt Zirzow [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 * Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
  --- Chris W. Parker [EMAIL PROTECTED] wrote:
   Exactly what is the problem with:
  
   echo td bgcolor=\$bgcolor2\nbsp;/td/tr;
  
   I don't see the problem.
 
  I agree with you, actually. The only things I don't like are:
 
  1. The use of the bgcolor attribute
  2. The name of the variable :-)
  3. The fact that your td is not tabbed in
  4. The closing tr being on the same line
 
  But, everyone has different tastes. I tend to choose whichever format
makes my
  HTML look perfect while requiring the least amount of syntax in PHP.

 5. no newline after the tr. :)

 There are some broswer issues with tr and td's not being on the
 same line.  But I guess that shouldn't matter much cause tables
 shouldn't be used for layout design.


 Curt
 -- 
 My PHP key is worn out

   PHP List stats since 1997:
 http://zirzow.dyndns.org/html/mlists/

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



[PHP] Re: how to use pclzip class

2003-10-25 Thread DvDmanDT


// -
---
  // Function : PclZip()
  // Description :
  //   Creates a PclZip object and set the name of the associated Zip
archive
  //   filename.
  //   Note that no real action is taken, if the archive does not exist it
is not
  //   created. Use create() for that.


// -
---

Example:
$zipfile=uploaded.zip;
$zip=new PclZip($zipfile);
$file_list= $zip-listContent();
$file_list[$index]
  - [filename]   (not sure)
  - [stored_filename]  (filename in archive)
  - [size]  (uncompressed size)
  - [compressed_size]   (name says it all)
  - [index](index in archive)
  - [mtime]   (last mod)

$zip-extractByIndex($index_to_extract,./folder_to_extract_into/);

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenterhcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##
David T-G [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]

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



[PHP] Re: problem with intval and !=

2003-10-23 Thread DvDmanDT
Outputs
Number: 12, Value: 12.3
Bad

for me running XP home nosp, Apache 1.3.28 mod_php 4.3.4rc2, or as
standalone cgi...

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
Cesar Cordovez [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Can somebody explain me why is this happening?

 $value = 12.3;
 $number = intval($value);

 echo Number: $number, Value: $valuebr;
 // echoes: Number: 12, Value: 12.3

 if ($number != $value) {
 echo Bad;
 } else {
 echo Good;  // echoes Good!!
 }


 The previous should be echoing Bad.  (I think!)

 Cesar

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



[PHP] Age from birthdate?

2003-10-22 Thread DvDmanDT
How would I get the age of someone if I store the birthdate in a date field?
I just realized FLOOR((UNIX_TIMESTAMP(NOW()) -
UNIX_TIMESTAMP(birthdate))/60/60/24/365.25)  wont work for persons born
before 1970... :p I must get the current age in years, and I must be able to
select by age... :p Any ideas?

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]

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



[PHP] Re: php_w32api.dll ... fatal error

2003-10-21 Thread DvDmanDT
One of the notes tells you about how to use it... It is somewhat changed
from what the documentation says...

$api = new win32;

$api-definetype(MEMORYSTATUS {
long dwLength;
long dwMemoryLoad;
long dwTotalPhys;
long dwAvailPhys;
long dwTotalPageFile;
long dwAvailPageFile;
long dwTotalVirtual;
long dwAvailVirtual;
});
$api-registerfunction(long GlobalMemoryStatus (MEMORYSTATUS a) From
kernel32.dll);
$api-registerfunction(long memstat_phys (long a1,long a2) From
w32apitest.dll);
$api-registerfunction(long memstat_pf (long a1,long a2) From
w32apitest.dll);
$api-registerfunction(long cool (MEMORYSTATUS a1) From w32apitest.dll);
$a=$api-InitType(MEMORYSTATUS);
$api-GlobalMemoryStatus($a); // call a w32api function


-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
Jon [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 When trying to run the following script, it returns the following error
 ...Fatal error: Call to undefined function:
w32api_register_function()
 Does this w32api extension work?

 // Define constants needed, taken from
 // Visual Studio/Tools/Winapi/WIN32API.txt
 define(MB_OK, 0);

 // Load the extension in
 dl(php_w32api.dll);

 // Register the GetTickCount function from kernel32.dll
 w32api_register_function(kernel32.dll,
   GetTickCount,
  long);

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



[PHP] Re: cok-Re: [PHP] Re: Session hijacking

2003-10-19 Thread DvDmanDT
$_REQUEST is a great superglobal, check it out...
And at the top of the hijacked script:

while(list($tmp1,$tmp2)=each($_SESSION))
$$tmp1=$tmp2;
$tmp1=tmp2=NULL;

Could work.. :p
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
Ryan A [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey,

  Use an ini_set in your sessions script (I am assuming that you are using
a
  seperate script to manage your sessions)

 Not really, I use authenticate for the login, then above each script i
have
 a session_start() throughout the site.
 Its gotten to be a habit that i start a script with session_start() then
 continue writing.

  you might start looking for replacements for those
  scripts as it takes time to make the changes, but it has been a year
since
  register_globals were turned off by default and mentioned that they were
  going away in the future.

 Ok, something to think about, I guess as i get some time I'll have to sit
 down and make those changes.

  In addition, take a look at some of the other suggestions that were
made,
  beyond this one.

 Yep, lots of brainy guys here.

 Thanks for replying.

 Cheers,
 -Ryan

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



[PHP] Re: DvDanDT-Re: [PHP] Re: Session hijacking

2003-10-19 Thread DvDmanDT
The 'above' would make all items of $_SESSION array into variables... Errm..
$_SESSION[id] would become $id, $_SESSION[username] would become
$username and so on...

Not completely sure this'll work, but most likely as they already exist and
you only change their values, so they should remain globals... Guess it's
just to try.. :p

The $$ is not a typo, it means the name of the new variable should be the
value of the other one...
$tmp=hello;
$$tmp = world;
echo $hello; // will output 'world'

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
Ryan A [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hey,
 Thanks for replying.

 **
 $_REQUEST is a great superglobal, check it out...
 And at the top of the hijacked script:

 while(list($tmp1,$tmp2)=each($_SESSION))
 $$tmp1=$tmp2;
 $tmp1=tmp2=NULL;

 Could work.. :p
 

 Can you tell me what the above does please? (am quite a newbie) and whats
 the :-p for?
 plus is that double dollar ($$tmp) a typo?

 Thanks,
 -Ryan

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



[PHP] Re: $_POST in MySQL query issue...

2003-10-16 Thread DvDmanDT
$sql=insert into $table set Name = '.$_POST[elementName].';
or even better:
$sql=insert into .$table. set Name = '.$_POST[elementName].';

But the method both Jake and Bao suggested will also work (temporary var)...
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
Adam Reiswig [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Greetings to all.  I am trying for the life of me to place a $_POST[]
 variable in my MySQL query.  I am running the latest stable versions of
 PHP, MySQL and Apache 2 on my Win2kPro machine.  My register_globals are
 set to off in my php.ini.  My code I am attempting create is basically
 as follows:

 $table=elements;
 $sql=insert into $table set Name = '$elementName';

 This works with register_globals set to on.  But, I want to be able to
 turn that off.  My code then, I am guessing, be something as follows:

 $table=elements;
 $sql=insert into $table set Name = '$_POST[elementName]';

 Unfortunately this and every other combination I can think of,
 combinations of quotes that is, does not work.  I believe the source of
 the problem is the quotes within quotes within quotes. I also tried:

 $sql='insert into $table set Name = '.$_POST[elementName];
or
 $sql=insert into $table set Name = .$_POST['elementName'];

 and several other variations.

 Can anyone give me some pointers to inserting $_POST[] statements inside
 of query statements?  I am sure there must be a way but I have spent a
 lot of time on this and am really stumped here.  Thanks for any help.

 -Adam Reiswig

 PS if anything here is not clear to you, please let me know and I'll
 clarify as I can.  Thanks again.

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



[PHP] Age from date field?

2003-10-11 Thread DvDmanDT
Does anyone have a good solution on how to get the age of someone from a
date column in mysql... This is what I have, but it's not really the
truth... What's the right way to do it?

floor((time()-$a[born])/(3600*24*365.25))

where $a[born] is the timestamp of the birthdate... Current query:

SELECT UNIX_TIMESTAMP(birthdate) as born FROM members WHERE id='1'

So... how would I do it... Doesn't matter if it's MySQL or PHP that
calculates it, as long as I can expect it to work on paid hosts...

Any suggestions? Notice that I'm only looking for the age in years... Thanks
in advance
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]



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



  1   2   >