php-general Digest 24 Feb 2002 17:23:04 -0000 Issue 1191

Topics (messages 85981 through 85998):

Re: php3/php4 difference
        85981 by: David Robley

Flash and php
        85982 by: Martin
        85983 by: Martin
        85984 by: Mika Tuupola
        85985 by: Martin

Re: adding 'vote' mechanism
        85986 by: Nick Wilson

Disabliing browser cache possible?
        85987 by: Andy
        85992 by: Girish Nath

Re: Unknown column when column does exist.
        85988 by: Jason Wong
        85998 by: lmlweb.mybc.com

Re: Not Quite: how to build an array
        85989 by: Jason Wong

Opening sockets
        85990 by: LaserJetter

Localization support
        85991 by: Uros Gruber

Installing PHP4.1.1 on RH7.2 impossible!
        85993 by: Andy
        85994 by: Rasmus Lerdorf
        85997 by: Andy

Lossless JPEG image rotation
        85995 by: Baumann Reto

problem while loop.
        85996 by: Jeff Bearer

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 ---
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> $numresult=mysql_query($sql) 
>       or die( "4 QUERY ERR $sql");
> 
> echo "numresult = $numresult";
> 
> $numrows=mysql_num_rows($numresult);
> mysql_free_result($numresult);
> echo "<P align='left'>You have selected " .$numrows ."
> record(s).";
> 
> When I run the script above on php4 windows I get the
> following result:
> 
> numresult = Resource id #2
> You have selected 0 record(s).
> 
> 
> When I run the script above on php3 linux I get the
> following result:
> 
> numresult = 2
> You have selected 1382 record(s).
> 
> 
> Why do I get two different values for $numresult?
> Thanks

Are you actually using the same database for both queries? Try running 
the query from the command line on both machines and see what happens.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam
--- End Message ---
--- Begin Message ---
Hello!

I read that the flash-format has been published to all users (see:
http://www.macromedia.com/macromedia/proom/pr/1998/flashstandard.html).

I was wondering if there is some php-support to generate
flash-animations in general.

What I'm looking for in particulla is a simple horizontal text-scroller
done in flash, but generated with php (to show diffenrent text on
different user-inputs for example). Has someone done this before?

Martin


--- End Message ---
--- Begin Message ---
Okay, I found the Ming-Library in the documentation (I just search for
flash in the functions list and didn't find anything). I will try this.


--- End Message ---
--- Begin Message ---
On Sun, 24 Feb 2002, Martin wrote:

> I was wondering if there is some php-support to generate
> flash-animations in general.

        http://www.php.net/manual/en/ref.swf.php
        http://www.php.net/manual/en/ref.ming.php

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

--- End Message ---
--- Begin Message ---
Hi Mika, thanx for your answer,

>         http://www.php.net/manual/en/ref.swf.php
>         http://www.php.net/manual/en/ref.ming.php

which one should I prefer (using windows) ?

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then Steven Walker declared....
> I personally prefer voting mechanisms that display how many votes have 
> been cast. If you keep the thumbs_up separate from thumbs_down, you can 
> figure the total number of votes. Otherwise, you will not be able to 
> know whether the author is *really* average or just never voted for.

Thanks for the replys, I just thought I might be missing something
obvious but I guess not. I'll go with my original plan as Steven's point
echos my own thoughts on this.

Regards
- -- 
- -----------------------------------------------------------
 www.explodingnet.com   |    Projects, Forums and
                        +    Articles for website owners 
- -- Nick Wilson --     |    and designers.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8eMHjHpvrrTa6L5oRAt6XAJ0SJVNSAUOnxBDxVMHNzVsUgFRxaQCeK65t
Flz4SpReKz+Ft6gdvQHo+kE=
=0ES1
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hi there,

I would like to disable clients browser cache. Anyhow this does not work.

In a PHP book I found following line:

header("Pragma: no-cache");

Does not work though.

Can anybody help?

Thanx Andy


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

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

There is a section about how to disable caching about 1/3 way down the page.

Regards


Girish
--
www.girishnath.co.uk


----- Original Message -----
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 24, 2002 12:04 PM
Subject: [PHP] Disabliing browser cache possible?


Hi there,

I would like to disable clients browser cache. Anyhow this does not work.

In a PHP book I found following line:

header("Pragma: no-cache");

Does not work though.

Can anybody help?

Thanx Andy



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


--- End Message ---
--- Begin Message ---
On Sunday 24 February 2002 06:57, [EMAIL PROTECTED] wrote:
> I've just created a "add record to table" type of page - basically copied
> a working php file I have on hand, and changed the values etc.
>
> Now, I am having problems trying to troubleshoot something. Basically
> my mySQL query is:
>
> INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE, DATE, REG_DATE,
> FEE) VALUES ('Another Event', 'Summary of this event goes here', 'Another
> Organization', 'Coquitlam', 'BC', 'Another Date', 'Another Date', '$250')
>
> and I have a coding in my php file that pretty much tells mySQL if it
> can't insert this, spit out the problem:
>
> Can't execute INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE,
> DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event
> goes here', 'Another Organization', 'Coquitlam', 'BC', 'Another Date',
> 'Another Date', '$250') Unknown column 'ORG' in 'where clause'

Where is your 'where clause' coming from?

>
> Okay, there's an ORG column in the database table, and if I check my
> mySQL phpAdmin interface (even ran the same query in the myPHPAdmin
> interface), the very record has been inserted into the
> database without problems. So the inserting record into database part
> isn't the problem - it seems to me that the problem is that somewhere
> along the line, PHP is confused and is telling me something else.
>
> Ideas?

Yes, post your code.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
I have an existential map.  It has "You are here" written all over it.
                -- Steven Wright
*/
--- End Message ---
--- Begin Message ---
Jason,

> > Can't execute INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE,
> > DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event
> > goes here', 'Another Organization', 'Coquitlam', 'BC', 'Another Date',
> > 'Another Date', '$250') Unknown column 'ORG' in 'where clause'
> 
> Where is your 'where clause' coming from?

That's it! I forgot to change the table name! Remember that I said I
copied it from a working php file and renamed it, and thought I had changed
all elements needed? I overlooked that particular one! Thanks for pointing
it out the 'where clause' part. It should work now!

Again, thanks!

Laurie
--- End Message ---
--- Begin Message ---
On Sunday 24 February 2002 04:03, jtjohnston wrote:
> I'm splitting mysql entries to build an array of author names called
> $authors.
>
> > As someone already suggested, you could use:
> >  array_push($authors, explode(";", $mydata->AS));
>
> http://ccl.flsh.usherb.ca/db/authors_under_study.php
>
> It works, but still gets "First argument to array_push() needs to be an
> array" and fails before it gets to "print_r($authors)". Am I doing
> something wrong here:

[snip]

What array_push is doing is adding the *whole* array onto the existing array. 
What you need is to add the *elements* of the array onto the existing array.

Try this:

  $news = mysql_query("select id,AUS from $table"); 
  $authors = array();
  while ($mydata = mysql_fetch_object($news))
  {
    echo $mydata->id."|".$mydata->AUS."<hr>\n"; 
    $tmp = explode(";", $mydata->AUS);
    foreach($tmp as $val) {
      array_push($authors, $val);
    }
  }
  print_r($authors);


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Subtlety is the art of saying what you think and getting out of the way
before it is understood.
*/
--- End Message ---
--- Begin Message ---
I'm running GTK on Win32 and have made an app that connects to a server and
downloads some data.
I tested it over my LAN and it works fine, using both 10.0.0.1 and
gethostbyname("amd") as the host in fsockopen(host, 80, 30)
I've now tried running it over the internet, trying to connect to the server
www.lottery-machine.co.uk or gethostbyname(www.lottery-machine.co.uk) but it
won;t connect to the server. The window that displays the downloaded data
contains a webpage which is produced by the web host when there's an error
of some kind. If I type in the GET request
(www.lottery-machine.co.uk/clientlogin.php?username=me&password=password) in
a web browser it works fine as expected.
I'm in touch with them about the problem but does anyone know what is
causing this? Does the host only accept connections from web browsers or
something?


--- End Message ---
--- Begin Message ---
Hi!

I hope this is right address to get some help about this.

I tried many ways to get working locales, but nothing works.

My OS is FreeBSD 4.5 and php i use is 4.1.1.

I want to get slovenian locale working
If I set LC_ALL in my environment and if i type date for example in
shell everything is OK, i see date printet in my language.

but when i type this i PHP

setlocale(LC_ALL, 'sl_SI.ISO_8859-2');
echo "<pre>";
print_r(localeconv());

i get output like this

Array
(
    [decimal_point] => .
    [thousands_sep] => 
    [int_curr_symbol] => 
    [currency_symbol] => 
    [mon_decimal_point] => 
    [mon_thousands_sep] => 
    [positive_sign] => 
    [negative_sign] => 
    [int_frac_digits] => 127
    [frac_digits] => 127
    [p_cs_precedes] => 127
    [p_sep_by_space] => 127
    [n_cs_precedes] => 127
    [n_sep_by_space] => 127
    [p_sign_posn] => 127
    [n_sign_posn] => 127
    [grouping] => Array
        (
        )

    [mon_grouping] => Array
        (

but it has to be like this


Array
(
    [decimal_point] => ,
    [thousands_sep] => .
    [int_curr_symbol] => SIT
    [currency_symbol] => SIT
    [mon_decimal_point] => ,
    [mon_thousands_sep] => .
    [positive_sign] => 
    [negative_sign] => -
    [int_frac_digits] => 2
    [frac_digits] => 2
    [p_cs_precedes] => 0
    [p_sep_by_space] => 1
    [n_cs_precedes] => 0
    [n_sep_by_space] => 1
    [p_sign_posn] => 1
    [n_sign_posn] => 1
    [grouping] => Array
        (
            [0] => 3
        )

    [mon_grouping] => Array
        (
            [0] => 3
        )

I tried exact code on window2000 and i get second output, so on
windows works this but on unix does not.

There is also strange thig about nameing locales. Somewhere i have to
use only sl or slv, somwhere sl_SI or maybe like here
sl_SI.ISO_8859-2. Shouldn't be this somehow standard. So if i move my
code on other machine nothing would work or what.

Plese if someboday can help me or have some good doc.

-- 
lp,
 Uros                          mailto:[EMAIL PROTECTED]

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

I am a Linux newbie and I would reallly like to get this thing working on
RH7.2 But it does not work out!

A "normal" PHP4.1.1 installation works. But I need gd2.0 and JPEG support.
Thats where my knowledge ends.

I tryed following configue line:

./ configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg

It compiles and after restarting apache the normal php works.  While trying
to use gd I get following errormsg:

no JPEG support in this php build
imagecreatetruecolor requires gd2.0 or later

Is there someone out ther who knows the propper configure line?? Thank you
so much for any help

Cheers Andy



--- End Message ---
--- Begin Message ---
See http://www.php.net/~rasmus/gd.html

On Sun, 24 Feb 2002, Andy wrote:

> Hi there,
>
> I am a Linux newbie and I would reallly like to get this thing working on
> RH7.2 But it does not work out!
>
> A "normal" PHP4.1.1 installation works. But I need gd2.0 and JPEG support.
> Thats where my knowledge ends.
>
> I tryed following configue line:
>
> ./ configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg
>
> It compiles and after restarting apache the normal php works.  While trying
> to use gd I get following errormsg:
>
> no JPEG support in this php build
> imagecreatetruecolor requires gd2.0 or later
>
> Is there someone out ther who knows the propper configure line?? Thank you
> so much for any help
>
> Cheers Andy
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Thanx Rasmus,

Andy


"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> See http://www.php.net/~rasmus/gd.html
>
> On Sun, 24 Feb 2002, Andy wrote:
>
> > Hi there,
> >
> > I am a Linux newbie and I would reallly like to get this thing working
on
> > RH7.2 But it does not work out!
> >
> > A "normal" PHP4.1.1 installation works. But I need gd2.0 and JPEG
support.
> > Thats where my knowledge ends.
> >
> > I tryed following configue line:
> >
> > ./
configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg
> >
> > It compiles and after restarting apache the normal php works.  While
trying
> > to use gd I get following errormsg:
> >
> > no JPEG support in this php build
> > imagecreatetruecolor requires gd2.0 or later
> >
> > Is there someone out ther who knows the propper configure line?? Thank
you
> > so much for any help
> >
> > Cheers Andy
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


--- End Message ---
--- Begin Message ---
Is there a good way to rotate a JPEG image (90°, 180° or 270°)?

I tried jpegtran and convert (ImageMagick)... But they both don't really
work as expected. Why?

jpegtran only workes if used with -trim. But this trims the image (cuts some
pixels away), which is not a very good way.

ImageMagick's convert isn't lossless :(

Any other ideas?


Thanks a lot
Reto


--- End Message ---
--- Begin Message ---
I have a problem while loop that isn't terminating when it's supposed
to.  I can't figure out what the problem is, if I run a comparison
inside the while loop it matches as it should, but for some reason the
same comparison isn't working as the while loop expression. I get an
infinite loop when I run this code.

while(strtotime($event_date) <= strtotime($end_date)){
        # test to see if the loop should of stopped.
        if(strtotime($event_date) <= strtotime($end_date))
                echo "GO!!\n";
        else echo "STOP!!!!!!!!!!!!!!!\n";

        /* omitted code that finds the next $event_date */
}




-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper
--- End Message ---

Reply via email to