[PHP-CVS] cvs: php4 /pear/Cache Output.php

2001-03-16 Thread Ulf Wendel

uw  Fri Mar 16 00:40:40 2001 EDT

  Modified files:  
/php4/pear/CacheOutput.php 
  Log:
  Usage example changes should answer peoples FAQs.
  
  
Index: php4/pear/Cache/Output.php
diff -u php4/pear/Cache/Output.php:1.12 php4/pear/Cache/Output.php:1.13
--- php4/pear/Cache/Output.php:1.12 Thu Mar 15 23:58:35 2001
+++ php4/pear/Cache/Output.php  Fri Mar 16 00:40:39 2001
@@ -17,7 +17,7 @@
 // |  Vinai Kopp [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Output.php,v 1.12 2001/03/16 07:58:35 sbergmann Exp $
+// $Id: Output.php,v 1.13 2001/03/16 08:40:39 uw Exp $
 
 require_once 'Cache.php';
 
@@ -36,10 +36,10 @@
 *
 *  // place this somewhere in a central config file
 *  define(CACHE_STORAGE_CLASS, "file");
-* // file storage needs a dir to put the cache files
-* define(CACHE_DIR, "/var/tmp/");
+*  // file storage needs a dir to put the cache files
+*  define(CACHE_DIR, "/var/tmp/");
 *
-* // get a cache object
+*  // get a cache object
 *  $cache = new Cache_Output(CACHE_STORAGE_CLASS, array("cache_dir" = CACHE_DIR));
 *
 *  // compute the unique handle.
@@ -50,12 +50,20 @@
 *  //   "post" = $HTTP_POST_VAS"
 *  //   "cookie"  = $HTTP_COOKIE_VARS
 *  //);
+ Output.php
+*  // But be warned, using all GET or POST Variables as a seed
+*  // can be used for a DOS attack. Calling 
+http://www.example.com/example.php?whatever
+*  // where whatever is a random text might be used to flood your cache.
 *  $cache_handle = $cache-generateID($REQUEST_URI);
+===
+*  $cache_handle = $cache-generateID($REQUEST_URI);
+ 1.12
 * 
 *  // now the magic happens: if cached call die() 
 *  // to end the time consumptiong script script execution and use the cached value!
 *  if ($content = $cache-start($cache_handle)) {
 * print $content;
+* print "pCache hit/p";
 * die();
 *  }
 *  
@@ -63,17 +71,27 @@
 * 
 *  // store the output of the cache into the cache and print the output.
 *  print $cache-end();
+*  print "pCache miss, stored using the ID '$id'./p";
+* 
+*  If you do not want to cache a whole page - no problem:
 * 
-* If you do not want to cache a whole page - no problem:
+*  if (!($content = $cache-start($cache_handle))) {
+* // do the computation here
+* print $cache-end()
+*  } else {
+ print $content;
+*  }
 * 
-* if (!($content = $cache-start($cache_handle))) {
-*// do the computation here
-*print $cache-end()
-* } else {
-print $content;
-* }
+*  If you need an example script check the (auto_)prepend and (auto_)append 
+*  files of my homepage:
+* 
+*http://www.ulf-wendel.de/php/show_source.php?file=prepend
+*http://www.ulf-wendel.de/php/show_source.php?file=append
+*
+*  Don't know how to use it or you need profiling informations?`
+*  Ask Christian he was patient with me and he'll be so with your questions ;).
 *
-* Have fun!
+*  Have fun!
 * 
 * @authors  Ulf Wendel [EMAIL PROTECTED]
 * @version  $ID: $



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /pear/Cache Output.php

2001-03-16 Thread Egon Schmid

eschmid Fri Mar 16 00:50:39 2001 EDT

  Modified files:  
/php4/pear/CacheOutput.php 
  Log:
  Ulf, you have a conflict.
  
Index: php4/pear/Cache/Output.php
diff -u php4/pear/Cache/Output.php:1.13 php4/pear/Cache/Output.php:1.14
--- php4/pear/Cache/Output.php:1.13 Fri Mar 16 00:40:39 2001
+++ php4/pear/Cache/Output.php  Fri Mar 16 00:50:39 2001
@@ -17,7 +17,7 @@
 // |  Vinai Kopp [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Output.php,v 1.13 2001/03/16 08:40:39 uw Exp $
+// $Id: Output.php,v 1.14 2001/03/16 08:50:39 eschmid Exp $
 
 require_once 'Cache.php';
 
@@ -50,14 +50,10 @@
 *  //   "post" = $HTTP_POST_VAS"
 *  //   "cookie"  = $HTTP_COOKIE_VARS
 *  //);
- Output.php
 *  // But be warned, using all GET or POST Variables as a seed
 *  // can be used for a DOS attack. Calling 
http://www.example.com/example.php?whatever
 *  // where whatever is a random text might be used to flood your cache.
 *  $cache_handle = $cache-generateID($REQUEST_URI);
-===
-*  $cache_handle = $cache-generateID($REQUEST_URI);
- 1.12
 * 
 *  // now the magic happens: if cached call die() 
 *  // to end the time consumptiong script script execution and use the cached value!



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Website, Design, hosting and maintenance for only $999.00 per year

2001-03-16 Thread Mal McKay

strange that they don't use their own domain name...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 04:14
To: [EMAIL PROTECTED]
Subject: [PHP] Website, Design, hosting and maintenance for only $999.00
per year


Website, Design, hosting and maintenance for only $999.00 per year,
by NetmarkDesign.

Looking for a cost effective, professionally designed website?  Our program
enables you to budget your internet base expenses upfront.  We offer
in-house
design, hosting and marketing.  Put all your internet operations under one
roof.

If you have an existing site and would like a quotation to convert, upgrade
or redesign we offer 48 hour no obligation proposals tailored to your needs.

See us at Top Ten Traffic Sites at www.greatfreesite.net/bestten where
we've been ranked number 5 as the most cost effective website provider and
take the next step to your success.

NetmarkDesign


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mail() implementation problem

2001-03-16 Thread Mathieu Arnold



Manuel Lemos wrote:
 
 Hello,
 
 Mathieu Arnold wrote:
 
  Hi
 
  The actual implementation of the mail fonction use sendmail -t and
  relies on sendmail to parse the headers to get the recipients.
  It would be great if it was possible to switch from this way of using
  sendmail to a more classic
  sendmail -f sender rcpt
  it should be quite easy, but I lack time to do it.
 
 You may want to try this PHP MIME message composing and sending class
 that has subclasses for sending messages using directly sendmail, qmail
 or even a SMTP server.
 
 http://phpclasses.UpperDesign.com/browse.html/package/9

looks nice, but I'm not going to ask all my clients to change their php
scripts ;)
I just need to change the way php calls sendmail :)
I believe I'm going to do it myself next week or so.

-- 
Mathieu Arnold

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Image from db

2001-03-16 Thread Kassai Istvan

Hello everyone!

Could anyone help me? My problem is the following:
I have to insert an image from a PostgreSQL database(Large Object), into
a web- page.


How can I make it?

Thanks, bye!
Istvan Kassai


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

Hi,

I have been playing around trying to build a 'perfect' shopping cart. A brief 
as possible feature list: database driven, fully indexable by search engines, 
and can operate without cookies.

I decided to use Apache's mod_rewrite to change a standard looking URL into 
something php can use easily.

   ex:  http://www.mydomain.com/produce/carrots/spec1/94d0bb50cd.html

would become

 http://www.mydomain.com/index.php?dept=produceproduct=carrots;
specials=spec1PHPSESSID=94d0bb50cd

Now for the problem, when a search engine spiders this it will be including 
the session id. Unless I do some kind of checking, I could end up with 
multiple users having the same session id -- if they click into the site from 
a search engine or a bookmark.

The best solution I have come up with is to add a timestamp variable inside 
the URL. If the timestamp is more than 1 hour old -- reassign a new timestamp 
and session id then build the page as specified by the other variables passed 
to the script. 

I was wondering if anyone knows of a more elegant solution for this problem.

thanks,
don
 



Re: [PHP] FAQ

2001-03-16 Thread Christian Reiniger

On Thursday 15 March 2001 17:22, you wrote:
 people wouldnt use an FAQ, when you see three people ask the exact same
 question on one single day, you know they dont read the other post, or
 care. if they wont read the posts on the same day they wont read an
 FAQ, they keep posting.

Yep. But if there's a FAQ the answers can be greatly simplified :)

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Windows 2000, PHP, mySQL: multiple users and security

2001-03-16 Thread Dezider Góra

Hello Alain,

from my point of view, the easiest way would be to use Apache on Win2k ( I got
1.3.17 installed and running very fine) and use Apache to control access to user
home directories which would be restricted realms. As for PHP, sapi module seems
to be stable for me. Download the full php 4.0.4Pl1 archive from
http://www.php4win.de, unpack to desired directory, move the php4ts.dll to
winnt\system32 directory, and copy/move php4apache.dll to apache's modules
directory.
Then add:
LoadModule php4_module modules/php4apache.dll
directive to httpd.conf under modules directive, uncomment lines:
AddType application/x-httpd-php .php .php3 .phtml .inc .php4 (I add couple
more extensions to be sure that all scripts are parsed with php, and inc is
important if you use include files)
AddType application/x-httpd-php-source .phps
And configure apache as desired. Add index.php, default.php to autoindex files,
etc.

If you don't want to create restricted directories for each group, you could
create 16 http.conf files, where the only difference would be webroot and
docroot directory. For example using c:\wwwroot as uppermost directory for
storing documents, create 16 directories like group01, group02 ... group16 which
will be root directories for each group.
Then in httpd.conf01 the DocumentRoot will look like this
DocumentRoot "c:/webroot/group01"
and also Directory directive
Directory "c:/webroot/group01"
For group02 change group01 to group02, etc.
Then the only thing you'd need would be copy corresponding httpd.confxy to
\apache\conf\httpd.conf and restart apache. Php.ini and my.ini shouldn't need
any change.

When configuring php, I found one small gotcha, if you want to use curl library,
you have to copy SSLeay32.dll and libeay32.dll from \php\dlls to winnt\system32
directory. If you want to use gd functions with gif creations, enable gd_gif.dll
in extensions directives.
For mysql I'd create one database per group and allow access only to that group.
Or allow access to everyone, and assign full rights to the owning group.

just my .02 cents.

hth
Dezider.

Alain Fontaine wrote:

 Hello,

 My former school has invited me to teach a small course (32 hours) about web
 development, and I will of course teach PHP and mySQL. The question I now
 have is the following: How shall I best go about installing PHP and mySQL on
 a Windows 2000 computer (no Linux, sorry) so that each of the 16 groups of
 students have access to their files, databases, etc, without having problems
 with security ? I know how to configure mySQL access rights, so that will be
 fine. I can also install a small FTP server so that everyone has access to a
 subdirectory of the wwwroot directory. But how about PHP?

 If anyone has already done this, I'd be more than happy to hear from you.
 Basically, I am in the situation of setting up a "micro hosting provider"
 with PHP, mySQL support, running Win2k ;)

 Thanks !

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] output to html file

2001-03-16 Thread yawstick

I have some scripts to build pages that will be sent to a production server.
Is is possible to redirect the page to a file with an html extention that
could be sent via the ftp functions to the production server.

Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread John

Hello,

Try the following code:

?php

$gGlobal = 1;
function ChangeGlobalValue()
{
global $gGlobal;

$local = 55;
$gGlobal = $local;
print "Value:Global=$gGlobalBR";
}

function ChangeGlobalRef()
{
global $gGlobal;

$local = 99;
$gGlobal = $local;
print "Ref:Global=$gGlobalBR";
}

print "Global=$gGlobalBR";
ChangeGlobalValue();
print "Global=$gGlobalBR";
ChangeGlobalRef();
print "Global=$gGlobalBR";
?

I get the following results:

Global=1
Value:Global=55
Global=55
Ref:Global=99
Global=55 === shouldn't this be 99 ???

Why does setting a global variable to a reference fail in a function?

Tested on PHP 4.0.4 on IIS5 (CGI version).




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding the depth

2001-03-16 Thread Christian Reiniger

On Thursday 15 March 2001 16:51, you wrote:

 ok, this is what you asked for

 ?php

  function depth()
  {
   global $PHP_SELF;

   $count = count_chars($PHP_SELF);

   for($c = 0; $c  $count[ord('/')]; $c++)
$return[] = "..";

   if (isset($return))
return implode('/', $return);
  }

Won't work for the (perfectly valid) URL 
http://somewhere.de/lvl1lvl2//lvl3/foo.bar

it's quite unlikely though that someone enters such a thing

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Website, Design, hosting and maintenance for only $999.00 per year

2001-03-16 Thread Harshdeep S Jawanda

Hey! What the hell is happening? That's my company's domain name!!

Please don't anybody bother to reply to this posting by "Netmark.Desing" - its
an obvious fake. A visit to www.pspl.co.in will prove to you that we're not into
anything even remotely connected with this posting.

[EMAIL PROTECTED] wrote:

 Website, Design, hosting and maintenance for only $999.00 per year,
 by NetmarkDesign.

 Looking for a cost effective, professionally designed website?  Our program
 enables you to budget your internet base expenses upfront.  We offer
 in-house
 design, hosting and marketing.  Put all your internet operations under one
 roof.

 If you have an existing site and would like a quotation to convert, upgrade
 or redesign we offer 48 hour no obligation proposals tailored to your needs.

 See us at Top Ten Traffic Sites at www.greatfreesite.net/bestten where
 we've been ranked number 5 as the most cost effective website provider and
 take the next step to your success.

 NetmarkDesign

--
Regards,
Harshdeep Singh Jawanda.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Finding the depth

2001-03-16 Thread Christian Reiniger

On Friday 16 March 2001 06:04, you wrote:
 Hi,

 Chris Lee wrote:
  ok, this is what you asked for snip/

 Thanks! I haven't tried it, but I am sure it will work.

  but why cant you just do this.
 
  echo "
  img src='/image/back.gif'
  ";

 I don't want to do that because that sort of link will work only when
 this page is served up by a web server. It won't work if I mirror my
 site onto a hard disk :-).

Well, if you use PHP you'll need some web server anyway. And all good 
mirroring tools can do automatic link conversion (absolute-relative).
So I'd just go with absolute paths.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Website, Design, hosting and maintenance for only $999.00 per year

2001-03-16 Thread Matt Williams


 [EMAIL PROTECTED] wrote:

too bad they can't even spell their own email address

M@

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] odbc+apache+w2kserver sp1 = emalloc()

2001-03-16 Thread Carsten Senf

Hi,

My configuration: w2kserver (1GB RAM etc.), last stable Apache, last
stable PHP4.

I installed Servicepack 1 to my clean w2k Server. After that PHP4.0.4pl1
generates a "FATAL:  emalloc():  Unable to allocate 2147483599 bytes"
errormessage when I tried to call the function odbc_execute(). Before
this it works! I think, any other should know about this problem.

Carsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] FAQ - Newbie perspective

2001-03-16 Thread Christian Reiniger

On Friday 16 March 2001 08:09, you wrote:

 I recently asked a pretty simple question on this list ("Finding the
 depth"). I could have found out the answer to it in about 10-15 minutes
 on my own, thanks to my experience with programming. Still, I posted
 the question to this list. Why?

 What did I gain:

* I saved time.
* I got to see _PHP_code_ for solving my problem. Any solution from
 me would have been more C++ than PHP. I got to become more familiar
 with thinking the PHP way.

 The question is: how many of you think that that posting was "ok" and
 how many had to curb the temptation to flame me :-)?

I thought it was "ok" and didn't want to flame you - until now when I saw 
that you "could have found out the answer to it in about 10-15 minutes" 
on your own (well, not realy). In such a situation the correct thing is 
IMO to actually spend these 10-15 minutes and then post your code and ask 
the list how this could be done better.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] ODBC to mysql?

2001-03-16 Thread Costas

Is it possible to use odbc to connect to a mysql database.

If not which database functions should i use



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] Sessions in Functions

2001-03-16 Thread Jordan Elver

Hi,
Yep I do. I just figured out that it was because I had session_start() inside 
another function ;-)

Thanks anyway,

Jord

On Friday 16 March 2001 10:43, you wrote:

  Did you declare $LOGGED_IN as a global variable in your function?

 e.g.

   global $LOGGED_IN;


   _

 ~ Richard Allsebrook ~
 Applications Developer and Webmaster
 Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
 http://www.easysoft.com http://www.easysoft.com  -
 http://www.cinema.com http://www.cinema.com
 "A computer lets you make more mistakes faster than any invention in
 human history - with the possible exceptions of handguns and tequila."

   _





 -Original Message-
 From: jjelver [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:41 AM
 To: php-db
 Cc: jjelver
 Subject: FW: [PHP-DB] Sessions in Functions


 Hi,
 I have some code which I decided to make into a function. Some of the
 code
 updates a session var which holds the current time. It now does not
 work.

   // update session variable with new time
 session_register("LOGGED_IN['time']");
 $LOGGED_IN['time'] = mktime();

 Are there issues that I should be aware of when I use sessions like
 this?

 Thanks,

 Jord


Content-Type: application/rtf; charset="ISO-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: base64
Content-Description: 



Content-Type: application/ms-tnef; charset="ISO-8859-1"; name="Attachment: 2"
Content-Transfer-Encoding: base64
Content-Description: 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread Yasuo Ohgaki
This is expected behavior of PHP's reference. Reference works like a pointer,
but it dose NOT works like a pointer. This is case  that reference does not
works as many programmer expected.

I think this is in manual.

Hint: when programmer use 'global $var'. It is the same as do '$var = 
$GLOBALS['var']'.

Regards,

Yasuo Ohgaki
=
My favorite links
 [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
 [PHP Manual] http://www.php.net/manual/en/

 Hello,

 Try the following code:

 ?php

 $gGlobal = 1;
 function ChangeGlobalValue()
 {
 global $gGlobal;

 $local = 55;
 $gGlobal = $local;
 print "Value:Global=$gGlobalBR";
 }

 function ChangeGlobalRef()
 {
 global $gGlobal;

 $local = 99;
 $gGlobal = $local;
 print "Ref:Global=$gGlobalBR";
 }

 print "Global=$gGlobalBR";
 ChangeGlobalValue();
 print "Global=$gGlobalBR";
 ChangeGlobalRef();
 print "Global=$gGlobalBR";
 ?

 I get the following results:

 Global=1
 Value:Global=55
 Global=55
 Ref:Global=99
 Global=55 === shouldn't this be 99 ???

 Why does setting a global variable to a reference fail in a function?

 Tested on PHP 4.0.4 on IIS5 (CGI version).




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread John

Thanks Yasuo,

That might explain why $gGlobal is not permanently set to 99,
but that doesn't explain why $gGlobal is set to 55 in ChangeGlobalValue()
permanently. So are you or am I missing something?

Bye, John

""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 This is expected behavior of PHP's reference. Reference works like a
pointer,
 but it dose NOT works like a pointer. This is case  that reference does
not
 works as many programmer expected.

 I think this is in manual.

 Hint: when programmer use 'global $var'. It is the same as do '$var = 
 $GLOBALS['var']'.

 Regards,

 Yasuo Ohgaki
 =
 My favorite links
  [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
  [PHP Manual] http://www.php.net/manual/en/

  Hello,
 
  Try the following code:
 
  ?php
 
  $gGlobal = 1;
  function ChangeGlobalValue()
  {
  global $gGlobal;
 
  $local = 55;
  $gGlobal = $local;
  print "Value:Global=$gGlobalBR";
  }
 
  function ChangeGlobalRef()
  {
  global $gGlobal;
 
  $local = 99;
  $gGlobal = $local;
  print "Ref:Global=$gGlobalBR";
  }
 
  print "Global=$gGlobalBR";
  ChangeGlobalValue();
  print "Global=$gGlobalBR";
  ChangeGlobalRef();
  print "Global=$gGlobalBR";
  ?
 
  I get the following results:
 
  Global=1
  Value:Global=55
  Global=55
  Ref:Global=99
  Global=55 === shouldn't this be 99 ???
 
  Why does setting a global variable to a reference fail in a function?
 
  Tested on PHP 4.0.4 on IIS5 (CGI version).
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/pdf config.m4

2001-03-16 Thread Sascha Schumann

sas Fri Mar 16 04:23:32 2001 EDT

  Modified files:  
/php4/ext/pdf   config.m4 
  Log:
  Don't do anything, if the user wants no PDF.
  
  
Index: php4/ext/pdf/config.m4
diff -u php4/ext/pdf/config.m4:1.15 php4/ext/pdf/config.m4:1.16
--- php4/ext/pdf/config.m4:1.15 Sun Mar 11 17:20:13 2001
+++ php4/ext/pdf/config.m4  Fri Mar 16 04:23:30 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.15 2001/03/12 01:20:13 sniper Exp $
+dnl $Id: config.m4,v 1.16 2001/03/16 12:23:30 sas Exp $
 
 PHP_ARG_WITH(pdflib,whether to include PDFlib support,
 [  --with-pdflib[=DIR] Include pdflib 3.x support. DIR is the pdflib
@@ -25,6 +25,8 @@
   AC_ADD_LIBRARY(png)
   AC_ADD_LIBRARY(jpeg)
   AC_ADD_LIBRARY(z)
+  ;;
+no)
   ;;
 *)
   test -f $withval/include/pdflib.h  PDFLIB_INCLUDE="$withval/include"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Benchmarks

2001-03-16 Thread Phil Driscoll

Posted in a discussion on Slashdot today was a this link:

http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4id=9351
4159

A performance comparison of various web scripting languages. PHP does rather
well!

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: How do you keep your scripts secure?

2001-03-16 Thread Jim Jagielski

Keith Vance wrote:
 
 The Zend encoder seems cool, but for $2400? What happened to the Zend
 Compiler, is that what the Zend Encoder is? The Zend Encoder would
 definetly be worth it if you were selling your code, but I haven't tried
 it out.
 

Yes, the Zend Encoder is the Zend Compiler, it just went through
a name change, to more accurately reflect what it does. After all,
it's the Zend Engine itself which compiles.
-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "Hell is hot, that's never been disputed by anybody."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Good Free PHP Editor?

2001-03-16 Thread V e r b a l

On 12 Mar 2001 03:51:13 -0800, [EMAIL PROTECTED] (Nick Davies) wrote:

How about linux ones?

I just tend to use vim or emacs but i'm sure there are some out there.

I've used Xemacs. Do you know if there is a PHP mode for it?

Otherwise you could check out Screem (www.screem.org) or Quanta
(quanta.sourceforge.com).

V

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/pdf config.m4

2001-03-16 Thread Sascha Schumann

sas Fri Mar 16 04:25:26 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/pdf   config.m4 
  Log:
  Don't do anything, if the user wants no PDF.
  
  
Index: php4/ext/pdf/config.m4
diff -u php4/ext/pdf/config.m4:1.15 php4/ext/pdf/config.m4:1.15.2.1
--- php4/ext/pdf/config.m4:1.15 Sun Mar 11 17:20:13 2001
+++ php4/ext/pdf/config.m4  Fri Mar 16 04:25:25 2001
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.15 2001/03/12 01:20:13 sniper Exp $
+dnl $Id: config.m4,v 1.15.2.1 2001/03/16 12:25:25 sas Exp $
 
 PHP_ARG_WITH(pdflib,whether to include PDFlib support,
 [  --with-pdflib[=DIR] Include pdflib 3.x support. DIR is the pdflib
@@ -25,6 +25,8 @@
   AC_ADD_LIBRARY(png)
   AC_ADD_LIBRARY(jpeg)
   AC_ADD_LIBRARY(z)
+  ;;
+no)
   ;;
 *)
   test -f $withval/include/pdflib.h  PDFLIB_INCLUDE="$withval/include"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/imap php_imap.c

2001-03-16 Thread Jani Taskinen

sniper  Fri Mar 16 05:17:55 2001 EDT

  Modified files:  
/php4/ext/imap  php_imap.c 
  Log:
  Make compile again when ZTS is enabled and imap-2000 is used. Bug #9762
  
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.62 php4/ext/imap/php_imap.c:1.63
--- php4/ext/imap/php_imap.c:1.62   Wed Feb 28 23:06:54 2001
+++ php4/ext/imap/php_imap.cFri Mar 16 05:17:54 2001
@@ -25,7 +25,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.62 2001/03/01 07:06:54 chagenbu Exp $ */
+/* $Id: php_imap.c,v 1.63 2001/03/16 13:17:54 sniper Exp $ */
 
 #define IMAP41
 
@@ -366,6 +366,8 @@
  */
 void mail_getquota(MAILSTREAM *stream, char *qroot,QUOTALIST *qlist)
 {
+   IMAPLS_FETCH();
+
/* this should only be run through once */
for (; qlist; qlist = qlist-next)
{
@@ -1018,9 +1020,9 @@
 PHP_FUNCTION(imap_get_quota)
 {
zval **streamind, **qroot;
-
int ind, ind_type;
pils *imap_le_struct;
+   IMAPLS_FETCH();
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, streamind, qroot) == 
FAILURE) {
ZEND_WRONG_PARAM_COUNT();



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange PHP Reference behaviour with globals

2001-03-16 Thread Yasuo Ohgaki
- Original Message -
From: "John" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 9:12 PM
Subject: Re: [PHP] Strange PHP Reference behaviour with globals


 Thanks Yasuo,

 That might explain why $gGlobal is not permanently set to 99,
 but that doesn't explain why $gGlobal is set to 55 in ChangeGlobalValue()
 permanently. So are you or am I missing something?

Reference in PHP is not actually a pointer. It's a common pithole for C/C++
programmers.
In C/C++, you will get 99, instead of 55. But we get 55 in PHP. Here is why.

Reference is just a place holder for a value.

Your code creates referece with "global" statement asI wrote in previous mail.

global $var;

creates reference to $GLOBAL['var'] for local $var IN function scope.

$var is actually a reference, NOT a variable itself nor a pointer.

   function ChangeGlobalRef()
   {
   global $gGlobal;

Creating reference here, for $GLOBAL['gGlobal'].

  
   $local = 99;
   $gGlobal = $local;

You assign reference of "$local" to "$gGlobal" which is also a reference.

$gGlobal = $local;

This replaces $gGlobal(reference) with $local(reference).
Your code does not change $GLOBAL['gGlobal'], which is the value you want to
change.

   print "Ref:Global=$gGlobalBR";
   }

Since your code replace reference with reference inside function scope.
You get $gGlobal = 99 inside the function, but not outside the function.
(Note: Your $gGlobal is refered to $local that has 99 in the function)
Because $gGlobal itself is local to the function.

Therefore, you cannot get 99 outside the function, but 55.

I hope I explained well, so that all readers understand what I'm talking about.

Regards,
--
Yasuo Ohgaki

 Bye, John

 ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  This is expected behavior of PHP's reference. Reference works like a
 pointer,
  but it dose NOT works like a pointer. This is case  that reference does
 not
  works as many programmer expected.
 
  I think this is in manual.
 
  Hint: when programmer use 'global $var'. It is the same as do '$var = 
  $GLOBALS['var']'.
 
  Regards,
 
  Yasuo Ohgaki
  =
  My favorite links
   [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
   [PHP Manual] http://www.php.net/manual/en/
 
   Hello,
  
   Try the following code:
  
   ?php
  
   $gGlobal = 1;
   function ChangeGlobalValue()
   {
   global $gGlobal;
  
   $local = 55;
   $gGlobal = $local;
   print "Value:Global=$gGlobalBR";
   }
  
   function ChangeGlobalRef()
   {
   global $gGlobal;
  
   $local = 99;
   $gGlobal = $local;
   print "Ref:Global=$gGlobalBR";
   }
  
   print "Global=$gGlobalBR";
   ChangeGlobalValue();
   print "Global=$gGlobalBR";
   ChangeGlobalRef();
   print "Global=$gGlobalBR";
   ?
  
   I get the following results:
  
   Global=1
   Value:Global=55
   Global=55
   Ref:Global=99
   Global=55 === shouldn't this be 99 ???
  
   Why does setting a global variable to a reference fail in a function?
  
   Tested on PHP 4.0.4 on IIS5 (CGI version).
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] Strange Behaviour in non-reference globals?

2001-03-16 Thread John

Hi Yasuo,

Thanks for taking the trouble to explain everything in such detail.

Actually I understood your first message. What it doesn't explain is why:

  $gGlobal == 1  is changed permanently to $gGlobal == 55.

in the following code:

?php
function ChangeGlobalValue()
{
global $gGlobal;

$local = 55;
$gGlobal = $local;
print "Value:Global=$gGlobalBR";
}

$gGlobal = 1;
ChangeGlobalValue();
print $gGlobal;  === THIS IS 55 NOW

?


==
""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 - Original Message -
 From: "John" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, March 16, 2001 9:12 PM
 Subject: Re: [PHP] Strange PHP Reference behaviour with globals


  Thanks Yasuo,
 
  That might explain why $gGlobal is not permanently set to 99,
  but that doesn't explain why $gGlobal is set to 55 in
ChangeGlobalValue()
  permanently. So are you or am I missing something?

 Reference in PHP is not actually a pointer. It's a common pithole for
C/C++
 programmers.
 In C/C++, you will get 99, instead of 55. But we get 55 in PHP. Here is
why.

 Reference is just a place holder for a value.

 Your code creates referece with "global" statement asI wrote in previous
mail.

 global $var;

 creates reference to $GLOBAL['var'] for local $var IN function scope.

 $var is actually a reference, NOT a variable itself nor a pointer.

function ChangeGlobalRef()
{
global $gGlobal;

 Creating reference here, for $GLOBAL['gGlobal'].

   
$local = 99;
$gGlobal = $local;

 You assign reference of "$local" to "$gGlobal" which is also a reference.

 $gGlobal = $local;

 This replaces $gGlobal(reference) with $local(reference).
 Your code does not change $GLOBAL['gGlobal'], which is the value you want
to
 change.

print "Ref:Global=$gGlobalBR";
}

 Since your code replace reference with reference inside function scope.
 You get $gGlobal = 99 inside the function, but not outside the function.
 (Note: Your $gGlobal is refered to $local that has 99 in the function)
 Because $gGlobal itself is local to the function.

 Therefore, you cannot get 99 outside the function, but 55.

 I hope I explained well, so that all readers understand what I'm talking
about.

 Regards,
 --
 Yasuo Ohgaki

  Bye, John
 
  ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   This is expected behavior of PHP's reference. Reference works like a
  pointer,
   but it dose NOT works like a pointer. This is case  that reference
does
  not
   works as many programmer expected.
  
   I think this is in manual.
  
   Hint: when programmer use 'global $var'. It is the same as do '$var =

   $GLOBALS['var']'.
  
   Regards,
  
   Yasuo Ohgaki
   =
   My favorite links
[RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
[PHP Manual] http://www.php.net/manual/en/
  
Hello,
   
Try the following code:
   
?php
   
$gGlobal = 1;
function ChangeGlobalValue()
{
global $gGlobal;
   
$local = 55;
$gGlobal = $local;
print "Value:Global=$gGlobalBR";
}
   
function ChangeGlobalRef()
{
global $gGlobal;
   
$local = 99;
$gGlobal = $local;
print "Ref:Global=$gGlobalBR";
}
   
print "Global=$gGlobalBR";
ChangeGlobalValue();
print "Global=$gGlobalBR";
ChangeGlobalRef();
print "Global=$gGlobalBR";
?
   
I get the following results:
   
Global=1
Value:Global=55
Global=55
Ref:Global=99
Global=55 === shouldn't this be 99 ???
   
Why does setting a global variable to a reference fail in a
function?
   
Tested on PHP 4.0.4 on IIS5 (CGI version).
   
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
[EMAIL PROTECTED]
   
   
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 16 Mar 2001 14:05:25 -0000 Issue 570

2001-03-16 Thread php-general-digest-help


php-general Digest 16 Mar 2001 14:05:25 - Issue 570

Topics (messages 44195 through 44261):

Re: $REDIRECT_ERROR_NOTES
44195 by: Paul R. Jackson
44197 by: Yasuo Ohgaki

Re: how fast is php
44196 by: David Robley
44210 by: Chris Adams

Re: Has anyone got MSSQL2000 to connect and work properlly?
44198 by: Andrew Hill

Re: Passing JavaScript variables
44199 by: Yasuo Ohgaki

Where is my parent?
44200 by: Chien-pin Wang

Problem refreshing page after exec
44201 by: Eric Watson

Re: Reminders
44202 by: Yasuo Ohgaki

I WORKED IT OUT   Re: [PHP] $REDIRECT_ERROR_NOTES
44203 by: Paul R. Jackson

Website, Design, hosting and maintenance for only $999.00 per year
44204 by: Netmark Desing
44239 by: Mal McKay
44244 by: Harshdeep S Jawanda
44250 by: Matt Williams

sorting multi-dim arrays based on keys (like SQL's ORDER BY)
44205 by: Francisco Hernandez

Re: Chat with PHP and MySQL - come and chat about Linux problems...
44206 by: John Hinsley

Why my php page will reply "session expire" when the use press back button?
44207 by: Carfield Yim
44215 by: Yasuo Ohgaki

Re: Finding the depth
44208 by: Harshdeep S Jawanda
44243 by: Christian Reiniger
44245 by: Christian Reiniger

Thoughts on Class libraries
44209 by: Dennis Gearon
44219 by: Yasuo Ohgaki

Hmmm... What's problems?
44211 by: Al
44213 by: Rick St Jean
44220 by: Yasuo Ohgaki

Putting php at end of html?
44212 by: webmaster.xke.com
44222 by: Yasuo Ohgaki
44235 by: Richard Lynch

Re: Good Free PHP Editor?
44214 by: Andrew Halliday
44259 by: V e r b a l

the mail() again
44216 by: Nilesh Parmar

With all this talk about editors ...
44217 by: Richard McLean
44221 by: Yasuo Ohgaki
44237 by: Richard McLean

Re: FAQ - Newbie perspective
44218 by: Harshdeep S Jawanda
44236 by: Jason Lotito
44252 by: Christian Reiniger

Re: Fields, Comboboxes, repost
44223 by: Richard Lynch

Re: Send Mail Problem
44224 by: Richard Lynch

Re: mysql help!! urgent!
44225 by: Richard Lynch

Re: Using selected fields
44226 by: Richard Lynch

Re: Changing Directory rights with chgrp or exec("chown")
44227 by: Richard Lynch

Re: Dynamic pages
44228 by: Richard Lynch
44238 by: Aaron Tuller

Re: PHPDoc and file with function only
44229 by: Richard Lynch

Re: HTML character escape codes from beyond
44230 by: Richard Lynch

Re: cannot use post
44231 by: Richard Lynch

Re: select * from nmensagem m, nusuario...
44232 by: Richard Lynch

Re: Help! Cookies...
44233 by: Richard Lynch

Re: Help. creating excel file form mysql
44234 by: Richard Lynch

Re: mail() implementation problem
44240 by: Mathieu Arnold

Image from db
44241 by: Kassai Istvan

Re: Windows 2000, PHP, mySQL: multiple users and security
44242 by: Dezider Góra

Shopping Carts and Sessions
44246 by: DynamicHTML.aol.com

Re: FAQ
44247 by: Christian Reiniger

output to html file
44248 by: yawstick

Strange PHP Reference behaviour with globals
44249 by: John
44255 by: Yasuo Ohgaki
44256 by: John
44260 by: Yasuo Ohgaki

odbc+apache+w2kserver sp1 = emalloc()
44251 by: Carsten Senf

ODBC to mysql?
44253 by: Costas

Re: [PHP-DB] Sessions in Functions
44254 by: Jordan Elver

Benchmarks
44257 by: Phil Driscoll

Re: How do you keep your scripts secure?
44258 by: Jim Jagielski

Re: Strange Behaviour in non-reference globals?
44261 by: John

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



The htaccess option would not really be a great solution for me given we
have many diferent htacces files do lots of different things.

But I did try it just in case it lead me to some answers. I created a new
directory placed a .htaccess file in there with the correct stuff directing
404's to a test error page. The test error page has your exact code except I
dont mail I just displayed and it all worked, BUT the $URL variable as per
you last email just contains the URL of the error document.

I'm thinking maybe some settings in my php.ini file need to be different.
I'm looking into that now.

Paul


"David Robley" [EMAIL PROTECTED] wrote in message
01031612205409.01881@www">news:01031612205409.01881@www...
 On Fri, 16 Mar 2001 12:13, Paul R. Jackson wrote:
  Check out REQUEST_URI - from that you can build a full URL if you
   need it.
 
  The REQUEST_URI only has the URI of the error page itself (in my 

[PHP] dbadmin improved

2001-03-16 Thread Peter Van Dijck

I just tried out
http://sourceforge.net/projects/phpmyedit/
it's like Paul's dbadmin script for generating admin, but seems bettter 
(has paging, ...).
Peter
~~
http://liga1.com: building multiple language/culture websites


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/imap php_imap.c

2001-03-16 Thread Dan Kalowsky

kalowskyFri Mar 16 05:24:06 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/imap  php_imap.c 
  Log:
  This is to correct bug #9762, patch submitted by Bug reporter.
  
  
  
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.62 php4/ext/imap/php_imap.c:1.62.2.1
--- php4/ext/imap/php_imap.c:1.62   Wed Feb 28 23:06:54 2001
+++ php4/ext/imap/php_imap.cFri Mar 16 05:24:06 2001
@@ -22,10 +22,11 @@
|  Andrew Skalski  [EMAIL PROTECTED]  |
|  Hartmut Holzgraefe  [EMAIL PROTECTED]|
|  Jani Taskinen   [EMAIL PROTECTED] |
+   |  Daniel R Kalowsky   [EMAIL PROTECTED] |
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.62 2001/03/01 07:06:54 chagenbu Exp $ */
+/* $Id: php_imap.c,v 1.62.2.1 2001/03/16 13:24:06 kalowsky Exp $ */
 
 #define IMAP41
 
@@ -366,6 +367,8 @@
  */
 void mail_getquota(MAILSTREAM *stream, char *qroot,QUOTALIST *qlist)
 {
+   IMAPLS_FETCH();
+
/* this should only be run through once */
for (; qlist; qlist = qlist-next)
{
@@ -1021,6 +1024,8 @@
 
int ind, ind_type;
pils *imap_le_struct;
+
+   IMAPLS_FETCH();
 
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, streamind, qroot) == 
FAILURE) {
ZEND_WRONG_PARAM_COUNT();



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/standard dns.h

2001-03-16 Thread Jani Taskinen

sniper  Fri Mar 16 06:45:46 2001 EDT

  Modified files:  
/php4/ext/standard  dns.h 
  Log:
  Missed this one.
  
Index: php4/ext/standard/dns.h
diff -u php4/ext/standard/dns.h:1.8 php4/ext/standard/dns.h:1.9
--- php4/ext/standard/dns.h:1.8 Sat Mar 10 19:49:21 2001
+++ php4/ext/standard/dns.h Fri Mar 16 06:45:46 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: dns.h,v 1.8 2001/03/11 03:49:21 sniper Exp $ */
+/* $Id: dns.h,v 1.9 2001/03/16 14:45:46 sniper Exp $ */
 
 #ifndef DNS_H
 #define DNS_H
@@ -25,7 +25,8 @@
 PHP_FUNCTION(gethostbyaddr);
 PHP_FUNCTION(gethostbyname);
 PHP_FUNCTION(gethostbynamel);
-#if !defined(PHP_WIN32)||(HAVE_LIBBIND)
+
+#if HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32))
 PHP_FUNCTION(checkdnsrr);
 PHP_FUNCTION(getmxrr);
 #endif



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange Behaviour in non-reference globals?

2001-03-16 Thread Yasuo Ohgaki
- Original Message - 
From: "John" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 11:09 PM
Subject: Re: [PHP] Strange Behaviour in non-reference globals?


 Hi Yasuo,
 
 Thanks for taking the trouble to explain everything in such detail.
 
 Actually I understood your first message. What it doesn't explain is why:
 
   $gGlobal == 1  is changed permanently to $gGlobal == 55.
 
 in the following code:

It also expected behavior. Here is why.

 
 ?php
 function ChangeGlobalValue()
 {
 global $gGlobal;
 
 $local = 55;
 $gGlobal = $local;

$local is NOT a reference. $gGlobal is reference.
In this case, you are actually changing. $GLOBAL['gGlobal'] in this case.

I think you figures it out why now.

Regards,
--
Yasuo Ohgaki

 print "Value:Global=$gGlobalBR";
 }
 
 $gGlobal = 1;
 ChangeGlobalValue();
 print $gGlobal;  === THIS IS 55 NOW
 
 ?
 
 
 ==
 ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  - Original Message -
  From: "John" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, March 16, 2001 9:12 PM
  Subject: Re: [PHP] Strange PHP Reference behaviour with globals
 
 
   Thanks Yasuo,
  
   That might explain why $gGlobal is not permanently set to 99,
   but that doesn't explain why $gGlobal is set to 55 in
 ChangeGlobalValue()
   permanently. So are you or am I missing something?
 
  Reference in PHP is not actually a pointer. It's a common pithole for
 C/C++
  programmers.
  In C/C++, you will get 99, instead of 55. But we get 55 in PHP. Here is
 why.
 
  Reference is just a place holder for a value.
 
  Your code creates referece with "global" statement asI wrote in previous
 mail.
 
  global $var;
 
  creates reference to $GLOBAL['var'] for local $var IN function scope.
 
  $var is actually a reference, NOT a variable itself nor a pointer.
 
 function ChangeGlobalRef()
 {
 global $gGlobal;
 
  Creating reference here, for $GLOBAL['gGlobal'].
 

 $local = 99;
 $gGlobal = $local;
 
  You assign reference of "$local" to "$gGlobal" which is also a reference.
 
  $gGlobal = $local;
 
  This replaces $gGlobal(reference) with $local(reference).
  Your code does not change $GLOBAL['gGlobal'], which is the value you want
 to
  change.
 
 print "Ref:Global=$gGlobalBR";
 }
 
  Since your code replace reference with reference inside function scope.
  You get $gGlobal = 99 inside the function, but not outside the function.
  (Note: Your $gGlobal is refered to $local that has 99 in the function)
  Because $gGlobal itself is local to the function.
 
  Therefore, you cannot get 99 outside the function, but 55.
 
  I hope I explained well, so that all readers understand what I'm talking
 about.
 
  Regards,
  --
  Yasuo Ohgaki
 
   Bye, John
  
   ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
This is expected behavior of PHP's reference. Reference works like a
   pointer,
but it dose NOT works like a pointer. This is case  that reference
 does
   not
works as many programmer expected.
   
I think this is in manual.
   
Hint: when programmer use 'global $var'. It is the same as do '$var =
 
$GLOBALS['var']'.
   
Regards,
   
Yasuo Ohgaki
=
My favorite links
 [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
 [PHP Manual] http://www.php.net/manual/en/
   
 Hello,

 Try the following code:

 ?php

 $gGlobal = 1;
 function ChangeGlobalValue()
 {
 global $gGlobal;

 $local = 55;
 $gGlobal = $local;
 print "Value:Global=$gGlobalBR";
 }

 function ChangeGlobalRef()
 {
 global $gGlobal;

 $local = 99;
 $gGlobal = $local;
 print "Ref:Global=$gGlobalBR";
 }

 print "Global=$gGlobalBR";
 ChangeGlobalValue();
 print "Global=$gGlobalBR";
 ChangeGlobalRef();
 print "Global=$gGlobalBR";
 ?

 I get the following results:

 Global=1
 Value:Global=55
 Global=55
 Ref:Global=99
 Global=55 === shouldn't this be 99 ???

 Why does setting a global variable to a reference fail in a
 function?

 Tested on PHP 4.0.4 on IIS5 (CGI version).




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 

[PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Jamie Jackson

I'm looking to move from an old Web host (stormweb.net) that has
entirely stopped responding to customer support emails. I liked what
they had to offer, before they became unresponsive, so I'm looking for
a similar ISP with:

*PHP4
*MySQL
*Telnet access
*Decent Support
*Preferably a Cobalt server (or one with a VERY good Web-based
administrator, most other types of Web administrators I've seen have
been clunky and a PITA)
*Pretty Cheap

I've checked out ISP check, and it would be great if they listed the
type of Wed-based administrator, but they don't. It's VERY tedious to
get a demo account, and see that their Web-based administrator is
junk. I'm used to the very slick administrator found on Cobalt
servers. I have given up after a half-dozen attempts at other servers.
I sincerely hope someone can help.

Thank you very much,
Jamie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] echo only displays first character

2001-03-16 Thread Tom Harris

Here's an interesting problem.

The following only prints the first letter of the name

for ($i=0; isset($empid[$i]); $i++) {

echo "$empid[$i] $name[$i]br";

}

But if I change the variable $name to $employeename throughout the script it
displays fine.

$empid[] and $name[] are both assigned earlier in the script by pulling data
from a MySQL database.

Is $name a reserved word or something? Anyone know why just changing the
array's name fixes the problem?

Thanks,

-Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] ODBC to mysql?

2001-03-16 Thread yawstick

there is an article on devshed.com thats details this



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Website, Design, hosting and maintenance for only $999.00 per year

2001-03-16 Thread Mal McKay

The message isn't actually from www.pspl.co.in, or in your case from your
smtp host.
I forget exactly what header you leave out to result in an email appearing
to be from string@yourhost.com
Or maybe its when the from: header is a non email string.



-Original Message-
From: Harshdeep S Jawanda [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 10:41
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Website, Design, hosting and maintenance for only
$999.00 per year


Hey! What the hell is happening? That's my company's domain name!!

Please don't anybody bother to reply to this posting by "Netmark.Desing" -
its
an obvious fake. A visit to www.pspl.co.in will prove to you that we're not
into
anything even remotely connected with this posting.

[EMAIL PROTECTED] wrote:

 Website, Design, hosting and maintenance for only $999.00 per year,
 by NetmarkDesign.

 Looking for a cost effective, professionally designed website?  Our
program
 enables you to budget your internet base expenses upfront.  We offer
 in-house
 design, hosting and marketing.  Put all your internet operations under one
 roof.

 If you have an existing site and would like a quotation to convert,
upgrade
 or redesign we offer 48 hour no obligation proposals tailored to your
needs.

 See us at Top Ten Traffic Sites at www.greatfreesite.net/bestten where
 we've been ranked number 5 as the most cost effective website provider and
 take the next step to your success.

 NetmarkDesign

--
Regards,
Harshdeep Singh Jawanda.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Benchmarks

2001-03-16 Thread Chris Adams

On 16 Mar 2001 04:39:06 -0800, Phil Driscoll [EMAIL PROTECTED] wrote:
http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4id=9351
4159

A performance comparison of various web scripting languages. PHP does rather
well!

It's also important to note that their comment that PHP doesn't cache compiled
scripts and thus may not scale as well isn't completely true. The default
install doesn't, but you can use one of several products (Zend Cache,
Afterburner and a third whose name escapes me) to ensure that your scripts are
cached.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] the mail() again!!!!

2001-03-16 Thread Romeo Manzur

well, you try to send mail without a program to do it, you need a program like
sendmail to send mail on your windows machine, I use it on linux and works very
well...try to find sendmail for windows and confugure the php.ini on the line to
send mail...

Nilesh Parmar wrote:

 Hi
I have installed php4 with apache onto my windows 98 machine .I am trying
 to send an email using the mail() function . When i run the following piece
 of code i get a warning .Can anyone please help me figure what has gone
 wrong and suggest me with what to do.
  
 This is the code!!
 ?php
  $mailto = "[EMAIL PROTECTED];
  $mailsub = "this is a php mail() function";
  $body = " i hope this works";

if (mail($mailto ,$mailsub, $body))
  echo("successfully sent an email to $mailto");
else
  echo("failed to send the email \"$mailsub\" to $mailto");
 ?
 *
  the following is the warining i get.
 Warning: Server Error in c:\program files\apache
 group\apache\htdocs\nilesh\mail.php on line 6
 failed to send the email "this is a php mail() function" to
 [EMAIL PROTECTED]

   
 Hoping someone can help me in this regard
  bye  and thanx in advance
 Nilesh Parmar

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
--
Romeo Manzur
Web Application Developer
iSilicom
Av. 27 de Febrero 904-A Desp 1, Centro
C.P.:86000
Villahermosa, Tabasco, Mexico
Tel.:(52)(9)3-12-4790
--



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Mal McKay

www.avidhosting.com

check out the download for the manual to their "control panel"
I have been _very_ impressed with their service and scalability.

mal

-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 15:45
To: [EMAIL PROTECTED]
Subject: [PHP] Can you recommend an ISP with the following?


I'm looking to move from an old Web host (stormweb.net) that has
entirely stopped responding to customer support emails. I liked what
they had to offer, before they became unresponsive, so I'm looking for
a similar ISP with:

*PHP4
*MySQL
*Telnet access
*Decent Support
*Preferably a Cobalt server (or one with a VERY good Web-based
administrator, most other types of Web administrators I've seen have
been clunky and a PITA)
*Pretty Cheap

I've checked out ISP check, and it would be great if they listed the
type of Wed-based administrator, but they don't. It's VERY tedious to
get a demo account, and see that their Web-based administrator is
junk. I'm used to the very slick administrator found on Cobalt
servers. I have given up after a half-dozen attempts at other servers.
I sincerely hope someone can help.

Thank you very much,
Jamie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] passing variables using hidden fields

2001-03-16 Thread george

Hi,
  I am building a contact form, which goes into a db I them pull the
information out and display it, then I pass the values to another page using
hidden fields but for some reason even though it displays the full thing on
the first page when I pass a variable to the next page it only displays the
first word.
so on the first page where it has pulled it from the db it will say
"this is a test"
next page it just says "test"

TIA

george





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How do I get Variables out of a string?

2001-03-16 Thread Shawn Pritchard

Hello!

I have been bashing my head trying to figure this out, and I'm hoping
somebody can show me the correct way to do this:

A PGP signed set of variables is passed to our URL via GET.
I use HTTP_GET_VARS to grab the PGP string, which is contained in a variable
called "trnResponse".
I run that through pgpv to end up with the raw string, which I store in a
variable called $rawstring

The string looks like:
trnId=1019messageId=1messageText=ApprovedauthCode=trnDate=3%2F16%2F2
001+8%3A07%3A14+AMtrnOrderNumber=435643

That's where I get confused about the best way to pull the variables out of
the string.

I was using something like:  $thearray = explode ("",
rawurldecode($rawstring));   (this still leaves me with "+" in some places,
but I can use str_replace to get rid of them)

I was exploding on "", but that leaves me with an array with things like
trnId=1019 in each "cell"  It does explode properly, but now, how do I
pull these things out of the array and get them defined as variables??
Or...do I even need to put them into the array in the first place?

THANK YOU for any help someone might be able to provide!!

--
Shawn Pritchard



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread John Huggins

You mention a large desire for a good web based administrator.  I wonder if
there is a version of a web based system administrator available that works
like Cobalt, but can be installed on any hosting setup.  Have you folks
heard of such a thing?  I am aware of Webmin, but am not too impressed with
it yet.

I have toyed with the idea of writing my own.  Jamie, what items do you feel
must be controllable in a web hosting account administration panel?  Yes, we
all know the basics, like email, dns, etc. but a bulleted list would be a
good start at organizing a development effort.

John

 -Original Message-
 From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can you recommend an ISP with the following?


 I'm looking to move from an old Web host (stormweb.net) that has
 entirely stopped responding to customer support emails. I liked what
 they had to offer, before they became unresponsive, so I'm looking for
 a similar ISP with:

 *PHP4
 *MySQL
 *Telnet access
 *Decent Support
 *Preferably a Cobalt server (or one with a VERY good Web-based
 administrator, most other types of Web administrators I've seen have
 been clunky and a PITA)
 *Pretty Cheap

 I've checked out ISP check, and it would be great if they listed the
 type of Wed-based administrator, but they don't. It's VERY tedious to
 get a demo account, and see that their Web-based administrator is
 junk. I'm used to the very slick administrator found on Cobalt
 servers. I have given up after a half-dozen attempts at other servers.
 I sincerely hope someone can help.

 Thank you very much,
 Jamie

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PostToHost

2001-03-16 Thread Boget, Chris

 I am not sure exactly what you are asking but by this do you mean ..
 page1
 process_statements
 ...
 ...
 Header("Location:http://www.some.net?id=$row-ID"); 
 
 /page1
 page2
 then use the string in $QUERY_STRING to retreive/parse your data.
 /page2

Yes, more or less.  However, I'm trying to find some way to be
able to pass those variables via POST, not GET as suggested above.
Using GET, the end user can modify the values of the variables and
there is little way for me to determine if that had happened.  With
POST I have a little more control, though not much.

So while you can transfer control to another page server side using
the header() function and GET variables, I'm curious to find out
if there is a way to do something similar server side but using POST.

Chris



[PHP] Building PHP on SYSV

2001-03-16 Thread Dan Mahoney

I am trying to build PHP 4.0.2 on a box running SYSV Unix and am getting
a number of errors. I'm using gcc 2.6.0.  The OS is version 4.0.

1) In ext/standard/mail.c, the include file, sysexits.h, doesn't exist.
I did a little hunting.  mail.c is looking for EX_TEMPFAIL, so I replace
sysexits.h with #define EX_TEMPFAIL 75.  I got the value from a SCO
box.

2) After fixing the above problem, I again type, "make" from the
top-level directory of the distribution and get the following:
Making all in .
/bin/sh /users/dmahoney/source/php-4.0.2/libtool --silent
--mode=link gc
c  -I. -I/users/dmahoney/source/php-4.0.2/
-I/users/dmahoney/source/php-4.0.2 -I
/users/dmahoney/source/php-4.0.2/main
-I/users/dmahoney/source/php-4.0.2/Zend -I
/users/dmahoney/source/php-4.0.2
-I/users/dmahoney/source/php-4.0.2/ext/mysql/li
bmysql   -g -O2   -o libphp4.la -rpath
/users/dmahoney/source/php-4.0.2/libs   /
usr/ucblib stub.lo  Zend/libZend.la  sapi/cgi/libsapi.la
main/libmain.la  regex
/libregex.la  ext/db/libdb.la ext/mysql/libmysql.la ext/pcre/libpcre.la
ext/posi
x/libposix.la ext/session/libsession.la ext/standard/libstandard.la
-ldl -lres
olv -lresolv -lresolv -lm -ldl -lcrypt -lsocket -lsocket
UX:sh (libtool): ERROR: /usr/bin/ar: arg list too long
*** Error code 1 (bu21)

make: fatal error.
*** Error code 1 (bu21)

make: fatal error.

Does anyone have any ideas about the problem?

Thanks,

DOM II


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How do I get Variables out of a string?

2001-03-16 Thread Cal Evans

urldecode it first. Then explode it.

Cal
http://www.calevans.com


-Original Message-
From: Shawn Pritchard [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How do I get Variables out of a string?


Hello!

I have been bashing my head trying to figure this out, and I'm hoping
somebody can show me the correct way to do this:

A PGP signed set of variables is passed to our URL via GET.
I use HTTP_GET_VARS to grab the PGP string, which is contained in a variable
called "trnResponse".
I run that through pgpv to end up with the raw string, which I store in a
variable called $rawstring

The string looks like:
trnId=1019messageId=1messageText=ApprovedauthCode=trnDate=3%2F16%2F2
001+8%3A07%3A14+AMtrnOrderNumber=435643

That's where I get confused about the best way to pull the variables out of
the string.

I was using something like:  $thearray = explode ("",
rawurldecode($rawstring));   (this still leaves me with "+" in some places,
but I can use str_replace to get rid of them)

I was exploding on "", but that leaves me with an array with things like
trnId=1019 in each "cell"  It does explode properly, but now, how do I
pull these things out of the array and get them defined as variables??
Or...do I even need to put them into the array in the first place?

THANK YOU for any help someone might be able to provide!!

--
Shawn Pritchard



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Cal Evans

Have you looked at www.webmin.com?

Cal
http://www.calevans.com


-Original Message-
From: John Huggins [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:16 AM
To: Jamie Jackson; [EMAIL PROTECTED]
Subject: RE: [PHP] Can you recommend an ISP with the following?


You mention a large desire for a good web based administrator.  I wonder if
there is a version of a web based system administrator available that works
like Cobalt, but can be installed on any hosting setup.  Have you folks
heard of such a thing?  I am aware of Webmin, but am not too impressed with
it yet.

I have toyed with the idea of writing my own.  Jamie, what items do you feel
must be controllable in a web hosting account administration panel?  Yes, we
all know the basics, like email, dns, etc. but a bulleted list would be a
good start at organizing a development effort.

John

 -Original Message-
 From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can you recommend an ISP with the following?


 I'm looking to move from an old Web host (stormweb.net) that has
 entirely stopped responding to customer support emails. I liked what
 they had to offer, before they became unresponsive, so I'm looking for
 a similar ISP with:

 *PHP4
 *MySQL
 *Telnet access
 *Decent Support
 *Preferably a Cobalt server (or one with a VERY good Web-based
 administrator, most other types of Web administrators I've seen have
 been clunky and a PITA)
 *Pretty Cheap

 I've checked out ISP check, and it would be great if they listed the
 type of Wed-based administrator, but they don't. It's VERY tedious to
 get a demo account, and see that their Web-based administrator is
 junk. I'm used to the very slick administrator found on Cobalt
 servers. I have given up after a half-dozen attempts at other servers.
 I sincerely hope someone can help.

 Thank you very much,
 Jamie

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/midgard article.c

2001-03-16 Thread Emiliano Heyns

emile   Fri Mar 16 07:01:35 2001 EDT

  Modified files:  
/php4/ext/midgard   article.c 
  Log:
  String used as long.
  
  
Index: php4/ext/midgard/article.c
diff -u php4/ext/midgard/article.c:1.16 php4/ext/midgard/article.c:1.17
--- php4/ext/midgard/article.c:1.16 Tue Mar 13 23:57:46 2001
+++ php4/ext/midgard/article.c  Fri Mar 16 07:01:35 2001
@@ -1,4 +1,4 @@
-/* $Id: article.c,v 1.16 2001/03/14 07:57:46 emile Exp $
+/* $Id: article.c,v 1.17 2001/03/16 15:01:35 emile Exp $
 Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -780,6 +780,7 @@
zval **url, **calstart, **caldays, **icon, **view, **print;
zval **extra1, **extra2, **extra3;
zval **type, **score, **up, *self;
+   long upval;
 
RETVAL_FALSE;
CHECK_MGD;
@@ -852,8 +853,11 @@
if (!mgd_exists_id(mgd_handle(), "topic", "id=$d", (*topic)-value.lval))
RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
 
-   if (up  (*up)-value.lval != 0  !mgd_exists_id(mgd_handle(), "article", 
"id=$d", (*up)-value.lval))
-   RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   if (up) {
+  upval = atol((*up)-value.str.val);
+  if (upval != 0  !mgd_exists_id(mgd_handle(), "article", "id=$d", upval))
+ RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS);
+   }
 
if (!istopicowner((*topic)-value.lval)) {
RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] protecting password file on ISP

2001-03-16 Thread Jamie McClelland

Hi all -

I am using php/MySQL on an ISP in which there are other users. Everyone has
SSH access and can therefore enter everyone else's directories and read any
world-readable files. I have a config.inc file which contains my MySQL
username and password. This file is located outside of my web directory (to
prevent web browsers from reading it). In addition, my ISP added the user
'www' to my group, enabling me to make config.inc group readable but not
user readable. Therefore, none of the other users can SSH into the system
and read my username and password.

This is great, but there is one more concern: if the user 'www' can read
this file, isn't it possible for any other user to write a php script,
executable by 'www', that instructs the web server to echo the contents of
this file? All they have to know is the directory and name of the file they
are looking for.

Anyone have suggestions on how to close this security hole?

Thanks,
Jamie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] FAQ

2001-03-16 Thread Keith Vance

I agree with everything you have said. I just don't think there is a good
way to get people from asking these types of questions, without someone
sitting there reading every message and filtering them according to topic.
We are stuck with a high-volume list where lots of newbies come to ask us
questions. If PHP wasn't so damn good and so popular we wouldn't be having
this conversation.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 15 Mar 2001, Jason Lotito wrote:

  How many times are people going to complain about no-brainer questions
  being posted to the list. The fact of the matter is people are going to
  post things on the list without reading the manual or the FAQ. It goes
  with the territory. It annoys me too, but there is no good solution for
  the problem. There is the fact that a lot of people are new and don't
  really know where to go to find answers. Even if they go to the web site,
  they still may not know that they need to be looking for information on
  naming variables with variables or that fopen opens a file or whatever.
 
  K E I T H  V A N C E

 I think the argument has less to do with people asking questions about PHP
 and how it works, and more about people asking basica programming questions
 without knowing it.  Fundamental programming concepts, like the scope of a
 variable, passing by reference or by value, or even looping are things
 newbie's simply do not understand.  Why?  Because they don't know they need
 to learn the concepts and theories of programming before learning to
 program.  It sounds odd, but that is the way it is.

 People asking questions about how a loop works are not usually asking how a
 PHP loop works.  The same for arrays.  They are really saying: "This is the
 first real programming language I am out to learn, and I don't understand
 the concept behind a For/Next Loop."  This isn't a bad thing, heck, we were
 all newbies at one point, and in a sense, we are all newbies at something.

 I think the argument is that their are many people who don't want to learn
 how and why a For/Next Loop works, but instead simply want someone to fix
 the problem for them.  That isn't programming.  Programming (and yes, I
 know, PHP is technically a scripting language, but lets not jump that fence
 as well) is about trial and error, logic, and creativity, but most
 importantly, problem solving.  Most of the newbies get into PHP expecting a
 tutorial on every topic.  If they can't find a tutorial on how to print out
 5 numbers, they expect someone to show them how to do it.  They don't try
 and solve the problem themselves, and that is a problem.  I don't mind
 assisting where I can, however, I don't like rewriting a script for someone
 when they don't even take the time to try and learn the fundamentals.  Most
 newbies I have met fall into two categories.  The majority start out wanting
 to learn PHP because someone said it was easy to learn, which it is, from a
 programmers point of view.  However, when in the second week of learning
 their first programming language they can't program that PHP Database
 Content Management System with Instant Yahoo News Retrival complete with
 User Database, Forums, and Real Time Foo, they start getting upset and say
 that PHP sucks.  Those same people may also complain because they can't find
 a tutorial on how to create a Forum Database, and all they can find are
 tutorials on the basics of Database Design.

 I think this is the real problem.  Try to run before they have learned to
 crawl and walk.

 Jason Lotito
 www.NewbieNetwork.net
 Where those who can, teach;
 and those who can, learn.



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] send file truh mail() function???

2001-03-16 Thread Romeo Manzur

how could I send a .doc file truh mail() function???
if anybody know, send me the way...

--
--
Romeo Manzur
Web Application Developer
iSilicom
Av. 27 de Febrero 904-A Desp 1, Centro
C.P.:86000
Villahermosa, Tabasco, Mexico
Tel.:(52)(9)3-12-4790
--



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] passing variables using hidden fields

2001-03-16 Thread Chris Lee

your not putting it in quotes.

echo "
input type=hidden name=people_name value=$people_name
";

change to

echo "
input type='hidden' name='people_name' value='$people_name'
";

quotes are your friend :)


-- 

 Chris Lee
 [EMAIL PROTECTED]



""george"" [EMAIL PROTECTED] wrote in message 
98tdl2$ps2$[EMAIL PROTECTED]">news:98tdl2$ps2$[EMAIL PROTECTED]...
Hi,
  I am building a contact form, which goes into a db I them pull the
information out and display it, then I pass the values to another page using
hidden fields but for some reason even though it displays the full thing on
the first page when I pass a variable to the next page it only displays the
first word.
so on the first page where it has pulled it from the db it will say
"this is a test"
next page it just says "test"

TIA

george





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] echo only displays first character

2001-03-16 Thread Chris Lee

please post more code, ie where $name is set.

in the mean time try this, shouldnt help but might

foreach($empid as $pos = $val)
{
echo "{$empid[$pos]} {$name[$pos]}br";
}

-- 

 Chris Lee
 [EMAIL PROTECTED]



""Tom Harris"" [EMAIL PROTECTED] wrote in message 
98tcfg$bn3$[EMAIL PROTECTED]">news:98tcfg$bn3$[EMAIL PROTECTED]...
Here's an interesting problem.

The following only prints the first letter of the name

for ($i=0; isset($empid[$i]); $i++) {

echo "$empid[$i] $name[$i]br";

}

But if I change the variable $name to $employeename throughout the script it
displays fine.

$empid[] and $name[] are both assigned earlier in the script by pulling data
from a MySQL database.

Is $name a reserved word or something? Anyone know why just changing the
array's name fixes the problem?

Thanks,

-Tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Webmin

2001-03-16 Thread Michael Kimsal

Although I somewhat agree with the webmin sentiment,
after having tried to do simple maintenance on a cobalt for someone,
it seems a real dog for anything outside the normal scope of what
they want you to do.  We needed to edit an httpd.conf file,
but there doesn't seem to be a way to do it.  Ditto for restarting Apache.
Add a MIME type?  No dice.

Webmin is not the slickest interface, but seems to offer a lot of flexibility.

Rather than rewriting something, perhaps you could vounteer to design
a better interface for existing webmin stuff.

A PHP-based version of webmin would be nice, but it's already a rather
developed project, and after considering how to do it myself, I realized
there's a whole hell of a lot of configurations and systems to have to
consider beyond my few linux distros.

John Huggins wrote:

 You mention a large desire for a good web based administrator.  I wonder if
 there is a version of a web based system administrator available that works
 like Cobalt, but can be installed on any hosting setup.  Have you folks
 heard of such a thing?  I am aware of Webmin, but am not too impressed with
 it yet.

 I have toyed with the idea of writing my own.  Jamie, what items do you feel
 must be controllable in a web hosting account administration panel?  Yes, we
 all know the basics, like email, dns, etc. but a bulleted list would be a
 good start at organizing a development effort.

 John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Jamie Jackson

The biggies are:
*An intuitive email config interface, with list management, aliases,
etc.
*Ability to "sub-let" out webspace/ftp area to people ("users"
directories)
*Web-space administration and monitoring (to regulate "sub"-users'
webspace)
*Good backup system. (RAQs let you download a compressed backup, which
can be easily uploaded, and reverted to).

Cobalt servers do these things.

Jamie

On 16 Mar 2001 08:10:24 -0800, [EMAIL PROTECTED] ("John Huggins")
wrote:

You mention a large desire for a good web based administrator.  I wonder if
there is a version of a web based system administrator available that works
like Cobalt, but can be installed on any hosting setup.  Have you folks
heard of such a thing?  I am aware of Webmin, but am not too impressed with
it yet.

I have toyed with the idea of writing my own.  Jamie, what items do you feel
must be controllable in a web hosting account administration panel?  Yes, we
all know the basics, like email, dns, etc. but a bulleted list would be a
good start at organizing a development effort.

John

 -Original Message-
 From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can you recommend an ISP with the following?


 I'm looking to move from an old Web host (stormweb.net) that has
 entirely stopped responding to customer support emails. I liked what
 they had to offer, before they became unresponsive, so I'm looking for
 a similar ISP with:

 *PHP4
 *MySQL
 *Telnet access
 *Decent Support
 *Preferably a Cobalt server (or one with a VERY good Web-based
 administrator, most other types of Web administrators I've seen have
 been clunky and a PITA)
 *Pretty Cheap

 I've checked out ISP check, and it would be great if they listed the
 type of Wed-based administrator, but they don't. It's VERY tedious to
 get a demo account, and see that their Web-based administrator is
 junk. I'm used to the very slick administrator found on Cobalt
 servers. I have given up after a half-dozen attempts at other servers.
 I sincerely hope someone can help.

 Thank you very much,
 Jamie

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/mcrypt mcrypt.c

2001-03-16 Thread Derick Rethans

derick  Fri Mar 16 07:59:46 2001 EDT

  Modified files:  
/php4/ext/mcryptmcrypt.c 
  Log:
  - Fixed mem leak
  
  
Index: php4/ext/mcrypt/mcrypt.c
diff -u php4/ext/mcrypt/mcrypt.c:1.45 php4/ext/mcrypt/mcrypt.c:1.46
--- php4/ext/mcrypt/mcrypt.c:1.45   Sun Feb 25 22:07:02 2001
+++ php4/ext/mcrypt/mcrypt.cFri Mar 16 07:59:45 2001
@@ -1211,7 +1211,7 @@
int block_size, max_key_length, use_key_length, i, count, iv_size;
unsigned long int data_size;
int *key_length_sizes;
-   char *key_s, *iv_s;
+   char *key_s = NULL, *iv_s;
char *data_s;
MCRYPT td;
 MCLS_FETCH();
@@ -1307,6 +1307,8 @@
 
 /* freeing vars */
mcrypt_generic_end (td);
+   if (key_s != NULL)
+   efree (key_s);
if (iv_s != NULL)
efree (iv_s);
efree (data_s);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sendmail

2001-03-16 Thread Marius Kirschner

I'm at a lossI've searched throught the knowledgebase, archives, docs,
etc but I can't figure out what's going on.  The problem is when using the
mail() function nothing gets send and I don't get any error messages either.
It's like the message gets eaten by a black hole.

I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my
php.ini file has the "sendmail_path   =   /usr/sbin/sendmail" in there,
but still when I click on submit nothing gets send.  I know the script is
working (works on another system) plus I've tried other "form mailers" with
the same problem.  Does anybody have some clue as to where I should start
looking to fix this?  Thanks,

---Marius


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sendmail

2001-03-16 Thread Robert Covell

Do you have the switches for sendmail in your path?

Our installs have: /usr/sbin/sendmail -t -i for the path information...

Sincerely,

Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: [EMAIL PROTECTED]
Phone: 816.210.7145
Fax: 816.753.1952

-Original Message-
From: Marius Kirschner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 10:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] sendmail


I'm at a lossI've searched throught the knowledgebase, archives, docs,
etc but I can't figure out what's going on.  The problem is when using the
mail() function nothing gets send and I don't get any error messages either.
It's like the message gets eaten by a black hole.

I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my
php.ini file has the "sendmail_path   =   /usr/sbin/sendmail" in there,
but still when I click on submit nothing gets send.  I know the script is
working (works on another system) plus I've tried other "form mailers" with
the same problem.  Does anybody have some clue as to where I should start
looking to fix this?  Thanks,

---Marius


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sendmail

2001-03-16 Thread Marius Kirschner

Damn, the "-t -i" did the trick  I can't believe the fix was so easy and
I spent DAYS (really) trying to figure out what's wrong!  Thanks so much,
Robert. :)

---Marius

 -Original Message-
 From: Robert Covell [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 11:41 AM
 To: Marius Kirschner; [EMAIL PROTECTED]
 Subject: RE: [PHP] sendmail


 Do you have the switches for sendmail in your path?

 Our installs have: /usr/sbin/sendmail -t -i for the path information...

 Sincerely,

 Robert T. Covell
 President / Owner
 Rolet Internet Services, LLC
 Web: www.rolet.com
 Email: [EMAIL PROTECTED]
 Phone: 816.210.7145
 Fax: 816.753.1952

 -Original Message-
 From: Marius Kirschner [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:43 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] sendmail


 I'm at a lossI've searched throught the knowledgebase, archives, docs,
 etc but I can't figure out what's going on.  The problem is when using the
 mail() function nothing gets send and I don't get any error
 messages either.
 It's like the message gets eaten by a black hole.

 I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my
 php.ini file has the "sendmail_path   =   /usr/sbin/sendmail"
 in there,
 but still when I click on submit nothing gets send.  I know the script is
 working (works on another system) plus I've tried other "form
 mailers" with
 the same problem.  Does anybody have some clue as to where I should start
 looking to fix this?  Thanks,

 ---Marius


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] passing variables using hidden fields

2001-03-16 Thread george

 Thanks Chris.

George



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP standalone script

2001-03-16 Thread Don Pro

Hi,

I've used PHP scripts in my HTML to provide dynamic content but I was
wondering if I can also use PHP to create standalone scripts on my UNIX
box.  If so, where is the PHP interpreter and how do I invoke it?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /tests .cvsignore

2001-03-16 Thread Jani Taskinen

sniper  Fri Mar 16 09:10:46 2001 EDT

  Modified files:  
/php4/tests .cvsignore 
  Log:
  .php files should not be ignored. Typo?
  
Index: php4/tests/.cvsignore
diff -u php4/tests/.cvsignore:1.1 php4/tests/.cvsignore:1.2
--- php4/tests/.cvsignore:1.1   Tue Nov 21 00:00:13 2000
+++ php4/tests/.cvsignore   Fri Mar 16 09:10:46 2001
@@ -1,4 +1,3 @@
 *.exp
 *.out
-*.php
 phpt.*



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] $PHP_SELF vs. functions, arrays and variable

2001-03-16 Thread Scott Fletcher

Hi!

I noticed when using $PHP_SELF in the script, you can use only the
variables.  So, I tried it with the arrays or functions and found that it
does not work.  So, is $PHP_SELF limited to variables only?

Scott



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] $PHP_SELF vs. functions, arrays and variable

2001-03-16 Thread John Lim

Hi Scott,

Good question! $PHP_SELF is a global variable, so you need to declare it in
functions:

function a()
{ 
global $PHP_SELF;

print $PHP_SELF;
}

John

"Scott Fletcher" [EMAIL PROTECTED] wrote in message 
98tjgv$40e$[EMAIL PROTECTED]">news:98tjgv$40e$[EMAIL PROTECTED]...
 Hi!
 
 I noticed when using $PHP_SELF in the script, you can use only the
 variables.  So, I tried it with the arrays or functions and found that it
 does not work.  So, is $PHP_SELF limited to variables only?
 
 Scott
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Brett



 I'm looking to move from an old Web host (stormweb.net) that has
 entirely stopped responding to customer support emails. I liked what
 they had to offer, before they became unresponsive, so I'm looking for
 a similar ISP with:


I would  do a search on google for cobalt virtual hosts.  If you want my
recommendation, I have been using Interliant for a year now for co-location.
They have excellent support, offer Cobalt RAQs virtual hosting, and have
great connection speeds and uptime.

Brett




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with VARIABLES

2001-03-16 Thread Ian LeBlanc

I have this page where I am printing some items that are defined by size 
and color which all the info is pulled from a database.

in the first item loop
PRINT ("tdinput type=\"text\" name=\"$Color$Temp[$f]\" size=\"3\"/td\n");
translated looks like this.
tdinput type="text" name=\"WhiteS" size="3"/td

meaning the color white and the size Small.

Now the next loop does what it is suppose to and returns a value of
tdinput type="text" name=\"BlackS" size="3"/td

These get posted to the next page.
Now for the PROBLEM

without hard coding it how can I get the value of BlackS
meaning I know the color and sizes but how do I put the variable together 
to print the value of it.

On the 2nd page I would like to echo $Color$Temp[$f] but that does not 
return the value of the item.
I need $Color$Temp[$f] to turn into the variable not a value. So I can echo 
the variable.
Someone please help.

(*NOTE* the reason I do not want to hard code it is that I have a list of 
102 colors which makes for a really long script.)

PLEASE CC ME ON THE MESSAGE BECAUSE I AM ONLY SUBSCRIBED TO THE DIGEST (I 
will have to wait some 12 odd hours for the answer)
Regards,

Ian LeBlanc
Web Development
Rask, Inc. - www.rask.com
Phone: (727) 517-2000
Fax:   (727) 517-2001




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] With all this talk about editors ...

2001-03-16 Thread Boget, Chris

 http://www.php.net/manual/en/ref.funchand.php
 This page must be your friends.

I took a look at this page (and all the functions referenced
therein).  While there must be a use for these functions
otherwise they wouldn't have been included in PHP, I'm at
a total loss as to why anyone would ever use them.  Why
wouldn't you just call the function (or do whatever) yourself?
Could anyone offer some insight?

Chris



Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

In a message dated 3/16/01 9:39:16 AM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


 I thought Search engines couldnt spyder dynamic pages such as
 "1.php?foo=bar"
 

True - but with the magic of Apache's mod_rewrite -- you can make a URL 
appear to a browser as: http://www.yourdomain.com/bar -- but on your server, 
it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.

mod_rewrite is extremely cool. you can read more about it at: 
http://httpd.apache.org/docs/mod/mod_rewrite.html

don



Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread Aaron Tuller

or you can use Apache to ForceType bar to use PHP.

then just write a generic URL parsing script and you're done.

if you want it for all of your URL's, make DocumentRoot a PHP script. 
you might tricky problems with images and other non-script files, but 
that's ok because you can just check for the file extensions, echo he 
mie tpye and readfile() it.

-aaron

At 1:15 PM -0500 3/16/01, [EMAIL PROTECTED] wrote:
In a message dated 3/16/01 9:39:16 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:


  I thought Search engines couldnt spyder dynamic pages such as
  "1.php?foo=bar"


True - but with the magic of Apache's mod_rewrite -- you can make a URL
appear to a browser as: http://www.yourdomain.com/bar -- but on your server,
it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.

mod_rewrite is extremely cool. you can read more about it at:
http://httpd.apache.org/docs/mod/mod_rewrite.html

don


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Putting php at end of html?

2001-03-16 Thread Boget, Chris

 YES!
 The only "problem" will be that these .php pages will be 
 maybe 5% slower since PHP is "parsing" them.

That and all the links pointing to the old .html files will be
broken...

So if you mix PHP and HTML in a file, PHP will be slower
to parse those files?  I thought it was smart enough to 
parse only what was within the recognized start and end
tags (? ?, ?php ?, script language="php"/script,
etc)?

Chris



Re: [PHP] Problem with VARIABLES

2001-03-16 Thread Hardy Merrill

Ian, I think what you want is a variable variable - have a look at

   http://www.php.net/manual/en/html/language.variables.variable.html

I think you might want something like this:

   ${$Color$Temp[$f]}

HTH.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

Ian LeBlanc [[EMAIL PROTECTED]] wrote:
 I have this page where I am printing some items that are defined by size 
 and color which all the info is pulled from a database.
 
 in the first item loop
 PRINT ("tdinput type=\"text\" name=\"$Color$Temp[$f]\" size=\"3\"/td\n");
 translated looks like this.
 tdinput type="text" name=\"WhiteS" size="3"/td
 
 meaning the color white and the size Small.
 
 Now the next loop does what it is suppose to and returns a value of
 tdinput type="text" name=\"BlackS" size="3"/td
 
 These get posted to the next page.
 Now for the PROBLEM
 
 without hard coding it how can I get the value of BlackS
 meaning I know the color and sizes but how do I put the variable together 
 to print the value of it.
 
 On the 2nd page I would like to echo $Color$Temp[$f] but that does not 
 return the value of the item.
 I need $Color$Temp[$f] to turn into the variable not a value. So I can echo 
 the variable.
 Someone please help.
 
 (*NOTE* the reason I do not want to hard code it is that I have a list of 
 102 colors which makes for a really long script.)
 
 PLEASE CC ME ON THE MESSAGE BECAUSE I AM ONLY SUBSCRIBED TO THE DIGEST (I 
 will have to wait some 12 odd hours for the answer)
 Regards,
 
 Ian LeBlanc
 Web Development
 Rask, Inc. - www.rask.com
 Phone: (727) 517-2000
 Fax:   (727) 517-2001
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phpinfo() displayed old info

2001-03-16 Thread Revina

I'va migrated from apache 1.3.12 + php 3.0.16
to apache 1.3.19 + php 4.0.2.
but
? phpinfo(); ?
still displaying old info like :
Configure Command : ./configure' '--with-mysql=/usr/local/mysql' 
'--with-apache=../apache_1.3.12' 
Apache Version : Apache/1.3.12
some informations displayed correcly :
page title : PHP Version 4.0.2
SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2 

help me, please. 

 --revin-- 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phpinfo() displayed old info

2001-03-16 Thread Revina

I've migrated from apache 1.3.12 + php 3.0.16
to apache 1.3.19 + php 4.0.2.
but
? phpinfo(); ?
still displaying old info like :
Configure Command : ./configure' '--with-mysql=/usr/local/mysql' 
'--with-apache=../apache_1.3.12' 
Apache Version : Apache/1.3.12
some informations displayed correcly :
page title : PHP Version 4.0.2
SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2
help me, please. 

 --revina-- 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] echo only displays first character

2001-03-16 Thread Mal McKay

Are you sure $name is an array. t appears to be a string and the $name[$i]
references one character in that string

mal

-Original Message-
From: Tom Harris [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 15:50
To: [EMAIL PROTECTED]
Subject: [PHP] echo only displays first character


Here's an interesting problem.

The following only prints the first letter of the name

for ($i=0; isset($empid[$i]); $i++) {

echo "$empid[$i] $name[$i]br";

}

But if I change the variable $name to $employeename throughout the script it
displays fine.

$empid[] and $name[] are both assigned earlier in the script by pulling data
from a MySQL database.

Is $name a reserved word or something? Anyone know why just changing the
array's name fixes the problem?

Thanks,

-Tom



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phpinfo() displayed old info

2001-03-16 Thread harun

I've migrated from apache 1.3.12 + php 3.0.16 
to apache 1.3.19 + php 4.0.2. 
but 
? phpinfo(); ? 
still displaying old info like : 
Configure Command : ./configure' '--with-mysql=/usr/local/mysql' 
'--with-apache=../apache_1.3.12'  
Apache Version : Apache/1.3.12 
some informations displayed correcly : 
page title : PHP Version 4.0.2 
SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2 
help me, please. 
--revina-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/hyperwave hg_comm.c hg_comm.h

2001-03-16 Thread Uwe Steinmann

steinm  Fri Mar 16 09:40:38 2001 EDT

  Modified files:  
/php4/ext/hyperwave hg_comm.c hg_comm.h 
  Log:
  - Inserting links without any delimiters is now possible
  
  
Index: php4/ext/hyperwave/hg_comm.c
diff -u php4/ext/hyperwave/hg_comm.c:1.39 php4/ext/hyperwave/hg_comm.c:1.40
--- php4/ext/hyperwave/hg_comm.c:1.39   Sun Feb 25 22:06:57 2001
+++ php4/ext/hyperwave/hg_comm.cFri Mar 16 09:40:37 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: hg_comm.c,v 1.39 2001/02/26 06:06:57 andi Exp $ */
+/* $Id: hg_comm.c,v 1.40 2001/03/16 17:40:37 steinm Exp $ */
 
 /* #define HW_DEBUG */
 
@@ -523,6 +523,19 @@
if(strncmp(str, "background", 10) == 0)

cur_ptr-linktype=HW_BACKGROUND_LINK;
else
+   if(strncmp(str, "intagnodel", 10) == 
+0) { /* New type introduced by Uwe Steinmann 16.03.2001 */
+   
+cur_ptr-linktype=HW_INTAGNODEL_LINK;
+   cur_ptr-tagattr = NULL;
+   if(NULL != (str = 
+strstr(object, "TagAttr="))) {
+   str += 8;
+   str1 = str;
+   while((*str1 != '\n') 
+ (*str1 != '\0'))
+   str1++;
+   cur_ptr-tagattr = 
+emalloc(str1 - str + 1);
+   
+memcpy(cur_ptr-tagattr, str, str1 - str);
+   cur_ptr-tagattr[str1 
+- str] = '\0';
+   }
+   } else
if(strncmp(str, "intag", 5) == 0) {

cur_ptr-linktype=HW_INTAG_LINK;
cur_ptr-tagattr = NULL;
@@ -695,6 +708,11 @@
offset -= 4; /* because there is no 
closing tag /A */
 /* laststart = cur_ptr-start; */
break;
+   case HW_INTAGNODEL_LINK:
+   snprintf(istr, BUFFERLEN, "%s", 
+cur_ptr-link);
+   offset -= 4; /* because there is no 
+closing tag /A */
+/* laststart = cur_ptr-start; */
+   break;
case HW_APPLET_LINK:
if(cur_ptr-codebase)
  snprintf(istr, BUFFERLEN, " 
CODEBASE='%s' CODE='%s'", cur_ptr-codebase, cur_ptr-code);
@@ -727,7 +745,10 @@
else
snprintf(istr, BUFFERLEN, " 
%s='%s/%s'", cur_ptr-tagattr, scriptname[HW_INTAG_LINK], cur_ptr-destdocname); 
offset -= 4; /* because there is no 
closing tag /A */
-/* laststart = cur_ptr-start; */
+   break;
+   case HW_INTAGNODEL_LINK:
+   snprintf(istr, BUFFERLEN, "%s", 
+cur_ptr-destdocname);
+   offset -= 4; /* because there is no 
+closing tag /A */
break;
case HW_APPLET_LINK:
if(cur_ptr-codebase)
Index: php4/ext/hyperwave/hg_comm.h
diff -u php4/ext/hyperwave/hg_comm.h:1.13 php4/ext/hyperwave/hg_comm.h:1.14
--- php4/ext/hyperwave/hg_comm.h:1.13   Sun Feb 25 22:06:57 2001
+++ php4/ext/hyperwave/hg_comm.hFri Mar 16 09:40:37 2001
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: hg_comm.h,v 1.13 2001/02/26 06:06:57 andi Exp $ */
+/* $Id: hg_comm.h,v 1.14 2001/03/16 17:40:37 steinm Exp $ */
 
 #ifndef HG_COMM_H
 #define HG_COMM_H
@@ -85,6 +85,7 @@
 #define HW_BACKGROUND_LINK2
 #define HW_INTAG_LINK 3
 #define HW_APPLET_LINK4
+#define HW_INTAGNODEL_LINK5
 
 #define COPY  0
 #define MOVE

Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread Data Driven Design

Can this be used via .htaccess in a shared hosting situation?

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 10:15 AM
Subject: Re: [PHP] Shopping Carts and Sessions


 In a message dated 3/16/01 9:39:16 AM Eastern Standard Time,
 [EMAIL PROTECTED] writes:


  I thought Search engines couldnt spyder dynamic pages such as
  "1.php?foo=bar"
 

 True - but with the magic of Apache's mod_rewrite -- you can make a URL
 appear to a browser as: http://www.yourdomain.com/bar -- but on your
server,
 it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.

 mod_rewrite is extremely cool. you can read more about it at:
 http://httpd.apache.org/docs/mod/mod_rewrite.html

 don



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/standard basic_functions.c

2001-03-16 Thread Jani Taskinen

sniper  Fri Mar 16 10:18:02 2001 EDT

  Modified files:  
/php4/ext/standard  basic_functions.c 
  Log:
  This has got to be the last one..
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.315 
php4/ext/standard/basic_functions.c:1.316
--- php4/ext/standard/basic_functions.c:1.315   Sun Mar 11 19:06:53 2001
+++ php4/ext/standard/basic_functions.c Fri Mar 16 10:18:01 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.315 2001/03/12 03:06:53 andrei Exp $ */
+/* $Id: basic_functions.c,v 1.316 2001/03/16 18:18:01 sniper Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -247,7 +247,7 @@
PHP_FE(gethostbyaddr,   NULL)
PHP_FE(gethostbyname,   NULL)
PHP_FE(gethostbynamel,  NULL)
-#if HAVE_LIBBIND  !(defined(__BEOS__)||defined(PHP_WIN32))
+#if HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32))
PHP_FE(checkdnsrr, 
 NULL)
PHP_FE(getmxrr,
 second_and_third_args_force_ref)
 #else



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Can you recommend an ISP with the following?

2001-03-16 Thread Boaz Yahav

Check out : 

http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm

This is your one stop shop for hosting. WeberDev.com is hosted there
and I can tell you that their service is amazing. They are fast, reliable
and more than anything, very professional (specially in PHP / MySQL).

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Can you recommend an ISP with the following?


I'm looking to move from an old Web host (stormweb.net) that has
entirely stopped responding to customer support emails. I liked what
they had to offer, before they became unresponsive, so I'm looking for
a similar ISP with:

*PHP4
*MySQL
*Telnet access
*Decent Support
*Preferably a Cobalt server (or one with a VERY good Web-based
administrator, most other types of Web administrators I've seen have
been clunky and a PITA)
*Pretty Cheap

I've checked out ISP check, and it would be great if they listed the
type of Wed-based administrator, but they don't. It's VERY tedious to
get a demo account, and see that their Web-based administrator is
junk. I'm used to the very slick administrator found on Cobalt
servers. I have given up after a half-dozen attempts at other servers.
I sincerely hope someone can help.

Thank you very much,
Jamie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Login System with access levels

2001-03-16 Thread Pierre-Yves Lemaire


One solution:
You set up a separate table:
user_level { level_id (unsigned int), level_description (varchar 100 )}

it looks like this:
level_idlevel_description
100 admin
200user

In your user table you add level_id as a field.
After a good validation of the user (username and password), you grab the
level_id
and make a session variable out of it.

Than in you page you decide what you show or not to the user based upon the
level_id

if( $level_id = 100 ){
show link for admin
}
if( $level_id = 101  $level_id = 200 ){
show link for user
}

Having another table and separating the id by a hundred number lets you add
more security level as the site grows.

This is one solution, I am shure there is many more and I would
like to see what other people do as well...

py





- Original Message -
From: Jordan Elver [EMAIL PROTECTED]
To: PHP General Mailing List [EMAIL PROTECTED]; PHP DB Mailing
List [EMAIL PROTECTED]
Sent: Friday, March 16, 2001 7:28 PM
Subject: [PHP] Login System with access levels


 Hi,
 I've got a db with a username and password in it. I can let people log in,
 like SELECT * FROM table WHERE username = username AND password =
password.

 But how can I add an access level column so that I can have different
levels
 of security. So admin's can read everything, but users can only read
certain
 sections.

 How could I add to my db and structure a query?

 Any ideas would be good,

 Cheers,

 Jord

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] XML Newbie. HELP!

2001-03-16 Thread Diego Fulgueira

Hi! Ok, this is not a question about PHP, but since this is such a great
discussion forum, I am certain it is a good place to get started with a new
technology.

The thing is I have a DTD specification and I want to translate it into a DB
schema, and then create an "add-delete-modify" application.

OK!! It might seem I am asking too much, but I dont even know if this can
be done, so any comments will appreciated. It would be great if you just
gave me a link to a good XML and DTD tutorial.

I also want to know if I can create XML documents with PHP, what kind of
software do i need to parse those documents, and how can I put the data in
my DB. Any clue, and I mean ANY, will be appreciated.

THANKS A LOT IN ADVANCE!
Cheers, Diego.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] XML Newbie.!

2001-03-16 Thread Diego Fulgueira

Hi! Ok, this is not a question about PHP, but since this is such a great
discussion forum, I am certain it is a good place to get started with a new
technology.

The thing is I have a DTD specification and I want to translate it into a DB
schema, and then create an "add-delete-modify" application.

OK!! It might seem I am asking too much, but I dont even know if this can
be done, so any comments will appreciated. It would be great if you just
gave me a link to a good XML and DTD tutorial.

I also want to know if I can create XML documents with PHP, what kind of
software do i need to parse those documents, and how can I put the data in
my DB. Any clue, and I mean ANY, will be appreciated.

THANKS A LOT IN ADVANCE!
Cheers, Diego.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] inner workings of extract

2001-03-16 Thread dempsejn

Hi all,

I've recently discovered the extract function (thanks to the poster 
regarding it), and have found it to save lots of time. 
I'm having a problem though. 99 times out of 100 when someone thinks 
they've found a "bug" it's actually their misuse of the function, so i'm 
pretty sure this is the case with me. Anyway, here's the deal:

I have a function. Inside this function i have

global $name, $type, $location; (and others)

I make a call to a mysql database and get the result in $result.
Then I used to do this:

$name = $row["name"];
$type = $type["type"];
etc.

extract makes this a lot nicer. However, at the end of this function i 
call another function. This also uses the same global variables. Previous 
this worked fine. But now that i'm using extract, while i do have access 
to the variables in the function, i can't get them in the next. 

My guess is that the way extract works, (somehow, who knows), its 
creating a local variable named $name and setting my info to that, as 
opposed to $name = $row["name"] which sets the global. So, even though i 
can access $name in the function, its lost to the next. 
This isn't a huge issue--i can go back to the old way, or pass the 
variables in the function, but there are enough that i wanted to know if 
anyone else has experienced this. Is there some way to tell extract to 
extract the variables and set the results to the global versions?
Maybe i'm way off and its a small code error, but I really do doubt this, 
as i've commented out lines and gone back and forth and get the same 
result. here's the basic idea though:
function tester(){
global $name;
$row = mysql_fetch_array($sql_result);
$name = $row["name"];
nextone();
/*this works fine, but if i have extract($row) and comment out
the $name = $row["name"] line, then i can't see the variable in the 
next function*/

}
function nextone(){
global $name;
echo $name;
}

any ideas?

thanks,
jack



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-CVS] cvs: php4 /ext/standard array.c

2001-03-16 Thread Andrei Zmievski

andrei  Fri Mar 16 11:29:23 2001 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  @- Fixed all relevant array functions to avoid moving the internal array
  @ pointer during operations. (Andrei)
  
  

Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.101 php4/ext/standard/array.c:1.102
--- php4/ext/standard/array.c:1.101 Mon Mar 12 02:14:00 2001
+++ php4/ext/standard/array.c   Fri Mar 16 11:29:23 2001
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.101 2001/03/12 10:14:00 stas Exp $ */
+/* $Id: array.c,v 1.102 2001/03/16 19:29:23 andrei Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -954,9 +954,11 @@
  *retval_ptr,  /* Return value - unused */
  *key; /* Entry key */
char  *string_key;
+   ulong  string_key_len;
ulong  num_key;
+   HashPosition pos;
CLS_FETCH();
-   BLS_FETCH();
+   ELS_FETCH();
 
/* Allocate space for key */
MAKE_STD_ZVAL(key);
@@ -965,22 +967,22 @@
args[1] = key;
args[2] = userdata;
 
-   zend_hash_internal_pointer_reset(target_hash);
+   zend_hash_internal_pointer_reset_ex(target_hash, pos);
 
/* Iterate through hash */
-   while(zend_hash_get_current_data(target_hash, (void **)args[0]) == SUCCESS) {
+   while(zend_hash_get_current_data_ex(target_hash, (void **)args[0], pos) == 
+SUCCESS) {
/* Set up the key */
-   if (zend_hash_get_current_key(target_hash, string_key, num_key, 1) 
== HASH_KEY_IS_LONG) {
+   if (zend_hash_get_current_key_ex(target_hash, string_key, 
+string_key_len, num_key, 0, pos) == HASH_KEY_IS_LONG) {
Z_TYPE_P(key) = IS_LONG;
Z_LVAL_P(key) = num_key;
} else {
Z_TYPE_P(key) = IS_STRING;
Z_STRVAL_P(key) = string_key;
-   Z_STRLEN_P(key) = strlen(string_key);
+   Z_STRLEN_P(key) = string_key_len-1;
}

/* Call the userland function */
-   if (call_user_function_ex(CG(function_table), NULL, 
*BG(array_walk_func_name),
+   if (call_user_function_ex(EG(function_table), NULL, 
+*BG(array_walk_func_name),
   retval_ptr, userdata ? 3 : 2, 
args, 0, NULL) == SUCCESS) {

zval_ptr_dtor(retval_ptr);
@@ -988,11 +990,7 @@
php_error(E_WARNING,"Unable to call %s() - function does not 
exist",
  (*BG(array_walk_func_name))-value.str.val);
 
-   /* Clean up the key */
-   if (zend_hash_get_current_key_type(target_hash) == HASH_KEY_IS_STRING)
-   efree(Z_STRVAL_P(key));
-   
-   zend_hash_move_forward(target_hash);
+   zend_hash_move_forward_ex(target_hash, pos);
 }
efree(key);

@@ -1156,6 +1154,7 @@
char *var_name, *final_name;
ulong num_key, var_name_len;
int var_exists, extract_type, key_type, count = 0;
+   HashPosition pos;
 
switch(ZEND_NUM_ARGS()) {
case 1:
@@ -1204,9 +1203,9 @@
return;
}

-   zend_hash_internal_pointer_reset(Z_ARRVAL_PP(var_array));
-   while(zend_hash_get_current_data(Z_ARRVAL_PP(var_array), (void **)entry) == 
SUCCESS) {
-   key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(var_array), 
var_name, var_name_len, num_key, 0, NULL);
+   zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(var_array), pos);
+   while(zend_hash_get_current_data_ex(Z_ARRVAL_PP(var_array), (void **)entry, 
+pos) == SUCCESS) {
+   key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(var_array), 
+var_name, var_name_len, num_key, 0, pos);
final_name = NULL;
var_exists = 0;
 
@@ -1217,7 +1216,7 @@
final_name = emalloc(MAX_LENGTH_OF_LONG + Z_STRLEN_PP(prefix) 
+ 2);
zend_sprintf(final_name, "%s_%ld", Z_STRVAL_PP(prefix), 
num_key);
} else {
-   zend_hash_move_forward(Z_ARRVAL_PP(var_array));
+   zend_hash_move_forward_ex(Z_ARRVAL_PP(var_array), pos);
continue;
}

@@ -1271,7 +1270,7 @@
efree(final_name);
}
 
-   zend_hash_move_forward(Z_ARRVAL_PP(var_array));
+   zend_hash_move_forward_ex(Z_ARRVAL_PP(var_array), pos);
}
 
RETURN_LONG(count);
@@ -1279,8 +1278,7 @@
 /* }}} */
 
 
-/* {{{ void _compact_var(HashTable *eg_active_symbol_table, zval *return_value, zval 
*entry) */

[PHP] include php3 -vs- 4

2001-03-16 Thread Jack Sasportas

Is there a workaround under php3 for include_once ?

Thanks

___
Jack Sasportas



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] include php3 -vs- 4

2001-03-16 Thread Boget, Chris

 Is there a workaround under php3 for include_once ?

if( !$this_include_file_only_variable_declared ) {
  $this_include_file_only_variable_declared = 1;

  // your include script here

}

And if you attempt to include the file more than once
in a script, the IF() will resolve true and skip past the
include script.

Chris



Re: [PHP] include php3 -vs- 4

2001-03-16 Thread Philip Olson

there's a few worthy notes within user comments under include() in manual,
have a look here :

http://www.php.net/manual/en/function.include.php

regards,
philip


On Fri, 16 Mar 2001, Jack Sasportas wrote:

 Is there a workaround under php3 for include_once ?
 
 Thanks
 
 ___
 Jack Sasportas
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] include php3 -vs- 4

2001-03-16 Thread rm

try something like

define("CONFIGURATION", "YES");
in xyz-inc-1.php

if (CONFIGURATION != "YES") {
include("/xyz-inc-1.php");
in the script

--- Jack Sasportas [EMAIL PROTECTED]
wrote:
 Is there a workaround under php3 for include_once ?
 
 Thanks
 

___
 Jack Sasportas
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: Bug IDs #8772, #9002, maybe #9724 - session write handler and register_globals

2001-03-16 Thread Jaime Bozza

Hello,
   (Using both 4.0.4pl1 and latest CVS as of today.)  I have been having
similar problems with defining my own session handling routings and
register_globals.  If register_globals is off, a new session doesn't seem to
call the "write" handler, thus the session never gets stored.  With
register_globals=on, the session gets stored correctly.

   I've done some testing and found out a fix to the problems which ends up
being better than keeping register_globals on.  Here's my code for my "read"
handler (PostgreSQL-based).


--
function sess_read($sid) {
global $SESS_DBH;

$qry = "SELECT value FROM sessions WHERE sid = '$sid'";
$qid = pg_exec($SESS_DBH, $qry);

if (pg_numrows($qid)  0) {
list($value) = pg_fetch_row($qid, 0);
return $value;
}

return "";
}
---

   Originally (last line in function above)[EMAIL PROTECTED], I was
returning a FALSE instead of a blank string.  When I switched over to
returning a blank string (when there wasn't any data in the session
database), my "write" handler gets called correctly.


   I'm not sure if this will fix anybody else's problems, but if you change
your read handler to return a blank string instead of a FALSE condition, it
may start working for you as well!  (If it DOES help you out, please let me
know.)


Jaime Bozza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] dynamic url from MySql field data

2001-03-16 Thread Claudia

I am attempting to create a dynamic url from a field that has the value of
the dynamic url.

Here is the scenario:

1 - Field in MySql database = $logo_link_var =
page.php3?afl=$aflsite=$sitepage=contactad=$ad_type
2 - Select logo_link_var from database and assign to $logo_link -- code is:

$search_query = "select site.logo_link_var from site where ( $afl =
site.afl_name )";
$result = mysql_query ( $search_query );

$logo_link = mysql_result ( $result, 0, "site.logo_link_var" ); (only 1
record matches query)
$logo = "a href='$logo_link'img src='../allimages/$logo_graphic'
width='$logo_link_width' height='$logo_link_height' border='0'
alt='$logo_alt_text'/a";

When I click on the link I receive parse errors -- and the window displays
this section in the url:

page.php3?afl=$aflsite=$sitepage=contactad=$ad_type

The program is not finding the $afl or $site values

if I create the $logo variable as follows -- it works OK.

$logo = "a
href='page.php3?afl=$aflsite=$sitepage=contactad=$ad_type'img
src='../allimages/$logo_graphic' width='$logo_link_width'
height='$logo_link_height' border='0' alt='$logo_alt_text'/a";

Any suggestions?








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FileUpload problematic

2001-03-16 Thread Thalis A. Kalfigopoulos

Helloppl,
a problem with a file_upload form :-( Here is what I've done so far:

File test.php which has the form is this:
HTML
BODY
?php include("handle_upload.php"); ?
FORM ENCTYPE="multipart/form-data" ACTION="?php print $PHP_SELF ?" METHOD="POST"
INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="64000"
INPUT TYPE="submit" VALUE="go!"
INPUT TYPE="file" NAME="up_file"
/FORM
/BODY
/HTML

Here is the included php file (handle_upload.php):
?php
if(isset($up_file)){
print "PYou have succesfully sent the following file:BR\n";
print "path: $up_fileBR\n";
print "filename: $up_file_nameBR\n";
print "filesize: $up_file_sizeBR\n";
print "filetype: $up_file_typeBR\n";
}
?

When one submits a file (file exists and is within given MAX_FILE_SIZE boundaries), 
the handle_upload.php condition is true, so I get the following output in my browser:

You have succesfully sent the following file:
path: /tmp/phpvtMKjj
filename: test2.jpg
filesize: 27365
filetype: image/jpeg
and again the form to upload another file

Then I go and check under /tmp and I do not find anything :-(

I have in my php.ini:

; File Uploads ;

file_uploads= On
upload_tmp_dir  = /tmp
upload_max_filesize = 2M

I am using Apache 1.3.14 with DSO and php is a .so and Php is version 4.0.4

It is not a permissions problem cause I checked the Apache logs, and all dirs that 
need to be accessed are actually writable by the httpd user. I have read through 
"Handling file uploads" (http://www.php.net/manual/it/features.file-upload.php) and I 
don't see what is wrong :-(


thanks ins advance,
thalis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] managing image files with PHP/Mysql

2001-03-16 Thread Mig

Hello, I want to thank Kathleen and other people for ideas about uploading / 
displaying images using PHP and Mysql.
I checked these ideas and they work very well, so I will use them into my program. For 
storing and retrieving image streams, I used addslashes and stripslashes PHP functions.

The only problem still remaining is on client-side point of view. When somebody going 
to upload file, browsers open little box to let user choose file (input 
type="FILE"...).
I wish user to know somewhat is the image he/she is going to upload, so I want to 
display this image before user uploading. For this action, I would be able to control 
the 'BROWSE'  button that appears on form.
Since this button doesn't apply to POST method, nor it will execute function on Form 
command, how can I control this action?
Is there some doc explaining features of these objects?

Thanks

Miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Shopping Carts and Sessions

2001-03-16 Thread DynamicHTML

In a message dated 3/16/01 2:02:07 PM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


 Can this be used via .htaccess in a shared hosting situation?
 

I believe it can -- never done it personally though...


don



[PHP] Hello! PHP

2001-03-16 Thread Celestino Roberto Alejandro

Hello, i'm working with PHP, and i need use a classes that this company have developed 
in java, can i use it from php?
...yes, i know that i can, but, when i make the configuration of the php.ini, run the 
hello example, all rights, but, when i make a class
that use a frame of awt, for show a window, doesn't work, WHY?, the errors are, of 
Null pointer, and not found classes, but?, i need copy all classes of the basic 
structure of java, in my java.classpath?...where i can found more info?
:-)
Robert 



[PHP-CVS] cvs: php4 /ext/standard array.c

2001-03-16 Thread Frank M. Kromann

fmk Fri Mar 16 11:48:40 2001 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  Fixing build on Win32 by adding missing   BLS_FETCH();
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.102 php4/ext/standard/array.c:1.103
--- php4/ext/standard/array.c:1.102 Fri Mar 16 11:29:23 2001
+++ php4/ext/standard/array.c   Fri Mar 16 11:48:40 2001
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.102 2001/03/16 19:29:23 andrei Exp $ */
+/* $Id: array.c,v 1.103 2001/03/16 19:48:40 fmk Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -957,6 +957,7 @@
ulong  string_key_len;
ulong  num_key;
HashPosition pos;
+   BLS_FETCH();
CLS_FETCH();
ELS_FETCH();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Can CONSTANT's be made persistent?

2001-03-16 Thread Johnson, Kirk

Can a defined()'d CONSTANT be made persistent between pages? According to my
experiments, the answer is "no". Am I missing something?

TIA

Kirk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can CONSTANT's be made persistent?

2001-03-16 Thread Aaron Tuller

put your defines in an include that all your pages include.

-aaron

At 2:28 PM -0700 3/16/01, Johnson, Kirk wrote:
Can a defined()'d CONSTANT be made persistent between pages? According to my
experiments, the answer is "no". Am I missing something?

TIA

Kirk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] managing image files with PHP/Mysql

2001-03-16 Thread Jack Sasportas

Don't know how to do this, but basically I beleive Java will be the only way to 
execute on the fly and load the image in question so it can be approved so to speak 
which is what I beleive you are trying to do

Good Luck...

Mig wrote:

 Hello, I want to thank Kathleen and other people for ideas about uploading / 
displaying images using PHP and Mysql.
 I checked these ideas and they work very well, so I will use them into my program. 
For storing and retrieving image streams, I used addslashes and stripslashes PHP 
functions.

 The only problem still remaining is on client-side point of view. When somebody 
going to upload file, browsers open little box to let user choose file (input 
type="FILE"...).
 I wish user to know somewhat is the image he/she is going to upload, so I want to 
display this image before user uploading. For this action, I would be able to control 
the 'BROWSE'  button that appears on form.
 Since this button doesn't apply to POST method, nor it will execute function on Form 
command, how can I control this action?
 Is there some doc explaining features of these objects?

 Thanks

 Miguel

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___
Jack Sasportas



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Associative vs normal arrays

2001-03-16 Thread Joe

Is there a way to determine if an array is associative or not?  Maybe something 
similar to the is_array() function ??

Thanks,

JOE



[PHP-CVS] cvs: php4 /ext/standard array.c

2001-03-16 Thread Andrei Zmievski

andrei  Fri Mar 16 11:51:08 2001 EDT

  Modified files:  
/php4/ext/standard  array.c 
  Log:
  All user callbacks should be to EG(function_table).
  
  
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.103 php4/ext/standard/array.c:1.104
--- php4/ext/standard/array.c:1.103 Fri Mar 16 11:48:40 2001
+++ php4/ext/standard/array.c   Fri Mar 16 11:51:08 2001
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.103 2001/03/16 19:48:40 fmk Exp $ */
+/* $Id: array.c,v 1.104 2001/03/16 19:51:08 andrei Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -521,7 +521,7 @@
Bucket *s;
pval **args[2];
pval *retval_ptr;
-   CLS_FETCH();
+   ELS_FETCH();
BLS_FETCH();
 
f = *((Bucket **) a);
@@ -530,7 +530,7 @@
args[0] = (pval **) f-pData;
args[1] = (pval **) s-pData;
 
-   if (call_user_function_ex(CG(function_table), NULL, 
*BG(user_compare_func_name), retval_ptr, 2, args, 0, NULL)==SUCCESS
+   if (call_user_function_ex(EG(function_table), NULL, 
+*BG(user_compare_func_name), retval_ptr, 2, args, 0, NULL)==SUCCESS
 retval_ptr) {
long retval;
 
@@ -609,7 +609,7 @@
pval *args[2];
pval retval;
int status;
-   CLS_FETCH();
+   ELS_FETCH();
BLS_FETCH();
 
args[0] = key1;
@@ -637,7 +637,7 @@
Z_TYPE(key2) = IS_LONG;
}
 
-   status = call_user_function(CG(function_table), NULL, 
*BG(user_compare_func_name), retval, 2, args);
+   status = call_user_function(EG(function_table), NULL, 
+*BG(user_compare_func_name), retval, 2, args);

zval_dtor(key1);
zval_dtor(key2);
@@ -958,7 +958,6 @@
ulong  num_key;
HashPosition pos;
BLS_FETCH();
-   CLS_FETCH();
ELS_FETCH();
 
/* Allocate space for key */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >