[PHP] ADOdb

2002-09-24 Thread Brendon G

Just curious as to what the general consensus of opinion is on the following
class.  Do many of you use it?.
http://php.weblogs.com/ADOdb

Coming over to PHP from ASP (I'm not really interested in learning .Net at
the moment) I like that I can switch databases allot faster if the need
occurs by using ADOdb.  If I had written code just using MySQLconnect I'd
have a hell of a time in the future.

Cheers

Brendon


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




Re: [PHP] SQL : left join from multiple tables

2002-09-24 Thread Marek Kilimajer

Well, this would work in MySQL, I have even more LEFT JOINs, so go find 
out if it is possible with Oracle.

Faisal Abdullah wrote:

>Hi again people! How's it goin?
>
>Here's the question
>How do I do left joins from multiple tables?
>I want to do something like this:
>
>"select a.name, b.department, c.position
>from emp a
>left join dept b
>on a.staffno = b.staffno
>left join position c
>on a.staffno = c.staffno
>where staffno = $staffno";
>
>I know the statement above is totally wrong. I'm just hoping u guys can
>understand what i'm trying to achieve from it.
>
>By the way, this is on Oracle 9i, but I guess ANSI would be fine.
>Thanks again.
>
>Sincerely,
>Faisal
>
>__
>
>
>  
>


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




Re: Re: [PHP] file uploads problem

2002-09-24 Thread Jaski

No Edwin .. I can't do any thing to that file .. not even from my 
ftp client .. can't download can't change permissions ..

The server is managed by rackspace .. I doubt they would do some 
thing like running apache as root which I "hear" is a v foolish 
thing to do  (frankly I don't know how to figure it out myself 
..if that is the case .. phpinfo() did not say any thing on 
that.)

A brief restatement of problem

File uploaded via HTTP POST to /tmp  OK

After this I tried the following three things and none worked.

a) fopen("/tmp/temp_file_name","rb")  FAILED (Operation not 
permitted)
b) copy($tempfile, "/place/to/put/uploaded/file") FAILED
c) move_uploaded_file($userfile, "/place/to/put/uploaded/file") 
DID COPY BUT file had -rw permissions, and could not open 
this file either... so back to square 1

The directory in "/place/to/put/uploaded/file is mode 777 .


Still fighting it out.
Regards
Jaski



On Tue, 24 Sep 2002 @ Edwin wrote :
>Just a comment...
>
>On Tuesday, September 24, 2002 1:39 PM
>Jaski wrote:
>
> > I tried to copy this file using
> > move_uploaded_file($userfile, 
>"/place/to/put/uploaded/file");
> >
> > and here a strange thing happened. The file was successfully
> > copied BUT it had permissions like -rw-- which I interpret 
>as
> > only accessible to root. I tried copy() function instead and 
>it
> > failed.
> >
>
>...having that "permission" doesn't necessarily mean that it's 
>only
>accessible to root--unless of course you're running Apache as 
>root, which I
>doubt you'd do.
>
>Anyway, if the file was successfully copied why not just try to 
>open it
>there?
>
>- E


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




Re: [PHP] in a logic loop!

2002-09-24 Thread Marek Kilimajer

Do it after the loop finishes

while( ){

if( something ) {
print out;
reinicialize
}
}

print out

Naintara Jain wrote:

>I have a logic problem:
>
>I have a complicated query. The main thing is that I have an ID, and for a
>particular ID, I may have  between 1 to 3 rows returned. The rows returned
>are variable, that is for 1 particular ID there might just be 1 row and at a
>later time it may have 3 rows.
>
>But what I need to do is print only one row for a particular ID. Please do
>not suggest I do it through SQL itself, because it's after using various
>aggregate functions that I have arrived at the min. result set. I need the
>logic clarified, because it has me stumped. It will be simple for a
>clear-thinking individual.
>
>What I am doing is:
>I maintain a set of details in say $prev_row (previous row) and another in
>cur_row (current row).
>The minute my cur_row detail (one unique id) doesn't match the prev_row
>detail, I print out all the previous row details, and reinitialize the
>various variables (all in a loop).
>
>This works fine for all cases but fails for the last ID, because of the
>logic used. Do I need to create a special case for the last one, or can
>anyone suggest a better way?
>
>-Thanks
>Naintara
>
>
>
>  
>


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




[PHP] Create login procedure...

2002-09-24 Thread Christian Ista

Hello,

I change the procedure to create an account for users. For the moment, 
the user (to create and log in), have to create an account with e-mail + 
password. I'd like to create a procedure to check the e-mail (login) 
validity. But I'd like to check if the e-mail used exist or not.

The procedure, I'd like implement :
1. User create new account (enter : fisrt name, last name, e-mail, 
password, )

2. An e-mail is send to user to check if e-mail exist. In the e-mail, my 
first idea is to send with an auto-generated number

3. User have to join a specific page to enter the auto-generated number 
to check the validity.


My question are :
1. What do you think about this procedure ? your advise, idea are welcome
2. Is it possible with mySQL to delete user after for example 2 days, if 
the user not confirm the subscription ?

Bye


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




Re: [PHP] in a logic loop!

2002-09-24 Thread Chris Hewitt

Naintara Jain wrote:

>What I am doing is:
>I maintain a set of details in say $prev_row (previous row) and another in
>cur_row (current row).
>The minute my cur_row detail (one unique id) doesn't match the prev_row
>detail, I print out all the previous row details, and reinitialize the
>various variables (all in a loop).
>
>This works fine for all cases but fails for the last ID, because of the
>logic used. Do I need to create a special case for the last one, or can
>anyone suggest a better way?
>
When you come out of your loop, either there will be one row left to 
print, or there were no matching rows. Suggestion one is to test for 
this and if there were matching rows, do a special case for the last row.

Alternatively, you are printing a row when the ID changes, that is, the 
last row of the 1 to 3 matching rows. Why not print the first one, not 
last one? You change the logic
to print the first row then ignore others with the same ID. It could be 
that (because of an Order By clause) the last row is the correct one and 
the data may differ between rows with the same ID.

You say you do not want to do it in the SQL statement itself, but this 
really is the right place. If MySQL use a LIMIT clause to only get one 
row, if you cannot refine the SQL statement to only retrieve one row.

HTH
Chris




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




Re: [PHP] right name for

2002-09-24 Thread Chris Hewitt

Andreas Hasenack wrote:

>What is the right name to use in apache's (2.0.41-dev) IfModule
>directive to test if the php4 module is loaded? I'm including
>the file below via httpd.conf's Include statement but the
>part between the IfModule is being completely ignored:
>
>
>AllowOverride None
>order deny,allow
>Deny from all
>Allow from 127.0.0.1
>
>php_flag engine on
>php_value include_path '.:/srv/www/default/html/acid/config'
>
>
>
>
>order deny,allow
>deny from all
>
>
>I'm using php-4.2.3 (compiled with apxs2) and apache-2.0.41-dev. The
>PHP module *is* being loaded in another included file, but it doesn't
>matter if I put the above in an external file or in httpd.conf itself.
>
It looks fine to me (I'm no expert), but maybe its case sensitive? You 
have  rather than . Otherwise perhaps remove the 
 completely for a test to see if it is the  causing 
the problem.

HTH
Chris



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




Re: [PHP] file uploads problem

2002-09-24 Thread Marek Kilimajer

What I don't understand is how can your webserver create a file and then 
not to have permission to read it.
What is your setup?

Jaski wrote:

> No Edwin .. I can't do any thing to that file .. not even from my ftp 
> client .. can't download can't change permissions ..
>
> The server is managed by rackspace .. I doubt they would do some thing 
> like running apache as root which I "hear" is a v foolish thing to do  
> (frankly I don't know how to figure it out myself ..if that is the 
> case .. phpinfo() did not say any thing on that.)
>
> A brief restatement of problem
>
> File uploaded via HTTP POST to /tmp  OK
>
> After this I tried the following three things and none worked.
>
> a) fopen("/tmp/temp_file_name","rb")  FAILED (Operation not permitted)
> b) copy($tempfile, "/place/to/put/uploaded/file") FAILED
> c) move_uploaded_file($userfile, "/place/to/put/uploaded/file") DID 
> COPY BUT file had -rw permissions, and could not open this 
> file either... so back to square 1
>
> The directory in "/place/to/put/uploaded/file is mode 777 .
>
>
> Still fighting it out.
> Regards
> Jaski
>
>
>
> On Tue, 24 Sep 2002 @ Edwin wrote :
>
>> Just a comment...
>>
>> On Tuesday, September 24, 2002 1:39 PM
>> Jaski wrote:
>> 
>> > I tried to copy this file using
>> > move_uploaded_file($userfile, "/place/to/put/uploaded/file");
>> >
>> > and here a strange thing happened. The file was successfully
>> > copied BUT it had permissions like -rw-- which I interpret as
>> > only accessible to root. I tried copy() function instead and it
>> > failed.
>> >
>>
>> ...having that "permission" doesn't necessarily mean that it's only
>> accessible to root--unless of course you're running Apache as root, 
>> which I
>> doubt you'd do.
>>
>> Anyway, if the file was successfully copied why not just try to open it
>> there?
>>
>> - E
>
>
>


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




[PHP] Warning: could not load/open font in php-4.1.2 and gd-1.8.4

2002-09-24 Thread Bobos, Mihai

hello,
I installed Redhat 7.3 yesterday and now my php graphs are not working
anymore...
it says : Warning: could not load/open font in $filename line xxx...when I
try to use any ttf text function, and that it has no support for freetype 2
when i try to use tf text functions...

my config:

Redhat 7.3 clean install
php-4.1.2-7
gd-1.8.4-4
freetype-2.0.9-2

I tried all things I could find on the net: absolute and relative path, give
name of the font with or without .ttf, anything...
it just doesn't work...
the only functions that work are imagestring and imagechar...
imagettftext and imagettfbbox are not working...

can anyone please give some help?

thank you very much,

Mihai Bobos 
System Engineer 
EBS Romania S.R.L. 
Str. Pavel Rosca No. 9
RO-3400 Cluj-Napoca
Tel: (+)40.264.406.459
(+)40.264.406.460
Fax: (+)40.264.406.461
Email: [EMAIL PROTECTED] 
URL: www.ebsromania.ro


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




[PHP] why manual says 'don't use session_register'?

2002-09-24 Thread Giancarlo Pinerolo

The manual has many cautions that say 'do not use session_regiister,,
session_is_registered, session_unregister, when the ini setting is
register_globals=off.

But they still do work, it seems. 
Or how exactly  do these function work differently than with reg_globals
On?
Can I still continue to use them with reg_globals=off, as they seem to
work anyway?

Gian

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




Re: [PHP] Create login procedure...

2002-09-24 Thread Justin French

on 24/09/02 7:20 PM, Christian Ista ([EMAIL PROTECTED]) wrote:

> Hello,
> 
> I change the procedure to create an account for users. For the moment,
> the user (to create and log in), have to create an account with e-mail +
> password. I'd like to create a procedure to check the e-mail (login)
> validity. But I'd like to check if the e-mail used exist or not.
> 
> The procedure, I'd like implement :
> 1. User create new account (enter : fisrt name, last name, e-mail,
> password, )

yup
 
> 2. An e-mail is send to user to check if e-mail exist. In the e-mail, my
> first idea is to send with an auto-generated number

i generate a random 5 digit number before inserting into the DB.  I then
insert the information WITH the confirm code as one colum.

i then obtain the ID of the row I just inserted into the users table, and
then i send an email with a link like:

'to confirm your membership, please click on this link (or copy into your
browser).
http://site.com/confirm.php?id=45&code=12856'

They click on the link, and if the confirm code matches for the right ID,
then we're confirmed.  I change the confcode column to 1, and use this as a
test to ensure a user is confirmed.

not bullet proof, but a good start.

make sure the link is short, to avoid line wrapping etc...


> 3. User have to join a specific page to enter the auto-generated number
> to check the validity.

Yup

> My question are :
> 1. What do you think about this procedure ? your advise, idea are welcome

see above... in theory, good start.

> 2. Is it possible with mySQL to delete user after for example 2 days, if
> the user not confirm the subscription ?

to AUTOMATE a procedure on the server, you need a cron job (unix) or
scheduled task (win).  another option is to have a clean-out tool as part of
your admin tools... just a simple link you click on every so-often which
looks for unconfirmed users more than X hours old.  The way to check this
would be to ensure you insert a time stamp of some description as a column
of your user table (stamp_added) for example.

whether you automate it, or clean out manually every few days, the thoery is
the same.


your user table might look something like:

id|email|first|last|pass|confcode|stampadded|stamplastlogin

or you mgiht choose to split stuff like stampAdded, stampLastLogin, and even
the confirmation code into separate relational tables...


Justin


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




Re: [PHP] why manual says 'don't use session_register'?

2002-09-24 Thread Justin French

if you have register globals off, then use the $_SESSION array.

// set the value of a session var:
$_SESSION['foo'] = "bah";

// test to see if a session var is set
if(isset($_SESSION['foo'])) { ... }

// unset / unregister a session var
unset($_SESSION['foo']);


The older functions still work, but are not reliable, according to the
manual.

I much prefer working with $_SESSION, because session_register() was a
little counter-intuitive (IMO), and now doesn't work like the rest of the
superglobal arrays ($_POST, $_GET, etc).


If you have register globals off, I recommend working the new way.


Justin French


on 24/09/02 6:37 PM, Giancarlo Pinerolo ([EMAIL PROTECTED]) wrote:

> The manual has many cautions that say 'do not use session_regiister,,
> session_is_registered, session_unregister, when the ini setting is
> register_globals=off.
> 
> But they still do work, it seems.
> Or how exactly  do these function work differently than with reg_globals
> On?
> Can I still continue to use them with reg_globals=off, as they seem to
> work anyway?
> 
> Gian


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




[PHP] Re: why manual says 'don't use session_register'?

2002-09-24 Thread Erwin

Giancarlo Pinerolo wrote:
> The manual has many cautions that say 'do not use session_regiister,,
> session_is_registered, session_unregister, when the ini setting is
> register_globals=off.
>
> But they still do work, it seems.
> Or how exactly  do these function work differently than with
> reg_globals On?
> Can I still continue to use them with reg_globals=off, as they seem to
> work anyway?

If you have register_globals set to off, the $_SESSION array is defined.

The functions session_is_registered, session_unregister and session_register
use the session file, not the $_SESSION array. That means that the function
session_unregister or session_register affects the session file, but not the
$_SESSION array!

That can lead to unwanted results if you check that value later on (in the
same php file). If you use unset($_SESSION['key']) instead of
session_unregister('key'), the value will be removed from the $_SESSION
array AND from the session file.

I recommend following the manual and don't use the session_unregister,
session_is_registered and session_register functions anymore.

HTH
Erwin


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




Re: Re: [PHP] file uploads problem

2002-09-24 Thread @ Edwin
Jaski,

On Tuesday, September 24, 2002 5:07 PM
Jaski wrote:
> No Edwin .. I can't do any thing to that file .. not even from my
> ftp client .. can't download can't change permissions ..
>

I think you won't be able to do anything with the file IF you use your ftp
client. The reason is because *you* don't own the file so you can't read it
nor change it's permissions. Your *script(s)* owns the file so most probably
if you use another script to read and change the permissions, the script
would be able to do it. In other words, use your php script to read and
change the permissions. Perhaps, you'd like to play with these functions and
see what's happening...

  http://www.php.net/manual/en/function.is-readable.php
  http://www.php.net/manual/en/function.fileperms.php
  http://www.php.net/manual/en/function.chown.php

Of course, there's a lot more others under

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

HTH,

- E

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


Re: [PHP] Create login procedure...

2002-09-24 Thread Marek Kilimajer



Christian Ista wrote:

>Hello,
>
>I change the procedure to create an account for users. For the moment, 
>the user (to create and log in), have to create an account with e-mail + 
>password. I'd like to create a procedure to check the e-mail (login) 
>validity. But I'd like to check if the e-mail used exist or not.
>
>The procedure, I'd like implement :
>1. User create new account (enter : fisrt name, last name, e-mail, 
>password, )
>
>2. An e-mail is send to user to check if e-mail exist. In the e-mail, my 
>first idea is to send with an auto-generated number
>
>3. User have to join a specific page to enter the auto-generated number 
>to check the validity.
>
>
>My question are :
>1. What do you think about this procedure ? your advise, idea are welcome
>2. Is it possible with mySQL to delete user after for example 2 days, if 
>the user not confirm the subscription ?
>
>Bye
>
For automatic deletion use some code that gets executed only once in a 
hundred ( or tousend, milions, depending on hits/day)

>
>
>  
>


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




Re: Re: [PHP] file uploads problem

2002-09-24 Thread @ Edwin
Oops, what I wanted to post was

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

and not

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

- E

On Tuesday, September 24, 2002 6:00 PM
@ Edwin wrote:

> Jaski,
>
> On Tuesday, September 24, 2002 5:07 PM
> Jaski wrote:
> > No Edwin .. I can't do any thing to that file .. not even from my
> > ftp client .. can't download can't change permissions ..
> >
>
> I think you won't be able to do anything with the file IF you use your ftp
> client. The reason is because *you* don't own the file so you can't read
it
> nor change it's permissions. Your *script(s)* owns the file so most
probably
> if you use another script to read and change the permissions, the script
> would be able to do it. In other words, use your php script to read and
> change the permissions. Perhaps, you'd like to play with these functions
and
> see what's happening...
>
>   http://www.php.net/manual/en/function.is-readable.php
>   http://www.php.net/manual/en/function.fileperms.php
>   http://www.php.net/manual/en/function.chown.php
>
> Of course, there's a lot more others under
>
>   http://www.php.net/manual/en/ref.filesystem.php
>
> HTH,
>
> - E
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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


[PHP] error compiling apache2 on cobalt libgdbm error

2002-09-24 Thread electroteque

libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
make[1]: Leaving directory `/home/src/httpd-2.0.40'

what could be the problem



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




[PHP] domxml and setting the DOCTYPE

2002-09-24 Thread Raphael Bauduin

Hi, 

I'm generating XML files with the domxml functions. Everything works fine, 
but I can't set the . 

I tried to add a textnode, but <>" are translate in < > " :(


Thanks for your help.

Raph


PS:Having some troubles to send on the ML, I send this through the news 
server (excuse if you get my request two times)

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




[PHP] Q: PHP and UTF-16 support?

2002-09-24 Thread Heiko Nardmann

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Is there any UTF-16 support out there for PHP?

We need an XML parser which supports both UTF-8 and UTF-16.

- -- 
Heiko Nardmann (Dipl.-Ing.), [EMAIL PROTECTED], Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iEYEARECAAYFAj2QPKsACgkQpm53PRScYyjDpQCeNIX3djnBXhAxOl9uSDO2Wfsw
wGkAn3ZW7dOInm4nx2K5kaYdf8FnVA3h
=vjG0
-END PGP SIGNATURE-


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




[PHP] freetype - could not open font problem

2002-09-24 Thread andy

Hi there,

I am trying to use freetype, but do always get the message

Warning: Could not find/open font in test.php on line 18

The font is available and ok. I double checked it.

What could cause this error exept of the given reason? I am trapped ;-)

Thanx for any help on that.

Andy



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




RE: [PHP] SQL : left join from multiple tables

2002-09-24 Thread Jay Blanchard

[snip]
"select a.name, b.department, c.position
from emp a
left join dept b
on a.staffno = b.staffno
left join position c
on a.staffno = c.staffno
where staffno = $staffno";

I know the statement above is totally wrong. I'm just hoping u guys can
understand what i'm trying to achieve from it.
[/snip]

All you have to change to make this right is change the ON statement after
'left join position c' to 'on b.staffno = c.staffno'. Remember that you are
moving from left to right in the join, so your ON must also move from left
to right.

HTH!

Jay



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




RE: [PHP] SQL : left join from multiple tables

2002-09-24 Thread Jay Blanchard

[snip]
[snip]
"select a.name, b.department, c.position
from emp a
left join dept b
on a.staffno = b.staffno
left join position c
on a.staffno = c.staffno
where staffno = $staffno";

I know the statement above is totally wrong. I'm just hoping u guys can
understand what i'm trying to achieve from it.
[/snip]

All you have to change to make this right is change the ON statement after
'left join position c' to 'on b.staffno = c.staffno'. Remember that you are
moving from left to right in the join, so your ON must also move from left
to right.
[/snip]

I also just realized that your where statement may be too ambiguous, so
change it (again think from left to right) to 'where a.staffno = $staffno'.
Since a.staffno should match b.staffno should match c.staffno.

HTH!

Jay



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





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




RE: [PHP] ADOdb

2002-09-24 Thread Steve Bradwell

One thing that has helped me was to write a db class and use it to connect
to mysql, then all you have to do is change the class, and not all your code
when you change the db.
-Steve

-Original Message-
From: Brendon G [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 4:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] ADOdb


Just curious as to what the general consensus of opinion is on the following
class.  Do many of you use it?.
http://php.weblogs.com/ADOdb

Coming over to PHP from ASP (I'm not really interested in learning .Net at
the moment) I like that I can switch databases allot faster if the need
occurs by using ADOdb.  If I had written code just using MySQLconnect I'd
have a hell of a time in the future.

Cheers

Brendon


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

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




[PHP] impossible in php?

2002-09-24 Thread andy

Hi there,

I am trying to do something real dynamic. It looks like this is impossible
in php because the parser would not work for the two cases.

Following idea.
- Create a dynamic image ( a card with a given text inside). I call it
v-card.jpg and a .htaccess file takes care that the .jpg is parsed via php
So the v-card.jpg is a php file outputting a jpg. This workes pretty good.

- Create a pdf with lots of this v-cards inside. The function works with
images from the filesystem, but not with the dynamic v-card.jpg image.

Now I am wondering if this is possible in php, since both files are parsed
in the same time. Maybe there is a work around or any hint you could give
me. I am kind off stuck.

Thanx in advance,

Andy




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




RE: [PHP] freetype - could not open font problem

2002-09-24 Thread Matt Schroebel

> From: andy [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, September 24, 2002 7:29 AM
> Subject: [PHP] freetype - could not open font problem
 
> I am trying to use freetype, but do always get the message
> 
> Warning: Could not find/open font in test.php on line 18
> 
> The font is available and ok. I double checked it.
> 
> What could cause this error exept of the given reason? I am 
> trapped ;-)
> 
> Thanx for any help on that.
> 
> Andy

When I've done this, I put the ttfs in /usr/local/fonts/ttf
Then I defined a const for the dir,
define('FONTDIR','/usr/local/font/ttf/') 
And used concat to build the absolute path:
$font = FONTDIR . 'arial.ttf';
You can uses file_exists() to make sure it's not a permissions problem

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




RE: [PHP] impossible in php?

2002-09-24 Thread Jay Blanchard

[snip]
Following idea.
- Create a dynamic image ( a card with a given text inside). I call it
v-card.jpg and a .htaccess file takes care that the .jpg is parsed via php
So the v-card.jpg is a php file outputting a jpg. This workes pretty good.

- Create a pdf with lots of this v-cards inside. The function works with
images from the filesystem, but not with the dynamic v-card.jpg image.

Now I am wondering if this is possible in php, since both files are parsed
in the same time. Maybe there is a work around or any hint you could give
me. I am kind off stuck.
[/snip]

Have you checked out FPDF (http://www.fpdf.org)? It may be just what you are
looking for as it seems you could combine the code with the dynamic v-vard
image.

HTH!

Jay



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




Re: Re: Re: [PHP] file uploads problem

2002-09-24 Thread Jaski

Thanks Edwin .. this one was Bang On. It was exactly what you said 
.. and now it works .. thanks a lot.

Jaski

On Tue, 24 Sep 2002 @ Edwin wrote :
>Jaski,
>
>On Tuesday, September 24, 2002 5:07 PM
>Jaski wrote:
> > No Edwin .. I can't do any thing to that file .. not even from 
>my
> > ftp client .. can't download can't change permissions ..
> >
>
>I think you won't be able to do anything with the file IF you use 
>your ftp
>client. The reason is because *you* don't own the file so you 
>can't read it
>nor change it's permissions. Your *script(s)* owns the file so 
>most probably
>if you use another script to read and change the permissions, the 
>script
>would be able to do it. In other words, use your php script to 
>read and
>change the permissions. Perhaps, you'd like to play with these 
>functions and
>see what's happening...
>
>   http://www.php.net/manual/en/function.is-readable.php
>   http://www.php.net/manual/en/function.fileperms.php
>   http://www.php.net/manual/en/function.chown.php
>
>Of course, there's a lot more others under
>
>   http://www.php.net/manual/en/ref.filesystem.php
>
>HTH,
>
>- E


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




Re: [PHP] SQL : left join from multiple tables

2002-09-24 Thread Chris Hewitt

Faisal,

I'd check the documentation CDs for Oracle 9i. Oracle 8 does not use the 
"join" or "left" keywords but a plus sign in parenthesis "(+)" whose 
position determines whether it is a left or right join. It may not be 
SQL2 but its Oracle.

HTH
Chris

Marek Kilimajer wrote:

> Well, this would work in MySQL, I have even more LEFT JOINs, so go 
> find out if it is possible with Oracle.
>
> Faisal Abdullah wrote:
>
>> Hi again people! How's it goin?
>>
>> Here's the question
>> How do I do left joins from multiple tables?
>> I want to do something like this:
>>
>> "select a.name, b.department, c.position
>> from emp a
>> left join dept b
>> on a.staffno = b.staffno
>> left join position c
>> on a.staffno = c.staffno
>> where staffno = $staffno";
>>
>> I know the statement above is totally wrong. I'm just hoping u guys can
>> understand what i'm trying to achieve from it.
>>
>> By the way, this is on Oracle 9i, but I guess ANSI would be fine.
>> Thanks again.
>>
>> Sincerely,
>> Faisal
>>
>> __
>>
>>
>>  
>>
>
>




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




RE: [PHP] in a logic loop!

2002-09-24 Thread Naintara Jain

Thank you Chris.

I agree with you wholeheartedly that the SQL should be optimized.
Now, I don't want to freeload on your time, but I have a very complex query,
which I have been pondering over for the last many days.
If anyone can tell me what query will return just one row for the problem I
have, s/he will be SQL Guru to me.

My problem is:
I have 3 tables (given below). A member of the staff takes courses and for
each course he has requirement id, these details get stored in the
staff_courses table. Each course taken will have a requirement specification
which could be any of 4 values given below (after the reqs table). I need to
get totals for each requirement for each member of the staff. I am using
MySQL (and cannot use sub-queries). I have been able to get the requirement
totals for each member using Group By reqid, but I get a separate row for
each requirement against the member of staff. So if a member has taken 3
courses, and one course has a reqid of 0 and the other two courses have a
reqid of 1, I get 2 rows in the result set for that staffid, one will
contain the reqid 0 and total as 1, while the second row will contain the
reqid as 1 and the total as 2.

Can I get the totals for each requirement in one row and can I do this in
one query?

1)"staff" table
staffid
branchid

2)"staff_courses" table
courseid
staffid
reqid

3)"reqs" table
reqid
requirement

contains the
reqid  requirement
0 No action
1 Primary requirement
2 Further requirement
3 Completed



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Chris Hewitt
Sent: Tuesday, September 24, 2002 1:49 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] in a logic loop!


Naintara Jain wrote:

>What I am doing is:
>I maintain a set of details in say $prev_row (previous row) and another in
>cur_row (current row).
>The minute my cur_row detail (one unique id) doesn't match the prev_row
>detail, I print out all the previous row details, and reinitialize the
>various variables (all in a loop).
>
>This works fine for all cases but fails for the last ID, because of the
>logic used. Do I need to create a special case for the last one, or can
>anyone suggest a better way?
>
When you come out of your loop, either there will be one row left to
print, or there were no matching rows. Suggestion one is to test for
this and if there were matching rows, do a special case for the last row.

Alternatively, you are printing a row when the ID changes, that is, the
last row of the 1 to 3 matching rows. Why not print the first one, not
last one? You change the logic
to print the first row then ignore others with the same ID. It could be
that (because of an Order By clause) the last row is the correct one and
the data may differ between rows with the same ID.

You say you do not want to do it in the SQL statement itself, but this
really is the right place. If MySQL use a LIMIT clause to only get one
row, if you cannot refine the SQL statement to only retrieve one row.

HTH
Chris




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





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




Re: [PHP] in a logic loop!

2002-09-24 Thread Justin French

SELECT DISTINCT * FROM table WHERE .

Check out the MySQL manual for more help, or post yout existing query for me
to gawk at :)

HTH
Justin


on 24/09/02 11:24 PM, Naintara Jain ([EMAIL PROTECTED]) wrote:

> Thank you Chris.
> 
> I agree with you wholeheartedly that the SQL should be optimized.
> Now, I don't want to freeload on your time, but I have a very complex query,
> which I have been pondering over for the last many days.
> If anyone can tell me what query will return just one row for the problem I
> have, s/he will be SQL Guru to me.
> 
> My problem is:
> I have 3 tables (given below). A member of the staff takes courses and for
> each course he has requirement id, these details get stored in the
> staff_courses table. Each course taken will have a requirement specification
> which could be any of 4 values given below (after the reqs table). I need to
> get totals for each requirement for each member of the staff. I am using
> MySQL (and cannot use sub-queries). I have been able to get the requirement
> totals for each member using Group By reqid, but I get a separate row for
> each requirement against the member of staff. So if a member has taken 3
> courses, and one course has a reqid of 0 and the other two courses have a
> reqid of 1, I get 2 rows in the result set for that staffid, one will
> contain the reqid 0 and total as 1, while the second row will contain the
> reqid as 1 and the total as 2.
> 
> Can I get the totals for each requirement in one row and can I do this in
> one query?
> 
> 1)"staff" table
> staffid
> branchid
> 
> 2)"staff_courses" table
> courseid
> staffid
> reqid
> 
> 3)"reqs" table
> reqid
> requirement
> 
> contains the
> reqid  requirement
> 0 No action
> 1 Primary requirement
> 2 Further requirement
> 3 Completed
> 
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> t]On Behalf Of Chris Hewitt
> Sent: Tuesday, September 24, 2002 1:49 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] in a logic loop!
> 
> 
> Naintara Jain wrote:
> 
>> What I am doing is:
>> I maintain a set of details in say $prev_row (previous row) and another in
>> cur_row (current row).
>> The minute my cur_row detail (one unique id) doesn't match the prev_row
>> detail, I print out all the previous row details, and reinitialize the
>> various variables (all in a loop).
>> 
>> This works fine for all cases but fails for the last ID, because of the
>> logic used. Do I need to create a special case for the last one, or can
>> anyone suggest a better way?
>> 
> When you come out of your loop, either there will be one row left to
> print, or there were no matching rows. Suggestion one is to test for
> this and if there were matching rows, do a special case for the last row.
> 
> Alternatively, you are printing a row when the ID changes, that is, the
> last row of the 1 to 3 matching rows. Why not print the first one, not
> last one? You change the logic
> to print the first row then ignore others with the same ID. It could be
> that (because of an Order By clause) the last row is the correct one and
> the data may differ between rows with the same ID.
> 
> You say you do not want to do it in the SQL statement itself, but this
> really is the right place. If MySQL use a LIMIT clause to only get one
> row, if you cannot refine the SQL statement to only retrieve one row.
> 
> HTH
> Chris
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 


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




[PHP] Re: domxml and setting the DOCTYPE

2002-09-24 Thread Raphael Bauduin

Please, don't tell me I can't set the doctype with php!?
Will I have to user a 3 liner in perl to set the doctype? :(

Raph


Raphael Bauduin wrote:

> Hi,
> 
> I'm generating XML files with the domxml functions. Everything works fine,
> but I can't set the .
> 
> I tried to add a textnode, but <>" are translate in < > " :(
> 
> 
> Thanks for your help.
> 
> Raph
> 
> 
> PS:Having some troubles to send on the ML, I send this through the news
> server (excuse if you get my request two times)


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




RE: [PHP] in a logic loop!

2002-09-24 Thread Naintara Jain

sweet solution.
:)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Marek Kilimajer
Sent: Tuesday, September 24, 2002 1:44 PM
To: PHP
Subject: Re: [PHP] in a logic loop!


Do it after the loop finishes

while( ){

if( something ) {
print out;
reinicialize
}
}

print out

Naintara Jain wrote:

>I have a logic problem:
>
>I have a complicated query. The main thing is that I have an ID, and for a
>particular ID, I may have  between 1 to 3 rows returned. The rows returned
>are variable, that is for 1 particular ID there might just be 1 row and at
a
>later time it may have 3 rows.
>
>But what I need to do is print only one row for a particular ID. Please do
>not suggest I do it through SQL itself, because it's after using various
>aggregate functions that I have arrived at the min. result set. I need the
>logic clarified, because it has me stumped. It will be simple for a
>clear-thinking individual.
>
>What I am doing is:
>I maintain a set of details in say $prev_row (previous row) and another in
>cur_row (current row).
>The minute my cur_row detail (one unique id) doesn't match the prev_row
>detail, I print out all the previous row details, and reinitialize the
>various variables (all in a loop).
>
>This works fine for all cases but fails for the last ID, because of the
>logic used. Do I need to create a special case for the last one, or can
>anyone suggest a better way?
>
>-Thanks
>Naintara
>
>
>
>
>


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





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




[PHP] RE: Maybe a stupid question but can it be done?

2002-09-24 Thread Tim Ward

the ID field in the first table can be an auto-increment field and 
the second table needs to have an ID INT field that is not auto increment.
Insert into the first table, use mysql_insert_id() (or whatever it is) to
get the auto incremented value and then do your second insert using that
value for the ID field.

Tim
www.chessish.com

> -Original Message-
> From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]]
> Sent: 24 September 2002 02:45
> To: PHP General
> Subject: Maybe a stupid question but can it be done?
> 
> 
> Ok, Let's try this again, for some reason this didn't post 
> from early today.
> 
> I have db that has two tables that I am needing to post the 
> same information
> into both tables, I can't use ID. So I am want to see if 
> there is a sql
> statement that will let me or how I can do with a php page.
> 
> I am sorry to ask, I have looked around to see if there any 
> on the net or in
> my mysql and php books but this seems like a weird task.
> 
> Chuck Payne
> Magi Design and Support
> 
> 

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




[PHP] Q: how to parse HTTP POST best?

2002-09-24 Thread Heiko Nardmann

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I know that PHP just sets variables according to the FORM that then can be 
accessed easily.

But what to do if I receive a POST request like the following:

- ---
POST  HTTP/1.0
Content-Type: application/ocsp-request
Content-Length: 120

MFgwVjBUMFIwOzAJBgUrDgMCGgUABBQzoRkh0+f50398o9lLy4xGpS
XcXgQUAgMEBQYHCAkQERITFBUWFxgZICECAgOEoBMwETAPBgUrJAgDCQEB/wQDAQH/
- ---

How do I access the separate parts of such a request?

- -- 
Heiko Nardmann (Dipl.-Ing.), [EMAIL PROTECTED], Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iEYEARECAAYFAj2Qci0ACgkQpm53PRScYyinVACg80G90bj0K5ji/IxBvoZp2jUm
q6sAnRe65NK3d0hon4SQXuu3zsHrnRWV
=Wy35
-END PGP SIGNATURE-


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




[PHP] PEAR or not PEAR

2002-09-24 Thread Joshua E Minnie

Hey all,

I was reading an article at PHPBuilder.com (not very recent, 01/15/2001)
about PEAR DB, and was wondering if anyone had any experience using PEAR
rather than the functions dedicated specifically to each type of DB (i.e.
mysql_, mssql_, pg_, msql_, etc.).  Also, if anyone has any reasons why to
go with one or the other.

The reason I ask, is because I recently downloaded QuerySim so I could
simulate my db info while the db is still in development and not have to
slow down the process.  QuerySim uses PEAR DB functions, and after the db
development is finished it is an easy conversion.  Simply change the line
that tells which db is being accessed.

[code snippet]
$db = DB::connect( "mssql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MSSQL
$db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" ); // for MySQL
//instead of

$conn = DB::connect('querysim');
[/code snippet]

And my querys would still remain relatively the same.  I hope you can shed
some light on this because I am not really sure which one to use.


--
Joshua E Minnie
Advantage Computer Services, LLC
Senior Project Manager
[EMAIL PROTECTED]
Phone: 269.276.9690
Fax: 269.342.8750

"Don't work for recognition, but always do work worthy of recognition."



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




[PHP] Resource for locating user-written functions?

2002-09-24 Thread paul wilczynski

Does anyone know of a net resource which lists user-written PHP
functions available for download?


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




RE: [PHP] Warning: could not load/open font in php-4.1.2 and gd-1.8.4

2002-09-24 Thread Bobos, Mihai

kinda strange...

Mine is like this

GD Support  enabled
GD Version  1.6.2 or higher
FreeType Supportenabled
FreeType Linkagewith freetype
JPG Support enabled
PNG Support enabled
WBMP Supportenabled

I have gd-1.8.4 and freetype-2.0.9-2

what should I do?

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




[PHP] Re: Resource for locating user-written functions?

2002-09-24 Thread Joshua E Minnie

You might check out http://wildelement.users.phpclasses.org/

--
Joshua E Minnie
Advantage Computer Services, LLC
Senior Project Manager
[EMAIL PROTECTED]
Phone: 269.276.9690
Fax: 269.342.8750

"Don't work for recognition, but always do work worthy of recognition."
"Paul Wilczynski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anyone know of a net resource which lists user-written PHP
> functions available for download?
>



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




Re: [PHP] Re: domxml and setting the DOCTYPE

2002-09-24 Thread Marek Kilimajer

Don't know much about DOM, but it seems you can use dump_mem() to dump 
the xml into a string, and then replace your first line

Raphael Bauduin wrote:

>Please, don't tell me I can't set the doctype with php!?
>Will I have to user a 3 liner in perl to set the doctype? :(
>
>Raph
>
>
>Raphael Bauduin wrote:
>
>  
>
>>Hi,
>>
>>I'm generating XML files with the domxml functions. Everything works fine,
>>but I can't set the .
>>
>>I tried to add a textnode, but <>" are translate in < > " :(
>>
>>
>>Thanks for your help.
>>
>>Raph
>>
>>
>>PS:Having some troubles to send on the ML, I send this through the news
>>server (excuse if you get my request two times)
>>
>>
>
>
>  
>


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




Re: [PHP] right name for

2002-09-24 Thread Andreas Hasenack

Em Tue, Sep 24, 2002 at 08:59:54AM +0100, Chris Hewitt escreveu:
> It looks fine to me (I'm no expert), but maybe its case sensitive? You 
> have  rather than . Otherwise perhaps remove the 
>  completely for a test to see if it is the  causing 
> the problem.

It's not the IfModule, already tried that :)

Someone at the apache list told me that the name would be sapi_apache2.c,
because that's where the STANDARD20_MODULE_STUFF define is used. But
sapi_apache2.c didn't work either.


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




Re: [PHP] Re: domxml and setting the DOCTYPE

2002-09-24 Thread Raphael Bauduin

thanks for your answer. I hoped there was a function to specify the doctype 
of the document generated. Apparently there isn't. It's as sad thing as I 
have to create another script just to add the doctype. 

Can someone just confirm me it's not possible with php to do what I want?

I find it strange you can read the doctype but not set it.

Raph

Marek Kilimajer wrote:

> Don't know much about DOM, but it seems you can use dump_mem() to dump
> the xml into a string, and then replace your first line
> 
> Raphael Bauduin wrote:
> 
>>Please, don't tell me I can't set the doctype with php!?
>>Will I have to user a 3 liner in perl to set the doctype? :(
>>
>>Raph
>>
>>
>>Raphael Bauduin wrote:
>>
>>  
>>
>>>Hi,
>>>
>>>I'm generating XML files with the domxml functions. Everything works
>>>fine, but I can't set the .
>>>
>>>I tried to add a textnode, but <>" are translate in < > " :(
>>>
>>>
>>>Thanks for your help.
>>>
>>>Raph
>>>
>>>
>>>PS:Having some troubles to send on the ML, I send this through the news
>>>server (excuse if you get my request two times)
>>>
>>>
>>
>>
>>  
>>


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




RE: [PHP] error compiling apache2 on cobalt libgdbm error

2002-09-24 Thread Jesse Cablek

electroteque  scribbled;
> 
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> make[1]: Leaving directory `/home/src/httpd-2.0.40'
> 
> what could be the problem

It looks like a gdb issue.
It also looks like an Apache issue, and I don't remember subscribing to
the Apache list.

Maybe you'll want to go to http://httpd.apache.org or do a simple web
search?

-jesse


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




[PHP] Problems with variables and PHP/HTML

2002-09-24 Thread Ed Curtis

I am currently using Apache 1.3.26 and PHP 4.2.3 on a Linux box running
Kernel 2.0.36

My trouble is in passing variable from within a form submission or within a
URL.
I can get a From submission to work if I declare the variable and resubmit
it to another variable name.

I.E. form field name = username passed to readform.php
   in readform.php $username = $_POST['username']

 I can then user $username

Used to be you could just use $username as a variable if it was passed from
a form to another script.

Now I have $username defined and useable but if I try to add it to a URL
such as:



It becomes a null value or doesn't get passed at all.

I thought this might have something to do with track-vars but track vars are
enabled by default in PHP since before my version. When I compiled
everything I compiled PHP as a DSO. Any ideas?

TIA,

Ed Curtis



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




Re: [PHP] error compiling apache2 on cobalt libgdbm error

2002-09-24 Thread Rasmus Lerdorf

Note that gdbm is not threadsafe, so you should only run Apache2 in
prefork mode (or simply stick with Apache 1.3).  But what does this have
to do with PHP?

On Tue, 24 Sep 2002, electroteque wrote:

> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> make[1]: Leaving directory `/home/src/httpd-2.0.40'
>
> what could be the problem
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] Crypt() =or= md5()

2002-09-24 Thread Jesse Cablek

Anthony Ritter  scribbled;
> 
> I get the following line when trying to use the crypt() function in
> php ..
> 
> Fatal error: Call to undefined function: crypt() in c:\program
> files\apache group\apache\htdocs\handleform1.php on line 16
> 
> 

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

First part of description:

"crypt() will return an encrypted string using the standard Unix
DES-based encryption algorithm or alternative algorithms that may be
available on the system."

You need crypt on Windows, good luck. Most liekly crypt() is just
disabled for Win32 port.

> 
> However, when I replace crypt() with md5() - the following script
> works fine.
> 
[...]
>

MD5 is just a hash, not encryption. I'm guessing this one is built into
PHP.

Read yourself:
http://www.php.net/manual/en/function.md5.php



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




Re: [PHP] Problems with variables and PHP/HTML

2002-09-24 Thread Justin French

set register globals to ON in your PHP.ini for this to work, although I'd
highly recommend doing what you already are doing...

$username = $_POST['username'];

It's a LOT more secure.


Justin


on 25/09/02 12:50 AM, Ed Curtis ([EMAIL PROTECTED]) wrote:

> I am currently using Apache 1.3.26 and PHP 4.2.3 on a Linux box running
> Kernel 2.0.36
> 
> My trouble is in passing variable from within a form submission or within a
> URL.
> I can get a From submission to work if I declare the variable and resubmit
> it to another variable name.
> 
> I.E. form field name = username passed to readform.php
> in readform.php $username = $_POST['username']
> 
> I can then user $username
> 
> Used to be you could just use $username as a variable if it was passed from
> a form to another script.
> 
> Now I have $username defined and useable but if I try to add it to a URL
> such as:
> 
> 
> 
> It becomes a null value or doesn't get passed at all.
> 
> I thought this might have something to do with track-vars but track vars are
> enabled by default in PHP since before my version. When I compiled
> everything I compiled PHP as a DSO. Any ideas?
> 
> TIA,
> 
> Ed Curtis
> 
> 


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




Re: [PHP] error compiling apache2 on cobalt libgdbm error

2002-09-24 Thread electroteque

excuse me sorry wrong list i have many open i havent even begun with the php
install yet

"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Note that gdbm is not threadsafe, so you should only run Apache2 in
> prefork mode (or simply stick with Apache 1.3).  But what does this have
> to do with PHP?
>
> On Tue, 24 Sep 2002, electroteque wrote:
>
> > libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> > libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
> > make[1]: Leaving directory `/home/src/httpd-2.0.40'
> >
> > what could be the problem
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Re: [PHP] right name for

2002-09-24 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
Try this:

AllowOverride None
order deny,allow
Deny from all
Allow from 127.0.0.1

php_flag engine on
php_value include_path ".:/srv/www/default/html/acid/config"



order deny,allow
deny from all


What exactly is not working?
Did you check to see if the engine is turned on?
If it is not then try "php_admin_flag engine on". Why are you turning the 
engine on? Is it disabled everywhere else? The include path should have 
double quotes surrounding it and the paths in  should not.
HTH!
~Pauly

On Monday 23 September 2002 03:23 pm, Andreas Hasenack wrote:
> What is the right name to use in apache's (2.0.41-dev) IfModule
> directive to test if the php4 module is loaded? I'm including
> the file below via httpd.conf's Include statement but the
> part between the IfModule is being completely ignored:
>
> 
> AllowOverride None
> order deny,allow
> Deny from all
> Allow from 127.0.0.1
> 
> php_flag engine on
> php_value include_path '.:/srv/www/default/html/acid/config'
> 
> 
>
> 
> order deny,allow
> deny from all
> 
>
> I'm using php-4.2.3 (compiled with apxs2) and apache-2.0.41-dev. The
> PHP module *is* being loaded in another included file, but it doesn't
> matter if I put the above in an external file or in httpd.conf itself.

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9kH/YDyXNIUN3+UQRAttcAJ0QvCFk1A3K2bkZlJnPTPx6ue1xBwCfW4/8
irAOPOcmuuB1AZ6mEtJ6Cns=
=QiPE
-END PGP SIGNATURE-

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




Re: [PHP] MySQL vs. basic text file

2002-09-24 Thread drparker

ok - thanks for all the replies.  it looks like there are no real
drawbacks and plently of advantages in using MySQL instead of text files,
so i'll do the next project with it.  one more question - is there a
concrete file that has the database in mySQL?  like a file that I could
download and view that contains the entire spreadsheet that i have
created?   

On Mon, 23 Sep 2002, John S. Huggins wrote:

> 
> I was doing this too with good old AWK CGI scripts and text data files.
> Once I imported the data into MySQL I said, "Well this is not much
> benefit."  Then I started sorting.  Then I accessed the information from a
> different application.  Then I wrote a maintenance application so my
> customer could sort, review and edit the data.  Then I started using
> multitable queries.  I am now so hooked on the database method, I have
> never looked back.
> 
> Keep up with your text data.  You will always be able to import it into
> MySQL when you are ready.  I would do ahead and migrate to a database; You
> will have a slight learning curve, but will reap many benefits.
> 
> John
> 
> On Sat, 21 Sep 2002, Doug Parker wrote:
> 
> >-often i use text files at my data sources, delimted by the "|" symbol. 
> >-i simply delimit the fields of each line, then when i need to open them, 
> >-i open the text file, populate an array with each line, then explode the 
> >-fields for each to get the corresponding values.   i use this method for 
> >-catalogs - and even backend interfaces, for which the client can 
> >-add/edit/delete products.  everything seems to be working fine, and 
> >-there doesn't seem to be a need for MySQL or anything.  i was wondering 
> >-if there is anything i'm not thinking of that perhaps would push me to 
> >-favor using php and mysql instead of the plain old text file.
> >-
> >-
> >-
> >--- 
> >-PHP General Mailing List (http://www.php.net/)
> >-To unsubscribe, visit: http://www.php.net/unsub.php
> >-
> 
> **
> 
> John Huggins
> VANet
> 
> [EMAIL PROTECTED]
> http://www.va.net/
> 
> **
> 
> 


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




Re: [PHP] right name for

2002-09-24 Thread Andreas Hasenack

Em Tue, Sep 24, 2002 at 11:08:06AM -0400, Paul Nicholson escreveu:
> What exactly is not working?

The directives inside the  branches are being ignored. Thus the
include path is not being modified and my application doesn't work. I know,
I can change the application to include the right path, but it's not mine
and I want as few patches as possible.

This means that either the module is not loaded (but it is), or I'm checking
it with the wrong name (that's what I think it is).
If I but "blablabla" inside the  no error happens. But, just for
testing, if I change mod_php4.c to mod_ssl.c (for example), which is also
being loaded, then apache won't start because of the "blablabla". So, I still
think it's the name that is wrong.

> Did you check to see if the engine is turned on?

It is on, the module is loaded. The application runs, but can't find its
include files.

> If it is not then try "php_admin_flag engine on". Why are you turning the 
> engine on? Is it disabled everywhere else? The include path should have 

Yes, it's disabled by default for the whole documentroot here. I only
enable it where I expect PHP scripts to run.

> double quotes surrounding it and the paths in  should not.
> HTH!

Thanks, will give it another try with these variations.


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




Re: [PHP] Error with file upload: "No file uploaded in Unknown online 0"

2002-09-24 Thread Marek Kilimajer

Turn off notice logging in your php.ini, just keep warnings and errors.

Jason Young wrote:

> I have some code that a user can set a description about an item to be 
> posted, and then add some image files of the item.
>
> Its a 3x3 frame of  fields, along with an 'include' 
> line for each one.. only selecting a file with the 'Browse' button, or 
> entering a website manually will trigger this include..
>
> Of course, there aren't always going to be 9 images to upload, so 
> sometimes they have to be left blank ... everytime I submit something 
> without all 9 entries filled,  I get a bunch of lines in my error log 
> like the following:
>
> [error] PHP Notice:  No file uploaded in Unknown on line 0
>
> Is there something I can do to combat this? It's quite annoying to see 
> up to 9 of these lines everytime I submit something from my page.
> I don't want to turn off all error reporting or anything like that, 
> either... I'd like to see something that'll make it a non-error.
>
> Thanks!
> -Jason Young
>
>


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




Re: [PHP] passing by reference via the variable arg list

2002-09-24 Thread Marek Kilimajer

Not possible, but workaround is to pass the variable name and use it as 
a variable variable, but for this the variable needs to be global.

Trevor Dowling wrote:

>Can anyone help with this?
>
>I am relativly new to PHP and am trying to use variable numbers of
>parameters to functions using the func_get_arg().
>However, I am unable to determine the correct syntax for passing by
>reference via the variable arg list.
>
>Trevor
>
>
>/* This Works Fine */
>function Foo($Index, &$TxtString)
>{
> $TxtString = "NewString";
>}
>
>
>/* However: how do you pass by reference using a variable number of
>parameters */
>function Foo()
>{
> if(func_get_arg(0) == 3)
> {
>  /* Can you have a variable in function foo that allows access by
>reference? */
>  $TxtString = func_get_arg(1);
>
>  $TxtString = "Second New String";
> }
>}
>
>
>function FooTest()
>{
>
> $StringTest = 'Test';
>
> Foo(2);
>
> Foo(3, $StringTest);
>
> echo ("$StringText");
>}
>
>
>
>  
>


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




[PHP] XSLT and PHP

2002-09-24 Thread Geoff

I have been impressed with using the xslt functions in php in that it
gives you the ability to separate content from presentation. Now I am
looking to streamline this technique. 

Typically I either take xml that is in a file or generated by a class
from a sql query and transform it with an xsl file. 

The great part is anything to do with content or code is completely
separate from presentation. However, if I ever need to change the
presentation (xsl files) I still have one xsl file for every "page" on
the site to edit. 

I have tried to make xsl files use includes (php includes) without much
success. I am looking into xsl includes.

What I am looking for is either a way to use includes in xsl stylesheets
or something like Fusebox layouts for xml/xsl. Thank you





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




[PHP] problems with phpPgAdmin

2002-09-24 Thread javier

Hi, I've just installed phpPgAdmin. When it comes to configuration it 
seems that everything is ok *but* the program doesn't work.

I read some files and I found this:

if (file_exists("config.inc.php")) {
 include("config.inc.php");
}
else {
 echo "Configuration Error: You must rename/copy 
config.inc.php-dist to config.inc.php and set your appropriate settings";
 exit;
}

The file exists but I don't know why the function file_exists returns false.
I also tried with another file in another dir. like index.php and I got 
the same result.

-- 
*** javier - public key: (http://leeloo.mine.nu/jcyber.sig)


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




Re: [PHP] passing by reference via the variable arg list

2002-09-24 Thread Trevor Dowling

Thought as much after some head scratching,

Thanks


"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Not possible, but workaround is to pass the variable name and use it as
> a variable variable, but for this the variable needs to be global.
>
> Trevor Dowling wrote:
>
> >Can anyone help with this?
> >
> >I am relativly new to PHP and am trying to use variable numbers of
> >parameters to functions using the func_get_arg().
> >However, I am unable to determine the correct syntax for passing by
> >reference via the variable arg list.
> >
> >Trevor
> >
> >
> >/* This Works Fine */
> >function Foo($Index, &$TxtString)
> >{
> > $TxtString = "NewString";
> >}
> >
> >
> >/* However: how do you pass by reference using a variable number of
> >parameters */
> >function Foo()
> >{
> > if(func_get_arg(0) == 3)
> > {
> >  /* Can you have a variable in function foo that allows access by
> >reference? */
> >  $TxtString = func_get_arg(1);
> >
> >  $TxtString = "Second New String";
> > }
> >}
> >
> >
> >function FooTest()
> >{
> >
> > $StringTest = 'Test';
> >
> > Foo(2);
> >
> > Foo(3, $StringTest);
> >
> > echo ("$StringText");
> >}
> >
> >
> >
> >
> >
>



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




RE: [PHP] problems with phpPgAdmin

2002-09-24 Thread Jay Blanchard

[snip]
I read some files and I found this:

if (file_exists("config.inc.php")) {
 include("config.inc.php");
}
else {
 echo "Configuration Error: You must rename/copy
config.inc.php-dist to config.inc.php and set your appropriate settings";
 exit;
}

The file exists but I don't know why the function file_exists returns false.
I also tried with another file in another dir. like index.php and I got
the same result.
[/snip]

You may have to include the full path to the included file. If
config.inc.php is in the same directory as the file which contains the above
code you should be OK. If not, you need to supply the path.

HTH!

Jay



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




[PHP] apache problem......

2002-09-24 Thread Anil Garg

hi
in my httpd.conf i have added a virtual host as:


#  General setup for the virtual host
DocumentRoot "/netvcr/www/niksun"
ServerName  niksun.com
#ServerAdmin [EMAIL PROTECTED]
ErrorLog "|/usr/local/sbin/rotatelogs /var/log/httpd-error.log 172800 10"
TransferLog "|/usr/local/sbin/rotatelogs /var/log/httpd-access.log 172800
10"


but now if  from browser i try to access "http:10.70.0.215:90" the things go
fine...but if i dont type 'http' and just type "10.70.0.215:90" in the
browser.i get the following error message:


  The page cannot be displayed
  The page you are looking for might have been removed or had its name
changed.

--

  Please try the following:

a.. Open the s: home page, and then look for links to the
information you want.

b.. If you typed the page address in the Address bar, make sure that
it is spelled correctly.


--
Can someone one tell me when this error comes.

Thanx and regards
anil
p.s. php,query,


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




Re: [PHP] Error with file upload: "No file uploaded in Unknown on

2002-09-24 Thread Jason Young

Thanks for your reply...

However, is that the ONLY way?  Shouldn't this be something that is not 
reported as an error to begin with?

But even so, what about the other Notices I might receive in regards to 
other debugging.. I have to get rid of all that, too?

Basically I'm asking if this is the only way to do it..

Thanks.
-Jason



Marek Kilimajer wrote:
> Turn off notice logging in your php.ini, just keep warnings and errors.
> 
> Jason Young wrote:
> 
>> I have some code that a user can set a description about an item to be 
>> posted, and then add some image files of the item.
>>
>> Its a 3x3 frame of  fields, along with an 'include' 
>> line for each one.. only selecting a file with the 'Browse' button, or 
>> entering a website manually will trigger this include..
>>
>> Of course, there aren't always going to be 9 images to upload, so 
>> sometimes they have to be left blank ... everytime I submit something 
>> without all 9 entries filled,  I get a bunch of lines in my error log 
>> like the following:
>>
>> [error] PHP Notice:  No file uploaded in Unknown on line 0
>>
>> Is there something I can do to combat this? It's quite annoying to see 
>> up to 9 of these lines everytime I submit something from my page.
>> I don't want to turn off all error reporting or anything like that, 
>> either... I'd like to see something that'll make it a non-error.
>>
>> Thanks!
>> -Jason Young
>>
>>
> 


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




Re: [PHP] apache problem......

2002-09-24 Thread Adam Williams

If you areusing IE you have to pu tin the http:// infront of it, its one
of those quirky IE only things.  Don't have to do that in
Mozilla/Netscape.

Adam

On Tue, 24 Sep 2002, Anil Garg wrote:

> hi
> in my httpd.conf i have added a virtual host as:
>
> 
> #  General setup for the virtual host
> DocumentRoot "/netvcr/www/niksun"
> ServerName  niksun.com
> #ServerAdmin [EMAIL PROTECTED]
> ErrorLog "|/usr/local/sbin/rotatelogs /var/log/httpd-error.log 172800 10"
> TransferLog "|/usr/local/sbin/rotatelogs /var/log/httpd-access.log 172800
> 10"
> 
>
> but now if  from browser i try to access "http:10.70.0.215:90" the things go
> fine...but if i dont type 'http' and just type "10.70.0.215:90" in the
> browser.i get the following error message:
>
> 
>   The page cannot be displayed
>   The page you are looking for might have been removed or had its name
> changed.
>
> --
>
>   Please try the following:
>
> a.. Open the s: home page, and then look for links to the
> information you want.
>
> b.. If you typed the page address in the Address bar, make sure that
> it is spelled correctly.
>
>
> --
> Can someone one tell me when this error comes.
>
> Thanx and regards
> anil
> p.s. php,query,
>
>
>


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




[PHP] Re: apache problem......

2002-09-24 Thread Jason Young

This seems to be a browser problem, as I often get similar errors when 
trying to access sites with port numbers.

That looks like an IE error.. and I know I have the same problem with 
Mozilla.


Anil Garg wrote:
> hi
> in my httpd.conf i have added a virtual host as:
> 
> 
> #  General setup for the virtual host
> DocumentRoot "/netvcr/www/niksun"
> ServerName  niksun.com
> #ServerAdmin [EMAIL PROTECTED]
> ErrorLog "|/usr/local/sbin/rotatelogs /var/log/httpd-error.log 172800 10"
> TransferLog "|/usr/local/sbin/rotatelogs /var/log/httpd-access.log 172800
> 10"
> 
> 
> but now if  from browser i try to access "http:10.70.0.215:90" the things go
> fine...but if i dont type 'http' and just type "10.70.0.215:90" in the
> browser.i get the following error message:
> 
> 
>   The page cannot be displayed
>   The page you are looking for might have been removed or had its name
> changed.
> 
> --
> 
>   Please try the following:
> 
> a.. Open the s: home page, and then look for links to the
> information you want.
> 
> b.. If you typed the page address in the Address bar, make sure that
> it is spelled correctly.
> 
> 
> --
> Can someone one tell me when this error comes.
> 
> Thanx and regards
> anil
> p.s. php,query,
> 


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




[PHP] Experiences with Zend Safe Guard?

2002-09-24 Thread J Smith


The suits at work are looking at the Zend Safe Guard and I'm just wondering 
if anybody had any experience with this new tool. Is it worth the purchase, 
and has it been worth the price?

We already have a Zend Encoder license, so we're getting a bit of price 
break for the Safe Guard, but it's still (like most Zend products, it 
seems) a bit pricey. I know to most big mammoth shops the price isn't a bit 
concern, but I like to stay thrifty, so if I start hearing horror stories 
I'll look into something else.

On the whole, I like the idea, and I've been looking forward to it's release 
ever since I found out about the tool. (About a year ago plus change.)

Anyways, experiences? Good? Bad? Worth it?

Thanks.

J

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




Re: [PHP] Error with file upload: "No file uploaded in Unknown on

2002-09-24 Thread Marek Kilimajer

Basically yes, unless you want to patch php sources and recompile. You 
could use error_reporting(), but the notice is issued befor you script 
gets to run, so that would not help.

Jason Young wrote:

> Thanks for your reply...
>
> However, is that the ONLY way?  Shouldn't this be something that is 
> not reported as an error to begin with?
>
> But even so, what about the other Notices I might receive in regards 
> to other debugging.. I have to get rid of all that, too?
>
> Basically I'm asking if this is the only way to do it..
>
> Thanks.
> -Jason
>
>
>
> Marek Kilimajer wrote:
>
>> Turn off notice logging in your php.ini, just keep warnings and errors.
>>
>> Jason Young wrote:
>>
>>> I have some code that a user can set a description about an item to 
>>> be posted, and then add some image files of the item.
>>>
>>> Its a 3x3 frame of  fields, along with an 
>>> 'include' line for each one.. only selecting a file with the 
>>> 'Browse' button, or entering a website manually will trigger this 
>>> include..
>>>
>>> Of course, there aren't always going to be 9 images to upload, so 
>>> sometimes they have to be left blank ... everytime I submit 
>>> something without all 9 entries filled,  I get a bunch of lines in 
>>> my error log like the following:
>>>
>>> [error] PHP Notice:  No file uploaded in Unknown on line 0
>>>
>>> Is there something I can do to combat this? It's quite annoying to 
>>> see up to 9 of these lines everytime I submit something from my page.
>>> I don't want to turn off all error reporting or anything like that, 
>>> either... I'd like to see something that'll make it a non-error.
>>>
>>> Thanks!
>>> -Jason Young
>>>
>>>
>>
>
>


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




[PHP] Jpeg resize quality problem

2002-09-24 Thread Michael F.

Hello,

I have a php script which resizes a jpeg file.  I use ImageCopyResized and
ImageJPEG function. But the result picture quality is not enough good. I use
ImageJPEG with quality = 90 but the picture is not as nice as a picture I
made with AcdSee and 65%.
Is it normal?

Thanks!




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




[PHP] Scripthash PHP security module updated

2002-09-24 Thread Tom Oram

Hi,

I would just like to announce an update of our scripthash library. There was
problems running the previous version on system with recent versions glibc.

For everyone who doesn't already know, scriphash is only relevent for people
running PHP as an Apache module on a *nix system. It allows you to securely
hide passwords and switch user within you php scripts.

For more information check the site

http://www.scl.co.uk/scripthash/

If you decide to try it out and you run into any problems please don't give up
and get in touch, we will be very willing to help you out.

Hope someone finds this useful.

Cheers
Tom

-- 

***
Tom Oram
SCL Computer Services
URL http://www.scl.co.uk/
***

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




[PHP] PHP Form and Arrays help

2002-09-24 Thread Tom Ray

I'm having a small problem with a form I'm designing and I hope someone can
point me in the right direction here. The form's function is rather simple
actaully. It's supposed to take the information, run through it to make sure
all the required fields have data in them, if there is a blank required field
it is supposed to redraw the form showing the field missed but also store the
data that was already submitted so you don't have to fill the form out all over
again. Now I have it so it stores the values of text boxes, drop down menus and
radio buttons but I'm having a real tough time with the check box values.
Example of what I'm doing: (Gender Selection with Radio Buttons). 

I declare an array in my PHP by doing 
$genderarray=array();

Then I store the value of the form for the redraw like so:
$mygender=$HTTP_POST_VARS[gender];
$genderarray[$mygender]="checked";

In the actaul form I decalre a global:
global genderarray();

And under the gender selection I have:
" >
(works the same for the Female)


Now my question is how can I do this with check boxes. I thought I could
through them all into a single array, then pull out the ones who have values to
them, but that's not working the way I thought.

Any thoughts or suggestions?


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




Re: [PHP] Jpeg resize quality problem

2002-09-24 Thread Marek Kilimajer

The algoritm gdlib uses is fast but worst. Use either exec("convert 
...") or imlib extension

Michael F. wrote:

>Hello,
>
>I have a php script which resizes a jpeg file.  I use ImageCopyResized and
>ImageJPEG function. But the result picture quality is not enough good. I use
>ImageJPEG with quality = 90 but the picture is not as nice as a picture I
>made with AcdSee and 65%.
>Is it normal?
>
>Thanks!
>
>
>
>
>  
>


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




Re: [PHP] PHP Form and Arrays help

2002-09-24 Thread Marek Kilimajer

Use either session to "remember" the checkboxes' name/value pairs or 
hidden fields.

Tom Ray wrote:

>I'm having a small problem with a form I'm designing and I hope someone can
>point me in the right direction here. The form's function is rather simple
>actaully. It's supposed to take the information, run through it to make sure
>all the required fields have data in them, if there is a blank required field
>it is supposed to redraw the form showing the field missed but also store the
>data that was already submitted so you don't have to fill the form out all over
>again. Now I have it so it stores the values of text boxes, drop down menus and
>radio buttons but I'm having a real tough time with the check box values.
>Example of what I'm doing: (Gender Selection with Radio Buttons). 
>
>I declare an array in my PHP by doing 
>$genderarray=array();
>
>Then I store the value of the form for the redraw like so:
>$mygender=$HTTP_POST_VARS[gender];
>$genderarray[$mygender]="checked";
>
>In the actaul form I decalre a global:
>global genderarray();
>
>And under the gender selection I have:
>" >
>(works the same for the Female)
>
>
>Now my question is how can I do this with check boxes. I thought I could
>through them all into a single array, then pull out the ones who have values to
>them, but that's not working the way I thought.
>
>Any thoughts or suggestions?
>
>
>  
>


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




Re: [PHP] PHP Form and Arrays help

2002-09-24 Thread Geoff

If I remember correctly checkboxes literally do not exist on the posted
pages if they don't get checked on the form page. So maybe you can use
isset or something like that to see if the checkbox exists if so make it
checked if not show it unchecked.

Hope that helps.

On Tue, 2002-09-24 at 11:24, Tom Ray wrote:
> I'm having a small problem with a form I'm designing and I hope someone can
> point me in the right direction here. The form's function is rather simple
> actaully. It's supposed to take the information, run through it to make sure
> all the required fields have data in them, if there is a blank required field
> it is supposed to redraw the form showing the field missed but also store the
> data that was already submitted so you don't have to fill the form out all over
> again. Now I have it so it stores the values of text boxes, drop down menus and
> radio buttons but I'm having a real tough time with the check box values.
> Example of what I'm doing: (Gender Selection with Radio Buttons). 
> 
> I declare an array in my PHP by doing 
> $genderarray=array();
> 
> Then I store the value of the form for the redraw like so:
> $mygender=$HTTP_POST_VARS[gender];
> $genderarray[$mygender]="checked";
> 
> In the actaul form I decalre a global:
> global genderarray();
> 
> And under the gender selection I have:
> " >
> (works the same for the Female)
> 
> Now my question is how can I do this with check boxes. I thought I could
> through them all into a single array, then pull out the ones who have values to
> them, but that's not working the way I thought.
> 
> Any thoughts or suggestions?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




[PHP] Creating/displaying page content and downloading a file at the same time

2002-09-24 Thread Merritt, Dave

All,

I'm trying to write a script that will allow the user to download/save a
file but I also want to be able to display a web page in the browser window
as well.  If a user runs the following code from an empty browser window,
then the contents of the browser window will remain empty.  How do I get the
script to also output page content to the browser window as well as download
the file?  I've played around with trying to add an additional text/html
content type and echoing out text in different places in the script, but I
cannot get any output to appear in the browser window.  I've tried setting
the location so that the page will open another page but then I run into the
headers already sent problem.

from the browser:
http://myhost/download.php/?Filename=/tmp/20020923172330.xls

download.php:



Thanks

Dave Merritt
[EMAIL PROTECTED]
**
Any views, opinions or authorizations contained in this email are solely those of the 
author and do not necessarily represent those of ArvinMeritor, Inc. If you are not 
familiar with the corporate authority of the author, please obtain confirmation in 
writing 
of the content of this email prior to taking any action on the basis of the 
information. If 
you are not the intended recipient, you are hereby notified that any disclosure, 
copying 
or distribution of the information enclosed is strictly prohibited. 
**


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




Re: [PHP] Creating/displaying page content and downloading a fileat the sa me time

2002-09-24 Thread Marek Kilimajer

Display a page first, then use the redirect header to redirect the 
browser to the actual file.

Merritt, Dave wrote:

>All,
>
>I'm trying to write a script that will allow the user to download/save a
>file but I also want to be able to display a web page in the browser window
>as well.  If a user runs the following code from an empty browser window,
>then the contents of the browser window will remain empty.  How do I get the
>script to also output page content to the browser window as well as download
>the file?  I've played around with trying to add an additional text/html
>content type and echoing out text in different places in the script, but I
>cannot get any output to appear in the browser window.  I've tried setting
>the location so that the page will open another page but then I run into the
>headers already sent problem.
>
>from the browser:
>http://myhost/download.php/?Filename=/tmp/20020923172330.xls
>
>download.php:
>
>$Filename = $_GET['Filename'];
>
>header("Content-Type: application/force-download");
>header("Content-Type: application/octet-stream");
>header("Content-Type: application/download");
>header("Content-Disposition: inline; filename=" . basename($Filename));
>header("Content-Transfer-Encoding: binary");
>header("Content-Length: " . filesize($Filename));
>header("Pragma: public");
>header("Expires: 0");
>header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
>
>readfile("$Filename"); 
>?>
>
>Thanks
>
>Dave Merritt
>[EMAIL PROTECTED]
>**
>Any views, opinions or authorizations contained in this email are solely those of the 
>author and do not necessarily represent those of ArvinMeritor, Inc. If you are not 
>familiar with the corporate authority of the author, please obtain confirmation in 
>writing 
>of the content of this email prior to taking any action on the basis of the 
>information. If 
>you are not the intended recipient, you are hereby notified that any disclosure, 
>copying 
>or distribution of the information enclosed is strictly prohibited. 
>**
>
>
>  
>


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




[PHP] Adding to a MySql Database

2002-09-24 Thread The New Source

I have a field on a MySql database that is started with a 0, and I want
to add 1 to this field every time a button is pressed on a form. So it
should add one every time, like if there is 5 and you press it one time
it would have 6.



RE: [PHP] Adding to a MySql Database

2002-09-24 Thread Jay Blanchard

[snip]
I have a field on a MySql database that is started with a 0, and I want
to add 1 to this field every time a button is pressed on a form. So it
should add one every time, like if there is 5 and you press it one time
it would have 6.
[/snip]

1. SELECT for the current value
2. add 1 to the current value
3. UPDATE the new value

HTH!

Jay

"I ain't gonna write your code for ya' or fix your computer neither"

*
* Texas PHP Developers Conf  Spring 2003*
* T Bar M Resort & Conference Center*
* New Braunfels, Texas  *
* Contact [EMAIL PROTECTED]   *
*   *
* Want to present a paper or workshop? Contact now! *
*




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




Re: [PHP] Jpeg resize quality problem

2002-09-24 Thread Michael F.


But what is this "convert" function? (I use WinXP)
Or how can I install the imlib extension?

Thanks!


"Marek Kilimajer" <[EMAIL PROTECTED]> az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
> The algoritm gdlib uses is fast but worst. Use either exec("convert
> ...") or imlib extension
>
> Michael F. wrote:
>
> >Hello,
> >
> >I have a php script which resizes a jpeg file.  I use ImageCopyResized
and
> >ImageJPEG function. But the result picture quality is not enough good. I
use
> >ImageJPEG with quality = 90 but the picture is not as nice as a picture I
> >made with AcdSee and 65%.
> >Is it normal?
> >
> >Thanks!
> >
> >
> >
> >
> >
> >
>



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




RE: [PHP] Jpeg resize quality problem

2002-09-24 Thread Matt Schroebel


> -Original Message-
> From: Michael F. [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, September 24, 2002 12:09 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Jpeg resize quality problem
> 
> 
> Hello,
> 
> I have a php script which resizes a jpeg file.  I use 
> ImageCopyResized and
> ImageJPEG function. But the result picture quality is not 
> enough good. I use
> ImageJPEG with quality = 90 but the picture is not as nice as 
> a picture I
> made with AcdSee and 65%.
> Is it normal?
> 
> Thanks!

See http://www.php.net/manual/en/function.imagecopyresampled.php it uses
a different method to re-size/sample images.

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




Re: [PHP] Adding to a MySql Database

2002-09-24 Thread Marek Kilimajer

Or better UPDATE table SET col = col +1

Jay Blanchard wrote:

>[snip]
>I have a field on a MySql database that is started with a 0, and I want
>to add 1 to this field every time a button is pressed on a form. So it
>should add one every time, like if there is 5 and you press it one time
>it would have 6.
>[/snip]
>
>1. SELECT for the current value
>2. add 1 to the current value
>3. UPDATE the new value
>
>HTH!
>
>Jay
>
>"I ain't gonna write your code for ya' or fix your computer neither"
>
>*
>* Texas PHP Developers Conf  Spring 2003*
>* T Bar M Resort & Conference Center*
>* New Braunfels, Texas  *
>* Contact [EMAIL PROTECTED]   *
>*   *
>* Want to present a paper or workshop? Contact now! *
>*
>
>
>
>
>  
>


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




Re: [PHP] Adding to a MySql Database

2002-09-24 Thread Miles Thompson


Marek's a bit more elegant, but I'm wondering when twelve of us press the 
button and the database is hit bang, bang, bang. Mightn't a MySQL 
autoincrement field be better, and let MySQL do the work?

mt

At 07:32 PM 9/24/2002 +0200, Marek Kilimajer wrote:
>Or better UPDATE table SET col = col +1
>
>Jay Blanchard wrote:
>
>>[snip]
>>I have a field on a MySql database that is started with a 0, and I want
>>to add 1 to this field every time a button is pressed on a form. So it
>>should add one every time, like if there is 5 and you press it one time
>>it would have 6.
>>[/snip]
>>
>>1. SELECT for the current value
>>2. add 1 to the current value
>>3. UPDATE the new value
>>
>>HTH!
>>
>>Jay
>>
>>"I ain't gonna write your code for ya' or fix your computer neither"
>>
>>*
>>* Texas PHP Developers Conf  Spring 2003*
>>* T Bar M Resort & Conference Center*
>>* New Braunfels, Texas  *
>>* Contact [EMAIL PROTECTED]   *
>>*   *
>>* Want to present a paper or workshop? Contact now! *
>>*
>>
>>
>>
>>
>>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] Jpeg resize quality problem

2002-09-24 Thread Marek Kilimajer

convert is a command common on unix platforms, might be available even 
for windows.
Imlib ext. is not available for Windows. ( check http://mmcc.cx/php_imlib/ )

Michael F. wrote:

>But what is this "convert" function? (I use WinXP)
>Or how can I install the imlib extension?
>
>Thanks!
>
>
>"Marek Kilimajer" <[EMAIL PROTECTED]> az alábbiakat írta a következo
>hírüzenetben: [EMAIL PROTECTED]
>  
>
>>The algoritm gdlib uses is fast but worst. Use either exec("convert
>>...") or imlib extension
>>
>>Michael F. wrote:
>>
>>
>>
>>>Hello,
>>>
>>>I have a php script which resizes a jpeg file.  I use ImageCopyResized
>>>  
>>>
>and
>  
>
>>>ImageJPEG function. But the result picture quality is not enough good. I
>>>  
>>>
>use
>  
>
>>>ImageJPEG with quality = 90 but the picture is not as nice as a picture I
>>>made with AcdSee and 65%.
>>>Is it normal?
>>>
>>>Thanks!
>>>
>>>
>>>
>>>
>>>
>>>
>>>  
>>>
>
>
>
>  
>


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




Re: [PHP] Adding to a MySql Database

2002-09-24 Thread Daniel Masson

I agree mt, LET MYSQL DO THE JOB !!

>
> Marek's a bit more elegant, but I'm wondering when twelve of us press
> the  button and the database is hit bang, bang, bang. Mightn't a MySQL
> autoincrement field be better, and let MySQL do the work?
>
> mt
>
> At 07:32 PM 9/24/2002 +0200, Marek Kilimajer wrote:
>>Or better UPDATE table SET col = col +1
>>
>>Jay Blanchard wrote:
>>
>>>[snip]
>>>I have a field on a MySql database that is started with a 0, and I
>>> want to add 1 to this field every time a button is pressed on a form.
>>> So it should add one every time, like if there is 5 and you press it
>>> one time it would have 6.
>>>[/snip]
>>>
>>>1. SELECT for the current value
>>>2. add 1 to the current value
>>>3. UPDATE the new value
>>>
>>>HTH!
>>>
>>>Jay
>>>
>>>"I ain't gonna write your code for ya' or fix your computer neither"
>>>
>>>*
>>>* Texas PHP Developers Conf  Spring 2003*
>>>* T Bar M Resort & Conference Center*
>>>* New Braunfels, Texas  *
>>>* Contact [EMAIL PROTECTED]   *
>>>*   *
>>>* Want to present a paper or workshop? Contact now! *
>>>*
>>>
>>>
>>>
>>>
>>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] authenticating and redirecting with special access

2002-09-24 Thread Bryan Koschmann - GKT

Hello,

I'm fairly new to PHP, but I am studying (ORA's "Programming PHP"). I am
trying to do something but can't quite figure out how.

Here is what I need to do:

User goes to an address. They login with say "jsmith" and their password.
the PHP script gets authenticates against a MySQL database. I have this
working.

After being authenticated, user is redirected to a directory to which only
they have access to (say www.mydomain.com/jsmith). I have this working to
the redirect part.

Where I am stuck is how to make it so someone can ONLY get to that
directory if they are authenticated, and cannot access it directly.

Now, I was thinking that there could be something php-based in that
directory that checks if they are already authenticated, but the problem
is that the files are generated by another program that I cannot modify.

I'm also having a problem where I have to close my browser to be able to
re-login, but I'm guessing this is a session problem and I just haven't
gotten that far yet.

Does anyone have any ideas here? I did a lot of searching and didn't find
much of anything.

Thanks in advance!

Bryan


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




[PHP] script to check for register_gloabs=off compatibility

2002-09-24 Thread Thomas Porter

I currently maintain about 100 sites that use PHP.  Many of them were
programmed pre 4.2, and are not compatible with the register_globals=off
setting.  Since we use virtual hosts in apache I have been able to modify
that one ini setting for the sites that need it, but now my job is to modify
all of these scripts to be compatible with the register_globals=off setting
so they will be more secured.  I'm wondering if anyone out there has written
a script that can look at the PHP scripts and see if they are compatible or
not.  I'm sure this would be no easy task, but it would be most useful at
the same time.  I've done a find for all of the PHP scripts on our server
and am confronted with over 8,000 scripts that need to be looked at, and
that's just files with the .php extension we've got plenty of .inc's and
other various extensions (including a few sites that parse .html as PHP)
that would need to be checked as well.

Anybody got any ideas?



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




RE: [PHP] authenticating and redirecting with special access

2002-09-24 Thread David Buerer

make the directory outside of the web server root path and create some PHP
routines to display the directory data as you see fit.  PHP can see the
entire file store, whereas the webserver can only see data below it's root.
That way you keep security and can also display the data.

-Original Message-
From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 10:56 AM
To: PHP General
Subject: [PHP] authenticating and redirecting with special access


Hello,

I'm fairly new to PHP, but I am studying (ORA's "Programming PHP"). I am
trying to do something but can't quite figure out how.

Here is what I need to do:

User goes to an address. They login with say "jsmith" and their password.
the PHP script gets authenticates against a MySQL database. I have this
working.

After being authenticated, user is redirected to a directory to which only
they have access to (say www.mydomain.com/jsmith). I have this working to
the redirect part.

Where I am stuck is how to make it so someone can ONLY get to that
directory if they are authenticated, and cannot access it directly.

Now, I was thinking that there could be something php-based in that
directory that checks if they are already authenticated, but the problem
is that the files are generated by another program that I cannot modify.

I'm also having a problem where I have to close my browser to be able to
re-login, but I'm guessing this is a session problem and I just haven't
gotten that far yet.

Does anyone have any ideas here? I did a lot of searching and didn't find
much of anything.

Thanks in advance!

Bryan


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




[PHP] Thoughts on a simple search engine...

2002-09-24 Thread Chuck Payne

Ok for a simple search I should be able to create a form page and Enter the
value and select the feild that Ron want to search.

Example

$sql = "SELECT * FROM \"$table\" WHERE \$field\" LIKE \"'%$value%'\" ORDER
BY \"$input"\";

$table = Of course the table they want to search
$field = Field that want to seach
$value = value what they want to by
$input = if they want to search by something other a node numder.

So I if I create the form, is there way that I can have it echo on the same
page if I am using a form?


Chuck Payne
Magi Design and Support



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




[PHP] Errr... problem uploading files

2002-09-24 Thread Jose Fandos

Hi,

Under PHP 4.2.3 and 4.2.2 with Apache 1.3.6, all under Windows XP, when
a
form has a file input field, if I browse and upload, all the information
going with the post to the server gets lost!!! There is no trace of it
(and
this is what's really frustating me, no trace in any log of any errors).
var_dump's show everything empty. If I submit without browsing (i.e. no
file
selected), I do see the $_FILES array signaling an error, but otherwise
complete, and everything else (though, on further testing, it seems that
it
works one out of every 4 times when no file is selected, and never if a
file
is selected).

I have checked the max_filesize and every other limit and they seem ok.
I
have tried with different files with no results, picking them from
different
folders in the hard drive, too.

I have also tried the same code while in another server (Solaris and Red
Hat
Linux) and there it works, while I upload files from my XP machine. I
have
made the php.ini as close as possible to those other systems, but still
nothing.
I have checked the event viewer in Windows XP to see if there is
something
in there, but nothing showed up. I've been trying with both IE and
Mozilla.
No difference.

What follows is the phpinfo(). Maybe someone can spot a problem in
there.


PHP Version 4.2.3

System
Windows NT 5.1 build 2600
Build Date
Sep 6 2002 10:38:51
Server API
Apache
Virtual Directory Support
enabled
Configuration File (php.ini) Path
C:\WINDOWS\php.ini
Debug Build
no
Thread Safety
enabled

This program makes use of the Zend Scripting Language Engine: Zend
Engine
v1.2.0, Copyright (c) 1998-2002 Zend Technologies


PHP 4 Credits

Configuration
PHP Core
Directive
Local Value
Master Value
allow_call_time_pass_reference
Off
Off
allow_url_fopen
1
1
always_populate_raw_post_data
0
0
arg_separator.input
&
&
arg_separator.output
&
&
asp_tags
Off
Off
auto_append_file
no value
no value
auto_prepend_file
no value
no value
browscap
no value
no value
default_charset
no value
no value
default_mimetype
text/html
text/html
define_syslog_variables
Off
Off
disable_functions
no value
no value
display_errors
On
On
display_startup_errors
On
On
doc_root
no value
no value
enable_dl
On
On
error_append_string
no value
no value
error_log
no value
no value
error_prepend_string
no value
no value
error_reporting
2047
2047
expose_php
On
On
extension_dir
../
../
file_uploads
1
1
gpc_order
GPC
GPC
highlight.bg
#FF
#FF
highlight.comment
#FF9900
#FF9900
highlight.default
#CC
#CC
highlight.html
#00
#00
highlight.keyword
#006600
#006600
highlight.string
#CC
#CC
html_errors
On
On
ignore_user_abort
Off
Off
implicit_flush
Off
Off
include_path
..;c:\program files\php 4.2.3\pear
..;c:\program files\php 4.2.3\pear
log_errors
On
On
magic_quotes_gpc
Off
Off
magic_quotes_runtime
Off
Off
magic_quotes_sybase
Off
Off
max_execution_time
30
30
open_basedir
no value
no value
output_buffering
4096
4096
output_handler
no value
no value
post_max_size
8M
8M
precision
14
14
register_argc_argv
Off
Off
register_globals
Off
Off
safe_mode
Off
Off
safe_mode_exec_dir
no value
no value
safe_mode_gid
Off
Off
safe_mode_include_dir
no value
no value
sendmail_from
[EMAIL PROTECTED]
[EMAIL PROTECTED]
sendmail_path
no value
no value
short_open_tag
On
On
SMTP
localhost
localhost
sql.safe_mode
Off
Off
track_errors
Off
Off
unserialize_callback_func
no value
no value
upload_max_filesize
2M
2M
upload_tmp_dir
no value
no value
user_dir
no value
no value
variables_order
GPCS
GPCS
xmlrpc_error_number
0
0
xmlrpc_errors
Off
Off
y2k_compliance
Off
Off

standard
Regex Library
Bundled library enabled
Dynamic Library Support
enabled
Internal Sendmail Support for Windows
enabled

Directive
Local Value
Master Value
assert.active
1
1
assert.bail
0
0
assert.callback
no value
no value
assert.quiet_eval
0
0
assert.warning
1
1
safe_mode_allowed_env_vars
PHP_
PHP_
safe_mode_protected_env_vars
LD_LIBRARY_PATH
LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry
a=href,area=href,frame=src,input=src,form=fakeentry

bcmath
BCMath support
enabled

calendar
Calendar support
enabled

com
Directive
Local Value
Master Value
com.allow_dcom
Off
Off
com.autoregister_casesensitive
On
On
com.autoregister_typelib
Off
Off
com.autoregister_verbose
Off
Off
com.typelib_file
no value
no value

ftp
FTP support
enabled

mysql
MySQL Support
enabled
Active Persistent Links
0
Active Links
0
Client API version
3.23.39

Directive
Local Value
Master Value
mysql.allow_persistent
On
On
mysql.default_host
no value
no value
mysql.default_password
no value
no value
mysql.default_port
no value
no value
mysql.default_socket
no value
no value
mysql.default_user
no value
no value
mysql.max_links
Unlimited
Unlimited
mysql.max_persistent
Unlimited
Unlimited

odbc
ODBC Support
enabled
Active Persistent Links
0
Active Links
0
ODBC library
Win32

Directive
Local Value
Master Value
odbc.allow_persistent
On
On
odbc.check_persistent
On
On
odbc.default_db
no value
no value
odbc.default_p

[PHP] getting ip address of the user.

2002-09-24 Thread Anil Garg

hi,

Can i get the ip-address of the machines who accessed my website??
Plz give the pointer that on what lines shall i start for doing so.

thanx and regards
anil



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




RE: [PHP] getting ip address of the user.

2002-09-24 Thread Jesse Cablek

Anil Garg  scribbled;
> 
> Can i get the ip-address of the machines who accessed my website??
> Plz give the pointer that on what lines shall i start for doing so.
> 

print $_SERVER['REMOTE_ADDR'];

-jesse


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




RE: [PHP] Thoughts on a simple search engine...

2002-09-24 Thread Jay Blanchard

[snip]
So I if I create the form, is there way that I can have it echo on the same
page if I am using a form?
[/snip]

Yes, using $PHP_SELF as your form action

HTH

Jay

"Ever stop to think, and forget to start again?"

*
* Texas PHP Developers Conf  Spring 2003*
* T Bar M Resort & Conference Center*
* New Braunfels, Texas  *
* Contact [EMAIL PROTECTED]   *
*   *
* Want to present a paper or workshop? Contact now! *
*


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




[PHP] html input and php (newbie)

2002-09-24 Thread Anna Gyor

Hi,

I just began to learn php and I have te following code. How can I get the
input field value in the php script? Because my script doesn't work.
$UserName is always an empty string.


  

  

  Enter Your Name
  

  
  
  

  




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




RE: [PHP] html input and php (newbie)

2002-09-24 Thread Daniel Kushner

Hi Anna,

Your REGISTER_GLOBALS is most probably set to OFF (see php.ini file). Try
using the special $_POST array created by PHP:

if ($_POST['submit'] == "click"){
echo "Hello, $_POST[UserName]";
}

If your form was using the GET method you would need the $_GET array.

Regards,
Daniel Kushner
_
Need hosting? http://thehostingcompany.us

> -Original Message-
> From: Anna Gyor [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 24, 2002 3:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] html input and php (newbie)
>
>
> Hi,
>
> I just began to learn php and I have te following code. How can I get the
> input field value in the php script? Because my script doesn't work.
> $UserName is always an empty string.
>
>  if ($submit == "click"){
>   echo "Hello, $UserName";
> }
> else{
> ?>
>   
>
>   
>
>   Enter Your Name
>   
>
>   
>   
>   
>
>   
>  }
>
> ?>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




RE: [PHP] html input and php (newbie)

2002-09-24 Thread Jesse Cablek

Anna Gyor  scribbled;
> 
> Hi,
> 
> I just began to learn php and I have te following code. How can I get
> the input field value in the php script? Because my script doesn't
> work. $UserName is always an empty string.
> 
>  if ($submit == "click"){
>   echo "Hello, $UserName";
> }
[...]
>

Assuming register_globals=off, use $_POST['UserName'] instead

-jesse



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




Re: [PHP] html input and php (newbie)

2002-09-24 Thread Juan Pablo Aqueveque

What is of your PHP version?
I guess of your directive register_globals = off in your php.ini, so your 
code would be run OK like this:



--jp

At 21:31 24-09-2002 +0200, Anna Gyor wrote:
>Hi,
>
>I just began to learn php and I have te following code. How can I get the
>input field value in the php script? Because my script doesn't work.
>$UserName is always an empty string.
>
>if ($submit == "click"){
>   echo "Hello, $UserName";
>}
>else{
>?>
>   
>
>   
>
>   Enter Your Name
>   
>
>   
>   
>   
>
>   
>}
>
>?>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Juan Pablo Aqueveque <[EMAIL PROTECTED]>
Ingeniero de Sistemas
Departamento de Redes y Comunicaciones http://www.drc.uct.cl
Universidad Católica de Temuco.
Tel:(5645) 205 630 Fax:(5645) 205 628


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




RE: [PHP] getting ip address of the user.

2002-09-24 Thread Bill Farrell

Hi, Y'all,
Here's another suggestion FWIW.  I prep a few
variables in the htmlhead.php routine, $RemoteHost
being one of them.  Having some simple names for
associated values is kinda handy.  One of the biggest
strengths of PHP is that there's more than one way to
go about solving problems.  Here goes:




--- Jesse Cablek <[EMAIL PROTECTED]> wrote:
> Anil Garg  scribbled;
> > 
> > Can i get the ip-address of the machines who
> accessed my website??
> > Plz give the pointer that on what lines shall i
> start for doing so.
> > 
> 
> print $_SERVER['REMOTE_ADDR'];
> 
> -jesse
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



=
Bill Farrell
Multivalue and *nix Support Specialist

Phone: (828) 667-2245
Fax:   (928) 563-5189
Web:   http://www.jwfarrell.com

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




RE: [PHP] html input and php (newbie) --> What I was asking with my thoughts on Search Engine

2002-09-24 Thread Chuck Payne

This what I was asking, I want someone to press submit then have the returns
print out in one are of the table. So could I do this?




So instead of doing a search.html that calls on do_search.php like most
books teach. I am wanting to do a search.php. Just print the information on
that page.

Chuck


-Original Message-
From: Jesse Cablek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] html input and php (newbie)


Anna Gyor  scribbled;
>
> Hi,
>
> I just began to learn php and I have te following code. How can I get
> the input field value in the php script? Because my script doesn't
> work. $UserName is always an empty string.
>
>  if ($submit == "click"){
>   echo "Hello, $UserName";
> }
[...]
>

Assuming register_globals=off, use $_POST['UserName'] instead

-jesse



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



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




Re: [PHP] right name for

2002-09-24 Thread Chris Hewitt

Andreas Hasenack wrote:

>Someone at the apache list told me that the name would be sapi_apache2.c,
>because that's where the STANDARD20_MODULE_STUFF define is used. But
>sapi_apache2.c didn't work either.
>
Ah, I didn't know you meant Apache 2 and windows? I'm going on Apache 
1.3.x and linux.

Chris

>


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




RE: [PHP] Thoughts on a simple search engine...

2002-09-24 Thread Support @ Fourthrealm.com

Chuck,
Setup your form like this (assuming search.php is the name of your page):



.



Then in your search.php page, use this structure:

# --- set $step to passed value, or else set to default ---
if (isset($_GET["step"]))   { $step=$_GET["step"]; }
elseif (isset($_POST["step"]))  { $step=$_POST["step"]; }
else{ $step="1"; }


if ($step==2)
{
 # --- do the Search query and display results here ---


 # after displaying, then set step=1  to force the search form to 
come up again at the bottom of the page
 $step=1;
}

if ($step==1)
{
 # --- put the form here...  ---
}


I use the "step" variable all the time in controlling page flow, and 
allowing me to re-use the same .php file for many similar purposes to keep 
the file count of the site low.

HTH,

Peter



At 02:13 PM 9/24/2002 -0500, Jay Blanchard wrote:
>[snip]
>So I if I create the form, is there way that I can have it echo on the same
>page if I am using a form?
>[/snip]
>
>Yes, using $PHP_SELF as your form action
>
>HTH
>
>Jay
>
>"Ever stop to think, and forget to start again?"
>
>*
>* Texas PHP Developers Conf  Spring 2003*
>* T Bar M Resort & Conference Center*
>* New Braunfels, Texas  *
>* Contact [EMAIL PROTECTED]   *
>*   *
>* Want to present a paper or workshop? Contact now! *
>*
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -


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




[PHP] Variables and Forms

2002-09-24 Thread ed


 I'm trying to pass variables from one page to the next but don't want to
use a hidden input type=text box. I need to break from frames and I don't
know a way to pass that to the action tag in the form. If there's a way to
do that then great but I haven't found it. I've also tried the meta
http-equiv="window-target" content tag on the action page from the form
and it didn't work either.

TIA

Ed Curtis



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




Re: [PHP] Variables and Forms

2002-09-24 Thread Joseph W. Goff

This should open up a new window for the new page


As far as passing variables from page to page, have you ever considered
sessions?

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 24, 2002 2:46 PM
Subject: [PHP] Variables and Forms


>
>  I'm trying to pass variables from one page to the next but don't want to
> use a hidden input type=text box. I need to break from frames and I don't
> know a way to pass that to the action tag in the form. If there's a way to
> do that then great but I haven't found it. I've also tried the meta
> http-equiv="window-target" content tag on the action page from the form
> and it didn't work either.
>
> TIA
>
> Ed Curtis
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Adding to a MySql Database

2002-09-24 Thread John S. Huggins

On Tue, 24 Sep 2002, The New Source wrote:

>-I have a field on a MySql database that is started with a 0, and I want
>-to add 1 to this field every time a button is pressed on a form. So it
>-should add one every time, like if there is 5 and you press it one time
>-it would have 6.
>-

UPDATE table SET field = field + 1 WHERE whatever = whatever;

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


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




Re: [PHP] getting ip address of the user.

2002-09-24 Thread Bill Farrell

Hi, Tony...
Here's a script I pilfered from online a coupla years
back and have modified (over and over).  The code
would be online, except my ISP is having heartburns
lately...
Bill


WhoAmI Utility


This utility can help you identify your browser and
your
Internet provider.  It uses all of the worldwide NIC
authorities to obtain only public information.
No
information obtained by this page is ever
retained...it
is simply a diagnostic to help web programmers
understand
how web servers respond to information provided by
their
browsers.  It is provided in an effort to help web
programmers
isolate browser differences so that their programming
will
be more sure to work on more platforms.


The Basics


Your host name is $host\n";
}

print "Your IP Address is $ip\n";
print "Your web service provider was found in
$RespondingAuthority\n";
print "Your browser is reported as $Agent\n";

if ( isset( $SendTo ) ) {
list( $EmailAddress, $Provider ) = explode( "@",
$SendTo );
print "Your service provider is
$Provider\n";
}
print "\n";

print "The Entire Response from
$RespondingAuthority\n";
print "\n";
foreach ( $WholeResponse as $Line ) {
print "$Line\n";
}
print "\n";

print "Your browser sent the following
headers\n";
print "\n";
foreach( $HeaderLog as $Line ) {
print "$Line\n";
}
?>




Show me the code
for this page.




=
Bill Farrell
Multivalue and *nix Support Specialist

Phone: (828) 667-2245
Fax:   (928) 563-5189
Web:   http://www.jwfarrell.com

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

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




Re: [PHP] right name for

2002-09-24 Thread Andreas Hasenack

Em Tue, Sep 24, 2002 at 08:53:16PM +0100, Chris Hewitt escreveu:
> Andreas Hasenack wrote:
> 
> >Someone at the apache list told me that the name would be sapi_apache2.c,
> >because that's where the STANDARD20_MODULE_STUFF define is used. But
> >sapi_apache2.c didn't work either.
> >
> Ah, I didn't know you meant Apache 2 and windows? I'm going on Apache 
> 1.3.x and linux.

No, it's apache-2.0.41-dev, php-4.2.3 and linux.


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




[PHP] Error during complie of 4.2.3

2002-09-24 Thread David Busby

List,
I'm trying to insstall PHP 4.2.3 on my RH73 box with Apache 2.0.40.  My 
Configure script and my results are posted below, the error I'm getting 
that I can't figure out is:

libtool: link: warning: library `/usr/lib/libxml2.la' was moved.
stub.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/src/php-4.2.3'
make: *** [all-recursive] Error 1

Here is my configure script, can someone please help me figure this one out?
./configure \
   --prefix=/opt/php \
   --includedir=/usr/include \
   --mandir=/usr/share/man \
   --infodir=/usr/share/info \
   --with-config-file-path=/opt/php \
   --enable-force-cgi-redirect \
   --disable-debug \
   --disable-short-tags \
   --enable-dbg=shared \
   --with-dbg-profiler \
   --enable-pic \
   --disable-rpath \
   --enable-inline-optimization \
   --without-bz2 \
   --without-db3 \
   --without-curl \
   --with-dom=/usr \
   --with-png-dir=/usr \
   --without-gd \
   --disable-gd-native-ttf \
   --without-ttf \
   --without-gdbm \
   --with-gettext \
   --without-ncurses \
   --without-gmp \
   --with-iconv \
   --without-cdpflib \
   --without-mm \
   --with-openssl \
   --with-png \
   --without-pspell \
   --with-regex=system \
   --with-xml \
   --with-zlib \
   --with-layout=GNU \
   --enable-bcmath \
   --enable-debugger \
   --enable-exif \
   --enable-ftp \
   --enable-magic-quotes \
   --enable-safe-mode \
   --enable-sockets \
   --enable-sysvsem \
   --enable-sysvshm \
   --enable-discard-path \
   --enable-track-vars \
   --enable-trans-sid \
   --disable-yp \
   --enable-wddx \
   --without-oci8 \
   --without-imap \
   --without-imap-ssl \
   --without-kerberos \
   --without-ldap \
   --without-mysql \
   --with-pgsql=shared \
   --without-snmp \
   --disable-ucd-snmp-hack \
   --with-unixODBC=shared \
   --enable-memory-limit \
   --enable-bcmath \
   --enable-shmop \
   --enable-versioning \
   --enable-calendar \
   --enable-dbx \
   --enable-dio \
   --enable-mcal \
   --disable-mbstring \
   --enable-mbstr-enc-trans \
   --with-apxs2=/opt/httpd/bin/apxs;

/B


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




  1   2   >