Re: [PHP] Rebuilding PHP4 with IBM DB2 Support Causes Apache to Die Upon Restart

2002-03-24 Thread Josep Raurell


I think --with--ibm-db2 only works as statically linked with apache, no as module.

And do you have the db2 connect librarys instaled in the system ?

I copy here an article that works for my, I dont remenber where I see, maybe in
faqs.com:

-
Sep 21st, 2000 13:04 

Remo Ronchitelli 

The connection from a Linux Web Server 
equipped with Apache and PHP 4 
to an IBM AS/400 (OS400 and DB2/400) 
system is possible and works fine. 
The same connection works with IBM 
mainframes equipped with OS/390, 
MVS/ESA, VM/ESA, VSE/ESA and IBM DB2. 
The only strict requirement is the 
version of OS400 operating system: 
it must be V4R2 with native TCP/IP 
support. 
The following is the hierarchical 
list of Software Layers used in the test. 
++Linux RedHat 6.1 
--(Korn Shell pdksh rpm package required) 
++Apache Web Server 1.3.12 
++PHP 4.0.2 statically linked to Apache 
-- with-ibm-db2 option enabled 
++IBM DB2Connect Personal Edition for Linux 
-- V7.1 free from somewhere in ibm.com 
The IBM DB2 UDB DB2Connect Personal Edition 
installation is performed via Korn shell script 
"db2setup". Use all the features you can select, 
and installl: 
DB2 Administration Client 
DB2 Connect Personal Edition 
Db2 Application Development Client 
The DB2 instance created on Linux is: 
"db2inst1" and password "ibmdb2" (defaulted). 
After this you can install PHP 4 
--with-ibm-db2 option enabled. 
You get some weak compilation warnings 
but don't worry (it would be better they missed). 
For PHP it looks exactly like you had 
installed IBM DB2 UDB Personal Edition 
(the whole DB2 engine "without" DB2Connect). 
On the AS/400 side you have to start 
"drda" tcp servers at port "446" (defaulted). 
On the AS/400 side you need also 
authorized userid and password. 
Along with IBM DB2Connect you get full 
HTML documentation (useful and clear). 
Now return to Linux: 
login as "db2inst1" password "ibmdb2" and 
type: "db2" (DB2 command line processor). 
This is the necessary to inform DB2Connect 
about the reality of DB2400 DataBase on the 
AS/400. Thatis: 
1. 'catalog tcpip node YOUR_FREE_NODE_NAME 
remote TCP_IP_ADDRESS_OF_AS400 
server 446 
remote_instance AS400_SYSTEM_NAME 
system YOUR_FREE_SYSTEM_NAME 
ostype OS400' 
(446 is the default port number of drda server) 
(ostype must be "OS400") 
2. 'catalog dcs database YOUR_DB_NAME 
as DB2400_REAL_NAME' 
(DB400_REAL_NAME is the cataloged name of 
DB2 system in the AS/400 or the RDBNAME of AS/400) 
3. 'catalog database YOUR_DB_NAME as PHP_DB_NAME 
at node YOUR_FREE_NODE_NAME 
authentication DCS' 
(if you choose authentication "SERVER" it doesn't work). 
4. 'connect to PHP_DB_NAME 
user AS400_USERID 
using AS400_PASSWORD' 
5. (Caution to escape double quotes!) 
'bind \"[EMAIL PROTECTED] 
BLOCKING ALL SQLERROR CONTINUE 
MESSAGES DDCS400.MGS GRANT PUBLIC\" ' 
6. 'connect reset' 
7. 'terminate' 
(quit from DB2 Command Line Processor). 

You can now access DB2/400 from a PHP script 
enabled with: 
'putenv 
("LD_LIBRARY_PATH=/home/db2inst1/sqqlib/lib:$LD_LIBRARY_PATH"); ' 
'putenv ("DB2INSTANCE=db2inst1"); ' 
'odbc_connect(PHP_DB_NAME, AS400_USERID, AS400_PASSWORD);' 

Warning: The Table name referenced in your PHP script 
must be qualified with the "collection" or "library" name 
of AS/400 DB2 system. Example: 
"SELECT * FROM AS400LIB.TABLE" 
The default would be 
"SELECT * FROM DB2INST1.TABLE" (surely wrong). 

Take your fun with AS/400 or Mainframe system! 
Remo Ronchitelli 
[EMAIL PROTECTED] 



Josep R. Raurell



Quoting Derek Battams <[EMAIL PROTECTED]>:

> Currently I have Apache and PHP4 (using the Apache module for PHP4) working
> just fine on my server.  However, the RPMs I installed for mod_php4 didn't
> include IBM DB2 support.  So I took the source RPM and modified it by
> simply
> adding the following line to the spec file:
> 
> --with-ibm-db2
> 
> I appended this to the CFLAGS parameter in the spec file.  I then rebuilt
> the RPMs and everything built fine.  I then installed them and that was
> fine.  However, when I try to restart Apache nothing happens.  It just
> exits
> immediately with nothing written to any logs.  If I remove the
> '--with-ibm-db2' flag from the spec file, rebuild the RPMs, then reinstall
> them without DB2 support then Apache restarts fine and operates with no
> problems.  DB2 is installed, configured, and running on the server.  I've
> spent numerous hours (on the weekend none the less) trying to figure this
> out, but with no luck.  Any help would be greatly appreciated.
> 
> Thanks,
> 
> Derek
> 
> 
> 
> -- 
> 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] From To to BCC in a Mail script

2002-03-24 Thread Jason Wong

On Monday 25 March 2002 15:31, anti-blank wrote:
> I've got this script here to send out a mail whenever I enter an update to
> my site to my mailing list. The problem is it wants to dump everyone's
> email into the To field, and since I don't want to give my users email
> addresses away I need to convert this to the bcc field.  Below is the
> original code and then the modification that I made (which doesn't seem to
> work).  Also if anyone has any idea how to include in this block a line to
> tell php to send this as HTML email as well that would be even more
> helpful. Thanks.

[snip]

> My MODIFIED CODE:
> $mailpost = $mailpost;
> $mailpost = str_replace("{setting_site_name}", $setting_site_name,
> $mailpost); $mailpost = str_replace("{setting_site_url}",
> $setting_site_url, $mailpost); $mailpost =
> str_replace("{setting_mail_email}", $setting_mail_email, $mailpost);
> $mailpost = str_replace("{post_poster}", $cookie_username, $mailpost);
> $mailpost = str_replace("{post_headline}", $headline, $mailpost);
> $mailpost = str_replace("{post_date}", date("M d, Y", time()), $mailpost);
> $mailpost = str_replace("{post_post}", $post, $mailpost);
> $bcc = "";
> $query = mysql_query("SELECT * FROM members");
> while ($member = mysql_fetch_array($query)) {
> if ($bcc == "") {$bcc = $member['email'];}
> else {$bcc .= ", " . $member['email'];}
> }
> $from = "from: " . $setting_mail_email;
> mail ($bcc, $setting_site_name, $mailpost, $from) or $emailsuccess =
> "Failure sending email."; if ($emailsuccess == "") {$emailsuccess = "Email
> Sent Successfully.";} }

Forgive me if I'm wrong, but all it seems you have done is used a different 
variable name to hold the list of recipients (from $to to $bcc). That in 
itself is hardly likely to change the behaviour of mail() to do what you want.

Read the manual *again* (you have already read it haven't you?) for how to 
use cc: and bcc: in mail().



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

/*
After your lover has gone you will still have PEANUT BUTTER!
*/

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




[PHP] Re: Why?

2002-03-24 Thread Gunter Ohrner

Matt Parlane wrote:
> There's even an RFC published on this:
> http://www.faqs.org/rfcs/rfc3092.html

"1 April 2001"? ;)

The HTTP-based network protocol for controlling coffee machines was not bad, 
either.
I'm already really curious for the RFC published this April, the 1th. :-)

Greetinx,

  Gunter Ohrner

-- 
Nanny Ogg looked him up and down or, at least, down and further down. 
"You're a dwarf," she said.-- Nanny Ogg meets Casanunda   
(Terry Pratchett, Witches Abroad)
-+-+-+-+-+- PDEPP Webserver:  http://pdepp.SourceForge.net/ -+-+-+-+-+-


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




[PHP] From To to BCC in a Mail script

2002-03-24 Thread anti-blank

I've got this script here to send out a mail whenever I enter an update to my site to 
my mailing list.
The problem is it wants to dump everyone's email into the To field, and since I don't 
want to give my 
users email addresses away I need to convert this to the bcc field.  Below is the 
original code and then
the modification that I made (which doesn't seem to work).  Also if anyone has any 
idea how to include
in this block a line to tell php to send this as HTML email as well that would be even 
more helpful.  
Thanks.


ORIGINAL CODE:
$mailpost = $mailpost;
$mailpost = str_replace("{setting_site_name}", $setting_site_name, $mailpost);
$mailpost = str_replace("{setting_site_url}", $setting_site_url, $mailpost);
$mailpost = str_replace("{setting_mail_email}", $setting_mail_email, $mailpost);
$mailpost = str_replace("{post_poster}", $cookie_username, $mailpost);
$mailpost = str_replace("{post_headline}", $headline, $mailpost);
$mailpost = str_replace("{post_date}", date("M d, Y", time()), $mailpost);
$mailpost = str_replace("{post_post}", $post, $mailpost);
$to = "";
$query = mysql_query("SELECT * FROM members");
while ($member = mysql_fetch_array($query)) {
if ($to == "") {$to = $member['email'];}
else {$to .= ", " . $member['email'];}
}
$from = "from: " . $setting_mail_email;
mail ($to, $setting_site_name, $mailpost, $from) or $emailsuccess = "Failure sending 
email.";
if ($emailsuccess == "") {$emailsuccess = "Email Sent Successfully.";}
}



My MODIFIED CODE:
$mailpost = $mailpost;
$mailpost = str_replace("{setting_site_name}", $setting_site_name, $mailpost);
$mailpost = str_replace("{setting_site_url}", $setting_site_url, $mailpost);
$mailpost = str_replace("{setting_mail_email}", $setting_mail_email, $mailpost);
$mailpost = str_replace("{post_poster}", $cookie_username, $mailpost);
$mailpost = str_replace("{post_headline}", $headline, $mailpost);
$mailpost = str_replace("{post_date}", date("M d, Y", time()), $mailpost);
$mailpost = str_replace("{post_post}", $post, $mailpost);
$bcc = "";
$query = mysql_query("SELECT * FROM members");
while ($member = mysql_fetch_array($query)) {
if ($bcc == "") {$bcc = $member['email'];}
else {$bcc .= ", " . $member['email'];}
}
$from = "from: " . $setting_mail_email;
mail ($bcc, $setting_site_name, $mailpost, $from) or $emailsuccess = "Failure sending 
email.";
if ($emailsuccess == "") {$emailsuccess = "Email Sent Successfully.";}
}




[PHP] Re: Does anybody use UltraDev?

2002-03-24 Thread Philippe Saladin

People in my company use Dreamweaver for static pages, so it was evident for
us to use Dreamweaver UltraDev (with PHAkt app server extension) to help
building php pages.
Nevertheless, in fact, we use UltraDev to design the pages (great tool for
the layout), but often something like Html-Kit or UltraEdit for the php
code.
Regards,
Philippe

"::: Rober2 :::" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> Hey!
>
> Does anybody use UltraDev for PHP?
> Any comments about it?
>
> (Personally I go for Visual PHP Studio)
>
>



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




[PHP] Re: Why?

2002-03-24 Thread Matt Parlane

There's even an RFC published on this:
http://www.faqs.org/rfcs/rfc3092.html

Matt

"Alberto Wagner" <[EMAIL PROTECTED]> wrote in message
878USUPYSS0CQKNLWUHCFBEBFCJD.3ca676e7@alberto">news:878USUPYSS0CQKNLWUHCFBEBFCJD.3ca676e7@alberto...
> Why everyone uses $foo or $foobar as examples?
>
>
>



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




Re: [PHP] Regular Expression Challenge

2002-03-24 Thread Matt Moreton

Oh, I didnt read the bit at the bottom about the times appearing any number
of times.  Off the top of my head I think this should work...

PREG:

"/'([a-z]+)-([a-z]+)\s(?:([0-9]+(?::[0-9]+|))(?:,\s)?)*'/"

--
Matt

- Original Message -
From: "Cameron Just" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 6:15 AM
Subject: [PHP] Regular Expression Challenge


> Hi,
>
> I am trying to pull out the following information via a regular
expression.
>
> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
>
> and I want it to retreive
> wed
> thurs
> 9:35
> 14:56
> 18:35
>
> The regular expression I am using is
> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
>
> It seems to be grabbing the
> wed
> thurs
> 9:35
> but I can't seem to retrieve the rest of the times.
>
> Anyone have any ideas?
>
> BTW
> There can be any number of 'times' in the string and also the 'times' can
> be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
> part of the regexp.
>
>
>
>
>
> --
> 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] Regular Expression Challenge

2002-03-24 Thread Matt Moreton

Perl Compatible Regular Expression:

"/'([a-z]+)-([a-z]+)\s([0-9]+:[0-9]+),\s([0-9]+:[0-9]+),\s([0-9]+:[0-9]+)'/"

Assuming the days of the week are always lower case? if not then use
[a-zA-Z] for the day matching.

Hope this helps.

 --
Matt.

- Original Message -
From: "Cameron Just" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 6:15 AM
Subject: [PHP] Regular Expression Challenge


> Hi,
>
> I am trying to pull out the following information via a regular
> expression.
>
> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
>
> and I want it to retreive
> wed
> thurs
> 9:35
> 14:56
> 18:35
>
> The regular expression I am using is
> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
>
> It seems to be grabbing the
> wed
> thurs
> 9:35
> but I can't seem to retrieve the rest of the times.
>
> Anyone have any ideas?
>
> BTW
> There can be any number of 'times' in the string and also the 'times' can
> be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
> part of the regexp.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] How to Pass the Username which from Windows Login

2002-03-24 Thread Jack

Dear all
I want to prevent user to make another login before they can browse the
Intranet, so is there anyway that php can grep the username from the windows
Login or Domain Login?
Which means if a user can login to the Windows NT, then he/she will have the
right to browse the Intranet!

Thx a lot
Jack
[EMAIL PROTECTED]



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




Re: [PHP] Regular Expression Challenge

2002-03-24 Thread Thalis A. Kalfigopoulos

Why a regexpr? 
Do one explode() on the " "
Clean up the commas from the elements [1],[2] & [3] of the returned array
and on element[0] do an additional explode on "-"

cheers,
--t.

On Mon, 25 Mar 2002, Cameron Just wrote:

> Hi,
> 
> I am trying to pull out the following information via a regular expression.
> 
> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
> 
> and I want it to retreive
> wed
> thurs
> 9:35
> 14:56
> 18:35
> 
> The regular expression I am using is
> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
> 
> It seems to be grabbing the
> wed
> thurs
> 9:35
> but I can't seem to retrieve the rest of the times.
> 
> Anyone have any ideas?
> 
> BTW
> There can be any number of 'times' in the string and also the 'times' can
> be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
> part of the regexp.
> 
> 
> 
> 
> 
> -- 
> 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] mail...

2002-03-24 Thread Mantas Kriauciunas

Hey PHP General List,

  Why do i get 5 copies of each email? not always but sometime 3
  sometimes 2 sometimes 5. Is this the only me (coz something is
  messed up with mail server or mail client) or some ppl also gets
  more than one

:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




[PHP] Regular Expression Challenge

2002-03-24 Thread Cameron Just

Hi,

I am trying to pull out the following information via a regular expression.

The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'

and I want it to retreive
wed
thurs
9:35
14:56
18:35

The regular expression I am using is
([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*

It seems to be grabbing the
wed
thurs
9:35
but I can't seem to retrieve the rest of the times.

Anyone have any ideas?

BTW
There can be any number of 'times' in the string and also the 'times' can
be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
part of the regexp.





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




[PHP] Is there anyway to save a file into Mysql database

2002-03-24 Thread Jack

Dear all
Can someone pls tell me is php will be able to grep text from MS Word and
then save that word file into MYSQL database? Which means is MYSQL will be
able to store files into it's table?

Thx a lot
jack
[EMAIL PROTECTED]



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




RE: [PHP] How to use bind arguments

2002-03-24 Thread Martin Towell

I don't know if this is the thing you're after, but...

http://www.php.net/manual/en/function.func-get-args.php

HTH
Martin


-Original Message-
From: Vincent Bergeron [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 4:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to use bind arguments


Hi!

A function like this one:

function SendQuery($li_connect, $ls_query, $args)
{
   return ibase_query($li_connect, $ls_query, $args);
}

ibase_query is an Interbase function which declaration is:
int ibase_query ( [int link_identifier, string query [, int bind_args]])


Why can't something like this be done? Is there a way to pass to a function
a variable parameter and then use the complete set as another function
parameter?

Thanks

VB



-- 
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] When Click a HyperLink, Promp password before Showingthe Page

2002-03-24 Thread Justin French

The action you want shouldn't really take effect on the client side
(hyperlink) itself, because this would no doubt rely on JavaScript and would
be pathetically insecure.

Instead, what you need to think about is protecting certain pages with a
username password, and *possibly* maintaining this user/data in sessions, so
they only have to do it once.

There is a pretty good tutorial on this exact topic on Site Point:
http://www.WebmasterBase.com/article/319

I used this tutorial and code base as the basis of my own session management
and user login stuff.


It does use MySQL to maintain the users in a table, but the principal of how
he works with headers and exits could be applied to a flat file of
user/password records.


Note: it does use cookies, which you may or may not consider an issue.


Justin French

Creative Director
http://Indent.com.au






on 25/03/02 4:49 PM, Jack ([EMAIL PROTECTED]) wrote:

> Dear all
> Can someone pls tell me how i can make a behavior in php which when a user
> click on a hyperlink, then a page for login will appear first and then once
> the username and password is right, the page of which user aiming to browse
> will show, otherwise  a error message will tell the user that the username
> or password ar not correct.
> I know it will be easy if there is only one hyperlink, but what happen if
> there are many of them?
> 
> Thx very much
> Jack
> [EMAIL PROTECTED]
> 
> 


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




[PHP] When Click a HyperLink, Promp password before Showing the Page

2002-03-24 Thread Jack

Dear all
Can someone pls tell me how i can make a behavior in php which when a user
click on a hyperlink, then a page for login will appear first and then once
the username and password is right, the page of which user aiming to browse
will show, otherwise  a error message will tell the user that the username
or password ar not correct.
I know it will be easy if there is only one hyperlink, but what happen if
there are many of them?

Thx very much
Jack
[EMAIL PROTECTED]



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




[PHP] How to use bind arguments

2002-03-24 Thread Vincent Bergeron

Hi!

A function like this one:

function SendQuery($li_connect, $ls_query, $args)
{
   return ibase_query($li_connect, $ls_query, $args);
}

ibase_query is an Interbase function which declaration is:
int ibase_query ( [int link_identifier, string query [, int bind_args]])


Why can't something like this be done? Is there a way to pass to a function
a variable parameter and then use the complete set as another function
parameter?

Thanks

VB



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




Re: [PHP] Form & POST

2002-03-24 Thread Jason Wong

On Monday 25 March 2002 12:47, Kevin Maynard wrote:
> Maybe someone can shed some light on this.  I have a form to handle a file
> upload, but through the same form I would like to gather data as well.  For
> example, ID, Price & Picture.
>
> Now I set up my form to handle the file upload, and that all works great,
> but I can't seem to access the other variables.  Can I use for form to
> collect data and files?


[snip]

> Now whether I use the $Price alone or $HTTP_POST_VARS['Price'] I get
> nothing.

If you're using php > 4.0.6 then use $_POST[] instead of $HTTP_POST_VARS[].


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

/*
"Hello," he lied.
-- Don Carpenter, quoting a Hollywood agent
*/

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




[PHP] Re:[2] [PHP] Text Editor

2002-03-24 Thread Liam

25/03/2002 3:05:00 PM

Editplus is the best

www.editplus.com




"Tyler Longren" <[EMAIL PROTECTED]> wrote on 25/03/2002 3:34:22 AM:
>
>If you want a regular text editor, I suggest Textpad or Context.
>
>If you want an IDE, I suggest Maguma.
>
>Tyler
>
>- Original Message - 
>From: "Hiroshi Ayukawa" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Sunday, March 24, 2002 7:27 PM
>Subject: [PHP] Text Editor
>
>
>> Hello,
>> 
>> What text editor do you use to write PHP?
>> I use Maruo editor http://www.ac.wakwak.com/~tetsuyat/maruo/ more than 1 
>> year.
>> Is there any better text editor for PHP?
>> 
>> Thanks,
>> Hiroshi Ayukawa
>> http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top 
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



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




[PHP] Re:[PHP] Why?

2002-03-24 Thread Liam

25/03/2002 3:01:36 PM

"FBAR" was a term used in the second world war.
It turned into "FUBAR" for better pronounciation.
"FUBAR" turned into "FOO BAR"

FBAR stands for:
Fucked Beyond All Recognition


I hope you find this completely unrelated snippet
of trivial knowledge amusing, as I certainly do   :-)



Alberto Wagner <[EMAIL PROTECTED]> wrote on 31/03/2002 2:39:35 AM:
>
>Why everyone uses $foo or $foobar as examples?
>
>
>
>
>-- 
>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] Form & POST

2002-03-24 Thread Kevin Maynard

Maybe someone can shed some light on this.  I have a form to handle a file
upload, but through the same form I would like to gather data as well.  For
example, ID, Price & Picture.

Now I set up my form to handle the file upload, and that all works great,
but I can't seem to access the other variables.  Can I use for form to
collect data and files?

My code is as follows:






 
  
   

 
  
   Input Picture Here:

  
  
   Price:

  
<...>



global $HTTP_POST_FILES;

//Update Listing   

$Price = $HTTP_POST_VARS['Price'];

if(!empty($HTTP_POST_FILES['userfile']['tmp_name'])) {
$filename = $HTTP_POST_FILES['userfile']['tmp_name'];
$newname = "/images/".$ID."_01.jpg";
copy($HTTP_POST_FILES['userfile']['tmp_name'],$newname);
}

<...>

Now whether I use the $Price alone or $HTTP_POST_VARS['Price'] I get
nothing.

Thanks,

Kevin



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




Re: [PHP] Image Displayed From Database

2002-03-24 Thread Miguel Cruz

On Sun, 24 Mar 2002, Shaun Martinec wrote:
> I'm using mysql to store images that I load through a script called
> photo.php. I pass it the ID and it displays the image. No problem. However,
> when I right-click on the image in my browser (IE6) and choose properties,
> it doesn't seem to recognize the format or size even though I'm sending
> Content-Type and Content-Length headers. Are there additional headers I need
> to send to get this functionalily or is it just because the file extension
> of the script is .php and not .gif or .jpg? Also when I right-click and
> choose "Save As" it only lets me save as a bmp. Again, it displays fine, I
> would just like to make it work like a real image.

Internet Explorer is very dumb about internet file types - it thinks the 
whole world plays the DOS game of identifying files by the end of the 
name ("extensions" or whatever they call it). You can fool it by providing 
a URL that appears to belong to a certain file type. For instance, instead 
of making a link to "imagedisplay.php?id=45", make a link that points to 
"imagedisplay.php/picture.jpg?id=45". PHP will still find your 
imagedisplay.php script, and IE will be happy too.

miguel


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




[PHP] Re: Displaying a 2 column html table with N elements

2002-03-24 Thread David Robley

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hello,
> 
> I am trying to display a HTML table of 2 cells with "n" elements... This means 
> an unknown number of lines.
> 
> I need to use 2 FOR loops (one to determine the number of  and one to 
> create the 2 cells needed). This is a bit to overwellming for me... 
> 
> I have:
> 
> $result = connect_db("select prod_id,photo from prod where cat_id=1");
> $Rows = pg_NumRows($result);
> $lines_TOT = ceil($Rows/2);
> 
> 
> for($TR=0; $TR < $ligne_TOT; $TR++){
> print "\n";
> 
> for($TD=0; $TD < 2;$TD++){
> $photo=pg_Result($result,$TD,photo);
> $prod_id=pg_Result($result,$TD,prod_id);
> print "";
> if ($prod_id != ""){
> print "\n";
> } else {
> print " ";
> }
> print "";
> }
> }
> 
> 
> As you can see, the second loop cant continue to display the next product... So 
> the first line with the 2 images are ok but the other lines are identical, so 
> if I have  10 products, I see only 1 and 2 over 5 lines!
> 
> How can I solve this? To have 2 columns per line, I must limit the loop but I 
> need to continue at that point on the second line...
> 
> Thank you for any assistance!
> 
What about something like:


';
  }
  echo '\n";
  $i++;
}
?>


Uses the modulus operator to keep track of how many rosws/columns you 
have. Untested, of course.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] Re: Non-Cache in forms?

2002-03-24 Thread David Robley

In article <001801c1d38d$6b016eb0$0201a8c0@zaireweb>, 
[EMAIL PROTECTED] says...
> Alright,
> 
> When I submit a form, and shoot out an error, such as "Please fill in email address" 
>and then send them back to the form, the form seems to be blank...
> 
> Why?  What is happening that the form isn't keeping the previously posted data?
> 
> My error function looks like so
> 
> function crapout($msg, $hidden_msg = FASE) {
> echo($msg);
> if($hidden_msg != "FALSE") {
> echo('');
> }
> exit;
> }
> 
> Thanks,
> Eric Coleman
> 

You are aware that exit halts execution of the script?

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




Re: [PHP] Trouble with mysql_pconnect unable to connect to database?

2002-03-24 Thread Jim Hankins

No, the @ was in the right place (if memory serves me the book said this
suppresses the error output.)  The problem was my sock file was not in the
default location so I had to specify it.  If you check the thread the answer
is there on how to find where your sock is located.

Best Regards,
Jim Hankins
"Gerard Samuel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is that supposed to be ->
> $db = @mysql_pconnect("localhost", "bookorama", "bookorama123");
>
> Jim Hankins wrote:
> > I'm doing a simple database connection using the follow syntax:
> >
> > 
> > 
> >   Book-O-Rama Search Results
> > 
> > 
> > Book-O-Rama Search Results
> >  >   if (!$searchtype || !$searchterm)
> >   {
> >  echo "You have not entered search details.  Please go back and try
> > again.";
> >  exit;
> >   }
> >
> >   $searchtype = addslashes($searchtype);
> >   $searchterm = addslashes($searchterm);
> >
> >   @ $db = mysql_pconnect("localhost", "bookorama", "bookorama123");
> >
> >   if (!$db)
> >   {
> >  echo "Error: Could not connect to database.  Please try again
later.";
> >  exit;
> >   }
> >
> > When I go to the search page and hit submit  (after removing the @ to
see an
> > error on the mysql_pconnect line)
> > I get Warning: Can't connect to local MySQL server through socket
> > '/tmp/mysql.sock' (2) in
/home/jhankins/public_html/mydirectory/results.php
> > on line 17
> >
> > I can telnet to the host and with the same username and password access
the
> > database tables etc.  What gives?  I'm using
> > 4.0.6 of PHP and apache under Redhat Linux 7.2.  Mysql is working fine
from
> > command line and remote via odbc?
> >
> > Also tryed mysql_connect with same problem.
> >
> >
> >
> >
> >
> >
>
>



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




Re: [PHP] Image manipulation with PHP on RHLinux 7.1

2002-03-24 Thread Jason Wong

On Monday 25 March 2002 08:06, Dale & Lora Marshall wrote:
> I guess I should clarify.  If the image that's referenced in the
> database is, for example, 700x300, I want to reduce it to 600
> pixels wide, keeping the height proportional.  Then, save that
> image to a new name somewhere else in the filesytem.  Then I want
> to reduce the image further to 300 pixels wide, again keeping the
> height proportional.  And save that image elsewhere.

Manual > Image functions


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

/*
The light at the end of the tunnel may be an oncoming dragon.
*/

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




Re: [PHP] what's "undefined index" ?

2002-03-24 Thread Jason Wong

On Monday 25 March 2002 08:35, Martin Towell wrote:
> "undefined variable" is when you try to use a variable before you set it,
> eg $foobar
> "undefined index" is when you try to reference an array index before you
> set it, eg $foobar[10]

Just to extend the explanation further. The most common cause of undefined 
index is the use of unquoted array keys:

 $doo = array('dah' => 'dib'); 
 echo $doo[dah];   # incorrect, undefined index error
 echo $doo['dah']; # correct, no error



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

/*
Life is a game of bridge -- and you've just been finessed.
*/

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




Re: [PHP] problem with multiple cookies, PHP, and proxypass underapache

2002-03-24 Thread Vincent Cunniffe

Tom Rogers wrote:
 > Hi
 > This may solve your problem
 > http://archive.covalent.net/apache-bugdb/2000/05/0082.xml

Thanks for this and the followup : unfortunately the second patch is
actually incorporated into the main Apache code now, so that's not the
problem.

Also, I've now confirmed that the problem occurs at the proxy rewrite
stage out in the main Apache server, so it's not actually a PHP issue
at all.

I'll go bother the httpd folks so ;-)

regards,

Vin


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




Re: [PHP] Text Editor

2002-03-24 Thread Tyler Longren

If you want a regular text editor, I suggest Textpad or Context.

If you want an IDE, I suggest Maguma.

Tyler

- Original Message - 
From: "Hiroshi Ayukawa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 24, 2002 7:27 PM
Subject: [PHP] Text Editor


> Hello,
> 
> What text editor do you use to write PHP?
> I use Maruo editor http://www.ac.wakwak.com/~tetsuyat/maruo/ more than 1 
> year.
> Is there any better text editor for PHP?
> 
> Thanks,
> Hiroshi Ayukawa
> http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top 
> 
> 
> -- 
> 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 an SQL database and finding the path to SQL

2002-03-24 Thread Ivan Olson

Forgive me for being so new, But i dont know where to start or where to 
start to look for this...

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] problem with multiple cookies, PHP, and proxypass under apache

2002-03-24 Thread Tom Rogers

Hi
Found this follow up too
http://archive.covalent.net/apache-bugdb/2000/05/0084.xml

Tom

At 12:09 PM 25/03/2002, Vincent Cunniffe wrote:
>Hi,
>
>I have an apache server which is configured to pass some requests through to a
>secondary, chrooted apache server. For each virtual domain that passes 
>through,
>I have an entry in httpd.conf which looks like :
>
>   ProxyPass / http://domain.hosted.mydomain.com/
>   ProxyPassReverse  / http://domain.hosted.mydomain.com/
>
>Now, everything runs fine in the secondary server, which has an identical 
>config
>to the first apart from being chrooted. (Identical means that a diff of 
>the two
>config files shows paths only).
>
>However, when a PHP page on the secure server creates more than one cookie and
>attempts to pass it back through the proxy to the client, it doesn't 
>appear. On
>the possibility that it might be a browser issue, I grabbed the raw return 
>data,
>and in fact, there is only one cookie header returned. No matter how many 
>cookies
>I create in PHP, whether multidimensional or of different names, only the very
>last one returns to the client.
>
>If anyone can shed light on this problem, I'd be very grateful.
>
>The full system config is :
>
> Linux 2.2.19, uniprocessor
> Apache 1.3.24
> PHP 4.2
>
>Regards,
>
>Vincent
>
>
>--
>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] problem with multiple cookies, PHP, and proxypass under apache

2002-03-24 Thread Tom Rogers

Hi
This may solve your problem
http://archive.covalent.net/apache-bugdb/2000/05/0082.xml

Tom


At 12:09 PM 25/03/2002, Vincent Cunniffe wrote:
>Hi,
>
>I have an apache server which is configured to pass some requests through to a
>secondary, chrooted apache server. For each virtual domain that passes 
>through,
>I have an entry in httpd.conf which looks like :
>
>   ProxyPass / http://domain.hosted.mydomain.com/
>   ProxyPassReverse  / http://domain.hosted.mydomain.com/
>
>Now, everything runs fine in the secondary server, which has an identical 
>config
>to the first apart from being chrooted. (Identical means that a diff of 
>the two
>config files shows paths only).
>
>However, when a PHP page on the secure server creates more than one cookie and
>attempts to pass it back through the proxy to the client, it doesn't 
>appear. On
>the possibility that it might be a browser issue, I grabbed the raw return 
>data,
>and in fact, there is only one cookie header returned. No matter how many 
>cookies
>I create in PHP, whether multidimensional or of different names, only the very
>last one returns to the client.
>
>If anyone can shed light on this problem, I'd be very grateful.
>
>The full system config is :
>
> Linux 2.2.19, uniprocessor
> Apache 1.3.24
> PHP 4.2
>
>Regards,
>
>Vincent
>
>
>--
>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: Text Editor

2002-03-24 Thread Yasuo Ohgaki

Hiroshi Ayukawa wrote:
> Hello,
> 
> What text editor do you use to write PHP?
> I use Maruo editor http://www.ac.wakwak.com/~tetsuyat/maruo/ more than 1 
> year.
> Is there any better text editor for PHP?

Emacs is _much_ better than HideMaru.

I use emacs for most text editing. If you need multi byte char
under windows, use Meadow (it's a Emacs(Mule) for Windows, kind of).
I use php-mode/folding-mode for PHP sources.

If you are looking for IDE, ZendStudio is the way to go.

--
Yasuo Ohgaki


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




[PHP] Image Displayed From Database

2002-03-24 Thread Shaun Martinec

I'm using mysql to store images that I load through a script called
photo.php. I pass it the ID and it displays the image. No problem. However,
when I right-click on the image in my browser (IE6) and choose properties,
it doesn't seem to recognize the format or size even though I'm sending
Content-Type and Content-Length headers. Are there additional headers I need
to send to get this functionalily or is it just because the file extension
of the script is .php and not .gif or .jpg? Also when I right-click and
choose "Save As" it only lets me save as a bmp. Again, it displays fine, I
would just like to make it work like a real image.



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




Re: [PHP] Why?

2002-03-24 Thread maxwello

See also:
http://www.tuxedo.org/~esr/jargon/html/entry/metasyntactic-variable.html

Maxwell

> > Why everyone uses $foo or $foobar as examples?
>
> http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo



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




[PHP] problem with multiple cookies, PHP, and proxypass under apache

2002-03-24 Thread Vincent Cunniffe

Hi,

I have an apache server which is configured to pass some requests through to a
secondary, chrooted apache server. For each virtual domain that passes through,
I have an entry in httpd.conf which looks like :

   ProxyPass / http://domain.hosted.mydomain.com/
   ProxyPassReverse  / http://domain.hosted.mydomain.com/

Now, everything runs fine in the secondary server, which has an identical config
to the first apart from being chrooted. (Identical means that a diff of the two
config files shows paths only).

However, when a PHP page on the secure server creates more than one cookie and
attempts to pass it back through the proxy to the client, it doesn't appear. On
the possibility that it might be a browser issue, I grabbed the raw return data,
and in fact, there is only one cookie header returned. No matter how many cookies
I create in PHP, whether multidimensional or of different names, only the very
last one returns to the client.

If anyone can shed light on this problem, I'd be very grateful.

The full system config is :

 Linux 2.2.19, uniprocessor
 Apache 1.3.24
 PHP 4.2

Regards,

Vincent


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




Re: [PHP] [NEWMAN] Why?

2002-03-24 Thread Philip J. Newman

Good good question?

- Original Message - 
From: "Alberto Wagner" <[EMAIL PROTECTED]>
To: "Php General Mailling List" <[EMAIL PROTECTED]>
Sent: Sunday, March 31, 2002 2:39 PM
Subject: [PHP] Why?


> Why everyone uses $foo or $foobar as examples?
> 
> 
> 
> 
> -- 
> 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] Why?

2002-03-24 Thread Martin Towell

could also use $blah, $test, $temp, $xxx, etc, but it's what a lot of are
used to, I guess


-Original Message-
From: Zak Greant [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:16 PM
To: Alberto Wagner; Php General Mailling List
Subject: Re: [PHP] Why?


On March 31, 2002 04:39, Alberto Wagner wrote:
> Why everyone uses $foo or $foobar as examples?

http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo


--zak

-- 
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] Text Editor

2002-03-24 Thread Hiroshi Ayukawa

Hello,

What text editor do you use to write PHP?
I use Maruo editor http://www.ac.wakwak.com/~tetsuyat/maruo/ more than 1 
year.
Is there any better text editor for PHP?

Thanks,
Hiroshi Ayukawa
http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top 


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




RE: [PHP] Retrieving POP mail

2002-03-24 Thread Kearns, Terry

> 
> Did you read php.net/imap_open  ?

I only just found this. I've been going through the functions and there a so
many of them (a good thing) that I couldn't find the information I needed.
Now that I have read the imap_open() function, I feel a bit silly about
saying the doco is sparse.

Now I'm trying to figure out how to list the messages in that mailbox. 

All I want is a way to "list all messages" then I can use the other
functions to retrieve the details.

Don't worry, I think I will eventually figure it out.

When I do, I'll have to make a tutorial so others can also see an example of
a simple application of mailbox checking.

I must say, the range of functions is quite impressive :)




[TK] 

> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 25 March 2002 11:04 AM
> To: Kearns, Terry
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Retrieving POP mail
> 
> 
> Did you read php.net/imap_open  ?
> 
> On Mon, 25 Mar 2002, Kearns, Terry wrote:
> 
> > The documentation for the IMAP functions is, er, virtually 
> > non-existent. I'm not looking to read several sets of RFCs - all I 
> > want to do it check a POP account on Exchange for messages and 
> > retrieve them.
> >
> > Does anyone know if there is a tutorial on this somewhere?
> >
> >
> > [TK]
> >
> > --
> > 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] Why?

2002-03-24 Thread Zak Greant

On March 31, 2002 04:39, Alberto Wagner wrote:
> Why everyone uses $foo or $foobar as examples?

http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo


--zak

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




[PHP] Why?

2002-03-24 Thread Alberto Wagner

Why everyone uses $foo or $foobar as examples?




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




[PHP] mcrypt kills Apache children

2002-03-24 Thread Thalis A. Kalfigopoulos

I have PHP4.1.2 with libmcrypt4.2.22. I had a script that worked just fine yesterday 
testing an mcrypt scenario, and (of course) today it just kills the httpd serving the 
page and I get this in error_log:
[Sun Mar 24 08:31:36 2002] [notice] child pid 1049 exit signal Segmentation fault (11)

The script looks more or less as follows:

$input="text";
$key="key";
$enc_descr=mcrypt_module_open(MCRYPT_RIJNDAEL_256,"",MCRYPT_MODE_CBC,"");
srand((double)microtime()*100);
$init_vector=mcrypt_create_iv(mcrypt_enc_get_iv_size($enc_descr),MCRYPT_RAND);
mcrypt_generic_init($enc_descr,$key,$init_vector);
$max_key_len=mcrypt_enc_get_key_size($enc_descr);
if(strlen($key)>=$max_key_len){
//truncate the key to a valid length
$key=substr($key,0,$max_key_len);
}
$encrypted_data=mcrypt_generic($enc_descr,$input);
$base64enc_encrypted_data=base64_encode($encrypted_data);
mcrypt_generic_end($enc_descr);

Something I'm missing? I found somewhere on the mcrypt page saying "compile with 
--disable-posix-threads". Can anyone verify this is the problem before I get into 
recompiling everything?

TIA,
thalis


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




[PHP] Re: [PHP-DEV] Resume of my problem

2002-03-24 Thread Zak Greant

On March 25, 2002 01:50, you wrote:
> HI,
>
> I have a functino write in c, like as:
>
> void addvalue ( int a, int b, int *c )
> {
>   *c = a + b;
> }
>
>in php
>
> 
>   phpinclude ("alexlib");
>   addvalue ( 1, 2, c );
>   print ( "Value c = $c ");
>
> ?>
>
> what the procedure to make this ?

  To briefly answer your question:

  You could write code like this:

  function av ($a, $b, &$c) {
 $c = $a + $b;
  }
  
  For more information, review the section on References
  and Functions in the PHP manual.

  --zak

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




RE: [PHP] what's "undefined index" ?

2002-03-24 Thread Martin Towell

"undefined variable" is when you try to use a variable before you set it, eg
$foobar
"undefined index" is when you try to reference an array index before you set
it, eg $foobar[10]

-Original Message-
From: Kai Schaetzl [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 11:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] what's "undefined index" ?


When I enable display of warnings I get an "undefined index" warning 
instead of an "undefined variable" for some variables.

Why and what's the difference?

Warning: Undefined index: KundeRemark in 
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line 
138

Warning: Undefined variable: KundeStatusNeu_show in 
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line 
192



Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




-- 
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 Digest 25 Mar 2002 00:32:21 -0000 Issue 1246

2002-03-24 Thread php-general-digest-help


php-general Digest 25 Mar 2002 00:32:21 - Issue 1246

Topics (messages 89907 through 89951):

Re: How to reduce an array to n values?
89907 by: Jacob Wyke
89909 by: Andy
89923 by: [-^-!-%-
89926 by: Thalis A. Kalfigopoulos

storing PDF in a database
89908 by: Alain DESEINE

DOMXML and encodings (php4.1.2, libxml2.4.16)
89910 by: Lucky
89913 by: Stefan Livieratos

HELP! Open "HTTPS://";, and follow rediect header
89911 by: Zlutarch G.
89914 by: Stefan Livieratos

Re: Retreiving website contents
89912 by: Craig Westerman

Re: Problem with special characters
89915 by: Jason Wong

Re: PHPTriad Error in Windows XP.
89916 by: Avdija A.Ahmedhodzic

Re: Stripslashes & addslashes question ...
89917 by: Johnson, Kirk

Re: test...
89918 by: Avdija A.Ahmedhodzic

forms and inputs
89919 by: Vlad Kulchitski
89922 by: S
89927 by: Vlad Kulchitski
89928 by: [-^-!-%-
89933 by: Jason Sheets
89935 by: S

Rebuilding PHP4 with IBM DB2 Support Causes Apache to Die Upon Restart
89920 by: Derek Battams

socket functions and singnals
89921 by: Michael Govorun

rpm -ba php.spec fails
89924 by: David McInnis

Creating table in mySQL db
89925 by: Piotr Skorupski
89930 by: TV Karthick Kumar
89934 by: Demitrious S. Kelly

Displaying a 2 column html table with N elements
89929 by: Marc Andre Paquin

Re: PHP and xEmacs
89931 by: Gunter Ohrner

Problem ?
89932 by: ren

Re: Image Manipulation/GD support
89936 by: Richard Archer

upload forms, how much was uploaded before upload fails..
89937 by: Gerhard Hoogterp
89938 by: Rasmus Lerdorf

Re: Using EditPlus with PHP
89939 by: Martin Towell
89941 by: Mantas Kriauciunas
89945 by: Martin Towell

The CGI open source foundry needs members - Reedited
89940 by: David Duong

header and session?
89942 by: bob

Retrieving POP mail
89943 by: Kearns, Terry
89949 by: Rasmus Lerdorf

Image manipulation with PHP on RHLinux 7.1
89944 by: Dale & Lora Marshall
89946 by: Thalis A. Kalfigopoulos
89948 by: Dale & Lora Marshall

Non-Cache in forms?
89947 by: eric.coleman.zaireweb.com

PHP - hosting tips
89950 by: Rudi Starcevic

what's "undefined index" ?
89951 by: Kai Schaetzl

Administrivia:

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

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

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


--

--- Begin Message ---

Use array_slice().

$output = array_slice ($input, 0, 3);

will return the first three values of the array.

Check out http://www.php.net/manual/en/function.array-slice.php for more
details.



-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 24 March 2002 12:31
To: [EMAIL PROTECTED]
Subject: [PHP] How to reduce an array to n values?


Hi there,

I am trying to reduce an array to n values if it is more than n values.

eg.

$level_depth = 3;
$test = array('banana', 'super', 'php', 'car');

# some array function which is deleting  the last item ( car) if existant

Thanx for any help,

Andy



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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

^thanx.



"Jacob Wyke" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use array_slice().
>
> $output = array_slice ($input, 0, 3);
>
> will return the first three values of the array.
>
> Check out http://www.php.net/manual/en/function.array-slice.php for more
> details.
>
>
>
> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: 24 March 2002 12:31
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to reduce an array to n values?
>
>
> Hi there,
>
> I am trying to reduce an array to n values if it is more than n values.
>
> eg.
>
> $level_depth = 3;
> $test = array('banana', 'super', 'php', 'car');
>
> # some array function which is deleting  the last item ( car) if existant
>
> Thanx for any help,
>
> Andy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>



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



 Use array_pop.
 See the manual.

-j

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
-+___+-

On Sun, 24 Mar 2002,

[PHP] what's "undefined index" ?

2002-03-24 Thread Kai Schaetzl

When I enable display of warnings I get an "undefined index" warning 
instead of an "undefined variable" for some variables.

Why and what's the difference?

Warning: Undefined index: KundeRemark in 
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line 
138

Warning: Undefined variable: KundeStatusNeu_show in 
C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line 
192



Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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




[PHP] PHP - hosting tips

2002-03-24 Thread Rudi Starcevic

Hi friends,

Here at work we are gearing up to host PHP applications.

Could anyone point me towards some tips on PHP hositng ?
I'm interested in preparing my PHP server so that it is as secure as 
possible.

Thanks
Kind regards
Rudi Starcevic.




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




Re: [PHP] Retrieving POP mail

2002-03-24 Thread Rasmus Lerdorf

Did you read php.net/imap_open  ?

On Mon, 25 Mar 2002, Kearns, Terry wrote:

> The documentation for the IMAP functions is, er, virtually non-existent. I'm
> not looking to read several sets of RFCs - all I want to do it check a POP
> account on Exchange for messages and retrieve them.
>
> Does anyone know if there is a tutorial on this somewhere?
>
>
> [TK]
>
> --
> 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] Image manipulation with PHP on RHLinux 7.1

2002-03-24 Thread Dale & Lora Marshall


I guess I should clarify.  If the image that's referenced in the
database is, for example, 700x300, I want to reduce it to 600
pixels wide, keeping the height proportional.  Then, save that
image to a new name somewhere else in the filesytem.  Then I want
to reduce the image further to 300 pixels wide, again keeping the
height proportional.  And save that image elsewhere.

Ideas?

- Dale


At 3/24/02 06:30 PM, you wrote:
>This isn't image manipulation. This is filesystem manipulation.
>As for the "resizing", check if you have mogrify with you Linux 
>installation and do a system() on it.
>
>cheers,
>--t.
>
>
>On Sun, 24 Mar 2002, Dale & Lora Marshall wrote:
>
> >
> > Hello all.  I have a PHP script which retrieves records from a database,
> > and one field in the record is the path to an image.  I want to do things
> > with this image:
> >
> > See what it's size (pixes) is
> > Resize it if necessary
> > Move it to a different location
> >
> > Can someone give me an idea on how to do this?  I'm running PHP 4.1.2 on
> > Red Hat Linux 7.1
> >
> > Thanks!
> >
> > - Dale
> >
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Dale & Lora MarshallInternet Marketing Services
> > http://lonestar.texas.net/~marshal1 http://www.internet-ms.com
> > [EMAIL PROTECTED][EMAIL PROTECTED]
> >  [EMAIL PROTECTED]
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dale & Lora MarshallInternet Marketing Services
http://lonestar.texas.net/~marshal1 http://www.internet-ms.com
[EMAIL PROTECTED][EMAIL PROTECTED]
 [EMAIL PROTECTED]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




[PHP] Non-Cache in forms?

2002-03-24 Thread eric.coleman

Alright,

When I submit a form, and shoot out an error, such as "Please fill in email address" 
and then send them back to the form, the form seems to be blank...

Why?  What is happening that the form isn't keeping the previously posted data?

My error function looks like so

function crapout($msg, $hidden_msg = FASE) {
echo($msg);
if($hidden_msg != "FALSE") {
echo('');
}
exit;
}

Thanks,
Eric Coleman



Re: [PHP] Image manipulation with PHP on RHLinux 7.1

2002-03-24 Thread Thalis A. Kalfigopoulos

This isn't image manipulation. This is filesystem manipulation.
As for the "resizing", check if you have mogrify with you Linux installation and do a 
system() on it.

cheers,
--t.


On Sun, 24 Mar 2002, Dale & Lora Marshall wrote:

> 
> Hello all.  I have a PHP script which retrieves records from a database,
> and one field in the record is the path to an image.  I want to do things
> with this image:
> 
> See what it's size (pixes) is
> Resize it if necessary
> Move it to a different location
> 
> Can someone give me an idea on how to do this?  I'm running PHP 4.1.2 on
> Red Hat Linux 7.1
> 
> Thanks!
> 
> - Dale
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Dale & Lora MarshallInternet Marketing Services
> http://lonestar.texas.net/~marshal1 http://www.internet-ms.com
> [EMAIL PROTECTED][EMAIL PROTECTED]
>  [EMAIL PROTECTED]
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> 
> -- 
> 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: Re[2]: [PHP] Using EditPlus with PHP

2002-03-24 Thread Martin Towell

try mucking around with the include path in php.ini
I've managed to get it to work, but then I've got to change it for other
reasons, then I can't remember how I had it before - next time I'll have to
remember to just comment out the line and create a new one...

-Original Message-
From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:15 PM
To: PHP General List
Subject: Re[2]: [PHP] Using EditPlus with PHP


Hey PHP General List,

I have problem also with editplus. Well i have same as Martin has but
i get warning = " Unable to load dynamic library
'c:\web\php\extensions/php_java.dll' - The specified modyle could not
be found. " But what is interesting that php_java.dll is in the place
in that directory and it doesn't find it. Well any suggestions what
should i do ?

Thanks

:

Got your email on:Sunday, March 24, 2002, 2:25:02 PM writing:

MT> Doesn't look like anyone's replied to this...

MT> I just have a button with the following parameters

MT> Menu Text: Parse w/ PHP4-> I have a "Parse w/ PHP3" and "Parse
w/
MT> PHP-GTK" :)
MT> Command: C:\Program Files\httpd\php\php.exe
MT> Argument: $(FilePath)
MT> Initial directory: $(FileDir)

MT> and I have the "Capture output" checkbox selected

MT> HTH
MT> Martin

MT> -Original Message-
MT> From: Luca Grossi [mailto:[EMAIL PROTECTED]]
MT> Sent: Sunday, March 24, 2002 2:00 PM
MT> To: [EMAIL PROTECTED]
MT> Subject: [PHP] Using EditPlus with PHP


MT>  I'm sorry if this question has been asked
before
MT> but could anyone give me instructions on how to debug and interpret php
MT> scripts using Edit Plus ? I download the php modules for edit plus so
MT> it recognise the syntax. But how do I setup the user tools , so I can
check
MT> for bugs in the script and run it

MT> Thanks



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



-- 
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] Image manipulation with PHP on RHLinux 7.1

2002-03-24 Thread Dale & Lora Marshall


Hello all.  I have a PHP script which retrieves records from a database,
and one field in the record is the path to an image.  I want to do things
with this image:

See what it's size (pixes) is
Resize it if necessary
Move it to a different location

Can someone give me an idea on how to do this?  I'm running PHP 4.1.2 on
Red Hat Linux 7.1

Thanks!

- Dale



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dale & Lora MarshallInternet Marketing Services
http://lonestar.texas.net/~marshal1 http://www.internet-ms.com
[EMAIL PROTECTED][EMAIL PROTECTED]
 [EMAIL PROTECTED]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


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




[PHP] Retrieving POP mail

2002-03-24 Thread Kearns, Terry

The documentation for the IMAP functions is, er, virtually non-existent. I'm
not looking to read several sets of RFCs - all I want to do it check a POP
account on Exchange for messages and retrieve them.

Does anyone know if there is a tutorial on this somewhere?


[TK] 

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




[PHP] header and session?

2002-03-24 Thread bob

 1.php?2.php
session_start(); session_start();
.. ..
$_SESSION['a'] =$a; echo $_SESSION['a']; 
$_SESSION['b'] =$b; echo $_SESSION['b']; 
header("location: 2.php");

after jump to 2.php ,there is an warning: undefined index a ,b


if i  change 1.php  to

session_start(); 
..  
$_SESSION['a'] =$a;
$_SESSION['b'] =$b;
go on 

it works well!


Best regards and thanks in advance,
bob

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




Re[2]: [PHP] Using EditPlus with PHP

2002-03-24 Thread Mantas Kriauciunas

Hey PHP General List,

I have problem also with editplus. Well i have same as Martin has but
i get warning = " Unable to load dynamic library
'c:\web\php\extensions/php_java.dll' - The specified modyle could not
be found. " But what is interesting that php_java.dll is in the place
in that directory and it doesn't find it. Well any suggestions what
should i do ?

Thanks

:

Got your email on:Sunday, March 24, 2002, 2:25:02 PM writing:

MT> Doesn't look like anyone's replied to this...

MT> I just have a button with the following parameters

MT> Menu Text: Parse w/ PHP4-> I have a "Parse w/ PHP3" and "Parse w/
MT> PHP-GTK" :)
MT> Command: C:\Program Files\httpd\php\php.exe
MT> Argument: $(FilePath)
MT> Initial directory: $(FileDir)

MT> and I have the "Capture output" checkbox selected

MT> HTH
MT> Martin

MT> -Original Message-
MT> From: Luca Grossi [mailto:[EMAIL PROTECTED]]
MT> Sent: Sunday, March 24, 2002 2:00 PM
MT> To: [EMAIL PROTECTED]
MT> Subject: [PHP] Using EditPlus with PHP


MT>  I'm sorry if this question has been asked before
MT> but could anyone give me instructions on how to debug and interpret php
MT> scripts using Edit Plus ? I download the php modules for edit plus so
MT> it recognise the syntax. But how do I setup the user tools , so I can check
MT> for bugs in the script and run it

MT> Thanks



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




[PHP] The CGI open source foundry needs members - Reedited

2002-03-24 Thread David Duong

Is their anyone who would like to join the CGI Open Source Foundry (COSF)?

COSF will be a CGI foundry that produces scripts from:

 - The existing projects of its members (which means if you have a project
in the works which was supposed to be finished a year ago right before you
started on the new one)
 - The Scripts which have been abandoned because the scripter lost his/her
interest in.
 - From the brain child of any of our members.

I am planning to make a CGI Open Source Foundry

After the Foundry is initally set-up we will begin to release scripts.

The main goal would be to improve our skills, start something and actually
finish it quickly and better than designed.




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




RE: [PHP] Using EditPlus with PHP

2002-03-24 Thread Martin Towell

Doesn't look like anyone's replied to this...

I just have a button with the following parameters

Menu Text: Parse w/ PHP4-> I have a "Parse w/ PHP3" and "Parse w/
PHP-GTK" :)
Command: C:\Program Files\httpd\php\php.exe
Argument: $(FilePath)
Initial directory: $(FileDir)

and I have the "Capture output" checkbox selected

HTH
Martin

-Original Message-
From: Luca Grossi [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 24, 2002 2:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Using EditPlus with PHP


 I'm sorry if this question has been asked before
but could anyone give me instructions on how to debug and interpret php
scripts using Edit Plus ? I download the php modules for edit plus so
it recognise the syntax. But how do I setup the user tools , so I can check
for bugs in the script and run it

Thanks



-- 
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] upload forms, how much was uploaded before upload fails..

2002-03-24 Thread Rasmus Lerdorf

You'll probably need PHP 4.2 for uploads that big to work well.  Before
4.2 uploads were buffered in ram, so no, you have no way to recover a
broken upload.

On Sun, 24 Mar 2002, Gerhard Hoogterp wrote:

> Hello all,
>
> I'm still having problems uploading BIG files (15MB and more)  Is there a way
>  to find howmuch data was uploaded before the connection was broken?
>
> For some weird reason no browser has a half decent user feedback if it come
> to upload forms.
>
> Gerhard
>
> --
> ICQ: 4502226
>
> --
> 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] upload forms, how much was uploaded before upload fails..

2002-03-24 Thread Gerhard Hoogterp

Hello all,

I'm still having problems uploading BIG files (15MB and more)  Is there a way 
 to find howmuch data was uploaded before the connection was broken? 

For some weird reason no browser has a half decent user feedback if it come 
to upload forms.

Gerhard

-- 
ICQ: 4502226

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




Re: [PHP] Image Manipulation/GD support

2002-03-24 Thread Richard Archer

At 8:17 PM -0800 23/3/02, Rasmus Lerdorf wrote:

>failing.  I use gd2 these days because the 8-bit limitation of gd1 just
>sucks.  You can find my simple gd2 instructions here
>http://www.php.net/~rasmus/gd.html

I found that enabling GD and freetype support in php-4.1.2 was not
this simple. php-4.1.2 seems to require gd-2.0.2 which has not yet
been released.

Here's a description of how I got it working:
http://mel01.juggernaut.com.au/patches/gd/

 ...Richard.

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




RE: [PHP] forms and inputs

2002-03-24 Thread S

You have to put quotes around the value or else you won't get anything pass
the space.

WRONG:


RIGHT:





-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: March 24, 2002 3:10 PM
To: S; [EMAIL PROTECTED]
Subject: RE: [PHP] forms and inputs


Hi continuing with the same issue I just found another bug in my code.
Basically I have a script myfile.php, based on codition it goes through
submit process STEP 1 through 4. It takes along the values it has collected
via:







And so on, on the final stage it submits everything is has collected to the
database. What I noticed now is that if I type name with space, like "Mister
Simpson" or again like I mentioned before if I type a sentence in step 2 on
the final stage it gets lost. You can check how it works here:

http://kulchitski.com/btl/btl.php?lang=eng&page=talkroom_submit

If anyone knows how to overcome the problem, please help.

Thanks,
Vlad

-Original Message-
From: S [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 24, 2002 2:34 PM
To: Vlad Kulchitski; [EMAIL PROTECTED]
Subject: RE: [PHP] forms and inputs

Your input tag should look like this:



-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: March 24, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] forms and inputs


Hi,

Can anyone suggest anything regarding the following problem.

Basically, I ask the user to type a few sentences, in
 and on the next page I show everything
s/he typed asking "Are you sure you want to submit this...

Once clicked "YES" all data is being taken to the next page for
FINAL submission to mysql. (all is done in one php script though)

But anyway, the problem is that when I see the final data in the
database, there's only 1 word from the sentence the used has typed
in, i.e if I submit "Hello my name is Vlad", the only word that will
end up in the database would be "Hello". What is the best solution to
overcome this?

Thanks,
Vlad

--
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] Creating table in mySQL db

2002-03-24 Thread Demitrious S. Kelly

http://www.apokalyptik.com/ftp/src/bin/ftp_indexer.phps

look at the "Create table" sql queries I used...

-Original Message-
From: Piotr Skorupski [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 24, 2002 11:59 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Creating table in mySQL db

Hello

Is there a way to create a teble in mySQL database by PHP?


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




Re: [PHP] forms and inputs

2002-03-24 Thread Jason Sheets

As the previous poster said you need to have " around your value in your
input tag

Instead of  you need to be using 

Otherwise the browser is only displaying the first word, this is not a PHP
problem, this is a html coding mistake.

PHP Code Example:



Jason
"Vlad Kulchitski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi continuing with the same issue I just found another bug in my code.
Basically I have a script myfile.php, based on codition it goes through
submit process STEP 1 through 4. It takes along the values it has collected
via:







And so on, on the final stage it submits everything is has collected to the
database. What I noticed now is that if I type name with space, like "Mister
Simpson" or again like I mentioned before if I type a sentence in step 2 on
the final stage it gets lost. You can check how it works here:

http://kulchitski.com/btl/btl.php?lang=eng&page=talkroom_submit

If anyone knows how to overcome the problem, please help.

Thanks,
Vlad

-Original Message-
From: S [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 24, 2002 2:34 PM
To: Vlad Kulchitski; [EMAIL PROTECTED]
Subject: RE: [PHP] forms and inputs

Your input tag should look like this:



-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: March 24, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] forms and inputs


Hi,

Can anyone suggest anything regarding the following problem.

Basically, I ask the user to type a few sentences, in
 and on the next page I show everything
s/he typed asking "Are you sure you want to submit this...

Once clicked "YES" all data is being taken to the next page for
FINAL submission to mysql. (all is done in one php script though)

But anyway, the problem is that when I see the final data in the
database, there's only 1 word from the sentence the used has typed
in, i.e if I submit "Hello my name is Vlad", the only word that will
end up in the database would be "Hello". What is the best solution to
overcome this?

Thanks,
Vlad

--
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] Problem ?

2002-03-24 Thread ren

if I through the proxy server view our Php website ,sometime I got
proxy error page. The message is "64 The specified network name is no longer available 
",when I refresh it will be ok.
 if I do not through the proxy,I never got error.
Anyidea ?
Thanks
Jim




[PHP] Re: PHP and xEmacs

2002-03-24 Thread Gunter Ohrner

Gunter Ohrner wrote:
> I use psgml-html and Turadg Aleahmad's php-mode 1.0.2 (I just tried it
> with Fred Yankowski, too, getting excactly the same results) and tried to
> combine both using mmm-mode 0.4.7.
> So far it does work, however I cannot indent the embedded php-code at
> all... :-( Pressing TAB in a line just causes its indentation to get lost, 

To answer my own question: Using the latest mmm-mode from CVS fixes that, 
indentation still is not perfect but it does at least work - and not too 
bad at all. :-)

Greetinx,

  Gunter Ohrner

-- 
If the Creator had said, "Let there be light" in Ankh-Morpork, he'd have 
gotten no further because of all the people saying "What colour?"-- 
(Terry Pratchett, Men At Arms)
-+-+-+-+-+- PDEPP Webserver:  http://pdepp.SourceForge.net/ -+-+-+-+-+-


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




Re: [PHP] Creating table in mySQL db

2002-03-24 Thread TV Karthick Kumar

Hi,

That's very simple. All you have to do it, connect to the mysql on the
host and then execute the 'create table..' querty, that's all... You can
find good tutorials at webmonkey.com and devshed.com.. and lot more

Hope this helps.

Hth,
Karthick


- Original Message -
From: "Piotr Skorupski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 24, 2002 8:58 PM
Subject: [PHP] Creating table in mySQL db


Hello

Is there a way to create a teble in mySQL database by PHP?



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Displaying a 2 column html table with N elements

2002-03-24 Thread Marc Andre Paquin

Hello,

I am trying to display a HTML table of 2 cells with "n" elements... This means 
an unknown number of lines.

I need to use 2 FOR loops (one to determine the number of  and one to 
create the 2 cells needed). This is a bit to overwellming for me... 

I have:

$result = connect_db("select prod_id,photo from prod where cat_id=1");
$Rows = pg_NumRows($result);
$lines_TOT = ceil($Rows/2);


for($TR=0; $TR < $ligne_TOT; $TR++){
print "\n";

for($TD=0; $TD < 2;$TD++){
$photo=pg_Result($result,$TD,photo);
$prod_id=pg_Result($result,$TD,prod_id);
print "";
if ($prod_id != ""){
print "\n";
} else {
print " ";
}
print "";
}
}


As you can see, the second loop cant continue to display the next product... So 
the first line with the 2 images are ok but the other lines are identical, so 
if I have  10 products, I see only 1 and 2 over 5 lines!

How can I solve this? To have 2 columns per line, I must limit the loop but I 
need to continue at that point on the second line...

Thank you for any assistance!
-- 
Marc André Paquin

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




Re: [PHP] forms and inputs

2002-03-24 Thread [-^-!-%-



 You need to add quotes (" ") arround the PHP variable that displays your
text.

 In your case, it should be something like:

  


-john

On Sun, 24 Mar 2002, Vlad Kulchitski wrote:

> Hi,
>
> Can anyone suggest anything regarding the following problem.
>
> Basically, I ask the user to type a few sentences, in
>  and on the next page I show everything
> s/he typed asking "Are you sure you want to submit this...
>
> Once clicked "YES" all data is being taken to the next page for
> FINAL submission to mysql. (all is done in one php script though)
>
> But anyway, the problem is that when I see the final data in the
> database, there's only 1 word from the sentence the used has typed
> in, i.e if I submit "Hello my name is Vlad", the only word that will
> end up in the database would be "Hello". What is the best solution to
> overcome this?
>
> Thanks,
> Vlad
>
> --
> 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] forms and inputs

2002-03-24 Thread Vlad Kulchitski

Hi continuing with the same issue I just found another bug in my code. Basically I 
have a script myfile.php, based on codition it goes through submit process STEP 1 
through 4. It takes along the values it has collected via:







And so on, on the final stage it submits everything is has collected to the database. 
What I noticed now is that if I type name with space, like "Mister Simpson" or again 
like I mentioned before if I type a sentence in step 2 on the final stage it gets 
lost. You can check how it works here:

http://kulchitski.com/btl/btl.php?lang=eng&page=talkroom_submit

If anyone knows how to overcome the problem, please help.

Thanks,
Vlad

-Original Message-
From: S [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 24, 2002 2:34 PM
To: Vlad Kulchitski; [EMAIL PROTECTED]
Subject: RE: [PHP] forms and inputs

Your input tag should look like this:



-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: March 24, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] forms and inputs


Hi,

Can anyone suggest anything regarding the following problem.

Basically, I ask the user to type a few sentences, in 
 and on the next page I show everything
s/he typed asking "Are you sure you want to submit this...

Once clicked "YES" all data is being taken to the next page for
FINAL submission to mysql. (all is done in one php script though)

But anyway, the problem is that when I see the final data in the
database, there's only 1 word from the sentence the used has typed
in, i.e if I submit "Hello my name is Vlad", the only word that will
end up in the database would be "Hello". What is the best solution to
overcome this?

Thanks,
Vlad

-- 
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] How to reduce an array to n values?

2002-03-24 Thread Thalis A. Kalfigopoulos

Use array_splice or better array_slice.

array_slice($orig_array,0,n);


cheers,
--t.


On Sun, 24 Mar 2002, [-^-!-%- wrote:

> 
> 
>  Use array_pop.
>  See the manual.
> 
> -j
> 
> __John Monfort_
> _+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
> -+___+-
> 
> On Sun, 24 Mar 2002, Andy wrote:
> 
> > Hi there,
> >
> > I am trying to reduce an array to n values if it is more than n values.
> >
> > eg.
> >
> > $level_depth = 3;
> > $test = array('banana', 'super', 'php', 'car');
> >
> > # some array function which is deleting  the last item ( car) if existant
> >
> > Thanx for any help,
> >
> > Andy
> >
> >
> >
> > --
> > 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] Creating table in mySQL db

2002-03-24 Thread Piotr Skorupski

Hello

Is there a way to create a teble in mySQL database by PHP?



[PHP] rpm -ba php.spec fails

2002-03-24 Thread David McInnis

I am using RPM 4.0.2 on the YellowDog 2.1 Distro.

rpm -b php.spec yields the following:

[root@cpdev1 SPECS]# rpm -b php.spec
-b: unknown option

Is there something wrong with my version of RPM?  When I type, rpm -ba
php.spec, I get nothing but the following:

 output 

[root@cpdev1 SPECS]# rpm -ba php.spec
RPM version 4.0.2
Copyright (C) 1998-2000 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm {--help}
   rpm {--version}
   rpm {--initdb}   [--dbpath ]
   rpm {--install -i} [-v] [--hash -h] [--percent] [--force]
[--test]
[--replacepkgs] [--replacefiles] [--root ]
[--excludedocs] [--includedocs] [--noscripts]
[--rcfile ] [--ignorearch] [--dbpath
]
[--prefix ] [--ignoreos] [--nodeps]
[--allfiles]
[--ftpproxy ] [--ftpport ]
[--httpproxy ] [--httpport ]
[--justdb] [--noorder] [--relocate
oldpath=newpath]
[--badreloc] [--notriggers] [--excludepath
]
[--ignoresize] file1.rpm ... fileN.rpm
   rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force]
[--test]
[--oldpackage] [--root ] [--noscripts]
[--excludedocs] [--includedocs] [--rcfile
]
[--ignorearch]  [--dbpath ] [--prefix
]
[--ftpproxy ] [--ftpport ]
[--httpproxy ] [--httpport ]
[--ignoreos] [--nodeps] [--allfiles] [--justdb]
[--noorder] [--relocate oldpath=newpath]
[--badreloc] [--excludepath ]
[--ignoresize]
file1.rpm ... fileN.rpm
   rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]
[--scripts] [--root ] [--rcfile ]
[--whatprovides] [--whatrequires] [--requires]
[--triggeredby]
[--ftpproxy ] [--ftpport ]
[--httpproxy ] [--httpport ]
[--provides] [--triggers] [--dump]
[--changelog] [--dbpath ] [targets]
   rpm {--verify -V -y} [-afpg] [--root ] [--rcfile ]
[--dbpath ] [--nodeps] [--nofiles]
[--noscripts]
[--nomd5] [targets]
   rpm {--setperms} [-afpg] [target]
   rpm {--setugids} [-afpg] [target]
   rpm {--freshen -F} file1.rpm ... fileN.rpm
   rpm {--erase -e} [--root ] [--noscripts] [--rcfile ]
[--dbpath ] [--nodeps] [--allmatches]
[--justdb] [--notriggers] package1 ... packageN
   rpm {--resign} [--rcfile ] package1 package2 ... packageN
   rpm {--addsign} [--rcfile ] package1 package2 ... packageN
   rpm {--checksig -K} [--nopgp] [--nogpg] [--nomd5] [--rcfile
]
   package1 ... packageN
   rpm {--rebuilddb} [--rcfile ] [--dbpath ]
   rpm {--querytags}




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




Re: [PHP] How to reduce an array to n values?

2002-03-24 Thread [-^-!-%-



 Use array_pop.
 See the manual.

-j

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
-+___+-

On Sun, 24 Mar 2002, Andy wrote:

> Hi there,
>
> I am trying to reduce an array to n values if it is more than n values.
>
> eg.
>
> $level_depth = 3;
> $test = array('banana', 'super', 'php', 'car');
>
> # some array function which is deleting  the last item ( car) if existant
>
> Thanx for any help,
>
> Andy
>
>
>
> --
> 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] forms and inputs

2002-03-24 Thread S

Your input tag should look like this:



-Original Message-
From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]]
Sent: March 24, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] forms and inputs


Hi,

Can anyone suggest anything regarding the following problem.

Basically, I ask the user to type a few sentences, in 
 and on the next page I show everything
s/he typed asking "Are you sure you want to submit this...

Once clicked "YES" all data is being taken to the next page for
FINAL submission to mysql. (all is done in one php script though)

But anyway, the problem is that when I see the final data in the
database, there's only 1 word from the sentence the used has typed
in, i.e if I submit "Hello my name is Vlad", the only word that will
end up in the database would be "Hello". What is the best solution to
overcome this?

Thanks,
Vlad

-- 
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] socket functions and singnals

2002-03-24 Thread Michael Govorun

Socket functions, such as socket_read(), socket_accept() blocking
signal handling in php-processes. Is it bug? Is there any way to use
signals and socket_accept() together?

Please, help!

-- 
Michael Govorun

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




[PHP] Rebuilding PHP4 with IBM DB2 Support Causes Apache to Die Upon Restart

2002-03-24 Thread Derek Battams

Currently I have Apache and PHP4 (using the Apache module for PHP4) working
just fine on my server.  However, the RPMs I installed for mod_php4 didn't
include IBM DB2 support.  So I took the source RPM and modified it by simply
adding the following line to the spec file:

--with-ibm-db2

I appended this to the CFLAGS parameter in the spec file.  I then rebuilt
the RPMs and everything built fine.  I then installed them and that was
fine.  However, when I try to restart Apache nothing happens.  It just exits
immediately with nothing written to any logs.  If I remove the
'--with-ibm-db2' flag from the spec file, rebuild the RPMs, then reinstall
them without DB2 support then Apache restarts fine and operates with no
problems.  DB2 is installed, configured, and running on the server.  I've
spent numerous hours (on the weekend none the less) trying to figure this
out, but with no luck.  Any help would be greatly appreciated.

Thanks,

Derek



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




[PHP] forms and inputs

2002-03-24 Thread Vlad Kulchitski

Hi,

Can anyone suggest anything regarding the following problem.

Basically, I ask the user to type a few sentences, in 
 and on the next page I show everything
s/he typed asking "Are you sure you want to submit this...

Once clicked "YES" all data is being taken to the next page for
FINAL submission to mysql. (all is done in one php script though)

But anyway, the problem is that when I see the final data in the
database, there's only 1 word from the sentence the used has typed
in, i.e if I submit "Hello my name is Vlad", the only word that will
end up in the database would be "Hello". What is the best solution to
overcome this?

Thanks,
Vlad

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




[PHP] Re: test...

2002-03-24 Thread Avdija A . Ahmedhodzic

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> 24/03/2002 8:34:40 PM
> 
> Umm, is it just me or has there been no traffic on this list for the last 2 hours
> 
> Weird
> 
> 
> 
> 
people write less on weekdays.

Poz!
-- 
Prevencija putem edukacije
http://www.narkomanija.com/

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




RE: [PHP] Stripslashes & addslashes question ...

2002-03-24 Thread Johnson, Kirk

Have you echo'd the variables before the addslashes() call, to be sure that
the stripslashes() call is being executed?

Kirk

> -Original Message-
> From: John Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, March 23, 2002 12:59 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Stripslashes & addslashes question ...
> 
> 
> Hi, can someone tell me why the following results in 
> evaluated variables
> with 2 slashes in front of apostrophys instead of one and how 
> I can modify
> it to only add 1? Thanks!
> 
> foreach($_POST as $k=>$v){
> if (get_magic_quotes_gpc()){
> $_POST[$k] = stripslashes($v);
> }
> $_POST[$k] = addslashes($v);
> eval( "\$$k = \"$_POST[$k]\";" );
> }

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




[PHP] Re: PHPTriad Error in Windows XP.

2002-03-24 Thread Avdija A . Ahmedhodzic

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Hi,
>   I installed PHPTriad under Windows XP and I keep gettting the
> following error:
> 
> Warning: MySQL Connection Failed: Can't connect to MySQL server on
> 'localhost' (10061) in C:\apache\htdocs\phpmyadmin\lib.inc.php on line
> 255
> 
> 
> It worked before under Windows ME.  WinMySQLadmin1.0 works fine as well
> as MySQL when I ran it in the cmd-line mode.  What's the remedy?
> 
> Thanks in advance,
> -Peter
> 
> 
> 
you should start MySQL first.
-- 
Prevencija putem edukacije
http://www.narkomanija.com/

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




Re: [PHP] Problem with special characters

2002-03-24 Thread Jason Wong

On Sunday 24 March 2002 17:51, N. Pari Purna Chand wrote:
> When a form is submitting data to another php page
> it is sending specialcharacters with escape sequences added.
>
> Ex : 
> & when i do an
> echo $var1;
> in the submitted php page
> it is showing "c:\\programfiles\\" instead of "c:\programfiles\"
>
> Howto overcome this ?

Look up the following in the manual:

php.ini > magic_quotes_gpc

stripslashes()
addslashes()



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

/*
Sweet sixteen is beautiful Bess,
And her voice is changing -- from "No" to "Yes".
*/

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




[PHP] Re: HELP! Open "HTTPS://", and follow rediect header

2002-03-24 Thread Stefan Livieratos

Hi,

Zlutarch G. wrote:
> Hi All,
> 
> I need help on two problems:
> 1) Is there a PHP function similar to fopen() that would open URL begins 
> with "https://";, i.e., SSL address?
fopen("https://...";) is working with current CVS but is not going to be 
in a release before version 4.3. For now you can use the cURL module 
provided the cURL library is compiled with OpenSSL support.

> 
> 2) Does anyone know if it is possible in PHP to read redirect 
> instructions in HTTP header, and then follow the links?
Use the cURL module:
http://www.php.net/";);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_NOBODY, 1);
ob_start();
curl_exec ($ch);
$header = ob_get_contents();
ob_end_clean();
curl_close ($ch);
?>
Now search for the "Location" header in $header.

Regards,
Stefan Livieratos

-- 

ICS Plus
Internet Consulting + Services
==
Aeussere Brucker Str. 51
D-91058 Erlangen
Germany
==
Tel: +49 9131 127733
Fax: +49 9131 127744
E-mail : [EMAIL PROTECTED]
Web: http://www.icsplus.de
==


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




[PHP] Re: DOMXML and encodings (php4.1.2, libxml2.4.16)

2002-03-24 Thread Stefan Livieratos

Hi

Lucky wrote:
> Hello all, I have a little problem with encodings with libxml2 resp. domxml
> in php.
> 
> In our site we're storing articles as XML, ISO-8859-1 encoded (indicated in
> xml-header). Libxml2 is doing all the internal processing in UTF-8, so the
> article gets translated to UTF-8. But when I do an xmltree() on the article,
> all output of libxml is in UTF-8, too, and it's really ugly to read german
> umlauts in UTF-8 in a browser displaying all as ISO-8859-1.
> Is there any way (other than manually do utf8_decode on every part of the
> output, which is _very_ ugly and annoying) to tell php or libxml to output
> things in UTF-8?

No, unfortunately there isn't. Here's a quote from the libxml site 
(http://xmlsoft.org/encoding.html):

"... basically the I18N (internationalization) support get triggered 
only during I/O operation, i.e. when reading a document or saving one"

Regards,
Stefan Livieratos


-- 

ICS Plus
Internet Consulting + Services
==
Aeussere Brucker Str. 51
D-91058 Erlangen
Germany
==
Tel: +49 9131 127733
Fax: +49 9131 127744
E-mail : [EMAIL PROTECTED]
Web: http://www.icsplus.de
==


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




RE: [PHP] Retreiving website contents

2002-03-24 Thread Craig Westerman


http://curl.haxx.se/libcurl/php/examples/



-Original Message-
From: Liam [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 23, 2002 9:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Retreiving website contents


Hi, I've asked this before but I'm still ost.
How can I receive the contents of a remote website through PHP and only disp
lay one section of it?

Someone said something about curl. 
What is it, where could I get it?


Thanks for your help,
Liam



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


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




[PHP] HELP! Open "HTTPS://", and follow rediect header

2002-03-24 Thread Zlutarch G.

Hi All,

I need help on two problems:
1) Is there a PHP function similar to fopen() that would open URL begins 
with "https://";, i.e., SSL address?

2) Does anyone know if it is possible in PHP to read redirect instructions 
in HTTP header, and then follow the links?

Thanks in advance,

Zlu


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




[PHP] DOMXML and encodings (php4.1.2, libxml2.4.16)

2002-03-24 Thread Lucky

Hello all, I have a little problem with encodings with libxml2 resp. domxml
in php.

In our site we're storing articles as XML, ISO-8859-1 encoded (indicated in
xml-header). Libxml2 is doing all the internal processing in UTF-8, so the
article gets translated to UTF-8. But when I do an xmltree() on the article,
all output of libxml is in UTF-8, too, and it's really ugly to read german
umlauts in UTF-8 in a browser displaying all as ISO-8859-1.
Is there any way (other than manually do utf8_decode on every part of the
output, which is _very_ ugly and annoying) to tell php or libxml to output
things in UTF-8?

We're using Debian Woody, php4-4.1.2-1, libxml2-2.4.16-2,
php4-domxml4.1.2-1.


-- 
Lukas

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




Re: [PHP] How to reduce an array to n values?

2002-03-24 Thread Andy

^thanx.



"Jacob Wyke" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Use array_slice().
>
> $output = array_slice ($input, 0, 3);
>
> will return the first three values of the array.
>
> Check out http://www.php.net/manual/en/function.array-slice.php for more
> details.
>
>
>
> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: 24 March 2002 12:31
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to reduce an array to n values?
>
>
> Hi there,
>
> I am trying to reduce an array to n values if it is more than n values.
>
> eg.
>
> $level_depth = 3;
> $test = array('banana', 'super', 'php', 'car');
>
> # some array function which is deleting  the last item ( car) if existant
>
> Thanx for any help,
>
> Andy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>



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




[PHP] storing PDF in a database

2002-03-24 Thread Alain DESEINE

Hello,

For many different reasons, like security ans soùme other one, i need to 
store PDF files in a database.

- Does anybody have already do this ?
- What kind of field type should i use (image filed type ???) ?

I'm currently using an ASE 12 (64 bits) SYBASE server on a HP-UX 11.00 
(64 bits) box.

The application server is a linux server with apache and PHP.

Any feedback about doing somethin like this will be valuable ...

Many thanks for responses.

Best regards,

Alain DESEINE.


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




RE: [PHP] How to reduce an array to n values?

2002-03-24 Thread Jacob Wyke

Use array_slice().

$output = array_slice ($input, 0, 3);

will return the first three values of the array.

Check out http://www.php.net/manual/en/function.array-slice.php for more
details.



-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 24 March 2002 12:31
To: [EMAIL PROTECTED]
Subject: [PHP] How to reduce an array to n values?


Hi there,

I am trying to reduce an array to n values if it is more than n values.

eg.

$level_depth = 3;
$test = array('banana', 'super', 'php', 'car');

# some array function which is deleting  the last item ( car) if existant

Thanx for any help,

Andy



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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




php-general Digest 24 Mar 2002 12:30:38 -0000 Issue 1245

2002-03-24 Thread php-general-digest-help


php-general Digest 24 Mar 2002 12:30:38 - Issue 1245

Topics (messages 89866 through 89906):

PHP Developer's Cookbook, Second Edition
89866 by: Craig Westerman
89874 by: Thalis A. Kalfigopoulos
89882 by: Egon Schmid

Still REG EX
89867 by: John Fishworld
89868 by: Miguel Cruz
89869 by: John Fishworld
89876 by: Miguel Cruz
89886 by: Jim Lucas [php]

Adding Text Input in a SELECT drop-down list
89870 by: Andre Dubuc
89871 by: Miguel Cruz
89872 by: Andre Dubuc
89875 by: Justin French
89877 by: Senih
89880 by: Andre Dubuc
89904 by: Mika Tuupola

Re: Double quotes in form fields and submitting them
89873 by: Miguel Cruz
89878 by: webapprentice
89879 by: Miguel Cruz

The infamous HTML quotes  Re: [PHP] Double quotes in form fields and submitting them
89881 by: webapprentice

Using EditPlus with PHP
89883 by: Luca Grossi

shell_exec() or passthru()
89884 by: Douglas
89892 by: Douglas
89894 by: Andrew Lopucki
89895 by: Andrew Lopucki

Re: Create Email POP accounts with PHP
89885 by: Jason Wong

Trouble with mysql_pconnect unable to connect to database?
89887 by: Jim Hankins
89888 by: Rasmus Lerdorf
89891 by: Jim Hankins
89896 by: Jim Hankins
89897 by: Gerard Samuel

Re: assert in php.ini setting.
89889 by: CC Zona

Re: Image Manipulation/GD support
89890 by: Michael A. Peters
89893 by: Rasmus Lerdorf

Re: PHP Search Engine?
89898 by: lmlweb
89899 by: lmlweb

Re: Superglobals
89900 by: David

Php Application Techniques...
89901 by: Arik Ashepa

Problem with special characters
89902 by: N. Pari Purna Chand

test...
89903 by: Liam

urldecode adds slashes 3 times on a single quote. Why?
89905 by: Andy

How to reduce an array to n values?
89906 by: Andy

Administrivia:

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

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

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


--

--- Begin Message ---

Is the second edition much different from the 1st? If one has 1st Edition,
is it worth $39.95 to get the second?

Thanks

Craig ><>
[EMAIL PROTECTED]

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

Don't have 1st, but 2nd looks pretty good. It functions both as a manual and as a 
reference and most of the recipes have pieces that I'd say correspond to real life 
problems.

not much help I guess :-)

cheers,
--t.


On Sat, 23 Mar 2002, Craig Westerman wrote:

> Is the second edition much different from the 1st? If one has 1st Edition,
> is it worth $39.95 to get the second?
> 
> Thanks
> 
> Craig ><>
> [EMAIL PROTECTED]
> 


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

From: "Craig Westerman" <[EMAIL PROTECTED]>

> Is the second edition much different from the 1st? If one has 1st
Edition,
> is it worth $39.95 to get the second?

I hope so. Sterling got a list of  errors from two German
translators for his 1st edition. Sterling haven´t said a word about
the second edition during his trip to Germany. You can see him at
http://www.php-ev.de/documents/phpdoc/protocol.html.

-Egon


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

I'm still playing about trying to validate an url
www(dot)something(dot)something !

I thought this would work but know

if (ereg("^(w{3})(\\.)([a-zA-Z]+)(\\.)([a-z]{2,4})$", $str))

can anyone explain why not ???

^(w{3}) = three w at start of string ??

(\\.) = literal dot ??

([a-zA-Z]+) match any word with letters ??

(\\.) = literal dot ??

([a-z]{2,4})$ = at least 2 leters eg de but upto 4 eg info

but it doesn't !

thanks in advance
john





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

On Sun, 24 Mar 2002, John Fishworld wrote:
> I'm still playing about trying to validate an url
> www(dot)something(dot)something !
> 
> I thought this would work but know
> 
> if (ereg("^(w{3})(\\.)([a-zA-Z]+)(\\.)([a-z]{2,4})$", $str))

First of all, web server hostnames don't need to start with www. Secondly, 
they can have any number of components (separated by periods) from 1 to 
dozens. Thirdly, the last term doesn't have to be 4 characters or less.

> ([a-z]{2,4})$ = at least 2 leters eg de but upto 4 eg info

.museum...

miguel


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

Okay good point but still why doesn't it work ?

thanks
john


> On Sun, 24 Mar 2002, John Fishworld wrote:
> > I'm still playing about trying to validate an url
> > www(dot)something(dot)something !
> >
> > I thought this would work but know
> >
> > if (ereg("^(w{3})(\\.)([a-zA-Z]+)(\\.)([a-z]{2,4})$", $str))
>
> First of all, web server hostnames don't need to start with www. Secondly,
> they can have any number of components (separated by periods) from 1 to
> dozens. Thi

[PHP] How to reduce an array to n values?

2002-03-24 Thread Andy

Hi there,

I am trying to reduce an array to n values if it is more than n values.

eg.

$level_depth = 3;
$test = array('banana', 'super', 'php', 'car');

# some array function which is deleting  the last item ( car) if existant

Thanx for any help,

Andy



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




[PHP] urldecode adds slashes 3 times on a single quote. Why?

2002-03-24 Thread Andy

Hi there, I want to transfer a message back to the form if an error occures.
Therefore I am encoding the message and afterwards decoding. Works fo far
with one exeption. The single quote is slashed 3 times.

Example:
$message =  That's great!

Code:
example.php?message=".urlencode($message)."
'.urldecode($message).'

Result:
That\\\'s great!

So whats wrong? I can't see the mistake.

Thanx for any help

Andy



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




Re: [PHP] Adding Text Input in a SELECT drop-down list

2002-03-24 Thread Mika Tuupola

On Sat, 23 Mar 2002, Andre Dubuc wrote:

> > >   State
> > >   AL
> > >   AZ
> > >   // and so on
> > >
> > > I would like a text input as the last option so that a user can type in a
> > > state (non-USA) and have this variable passed on. Is there any way of
> > > accomplishing this using html or php?

> > It's not possible. You'll have to put a separate text input field next to
> > it.

> Too bad, since a few sites seem to have that capability. Oh well . . 

Any URL's to them?

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


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




[PHP] test...

2002-03-24 Thread Liam

24/03/2002 8:34:40 PM

Umm, is it just me or has there been no traffic on this list for the last 2 hours

Weird




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




[PHP] Problem with special characters

2002-03-24 Thread N. Pari Purna Chand

When a form is submitting data to another php page
it is sending specialcharacters with escape sequences added.

Ex : 
& when i do an 
echo $var1; 
in the submitted php page
it is showing "c:\\programfiles\\" instead of "c:\programfiles\"

Howto overcome this ?

/Chandu



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