[PHP] Help Please

2002-12-10 Thread SpiderWebb
From: SpiderWebb [EMAIL PROTECTED]
Subject: Help nedded
Date: 09 December 2002 16:46

I dont know if this is possible in PHP (Newbie) im working on a project
where each product has 3 diffierent prices depending on the amount sold so
say for example 1- 100 price A 101-299 price B and above 300 Price C.  What
I need to be able to do is increment an mysql database field each time an
item is sold then look at that field to decide which price variable to write
to the price field of the database. Could someone point me in the right
direction where I could solve this or to someone who could

Thanks in advance.
Spiderwebb





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




Re: [PHP] Re: Snoopy Class

2002-12-10 Thread DL Neil
Hi UberGoober,
Thanks for your (unique) reply.

Specifically: am playing with web pages/link continuity checking and
suchlike. So HTTP; as an improvement over the facilities offered by fopen().

Have worked through the readme examples, and dived into the script's code,
as you would expect. Was hoping for something that explains in a little more
depth, eg why this combination/sequence; to see if there is more that I can
learn and/or more that I am missing/can make use of...
- being ignorant allows me to pose the question, but by definition, not to
define an answer for you!

Any pointers to material, or advice from your experience would be most
welcome,
=dn


 A tutorial to help you do *what* exactly?
 The readme provides plenty of examples:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/snoopy/Snoopy/README?rev=1.6;
 content-type=text/vnd.viewcvs-markup


  (pardon the pun)
  Please recommend a Snoopy tutorial,
  =dn
  PS Google has not been my friend!


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




Re: [PHP] Help Please

2002-12-10 Thread BABA Yoshihiko
SpiderWebb wrote:

From: SpiderWebb [EMAIL PROTECTED]
Subject: Help nedded
Date: 09 December 2002 16:46

I dont know if this is possible in PHP (Newbie) im working on a project
where each product has 3 diffierent prices depending on the amount sold so
say for example 1- 100 price A 101-299 price B and above 300 Price C.  What
I need to be able to do is increment an mysql database field each time an
item is sold then look at that field to decide which price variable to write
to the price field of the database. Could someone point me in the right
direction where I could solve this or to someone who could

Thanks in advance.
Spiderwebb


This seems a matter of database design.  For simple solution, use COUNT 
in SQL.  But having a record for each item would probably exceed the 
limit of either harddisc or database one day.


--
BABA Yoshihiko


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



Re: [PHP] Help Please

2002-12-10 Thread BABA Yoshihiko
Forget my previous advice. I'd misunderstood it.

BABA Yoshihiko wrote:


This seems a matter of database design.  For simple solution, use COUNT 
in SQL.  But having a record for each item would probably exceed the 
limit of either harddisc or database one day.



--
BABA Yoshihiko


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




[PHP] Help needed

2002-12-10 Thread SpiderWebb
I dont know if this is possible in PHP (Newbie) im working on a project
where each product has 3 diffierent prices depending on the amount sold so
say for example 1- 100 price A 101-299 price B and above 300 Price C.  What
I need to be able to do is increment an mysql database field each time an
item is sold then look at that field to decide which price variable to write
to the price field of the database. Could someone point me in the right
direction where I could solve this or to someone who could

Thanks in advance.
Spiderwebb



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




[PHP] Theoretical - Device server using PHP - Is this possible?

2002-12-10 Thread Steve Jackson
Hi all,

I work for a company that manufactures device servers. They currently
have a very low internal memory (about 8MB) which is more than enough
for TCP/IP connections (which BTW we just released the code open source
to anyone interested www.opentcp.org) to devices but I was wondering if
there was any way we could give these device servers more functionality
by somehow using PHP. Obviously the device server itself has nowhere
near enough memory to have PHP installed upon it but it would be
interesting to see if anyone has any ideas or theories about if this is
possible.

Thanks in advance.

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


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




Re: Re[2]: [PHP] Script not working from one computer

2002-12-10 Thread DL Neil
Hi John,

You mention that it is a login script and that input is rejected. Is it
rejected when it is initially typed in, or is it reported as rejected when
ensuing pages are served?

Please check the IE on the offending machine. Does it have security settings
that forbid cookies?

Check the ipconfig/all settings against other machines/check any contents of
HOSTS file (and the other MS one, if used)

Check execution of phpinfo() against similar on other/working machines.

Regards,
=dn


 Tuesday, December 10, 2002, 2:31:48 AM, you wrote:
  Have you checked:
 
  Browser versions? (is the browser the same type/version as on the other
  machines)
  Is it a laptop? If so, are you using the internal keyboard with Numlock
 1JWH on?
  Is the machine in question set-up on the network correctly, i.e. has it
 1JWH got
  domain, gateway addresses etc setup - this would only affect it if the
  Intranet server is set-up to only allow a certain range of IP addresses
or
  doamin/hostnames etc.

 1JWH Browser's are the same (128bit). It's not a laptop. The web page can
pull up
 1JWH any other external web page correctly.

 1JWH What gets me is that the computer can pull up the log in page. It
can pull
 1JWH up another, unprotected page from that web server. But, no matter
who tries
 1JWH to log in from that machine, I get a bad username and password, even
though
 1JWH they are right. It's like the browser is sending bad data to a
script that
 1JWH works fine from every other computer.

 1JWH Anyone else have any other ideas?

 1JWH ---John Holmes...

  I know, PHP is executed server side, so it shouldn't matter about the
  computer, but...
 
  I've got a basic log in script that takes username and password and
does
 1JWH the
  typical SELECT to find a match. If it's good, it sets some session
 1JWH variables
  and redirects to a main page, otherwise redirects back to the login
page
  with an error message.
 
  The script works from all computers but one. The login page will come
up,
  but no matter what, it says the username and password are bad. They are
  correct though, caps lock isn't on, etc. I've cleared the cookies and
 1JWH cache
  and it still does the same thing.
 
  The script is on an intranet. One computer that had this issue was
fixed
 1JWH by
  using https://computername.company.army.mil instead of just
  https://computername. But for this computer, both addresses give the
same
  result.
 
  So, I'm sure it's not the PHP script, so I'm looking for ideas of what
I
  should check, settings wise, on the client computer? Any help is
greatly
  appreciated.


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




Re: [PHP] How to test php.info from command line

2002-12-10 Thread DL Neil
I agree with Jason, it seems strange to have a command line option (that can
only apply to command line operation) and yet the output be in
browser/non-command line format... However with PHP-CLI 'coming soon', maybe
that sorts things out.

Meantime may I suggest combining the two answers:

php -i  /tmp/test_php.html

(note file type)
Thereafter chuck test_php.html into your browser for convenient viewing/to
'get rid' of the tags/static.
(when I do this, the graphics don't print out, eg PHP logo at page top -
which is a convenient way of differentiating between phpinfo() from the
command line and from a web server!)

Hope it helps,
=dn


  How to test php.info from command line:
 
  #echo ?php phpinfo()? | php
 
  to the standard output (screen) - or if you want to a file like this
way:
  #echo ?php phpinfo()? | php  /tmp/test_php.txt
 
  Oliver Etzel
 
  .eu - domain are coming soon
  www.t-host.com

 Or simply

   #php -i

 It would be nice if there was a text-only version without all the HTML
gunge.


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




Re: Re[2]: [PHP] Script not working from one computer

2002-12-10 Thread Jason Wong
On Tuesday 10 December 2002 17:11, DL Neil wrote:
 Hi John,

 You mention that it is a login script and that input is rejected. Is it
 rejected when it is initially typed in, or is it reported as rejected when
 ensuing pages are served?

 Please check the IE on the offending machine. Does it have security
 settings that forbid cookies?

 Check the ipconfig/all settings against other machines/check any contents
 of HOSTS file (and the other MS one, if used)

 Check execution of phpinfo() against similar on other/working machines.

Is it a plain old login script, or is it one which uses javascript to MD5 the 
password? If the latter, you may want to check you've enabled javascript.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
I wish a robot would get elected president.  That way, when he came to town,
we could all take a shot at him and not feel too bad.
-- Jack Handley
*/


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




[PHP] PHP and SOAP

2002-12-10 Thread Tony Burgess
Hi everyone,

I have been looking for a decent tutorial on how to use PHP and SOAP
(nusoap) but as yet I haven't been able to find anything. I have a copy of a
client script and a server script but I can't get them to work properly.
Any help would be appreciated.

Thanks

--
Tony Burgess



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




Re: [PHP] Different output on two different servers

2002-12-10 Thread DL Neil
Hi Steve,
Have you solved this already?

If not, when you copied the code between machines was there some effort to
ensure that the 'copy' points to the RDBMS/tbls on the same box/different
box - or does the original box have code that points to tbls on itself, and
the second box have code that runs on 'it' but (still) points to tbls on the
first box (not on itself)?
[make sense?]

Regards,
=dn

PS what's the difference between production and live?
(in my jargon they are synonyms)


 I have set-up a production server and a live server. The problem is with
 the production server. I am using PHP version 4.2.3 and MySQL 3.23.39 on
 both servers. We have just configured the production server to mimick
 the live server (which incidentally works fine) and the code from both
 servers is identical. I dumped all the data into the production MySQL
 database then copied the code from the live server to our production one
 and there didn't seem to be any problems. However today my boss asked
 for a new category to go into our webshop with a new product. I went
 into MySQL and updated the database fine then when I went to check the
 section of the site to see if the extra category and product are there I
 get my own PHP encoded error 'No categories currently available'. It
 fails on the first function:
 function display_categories($cat_array)

 {
   //display all categories in the array passed in
   if (!is_array($cat_array))
   {
  echo brNo categories currently available.br;
   }
   else
   {
 //create table
 echo table width = \760\ border='0'
 background='images/shopbg.gif';
 etc.

 Now it works superbly on my live server and did work fine until I tried
 adding another field to the database on the production server. Where
 should I start looking to de-bug this?

 Steve Jackson
 Web Developer
 Viola Systems Ltd.
 http://www.violasystems.com
 [EMAIL PROTECTED]
 Mobile +358 50 343 5159


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




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




[PHP] Resize an image from URL

2002-12-10 Thread fragmonster
Hi,

I want to resize an image from an URL if it is too large. Is there a way 
to know the size (width and height) of an image from an url without 
download it?

For exemple: getWidth(http://www.toto.com/imlage.gif)


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



Re: [PHP] Resize an image from URL

2002-12-10 Thread Jason Wong
On Tuesday 10 December 2002 18:52, fragmonster wrote:
 Hi,

 I want to resize an image from an URL if it is too large. Is there a way
 to know the size (width and height) of an image from an url without
 download it?

 For exemple: getWidth(http://www.toto.com/imlage.gif)

No. PHP is good, but not *that* good.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Common sense and a sense of humor are the same thing, moving at
different speeds.  A sense of humor is just common sense, dancing.
-- Clive James
*/


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




[PHP] PHP_SELF Variable

2002-12-10 Thread info
Hello List,

anybody knows how to set the PHP_SELF variable?

Short answers are welcome...
Oliver Etzel


RE: [PHP] update query based on array

2002-12-10 Thread Ford, Mike [LSS]
 -Original Message-
 From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
 Sent: 09 December 2002 23:52
 
 So you mean do something like:
 
 input type=text name=category[15] value=Prep School
 input type=text name=rank[15] value=30 size=4
 input type=checkbox name=rankid[15] value=166
 
 Doesn't that create 2 additional arrays though?

Yes -- but how else are you going to get multiple values for each name from
your form to your PHP script?  Without the array subscripts on both category
and rank, you will only ever get one category and one rank passed to your
script.

Using the above, just do:

foreach ($_POST['rankid'] as $row, $rankid):
// in here, $rankid is the value of the current rankid[]
// $_POST['category'][$row] is associated category[] value
// $_POST['rank'][$row] is associated rank[] value
endforeach;

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
Not quite sure what you mean, but I'm guessing you're trying to use 
$PHP_SELF and it's not set.  If that's the case, use 
$_SERVER['PHP_SELF'] instead.  Register_globals defaults to disabled now.

[EMAIL PROTECTED] wrote:

Hello List,

anybody knows how to set the PHP_SELF variable?

Short answers are welcome...
Oliver Etzel
 


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




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




[PHP] Re: Resize an image from URL

2002-12-10 Thread Lokesh Setia

I dont believe that such a function would already exist.  If saving 
network bandwidth is your aim, you can open an HTTP connection yourself, 
read only the first 10 bytes, and close the connection.  The first six 
bytes of an GIF image is always 'GIF87a' or 'GIF89a'.  Then comes the 
width as a 16-bit integer (LSB first), and then the height, also as a 
16-bit integer.

see details of the format here:
http://www.daubnet.com/formats/GIF.html

hth
loki#


Fragmonster wrote:
Hi,

I want to resize an image from an URL if it is too large. Is there a way 
to know the size (width and height) of an image from an url without 
download it?

For exemple: getWidth(http://www.toto.com/imlage.gif)



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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread info
Hello Leif, hello all,

after successfully compiling and installing php.4.3-dev from tarball
there in my info.php the variable  
  Variable Value 
  PHP_SELF    


PHP_SELF has no value. How can I set this?

Oliver Etzel


Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Johannes Schlueter
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
 after successfully compiling and installing php.4.3-dev from tarball
 ...
 PHP_SELF has no value. How can I set this?

Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look 
for register_globals

johannes

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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread info
Hello Johannes, hello all,

I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF']  has no value either.

What can I do on order to give PHP_SELF the right value?

Oliver Etzel 
  On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
   after successfully compiling and installing php.4.3-dev from tarball
   ...
   PHP_SELF has no value. How can I set this?

  Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look 
  for register_globals

  johannes

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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
Odd.  Mind doing: print_r($GLOBALS); and tsending the results?

[EMAIL PROTECTED] wrote:


Hello Johannes, hello all,

I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF']  has no value either.

What can I do on order to give PHP_SELF the right value?

Oliver Etzel 
 On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
  after successfully compiling and installing php.4.3-dev from tarball
  ...
  PHP_SELF has no value. How can I set this?

 Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look 
 for register_globals

 johannes

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


 


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




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




[PHP] server problems.

2002-12-10 Thread Steve Jackson
I have a production server and a 'live' web server. The set-ups are the
same and yet I can view code fine on the 'live' web site but not on the
production server. At least I can view one shopping cart section online
but not offline. All the other database driven stuff appears fine. I've
even tried dumping the 'live' database onto my production server and
deleting and re-installing the code. No effect. Any ideas? The shop
section even worked offline until I added a new category now it simply
doesn't show anything. Flummoxed because on the live server everything
works hunky dory. Also the shop admin functions are password protected -
now when I try to login to that it refuses to let me in, even though the
same password and login functions are ok on the live server. I tried
adding a new user - no effect. It's like it just refuses to read this
part of my database, but everything else will work OK. Any ideas?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread info
Hi Leif, hi all,

when I run the following script from commandline (RedHat7.3)
PHP_SELF has a value and I will get the following result:

--- snip
[_] = /usr/local/bin/php
[OLDPWD] = /home/fritz/htdocs3/bildvote/admin
[PHP_SELF] = info70.php
[SCRIPT_NAME] = info70.php
[SCRIPT_FILENAME] = info70.php
[PATH_TRANSLATED] = info70.php
[DOCUMENT_ROOT] = 
[argv] = Array

--- snip

How can I get this value when I run it as a CGI?

Oliver Etzel
  - Original Message - 
  From: Leif K-Brooks 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] 
  Sent: Tuesday, December 10, 2002 1:03 PM
  Subject: Re: [PHP] PHP_SELF Variable


  Odd.  Mind doing: print_r($GLOBALS); and tsending the results?

  [EMAIL PROTECTED] wrote:

  Hello Johannes, hello all,
  
  I compiled it as CGI-php
  and the variable $_SERVER['PHP_SELF']  has no value either.
  
  What can I do on order to give PHP_SELF the right value?
  
  Oliver Etzel 
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
 after successfully compiling and installing php.4.3-dev from tarball
 ...
 PHP_SELF has no value. How can I set this?
  
Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look 
for register_globals
  
johannes
  
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  
  

  

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




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




Re: [PHP] PHP_SELF Variable

2002-12-10 Thread Leif K-Brooks
It's because register_globals is off by default in your 4.3 
installation.  Change it in php.ini, or use the superglobal array instead.

[EMAIL PROTECTED] wrote:

Hi Leif, hi all,

when I run the following script from commandline (RedHat7.3)
PHP_SELF has a value and I will get the following result:

--- snip
   [_] = /usr/local/bin/php
   [OLDPWD] = /home/fritz/htdocs3/bildvote/admin
   [PHP_SELF] = info70.php
   [SCRIPT_NAME] = info70.php
   [SCRIPT_FILENAME] = info70.php
   [PATH_TRANSLATED] = info70.php
   [DOCUMENT_ROOT] = 
   [argv] = Array

--- snip

How can I get this value when I run it as a CGI?

Oliver Etzel
 - Original Message - 
 From: Leif K-Brooks 
 To: [EMAIL PROTECTED] 
 Cc: [EMAIL PROTECTED] 
 Sent: Tuesday, December 10, 2002 1:03 PM
 Subject: Re: [PHP] PHP_SELF Variable


 Odd.  Mind doing: print_r($GLOBALS); and tsending the results?

 [EMAIL PROTECTED] wrote:

 Hello Johannes, hello all,
 
 I compiled it as CGI-php
 and the variable $_SERVER['PHP_SELF']  has no value either.
 
 What can I do on order to give PHP_SELF the right value?
 
 Oliver Etzel 
   On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
after successfully compiling and installing php.4.3-dev from tarball
...
PHP_SELF has no value. How can I set this?
 
   Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look 
   for register_globals
 
   johannes
 
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
   
 

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




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


 


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




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




RE: Re[2]: [PHP] Script not working from one computer

2002-12-10 Thread John W. Holmes
  You mention that it is a login script and that input is rejected. Is
it
  rejected when it is initially typed in, or is it reported as
rejected
 when
  ensuing pages are served?

When it's initially typed in. 

  Please check the IE on the offending machine. Does it have security
  settings that forbid cookies?

No, it's a default install of IE6. I have a check that'll put up an
error if cookies are turned off and that's not the error I get. I get
the error saying that the username or password didn't match anything in
the database.

  Check the ipconfig/all settings against other machines/check any
 contents
  of HOSTS file (and the other MS one, if used)
 
  Check execution of phpinfo() against similar on other/working
machines.
 
 Is it a plain old login script, or is it one which uses javascript to
MD5
 the
 password? If the latter, you may want to check you've enabled
javascript.

It's just a plain log in script.

I'm going to troubleshoot it more today and throw in some tracing to the
functions to see where everything is going and what the login/password
values are all the time. I just haven't had a chance to make it over to
that computer yet. 

I have a feeling it's going to work out to be something stupidly
simple... like these problems always do. :)

---John Holmes...



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




[PHP] Re: Resize an image from URL

2002-12-10 Thread fragmonster
No,no. I just want to display distant images on my site (from another 
site). But, in order to not crash my look, just before display the image 
I want to evaluate its size. If it is too large I put a width attribute 
in the img tag.

I want to do that:

$imgWidth = getWidth(www.toto.com/image.gif);
if($imgWidth  400)
	echo img src=www.toto.com/image.gif width=400;
else
	echo img src=www.toto.com/image.gif;

I just want to know if it is possible to do the getWidth() function 
without download the image on the server.


Lokesh Setia wrote:

I dont believe that such a function would already exist.  If saving 
network bandwidth is your aim, you can open an HTTP connection yourself, 
read only the first 10 bytes, and close the connection.  The first six 
bytes of an GIF image is always 'GIF87a' or 'GIF89a'.  Then comes the 
width as a 16-bit integer (LSB first), and then the height, also as a 
16-bit integer.

see details of the format here:
http://www.daubnet.com/formats/GIF.html

hth
loki#


Fragmonster wrote:

Hi,

I want to resize an image from an URL if it is too large. Is there a 
way to know the size (width and height) of an image from an url 
without download it?

For exemple: getWidth(http://www.toto.com/imlage.gif)





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




RE: [PHP] server problems.

2002-12-10 Thread Rich Gray
A wild guess: Are you using a database abstraction class or configuration
file? Is it still pointing to the live server database instead of the
production server database?

Rich

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 12:34
To: PHP General
Subject: [PHP] server problems.


I have a production server and a 'live' web server. The set-ups are the
same and yet I can view code fine on the 'live' web site but not on the
production server. At least I can view one shopping cart section online
but not offline. All the other database driven stuff appears fine. I've
even tried dumping the 'live' database onto my production server and
deleting and re-installing the code. No effect. Any ideas? The shop
section even worked offline until I added a new category now it simply
doesn't show anything. Flummoxed because on the live server everything
works hunky dory. Also the shop admin functions are password protected -
now when I try to login to that it refuses to let me in, even though the
same password and login functions are ok on the live server. I tried
adding a new user - no effect. It's like it just refuses to read this
part of my database, but everything else will work OK. Any ideas?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159



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




Re: [PHP] Resize an image from URL

2002-12-10 Thread Mika Tuupola
On Tue, 10 Dec 2002, fragmonster wrote:

 I want to resize an image from an URL if it is too large. Is there a way 
 to know the size (width and height) of an image from an url without 
 download it?
 
 For exemple: getWidth(http://www.toto.com/imlage.gif)

Depending on the version of PHP youre using you can use either
PEAR's Image_Remote class:

http://pear.php.net/package-info.php?pacid=42

Or PHP's native getImageSize() 

http://fi.php.net/manual/en/function.getimagesize.php

To remotely get the dimensions of image file. IIRC the native
functions supports this since 4.0.5 and looking at the code
it does not download the whole image but parses the first few
bytes of the imagefile header (the same way as Image_Remote
does).


-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




[PHP] How know from wich page you came from

2002-12-10 Thread Rodrigo
Hi guys I need a way to know how to know from wich page the visitor
came, something like:
 
I wanna put in a php file a switch to do a certain action if the visitor
came from a certain page, and something else if he came from a diferent
one, this way I could write, update, insert, delete or anything I need
from a single file.
 
Thanks for any kind of input,
Rodrigo
 



Re: [PHP] PHP_SELF Variable

2002-12-10 Thread info
Hello Leif, hello all,

register_globals is on

How can I use the superglobal array?

And here is how my php behave:
when I run the following script: info70.php
?php
print_r($GLOBALS);
?
1) from commandline
then  [SCRIPT_NAME] = info70.php
is set correctly

2) direkt via http request from browser
then PHP_SELF = htdocs3/bildvote/admin/info70.php

zend and php-logo isn´t depicted.

3) via http script is in the htdocs (/usr/local/apache/htdocs) directory
  PHP_SELF = 

  What can I do?

  Oliver Etzel


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




[PHP] Re: Help Please

2002-12-10 Thread David Eisenhart
I can think of a couple of ways to tackle this:

1) The purest way is to do with your database design - a typical order
processing database will contain a table for products, a table for
customers, a table for orders, a table for order lines and so on ... If this
is implemented correctly (ie the tables are correct) you should be able to
do an grouping and aggregate type query on the order line table that will
return the number of any particular product sold and from there you can
apply the correct price. You'll need to understand relational database
design to do this yourself (a v good topic to know if you're doing much in
the way of database backed sites anyway). The O'Reilly Book Web Database
Design with Php and MySQL uses a wine order processing application as a
running example throughout (although this appears to be principally about
using Php with MySQL rather than database design itself it may be worth
checking out)

2) More along the lines of your suggestion below you can use the MySQL '+'
operator .Every time you sell an item you can run an update query which goes
something like:-
UPDATE table_name SET num_of_items_sold_field= (num_of_items_sold_field + 1)
WHERE product_id_field = the_product_id
You can then use the value in 'num_of_items_sold_field' to determine product
price.


You may want to check out the MySQL list as the issue appears to be
principally a database rather than a php one.

If at all possible I would advocate the first approach - a properly designed
database will generally always pay divis in the long run.

Hope that this helps.
David Eisenhart


Spiderwebb [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 From: SpiderWebb [EMAIL PROTECTED]
 Subject: Help nedded
 Date: 09 December 2002 16:46

 I dont know if this is possible in PHP (Newbie) im working on a project
 where each product has 3 diffierent prices depending on the amount sold so
 say for example 1- 100 price A 101-299 price B and above 300 Price C.
What
 I need to be able to do is increment an mysql database field each time an
 item is sold then look at that field to decide which price variable to
write
 to the price field of the database. Could someone point me in the right
 direction where I could solve this or to someone who could

 Thanks in advance.
 Spiderwebb











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




RE: [PHP] How know from wich page you came from

2002-12-10 Thread Jon Haworth
Hi Rodrigo,

 Hi guys I need a way to know how to know from wich 
 page the visitor came

echo $_SERVER[HTTP_REFERER];

HTH
Jon

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




Re: [PHP] How know from wich page you came from

2002-12-10 Thread Justin French
*SOME* browsers set a referrer script name/url, and some don't, so you can't
rely on it.

The solution can be as simple as including the referring script as a GET
variable in the URL:

a href=page.php?ref=anotherpage.phpclick/a

Or, by keeping track of that sorta stuff with sessions...


Whenever I *have to* know the URL of the preceding script, I take the
directory, script name and query string
eg dir/dir/page.php?var1=foovar2=bah
and base64 encode it (so that the get vars don't register with / affect the
receiving script), and pass it to the next page:

?
$this_url = dir/dir/page.php?var1=foovar2=bah;
$this_url = base64_encode($this_url);
?
a href=page.php?ref=?=$this_url?click/a

On page.php, I decode it all with base64_decode(), and I know exactly where
the user came from.

Similar (or even smarter) stuff can be done with sessions.

Justin




on 11/12/02 1:20 AM, Rodrigo ([EMAIL PROTECTED]) wrote:

 Hi guys I need a way to know how to know from wich page the visitor
 came, something like:
 
 I wanna put in a php file a switch to do a certain action if the visitor
 came from a certain page, and something else if he came from a diferent
 one, this way I could write, update, insert, delete or anything I need
 from a single file.
 
 Thanks for any kind of input,
 Rodrigo
 
 

Justin French

http://Indent.com.au
Web Development  
Graphic Design



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




[PHP] imap_fetch_overview function doesn't work

2002-12-10 Thread kckannan
Hello All,
   
  I have installed Apache/1.3.27, PHP 4.2.3 with
imap support on HP-UX. When I try to run the following
php code,   imap_fetch_overview funcion
which is used to fetch mail headers for the given
sequence doesn't return anything even if there are
mails in the remote mail box. But this function works
fine on Linux. 




$mbox =
imap_open({your.imap.host:143},username,password)
or die(can't connect: .imap_last_error());

$overview = imap_fetch_overview($mbox,2,4:6,0);

if(is_array($overview)) {
   reset($overview);
   while( list($key,$val) = each($overview)) {
   print $val-msgno
   .  -  . $val-date
   .  -  . $val-subject
   . \n;
   }
}

imap_close($mbox); 




Is it a Bug ?

Any HELP is appreciated.


Thanks in Advance
Kannan

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Chad Day
Ok, I understand.  I was able to get NS to set the cookie, but -only- if I
put nothing in the domain field.


setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
echo meta HTTP-EQUIV=\REFRESH\ content=\0;url=nscookie2.php\;

did not work.  domain.com also did not work . .  this is kind of a pain, but
this is what I get for trying to make a site NS 4.x compatible I guess.  Is
there any way to specify the domain of a cookie with NS 4.x in this kind of
situation?

Thanks,
Chad

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:30 PM
To: Chad Day; php general
Subject: RE: [PHP] Cookie handling, NS 4.x?


--- Chad Day [EMAIL PROTECTED] wrote:
 I'm not sure how this would matter since the cookie is
 never set at all.. it's not an issue of it reading the
 cookie, as it can't read what is never set. I'll give
 it a shot when I get home though anyway.

Read my response again, and you'll see that what you are
saying here does not conflict. The cookie is indeed not
getting set, and that is likely because the browser does
not take action on the Set-Cookie header when it is
contained within a 302 response. If you use a meta redirect
rather than a header(Location: ...) call, the response
status will be 200 instead of 302, so the browser might
accept the cookie.

Chris

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



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




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Jaime Bozza
Hello,
   By any chance, is your website named http://domain.com or is it
http://www.domain.com ?

Jaime Bozza


 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 10, 2002 8:09 AM
 To: [EMAIL PROTECTED]; php general
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 Ok, I understand.  I was able to get NS to set the cookie, 
 but -only- if I
 put nothing in the domain field.
 
 
 setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
 echo meta DEFANGED_HTTP-EQUIV=\REFRESH\ 
 content=\0;url=nscookie2.php\;
 
 did not work.  domain.com also did not work . .  this is kind 
 of a pain, but
 this is what I get for trying to make a site NS 4.x 
 compatible I guess.  Is
 there any way to specify the domain of a cookie with NS 4.x 
 in this kind of
 situation?
 
 Thanks,
 Chad
 
 -Original Message-
 From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 5:30 PM
 To: Chad Day; php general
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 --- Chad Day [EMAIL PROTECTED] wrote:
  I'm not sure how this would matter since the cookie is
  never set at all.. it's not an issue of it reading the
  cookie, as it can't read what is never set. I'll give
  it a shot when I get home though anyway.
 
 Read my response again, and you'll see that what you are
 saying here does not conflict. The cookie is indeed not
 getting set, and that is likely because the browser does
 not take action on the Set-Cookie header when it is
 contained within a 302 response. If you use a meta redirect
 rather than a header(Location: ...) call, the response
 status will be 200 instead of 302, so the browser might
 accept the cookie.
 
 Chris
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



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




RE: [PHP] Please help - uploading multiple files

2002-12-10 Thread Allred, Mark
Darn, that's what I was afraid of.

Is there a way to do this in a client-side language like JavaScript?

Mark


-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:50 PM
To: Allred, Mark
Cc: 'php'
Subject: Re: [PHP] Please help - uploading multiple files


At 23:10 09.12.2002, Allred, Mark said:
[snip]
The problem is, I have to click Browse for each file.  

I want to be able to access the functionality to allow for Shift-Click
series picker that everyone probably knows about.  I need to be able to
slurp in 514 files at a time into an array, then parse the array in a for
loop.

Are there any PHP functions that will do that?
[snip] 

This has nothing to do with PHP - it's a client (browser) issue. AFAIK
there's no tag defined in HTML, or XHTML, that would do what you need.


-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/


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




[PHP] PHP_SELF on a php CGI

2002-12-10 Thread info
Hello Leif, hello all,

i compiled successfully php-4.3-dev deom tarball as CGI  on RedHat7.3

register_globals is on

And here is how my php behave:

When I run the following script: info70.php
?php
print_r($GLOBALS);
?
1) from commandline
then  [SCRIPT_NAME] = info70.php
is set correctly

2) direkt via http request from browser
then PHP_SELF = htdocs3/bildvote/admin/info70.php

zend and php-logo isn´t depicted.

3) via http script is in the htdocs (/usr/local/apache/htdocs) directory
  PHP_SELF = 

What can I do? How can I use the superglobal array?

Oliver Etzel
.eu-Domains are coming
www.t-host.com




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Chad Day
domain.com, but www is pointed to it as well.  When I was setting the
cookies with Header calls and using .domain.com, they worked fine (I want
to be able to access these cookies from my.domain.com, forums.domain.com,
etc, which is why they need to be set in .domain.com).  But then the NS 4.x
Header problem popped up, and now the domain issue..

In IE, the code I posted below:

setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
content=\0;url=nscookie2.php\;

works fine in regards to setting the cookie still.  NS 4.x is a piece of
crap. :(

Chad

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:07 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?


Hello,
   By any chance, is your website named http://domain.com or is it
http://www.domain.com ?

Jaime Bozza


 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 8:09 AM
 To: [EMAIL PROTECTED]; php general
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 Ok, I understand.  I was able to get NS to set the cookie,
 but -only- if I
 put nothing in the domain field.


 setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
 echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
 content=\0;url=nscookie2.php\;

 did not work.  domain.com also did not work . .  this is kind
 of a pain, but
 this is what I get for trying to make a site NS 4.x
 compatible I guess.  Is
 there any way to specify the domain of a cookie with NS 4.x
 in this kind of
 situation?

 Thanks,
 Chad

 -Original Message-
 From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 5:30 PM
 To: Chad Day; php general
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 --- Chad Day [EMAIL PROTECTED] wrote:
  I'm not sure how this would matter since the cookie is
  never set at all.. it's not an issue of it reading the
  cookie, as it can't read what is never set. I'll give
  it a shot when I get home though anyway.

 Read my response again, and you'll see that what you are
 saying here does not conflict. The cookie is indeed not
 getting set, and that is likely because the browser does
 not take action on the Set-Cookie header when it is
 contained within a 302 response. If you use a meta redirect
 rather than a header(Location: ...) call, the response
 status will be 200 instead of 302, so the browser might
 accept the cookie.

 Chris

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



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






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



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




Re[3]: [PHP] Output page cut off after 7000 characters -- FIXED

2002-12-10 Thread Fritz Wittwer
Hi Tom,
i was afraid I had to trace it down this way before, I even tried it, but 
missed the PHP function call at the end of a 300 and some characters line.

Anyway it was a function wich had a hard coded Windows path to a directory 
in it wich started with 'e:/', I did not try to figure out which PHP 
function really crashed the process, changing it to the correct Unix path 
solved the problem.

Regards and thanks a lot for your help.

Fritz


At 04:28 10.12.2002, Tom Rogers wrote:
Hi,

Tuesday, December 10, 2002, 2:31:00 AM, you wrote:

FW Hi Tom,
FW I had this checked out before, but I did only check the errorlog for this
FW virtual host, there is an entry in the error log of the main server for
FW each request to the page in question:



FW [Mon Dec  9 17:27:05 2002] [notice] child pid 10998 exit signal
FW Segmentation Fault (11)



FW Well, it does not say much to me...


FW Regards and Thanks for your help
FW  Fritz

That means something happened that apache couldn't handle and just killed the
child proccess off. You will have to start commenting out bits of your code to
see which function is causing it.
--
regards,
Tom



Ascom AG
Ascom Informatik

Fritz Wittwer
Internet Services (SING)

Belpstrasse 37, CH-3000 Bern 14
Phone: +41 31 999 4285
[EMAIL PROTECTED]
_



[PHP] php.ini

2002-12-10 Thread Gregory Hernandez
hello.

quick question.
can someone give a small example of what a php.ini file would look
like?
i had no php.ini file so i created blank one.  

if i wanted to set register_globals on (for example), how would i put
this in the php.ini file?

or if i wanted to enable support for curl (for example) how would i do
this?


thanks,

gregory

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




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Jaime Bozza
The original cookie specifications required that the domain in the
cookie has at least 2 (or 3 for domains not in the primary tlds) periods
in it.  (So as to stop someone from using .com, .edu, etc...)

So, you use .domain.com, right?  Well, Netscape 4.x is strict in that
.domain.com does not match http://domain.com ...  Sounds like you're
having this problem.

I don't believe you're going to have any luck with cookies in Netscape
4.x with only one period.  (I had heard some references to using
domain.com., but I just setup a primary domain webserver to test that
and it doesn't work)


Jaime



 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 10, 2002 8:17 AM
 To: Jaime Bozza
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 domain.com, but www is pointed to it as well.  When I was setting the
 cookies with Header calls and using .domain.com, they 
 worked fine (I want
 to be able to access these cookies from my.domain.com, 
 forums.domain.com,
 etc, which is why they need to be set in .domain.com).  But 
 then the NS 4.x
 Header problem popped up, and now the domain issue..
 
 In IE, the code I posted below:
 
 setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
 echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
 content=\0;url=nscookie2.php\;
 
 works fine in regards to setting the cookie still.  NS 4.x is 
 a piece of
 crap. :(
 
 Chad
 
 -Original Message-
 From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 9:07 AM
 To: 'Chad Day'
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 Hello,
By any chance, is your website named http://domain.com or is it
 http://www.domain.com ?
 
 Jaime Bozza
 
 
  -Original Message-
  From: Chad Day [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 8:09 AM
  To: [EMAIL PROTECTED]; php general
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  Ok, I understand.  I was able to get NS to set the cookie,
  but -only- if I
  put nothing in the domain field.
 
 
  setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
  echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
  content=\0;url=nscookie2.php\;
 
  did not work.  domain.com also did not work . .  this is kind
  of a pain, but
  this is what I get for trying to make a site NS 4.x
  compatible I guess.  Is
  there any way to specify the domain of a cookie with NS 4.x
  in this kind of
  situation?
 
  Thanks,
  Chad
 
  -Original Message-
  From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 09, 2002 5:30 PM
  To: Chad Day; php general
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  --- Chad Day [EMAIL PROTECTED] wrote:
   I'm not sure how this would matter since the cookie is
   never set at all.. it's not an issue of it reading the
   cookie, as it can't read what is never set. I'll give
   it a shot when I get home though anyway.
 
  Read my response again, and you'll see that what you are
  saying here does not conflict. The cookie is indeed not
  getting set, and that is likely because the browser does
  not take action on the Set-Cookie header when it is
  contained within a 302 response. If you use a meta redirect
  rather than a header(Location: ...) call, the response
  status will be 200 instead of 302, so the browser might
  accept the cookie.
 
  Chris
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 



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




[PHP] Re: php.ini

2002-12-10 Thread hacook
You have it in the zip when you download from php.net

Gregory Hernandez [EMAIL PROTECTED] a écrit dans le message de
news: [EMAIL PROTECTED]
 hello.

 quick question.
 can someone give a small example of what a php.ini file would look
 like?
 i had no php.ini file so i created blank one.

 if i wanted to set register_globals on (for example), how would i put
 this in the php.ini file?

 or if i wanted to enable support for curl (for example) how would i do
 this?


 thanks,

 gregory



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




Re: [PHP] php.ini

2002-12-10 Thread 1LT John W. Holmes
 can someone give a small example of what a php.ini file would look
 like?
 i had no php.ini file so i created blank one.  

http://cvs.php.net/co.php/php4/php.ini-dist

---John Holmes...

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




[PHP] Problem with PHP_SELF

2002-12-10 Thread info
Hello Leif, hello all,

i compiled successfully php-4.3-dev deom tarball as CGI  on RedHat7.3

register_globals is on

And here is how my php behave:

When I run the following script: info70.php
?php
print_r($GLOBALS);
?
1) from commandline
then  [PHP_SELF] = info70.php
is set correctly

2)  from browser
then PHP_SELF = htdocs3/bildvote/admin/info70.php

zend and php-logo isn´t depicted.

3) via http script is in the htdocs (/usr/local/apache/htdocs) directory
  PHP_SELF = 

What can I do? How can I use the superglobal array?

Oliver Etzel
.eu-Domains are coming
www.t-host.com




[PHP] OCINewCollection and so on

2002-12-10 Thread rems
hi!
I'm curios if there are some materials on the net, where there is more 
(may be some examples) about how use OCINewCollection and OCIColl* 
functions.
I've found a little on presentation of Thies C. Arntzen at conf.php.net, 
but this is only about binding VARRAY objects.
Beside this no search was succesfull (even on archieves of this list)
Anybody is oriented in this theme?
Thanks in advance
Remigiusz


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



RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Chad Day
So, basically... cookies aren't going to work in NS 4.x if I specify a
domain and need to do a redirect afterwards.  (I tried the dot at the end,
also no go) ... wow, that sucks. :\

Thanks,
Chad

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 9:33 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?


The original cookie specifications required that the domain in the
cookie has at least 2 (or 3 for domains not in the primary tlds) periods
in it.  (So as to stop someone from using .com, .edu, etc...)

So, you use .domain.com, right?  Well, Netscape 4.x is strict in that
.domain.com does not match http://domain.com ...  Sounds like you're
having this problem.

I don't believe you're going to have any luck with cookies in Netscape
4.x with only one period.  (I had heard some references to using
domain.com., but I just setup a primary domain webserver to test that
and it doesn't work)


Jaime



 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 8:17 AM
 To: Jaime Bozza
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 domain.com, but www is pointed to it as well.  When I was setting the
 cookies with Header calls and using .domain.com, they
 worked fine (I want
 to be able to access these cookies from my.domain.com,
 forums.domain.com,
 etc, which is why they need to be set in .domain.com).  But
 then the NS 4.x
 Header problem popped up, and now the domain issue..

 In IE, the code I posted below:

 setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
 echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
 content=\0;url=nscookie2.php\;

 works fine in regards to setting the cookie still.  NS 4.x is
 a piece of
 crap. :(

 Chad

 -Original Message-
 From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 9:07 AM
 To: 'Chad Day'
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 Hello,
By any chance, is your website named http://domain.com or is it
 http://www.domain.com ?

 Jaime Bozza


  -Original Message-
  From: Chad Day [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 8:09 AM
  To: [EMAIL PROTECTED]; php general
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  Ok, I understand.  I was able to get NS to set the cookie,
  but -only- if I
  put nothing in the domain field.
 
 
  setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
  echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
  content=\0;url=nscookie2.php\;
 
  did not work.  domain.com also did not work . .  this is kind
  of a pain, but
  this is what I get for trying to make a site NS 4.x
  compatible I guess.  Is
  there any way to specify the domain of a cookie with NS 4.x
  in this kind of
  situation?
 
  Thanks,
  Chad
 
  -Original Message-
  From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 09, 2002 5:30 PM
  To: Chad Day; php general
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  --- Chad Day [EMAIL PROTECTED] wrote:
   I'm not sure how this would matter since the cookie is
   never set at all.. it's not an issue of it reading the
   cookie, as it can't read what is never set. I'll give
   it a shot when I get home though anyway.
 
  Read my response again, and you'll see that what you are
  saying here does not conflict. The cookie is indeed not
  getting set, and that is likely because the browser does
  not take action on the Set-Cookie header when it is
  contained within a 302 response. If you use a meta redirect
  rather than a header(Location: ...) call, the response
  status will be 200 instead of 302, so the browser might
  accept the cookie.
 
  Chris
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



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








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




[PHP] How do I populate a select?

2002-12-10 Thread Steve Jackson
How do I populate a select list with a list of category names from a DB?
I can select the names using a query but how do I loop through them to
display them in a select?

My query below will return the cat names. (when I  do something with it
like echoing the result)

$mysql = mysql_query(SELECT catname FROM categories ORDER BY catid);

But I want to give each catname in the DB a unique name in a form select
and don't know how to go about it.
Tutorials or tips anyone?
Regards,

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


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




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Jaime Bozza
Well, not quite.

Cookies won't work if you specify a domain and you don't use something
like http://www.domain.com

For instance, if you drop the support for http://domain.com and then set
your cookie with .domain.com, everything will work fine.  (Perhaps
setup a virtual host for domain.com that redirects everything to
www.domain.com?)

Redirecting and cookies work fine with Apache.  We redirect with cookies
here quite a bit and it works fine in everything I've tested (Netscape,
IE, Opera, Mozilla, even IE Mac! G)

There's a problem using IIS with cookies and redirects (IIS parses the
headers and removes most of them if you have a Location header.)

And yes, Netscape 4.x is the bane of all existence. :)  Now that
Netscape 7.0 and Mozilla 1.x are out, someone should remove all copies
of Netscape 4.x.  (Cookies aren't the only big issue for me there.  CSS
and Dynamic HTML support are horrible in NS4.x!)

Jaime


 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, December 10, 2002 9:11 AM
 To: Jaime Bozza
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 So, basically... cookies aren't going to work in NS 4.x if I specify a
 domain and need to do a redirect afterwards.  (I tried the 
 dot at the end,
 also no go) ... wow, that sucks. :\
 
 Thanks,
 Chad
 
 -Original Message-
 From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 9:33 AM
 To: 'Chad Day'
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
 The original cookie specifications required that the domain in the
 cookie has at least 2 (or 3 for domains not in the primary 
 tlds) periods
 in it.  (So as to stop someone from using .com, .edu, etc...)
 
 So, you use .domain.com, right?  Well, Netscape 4.x is strict in that
 .domain.com does not match http://domain.com ...  Sounds like you're
 having this problem.
 
 I don't believe you're going to have any luck with cookies in Netscape
 4.x with only one period.  (I had heard some references to using
 domain.com., but I just setup a primary domain webserver to 
 test that
 and it doesn't work)
 
 
 Jaime
 
 
 
  -Original Message-
  From: Chad Day [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 8:17 AM
  To: Jaime Bozza
  Cc: 'php general'
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  domain.com, but www is pointed to it as well.  When I was 
 setting the
  cookies with Header calls and using .domain.com, they
  worked fine (I want
  to be able to access these cookies from my.domain.com,
  forums.domain.com,
  etc, which is why they need to be set in .domain.com).  But
  then the NS 4.x
  Header problem popped up, and now the domain issue..
 
  In IE, the code I posted below:
 
  setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
  echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
  content=\0;url=nscookie2.php\;
 
  works fine in regards to setting the cookie still.  NS 4.x is
  a piece of
  crap. :(
 
  Chad
 
  -Original Message-
  From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 9:07 AM
  To: 'Chad Day'
  Cc: 'php general'
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  Hello,
 By any chance, is your website named http://domain.com or is it
  http://www.domain.com ?
 
  Jaime Bozza
 
 
   -Original Message-
   From: Chad Day [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, December 10, 2002 8:09 AM
   To: [EMAIL PROTECTED]; php general
   Subject: RE: [PHP] Cookie handling, NS 4.x?
  
  
   Ok, I understand.  I was able to get NS to set the cookie,
   but -only- if I
   put nothing in the domain field.
  
  
   setcookie(NSUSERNAME, cday, time()+2592000, /, 
 .domain.com);
   echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
   content=\0;url=nscookie2.php\;
  
   did not work.  domain.com also did not work . .  this is kind
   of a pain, but
   this is what I get for trying to make a site NS 4.x
   compatible I guess.  Is
   there any way to specify the domain of a cookie with NS 4.x
   in this kind of
   situation?
  
   Thanks,
   Chad
  
   -Original Message-
   From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 09, 2002 5:30 PM
   To: Chad Day; php general
   Subject: RE: [PHP] Cookie handling, NS 4.x?
  
  
   --- Chad Day [EMAIL PROTECTED] wrote:
I'm not sure how this would matter since the cookie is
never set at all.. it's not an issue of it reading the
cookie, as it can't read what is never set. I'll give
it a shot when I get home though anyway.
  
   Read my response again, and you'll see that what you are
   saying here does not conflict. The cookie is indeed not
   getting set, and that is likely because the browser does
   not take action on the Set-Cookie header when it is
   contained within a 302 response. If you use a meta redirect
   rather than a header(Location: ...) call, the response
   status will be 200 instead of 302, so the browser might
   accept the 

[PHP] UNA AYUDA-NOVATO PHP

2002-12-10 Thread Héctor Fabio Sánchez Velasco
Soy un principiante de PHP , instale PHP 4.2.3 en un servidor NT4 , con SQL
SERVER 7.0 y OPTION PACK 4.0 , en el momento que publico una pagina con una
conexion a la base de datos SQL me trae la informacion de las tablas hasta
aqui todo normal , pero al crear una forma con una variable escondida al
momento de publicarla saca un error Undefined variable  

gracias




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




Re: [PHP] How do I populate a select?

2002-12-10 Thread Tim Ward
echo(select name='...')
while ($array = mysql_fetcharray($mysql))
{echo(option{$array[catname]}/option);
}
echo(/select)

that's the simple version - you may want to put the
whole lot inside ...
if (mysql_numrows())
{ ...
} else
{echo(warning);
}

I may have got the function names wrong - I use an
abstraction layer these days

Tim Ward
http://www.chessish.com
mailto:[EMAIL PROTECTED]
- Original Message - 
From: Steve Jackson [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 3:24 PM
Subject: [PHP] How do I populate a select?


 How do I populate a select list with a list of category names from a DB?
 I can select the names using a query but how do I loop through them to
 display them in a select?
 
 My query below will return the cat names. (when I  do something with it
 like echoing the result)
 
 $mysql = mysql_query(SELECT catname FROM categories ORDER BY catid);
 
 But I want to give each catname in the DB a unique name in a form select
 and don't know how to go about it.
 Tutorials or tips anyone?
 Regards,
 
 Steve Jackson
 Web Developer
 Viola Systems Ltd.
 http://www.violasystems.com
 [EMAIL PROTECTED]
 Mobile +358 50 343 5159
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


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




[PHP] w32api Functions

2002-12-10 Thread Marcus Fazzi
Where is w32_* function in PHP 4.3.0 RC2 ?


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




RE: [PHP] Cookie handling, NS 4.x?

2002-12-10 Thread Chad Day
I think I understand now .. I was purposely making all my login forms/etc go
to http://domain.com so that when the cookies were set, they would be
ensured to set in .domain.com so I could read them on other parts of
domain.com (www., my., calendar., forums.) .. It looks like dropping the
support for domain.com is the best bet, as bizarre of a solution as that
sounds.  But I guess according to the cookie standards, that's correct..
as long as I set the cookie path, I should be good.

Another bright part of setting the cookie this way is that it seems to no
longer rely on the meta refresh, and I can continue using Header:  calls ..
hmm.

Thanks for all the help, Jaime and Chris, much appreciated.

Chad

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:22 AM
To: 'Chad Day'
Cc: 'php general'
Subject: RE: [PHP] Cookie handling, NS 4.x?


Well, not quite.

Cookies won't work if you specify a domain and you don't use something
like http://www.domain.com

For instance, if you drop the support for http://domain.com and then set
your cookie with .domain.com, everything will work fine.  (Perhaps
setup a virtual host for domain.com that redirects everything to
www.domain.com?)

Redirecting and cookies work fine with Apache.  We redirect with cookies
here quite a bit and it works fine in everything I've tested (Netscape,
IE, Opera, Mozilla, even IE Mac! G)

There's a problem using IIS with cookies and redirects (IIS parses the
headers and removes most of them if you have a Location header.)

And yes, Netscape 4.x is the bane of all existence. :)  Now that
Netscape 7.0 and Mozilla 1.x are out, someone should remove all copies
of Netscape 4.x.  (Cookies aren't the only big issue for me there.  CSS
and Dynamic HTML support are horrible in NS4.x!)

Jaime


 -Original Message-
 From: Chad Day [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 9:11 AM
 To: Jaime Bozza
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 So, basically... cookies aren't going to work in NS 4.x if I specify a
 domain and need to do a redirect afterwards.  (I tried the
 dot at the end,
 also no go) ... wow, that sucks. :\

 Thanks,
 Chad

 -Original Message-
 From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 9:33 AM
 To: 'Chad Day'
 Cc: 'php general'
 Subject: RE: [PHP] Cookie handling, NS 4.x?


 The original cookie specifications required that the domain in the
 cookie has at least 2 (or 3 for domains not in the primary
 tlds) periods
 in it.  (So as to stop someone from using .com, .edu, etc...)

 So, you use .domain.com, right?  Well, Netscape 4.x is strict in that
 .domain.com does not match http://domain.com ...  Sounds like you're
 having this problem.

 I don't believe you're going to have any luck with cookies in Netscape
 4.x with only one period.  (I had heard some references to using
 domain.com., but I just setup a primary domain webserver to
 test that
 and it doesn't work)


 Jaime



  -Original Message-
  From: Chad Day [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 8:17 AM
  To: Jaime Bozza
  Cc: 'php general'
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  domain.com, but www is pointed to it as well.  When I was
 setting the
  cookies with Header calls and using .domain.com, they
  worked fine (I want
  to be able to access these cookies from my.domain.com,
  forums.domain.com,
  etc, which is why they need to be set in .domain.com).  But
  then the NS 4.x
  Header problem popped up, and now the domain issue..
 
  In IE, the code I posted below:
 
  setcookie(NSUSERNAME, cday, time()+2592000, /, .domain.com);
  echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
  content=\0;url=nscookie2.php\;
 
  works fine in regards to setting the cookie still.  NS 4.x is
  a piece of
  crap. :(
 
  Chad
 
  -Original Message-
  From: Jaime Bozza [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 10, 2002 9:07 AM
  To: 'Chad Day'
  Cc: 'php general'
  Subject: RE: [PHP] Cookie handling, NS 4.x?
 
 
  Hello,
 By any chance, is your website named http://domain.com or is it
  http://www.domain.com ?
 
  Jaime Bozza
 
 
   -Original Message-
   From: Chad Day [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, December 10, 2002 8:09 AM
   To: [EMAIL PROTECTED]; php general
   Subject: RE: [PHP] Cookie handling, NS 4.x?
  
  
   Ok, I understand.  I was able to get NS to set the cookie,
   but -only- if I
   put nothing in the domain field.
  
  
   setcookie(NSUSERNAME, cday, time()+2592000, /,
 .domain.com);
   echo meta DEFANGED_HTTP-EQUIV=\REFRESH\
   content=\0;url=nscookie2.php\;
  
   did not work.  domain.com also did not work . .  this is kind
   of a pain, but
   this is what I get for trying to make a site NS 4.x
   compatible I guess.  Is
   there any way to specify the domain of a cookie with NS 4.x
   in this kind of
   situation?
  
   Thanks,
   Chad
  
   -Original 

RE: [PHP] UNA AYUDA-NOVATO PHP

2002-12-10 Thread Daniel Masson
Amigo:

Tiene que ajustar el archivo c:/winnt/php.ini

Y poner

register_globals= On


Cordialmente;
Daniel E. Massón.
Web: www.imagine.com.co
Te Deseamos una Feliz Navidad
y un Prospero 2,003
 


 -Mensaje original-
 De: Héctor Fabio Sánchez Velasco [mailto:[EMAIL PROTECTED]] 
 Enviado el: martes, 10 de diciembre de 2002 10:26
 Para: '[EMAIL PROTECTED]'
 Asunto: [PHP] UNA AYUDA-NOVATO PHP
 
 
 Soy un principiante de PHP , instale PHP 4.2.3 en un servidor 
 NT4 , con SQL SERVER 7.0 y OPTION PACK 4.0 , en el momento 
 que publico una pagina con una conexion a la base de datos 
 SQL me trae la informacion de las tablas hasta aqui todo 
 normal , pero al crear una forma con una variable escondida 
 al momento de publicarla saca un error Undefined variable  
 
 gracias
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP] run query

2002-12-10 Thread Diana Castillo
After I run a query lik this,
$db-query($sql);

what is the quickest way to find out how many records result? Without having
to loop through them all?

Thank you ,
Diana



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




[PHP] number of records

2002-12-10 Thread Diana Castillo

After I run a query lik this,
$db-query($sql);

what is the quickest way to find out how many records result? Without having
to loop through them all?

Thank you ,
Diana




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




RE: [PHP] run query

2002-12-10 Thread Jon Haworth
Hi Diana,

 After I run a query lik this,
 $db-query($sql);
 
 what is the quickest way to find out how many 
 records result? 

Look into mysql_num_rows (or the equivalent if you're not using MySQL)

Cheers
Jon

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




[PHP] Page display of query resuts using ODBC

2002-12-10 Thread Luc Roettgers
Hi,

Just wondering if anybody knows a script to display a resultset over several pages 
using page numers  previous, next links.

So far I've only found such scripts for mysql using the the following sql syntax which 
is not odbc compliant: SELECT * from table LIMIT 0, 4

I've looked at many sites to find such a script without luck so far...

Thanks in advance for your help,

-Luc


[PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Greetings gang.

You know me, I never ask for help if I haven't checked all my other options, but this 
is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to an Apache PHP 
4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the URL but they are 
still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have tried every 
code variation I could think of to troubleshoot it. This code has been working fine 
for Months on the WIN2K box, but just doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Jon Haworth
Hi Shane,

 I can pass variables till I am blue in the face, even 
 see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET[var]?

Cheers
Jon

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




[PHP] Re: Pls Help: Moving script from Win to Linux

2002-12-10 Thread Bastian Vogt
Hi,

sounds like you should use
$_GET['your_variable'] and $_POST['your_variable'] instead of $your_variable

Regards,
Bastian

Shane schrieb:

 Greetings gang.

 You know me, I never ask for help if I haven't checked all my other options, but 
this is day two, and I'm getting spanked on this one.

 Some recently moved scripts from a WIN2K server running PHP 4.2.1 to an Apache PHP 
4.2.3 setup have stop accepting HTML Form Variables.

 I can pass variables till I am blue in the face, even see them in the URL but they 
are still showing up as (!isset)

 My ISP (Whom is using Virtual Directories) has no solution, and I have tried every 
code variation I could think of to troubleshoot it. This code has been working fine 
for Months on the WIN2K box, but just doesn't pass a var on the Linux solution.

 Can any Server pros out there possibly throw me a bone? My deadline is looming. :^)

 As always, a million thanks in advance.
 Yours truly.
 -NorthBayShane

--
Mit freundlichem Gruß
i.A. Bastian Vogt


+ KomTel Gesellschaft fuer
+ Kommunikations- und
+ Informationsdienste mbH
+
+ Bastian Vogt
+ Nordermarkt 1, D-24937 Flensburg
+
+ Fon: +49-461-9090-00, Fax: +49-461-9090-031
+ EMail: [EMAIL PROTECTED], Internet: http://www.komtel.net
+  +



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




Re: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Adam Williams
is register globals enabled?

On Tue, 10 Dec 2002, Shane wrote:

 Greetings gang.

 You know me, I never ask for help if I haven't checked all my other options, but 
this is day two, and I'm getting spanked on this one.

 Some recently moved scripts from a WIN2K server running PHP 4.2.1 to an Apache PHP 
4.2.3 setup have stop accepting HTML Form Variables.

 I can pass variables till I am blue in the face, even see them in the URL but they 
are still showing up as (!isset)

 My ISP (Whom is using Virtual Directories) has no solution, and I have tried every 
code variation I could think of to troubleshoot it. This code has been working fine 
for Months on the WIN2K box, but just doesn't pass a var on the Linux solution.

 Can any Server pros out there possibly throw me a bone? My deadline is looming. :^)

 As always, a million thanks in advance.
 Yours truly.
 -NorthBayShane

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



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




Re: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Rodney Green
Register_Globals is off by default in version 4.2.3. See the following
manual page for more information.

http://www.php.net/manual/en/language.variables.predefined.php




- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 11:08 AM
Subject: [PHP] Pls Help: Moving script from Win to Linux


Greetings gang.

You know me, I never ask for help if I haven't checked all my other
options, but this is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to
an Apache PHP 4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the
URL but they are still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have
tried every code variation I could think of to troubleshoot it. This
code has been working fine for Months on the WIN2K box, but just
doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is
looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

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



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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
 I can pass variables till I am blue in the face, even 
 see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET[var]?

I am accessing them as $var.

Example (from memory)

if(!isset($var)){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

Real basic stuff, but if I echo out the value so I see if it matches what I see in the 
above URL I get...

(SAMPLE URL) blah/my_url.php?submit=submit

(SAMPLE CODE) ? echo Submit = .$submit ?

(SAMPLE RESULTS) Submit = 

Thanks gang!

I have never needed to use $_GET[var]
What is the main difference?
Would this be a setting difference between a WIN setup of PHP and a Linux setu of PHP?

- over

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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Shane
Ahh Yes, Register Globals is off on the new set up, and is ON on the old Win Box.

You folks soo rule
Drinks all around!
-Thanks a million
NorthBayShane

Register_Globals is off by default in version 4.2.3. See the following
manual page for more information.

http://www.php.net/manual/en/language.variables.predefined.php




- Original Message -
From: Shane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 11:08 AM
Subject: [PHP] Pls Help: Moving script from Win to Linux


Greetings gang.

You know me, I never ask for help if I haven't checked all my other
options, but this is day two, and I'm getting spanked on this one.

Some recently moved scripts from a WIN2K server running PHP 4.2.1 to
an Apache PHP 4.2.3 setup have stop accepting HTML Form Variables.

I can pass variables till I am blue in the face, even see them in the
URL but they are still showing up as (!isset)

My ISP (Whom is using Virtual Directories) has no solution, and I have
tried every code variation I could think of to troubleshoot it. This
code has been working fine for Months on the WIN2K box, but just
doesn't pass a var on the Linux solution.

Can any Server pros out there possibly throw me a bone? My deadline is
looming. :^)

As always, a million thanks in advance.
Yours truly.
-NorthBayShane

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



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




Re: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Rodney Green
Needs to be changed to the following if your forms are using the GET
HTTP method:

if(!isset($_GET[var])){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

If your forms use the POST HTTP method then it needs to be changed to:


if(!isset($_POST[var])){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}



 I can pass variables till I am blue in the face, even
 see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET[var]?

I am accessing them as $var.

Example (from memory)

if(!isset($var)){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

Real basic stuff, but if I echo out the value so I see if it matches
what I see in the above URL I get...

(SAMPLE URL) blah/my_url.php?submit=submit

(SAMPLE CODE) ? echo Submit = .$submit ?

(SAMPLE RESULTS) Submit =

Thanks gang!

I have never needed to use $_GET[var]
What is the main difference?
Would this be a setting difference between a WIN setup of PHP and a
Linux setu of PHP?

- over

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



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




[PHP] Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread David Scott
I am going through the introductory tutorial on http://www.php.net/ and am
stuck on this page:
http://www.php.net/manual/en/tutorial.forms.php

I have been able to get all of the examples up to this point to work.

The form is simple: it asks for a text name, a text age and has a submit
button. The information is submitted to action.php.

Action.php contains this code:
Hi ?php echo $_POST[name]; ?.
You are ?php echo $_POST[age]; ? years old.

I saved action.php as a text file with only the information above.

When I enter JoeBob into the name field and 27 into the age field, I get
this for output:
Hi
Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
. You are
Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
years old.

What can I do to remedy this?



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




Re: [PHP] Script not working from one computer

2002-12-10 Thread @ Edwin
Hello,

1LT John W. Holmes [EMAIL PROTECTED] wrote:


...[snip]...

 Browser's are the same (128bit). It's not a laptop.
 The web page can pull up

You mean, the web browser, right? :)

 any other external web page correctly.

And, I assume pull up external web page means web pages served from the
same server where you cannot login?

 What gets me is that the computer can pull up the log in page. It can pull
 up another, unprotected page from that web server. But, no matter who
tries
 to log in from that machine, I get a bad username and password, even
though
 they are right. It's like the browser is sending bad data to a script that
 works fine from every other computer.

 Anyone else have any other ideas?

Have you tried using another browser and see what happens?

- E

...[snip]...

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




[PHP] w32API where is?

2002-12-10 Thread Marcus Fazzi
Where is w32_* functions on PHP 4.3.0 RC2?


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




Re: [PHP] Theoretical - Device server using PHP - Is this possible?

2002-12-10 Thread @ Edwin
Hello,

Steve Jackson [EMAIL PROTECTED] wrote:

 Hi all,

 I work for a company that manufactures device servers. They currently
 have a very low internal memory (about 8MB) which is more than enough
 for TCP/IP connections (which BTW we just released the code open source
 to anyone interested www.opentcp.org) to devices but I was wondering if
 there was any way we could give these device servers more functionality
 by somehow using PHP. Obviously the device server itself has nowhere
 near enough memory to have PHP installed upon it but it would be
 interesting to see if anyone has any ideas or theories about if this is
 possible.

Not that I can answer you question but I think it is possible to run php
(maybe a stripped down version?) with a small amount of memory--there's one
that runs on a pda...

- E

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




Re: [PHP] Please help - uploading multiple files

2002-12-10 Thread @ Edwin
Hello,

Allred, Mark [EMAIL PROTECTED] wrote:

 Darn, that's what I was afraid of.

 Is there a way to do this in a client-side language like JavaScript?

Javascript? No, I don't think so. (Maybe Java.) But, of course, you can
always get a second opinion from a Javascript ML :)

- E

...[snip]...

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




[PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread hacook
Make sure your form is sent through the method=POST

David Scott [EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
 I am going through the introductory tutorial on http://www.php.net/ and am
 stuck on this page:
 http://www.php.net/manual/en/tutorial.forms.php

 I have been able to get all of the examples up to this point to work.

 The form is simple: it asks for a text name, a text age and has a
submit
 button. The information is submitted to action.php.

 Action.php contains this code:
 Hi ?php echo $_POST[name]; ?.
 You are ?php echo $_POST[age]; ? years old.

 I saved action.php as a text file with only the information above.

 When I enter JoeBob into the name field and 27 into the age field, I get
 this for output:
 Hi
 Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
 . You are
 Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
 years old.

 What can I do to remedy this?





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




Fw: [PHP] Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread Rick Emery
Try $_POST['name'] and $_POST['age']
Try $HTTP_POST_VARS['name'] and $HTTP_POST_VARS['age']

- Original Message - 
From: David Scott [EMAIL PROTECTED]
To: 
Sent: Tuesday, December 10, 2002 10:56 AM
Subject: [PHP] Help please: Unable to get $_POST[variable]; to work in a form.


I am going through the introductory tutorial on http://www.php.net/ and am
stuck on this page:
http://www.php.net/manual/en/tutorial.forms.php

I have been able to get all of the examples up to this point to work.

The form is simple: it asks for a text name, a text age and has a submit
button. The information is submitted to action.php.

Action.php contains this code:
Hi ?php echo $_POST[name]; ?.
You are ?php echo $_POST[age]; ? years old.

I saved action.php as a text file with only the information above.

When I enter JoeBob into the name field and 27 into the age field, I get
this for output:
Hi
Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
. You are
Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
years old.

What can I do to remedy this?



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




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




Re: [PHP] run query

2002-12-10 Thread @ Edwin
Or,

Jon Haworth [EMAIL PROTECTED] wrote:

 Hi Diana,
 
  After I run a query lik this,
  $db-query($sql);
  
  what is the quickest way to find out how many 
  records result? 
 
 Look into mysql_num_rows (or the equivalent if you're not using MySQL)

... you can even do it faster by using a

  select count(*) as something from some_table

More info (found in the manual):

  http://www.faqts.com/knowledge_base/view.phtml/aid/114/fid/12

HTH,

- E

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




[PHP] Ayuda o Help en IIS 5.0

2002-12-10 Thread Ysrael Guzmán
instale el PHP en win 2000 server.
Cuando agreque la extension en la configuracion del HOME DIRECTORI, me
pidio algo de child NOTES, pero no le hice caso y lo anule
 
me corre el PHP, pero no me corren los HTML???
 
 

Ysrael Guzmán Meza

 

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




[PHP] help II5

2002-12-10 Thread Ysrael Guzmán
2000 server installs the PHP in win. When agreque the extension in the
configuration of the HOME DIRECTORI, me pidio something of child YOU
NOTICE, but I did not do case to him and it annuls it runs to me the
PHP, but they do not run the HTML to me? Ysrael Guzmán Meza 
 
 
 

  

 

Ysrael Guzmán Meza

 

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




RE: [PHP] run query

2002-12-10 Thread Rich Gray
Er... but the original poster wanted a count of rows returned by a
particular query... your method just returns the number of rows in the
table...

Rich

-Original Message-
From: @ Edwin [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 17:21
To: Jon Haworth; 'Diana Castillo'
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] run query


Or,

Jon Haworth [EMAIL PROTECTED] wrote:

 Hi Diana,

  After I run a query lik this,
  $db-query($sql);
 
  what is the quickest way to find out how many
  records result?

 Look into mysql_num_rows (or the equivalent if you're not using MySQL)

... you can even do it faster by using a

  select count(*) as something from some_table

More info (found in the manual):

  http://www.faqts.com/knowledge_base/view.phtml/aid/114/fid/12

HTH,

- E



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




Re: [PHP] number of records

2002-12-10 Thread Cory Hicks
Diana,

This is how I typically do this with mysql_num_rows:

$sql = SELECT * FROM sometable
WHERE field LIKE '%$field%' LIMIT 0, 30 ;

$result = mysql_query($sql)
or die (Error In Query:.mysql_error());

$num_results = mysql_num_rows($result);

HTH!

Cory

On Tue, 2002-12-10 at 09:54, Diana Castillo wrote:
 After I run a query lik this,
 $db-query($sql);
 
 what is the quickest way to find out how many records result? Without having
 to loop through them all?
 
 Thank you ,
 Diana
 
-- 
Cory Hicks [EMAIL PROTECTED]
TRI-International


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




[PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread David Scott
This is the exact code in the HTML file:

html
 head
  titlePHP Form Example/title
 /head
body
form action=action.php mehtod=POST
 Your name: input type=text name=name /
 Your age: input type=text name=age /
 input type=submit
/form
/body
/html

I believe that is using the method POST. If there is something wrong in the
HTML file, or if you have any other suggestions, then please let me know.

Hacook [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Make sure your form is sent through the method=POST

 David Scott [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
  I am going through the introductory tutorial on http://www.php.net/ and
am
  stuck on this page:
  http://www.php.net/manual/en/tutorial.forms.php
 
  I have been able to get all of the examples up to this point to work.
 
  The form is simple: it asks for a text name, a text age and has a
 submit
  button. The information is submitted to action.php.
 
  Action.php contains this code:
  Hi ?php echo $_POST[name]; ?.
  You are ?php echo $_POST[age]; ? years old.
 
  I saved action.php as a text file with only the information above.
 
  When I enter JoeBob into the name field and 27 into the age field, I get
  this for output:
  Hi
  Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
  . You are
  Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
  years old.
 
  What can I do to remedy this?
 
 





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




[PHP] w32api where is?

2002-12-10 Thread Marcus Fazzi
where is w32_* functions on PHP 4.3.0


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




[PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread Rodney Green



the word METHOD is incorrectly spelled.







This is the exact code in the HTML file:

html
 head
  titlePHP Form Example/title
 /head
body
form action=action.php mehtod=POST
 Your name: input type=text name=name /
 Your age: input type=text name=age /
 input type=submit
/form
/body
/html

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




[PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread David Scott
Using $_REQUEST[variable] causes the script to work.
Why is this? And, why can I not use $_POST?

David Scott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am going through the introductory tutorial on http://www.php.net/ and am
 stuck on this page:
 http://www.php.net/manual/en/tutorial.forms.php

 I have been able to get all of the examples up to this point to work.

 The form is simple: it asks for a text name, a text age and has a
submit
 button. The information is submitted to action.php.

 Action.php contains this code:
 Hi ?php echo $_POST[name]; ?.
 You are ?php echo $_POST[age]; ? years old.

 I saved action.php as a text file with only the information above.

 When I enter JoeBob into the name field and 27 into the age field, I get
 this for output:
 Hi
 Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
 . You are
 Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
 years old.

 What can I do to remedy this?





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




[PHP] How to force an image to reload

2002-12-10 Thread Adam White
Guys, not sure if this is a PHP problem or a more general HTML problem,
but...

I've written a small test script (see below), basically, which allows the
user to rotate an image by 90degrees.
When I press the button, the page reloads having rotated the image, but the
old image is still displayed.  (I know it's done it if I load up another
browser window)
Pressing refresh does cause the image to reload.

Any ideas???

?php
header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);  // Date in
the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); // always
modified
header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache);// HTTP/1.0
?
head
TITLEYama!/TITLE
/head
body
p /
?php
if($submit == Rotate 90)
{
 $output=`mogrify -rotate 90 pictures/028_25.jpg`;
 echo $outputp /;
}
$submit= ;
echo new value of submit=$submit;
?

form name=form1 action=?php echo($PHP_SELF) ? method=post
input type=submit name=submit value=Rotate 90
/form
p /
img src = pictures/028_25.jpg
/body
/html

Regards  thanks in advance
Adam White



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




Re: [PHP] How to force an image to reload

2002-12-10 Thread ed

 As one who has had to do the same thing and had gotten some help from
this list I'll put in my two cents.

? $rand = rand(1000,); ?

img src=image.jpg?? echo $rand; ?

This echoes a ? with a random number behind the filename forcing a request
to the server for the image because you probably wont have that exact same
image with the random number in your cache.

Ed
 


On Tue, 10 Dec 2002, Adam White wrote:

 Guys, not sure if this is a PHP problem or a more general HTML problem,
 but...
 
 I've written a small test script (see below), basically, which allows the
 user to rotate an image by 90degrees.
 When I press the button, the page reloads having rotated the image, but the
 old image is still displayed.  (I know it's done it if I load up another
 browser window)
 Pressing refresh does cause the image to reload.
 
 Any ideas???
 
 ?php
 header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);  // Date in
 the past
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); // always
 modified
 header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
 header(Cache-Control: post-check=0, pre-check=0, false);
 header(Pragma: no-cache);// HTTP/1.0
 ?
 head
 TITLEYama!/TITLE
 /head
 body
 p /
 ?php
 if($submit == Rotate 90)
 {
  $output=`mogrify -rotate 90 pictures/028_25.jpg`;
  echo $outputp /;
 }
 $submit= ;
 echo new value of submit=$submit;
 ?
 
 form name=form1 action=?php echo($PHP_SELF) ? method=post
 input type=submit name=submit value=Rotate 90
 /form
 p /
 img src = pictures/028_25.jpg
 /body
 /html
 
 Regards  thanks in advance
 Adam White
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Craig Thomas
If you do not want to re-write all your code and your web server is Apache
and your host allows the use of .htaccess files you can turn
register_globals = on programmatically:

http://www.php.net/manual/en/configuration.directives.php#ini.register-globa
ls

(php_flag register_globals = ON;) i think.

Just a thought,

-Craig

-Original Message-
From: Rodney Green [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 11:35 AM
To: Shane; [EMAIL PROTECTED]
Subject: Re: [PHP] Pls Help: Moving script from Win to Linux


Needs to be changed to the following if your forms are using the GET
HTTP method:

if(!isset($_GET[var])){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

If your forms use the POST HTTP method then it needs to be changed to:


if(!isset($_POST[var])){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}



 I can pass variables till I am blue in the face, even
 see them in the URL but they are still showing up as (!isset)

Are you accessing these variables through $var or $_GET[var]?

I am accessing them as $var.

Example (from memory)

if(!isset($var)){
// do nothing
}else{
// VAR IS SET.. DO SOMETHING
}

Real basic stuff, but if I echo out the value so I see if it matches
what I see in the above URL I get...

(SAMPLE URL) blah/my_url.php?submit=submit

(SAMPLE CODE) ? echo Submit = .$submit ?

(SAMPLE RESULTS) Submit =

Thanks gang!

I have never needed to use $_GET[var]
What is the main difference?
Would this be a setting difference between a WIN setup of PHP and a
Linux setu of PHP?

- over

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



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




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




Re: [PHP] run query

2002-12-10 Thread @ Edwin
Oops, ok, I misread the original question :)

Rich Gray [EMAIL PROTECTED] wrote:
 Er... but the original poster wanted a count of rows returned by a
 particular query... your method just returns the number of rows in the
 table...

Anyway, you're right. If you already have a result then use
mysql_num_rows().

- E

...[snip]...

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




Re: Re[2]: [PHP] Script not working from one computer

2002-12-10 Thread DL Neil
John,

   You mention that it is a login script and that input is rejected. Is
 it
   rejected when it is initially typed in, or is it reported as
 rejected
  when
   ensuing pages are served?
 When it's initially typed in.

=do you have multiple 'environments' (eg VHosts or even physical servers) on
your PHP/web server? If you run the errant machine against a copy of the
script in another 'environment' does the same happen?

=can you put a DEBUG line into the code and have the data displayed prior to
it leaving the PC/form, and as the login 'result' is being
processed/returned to the user? Where does it 'break'?

=is there anything silly about the person's login/pswd? Is it just the one
person's login that's at issue, or everybody's when they use that particular
PC-client?


   Please check the IE on the offending machine. Does it have security
   settings that forbid cookies?
 No, it's a default install of IE6. I have a check that'll put up an
 error if cookies are turned off and that's not the error I get. I get
 the error saying that the username or password didn't match anything in
 the database.

=not something dopey like a zero-oh transliteration error, eg passw0rd
instead of password?


   Check the ipconfig/all settings against other machines/check any
  contents
   of HOSTS file (and the other MS one, if used)
  
   Check execution of phpinfo() against similar on other/working
 machines.
 
  Is it a plain old login script, or is it one which uses javascript to
 MD5
  the
  password? If the latter, you may want to check you've enabled
 javascript.

 It's just a plain log in script.

 I'm going to troubleshoot it more today and throw in some tracing to the
 functions to see where everything is going and what the login/password
 values are all the time. I just haven't had a chance to make it over to
 that computer yet.

 I have a feeling it's going to work out to be something stupidly
 simple... like these problems always do. :)

=embarrassingly so! If you're taking this all off a user's say-so, then it
sounds like an eyeball job to me...
=dn


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




RE: [PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread Craig Thomas
Using $_REQUEST[] works because the vars are in the http request, but
$_POST[] contains nothing as the other poster noted:  mehtod=post

-Original Message-
From: David Scott [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 1:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Help please: Unable to get $_POST[variable]; to
work in a form.


Using $_REQUEST[variable] causes the script to work.
Why is this? And, why can I not use $_POST?

David Scott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am going through the introductory tutorial on
http://www.php.net/ and am
 stuck on this page:
 http://www.php.net/manual/en/tutorial.forms.php

 I have been able to get all of the examples up to this point to work.

 The form is simple: it asks for a text name, a text age and has a
submit
 button. The information is submitted to action.php.

 Action.php contains this code:
 Hi ?php echo $_POST[name]; ?.
 You are ?php echo $_POST[age]; ? years old.

 I saved action.php as a text file with only the information above.

 When I enter JoeBob into the name field and 27 into the age field, I get
 this for output:
 Hi
 Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1
 . You are
 Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2
 years old.

 What can I do to remedy this?





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




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




Re: [PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread David Scott
I have corrected the typo and had hoped this was a simple solution, yet
$_POST still doesn't work. Any ideas?

Craig Thomas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Using $_REQUEST[] works because the vars are in the http request, but
 $_POST[] contains nothing as the other poster noted:  mehtod=post

 -Original Message-
 From: David Scott [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 1:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Help please: Unable to get $_POST[variable]; to
 work in a form.
 
 
 Using $_REQUEST[variable] causes the script to work.
 Why is this? And, why can I not use $_POST?
 
 David Scott [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am going through the introductory tutorial on
 http://www.php.net/ and am
  stuck on this page:
  http://www.php.net/manual/en/tutorial.forms.php
 
  I have been able to get all of the examples up to this point to work.
 
  The form is simple: it asks for a text name, a text age and has a
 submit
  button. The information is submitted to action.php.
 
  Action.php contains this code:
  Hi ?php echo $_POST[name]; ?.
  You are ?php echo $_POST[age]; ? years old.
 
  I saved action.php as a text file with only the information above.
 
  When I enter JoeBob into the name field and 27 into the age field, I
get
  this for output:
  Hi
  Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line
1
  . You are
  Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line
2
  years old.
 
  What can I do to remedy this?
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




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




[PHP] fwrite()ing predefined variables

2002-12-10 Thread Alberto Brea
Hi,
Could somebody please tell me why I can't print pre-defined variables to a file with 
fwrite()?

The code I use is this:
 $filename = '../vlog.txt';
 $fd= fopen($filename, 'a');
  $a= date(YmdHi);
  $b= basename($PHP_SELF);
  $c= $HTTP_USER_AGENT;
  $d= $HTTP_HOST;
  $e= $_SERVER['HTTP_HOST'];
  $f= xxx;
  $g= yyy;
  fwrite($fd, $a#$b#$c#$d#$e#$f#$g\n);
 fclose($fd);

And the output I get in the target file is this:
200212101552localhost#xxx#yyy

Thanks a lot in advance

Alberto



Re: [PHP] Pls Help: Moving script from Win to Linux

2002-12-10 Thread Jason Wong
On Wednesday 11 December 2002 02:38, Craig Thomas wrote:
 If you do not want to re-write all your code and your web server is Apache
 and your host allows the use of .htaccess files you can turn
 register_globals = on programmatically:

 http://www.php.net/manual/en/configuration.directives.php#ini.register-glob
a ls

 (php_flag register_globals = ON;) i think.

Can't be done at run-time. See table in manual.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
A government that is big enough to give you all you want is big enough
to take it all away.
-- Barry Goldwater
*/


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




Fw: [PHP] Re: Help please: Unable to get $_POST[variable]; to work in a form.

2002-12-10 Thread Rick Emery
What version of PHP are you using?  I believe that anything earlier than 4.05 does not
support $_POST.

Did you try $HTTP_POST_VARS['name']?  This will work, regardless of version.

- Original Message -
From: David Scott [EMAIL PROTECTED]
To: 
Sent: Tuesday, December 10, 2002 12:54 PM
Subject: Re: [PHP] Re: Help please: Unable to get $_POST[variable]; to work in a 
form.


I have corrected the typo and had hoped this was a simple solution, yet
$_POST still doesn't work. Any ideas?

Craig Thomas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Using $_REQUEST[] works because the vars are in the http request, but
 $_POST[] contains nothing as the other poster noted:  mehtod=post

 -Original Message-
 From: David Scott [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 10, 2002 1:20 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Help please: Unable to get $_POST[variable]; to
 work in a form.
 
 
 Using $_REQUEST[variable] causes the script to work.
 Why is this? And, why can I not use $_POST?
 
 David Scott [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am going through the introductory tutorial on
 http://www.php.net/ and am
  stuck on this page:
  http://www.php.net/manual/en/tutorial.forms.php
 
  I have been able to get all of the examples up to this point to work.
 
  The form is simple: it asks for a text name, a text age and has a
 submit
  button. The information is submitted to action.php.
 
  Action.php contains this code:
  Hi ?php echo $_POST[name]; ?.
  You are ?php echo $_POST[age]; ? years old.
 
  I saved action.php as a text file with only the information above.
 
  When I enter JoeBob into the name field and 27 into the age field, I
get
  this for output:
  Hi
  Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line
1
  . You are
  Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line
2
  years old.
 
  What can I do to remedy this?
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 




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




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




[PHP] Know the path

2002-12-10 Thread Christian Ista
Hello,

I have a web site with several directories or subdorectories, I'd like to
know when I call (include) php page, the path where I'm. Is it possible?

Christian,



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




RE: [PHP] How to force an image to reload

2002-12-10 Thread Adam White
Many thanks Ed, works a treat!

Regards
Adam White

Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 18:31
To: Adam White
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] How to force an image to reload


 As one who has had to do the same thing and had gotten some help from
this list I'll put in my two cents.

? $rand = rand(1000,); ?

img src=image.jpg?? echo $rand; ?

This echoes a ? with a random number behind the filename forcing a request
to the server for the image because you probably wont have that exact same
image with the random number in your cache.

Ed



On Tue, 10 Dec 2002, Adam White wrote:

 Guys, not sure if this is a PHP problem or a more general HTML problem,
 but...

 I've written a small test script (see below), basically, which allows the
 user to rotate an image by 90degrees.
 When I press the button, the page reloads having rotated the image, but
the
 old image is still displayed.  (I know it's done it if I load up another
 browser window)
 Pressing refresh does cause the image to reload.

 Any ideas???

 ?php
 header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);  // Date in
 the past
 header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); // always
 modified
 header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
 header(Cache-Control: post-check=0, pre-check=0, false);
 header(Pragma: no-cache);// HTTP/1.0
 ?
 head
 TITLEYama!/TITLE
 /head
 body
 p /
 ?php
 if($submit == Rotate 90)
 {
  $output=`mogrify -rotate 90 pictures/028_25.jpg`;
  echo $outputp /;
 }
 $submit= ;
 echo new value of submit=$submit;
 ?

 form name=form1 action=?php echo($PHP_SELF) ? method=post
 input type=submit name=submit value=Rotate 90
 /form
 p /
 img src = pictures/028_25.jpg
 /body
 /html

 Regards  thanks in advance
 Adam White



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



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


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




[PHP] help with II5

2002-12-10 Thread Ysrael Guzmán
Instale el PHP, pero no puedo ahora ver mis HTML?
porque, todo lo instale en el Internet Information Service 5, me salia
un mensaje CHILDS NOTES, pero no lo acepte sobre unos permisos de
Ejecución.
Mas ahora configuro mi pagina de inicio en Document y no me lee el HTML.
 
este error me sale:

The page cannot be displayed

There is a problem with the page you are trying to reach and it cannot
be displayed.   
  _  


Please try the following:

*   Open the 10.0.0.2 http://10.0.0.2/http%3A//10.0.0.2  home
page, and then look for links to the information you want. 
*   Click the Refresh javascript:location.reload()  button, or try
again later.



HTTP 403.2 - Forbidden: Read Access Forbidden
Internet Information Services

  _  


Technical Information (for support personnel)


*   Background:
This error can be caused if there is no default page available
and directory browsing has not been enabled for the directory, or if you
are trying to display an HTML page that resides in a directory marked
for Execute or Script permissions only. 





*   More information:
Microsoft Support
http://www.microsoft.com/ContentRedirect.asp?prd=iissbp=pver=5.0pid=
ID=403.2cat=webos=over=hrd=Opt1=Opt2=Opt3=  



 
 
 

Ysrael Guzmán Meza

 

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




RE: [PHP] How to force an image to reload

2002-12-10 Thread ed

 Even though I did forget the ending  on the tag. Cool.

Ed


On Tue, 10 Dec 2002, Adam White wrote:

 Many thanks Ed, works a treat!
 
 Regards
 Adam White
 
 Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 10 December 2002 18:31
 To: Adam White
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] How to force an image to reload
 
 
  As one who has had to do the same thing and had gotten some help from
 this list I'll put in my two cents.
 
 ? $rand = rand(1000,); ?
 
 img src=image.jpg?? echo $rand; ?
 
 This echoes a ? with a random number behind the filename forcing a request
 to the server for the image because you probably wont have that exact same
 image with the random number in your cache.
 
 Ed
 
 
 
 On Tue, 10 Dec 2002, Adam White wrote:
 
  Guys, not sure if this is a PHP problem or a more general HTML problem,
  but...
 
  I've written a small test script (see below), basically, which allows the
  user to rotate an image by 90degrees.
  When I press the button, the page reloads having rotated the image, but
 the
  old image is still displayed.  (I know it's done it if I load up another
  browser window)
  Pressing refresh does cause the image to reload.
 
  Any ideas???
 
  ?php
  header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);  // Date in
  the past
  header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT); // always
  modified
  header(Cache-Control: no-store, no-cache, must-revalidate);  // HTTP/1.1
  header(Cache-Control: post-check=0, pre-check=0, false);
  header(Pragma: no-cache);// HTTP/1.0
  ?
  head
  TITLEYama!/TITLE
  /head
  body
  p /
  ?php
  if($submit == Rotate 90)
  {
   $output=`mogrify -rotate 90 pictures/028_25.jpg`;
   echo $outputp /;
  }
  $submit= ;
  echo new value of submit=$submit;
  ?
 
  form name=form1 action=?php echo($PHP_SELF) ? method=post
  input type=submit name=submit value=Rotate 90
  /form
  p /
  img src = pictures/028_25.jpg
  /body
  /html
 
  Regards  thanks in advance
  Adam White
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP] Know the path

2002-12-10 Thread Ray Hunter
Check out the filesystem functions:
http://www.php.net/manual/en/ref.filesystem.php



On Tue, 2002-12-10 at 12:05, Christian Ista wrote:
 Hello,
 
 I have a web site with several directories or subdorectories, I'd like to
 know when I call (include) php page, the path where I'm. Is it possible?
 
 Christian,
-- 

Ray Hunter
email:  [EMAIL PROTECTED]
www:http://venticon.com


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




Re: [PHP] fwrite()ing predefined variables

2002-12-10 Thread Jason Wong
On Wednesday 11 December 2002 03:00, Alberto Brea wrote:
 Hi,
 Could somebody please tell me why I can't print pre-defined variables to a
 file with fwrite()?

 The code I use is this:
  $filename = '../vlog.txt';
  $fd= fopen($filename, 'a');
   $a= date(YmdHi);
   $b= basename($PHP_SELF);
   $c= $HTTP_USER_AGENT;
   $d= $HTTP_HOST;
   $e= $_SERVER['HTTP_HOST'];
   $f= xxx;
   $g= yyy;
   fwrite($fd, $a#$b#$c#$d#$e#$f#$g\n);
  fclose($fd);

 And the output I get in the target file is this:
 200212101552localhost#xxx#yyy

Because some pre-defined variables aren't pre-defined anymore. Read the 
variables section of the manual or use phpinfo() to see which really are 
pre-defined.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Q:  How do you know when you're in the ethnic section of Vermont?
A:  The maple sap buckets are hanging on utility poles.
*/


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




Re: [PHP] save file from outside url

2002-12-10 Thread Jeremiah Breindel
When I wanted to output the png to file, I just need to plop the global
label in front of the $image_filename before I passed it.. Simple mistake,
that's what I get for using someone else's script ;-)

// output PNG object.
global $image_filename;
imagePNG($image, $image_filename);


Jason Wong [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Monday 09 December 2002 23:44, Jeremiah Breindel wrote:
  Ok.  I stripped the needed code out of the image creation script and
  inserted it into my update script.  It works great as long as I hard
  code in the filename of the file that is being saved to the server.
  When I pass the image creation function a variable for the filename it
  tells me invalid filename, although I am echoing it out right before
  and it looks perfect. Any thoughts?

 Could you show the (relevant) parts of your updated code?

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *

 /*
 Put your brain in gear before starting your mouth in motion.
 */




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




[PHP] command line output

2002-12-10 Thread Bryan Koschmann - GKT
Hello,

I'm trying out a little script run from the command line. It simply
outputs a number to send to Cacti. Is there any way to get it to NOT send
all the stuff like this:

X-Powered-By: PHP/4.2.3
Set-Cookie: PHPSESSID=ec0e2c10c8bd9e0a0ad02cfcc182dbfb; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-type: text/html

168


(the 168 is my outputted number)

Thanks,

Bryan


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




  1   2   >