php-general Digest 14 Feb 2003 08:12:29 -0000 Issue 1882

Topics (messages 135511 through 135562):

Re: problems with cookies and PHP
        135511 by: Rick Emery
        135514 by: Bryan Lipscy

sososoosos!!!!
        135512 by: Luis A
        135513 by: Leif K-Brooks
        135516 by: Tim Thorburn

What's the scoop on PHP 5?
        135515 by: Leif K-Brooks
        135528 by: Danny Shepherd

By reference
        135517 by: Chris Boget
        135523 by: Chris Wesley

Re: GD and 4.3
        135518 by: Joseph Bannon
        135547 by: Jason Wong

Enable CLI on Mac OS X
        135519 by: Dan Tappin

Add a record and recover it's ID in one operation
        135520 by: Daniel Page
        135521 by: Leif K-Brooks
        135525 by: Daniel Page
        135529 by: Chris Kay
        135530 by: Chris Shiflett

Simple PHP script
        135522 by: Poon, Kelvin (Infomart)
        135524 by: John Nichel
        135526 by: Poon, Kelvin (Infomart)
        135527 by: janet.valade.com

Use GnuPG with PHP?
        135531 by: MIKE YRABEDRA

Sorting multidimensional arrays
        135532 by: Sean Brown
        135540 by: Chris Wesley

Templates
        135533 by: Darren Young
        135534 by: Justin French
        135535 by: Justin French
        135537 by: Darren Young
        135539 by: Justin French
        135545 by: php.errorcode.com

Calculating U.S. Taxes (regional)
        135536 by: [-^-!-%-

Error compiling php
        135538 by: Adam Plocher

Reading File Name
        135541 by: PR
        135546 by: Jason Wong

I need examples of WRITING to XML wth PHP
        135542 by: Daevid Vincent
        135551 by: Manuel Lemos

programming question
        135543 by: Thomas Moore
        135550 by: olinux

Re: Login system using PHP/MySql
        135544 by: YC Nyon
        135549 by: olinux

Re: crypt()
        135548 by: Jason Wong
        135558 by: SLanger.spirit21.de

encrypt passwords on URL
        135552 by: Petre Agenbag

upgrading from 4.1.2 to 4.3.0 - can anyone point me to a list of MUST DO'S
        135553 by: Brian Tully

Re: Process array after form submission problem
        135554 by: Steve Jackson

image creation error
        135555 by: Michael P. Carel
        135556 by: Kevin Waterson
        135557 by: Michael P. Carel
        135562 by: Michael P. Carel

Re: PHP-based SMS solution
        135559 by: Mika Tuupola

Include() problems
        135560 by: Leo Spalteholz

Re: Include() problems IGNORE PARENT
        135561 by: Leo Spalteholz

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 your  code, it appears you are attempting to determine the value of the cookie 
immediately upon
setting.  The value of the cookie is NOT available at this point; a new page must be 
opened.

Why are you setting time to 0?  If you want cookie to disappear at end of the session, 
use NULL.

Are you certain that $_COOKIE[] is available to you?  have you tried 
$HTTP_COOKIE_VARS[]?

Your code ends with two braces ( } ); why?  It should end with a single brace.
----- Original Message -----
From: "Joshua Chapman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 12:57 PM
Subject: [PHP] problems with cookies and PHP


This is driving me nuts... it won't set or reset the cookie
no errors no nothing...
I've learned quite a bit about cookies and PHP thus far but something important must 
still be
eluding me. I've read the manual entry on it, is there any other tutorial out there 
that's better?
what am I doing wrong?

<?php
if(!isset($_COOKIE['userInfo'])){
setcookie("userInfo","temp",0,"/","faxonautoliterature.com",0);
print "set temp";
}else{
if($_COOKIE['userInfo']=="temp"){
setcookie("userInfo","userID",time()+60*60*24*30,"/","faxonautoliterature.com",0);
print "set info";
}
}
?>

--- End Message ---
--- Begin Message ---
I have been playing with this at home.

Perhaps this makes it a bit easier.....

boolean setcookie ( string name [, string value [, int expire [, string
path [, string domain [, int secure]]]]])
boolean setcookie (name, value, expire, path, domain, secure)

<?php
        if(!isset($_COOKIE['userInfo'])){ 
        
setcookie("userInfo","temp",0,"/","faxonautoliterature.com",0);
                print "set temp";
        } else {
                if($_COOKIE['userInfo']=="temp"){ 
        
setcookie("userInfo","userID",time()+60*60*24*30,"/","faxonautoliteratur
e.com",0);
                        print "set info";
                }
        }
?>

Fwiw, a solution from another project:
<?
        if (empty($_COOKIE["uuid"])){
                $token = md5(uniqid(rand(),1)); 
                setcookie ("uuid", $token,
mktime(23,59,59,2,28,2003),"/poll/","ukiuki");
                print "Cookie set: ".$token;
        } else {
                print "Cookie exits: ".$_COOKIE["uuid"];
        }

?>

--- End Message ---
--- Begin Message ---
HI EVERY BODY=20


I HAVE THE FOLLOWING TROUBLE INSTALING PHP


GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING =
APACHE
VERSION


 apache_1.3.26-win32-x86-no_src.msi


I BEEN TRIED THE VERSION    apache_1.3.26-win32-x86-no_src.exe  BUT HE =
SEND
IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST
??????




--- End Message ---
--- Begin Message --- Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps.
--Strong Bad

Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it.

Luis A wrote:

HI EVERY BODY=20


I HAVE THE FOLLOWING TROUBLE INSTALING PHP


GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING =
APACHE
VERSION


apache_1.3.26-win32-x86-no_src.msi


I BEEN TRIED THE VERSION apache_1.3.26-win32-x86-no_src.exe BUT HE =
SEND
IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST
??????






--
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.



--- End Message ---
--- Begin Message ---
ROTFLMAO!!!!!!

Strong Bad on PHP ... we totally need to make Strong Bad the PHP mascot ;)

At 03:32 PM 2/13/2003 -0500, you wrote:
Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps.
--Strong Bad

Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it.

Luis A wrote:

HI EVERY BODY=20


I HAVE THE FOLLOWING TROUBLE INSTALING PHP


GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING =
APACHE
VERSION


apache_1.3.26-win32-x86-no_src.msi


I BEEN TRIED THE VERSION    apache_1.3.26-win32-x86-no_src.exe  BUT HE =
SEND
IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST
??????






--
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


--- End Message ---
--- Begin Message --- Anyone know what the status of PHP 5 is? I can't find reference of it on php.net, and the only place I can find an alpha of it is at the PHP Museum.

--
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.


--- End Message ---
--- Begin Message ---
The latest cvs snapshots for PHP4.3.x and PHP5.0.x can be found at
http://snaps.php.net

Danny.

----- Original Message -----
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 8:50 PM
Subject: [PHP] What's the scoop on PHP 5?


> Anyone know what the status of PHP 5 is?  I can't find reference of it
> on php.net, and the only place I can find an alpha of it is at the PHP
> Museum.
>
> --
> 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
>

--- End Message ---
--- Begin Message ---
I thought I understood this but evidently not...  
Consider the following:

$firstVar = "123ABC";

$secondVar &= $firstVar;
$thirdVar = &$firstVar;

echo $secondVar;
echo '<br>';
echo $thirdVar;

When I echo $secondVar, I get '0' but when I echo $thirdVar,
I get the value of $firstVar.

Why?  I thought that "&=" made it so that the left operand was
pointing to the memory location of the right?

Chris


--- End Message ---
--- Begin Message ---
On Thu, 13 Feb 2003, Chris Boget wrote:

> $firstVar = "123ABC";
>
> $secondVar &= $firstVar;

&= is a bitwise AND, and an assignment.
This didn't do what you expected it to do.

> $thirdVar = &$firstVar;

=& is a reference assignment.
This did what you expected it to do.

> Why?  I thought that "&=" made it so that the left operand was
> pointing to the memory location of the right?

You make the left operand point to the memory location of the right
operand with =&.  =& is the only reference assignment available, besides
passing/returning by reference with functions.

$stuff = "1234";
$ref =& $stuff;    // $ref points to $stuff's data
print $ref . "\n"; // prints "1234"
$stuff = "5678";
print $ref . "\n"; // prints "5678"

        hth,
        ~Chris

--- End Message ---
--- Begin Message ---
> Do you have freetype2 installed?
 
 
No, but I removed the --with-freetype-dir=/usr and
it installed ok. Does this mean I wont be able to
create text on images?

Here is basically what I want to do if that helps... I
want to configure php so that I can create images with
text on them, like a graphic counter. I don't care
what font is used, so if there is a default font with
GD, that's ok.
 
> J.


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
On Friday 14 February 2003 03:09, Joseph Bannon wrote:
> > Do you have freetype2 installed?
>
> No, but I removed the --with-freetype-dir=/usr and it
> installed ok. Does this mean I wont be able to create
> text on images?

Try it. You did configure with --enable-gd-native-ttf ?

> Basiclly, I want to configure php so that I can create
> images with text on them, like a graphic counter. I
> don't care what font is used, so if there is a default
> font with GD, that's ok.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Even historians fail to learn from history -- they repeat the same mistakes.
                -- John Gill, "Patterns of Force", stardate 2534.7
*/

--- End Message ---
--- Begin Message --- Hello all,

I am running a few Apache 1.3.x / PHP 4.2.3 systems and I would like to mess around with using PHP from the command line.

I installed PHP from a nice .pkg installer from Tenon (www.tenon.com) and it runs fine. The problem is that there is no source code on my system to run a simple ./configure --enable-cli etc...

I am thinking that I need to install PHP (v4.3 while I am at it) from scratch to do this. I was wondering if anyone can think of a work around or any other ideas?

Thanks,

Dan

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

Imagine a table with an auto-increment id number field and a text field for
the username.
User B (with user name 'johnny') could write to the database a millisecond
after user A, with the same username. When user A looks for the last record
written by Johnny, A will find the record entered by B.

Is there a way to directly recover the auto-incremented number as like a
return value (or somthing like that) of the write query as to be able to
identify immediately what record you just wrote?

This is just for argument's sake - I just would like to know if it is
possible. My current solution is inserting the login time of the current
user and/or IP, and adding that to make a temporary ID key where you select
the latest entry written where username = your username and login time
string = hhmmss info so you can immdately find your latest entered data,
though recovering immediately the ID would have been a more elegant solution
for this.

Cheers,
Daniel


--- End Message ---
--- Begin Message ---
www.php.net/mysql-insert-id

Daniel Page wrote:

Hi,

Imagine a table with an auto-increment id number field and a text field for
the username.
User B (with user name 'johnny') could write to the database a millisecond
after user A, with the same username. When user A looks for the last record
written by Johnny, A will find the record entered by B.

Is there a way to directly recover the auto-incremented number as like a
return value (or somthing like that) of the write query as to be able to
identify immediately what record you just wrote?

This is just for argument's sake - I just would like to know if it is
possible. My current solution is inserting the login time of the current
user and/or IP, and adding that to make a temporary ID key where you select
the latest entry written where username = your username and login time
string = hhmmss info so you can immdately find your latest entered data,
though recovering immediately the ID would have been a more elegant solution
for this.

Cheers,
Daniel




--
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.



--- End Message ---
--- Begin Message ---
Thanks!

I stand corrected. I'll check the PHP online manual more often, and for now,
I'm off to optimise my database and rewrite a few queries :)

Cheers,
Daniel

"Leif K-Brooks" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> www.php.net/mysql-insert-id
>
> Daniel Page wrote:
>
> >Hi,
> >
> >Imagine a table with an auto-increment id number field and a text field
for
> >the username.
> >User B (with user name 'johnny') could write to the database a
millisecond
> >after user A, with the same username. When user A looks for the last
record
> >written by Johnny, A will find the record entered by B.
> >
> >Is there a way to directly recover the auto-incremented number as like a
> >return value (or somthing like that) of the write query as to be able to
> >identify immediately what record you just wrote?
> >
> >This is just for argument's sake - I just would like to know if it is
> >possible. My current solution is inserting the login time of the current
> >user and/or IP, and adding that to make a temporary ID key where you
select
> >the latest entry written where username = your username and login time
> >string = hhmmss info so you can immdately find your latest entered data,
> >though recovering immediately the ID would have been a more elegant
solution
> >for this.
> >
> >Cheers,
> >Daniel
> >
> >
> >
> >
> >
>
> --
> 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.
>
>
>


--- End Message ---
--- Begin Message ---
Something like this perhaps.... untested

function insert($query) {
        // Connect info
          mysql_connect("host","user","pass");

          // Select DB
        mysql_select_db("DBname");

          // Perform insert
        $indb=mysql_query($query);
        
          // Gets record ID
        $dbq=mysql_query("select last_insert_id()");
        $data=mysql_fetch_row($dbq);

          // Return ID
        return $data[0];
}

--------------------------------------------------------- 
Chris Kay 
Techex Communications 
Website: www.techex.com.au Email: [EMAIL PROTECTED] 
Telephone: 1300 88 111 2 - Fax: 1300 882 221 
---------------------------------------------------------  

-----Original Message-----
From: Daniel Page [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 14 February 2003 8:18 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Add a record and recover it's ID in one operation

Thanks!

I stand corrected. I'll check the PHP online manual more often, and for now,
I'm off to optimise my database and rewrite a few queries :)

Cheers,
Daniel

"Leif K-Brooks" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> www.php.net/mysql-insert-id
>
> Daniel Page wrote:
>
> >Hi,
> >
> >Imagine a table with an auto-increment id number field and a text field
for
> >the username.
> >User B (with user name 'johnny') could write to the database a
millisecond
> >after user A, with the same username. When user A looks for the last
record
> >written by Johnny, A will find the record entered by B.
> >
> >Is there a way to directly recover the auto-incremented number as like a
> >return value (or somthing like that) of the write query as to be able to
> >identify immediately what record you just wrote?
> >
> >This is just for argument's sake - I just would like to know if it is
> >possible. My current solution is inserting the login time of the current
> >user and/or IP, and adding that to make a temporary ID key where you
select
> >the latest entry written where username = your username and login time
> >string = hhmmss info so you can immdately find your latest entered data,
> >though recovering immediately the ID would have been a more elegant
solution
> >for this.
> >
> >Cheers,
> >Daniel
> >
> >
> >
> >
> >
>
> --
> 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

--- End Message ---
--- Begin Message ---
--- Chris Kay <[EMAIL PROTECTED]> wrote:
> 
> Something like this perhaps.... untested
> 
> function insert($query) {
>         // Connect info
>         mysql_connect("host","user","pass");
> 
>         // Select DB
>         mysql_select_db("DBname");
> 
>         // Perform insert
>         $indb=mysql_query($query);
>       
>         // Gets record ID
>         $dbq=mysql_query("select last_insert_id()");
>         $data=mysql_fetch_row($dbq);
> 
>         // Return ID
>         return $data[0];
> }

You can replace everything after "// Gets record ID" with this:

return mysql_insert_id();

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

I am new to PHP and had just written a simple php script to get things
started.  I have the following code:


<html>
<body>
<?php
if($submit1) {
echo "hello $vname";
} else {
?>
<form action="thispage.php" method=post>
<table>
<tr><td>Input yourname</td><td><input type=text name=vname></td></tr>
<tr><td colspan=2><input type=submit name=submit1></td></tr>
</table>
</form>
<?php
}
?>
</body>
</html>

So this page is suppose to display a input box and a submit button and once
you enter ur name and press the button, it should show Hello [ur name] and
the input box at the bottom of it and the button below and the process
continue.

I tried running it and inputted some text and pressed the button, and the
Hello [ur name] didn't show up, it just display an input box and the submit
button.

Can someone please help me?

Thanks a lot

Kelvin

--- End Message ---
--- Begin Message ---
Sigh....

if ( $_POST['submit1'] ) {
	echo ( "Hello $_POST['vname']" );
}

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

Poon, Kelvin (Infomart) wrote:
Hi,

I am new to PHP and had just written a simple php script to get things
started.  I have the following code:


<html>
<body>
<?php
if($submit1) {
echo "hello $vname";
} else {
?>
<form action="thispage.php" method=post>
<table>
<tr><td>Input yourname</td><td><input type=text name=vname></td></tr>
<tr><td colspan=2><input type=submit name=submit1></td></tr>
</table>
</form>
<?php
}
?>
</body>
</html>

So this page is suppose to display a input box and a submit button and once
you enter ur name and press the button, it should show Hello [ur name] and
the input box at the bottom of it and the button below and the process
continue.

I tried running it and inputted some text and pressed the button, and the
Hello [ur name] didn't show up, it just display an input box and the submit
button.

Can someone please help me?

Thanks a lot

Kelvin



--- End Message ---
--- Begin Message ---
Thanks everyone, It worked.

Kelvin

-----Original Message-----
From: John Nichel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 4:13 PM
To: Poon, Kelvin (Infomart)
Cc: '[EMAIL PROTECTED]'
Subject: Re: [PHP] Simple PHP script


Sigh....

if ( $_POST['submit1'] ) {
        echo ( "Hello $_POST['vname']" );
}

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

Poon, Kelvin (Infomart) wrote:
> Hi,
> 
> I am new to PHP and had just written a simple php script to get things
> started.  I have the following code:
> 
> 
> <html>
> <body>
> <?php
> if($submit1) {
> echo "hello $vname";
> } else {
> ?>
> <form action="thispage.php" method=post>
> <table>
> <tr><td>Input yourname</td><td><input type=text name=vname></td></tr>
> <tr><td colspan=2><input type=submit name=submit1></td></tr>
> </table>
> </form>
> <?php
> }
> ?>
> </body>
> </html>
> 
> So this page is suppose to display a input box and a submit button and
once
> you enter ur name and press the button, it should show Hello [ur name] and
> the input box at the bottom of it and the button below and the process
> continue.
> 
> I tried running it and inputted some text and pressed the button, and the
> Hello [ur name] didn't show up, it just display an input box and the
submit
> button.
> 
> Can someone please help me?
> 
> Thanks a lot
> 
> Kelvin
> 
> 

--- End Message ---
--- Begin Message ---
In a message dated 2/13/2003 1:11:35 PM Pacific Standard Time,
[EMAIL PROTECTED] writes:

>I am new to PHP and had just written a simple php script to get things
>started.  I have the following code:
>
><?php
>if($submit1) {
>echo "hello $vname";
>} else {
>?>
><form action="thispage.php" method=post>
>
>Input yourname<input type=text name=vname>
>
><input type=submit name=submit1>
>
>
></form>
><?php
>}
>?>

>So this page is suppose to display a input box and a submit button and once
>you enter ur name and press the button, it should show Hello [ur name] and
>the input box at the bottom of it and the button below and the process
>continue.
>
>I tried running it and inputted some text and pressed the button, and the
>Hello [ur name] didn't show up, it just display an input box and the submit
>button.
>
My guess would be that you have register_globals = Off.  You can change it to
register_globals = On in your php.ini file. But it would be better to learn
to program with globals turned off. The following program would run correctly.

<?php
if($_POST['submit1']) {
      echo "hello {$_POST['vname']}";
} else {
?>
<form action="thispage.php" method="post">
Input yourname<input type="text" name=vname>
<input type="submit" name="submit1">
</form>
<?php
  }
?>

Janet


-------------------------------
Janet Valade
Author, PHP & MySQL for Dummies
--- End Message ---
--- Begin Message ---
I want to be able to encrypt a block of text using a passphrase. Then when I
get the email, I just need to unlock it using that passphrase (no keys...i
think).

Can anyone tell me how to do this in PHP code?

TIA





-- 
Mike Yrabedra
President

323 Enterprises 
Home of The MacDock and The MacSurfshop
[http://macdock.com] : [http://macsurfshop.com]
VOICE: 770.382.1195
iChat/AIM: ichatmacdock
_______________________________________________________________________
"in all your ways acknowledge Him and He will direct your paths."
Proverbs 3:6 NIV
<{{{><
--


--- End Message ---
--- Begin Message ---
Let's say I've got an array like so:

$myarray[0]["firstname"] = "Mickey";
$myarray[0]["lastname"] = "Mouse";
$myarray[0]["score"] = 20;

$myarray[1]["firstname"] = "Donald";
$myarray[1]["lastname"] = "Duck";
$myarray[1]["score"] = 10;

I'd like be able to sort the array using different dimensions before I
cycle through a while loop to print out the results.  For instance, by
lastname, or by score.  I can't seem to get array_multisort() to do it. 
Any ideas?


--- End Message ---
--- Begin Message ---
On Thu, 13 Feb 2003, Sean Brown wrote:

> Let's say I've got an array like so:
>
> $myarray[0]["firstname"] = "Mickey";
> $myarray[0]["lastname"] = "Mouse";
> $myarray[0]["score"] = 20;
>
> $myarray[1]["firstname"] = "Donald";
> $myarray[1]["lastname"] = "Duck";
> $myarray[1]["score"] = 10;
>
> I'd like be able to sort the array using different dimensions before I
> cycle through a while loop to print out the results.  For instance, by
> lastname, or by score.  I can't seem to get array_multisort() to do it.

array_multisort() isn't what you want.

> Any ideas?

I've seen this question too many times go through here w/ lots of links,
and no code ... so here ya go.  (And I think someone else asked a similar
question today too ... you too, listen up ;)

You can use the usort() function to your advantage.  This is how:

<?php
// your $myarray definition here, unmodified

$sortKey = "score";
function myCompare( $arrayA, $arrayB ){
        global $sortKey;
        if( $arrayA[$sortKey] == $arrayB[$sortKey] )
                return 0;
        return( $arrayA[$sortKey] < $arrayB[$sortKey] ? -1 : 1 );
}

usort( $myarray, "myCompare" );

var_dump( $myarray );
?>

Obviously, you could sort by the other keys by changing the value
of $sortKey, in the code above, or sort in reverse order by flipping
the inequality comparison operator in myCompare().

http://www.php.net/manual/en/function.usort.php ... for all your usort()
goodness.

        g.luck,
        ~Chris


--- End Message ---
--- Begin Message ---
I'm looking around for some options on using templates with PHP. I've
used several Perl solutions in the past, but never tried it in PHP.
Digging on the web yields several options so I'd love some thoughts or
comments. The real driver is that the basic site design could change
over time and I'd like to have the basic HTML in the templates, and the
real logic in the PHP code.

Thanks in advance,

Darren Young

--- End Message ---
--- Begin Message ---
Go for a complex situation if that's what you want, or consider the basics:

home.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag
//
include('inc/header_html.php');
?>
Welcome to our website!
<?
include('inc/footer.php');
?>

contact.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag
//
include('inc/header_html.php');
?>
Contact us: [EMAIL PROTECTED]
<?
include('inc/footer.php');
?>


If you update any code in any of the 3 include files, you will update the
entire site's look, feel and actions.  It still allows for you to execute
unique PHP code either before or after the HTML starts too.


Strip your site down to what's common, and what's unique to each page, and
see where you go from there.


Justin


on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> 
> I'm looking around for some options on using templates with PHP. I've
> used several Perl solutions in the past, but never tried it in PHP.
> Digging on the web yields several options so I'd love some thoughts or
> comments. The real driver is that the basic site design could change
> over time and I'd like to have the basic HTML in the templates, and the
> real logic in the PHP code.
> 
> Thanks in advance,
> 
> Darren Young
> 

--- End Message ---
--- Begin Message ---
> If you update any code in any of the 3 include files, you will update the
> entire site's look, feel and actions.  It still allows for you to execute
> unique PHP code either before or after the HTML starts too.

I forgot to mention that a whole heap of your formatting and visial design
can be achieved with CSS too... don't get yourself trapped by making the
content hard to update.

A simple <p class="bodyText"> means that it's just as updateable as the rest
of your code, by tweaking a few lines of CSS in header_html.php


Justin

--- End Message ---
--- Begin Message ---
That's pretty much what I'm doing today, header page, menu page, content
page and a footer. Each of which includes a shared functions file as
well via require_once(). Only real problem is keeping track of
tables/rows/columns across all the various files. The 'where was that
<tr> supposed to be...' kind of thing.

Here's another one, there's no way to set a cookie after the headers
have been sent, true? Any way around this at all or at that point am I
best to use session variables and/or hidden fields.

I haven't done pure web development in a few years and am trying to
catch back up quickly. Any "best practices" assistance would be
appreciated.

Thanks for the response by the way.

/DAY

-----Original Message-----
From: Justin French [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 13, 2003 5:22 PM
To: Darren Young; [EMAIL PROTECTED]
Subject: Re: [PHP] Templates


Go for a complex situation if that's what you want, or consider the
basics:

home.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag //
include('inc/header_html.php'); ?> Welcome to our website! <?
include('inc/footer.php'); ?>

contact.php
<?
include('inc/header_code.php');
//
// unique code for this page to be executed before the <html> tag //
include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] <?
include('inc/footer.php'); ?>


If you update any code in any of the 3 include files, you will update
the entire site's look, feel and actions.  It still allows for you to
execute unique PHP code either before or after the HTML starts too.


Strip your site down to what's common, and what's unique to each page,
and see where you go from there.


Justin


on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> 
> I'm looking around for some options on using templates with PHP. I've 
> used several Perl solutions in the past, but never tried it in PHP. 
> Digging on the web yields several options so I'd love some thoughts or

> comments. The real driver is that the basic site design could change 
> over time and I'd like to have the basic HTML in the templates, and 
> the real logic in the PHP code.
> 
> Thanks in advance,
> 
> Darren Young
> 


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

--- End Message ---
--- Begin Message ---
on 14/02/03 10:20 AM, Darren Young ([EMAIL PROTECTED]) wrote:

> That's pretty much what I'm doing today, header page, menu page, content
> page and a footer. Each of which includes a shared functions file as
> well via require_once(). Only real problem is keeping track of
> tables/rows/columns across all the various files. The 'where was that
> <tr> supposed to be...' kind of thing.

yeah, well a complex layout will kill it pretty quick :)

The other way is go down the route of a 'fusebox' -- one script that shows
all pages within the site.

index.php
<?
// some header stuff
?>
<html>
<table>
    <tr>
        <td>Stuff</td>
    </tr>
    <tr>
        <td>
        <?
        $file = "content/{$_GET['p']}.html";
        if(file_exists($file))
            { include($file); }
        else
            { include('content/error.html'); }
        ?>
        </td>
    </tr>
</table>
</html>
    

you can call that script with
p=contact 
p=home
p=about
p=members&action=validate&step=3&favcolor=blue

And just make sure the include files do what they need to.


> Here's another one, there's no way to set a cookie after the headers
> have been sent, true? Any way around this at all or at that point am I
> best to use session variables and/or hidden fields.

Hidden fields, yes.
You are going to have the same problem with sessions... sessions must be set
before the headers are sent too.

You need to either change the logic on your page so that you set the cookie
BEFORE the <html>, or enable output buffering, so that you can set the
cookie or session whenever you like, then do a flush.  Personally, I've
never seen the need to use OB, because I've found a way to work that I'm
comfortable with.

eg:
<?
include('header_code.inc');
if($action=='validate')
    {
    // validate form entry
    if($error)
        { $show_form = 1; }
    else
        {
        $show_form = 0;
        // add form to DB or
        // set a cookie or
        // set a session or
        header("Location: form.php?page=thanks");
        }
    }
?>
<html>
<body>
<?
if($show_form) { include('form.inc'); }
if($_GET['page'] == "thanks") { echo "thanks"; }
?>
</body>
</html>


In otherwords, I execute any code that I need to BEFORE the headers are
sent, to ensure that I CAN set cookies, sessions, or use header()... I set
some simple triggers like $show_form to decide what I want to do in the
body.

Each to their own, but it works great for me over many many applications.


Justin



Justin French

--- End Message ---
--- Begin Message ---
On 13 Feb 2003 at 17:00, Darren Young wrote:

> I'm looking around for some options on using templates with PHP. I've
> used several Perl solutions in the past, but never tried it in PHP.
> Digging on the web yields several options so I'd love some thoughts or
> comments. The real driver is that the basic site design could change
> over time and I'd like to have the basic HTML in the templates, and the
> real logic in the PHP code.


Well, it seems every Perl programmer at one point or another wrote 
their own templating system. I went from my own to HTML::Template to 
a big fan of Template::Toolkit. The best one imho in PHP is Smarty. 
I'd rank it up there with Template::Toolkit. Take a look:

http://smarty.php.net/

Of course it's very easy to change not only the look and feel but the 
actual layout and everything else about it.

Best thing about not writing your own personal propriertary system is 
you benefit from the world at at large. I haven't used Smarty in a 
awhile as I've been mired in a CMS but I just recently had a chance 
to use it and I see it has been improving.  Take a good look at it. 

Peter
"Reality is that which, when you stop believing in it, doesn't go 
away".
-- Philip K. Dick

--- End Message ---
--- Begin Message ---
Hello everyone!

I'm looking for some resources that helps you calculate regional taxes. If
you have any leads,then please let me know.

I'm writing an e-commerce application that will charge users different
tax fees, based on where they are located. I hope to find a script that
already does that or gain access to an online service that maintains this
type of data.

I'm open to solutions with the following technologies:
PHP
SOAP
XML
or a general Value/Pair response.

Any help would be greatly appreciated.
Thanks in advance!

-john


=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.



--- End Message ---
--- Begin Message ---
Hello - I am attempting to upgrade one of our older PHP servers
(4.0.1pl2) to PHP 4.3.0.  We are running a fairly old version of apache
(1.3.12) and MySQL (3.22.32).  My question is - does PHP 4.3.0 support
older versions of MySQL?  When I go to configure PHP 4.3.0 it works
fine, but during compile I get the following errors:

lmysqlclient -lpng -lz -ljpeg -lz -lcrypt -lresolv -lm -ldl -lnsl
-lcrypt  -o sapi/cli/php
ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding':
/home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference
to `mysql_character_set_name'
ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string':
/home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference
to `mysql_real_escape_string'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

My configure string looks like this - the MySQL directory should be fine
because this configure string is exactly the same as the one used for
4.0.1pl2 (minus the GD/graphics stuff):

'./configure' '--with-mysql=/usr/local/mysql'
'--with-apache=../apache_1.3.12' '--enable-track-vars' '--with-gd'
'--with-jpeg-dir=/usr/lib' '--with-zlib-dir=/usr/local/lib'


Any help would be really great.
Thanks
-Adam
--- End Message ---
--- Begin Message ---
Hello all,

I am fairly new to PHP and I am trying to read files in
the directory (gif files)and based on the names of
the files create links on the page. The words within the file will be
separated with underscores(02_13_2002_This_file_name.gif but I do not
have to use underscores if it is going to make things easier).
I am also trying to sort the names as they are represented as
names/dates combination..

Could anyone help me to jump start this especially with splitting the
name and sorting? Should I read the file names into an array and sort it?
(read first 10 characters [date] split it - put into an array; then
read the rest parse it and place into an array?)

Here is what I have so far (basically reading files in a directory -
not tested yet):
<?
$file_dir="other";
$dir=opendir($file_dir);
    while ($file=readdir($dir))
    {
      if ($file !="." && $file !="..")
      { echo "< a href=".$file_dir."/".$file.">".$file."</a>";

      }
     }
?>
-- 
Best regards,
 Paul                          mailto:[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
On Friday 14 February 2003 08:40, PR wrote:
> Hello all,
>
> I am fairly new to PHP and I am trying to read files in
> the directory (gif files)and based on the names of
> the files create links on the page. The words within the file will be
> separated with underscores(02_13_2002_This_file_name.gif but I do not
> have to use underscores if it is going to make things easier).
> I am also trying to sort the names as they are represented as
> names/dates combination..

You'll find that using ISO format for date -- YYYYMMDD (with 
underscores/hyphens/whatever between each element if you wish) -- will enable 
easy sorting by date.

> Could anyone help me to jump start this especially with splitting the
> name and sorting? Should I read the file names into an array and sort it?
> (read first 10 characters [date] split it - put into an array; then
> read the rest parse it and place into an array?)

Use explode(). And yes, use arrays.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
You can no more win a war than you can win an earthquake.
                -- Jeannette Rankin
*/

--- End Message ---
--- Begin Message ---
I see tons of examples of how to read in an xml schema and use the
variables and such, but how do I then change values and re-save the
schema again? Can someone point me at a simple but function form that
simply reads a .xml file, populates the form, and allows you to change
values in the form and then resave the .xml file again. This seems like
it should be so basic, yet I can't find anything... Thanks in advance.

--- End Message ---
--- Begin Message ---
Hello,

On 02/13/2003 10:52 PM, Daevid Vincent wrote:
I see tons of examples of how to read in an xml schema and use the
variables and such, but how do I then change values and re-save the
schema again? Can someone point me at a simple but function form that
simply reads a .xml file, populates the form, and allows you to change
values in the form and then resave the .xml file again. This seems like
it should be so basic, yet I can't find anything... Thanks in advance.
If you want to compose and save an XML document, you may want to try this class:

http://www.phpclasses.org/xmlwriter


--

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
I am trying to return a variable from a recursive function. If the recursive
function gets called, the nothing is returned. For example, below I am
trying to get the category_array2 variable returned. It works if the
recursive function within the IF statement does not get called, but if it
does, it does not pass back the variable.

Any help would be greatly appreciated. I am tearing hair at this point!
-tom

showMasterCategories($year, $model_id, $syear_model_id, $keyword, $make_id,
$display_mode, $catid)
{
        $category_array2[$i] = getParent($category_id, $year_model_id, $i, $catid);
}


function getGrandParent($cat_id, $year_model_id, $x) {
 // to get highest level category "master category"
 $query = "SELECT distinct C2.category_id, C2.category, CC2.category_id ";
 $query .= " FROM CATEGORY C2, CHILD_CATEGORY CC, CHILD_CATEGORY CC2";
 $query .= " where C2.category_id = CC.category_id and CC.child_category_id
= $cat_id and  CC2.child_category_id = C2.category_id";

 //print "$query";
 $result99 = mysql_query($query)
     or die("Query failed - $query");

 list( $ch_category_id, $category, $pcategory_id) =
mysql_fetch_row($result99);

 if ($pcategory_id == 0) {

  print "PARENT=> $category:$pcategory_id:$year_model_id: $x<br>";
  $category_array2[$x] = "$category:$ch_category_id:$year_model_id";
  print "just before returning: $category_array2[$x]";
  return $category_array2[$x];
  $x = $x + 1;
 } else {
  print "<br>cat-> $category id->$ch_category_id<br>";
  getGrandParent($ch_category_id, $year_model_id, $x);
 }
 //print "$query";
 //$result_set = mysql_num_rows($result);
}




--- End Message ---
--- Begin Message ---
You could make $category_array2 global

function getGrandParent($cat_id, $year_model_id, $x)
{
    global $category_array2
...

olinux


--- Thomas Moore <[EMAIL PROTECTED]> wrote:
> I am trying to return a variable from a recursive
> function. If the recursive
> function gets called, the nothing is returned. For
> example, below I am
> trying to get the category_array2 variable returned.
> It works if the
> recursive function within the IF statement does not
> get called, but if it
> does, it does not pass back the variable.
> 
> Any help would be greatly appreciated. I am tearing
> hair at this point!
> -tom
> 
> showMasterCategories($year, $model_id,
> $syear_model_id, $keyword, $make_id,
> $display_mode, $catid)
> {
>       $category_array2[$i] = getParent($category_id,
> $year_model_id, $i, $catid);
> }
> 
> 
> function getGrandParent($cat_id, $year_model_id, $x)
> {
>  // to get highest level category "master category"
>  $query = "SELECT distinct C2.category_id,
> C2.category, CC2.category_id ";
>  $query .= " FROM CATEGORY C2, CHILD_CATEGORY CC,
> CHILD_CATEGORY CC2";
>  $query .= " where C2.category_id = CC.category_id
> and CC.child_category_id
> = $cat_id and  CC2.child_category_id =
> C2.category_id";
> 
>  //print "$query";
>  $result99 = mysql_query($query)
>      or die("Query failed - $query");
> 
>  list( $ch_category_id, $category, $pcategory_id) =
> mysql_fetch_row($result99);
> 
>  if ($pcategory_id == 0) {
> 
>   print "PARENT=>
> $category:$pcategory_id:$year_model_id: $x<br>";
>   $category_array2[$x] =
> "$category:$ch_category_id:$year_model_id";
>   print "just before returning:
> $category_array2[$x]";
>   return $category_array2[$x];
>   $x = $x + 1;
>  } else {
>   print "<br>cat-> $category
> id->$ch_category_id<br>";
>   getGrandParent($ch_category_id, $year_model_id,
> $x);
>  }
>  //print "$query";
>  //$result_set = mysql_num_rows($result);
> }
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,

I have looked at many examples session-based of login/password system to
protect webpages but can't get it to work. Seems simple but... I have php
and mysql installed in my windows server.

If any kind soul can point me to a working (easy) setup of this task, i
would be most grateful.

Nyon


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003

--- End Message ---
--- Begin Message ---
What is your question? What errors are you getting?

Here's a couple articles that you should read. Both
include code that accomplishes what you are after.

A Complete, Secure User Login System
http://phpbuilder.com/columns/tim20000505.php3

Building a Members Area with PHP: Part 1/6
http://www.devarticles.com/art/1/241
(you can find the other 5 parts)

olinux


--- YC Nyon <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I have looked at many examples session-based of
> login/password system to
> protect webpages but can't get it to work. Seems
> simple but... I have php
> and mysql installed in my windows server.
> 
> If any kind soul can point me to a working (easy)
> setup of this task, i
> would be most grateful.
> 
> Nyon
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system
> (http://www.grisoft.com).
> Version: 6.0.449 / Virus Database: 251 - Release
> Date: 27/01/2003
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--- End Message ---
--- Begin Message ---
On Friday 14 February 2003 03:20, Edward Peloke wrote:
> Is there anyway to make crypt() behave like md5() and give the same results
> for the same string?  All of the passwords for the db I am using had
> crpyt() applied to them before they were entered in the db.  How do I then
> verify that passwords match?

The example in the manual shows how to verify the password.

> I just did this:
> $test=crypt('test');
>  print $test. "<br>";
>  $test2=crypt('test');
>  print $test2. "<br>";
>
> and it printed out two completely different strings.  I saw in the
> functions list it was talking about salt but I am not sure what that means.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Bank error in your favor.  Collect $200.
*/

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

'salt' basically is the initialization sequence for the encryption. This 
makes the function use more random numbers since the salt will be 
different on different calls. At least it should be....

So in order for your crypt() to work you have to pass the same salt to 
both functions. 
To determine the 'salt' take the first two letters/numbers (this is the 
defualt but better check the PHP constant CRYPT_SALT_LENGTH for the real 
length of the salt) of the crypted text and pass them as the salt to the 
second and they should come out equal...

<?PHP
        $test=crypt('test');
        print $test. "<br>";
 $test2=crypt('test', substr($test, 0, 2)); // if CRYPT_SALT_LENGTH is 
more then two just pass in that number as the 
// third parameter to substr
 print $test2. "<br>";

?> 

Have fun experimenting around
Stefan
--- End Message ---
--- Begin Message ---
HI
This is a sort-of continuation on my previous question regarding being
able to "puch" a file to a client machine using PHP.

I have created a login page that connects to the ftp server and then
lists the contents of the folder. My original hope was that I could
somehow have the user just click on the file he want's to download it,
but since the files are not in a webfolder, I couldn't just make links
to them...

Another scenraio that could work is to simply have the user go to

ftp://username:[EMAIL PROTECTED]

BUT, that leaves the password on the URL and the data is sensitive. So,
my question:

Can I encrypt the password with PHP and then generate the link as above
but with the encrypted password?






--- End Message ---
--- Begin Message ---
I've heard that there are significant changes made between 4.1.2 and 4.3.0
so I need to know what the effects are going to be on our existing sites
running old code.

Is there a document that explains the effects of upgrading to 4.3.0 from
4.1.2 along with the steps I need to take to make my sites compatible with
whatever PHP's new changes are?

I've heard bits and pieces - which may as well be rumours - so I'd like to
be able to find something in writing from the php.net site if possible. so
far no luck.

thanks,
brian

--- End Message ---
--- Begin Message ---
Cheers,

Solved the problem exactly how I wanted it.


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





> -----Original Message-----
> From: Matt Schroebel [mailto:[EMAIL PROTECTED]] 
> Sent: 13. helmikuuta 2003 21:29
> To: Php-General; Steve Jackson
> Subject: RE: [PHP] Process array after form submission problem
> 
> 
> 
> 
> > -----Original Message-----
> > From: Steve Jackson [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 13, 2003 2:10 PM
> > To: Php-General
> > Subject: [PHP] Process array after form submission problem
> > 
> > 
> > Hi,
> > 
> > My problem is that I have a dynamic form with vars which I
> > want to process.
> > 
> > The variables are checkbox names with a variable number of
> > checkboxes but
> > all currently have the same variable name.
> > 
> > ie.
> > <form action='process.php' method='post'>
> > <input type = text name = user value = name>
> > <input type = checkbox name = grant value = 
> "{$array["code"]}"> <input 
> > type = checkbox name = grant value = "{$array["code"]}"> 
> <input type = 
> > checkbox name = grant value = "{$array["code"]}">
> > 
> > The array code works fine in that the values reflect what is
> > in the DB.
> > 
> > I understand that $grant will be an array? (am I right?) so
> > how do I use PHP
> > to look at $grant as an array in my processing script rather than an
> > ordinary variable? I can get the DB to update if there is 
> > only one checked
> > box but otherwise it updates the DB with the value of the 
> > last checkbox.
> Add [] to the end of the item name like:
> <input type = checkbox name = grant[] value = "{$array["code"]}">
> 
> <?php
> $grant = $_POST['grant'];
> if (is_array($grant)) {
>   echo 'Items checked:<br>';
>   foreach ($grant as $value) {
>     echo "$value<br>";
>   }
> }
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hi to all,

Im receiving a Fatal error: Call to undefined function:
imagecreatefromjpeg() .

Do i need to recompile PHP?


mike

--- End Message ---
--- Begin Message ---
This one time, at band camp,
"Michael P. Carel" <[EMAIL PROTECTED]> wrote:

> Hi to all,
> 
> Im receiving a Fatal error: Call to undefined function:
> imagecreatefromjpeg() .

You need to install gd

in your config line add

 --with-gd

Kevin

-- 
 ______                              
(_____ \                             
 _____) )  ____   ____   ____   ____ 
|  ____/  / _  ) / _  | / ___) / _  )
| |      ( (/ / ( ( | |( (___ ( (/ / 
|_|       \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia
--- End Message ---
--- Begin Message ---
i've recompile my php4.3 in redhat with
./configure --with-mysql --with-apache=../apache_1.3.x --with-gd --with-zlib

and i receive this error upon make

make: *** Warning: File `libphp4.la' has modification time in the future
(2003-0
2-14 16:04:12 > 2003-02-14 15:47:10)
make: Nothing to be done for `all'.
make: *** Warning:  Clock skew detected.  Your build may be incomplete.


What should be the problem?


----- Original Message -----
From: "Kevin Waterson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 3:07 PM
Subject: Re: [PHP] image creation error


> This one time, at band camp,
> "Michael P. Carel" <[EMAIL PROTECTED]> wrote:
>
> > Hi to all,
> >
> > Im receiving a Fatal error: Call to undefined function:
> > imagecreatefromjpeg() .
>
> You need to install gd
>
> in your config line add
>
>  --with-gd
>
> Kevin
>
> --
>  ______
> (_____ \
>  _____) )  ____   ____   ____   ____
> |  ____/  / _  ) / _  | / ___) / _  )
> | |      ( (/ / ( ( | |( (___ ( (/ /
> |_|       \____) \_||_| \____) \____)
> Kevin Waterson
> Port Macquarie, Australia
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
i've already installed gd but still recieving
Fatal error: Call to undefined function:
 imagecreatefromjpeg() .

----- Original Message -----
From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: "Kevin Waterson" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 3:45 PM
Subject: Re: [PHP] image creation error


> i've recompile my php4.3 in redhat with
>
./configure --with-mysql --with-apache=../apache_1.3.x --with-gd --with-zlib
>
> and i receive this error upon make
>
> make: *** Warning: File `libphp4.la' has modification time in the future
> (2003-0
> 2-14 16:04:12 > 2003-02-14 15:47:10)
> make: Nothing to be done for `all'.
> make: *** Warning:  Clock skew detected.  Your build may be incomplete.
>
>
> What should be the problem?
>
>
> ----- Original Message -----
> From: "Kevin Waterson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 14, 2003 3:07 PM
> Subject: Re: [PHP] image creation error
>
>
> > This one time, at band camp,
> > "Michael P. Carel" <[EMAIL PROTECTED]> wrote:
> >
> > > Hi to all,
> > >
> > > Im receiving a Fatal error: Call to undefined function:
> > > imagecreatefromjpeg() .
> >
> > You need to install gd
> >
> > in your config line add
> >
> >  --with-gd
> >
> > Kevin
> >
> > --
> >  ______
> > (_____ \
> >  _____) )  ____   ____   ____   ____
> > |  ____/  / _  ) / _  | / ___) / _  )
> > | |      ( (/ / ( ( | |( (___ ( (/ /
> > |_|       \____) \_||_| \____) \____)
> > Kevin Waterson
> > Port Macquarie, Australia
> >
> > --
> > 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 ---
On Wed, 12 Feb 2003, YC Nyon wrote:

> I am developing a web-based GPS vehicle tracking solution using php.
> I'm looking on how php can communicate with a SMSC using Smpp to issue AT
> commands.

        I am not aware of any libraries which allow you to talk
        SMPP directly to SMSC. Youre probably better of by
        using a SMSGW such as Kannel between PHP and SMSC.

                http://www.kannel.org/

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

--- End Message ---
--- Begin Message ---
I just ran into a somewhat strange problem with an include failing.
I have the following in my script:
include(dirname(__FILE__)."/LNScreens/LNScrMain.php");
include(dirname(__FILE__)."/LNDataBase/LNDataBase.php");

The first file is included just fine, but the LNDataBase file fails 
(Failed opening for inclusion).  My directory structure is:

/LNDataBase
        LNDataBase.php
/LNScreens
        LNScrMain.php
index.php

The file exists and it seems to be the exact same syntax as what I 
used to include the other file.  What else could possibly be wrong?

Thanks for any help,
Leo
--- End Message ---
--- Begin Message ---
Never mind.  Apparently I can't tell the difference between a capital 
and a lowercase B.  time to crash methinks.

leo

On February 13, 2003 11:59 pm, Leo Spalteholz wrote:
> I just ran into a somewhat strange problem with an include failing.
> I have the following in my script:
> include(dirname(__FILE__)."/LNScreens/LNScrMain.php");
> include(dirname(__FILE__)."/LNDataBase/LNDataBase.php");
>
> The first file is included just fine, but the LNDataBase file fails
> (Failed opening for inclusion).  My directory structure is:
>
> /LNDataBase
>       LNDataBase.php
> /LNScreens
>       LNScrMain.php
> index.php
>
> The file exists and it seems to be the exact same syntax as what I
> used to include the other file.  What else could possibly be wrong?
>
> Thanks for any help,
> Leo

--- End Message ---

Reply via email to