php-general Digest 14 Jul 2002 20:27:28 -0000 Issue 1464

Topics (messages 107585 through 107635):

Re: PHPDiscuss.com
        107585 by: Adam Alkins
        107603 by: John Holmes

Variables aren't being passed to php page
        107586 by: Mike Heffner
        107591 by: Micha
        107596 by: Jason Reid
        107604 by: John Holmes
        107608 by: Jason Wong
        107622 by: Philip Olson
        107623 by: Philip Olson
        107633 by: Tim Luoma
        107634 by: Peter

Re: Can't Install on Mac OS X
        107587 by: Andy

Re: TOC protocol (AOL Instant Messenger)
        107588 by: Micha

(Exact) Difference between -> and ::
        107589 by: Micha
        107592 by: Micha

Opening and Editing Quark Binaries
        107590 by: Simon Troup

Re: How come this will echo No or nothing?
        107593 by: César Aracena
        107601 by: Matthew K. Gold

Re: hello the list
        107594 by: DL Neil

Re: Restricting access using IPs
        107595 by: DL Neil

Re: serverside restrictions
        107597 by: Chris Hewitt
        107598 by: Jason Wong

Re: Can not delete files that were uploaded
        107599 by: Michael Hall

You are about to leave the secure conexion
        107600 by: Pedro Garre
        107605 by: John Holmes
        107627 by: Chris Hewitt

Form/insert problem
        107602 by: Martin Kampherbeek

Re: Problems with apache and php
        107606 by: Marxus

ob_start
        107607 by: Kevin Waterson
        107609 by: John Holmes
        107610 by: Andrew Brampton
        107611 by: Kevin Waterson

Creating an PHP program and C program
        107612 by: Alexandre Soares

Re: Animated GIFs
        107613 by: Jome

Newbie Date question
        107614 by: RoyW
        107618 by: Jason Wong

Re: pgSQL Functions with results set to php?
        107615 by: Joe Conway

Trying to build intelligent query from question
        107616 by: Peter J. Schoenster
        107620 by: Jason Wong
        107626 by: Peter J. Schoenster

Re: mail() problem
        107617 by: Duncan
        107621 by: Duncan

PHP, JAva history
        107619 by: Saci
        107628 by: Peter J. Schoenster

Michalski Luc - Weblog upgrading - Asking for some help
        107624 by: David D

Re: Development Tools
        107625 by: Lord Loh.
        107629 by: Chris Garaffa

Does not work
        107630 by: Saci
        107631 by: Michael Geier
        107632 by: Saci
        107635 by: CC Zona

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
> Wow...a forum. Is that vBulletin your using? Shouldn't you be giving
> them credit somewhere??

It looks like YaBB. You'd think when people are using a free BB, they'd
atleast have the courtesy of dropping a small plug at the end of the page. I
guess not

--------------
Adam Alkins
http://www.rasadam.com
--------------

--- End Message ---
--- Begin Message ---
> > Wow...a forum. Is that vBulletin your using? Shouldn't you be giving
> > them credit somewhere??
> 
> It looks like YaBB. You'd think when people are using a free BB,
they'd
> atleast have the courtesy of dropping a small plug at the end of the
page.
> I
> guess not

Exactly, it's the small things that count. Even though it's small, not
giving credit to the free program you're using and didn't write, is
enough to make me not want to use the site...

Give credit where credit is due...

---John Holmes...

--- End Message ---
--- Begin Message ---
Hi,

I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there seems
to be a problem that variables from POST/GET are not being passed to the
PHP page. For example, with the following file test.php, using the URL
'test.php?mid=1' displays 'nope'.

<?
if (isset($mid))
        echo "$mid";
else
        echo "nope";
?>


Is this a known problem, or is this some configuration issue?

Thanks for any help,


Mike
--- End Message ---
--- Begin Message ---
This is no problem. Since PHP 4.2 register_globals is disabled by default (in
prior versions it was enabled).
Either you can use the $_POST, $_GET etc. arrays or simply set
register_globals in the php.ini to "On" !

-micha

Mike Heffner wrote:

> Hi,
>
> I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there seems
> to be a problem that variables from POST/GET are not being passed to the
> PHP page. For example, with the following file test.php, using the URL
> 'test.php?mid=1' displays 'nope'.
>
> <?
> if (isset($mid))
>         echo "$mid";
> else
>         echo "nope";
> ?>
>
> Is this a known problem, or is this some configuration issue?
>
> Thanks for any help,
>
> Mike

--- End Message ---
--- Begin Message ---
Check your php version. if its greater then 4.1.0, then you must either
enable 'register_globals' in your php.ini, or use $_GET['var'] or
$_POST['var'] to get data from a form

----- Original Message -----
From: "Mike Heffner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 2:36 AM
Subject: [PHP] Variables aren't being passed to php page


> Hi,
>
> I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there seems
> to be a problem that variables from POST/GET are not being passed to the
> PHP page. For example, with the following file test.php, using the URL
> 'test.php?mid=1' displays 'nope'.
>
> <?
> if (isset($mid))
>         echo "$mid";
> else
>         echo "nope";
> ?>
>
>
> Is this a known problem, or is this some configuration issue?
>
> Thanks for any help,
>
>
> Mike
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
> I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there
seems
> to be a problem that variables from POST/GET are not being passed to
the
> PHP page. For example, with the following file test.php, using the URL
> 'test.php?mid=1' displays 'nope'.

Do you always upgrade programs without reading to see what changes have
been made? If so, I have this update program that I'll send you...just
run it for me, okay?

Check your register_globals setting, like the others said, and read the
changelog for your new installation of PHP.

---John Holmes...

--- End Message ---
--- Begin Message ---
On Sunday 14 July 2002 21:53, John Holmes wrote:
> > I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there
>
> seems
>
> > to be a problem that variables from POST/GET are not being passed to
>
> the
>
> > PHP page. For example, with the following file test.php, using the URL
> > 'test.php?mid=1' displays 'nope'.

This list gets at least one question a day on this subject ...

> Do you always upgrade programs without reading to see what changes have
> been made? 

... and that's because people don't read up on what they're upgrading to.

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

/*
"Don't drop acid, take it pass-fail!"
-- Bryan Michael Wendt
*/

--- End Message ---
--- Begin Message ---
Please read this:

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

Regards,
Philip Olson

On Sun, 14 Jul 2002, Mike Heffner wrote:

> Hi,
> 
> I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there seems
> to be a problem that variables from POST/GET are not being passed to the
> PHP page. For example, with the following file test.php, using the URL
> 'test.php?mid=1' displays 'nope'.
> 
> <?
> if (isset($mid))
>         echo "$mid";
> else
>         echo "nope";
> ?>
> 
> 
> Is this a known problem, or is this some configuration issue?
> 
> Thanks for any help,
> 
> 
> Mike
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
> > > PHP page. For example, with the following file test.php, using the URL
> > > 'test.php?mid=1' displays 'nope'.
> 
> This list gets at least one question a day on this subject ...

Please refer to the manual when this happens, specifically:

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

Regards,
Philip Olson

--- End Message ---
--- Begin Message ---
Jason Wong wrote:

> This list gets at least one question a day on this subject ...

And there will be a lot more as people scan the web for example scripts 
and find ones that assume 'register_globals' is set to on.

TjL



--- End Message ---
--- Begin Message ---
I totally agree. No offence to all the ppl who have asked, but didn't it say
on the download page that there had been "major changes to the way variables
are used"??


"John Holmes" <[EMAIL PROTECTED]> wrote in message
000a01c22b3d$e4755790$b402a8c0@mango">news:000a01c22b3d$e4755790$b402a8c0@mango...
> > I've recently upgraded from PHP 4.0.4p11 -> PHP 4.2.1, but now there
> seems
> > to be a problem that variables from POST/GET are not being passed to
> the
> > PHP page. For example, with the following file test.php, using the URL
> > 'test.php?mid=1' displays 'nope'.
>
> Do you always upgrade programs without reading to see what changes have
> been made? If so, I have this update program that I'll send you...just
> run it for me, okay?
>
> Check your register_globals setting, like the others said, and read the
> changelog for your new installation of PHP.
>
> ---John Holmes...
>


--- End Message ---
--- Begin Message ---
> I've tried an alternative way of installing from Marc Liyanage's web
> site, http://www.entropy.ch/ which was very easy to follow, but it
> absolutely will not allow me to view any PHP pages through Apache.

as far as I remember you have to have the original apache build (by apple)
to run Marcs script. Not sure though, read his docs.

Andy




"Brandon Pearcy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:a05111b00b956353ac94a@[207.229.10.79]...
> Hi Everyone,
>
> In the past I have setup many Mac OS X web servers successfully. Now
> I'm trying to setup another OS X web server, but PHP will not work.
> I'm having massive problems getting PHP to "make", and I'm all out of
> ideas. After I configure PHP (./configure), and try to make it, I get
> these errors:
>
> make[1]: *** [php] Error 1
> make: *** [all-recursive] Error 1
>
> I've tried an alternative way of installing from Marc Liyanage's web
> site, http://www.entropy.ch/ which was very easy to follow, but it
> absolutely will not allow me to view any PHP pages through Apache.
> PHP prints out the following error instead:
>
> Warning: Failed opening '/Library/WebServer/Documents/test.php' for
> inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0
>
> As you can see, the file's name is test.php, but you should know it
> has absolutely NO PHP code in it. It's contents are:
>
> <html>
> <body>
> Why don't I work?
> </body>
> </html>
>
> Anyone have any ideas?
>
> If anyone is willing, could they download the latest source of PHP
> and try to configure and make it (don't bother make install-ing
> it...) If you have any success with it, let me know.
>
> Thanks in advance!
> --
> --------------------------
> Brandon Pearcy
>    Internet Technician
>
> Bowes Online
> --------------------------
>   phone: 1-780-532-1110 ext. 265
>   fax:   1-780-532-2120
>   [EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
You can find AIM/ICQ (Since some years ICQ uses the AIM protocol - OSCAR -
too, the only difference is one packet where the ICQ client identifies it as
an ICQ Client, not AIM) information on http://www.rejetto.com/icq :)

I don't know anything about a PHP-AIM/ICQ project.

As server you can use login.icq.com or login.oscar.aol.com (both are the
same servers) and any port you want !

Spamsucks86 wrote:

> I'm interested in coding something in PHP which uses the TOC protocol to
> connect to AOL Instant Messenger (AIM). Has there been anything done
> like this in PHP? I'm also looking for more information on the TOC
> protocol. I have the protocol specs, but it doesn't say where the server
> is to connect to (same server as normal AIM, possibly?). Anyone who
> knows ANYTHING about this, please help.I don't know much ;-) Thanks for
> any and all replies.

--- End Message ---
--- Begin Message ---
Hi,

I would like to know the exact difference between -> and ::.
I know that I can use as class directcly by using :: but I still don't
know the exact meaning....
So why do they use in Example 8 on
http://www.php.net/source.php?url=/zend2_example.phps $this->id =
self::$id++ and not self::id++ or $this->id++ ...

--- End Message ---
--- Begin Message ---
Hi,

I would like to know the exact difference between -> and ::.
I know that I can use as class directcly by using :: but I still don't
know the exact meaning....
So why do they use in Example 8 on
http://www.php.net/source.php?url=/zend2_example.phps $this->id =
self::$id++ and not self::id++ or $this->id++ ... ?

-micha

--- End Message ---
--- Begin Message ---
I've been trying to open and end some of the ascii portions of Quark Express
binary files, (I'm using PHP4 on MacOSX, the quark files are OS9 files).

Even if I make the simplest eregi_replace () having done ...

$fd = fopen ($file, "rb+");
$contents = fread ($fd, filesize ($file));
fclose ($fd);

 ... then the edits ... 
 
 ... and then ...
 
touch ($new_filename);
$fd = fopen ($new_filename, "ab+");
fwrite ($fd, $contents);
fclose ($fd);

... quark reports things like unexpected EOF (even though when I open the file
in a text editor they have same number of lines and "look" identical), I've also
tried a few things with the Mac resource forks to no avail.

Has anyone tried something like this before? Does the fread() fwrite() change
line endings from mac to unix or something?

Kind of an obscure subject, but hoping for a clue from somewhere.

Zim
--- End Message ---
--- Begin Message ---
I've come up with this before and solved it like this (guess it'll
work):

if($row['plevel'] == '0'){
echo 'No';
} else if($row['plevel'] != '0'){
echo 'Yes';
}

Notice the *ELSE IF* instead of a simple else statement. Try it.

C.

> -----Original Message-----
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 13, 2002 1:01 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How come this will echo No or nothing?
> 
> here is the portion of the script:
> 
>   if($row['plevel'] == '0'){
>   echo 'No';
>   } else {
>   echo 'Yes';
>   }
> 
> here is my table structure dump:
> 
> #
> # Table structure for table `docs`
> #
> 
> CREATE TABLE docs (
>   id int(11) unsigned NOT NULL auto_increment,
>   name varchar(200) NOT NULL default '',
>   note varchar(200) NOT NULL default '',
>   author varchar(200) NOT NULL default '',
>   path varchar(200) NOT NULL default '',
>   plevel tinyint(3) NOT NULL default '0',
>   type char(3) NOT NULL default '',
>   cat tinyint(3) NOT NULL default '0',
>   file_size int(11) unsigned NOT NULL default '0',
>   date int(11) unsigned NOT NULL default '0',
>   PRIMARY KEY  (id)
> ) TYPE=MyISAM;
> 
> the row plevel is either 0 or 1.
> 
> why won't this script echo Yes?
> 
> The reason that the plevel is set in numbers is because I may add
higher
> ones later.
> 
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
this is from the O'Reilly _Programming PHP_ (Rasmus Lerdorf & Kevin Tatroe):

"Because echo is not a true function, you can't use it as part of a larger
expression:

// parse error
if (echo("test)) {
   echo("it worked!";
}

Such errors are easily remedied, though, by using the print() or printf()
functions."

p. 76


Here's how I solved a similar problem:

 if ( $foo != '' ) print (" yes");


and then just add the else statement...

best,

Matt


----- Original Message -----
From: César Aracena <[EMAIL PROTECTED]>
To: 'JJ Harrison' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 5:42 AM
Subject: RE: [PHP] How come this will echo No or nothing?


> I've come up with this before and solved it like this (guess it'll
> work):
>
> if($row['plevel'] == '0'){
> echo 'No';
> } else if($row['plevel'] != '0'){
> echo 'Yes';
> }
>
> Notice the *ELSE IF* instead of a simple else statement. Try it.
>
> C.
>
> > -----Original Message-----
> > From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 13, 2002 1:01 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] How come this will echo No or nothing?
> >
> > here is the portion of the script:
> >
> >   if($row['plevel'] == '0'){
> >   echo 'No';
> >   } else {
> >   echo 'Yes';
> >   }
> >
> > here is my table structure dump:
> >
> > #
> > # Table structure for table `docs`
> > #
> >
> > CREATE TABLE docs (
> >   id int(11) unsigned NOT NULL auto_increment,
> >   name varchar(200) NOT NULL default '',
> >   note varchar(200) NOT NULL default '',
> >   author varchar(200) NOT NULL default '',
> >   path varchar(200) NOT NULL default '',
> >   plevel tinyint(3) NOT NULL default '0',
> >   type char(3) NOT NULL default '',
> >   cat tinyint(3) NOT NULL default '0',
> >   file_size int(11) unsigned NOT NULL default '0',
> >   date int(11) unsigned NOT NULL default '0',
> >   PRIMARY KEY  (id)
> > ) TYPE=MyISAM;
> >
> > the row plevel is either 0 or 1.
> >
> > why won't this script echo Yes?
> >
> > The reason that the plevel is set in numbers is because I may add
> higher
> > ones later.
> >
> > --
> > JJ Harrison
> > [EMAIL PROTECTED]
> > www.tececo.com
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Welcome Nicolas,
=You didn't actually say what the problem was!
=Some have made suggestions, please also consider (below):


i'm new and i'm trouble with this code :'( can U help me please ??

this is the code :

while ($cd_tbl = mysql_fetch_array ($result))
{
$cd_id = $cd_tbl['cd_id'];
$cd_oeuvre = $cd_tbl['cd_oeuvre'];
$cd_chef = $cd_tbl['cd_chef'];
$cd_compositeur = $cd_tbl['cd_compositeur'];

<-------------------partie concernée--------------------->
//-Debut Seth
//--------------------------
// name : _ALTERNANCE_COULEUR_
// desc : test de 'id' pour l'alternance de couleur
//--------------------------

if(is_int("$cd_id") = TRUE)


=there is no need for the double-quotes in this statement.
=you should be coding equality (==) or even equality and type equivalence
(===)

Regards,
=dn


--- End Message ---
--- Begin Message ---
Liam,

Not altogether happy with the suggestion below. It works - for now.
A more generic solution might be to replace the hard-coded "9" with a call
to strrchr() on the last 'dot' character position (minus one). Then it
should work on any properly formed IP address.
Thereafter parameterise the subnet address portion and things become
mobile/re-usable.

Regards,
=dn


> Oops, wrong variable. That should be:
>
>  $substring = substr($REMOTE_ADDR,0,9);
>
>  if ($substring == '192.168.0')
>  {
>   // you're in
>  }
>
> Michael
>
> > On Sat, 13 Jul 2002, Liam MacKenzie wrote:
> >
> > > If I enter 192.168.0.13 (My IP) it works, I'm allowed in and any other
IP
> > > isn't.
> > > However, I need to grant access to this whole network, not just me.
So I
> > > need 192.168.0.* to be able to access it, everyone else should get
"Access
> > > Denied"
> > >
> > > So I need to know how to write this bit:
> > > $localip = "192.168.0.13";
> > > so that it's the network, not just me.
> > >
> > > I tried these but they didn't work:
> > > $localip = "192.168.0.0";
> > > $localip = "192.168.0.*";
> > > $localip = "192.168.0.0/24";
> > >
> > >
> > > Any other ideas?
> > >
> > > Cheers
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Jason Wong" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Saturday, July 13, 2002 3:49 PM
> > > Subject: Re: [PHP] Restricting access using IPs
> > >
> > >
> > > > On Saturday 13 July 2002 13:10, Liam MacKenzie wrote:
> > > > > Hey all, I'm looking to deny access to all IPs except those that
fall
> > > into
> > > > > a specific IP range.  192.168.0.* in this case.
> > > > > Am I missing something out of this code, it don't work too well
;-)
> > > >
> > > > HOW doesn't it work too well? It displays a picture of a naked guy
instead
> > > of
> > > > the naked girl that you was expecting?
> > > >
> > > > > <?
> > > > > $localip = "192.168.0.13";
> > > > > if ($REMOTE_ADDR == $localip) {
> > > > > ?>
> > > > >
> > > > > Allowed!
> > > > >
> > > > > <?
> > > > > }
> > > > > else {
> > > > > ?>
> > > > >
> > > > > Denied!
> > > > >
> > > > > <?
> > > > > }
> > > > >
> > > > > ?>
> > > >
> > > >
> > > > --
> > > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > > > Open Source Software Systems Integrators
> > > > * Web Design & Hosting * Internet & Intranet Applications
Development *
> > > >
> > > > /*
> > > > GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to
my
> > > > pet LEISURE SUIT!!
> > > > */
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
>
> --
> --------------------------------
> n   i   n   t   i  .   c   o   m
> php-python-perl-mysql-postgresql
> --------------------------------
> Michael Hall     [EMAIL PROTECTED]
> --------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Liam MacKenzie wrote:

>
>This works fine, but is there a way to get apache to do it for me instead?
>Like, this for example...
>
><Location /server-info>
>    SetHandler server-info
>    Order deny,allow
>    Deny from all
>    Allow from 192.168.0.0
></Location>
>
Yes, using exactly the syntax you have. The exact line you have would 
only allow the particular ip address of 192.168.0.0 to connect. If you 
want the /24 subnet to have access then leave off the last octet, e.g. 
192.168.0

Its all in the Apache manual, manual/howto/auth.html#allowdeny
HTH
Chris

--- End Message ---
--- Begin Message ---
On Sunday 14 July 2002 14:17, Liam MacKenzie wrote:

> This works fine, but is there a way to get apache to do it for me instead?
> Like, this for example...
>
> <Location /server-info>
>     SetHandler server-info
>     Order deny,allow
>     Deny from all
>     Allow from 192.168.0.0
> </Location>

This works for me:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 10.0.0.0/8
</Location>

> Is it possible to have apache do this for a Vhost?  like this...
>
> <VirtualHost *>
> DocumentRoot /home/admin
> ServerName admin.blabla.net
> ErrorLog /home/logs/error.admin.net.log
> CustomLog /home/logs/access.admin.net.log common
> php_admin_flag safe_mode off
> <Location /home/admin>
>     Order deny,allow
>     Deny from all
>     Allow from 192.168.0.0
> </Location>
> </VirtualHost>

This also works for me:

<VirtualHost 1.2.3.4>
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /home/www/example.com/html
 ServerName example.com

 <Directory "/home/www/example.com/html">
  Order allow,deny
  Allow from 10.0.0.0/24
 </Directory>
</VirtualHost>

> P.S.  I know it's got to do with Apache mostly, but it kinda has some
> relation to PHP...  ;-)

To be honest, follow-up questions should be directed to the apache list.

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

/*
You can't have your cake and let your neighbor eat it too.
                -- Ayn Rand
*/

--- End Message ---
--- Begin Message ---
> Be warned that if PHP can delete them, so can anybody else on the shared
> server who wants to write a PHP script to delete them, unless you've
> configured PHP specially to run as a specific user, which is unlikely for
> most ISP setups.

How can PHP be configured to run as a specific user? I'm referring to a
DSO installation, where I assume that because PHP is 'part' of Apache, it
would be the same user as Apache.


--------------------------------
Michael Hall     [EMAIL PROTECTED]
--------------------------------

--- End Message ---
--- Begin Message ---
*This message was transferred with a trial version of CommuniGate(tm) Pro*

Hi,

I've got a https site with Apache and mod_ssl.

When I open a new window with javascript (window.open) the browser (IE) says I am 
about to leave the secure conexion.
Same happens when I download the .der certificate.

What could I do so that those messages do not show up ?
( I search the HTTP/1.1 spec looking for a header but could not find anything and the 
new window could not be solved with a header anyway)

Sorry if this is not completely PHP :-)

Thanks.

Pedro.
--- End Message ---
--- Begin Message ---
Is the new window your opening secure? Is it an HTTPS URL? Either way,
sound like a client side issue to me...

---John Holmes...

> -----Original Message-----
> From: Pedro Garre [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 14, 2002 9:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] You are about to leave the secure conexion
> 
> *This message was transferred with a trial version of CommuniGate(tm)
Pro*
> 
> Hi,
> 
> I've got a https site with Apache and mod_ssl.
> 
> When I open a new window with javascript (window.open) the browser
(IE)
> says I am about to leave the secure conexion.
> Same happens when I download the .der certificate.
> 
> What could I do so that those messages do not show up ?
> ( I search the HTTP/1.1 spec looking for a header but could not find
> anything and the new window could not be solved with a header anyway)
> 
> Sorry if this is not completely PHP :-)
> 
> Thanks.
> 
> Pedro.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Pedro Garre wrote:

>
>When I open a new window with javascript (window.open) the browser (IE) says I am 
>about to leave the secure conexion.
>Same happens when I download the .der certificate.
>
Its a browser configuration. Most browsers have the means of notifying 
the user if they are entering or leaving a secure page. In Mozilla its 
configurable in Edit, Preferences, Privacy and Security, SSL. Where (and 
if) its configured will vary with the browser you are using.

HTH
Chris

--- End Message ---
--- Begin Message ---
Below, is the code of a form to predict some matches. What I want is to submit this 
with with one button so it inserts the macthes in the database. One match is one 
record.
The problem is that I don't know what to do now.
Can someone help me with this form and the insert file (addvoorspelling.php)

Thanks,
Martin.




<?PHP 

$today = date( "Y-m-d H:i:s"); 



include("auth.php"); 

mysql_connect(".........", "...........", ".............."); 
mysql_select_db (..............); 



    $sql = "SELECT * FROM wedstrijden WHERE status='actief' AND datum > '$today' ORDER 
BY datum";  
    $resultaat = mysql_query($sql); 
    $aantal = mysql_num_rows($resultaat); 
    $i = 0; 


$queryr = "SELECT * FROM ronde WHERE status='actief'"; 
$resultr = MYSQL_QUERY($queryr) or die(mysql_error()); 
$aantalr = MYSQL_NUMROWS($resultr); 
        $start = mysql_result($resultr,$r,"start"); 
        $einde = mysql_result($resultr,$r,"einde"); 


    PRINT" 
    <link rel='stylesheet' href='centerstyle.css'> 
    <body bgcolor=#f5f5f5> 
    <CENTER> 
    <font size='5'>From $start to $einde</font><p> 
<table> <tr> 
    <td width=300><b>Datum</b></td> 
    <td width=150><b>Home</b></td> 
    <td width=50></td> 
    <td width=150><b>Away</b></td> 
    <td colspan=2><b>HT</b></td> 
    <td colspan=2><b>FT</b></td> 
    <td></td> 
  </tr>"; 

    WHILE ($i < $aantal): 
        $id_wedstr = mysql_result($resultaat,$i,"id_wedstr"); 
        $home = mysql_result($resultaat,$i,"home"); 
        $away = mysql_result($resultaat,$i,"away"); 
        $datum = mysql_result($resultaat,$i,"datum"); 

$sqlv = "SELECT * FROM voorspelling WHERE id_user='$id' AND 
id_wedstrijd='$id_wedstr'";  
$resultaatv = mysql_query($sqlv); 
$aantalv = mysql_num_rows($resultaatv); 

IF ($aantalv == 0): 

PRINT" 
    <form action=addvoorspelling.php method=POST> 
        <tr> 
        <td width=300>$datum</td> 
        <td width=150>$home</td> 
          <td width=50>-</td> 
          <td width=150>$away</td> 
        <td width=50><select size'1' name='ht_home'> 
        <option value='--'>--</option>"; 
        $j = 0; 
        WHILE ($j < 11): 
            print"<option value='$j'>$j</option>"; 
            $j++; 
        ENDWHILE; 
        PRINT" 
        </select></td> 
        <td width=50><select size'1' name='ht_aways'> 
        <option value='--'>--</option>"; 
        $j = 0; 
        WHILE ($j < 11): 
            print"<option value='$j'>$j</option>"; 
            $j++; 
        ENDWHILE; 
        PRINT" 
        </select></td> 
        <td width=50><select size'1' name='ft_home'> 
        <option value='--'>--</option>"; 
        $j = 0; 
        WHILE ($j < 11): 
            print"<option value='$j'>$j</option>"; 
            $j++; 
        ENDWHILE; 
        PRINT" 
        </select></td> 
        <td width=50><select size'1' name='ft_away'> 
        <option value='--'>--</option>"; 
        $j = 0; 
        WHILE ($j < 11): 
            print"<option value='$j'>$j</option>"; 
            $j++; 
        ENDWHILE; 
        PRINT" 
        </select></td> 

          <td><center> 
        <input type=hidden value='$id' name=id> 
        <input type=hidden value='$naam' name=naam> 
        <input type=hidden value='$id_wedstr' name=id_wedstr> 
        <input type=hidden value='$home' name=home> 
        <input type=hidden value='$away' name=away> 
        </center></td> 
        </tr> 
        <input type=submit Value=Verstuur!> 
        </form>"; 



ELSE: 
ENDIF; 

        $i++; 
    ENDWHILE; 


PRINT"</table>    </CENTER>"; 





?> 
--- End Message ---
--- Begin Message ---
Do you have apache2 and one of the latest php versions?
if so oyu need to download the latest php4apache2.dll ... I found in on the
manual page somewhere.

 And oyu also need to change some other stuff which was listed in the
install.txt.
> ----- Original Message -----
> From: "Richard Lynch" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, July 14, 2002 3:50 AM
> Subject: [PHP] Re: Problems with apache and php
>
>
> > >I have a small problem,
> > >I can make the cgi version of php fine, it runs and installs perfectly,
> but
> > >when I try to make the apache module (i.e. --with-apxs=/path/to/apxs)
php
> > >crashes apache. can anyone give me any insight on this?
> >
> > What error messages are in Apache log?
> > Do you get a core dump?
> > Have you read the instructions on http://bugs.php.net/ ?
> > Is the apxs you pointed out to PHP the current one matching your Apache
> > installation?
> > What was your configure line for Apache?
> >
> > --
> > Like Music?  http://l-i-e.com/artists.htm
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>

--- End Message ---
--- Begin Message ---
I wish to compress some data using
ob_start("ob_gzhandler");

I use 
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],gzip)) {
     ob_start("ob_gzhandler");
} else {
      ob_start();
}
 but the compression is never used..
obstart is always used withouth the gz_handler
is there a way around this? or am I doing something
wrong here?

Kind regards

kevin
--- End Message ---
--- Begin Message ---
> I wish to compress some data using
> ob_start("ob_gzhandler");
> 
> I use
> if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],gzip)) {

Shouldn't gzip be in quotes, here?? The second argument to strstr...

>      ob_start("ob_gzhandler");
> } else {
>       ob_start();
> }
>  but the compression is never used..
> obstart is always used withouth the gz_handler
> is there a way around this? or am I doing something
> wrong here?

---John Holmes...

--- End Message ---
--- Begin Message ---
I don't think you need to do the
if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],gzip)) {
because ob_start("ob_gzhandler"); checks to see if the browser will accept
gzip content before gzipping it..

But I think the reason that it isn't working for you is that you don't have
the correct compression libraries compiled into PHP... I spent ages trying
to figure out why mind didn't work and this was the problem. The anonying
thing is that if you don't have this libs it doesn't even tell you

andrew
----- Original Message ----- 
From: "Kevin Waterson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 3:34 PM
Subject: [PHP] ob_start


> I wish to compress some data using
> ob_start("ob_gzhandler");
> 
> I use 
> if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],gzip)) {
>      ob_start("ob_gzhandler");
> } else {
>       ob_start();
> }
>  but the compression is never used..
> obstart is always used withouth the gz_handler
> is there a way around this? or am I doing something
> wrong here?
> 
> Kind regards
> 
> kevin
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
On Sun, 14 Jul 2002 10:35:13 -0400
"John Holmes" <[EMAIL PROTECTED]> wrote:

> Shouldn't gzip be in quotes, here?? The second argument to strstr...

indeed, that fixes that.. thanks

now, I have a problem with mozilla and netscape.
Although they both accept the  ob_start("ob_gzhandler");
netscape gives a comunication error, and mozilla just
a blank page, IE on the Mac however displays the output.

The blank page in mozilla is mentioned in the manual, but
how do get around this??

Kind regards
Kevin
--- End Message ---
--- Begin Message ---
Hello All,

    I wrote some times ago an library to draw graphics in 2 and 3 D, but
this sources are write in C, whats the procedures I need to use this rotines
in PHP.

Alex

--- End Message ---
--- Begin Message ---

"Peter" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I know GIF support was dropped from the GD library, but can you make
> animated GIFs in any version of GD?

I think your best shoot would be to combine GD with ImageMagick which has a
function called combine, to create animated gifs.

ImageMagick can be found on this URL: http://www.imagemagick.org/

  -Jome


--- End Message ---
--- Begin Message ---
If:

$today = date("Y-m-d");

Then how to I get:

$yesterday = ?

Thanks!

--- End Message ---
--- Begin Message ---
On Monday 15 July 2002 00:01, RoyW wrote:
> If:
>
> $today = date("Y-m-d");
>
> Then how to I get:
>
> $yesterday = ?

Use strtotime() followed by date(). Details in manual.

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

/*
I went to a Grateful Dead Concert and they played for SEVEN hours.  Great 
song.
                -- Fred Reuss
*/

--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
>>List,
>>I'm creating a PHP/pgSQL web site...I need to execute queries with a 
>>cursor and get their result set into my PHP script.  How can I make a 
>>pgSQL procedure with logic that also returns a result set?  I've 
>>searched and searched but cannot find the answer.  Does anyone got it?
> 
> 
> Any old select will return a result set that works with a query...
> 
> But if you need your PostgreSQL FUNCTION to return a result set, I *think*
> you need to use:
> 
> 'set of XXX'
> 
> for the 'rettype' (return type)
> 
> and I *THINK* you can figure out what to use for XXX if you start digging to
> find the name/oid of the "complex type" that represents a row in your table
> here:
> 
> http://www.postgresql.org/idocs/index.php?catalog-pg-type.html
> 
> I've never done this, I just did a little digging right now, and this is
> where I would keep digging if I was working on this...
> 
> But it sounds to me like PostgreSQL already *has* a "complex type" to
> represent the tuples in your table, and you just need to find out what the
> name of that "complex type" might be.  It may even turn out to be just the
> table name or something...
> 

A "complex", or aka "composite", type in PostgreSQL is represented by 
the name of a table or view. The capability to return "setof 
a-composite-type" exists in a limited way in PostgreSQL 7.2.x. See the 
thread at:

   http://archives.postgresql.org/pgsql-interfaces/2002-06/msg00042.php

for a recent discussion about this with some examples.

PostgreSQL 7.3, when it is released, will have much better capability. 
You will be able to do:

test=# select * from getfoo(1);
   fooid | f2
-------+-----
       1 |  11
       1 | 111
(2 rows)

In cvs HEAD you can do this already with SQL language functions and C 
language functions.

HTH,

Joe

--- End Message ---
--- Begin Message ---
Hi,

I may be doing this all the wrong way :) so feel free to let me know, thanks.

I've been developing a q/a database. I don' want to search on "what I consider" 
common words. Certainly there must be a list of these. Anyhow, I explode the 
question string into words and then iterate as such:


foreach($words as $Key=>$Value) {
        if($ignoreWords[strtolower($Value)]) {
                continue;
        }

Here is my $ignoreWords array:

$ignoreWords = 
array('brazil'=>1,'like'=>1,'the'=>1,'this'=>1,'that'=>1,'why'=>1,'are'=>1,'there'=>
1,'where'=>1,'find'=>1,);

What do you think? Do I just build up $ignoreWords like I'm doing or this there 
another way I've missed? Also, does someone have a list of "common words 
to ignore"?

Thanks,

Peter


--- End Message ---
--- Begin Message ---
On Monday 15 July 2002 01:00, Peter J. Schoenster wrote:

> I may be doing this all the wrong way :) so feel free to let me know,
> thanks.

I'm not going to comment on your overall concept.

> I've been developing a q/a database. I don' want to search on "what I
> consider" common words. Certainly there must be a list of these. Anyhow, I
> explode the question string into words and then iterate as such:
>
>
> foreach($words as $Key=>$Value) {
>       if($ignoreWords[strtolower($Value)]) {
>               continue;
>       }

You would be better off using array_diff().

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

/*
Conquering Russia should be done steppe by steppe.
*/

--- End Message ---
--- Begin Message ---
> > foreach($words as $Key=>$Value) {
> >     if($ignoreWords[strtolower($Value)]) {
> >             continue;
> >     }
> 
> You would be better off using array_diff().

Jason,

Thanks, that works except that it doesn't account for case. I want to ignore case as 
it doesn't apply here. But I was able to get rid of the 
associative array. So I reckoned it best to LC the question and copy it because I want 
to return the original question as is back to the browser.

$_string = strtolower ($Config['input']['question']);

$words = explode(" ",$_string);
$ignoreWords = 
array('brazil','like','the','this','that','why','are','there','where','find',);

$FindTheseWords = array_diff($words, $ignoreWords);

Peter
--- End Message ---
--- Begin Message ---
Hi again,

ok i found out now, that the problem is the "From: ... Reply-To: " header.
Whenever i leave those, the email gets delivered instantly, but included, the email 
gets a delivery delay for about 3 hours.
Is there any other way, i can avoid getting the default email address as the sender, 
but a selected one?

Regards,

Duncan
--- End Message ---
--- Begin Message ---
Hi again,

ok, i found the (weird!) problem now:

Its not my server nor my ISP, but php (at least, i think so):

Here are the exact lines i used in my test script:

1st non working - delayed example:

mail($receiver,"-Subject-","Here are your account details:\n\nusername: 
$lp_name\npassword: ".base64_decode($lp_pass)."\n\nYou can login now at: 
http://domain.com$PHP_SELF","From: [EMAIL PROTECTED]\r\nReply-To: 
[EMAIL PROTECTED]\r\n");


2nd working - non delayed example:

$message = "Here are your account details:\n\nusername: $lp_name\npassword: 
".base64_decode($lp_pass)."\n\nYou can login now at: http://domain.com$PHP_SELF";;
mail($receiver,"-Subject-",$message,"From: [EMAIL PROTECTED]\r\nReply-To: 
[EMAIL PROTECTED]\r\n");



This is rather strange, because all i did was changing the email-message text into a 
variable and pass it to the mail() function, instead of including the whole string 
directly in it.
But fact is, now it works just perfect without any delay!

Does anyone have an idea, what may cause example #1 not to be delivered instantly?
Or is my string in a bad-programming style?
...but then it shouldn't work as a variable either, right?

I am completely lost in this case,

Regards,

Duncan
--- End Message ---
--- Begin Message ---
I would like to see from where visitor come from mypage i need a function
who return the last visited page prior to mine.

I didn't found any function on php for that purpose and I'm thinking in mix
Java and php for that purpose, using the browser history, Can someone
show-me how can I do that.






--- End Message ---
--- Begin Message ---
On 14 Jul 2002 at 13:42, Saci wrote:

> I would like to see from where visitor come from mypage i need a
> function who return the last visited page prior to mine.
> 
> I didn't found any function on php for that purpose and I'm thinking
> in mix Java and php for that purpose, using the browser history, Can
> someone show-me how can I do that.

Sounds like you want the REFERER, misspelling on purpose.

Take a look here:

http://www.php.net/manual/en/reserved.variables.php

http://www.php.net/manual/en/ref.url.php


Peter
--- End Message ---
--- Begin Message ---
Hello, my name is lucas
I am student in computer science...

We are imporving a previous version of phpweblog ( News Management ) in
which we have had a DHTML editor and others goodies...For this part we don't
have problems...
But translations are problematics because we have integrated PHPlang, which
recogonize automaticlly your Internet Explorer language, but we don't have
these translations...

language searched :
Romanian
Bulgarian
Danois
Deutsch
Italian
Korean
Brasilian
spanish
swedish
Turckish
English
Polish
Japanese
Faroese
Norvegian
Danish
Greeck
Portugeese
Egyptian
autrichian
taiwaneese
chineese
russian

The World Federal Network is a network which would be a real vector of
communication... We hope that we could develop a linux OS too but each
things at their times...
You will in the lang file that the publication of an announcement on the
network will only cost 1 euros for one month...( because we needs some
servers)

Ask me whatever you want... a program or a script... I will do my best for
you in exchange...

We trust in LINUX power and believe for more interactive internet...
so that's why we ask you some help...

I give you a .lang in english

Thank you in advance...

Lucas

[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
www.phpide.de

Check this out - Php IDE

Lord Loh.




--- End Message ---
--- Begin Message ---
Ahm... Anything good for MacOS X out there? I currently use and love BBEdit,
but am open to other alternatives.

Chris

He who calles himself "Lord Loh." (from <[EMAIL PROTECTED]>) wrote on
7/14/02 1:40 PM:

> www.phpide.de

--- End Message ---
--- Begin Message ---
I tried this simple code

<html>
<body>
Page refered by
<?php
echo $HTTP_REFERER.'<br>';
echo $_SERVER['HTTP_REFERER'].'<br>';
?>
</body>
</html>

and I receive blank reply even if referenced from a link from other site.

What am i doing wrong ? Or perhaps my server does not have referer enabled?




--- End Message ---
--- Begin Message ---
from PHP documentation:
http://www.php.net/manual/en/reserved.variables.php

'HTTP_REFERER'
The address of the page (if any) which referred the user agent to the
current page. This is set by the user agent. Not all user agents will set
this, and some provide the ability to modify HTTP_REFERER as a feature. In
short, it cannot really be trusted.

> -----Original Message-----
> From: Saci [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 14, 2002 2:11 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Does not work
>
>
> I tried this simple code
>
> <html>
> <body>
> Page refered by
> <?php
> echo $HTTP_REFERER.'<br>';
> echo $_SERVER['HTTP_REFERER'].'<br>';
> ?>
> </body>
> </html>
>
> and I receive blank reply even if referenced from a link from other site.
>
> What am i doing wrong ? Or perhaps my server does not have
> referer enabled?
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
// HTTP_REFERER as a feature. In  short, it cannot really be trusted.

Anybody know how to do that using JAva history with PHP together , or any
other methode that works and can be trusted.


--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Saci) wrote:

> I tried this simple code
> 
> <html>
> <body>
> Page refered by
> <?php
> echo $HTTP_REFERER.'<br>';
> echo $_SERVER['HTTP_REFERER'].'<br>';
> ?>
> </body>
> </html>
> 
> and I receive blank reply even if referenced from a link from other site.
> 
> What am i doing wrong ? Or perhaps my server does not have referer enabled?

It's possible that your *browser* does not pass referer information.  But 
keep in mind that if there was no referring page, then there is no referer 
value for the browser to set.  Try this instead:

<html>
<body>
<form method="get">
Page refered by
<?php
echo $HTTP_REFERER.'<br>';
echo $_SERVER['HTTP_REFERER'].'<br>';
?>
<input type="submit>
</form>
</body>
</html>

Load it, check the value, click "Submit", then check again.

-- 
CC
--- End Message ---

Reply via email to