[PHP] mysql pconnect voes

2001-11-29 Thread jani mikkonen

Im managing a really crowded webservers. We have article system implemented
in php and backend db is mysql (not my first choise but hey, it does the
job)

Few version numbers:

PHP: 4.0.6 (Self compiled, w/ gcc in solaris8)
Mysql: 3.23.24 (Self compiled, w/ gcc in solaris8, ok, not the latest
stable but i dont think this is the real problem)
Apache: 1.3.22 (Self compiled w/ no other 3rd party modules besides php)

Our code uses pconnects throuout the whole site. Website is ran from 6
different sparc solaris boxes and one db box is serving them all. This
mysql has connection limit in 750 and all apache servers have following
three lines in their php.ini:

mysql.allow_persistent=On
mysql.max_persistent=50
mysql.max_links=70

Afaik (mysql.max_links - mysql.max_persistent)  is how many nonpersistent
connection i can have (in this case, 20 per server). And i have 50
persistent. So, i have 6 servers with 50 persistent connections and
all pconnects are to same db with same account so there should be
available connections in the pool.

BUT. After 5 minutes or less (depending on the time/load) all connections
hang because php has  used *all* available connections in mysql server
(which is 750). I cant image how this is possible. I have 70 connections
per server, 6 servers, thats 420 max connectios, that should leave with
with 330 spare ones but now. Everything is used up. Even if i would have
50+70 connections (120*6=720) per server, i would still have 30 spare ...

So, only solution for me is to set mysql connection timeouts to really
low (20 seconds, when default value is 8 hours). And this leads me to
*huge* error logs. For example, i just deleted few months old mysql log
which was over 2 gigs.

I have few ideas. Are these limits in php, per process or per whole
process tree ? Sounds to me that they are per process or pconnect still
has really nasty bugs in it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] WHat has happened to parse_str in the Docs????

2001-11-29 Thread Papp Gyozo

Hello,

The manual says that parse_str does it. (btw, I didn't try it)
Look on the second sentence pasted here. 


void parse_str (string str, array [arr])

Parses str as if it were the query string passed via an URL and sets variables in the 
current scope. If the second parameter arr is present, variables are stored in this 
variable as an array elements instead. 


- Original Message - 
From: "Brian White" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 1:11 AM
Subject: [PHP] WHat has happened to parse_str in the Docs


| I have had a good hunt around the www.php.net site and I can find no reference
| to the "parse_str" function in the docs, except as what looks like
| cached results in old searches.
| 
| Anyway - the reason I ask is I was wondering if there was a function that
| did what parse_str did, except that it put the results of parsing the
| query string into an associative array rather than creating variables.
| I have a vague recollection of something like that
| 
| Regs
| 
| Brian White
| 
| -
| Brian White
| Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
| Phone: +612-93197901
| Web:   http://www.steptwo.com.au/
| Email: [EMAIL PROTECTED]
| 
| 
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
| 



[PHP] unbale to send mails using mail function

2001-11-29 Thread sanjay

Hi

I have successfully installed PHP 4.0.6 with apache 1.3.22 on my mandrake
Linux box. Now, the problem is I am not able to send email using mail () of
php. However, I am able to send it using mail command.

Any help will be highly appreciated.

Regards
Sanjay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Please Help! Sorting the results of directory indexing

2001-11-29 Thread Kevin Garrett

Hi all,

I have a script that lists directory contents but I'm trying to put the 
results in reverse order.

I've tried the arsort & array reverse but have so far been unable to get 
them working, can somebody please help me!

Here's a look at my script:

\n");

// get each entry within the directory & return to user with the 
link
$myDir = dir(".");
while($FileName = $myDir->read())
{
if ($FileName != "." && $FileName != ".." && eregi 
(".*\.htm",$FileName)){
print("$entryName \n");
}
}

// close directory
$myDir->close();

print("\n");
?>



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem with urlencode

2001-11-29 Thread Oosten, Sjoerd van

Hi there,
 
I have a problem putting through a variable which contains an & in the
string.
When the variabele is something like: 
click here
 
the next file sees $name as rob instead of $name=rob & sjoerd
 
i've tried the urlencode function but that doesn't work.
 
Somebody,
 
thanks 


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP]

2001-11-29 Thread Andrey Hristov

probably from 4.1.0 or 4.2
this construction will be available


Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: "Papp Gyozo" <[EMAIL PROTECTED]>
To: "Berthold" <[EMAIL PROTECTED]>; "faeton" <[EMAIL PROTECTED]>; "PHP-General" 
<[EMAIL PROTECTED]>
Sent: Thursday, November 22, 2001 10:45 AM
Subject: Re: [PHP] 


> only if short_open_tag is on.
> 
> - Original Message - 
> From: "Berthold" <[EMAIL PROTECTED]>
> To: "faeton" <[EMAIL PROTECTED]>; "PHP-General" <[EMAIL PROTECTED]>
> Sent: Thursday, November 29, 2001 8:23 AM
> Subject: Re: [PHP] 
> 
> 
> | php version >= 4 I think
> | 
> | faeton wrote:
> | 
> | > Does anyone know that  is equal , eh? :)
> | > Just wanted you to know :)
> | > 
> | > 
> | > 
> | > Ivan 'Faeton aka xetrix' Danishevsky
> | > ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
> | > 
> | > 
> | > 
> | 
> | 
> | -- 
> | Berthold
> | 
> | 
> | -- 
> | PHP General Mailing List (http://www.php.net/)
> | To unsubscribe, e-mail: [EMAIL PROTECTED]
> | For additional commands, e-mail: [EMAIL PROTECTED]
> | To contact the list administrators, e-mail: [EMAIL PROTECTED]
> | 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Quoting strings

2001-11-29 Thread Jason Rennie

Hi all,

I have a fnction that needs to quote a strings in php to make them easy to
stick into an mysql db.

I need to do basically "$msg", which is easy enough, but I would like to
not quote strings that are already quoted and also escape any single or
double quotes in the string. 

IS there a regex to do this that anybody knows of, or a php function that
i;ve missed ?

Ideas anybody ?

Thanks in advance

Jason

-- 
Hofstadter's Law : "It always takes longer than you expect, even when you
take Hofstadter's Law into account."


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Quoting strings

2001-11-29 Thread Andrey Hristov

$sql="insert into some_table (".stripslashes(mysql_escape_string($your_var)).");";

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: "Jason Rennie" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 2:12 PM
Subject: [PHP] Quoting strings


> Hi all,
> 
> I have a fnction that needs to quote a strings in php to make them easy to
> stick into an mysql db.
> 
> I need to do basically "$msg", which is easy enough, but I would like to
> not quote strings that are already quoted and also escape any single or
> double quotes in the string. 
> 
> IS there a regex to do this that anybody knows of, or a php function that
> i;ve missed ?
> 
> Ideas anybody ?
> 
> Thanks in advance
> 
> Jason
> 
> -- 
> Hofstadter's Law : "It always takes longer than you expect, even when you
> take Hofstadter's Law into account."
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Memory Error

2001-11-29 Thread John Monfort


Hey all,
Need some help.

Two questions:

1)

=Environment=
PHP 4.0.5
Win2k
Apache 1.3.20
MySQL ..3.24
===

I created a login page which uses MySQL to verify the username and
password.

When I run the script (submit the html form), PHP returns this error:

"The instruction at 0x10091ceb referenced memory at 0x. The memory
could not be read."

The script is using basic SQL statments (if/else logic with SELECT), so
I'm somewhat confused as to why I'm getting a memory error.

Especially since PHP is able to retrieve all other information from the
database. It only fails for the login script.  I've double checked the
db connection, table names, username/password, and other related fields.
Everything seems fine.

Has anyone dealt with this error before? Any clues?
Please help!

QUESTION 2:

I reinstalled my apache server, and it's acting a little weird.
For example, this url

http://localhost

opens a Save File Dialog Box, and ask me to save/cancel the file (instead
of showing the index page).

What is causing that?

The DirectoryIndex is configured as

DirectoryIndex index.html index.php index.cgi index.asp


Any suggestions?



-john


On Thu, 29 Nov 2001, faeton wrote:

> Does anyone know that  is equal , eh? :)
> Just wanted you to know :)
>
>
> 
> Ivan 'Faeton aka xetrix' Danishevsky
> ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Query help needed

2001-11-29 Thread Payzillee

Hi, could anyone tell me what is wrong with this Insert query?   I get an
'Invalid query' error but I can't see the problem at all.  All the fields
match exactly what is in my database, it's all in lowercase too.

Cheers.

mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
org_name, address1, address2, address3, address4, city, region, postal_code,
country, email, mob_phone, tel_number, fax_number, org_web_address,
personal_web_address, special_interests, date, time)

VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
'$address1', '$address2', '$address3', '$address4', '$city', '$region',
'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
'$fax_number', '$org_web_address', '$personal_web_address',
'$special_interests', '$date','$time')")



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Need help with a stupid problem!

2001-11-29 Thread De Necker Henri

Hi there!

I want to do the following piece SQL query :
   $search .= " ba = '".$b."'";

I want it to be like the following :
   ba = 'someting'

But this is what i get :
  ba = \'someting\'

What am i doing wrong?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Query Help Needed

2001-11-29 Thread Payzillee

Hi, could anyone tell me what is wrong with this Insert query?   I get an
'Invalid query' error but I can't see the problem at all.  All the fields
match exactly what is in my database, it's all in lowercase too.

Cheers.

mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
org_name, address1, address2, address3, address4, city, region, postal_code,
country, email, mob_phone, tel_number, fax_number, org_web_address,
personal_web_address, special_interests, date, time)

VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
'$address1', '$address2', '$address3', '$address4', '$city', '$region',
'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
'$fax_number', '$org_web_address', '$personal_web_address',
'$special_interests', '$date','$time')")





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP Memory Error

2001-11-29 Thread lallous

John,

Question 1,
are you using PHP as ISAPI or CGI?


"John Monfort" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hey all,
> Need some help.
>
> Two questions:
>
> 1)
>
> =Environment=
> PHP 4.0.5
> Win2k
> Apache 1.3.20
> MySQL ..3.24
> ===
>
> I created a login page which uses MySQL to verify the username and
> password.
>
> When I run the script (submit the html form), PHP returns this error:
>
> "The instruction at 0x10091ceb referenced memory at 0x. The memory
> could not be read."
>
> The script is using basic SQL statments (if/else logic with SELECT), so
> I'm somewhat confused as to why I'm getting a memory error.
>
> Especially since PHP is able to retrieve all other information from the
> database. It only fails for the login script.  I've double checked the
> db connection, table names, username/password, and other related fields.
> Everything seems fine.
>
> Has anyone dealt with this error before? Any clues?
> Please help!
>
> QUESTION 2:
>
> I reinstalled my apache server, and it's acting a little weird.
> For example, this url
>
> http://localhost
>
> opens a Save File Dialog Box, and ask me to save/cancel the file (instead
> of showing the index page).
>
> What is causing that?
>
> The DirectoryIndex is configured as
>
> DirectoryIndex index.html index.php index.cgi index.asp
>
>
> Any suggestions?
>
>
>
> -john
>
>
> On Thu, 29 Nov 2001, faeton wrote:
>
> > Does anyone know that  is equal , eh? :)
> > Just wanted you to know :)
> >
> >
> > 
> > Ivan 'Faeton aka xetrix' Danishevsky
> > ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Parsing HTML

2001-11-29 Thread Ulrich Hacke

Hi,
I have some HTML including several pseudo tags like


After parsing I have an array $content[$i]["name"] where "name" is the name
of the parameters and $i the Counter of the tag. I'm using a regular
expression to find these tags and explode(" ", $my_tag_line) to geht the
parameters out. How can I achive that parameter values can contains
whitespaces? I suppose I'll need another regex for split(). Any help is
appreciated.

Uli


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Digit Grouping Function

2001-11-29 Thread Sascha Ragtschaa

Hi,

I have a small question? Does anyone know (or has written) a function about
"digit grouping symbols", that means:
when I have a value of 1000, it should print out like this: 1.000
The same when I have a value of 100, it should give 1.000.000

Does anyone know how to do it? Thanks in advance...

Sascha


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP Memory Error

2001-11-29 Thread Julio Nobrega Trabalhando

  Used to happen the same here when I was using PhpMyAdmin. On large
consults, it would lock.

  Passing from CGI to module solved all my problems. On the manual you can
see the necessary lines to do such.

--

Julio Nobrega

No matter where you go, &this.

"Lallous" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> John,
>
> Question 1,
> are you using PHP as ISAPI or CGI?
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Need help with a stupid problem!

2001-11-29 Thread Julio Nobrega Trabalhando

  Worry not, easier typing:

$search .= " ba = '$b'";

  If above doesn't satify the needs, maybe you are mysql_escape_string();
it?

--

Julio Nobrega

No matter where you go, &this.

"De Necker Henri" <[EMAIL PROTECTED]> wrote in message
3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01...
> Hi there!
>
> I want to do the following piece SQL query :
>$search .= " ba = '".$b."'";
>
> I want it to be like the following :
>ba = 'someting'
>
> But this is what i get :
>   ba = \'someting\'
>
> What am i doing wrong?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Digit Grouping Function

2001-11-29 Thread Julio Nobrega Trabalhando

  Function number_format(); should do the trick for you, maybe with the help
from str_replace('commas' for 'dots');

--

Julio Nobrega

No matter where you go, &this.

"Sascha Ragtschaa" <[EMAIL PROTECTED]> wrote in message
7208FD73D511B7040050BF68EF1E027A09@MUCMAIL">news:7208FD73D511B7040050BF68EF1E027A09@MUCMAIL...
> Hi,
>
> I have a small question? Does anyone know (or has written) a function
about
> "digit grouping symbols", that means:
> when I have a value of 1000, it should print out like this: 1.000
> The same when I have a value of 100, it should give 1.000.000
>
> Does anyone know how to do it? Thanks in advance...
>
> Sascha
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query Help Needed

2001-11-29 Thread Michael Hall


Do those field names need single quotes too? Can't remember right now ...
Are there any datatype problems (wrong kind of datatype for a field)?
What about a semi-colon at the end?

Mick

On Thu, 29 Nov 2001, Payzillee wrote:

> Hi, could anyone tell me what is wrong with this Insert query?   I get an
> 'Invalid query' error but I can't see the problem at all.  All the fields
> match exactly what is in my database, it's all in lowercase too.
> 
> Cheers.
> 
> mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
> org_name, address1, address2, address3, address4, city, region, postal_code,
> country, email, mob_phone, tel_number, fax_number, org_web_address,
> personal_web_address, special_interests, date, time)
> 
> VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
> '$address1', '$address2', '$address3', '$address4', '$city', '$region',
> '$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
> '$fax_number', '$org_web_address', '$personal_web_address',
> '$special_interests', '$date','$time')")
> 
> 
> 
> 
> 
> 

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] db connect

2001-11-29 Thread Ian

Hello,

Wonder if anyone can help me out.

I am trying to run an example out of a book Beginning Php by wrox.

One of the examples is supposed to allow me to connect to a database by
using a function that takes a database as an argument. It has an include
file that contains the function.

Problem I get is that the argument never seems to get passed and the
function always uses the default value.

I would greatly appreciate if someone could tell me why this happens. I
would also appreciate if no one rewrites a completely different script, as I
am after debugging this one. ;-)

Here is the include file:



And here is the php script that uses this include file:



 ";
}
?>


I hope someone can help me out please.

Thankyou.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP] Query Help Needed

2001-11-29 Thread Martin Lucas

take a look at your table definiton.
maybe some of your fields have a diferent definition as the value you want
to insert. e.g.
fax_number in your query-string is defined as string and in your table as
integer or something like this

regards
martin

-Ursprüngliche Nachricht-
Von: Payzillee [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 29. November 2001 12:37
An: [EMAIL PROTECTED]
Betreff: [PHP] Query Help Needed


Hi, could anyone tell me what is wrong with this Insert query?   I get an
'Invalid query' error but I can't see the problem at all.  All the fields
match exactly what is in my database, it's all in lowercase too.

Cheers.

mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
org_name, address1, address2, address3, address4, city, region, postal_code,
country, email, mob_phone, tel_number, fax_number, org_web_address,
personal_web_address, special_interests, date, time)

VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
'$address1', '$address2', '$address3', '$address4', '$city', '$region',
'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
'$fax_number', '$org_web_address', '$personal_web_address',
'$special_interests', '$date','$time')")





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query Help Needed

2001-11-29 Thread Payzillee

I've got my names, web addresses etc. set up as Varchar and my telephone/fax
numbers as Bigint.  Special interests field as text.  Only other field in
the database is an auto increment number field.

"Michael Hall" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Do those field names need single quotes too? Can't remember right now ...
> Are there any datatype problems (wrong kind of datatype for a field)?
> What about a semi-colon at the end?
>
> Mick
>
> On Thu, 29 Nov 2001, Payzillee wrote:
>
> > Hi, could anyone tell me what is wrong with this Insert query?   I get
an
> > 'Invalid query' error but I can't see the problem at all.  All the
fields
> > match exactly what is in my database, it's all in lowercase too.
> >
> > Cheers.
> >
> > mysql_query ("INSERT INTO listserve (title, surname, forename,
job_title,
> > org_name, address1, address2, address3, address4, city, region,
postal_code,
> > country, email, mob_phone, tel_number, fax_number, org_web_address,
> > personal_web_address, special_interests, date, time)
> >
> > VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
> > '$address1', '$address2', '$address3', '$address4', '$city', '$region',
> > '$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
> > '$fax_number', '$org_web_address', '$personal_web_address',
> > '$special_interests', '$date','$time')")
> >
> >
> >
> >
> >
> >
>
> --
> 
> Michael Hall
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> http://openlearningcommunity.org
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query Help Needed

2001-11-29 Thread Douglas McKenzie

Could be that the value you're trying to insert doesn't match up with 
the field type in the database - you know, putting a word in a number 
field. What exactly is the error message?

Payzillee wrote:

>Hi, could anyone tell me what is wrong with this Insert query?   I get an
>'Invalid query' error but I can't see the problem at all.  All the fields
>match exactly what is in my database, it's all in lowercase too.
>
>Cheers.
>
>mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
>org_name, address1, address2, address3, address4, city, region, postal_code,
>country, email, mob_phone, tel_number, fax_number, org_web_address,
>personal_web_address, special_interests, date, time)
>
>VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
>'$address1', '$address2', '$address3', '$address4', '$city', '$region',
>'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
>'$fax_number', '$org_web_address', '$personal_web_address',
>'$special_interests', '$date','$time')")
>
>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query Help Needed

2001-11-29 Thread Payzillee

error message is 'Invalid Query'.

"Douglas McKenzie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Could be that the value you're trying to insert doesn't match up with
> the field type in the database - you know, putting a word in a number
> field. What exactly is the error message?
>
> Payzillee wrote:
>
> >Hi, could anyone tell me what is wrong with this Insert query?   I get an
> >'Invalid query' error but I can't see the problem at all.  All the fields
> >match exactly what is in my database, it's all in lowercase too.
> >
> >Cheers.
> >
> >mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
> >org_name, address1, address2, address3, address4, city, region,
postal_code,
> >country, email, mob_phone, tel_number, fax_number, org_web_address,
> >personal_web_address, special_interests, date, time)
> >
> >VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
> >'$address1', '$address2', '$address3', '$address4', '$city', '$region',
> >'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
> >'$fax_number', '$org_web_address', '$personal_web_address',
> >'$special_interests', '$date','$time')")
> >
> >
> >
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql pconnect voes

2001-11-29 Thread Jani Mikkonen


>  - can have one process more than one persistent connection ?

I dont quite understand this. What do you mean ? 

>  - how many children of apache do u have in one time ?

Depending on load, around 250-350. Heavily changes between nights and
businesshours and weekends.

>  - php.ini means configuration for each instance of php in memory ?

Thats what i was asking too. Is it per process (Apache process) or per
whole server. Eg. Does php work from shared memory as, is there only
once instance of php per apache process tree.

> by my experience every non-closed connection still persists,  so you can VERY
> FAST RUN OUT OF free conns.

I thought limitting all connections in the php.ini would prevent this
but as it seems, it doesnt.


> We have left this concept (persistent connections) for PHP/Apache solutions
> because of this problem.

Same here, we have converted most of the stuff on our site to servlets
because php doesnt just do what we need in same places.


> --
> jani mikkonen wrote:
> 
> > Im managing a really crowded webservers. We have article system implemented
> > in php and backend db is mysql (not my first choise but hey, it does the
> > job)
> >
> > Few version numbers:
> >
> > PHP: 4.0.6 (Self compiled, w/ gcc in solaris8)
> > Mysql: 3.23.24 (Self compiled, w/ gcc in solaris8, ok, not the latest
> > stable but i dont think this is the real problem)
> > Apache: 1.3.22 (Self compiled w/ no other 3rd party modules besides php)
> >
> > Our code uses pconnects throuout the whole site. Website is ran from 6
> > different sparc solaris boxes and one db box is serving them all. This
> > mysql has connection limit in 750 and all apache servers have following
> > three lines in their php.ini:
> >
> > mysql.allow_persistent=On
> > mysql.max_persistent=50
> > mysql.max_links=70
> >
> > Afaik (mysql.max_links - mysql.max_persistent)  is how many nonpersistent
> > connection i can have (in this case, 20 per server). And i have 50
> > persistent. So, i have 6 servers with 50 persistent connections and
> > all pconnects are to same db with same account so there should be
> > available connections in the pool.
> >
> > BUT. After 5 minutes or less (depending on the time/load) all connections
> > hang because php has  used *all* available connections in mysql server
> > (which is 750). I cant image how this is possible. I have 70 connections
> > per server, 6 servers, thats 420 max connectios, that should leave with
> > with 330 spare ones but now. Everything is used up. Even if i would have
> > 50+70 connections (120*6=720) per server, i would still have 30 spare ...
> >
> > So, only solution for me is to set mysql connection timeouts to really
> > low (20 seconds, when default value is 8 hours). And this leads me to
> > *huge* error logs. For example, i just deleted few months old mysql log
> > which was over 2 gigs.
> >
> > I have few ideas. Are these limits in php, per process or per whole
> > process tree ? Sounds to me that they are per process or pconnect still
> > has really nasty bugs in it.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
-- 
 | ,_,  Jani Mikkonen, bofh and proud of it, +358456700349
 |(O,O)   http://www.mikkonen.org/jani
 |(   )  Pgp public key @ http://www.mikkonen.org/jani/keyh.html
 +-"-"---] Realmendon'tneedspacebars  
 |



msg41391/pgp0.pgp
Description: PGP signature


AW: [PHP] Query Help Needed

2001-11-29 Thread Martin Lucas

that seems to be easy:
put every string and varchar in single quotes eg '$surname'
and every number like $fax_number without quotes

regards martin

-Ursprüngliche Nachricht-
Von: Payzillee [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 29. November 2001 13:16
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Query Help Needed


error message is 'Invalid Query'.

"Douglas McKenzie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Could be that the value you're trying to insert doesn't match up with
> the field type in the database - you know, putting a word in a number
> field. What exactly is the error message?
>
> Payzillee wrote:
>
> >Hi, could anyone tell me what is wrong with this Insert query?   I get an
> >'Invalid query' error but I can't see the problem at all.  All the fields
> >match exactly what is in my database, it's all in lowercase too.
> >
> >Cheers.
> >
> >mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
> >org_name, address1, address2, address3, address4, city, region,
postal_code,
> >country, email, mob_phone, tel_number, fax_number, org_web_address,
> >personal_web_address, special_interests, date, time)
> >
> >VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
> >'$address1', '$address2', '$address3', '$address4', '$city', '$region',
> >'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
> >'$fax_number', '$org_web_address', '$personal_web_address',
> >'$special_interests', '$date','$time')")
> >
> >
> >
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: PHP Memory Error

2001-11-29 Thread John Monfort



I'm using it as CGI.

Note: I've developed these types of pages many times(on the same system).
I've never seem this error before.


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Thu, 29 Nov 2001, lallous wrote:

> John,
>
> Question 1,
> are you using PHP as ISAPI or CGI?
>
>
> "John Monfort" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > Hey all,
> > Need some help.
> >
> > Two questions:
> >
> > 1)
> >
> > =Environment=
> > PHP 4.0.5
> > Win2k
> > Apache 1.3.20
> > MySQL ..3.24
> > ===
> >
> > I created a login page which uses MySQL to verify the username and
> > password.
> >
> > When I run the script (submit the html form), PHP returns this error:
> >
> > "The instruction at 0x10091ceb referenced memory at 0x. The memory
> > could not be read."
> >
> > The script is using basic SQL statments (if/else logic with SELECT), so
> > I'm somewhat confused as to why I'm getting a memory error.
> >
> > Especially since PHP is able to retrieve all other information from the
> > database. It only fails for the login script.  I've double checked the
> > db connection, table names, username/password, and other related fields.
> > Everything seems fine.
> >
> > Has anyone dealt with this error before? Any clues?
> > Please help!
> >
> > QUESTION 2:
> >
> > I reinstalled my apache server, and it's acting a little weird.
> > For example, this url
> >
> > http://localhost
> >
> > opens a Save File Dialog Box, and ask me to save/cancel the file (instead
> > of showing the index page).
> >
> > What is causing that?
> >
> > The DirectoryIndex is configured as
> >
> > DirectoryIndex index.html index.php index.cgi index.asp
> >
> >
> > Any suggestions?
> >
> >
> >
> > -john
> >
> >
> > On Thu, 29 Nov 2001, faeton wrote:
> >
> > > Does anyone know that  is equal , eh? :)
> > > Just wanted you to know :)
> > >
> > >
> > > 
> > > Ivan 'Faeton aka xetrix' Danishevsky
> > > ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] problem with urlencode

2001-11-29 Thread Zozulak Peter

definitely you need "&" to be replaced with "&" ... 

it will work ...

Peter
> -Original Message-
> From: Oosten, Sjoerd van [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 29, 2001 10:45 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] problem with urlencode
> 
> 
> Hi there,
>  
> I have a problem putting through a variable which contains an & in the
> string.
> When the variabele is something like: 
> click here
>  
> the next file sees $name as rob instead of $name=rob & sjoerd
>  
> i've tried the urlencode function but that doesn't work.
>  
> Somebody,
>  
> thanks 
> 
> 
> Sjoerd van Oosten 
> Digitaal vormgever [EMAIL PROTECTED]
> Datamex E-sites B.V. 
> http://www.esites.nl
> Minervum 7368 Telefoon: (076) 5 730 730 
> 4817 ZH BREDA Telefax: (076) 5 877 757 
> ___
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] database question

2001-11-29 Thread Michael Hall


How can I search a MySQL database field that contains sentences (VARCHAR
datatype) or entire texts (TEXT datatype) for single words?

Let's say I want to search 100 articles stored in a database field as TEXT
for the word "bingo", is there any SQL or PHP way of doing that?

Mick

-- 

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: database question

2001-11-29 Thread Julio Nobrega Trabalhando

$word = 'bingo';
$sql = "SELECT a_column FROM table WHERE text_column LIKE '%$word%';
$res = mysql_query($sql);
// etc... for displaying results

  Resuming:
  % on the beggining - doesn't matter what comes before
  % on the end - doesn't matter what comes after

--

Julio Nobrega

No matter where you go, &this.

"Michael Hall" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> How can I search a MySQL database field that contains sentences (VARCHAR
> datatype) or entire texts (TEXT datatype) for single words?
>
> Let's say I want to search 100 articles stored in a database field as TEXT
> for the word "bingo", is there any SQL or PHP way of doing that?
>
> Mick
>
> --
> 
> Michael Hall
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> http://openlearningcommunity.org
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database question

2001-11-29 Thread Richard Baskett

You could try something like this:

SELECT * FROM database WHERE text LIKE '%bingo%'

Rick

> How can I search a MySQL database field that contains sentences (VARCHAR
> datatype) or entire texts (TEXT datatype) for single words?
> 
> Let's say I want to search 100 articles stored in a database field as TEXT
> for the word "bingo", is there any SQL or PHP way of doing that?
> 
> Mick
> 
> -- 
> 
> Michael Hall
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> http://openlearningcommunity.org
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Need help with a stupid problem!

2001-11-29 Thread De Necker Henri

My output is still the same!
It looks like this : ba = \'DA\' 

:)

-Original Message-
From: Julio Nobrega Trabalhando
[mailto:[EMAIL PROTECTED]]
Sent: 29 November 2001 13:54
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Need help with a stupid problem!


  Worry not, easier typing:

$search .= " ba = '$b'";

  If above doesn't satify the needs, maybe you are mysql_escape_string();
it?

--

Julio Nobrega

No matter where you go, &this.

"De Necker Henri" <[EMAIL PROTECTED]> wrote in message
3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01...
> Hi there!
>
> I want to do the following piece SQL query :
>$search .= " ba = '".$b."'";
>
> I want it to be like the following :
>ba = 'someting'
>
> But this is what i get :
>   ba = \'someting\'
>
> What am i doing wrong?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: database question

2001-11-29 Thread Jani Mikkonen


> $word = 'bingo';
> $sql = "SELECT a_column FROM table WHERE text_column LIKE '%$word%';
> $res = mysql_query($sql);
> // etc... for displaying results
> 
>   Resuming:
>   % on the beggining - doesn't matter what comes before
>   % on the end - doesn't matter what comes after

Yes, which means that all these following examples would lead to match:

abingo
bingob
abingob

So, this might lead to unwanted match..

-- 
 | ,_,  Jani Mikkonen, bofh and proud of it, +358456700349
 |(O,O)   http://www.mikkonen.org/jani
 |(   )  Pgp public key @ http://www.mikkonen.org/jani/keyh.html
 +-"-"---] Life is unfair but root passwords makes it bareable  
 |



msg41399/pgp0.pgp
Description: PGP signature


RE: [PHP] Re: database question

2001-11-29 Thread Zozulak Peter

and what about this ...

$sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word %';

matching the word in the text ...

$sql = "SELECT a_column FROM table WHERE text_column LIKE '$word %';

matching the word at the begining of the text ...

$sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word';

matching the word at the end of the text ...

> 
> > $word = 'bingo';
> > $sql = "SELECT a_column FROM table WHERE text_column LIKE '%$word%';
> > $res = mysql_query($sql);
> > // etc... for displaying results


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] ZIp files? Help needed...

2001-11-29 Thread Robert V. Zwink

This might interest you:
http://marc.theaimsgroup.com/?l=php-general&m=100453803524687&w=2

You can install Winzip on the machine, then shell out to unzip the file.

Robert V. Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Emiliano Marmonti [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 1:07 PM
To: Lista PHP
Subject: [PHP] ZIp files? Help needed...


Hi people,

I´m looking for alternatives in using zip files. Our users should upload
into our server zipped files and we need to unzip this files and process it.
I have read there is a library that could be used like an extension, but
I´ve tried to use it from NT and don´t seems like the extension was added
and when I try to use the commands PHP says that don´t recognoice the
commands. In the other hand somebody has told me that PHP must be recompiled
for using this library. Our platform is Windows NT but in the future could
be Solaris.

Anybody could send me your experience?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: database question

2001-11-29 Thread Jani Mikkonen

On Thu, 2001-11-29 at 14:59, Zozulak Peter wrote:
> and what about this ...
> 
> $sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word %';
> 
> matching the word in the text ...
> 
> $sql = "SELECT a_column FROM table WHERE text_column LIKE '$word %';
> 
> matching the word at the begining of the text ...
> 
> $sql = "SELECT a_column FROM table WHERE text_column LIKE '% $word';
> 
> matching the word at the end of the text ...

3 selects against one, well depends what the user wants and how he
values code optimizing (versus executing optimizing) this might be
somewhat better approach:

SELECT stringvar FROM tablename WHERE FIND_IN_SET('BINGO',REPLACE(UCASE(stringvar),' 
',',')) > 0;

So like, first string is converted to uppercase, then all spaces are
made to colons, and then function find_in_set uses word "BINGO" to
locate if the textfield actually containts that word. Should be quite
exact match allthou i dont guarantee it to work (didnt test it, should
work thou)

Example:

"I want to   BinGo, would you want to come ?" -> would translate to
"I WANT TO   BINGO, WOULD YOU WANT TO COME ?" -> would translate to
"I,WANT,TO,,,BINGO,,WOULD,YOU,WANT,TO,COME,?" 

And result for find_in_set for this string would be 6 so it would
match..



-- 
 | ,_,  Jani Mikkonen, bofh and proud of it, +358456700349
 |(O,O)   http://www.mikkonen.org/jani
 |(   )  Pgp public key @ http://www.mikkonen.org/jani/keyh.html
 +-"-"---] And i repeat, I do not make mistakes that count.  
 |



msg41402/pgp0.pgp
Description: PGP signature


[PHP] sessions url rewriting?

2001-11-29 Thread Jimi Rønberg

when compiling php version 4.06 with '--enable-trans-sid' and thereafter
setting 'session.use_cookies off'.

Does anyone know why the url rewriting works like this:
- when it encounters a 'href' it do rewrite
- when it encounters a header("Location: test.php"); it does not rewrite
- when it encounters a  it does not rewrite


The machine:
"PHP Version 4.0.6
System SunOS lj97 5.8 Generic_108528-05 sun4u sparc SUNW,UltraAX-i2
Build Date Oct 11 2001 "


Hope that anyone knows the answer and whether this will be fixed in a
upcomming version of php.

Regards
Jimi Rønberg




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] session_set_save_handler()

2001-11-29 Thread phantom

I am trying to set up a session setup that saves session data to a mysql
database.

I have gone into php.ini and set session.save_handler to user.

I call the following include file up using
session_set_save_handler("open", "close", "read", "write", "destroy",
"gc");

(of course I have labeled each function correctly as they appear in my
include file, just too lazy to write it all out here).

When I run the page this is on, I get a parse error at the line where
function session_open is in the include file (see below)

Any idea why?  Thanks

I am modeling this word for word from a example found at:
http://www.onlamp.com/pub/a/php/2001/05/10/sessions.html?page=1 (pages 1
thru 3)

my session include file:

". time();

 $result = mysql_query($query);

   } // end mysql_session_select()

   //=
   // function: mysql_session_write()
   // purpose: This function writes the session data to
the
   database. If that SID // already exists, then the
existing
   data will be updated.
   //=

   mysql_session_write($SID, $value) {

 GLOBAL $sess_db;
 GLOBAL $sess_table;
 GLOBAL $lifetime;

 $expiration = time() + $lifetime;

 $query = "INSERT INTO $sess_table
 VALUES('$SID', '$expiration', '$value')";

 $result = mysql_query($query, $sess_db);

 if (! $result) :

  $query = "UPDATE $sess_table SET
  expiration = '$expiration',
  value = '$value' WHERE
  SID = '$SID' AND expiration >". time();

  $result = mysql_query($query, $sess_db);

 endif;

   } // end mysql_session_write()

   //=
   // function: mysql_session_destroy()
   // purpose: deletes all session information having
input SID
   (only one row)
   //=

   mysql_session_destroy($sessionID) {

 GLOBAL $sess_table;

 $query = "DELETE FROM $sess_table
 WHERE SID = '$sessionID'";
 $result = mysql_query($query);

   } // end mysql_session_destroy()

   //=
   // function: mysql_session_garbage_collect()
   // purpose: deletes all sessions that have expired.
   //=

   mysql_session_garbage_collect($lifetime) {

 GLOBAL $sess_table;

 $query = "DELETE FROM $sess_table
 WHERE sess_expiration < ".time() - $lifetime;
 $result = mysql_query($query);

 return mysql_affected_rows($result);

   } // end mysql_session_garbage_collect()

   ?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] session_set_save_handler()

2001-11-29 Thread Boget, Chris

> When I run the page this is on, I get a parse error at the line where
> function session_open is in the include file (see below)
> Any idea why?  Thanks

Hmm, it doesn't look like there is any reason why you would be getting
an error on that line.  Have you tried going directly to that page using
your browser?  Nothing will actually occur and you'll should see nothing
but at least it'll tell you if the error is really with this include file or
in 
the file that is calling it.  There could be a missing curly brace or some
thing in the calling file and PHP is saying there is an error in the
included
file when, in fact, it isn't.
This has happened to me sometimes.  It might be the case for you.

Chris



RE: [PHP] database question

2001-11-29 Thread Warren Vail

Try;

SELECT whatever FROM articles WHERE textlines LIKE "%searchword%"

Two warnings;

1) This will force a "table scan" (the contents of each row in the entire
table because there can be no index to support faster searching of contents
that float in the column) which will be very slow on a large database (even
a medium size one).
2) This will also find words that exist inside other words. (ie the word
"ward" exists inside "toward")  If you try to solve this by imbedding blanks
between the wildcard (%) and the text, you will probably not be able to find
the word at the end of a line, or just prior to a comma or period.

I also believe there may be a way to make the search case insensitive, look
for something like a " WHERE tolower(textlines) LIKE ..." to force the
column values to be all lower case and make sure your search values are all
lower case as well.

Good luck,

Warren Vail

-Original Message-
From:   Michael Hall [mailto:[EMAIL PROTECTED]]
Sent:   Thursday, November 29, 2001 2:21 PM
To: PHP List
Subject:[PHP] database question


How can I search a MySQL database field that contains sentences (VARCHAR
datatype) or entire texts (TEXT datatype) for single words?

Let's say I want to search 100 articles stored in a database field as TEXT
for the word "bingo", is there any SQL or PHP way of doing that?

Mick

--

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] foo-bar

2001-11-29 Thread Christoph Starkmann

BTW...

Can anybody tell me where the words

foo and bar

come from?

Thanx,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: foo-bar

2001-11-29 Thread Julio Nobrega Trabalhando

http://info.astrian.net/jargon/terms/f/foo.html

  Btw, it was just a matter of googleing for 'foo bar origins'.

--

Julio Nobrega

No matter where you go, &this.

"Christoph Starkmann" <[EMAIL PROTECTED]> wrote in message
B120D7EC8868D411A63D0050040EDA77111904@XCHANGE">news:B120D7EC8868D411A63D0050040EDA77111904@XCHANGE...
> BTW...
>
> Can anybody tell me where the words
>
> foo and bar
>
> come from?
>
> Thanx,
>
> Kiko
>
> -
> It's not a bug, it's a feature.
> christoph starkmann
> mailto:[EMAIL PROTECTED]
> http://www.fh-augsburg.de/~kiko
> ICQ: 100601600
> -



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] database conection (newby)

2001-11-29 Thread Tommy Straetemans

Hi

I'am totaly new in php i work always with asp.
I give the folowing hidden fields to a php script





and in my php script i try to make my connection as follows:

$conn = mysql_connect('%s','%s','%s',$connectie,$uid,$pwd);
mysql_select_db('%s',$database,$conn);

but i keep getting this error:
Warning: Wrong parameter count for mysql_connect() in
/home/users/mijndomein.be/admin/x.php on line 27

What do i wrong or is there a method to make my connection with a include
file?




Tommy Straetemans



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database question

2001-11-29 Thread Jon Farmer

Actually the sql statement you want is

select whatever from articles where textlines regexp "^\Sbingo\S$"

regards

Jon
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


- Original Message -
From: "Warren Vail" <[EMAIL PROTECTED]>
To: "Michael Hall" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 2:57 PM
Subject: RE: [PHP] database question


Try;

SELECT whatever FROM articles WHERE textlines LIKE "%searchword%"

Two warnings;

1) This will force a "table scan" (the contents of each row in the entire
table because there can be no index to support faster searching of contents
that float in the column) which will be very slow on a large database (even
a medium size one).
2) This will also find words that exist inside other words. (ie the word
"ward" exists inside "toward")  If you try to solve this by imbedding blanks
between the wildcard (%) and the text, you will probably not be able to find
the word at the end of a line, or just prior to a comma or period.

I also believe there may be a way to make the search case insensitive, look
for something like a " WHERE tolower(textlines) LIKE ..." to force the
column values to be all lower case and make sure your search values are all
lower case as well.

Good luck,

Warren Vail

-Original Message-
From: Michael Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 2:21 PM
To: PHP List
Subject: [PHP] database question


How can I search a MySQL database field that contains sentences (VARCHAR
datatype) or entire texts (TEXT datatype) for single words?

Let's say I want to search 100 articles stored in a database field as TEXT
for the word "bingo", is there any SQL or PHP way of doing that?

Mick

--

Michael Hall
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://openlearningcommunity.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] foo-bar

2001-11-29 Thread Jon Haworth

http://www.tuxedo.org/~esr/jargon/html/entry/foo.html

HTH
Jon


-Original Message-
From: Christoph Starkmann [mailto:[EMAIL PROTECTED]]
Sent: 29 November 2001 14:54
To: '[EMAIL PROTECTED]'
Subject: [PHP] foo-bar


BTW...

Can anybody tell me where the words

foo and bar

come from?

Thanx,

Kiko


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Query help needed

2001-11-29 Thread Miles Thompson

It looks OK, but I have lousy track record of writing out "perfect" sql 
which doesn't work. Syntax looks OK.

1. What does it look like if you write out the update statement, assign it 
to a var and then echo the var?
2. Can you try it at the console?
3. Try " or  die(mysql_error) ;" to see if you get a more specific error
4. Are your date and time fields of  type char in the database? Yo may not 
need the surrounding single quotes.
5. Try building the sucker up bit by bit, until you hit where it breaks.

Miles

At 11:31 AM 11/29/2001 +, Payzillee wrote:
>Hi, could anyone tell me what is wrong with this Insert query?   I get an
>'Invalid query' error but I can't see the problem at all.  All the fields
>match exactly what is in my database, it's all in lowercase too.
>
>Cheers.
>
>mysql_query ("INSERT INTO listserve (title, surname, forename, job_title,
>org_name, address1, address2, address3, address4, city, region, postal_code,
>country, email, mob_phone, tel_number, fax_number, org_web_address,
>personal_web_address, special_interests, date, time)
>
>VALUES ('$title', '$surname', '$forename', '$job_title', '$org_name',
>'$address1', '$address2', '$address3', '$address4', '$city', '$region',
>'$postal_code', '$country', '$email', '$mob_phone', '$tel_number',
>'$fax_number', '$org_web_address', '$personal_web_address',
>'$special_interests', '$date','$time')")
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database conection (newby)

2001-11-29 Thread Tyler Longren

You've got too many parameters in the mysql_connect() and mysql_select_db()
functions.  You don't need the %s stuff.  Here's what it should be:
$conn = mysql_connect($connectie,$uid,$pwd);
mysql_select_db($database,$conn);

Good luck,
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

- Original Message -
From: "Tommy Straetemans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 8:52 AM
Subject: [PHP] database conection (newby)


> Hi
>
> I'am totaly new in php i work always with asp.
> I give the folowing hidden fields to a php script
> 
> 
> 
> 
>
> and in my php script i try to make my connection as follows:
>
> $conn = mysql_connect('%s','%s','%s',$connectie,$uid,$pwd);
> mysql_select_db('%s',$database,$conn);
>
> but i keep getting this error:
> Warning: Wrong parameter count for mysql_connect() in
> /home/users/mijndomein.be/admin/x.php on line 27
>
> What do i wrong or is there a method to make my connection with a include
> file?
>
>
>
>
> Tommy Straetemans
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: foo-bar

2001-11-29 Thread Arve Bersvendsen

Christoph Starkmann wrote in 
B120D7EC8868D411A63D0050040EDA77111904@XCHANGE:">news:B120D7EC8868D411A63D0050040EDA77111904@XCHANGE:

> Can anybody tell me where the words
> 
> foo and bar

http://www.tuxedo.org/~esr/jargon/html/entry/foo.html>
http://www.tuxedo.org/~esr/jargon/html/entry/bar.html>
http://www.tuxedo.org/~esr/jargon/html/entry/baz.html>

-- 
Arve http://www.bersvendsen.com/>

Newsere mot X-No-Archive

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database conection (newby)

2001-11-29 Thread Miles Thompson


In the include file, call it ""dbname.inc",


and then at the top of a page needing the database ...
Hi
>
>I'am totaly new in php i work always with asp.
>I give the folowing hidden fields to a php script
>
>
>
>
>
>and in my php script i try to make my connection as follows:
>
>$conn = mysql_connect('%s','%s','%s',$connectie,$uid,$pwd);
>mysql_select_db('%s',$database,$conn);
>
>but i keep getting this error:
>Warning: Wrong parameter count for mysql_connect() in
>/home/users/mijndomein.be/admin/x.php on line 27
>
>What do i wrong or is there a method to make my connection with a include
>file?
>
>
>
>
>Tommy Straetemans
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Sending fax with php, is it possible?

2001-11-29 Thread Raymond Lilleodegard

Hi all!

I have a little problem here : )

A customer wants a order made by a forminput sent to fax. Is it possible
with php? Or do I have to do it some other way?


Best regards Raymond



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] Alternating rows pulled from database

2001-11-29 Thread Andrey Hristov

can it be index_forum1 instead of index_forum. This code presumes that it's possible
while($group = $db->fetch_array($queryg)) {
  if($group[type] == "group") {
$bg = 1- $bg;
eval("\$forumlist .= \"".template("index_category".($bg+1)."\";");
if($catsonly != "on" || $gid) {
  $query = $db->query("SELECT * FROM $table_forums WHERE type='forum' 
   AND status='on' AND fup='$group[fid]' ORDER BY 
   displayorder");
  while($forum = $db->fetch_array($query)) {
$forumlist .= forum($forum, "index_forum");
  }
}
  }else {
$forumlist .= forum($group, "index_forum");
  }
}
Regards

Andrey Hristov
- Original Message - 
From: "MrBaseball34" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 5:31 PM
Subject: [PHP-DB] Alternating rows pulled from database


> I am trying to modify the XMB Forums to be more like
> UBB in looks.
> 
> In this code, I want to alternate forum_index templates. 
> 
> I have created two templates, one using $altbg1 and one using $altbg2. I want 
> to alternate the row colors... 
> 
> How would I accomplish that? 
> {from: index.php} 
> 
> code:
> while($group = $db->fetch_array($queryg)) {
>   if($group[type] == "group") {
> eval("\$forumlist .= \"".template("index_category")."\";");
> if($catsonly != "on" || $gid) {
>   $query = $db->query("SELECT * FROM $table_forums WHERE type='forum' 
>AND status='on' AND fup='$group[fid]' ORDER BY 
>displayorder");
>   while($forum = $db->fetch_array($query)) {
> $forumlist .= forum($forum, "index_forum");
>   }
> }
>   }else {
> $forumlist .= forum($group, "index_forum");
>   }
> }
> 
> 
> What I really need to do is something like this:
> 
>   $i = 0
>   while($forum = $db->fetch_array($query)) {
> if ($i % 2 = 0 {
>   $forumlist .= forum($forum, "index_forum");
> } else {
>   $forumlist .= forum($forum, "index_forum2");
> }
> $i = $i + 1;
>   }
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database conection (newby)

2001-11-29 Thread Andrey Hristov

$conn = mysql_connect($connectie,$uid,$pwd);
mysql_select_db($database,$conn);

%s is used in printf, sprintf

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message - 
From: "Tommy Straetemans" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 4:52 PM
Subject: [PHP] database conection (newby)


> Hi
> 
> I'am totaly new in php i work always with asp.
> I give the folowing hidden fields to a php script
> 
> 
> 
> 
> 
> and in my php script i try to make my connection as follows:
> 
> $conn = mysql_connect('%s','%s','%s',$connectie,$uid,$pwd);
> mysql_select_db('%s',$database,$conn);
> 
> but i keep getting this error:
> Warning: Wrong parameter count for mysql_connect() in
> /home/users/mijndomein.be/admin/x.php on line 27
> 
> What do i wrong or is there a method to make my connection with a include
> file?
> 
> 
> 
> 
> Tommy Straetemans
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] color problems when resizing image with GD

2001-11-29 Thread Michael Hall

We run on a Windows platform.  If a client uploads an image to my script
that is too wide, I want to use GD to resize the image down to the proper
dimensions.

The problem I'm having is that the resized image drops huge chunks of the
color pallette, creating what is basically a monochromatic image.

Is there any way around this?  Am I doing something wrong?  I'm not very
familiar at all with the graphics part of things, so I'm hoping there's
something glarinly obvious that I'm missing.

The code follows.

$src_img =
ImageCreateFromJpeg("../images/property/property_".$id."tmp.jpg");

#[...]

$dst_img = ImageCreate ($new_w,$new_h);


ImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img)
,ImageSY($src_img));

ImageJpeg($dst_img,"../images/property/property_".$id.".jpeg");



Michael Hall
Web Development Manager / Sr. Programmer
Prairie Fire Internet Technologies
[EMAIL PROTECTED]
605.357.9700 ext. 14


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Global storage of objects.

2001-11-29 Thread Stefan Bergstrand


I would like to know if there is a way to store objects globally from a
php-page, so that the object can be used from another page.

/Stefan B

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PDF print page creation...

2001-11-29 Thread bill

If the problem is just the web address, etc., in the bottom of the page, that can be
turned off.

In NN, File/Page Setup and uncheck the boxes in the header and footer

In IE, File/Page Setup and remove the stuff in the header and footer fields.



Lauri Vain wrote:

> Hello,
>
> A client requested a script to create a page to print out the list of clients
> that are subscribed to a chosen service. This list will be printed and then
> faxed to an outer source because that's how the second company that oursources
> the service requests it.
>
> The present script creates a HTML page with an image, text and a few tables. The
> problem with the HTML page is that the browser prints the web address of the
> script to the lower left corner of the sheet (and also things like "Page 1 from
> 1"). The PDF is meant to eliminate it all.
>
> How complex would it be to code this script to generate the PDF file.
>
> How much time would it take to make a PDF creator based on existing script that
> gets the data out of the database? Remember, the PDF would have to contain
> tables and a logo as well (image). The text has to be positioned and aligned as
> requested by the client.
>
> So my questions:
> 1. How hard would it be to create such a script?
> 2. How much time would it take? (any common pitfalls that could make coding time
> longer?)
> 3. What are the best classes/wrappers out there to handle the job?
> 4. Or would it be better to get a HTML to PDF converter (do such things exist
> and do they do a good job?)
>
> Thanks in advance!
>
> Yours,
> Lauri


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Global storage of objects.

2001-11-29 Thread Boget, Chris

> I would like to know if there is a way to store objects 
> globally from a php-page, so that the object can be used 
> from another page.

Yes, using sessions or cookies.

Chris



[PHP] upload problem

2001-11-29 Thread Miguel Loureiro

Hello all,
when I want to do an upload ( form ENCTYPE="multipart/form-data"
action=" . $PHP_SELF . " method="post">), sometimes ( having in form,
several input file types, ex.:), after
submit , dont show me the values uploaded ( aa_name ; aa_type) ?? Any
ideas why ?
thanks for your time...
--
Best Regards
Miguel Joaquim Rodrigues Loureiro




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] Global storage of objects.

2001-11-29 Thread Andrey Hristov

Simultaneously? Or you want them preloaded and constructed in memory on every page 
request?

Regards,
Andrey
- Original Message - 
From: "Stefan Bergstrand" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 5:56 PM
Subject: [PHP] Global storage of objects.


> 
> I would like to know if there is a way to store objects globally from a
> php-page, so that the object can be used from another page.
> 
> /Stefan B
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Global storage of objects.

2001-11-29 Thread Christoph Starkmann

Hi Stefan!
> I would like to know if there is a way to store objects 
> globally from a
> php-page, so that the object can be used from another page.

Why not writing these objects to a *.php document which you can
include wherever you need it?

HTH,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] upload problem

2001-11-29 Thread Andrey Hristov

var_dump($HTTP_POST_FILES);

HTH
Andrey Hristov
- Original Message - 
From: "Miguel Loureiro" <[EMAIL PROTECTED]>
To: "php-gen" <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 6:04 PM
Subject: [PHP] upload problem


> Hello all,
> when I want to do an upload ( form ENCTYPE="multipart/form-data"
> action=" . $PHP_SELF . " method="post">), sometimes ( having in form,
> several input file types, ex.:), after
> submit , dont show me the values uploaded ( aa_name ; aa_type) ?? Any
> ideas why ?
> thanks for your time...
> --
> Best Regards
> Miguel Joaquim Rodrigues Loureiro
> 
> 
> 





> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Ezmlm Hosts besides csoft.net?

2001-11-29 Thread Sondra Russell

Hello everyone!

I'm wondering if you guys could suggest a hosting company that provides:
php4
mySql
qmail
ezmlm (or ezmlm-idx).

I have been with csoft.net, which was wonderful and which provided 
all of these things, but last night they decided to pull down my web 
site for six hours without notification based on an erroneous 
accusation of sending spam.  They've reinstated the account, of 
course, but I'm still very unhappy with those guys and need to 
change!  I would tell anyone else to proceed with caution when 
hosting with them, btw.

Any suggestions would be welcome!

Best,
Sondra Russell


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] database question

2001-11-29 Thread Jani Mikkonen

> select whatever from articles where textlines regexp "^\Sbingo\S$"

Again, that would fail if the word 'bingo' is and the end of the sentence.
Allthou i realized my own example doesnt work either in that case. Best way
would be remove all characters like ,.!? and and split the string into
words.

But another question, do regular expressions really work in string
comparisons ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Ezmlm Hosts besides csoft.net?

2001-11-29 Thread Andrey Hristov

http://www.ispcheck.com

HTH
Andrey
- Original Message - 
From: "Sondra Russell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 6:02 PM
Subject: [PHP] Ezmlm Hosts besides csoft.net?


> Hello everyone!
> 
> I'm wondering if you guys could suggest a hosting company that provides:
> php4
> mySql
> qmail
> ezmlm (or ezmlm-idx).
> 
> I have been with csoft.net, which was wonderful and which provided 
> all of these things, but last night they decided to pull down my web 
> site for six hours without notification based on an erroneous 
> accusation of sending spam.  They've reinstated the account, of 
> course, but I'm still very unhappy with those guys and need to 
> change!  I would tell anyone else to proceed with caution when 
> hosting with them, btw.
> 
> Any suggestions would be welcome!
> 
> Best,
> Sondra Russell
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending fax with php, is it possible?

2001-11-29 Thread Jani Mikkonen

> A customer wants a order made by a forminput sent to fax. Is it possible
> with php? Or do I have to do it some other way?

Hey, php is a programming language, it does what ever you want (up to
certain restrictions ofcourse)

But for pointers, try installing hylafax (if you run *nix that is)  and
either, use its commandline tools or write the spooler to interact directly
with hylafax server (it uses protocol that resembles ftp (infact, its ftp
server but its own implementation)).

Btw, it would be interesting to write php classes to access hylafax server.
I promise to help out in desing and writing allthou i dont have modemline to
test anything.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Global storage of objects.

2001-11-29 Thread Jani Mikkonen

> I would like to know if there is a way to store objects globally from a
> php-page, so that the object can be used from another page.

Keyword is Serialization. If you save object to flatfile or to db, i dont
see any point why the result wouldnt be accessible from other places
(providing that those other places do have access to same datesource)

More info can be found @

http://www.php.net/manual/en/language.oop.serialization.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Memory leaks with LDAP?

2001-11-29 Thread Darren Gamble

Hey all,

Has anyone else had problems with memory leaks using PHP's LDAP functions?

I put together a LDAP server the other day, and wrote a PHP program to test
it.  I've stripped this program down to basically a ldap_connect, ldap_bind,
ldap_search on objectclass=* , ldap_get_entries, ldap_free_result and
ldap_unbind.  There are about 8k entries in the DB which is a bit under
10MB, but with each iteration of the program, about 100MB of memory is
leaked to httpd!  The program doesn't have to be run many times before the
server stops responding.

I note errors in the apache log indicating that it can not kill off its
children.  And, "/etc/init.d/httpd stop" needs to be called exactly twice to
stop the web process after the program is run.

I'm running php-4.0.6-7 as a module for apache-1.3.20-16; all Redhat 7.2
RPMs.

I posted a message on the PHP bug page recently, but, by reading the posting
guidelines on that page it seems that there is a good chance that no one
will even look at it.  I'm hoping that someone on this list has encountered
something similar and would be able to share their resolution.

Thanks to all who respond!


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: unbale to send mails using mail function

2001-11-29 Thread Ben Holt

Have a look at the path to sendmail in your php.ini file.  To get mine 
to work I had to set it to '/usr/sbin/sendmail -t -i'.  Your path may be 
different, but the -t and -i switches are important.

- Ben

Sanjay wrote:

> Hi
> 
> I have successfully installed PHP 4.0.6 with apache 1.3.22 on my mandrake
> Linux box. Now, the problem is I am not able to send email using mail () of
> php. However, I am able to send it using mail command.
> 
> Any help will be highly appreciated.
> 
> Regards
> Sanjay
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] APC and memory troubles

2001-11-29 Thread Shane Wright

Hi List,

I'm having some troubles with APC and was wondering if anyone else had seen 
this and perhaps knew of a solution...

Basically, random pages at random times cause the script to run out of 
memory.  This first happened with the default 8Mb limit, so I upped it to 
20Mb but the problem remained.

It happened in both the shm and mmap modes.  the versions are PHP 4.0.5 as an 
apache DSO and APC 1.1.0pl1.

Has anyone seen this before?  Is there anything else thats likely to ceuse 
problems with APC?

Any help appreciated,

Regards

Shane

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending fax with php, is it possible?

2001-11-29 Thread Raymond Lilleodegard

Thanks, that sounds great! I have to admit that i am pretty new with this
php language.

But to get this work, I have to use a "faxprogram"? and then send the
forminput to this program? That redirect the data to a fax?
I'll see what kind of program I can get.



"Jani Mikkonen" <[EMAIL PROTECTED]> wrote in message
001901c178f2$70f1d440$0264a8c0@delenn">news:001901c178f2$70f1d440$0264a8c0@delenn...
> > A customer wants a order made by a forminput sent to fax. Is it possible
> > with php? Or do I have to do it some other way?
>
> Hey, php is a programming language, it does what ever you want (up to
> certain restrictions ofcourse)
>
> But for pointers, try installing hylafax (if you run *nix that is)  and
> either, use its commandline tools or write the spooler to interact
directly
> with hylafax server (it uses protocol that resembles ftp (infact, its ftp
> server but its own implementation)).
>
> Btw, it would be interesting to write php classes to access hylafax
server.
> I promise to help out in desing and writing allthou i dont have modemline
to
> test anything.
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sending fax with php, is it possible?

2001-11-29 Thread Michael Geier

I have previously done this by creating either a text or PDF document with
PHP and then passing it off to HylaFAX.

The only problems I was having was that I would create a legal size PDF. 
When I sent it through HylaFAX, the destination fax machine would not
scale the PDF to various size paper, only cut off portions.  I suspect
however that the problem was related to a HylaFAX configuration, and not
PHP.

If you wish to use graphics in your fax, look at:
http://www.php.net/manual/en/ref.pdf.php

Otherwise, just create a plain text fax page from the form data  and send
it to HylaFAX.

HylaFAX homepage:
http://www.hylafax.org

NOTE: This is a UNIX-based solution.

--
Michael Geier
CDM Sports, Inc. - Systems Administrator
 email: [EMAIL PROTECTED]
 phone: 314.991.1511 x 6505
 pager: 314.318.9414 || [EMAIL PROTECTED] 

[EMAIL PROTECTED] wrote:
> Hi all!
> 
> I have a little problem here : )
> 
> A customer wants a order made by a forminput sent to fax. Is it possible

> with php? Or do I have to do it some other way?
> 
> 
> Best regards Raymond
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Help anyone

2001-11-29 Thread Dan McCullough

I need to edit a entry into the database via an admin script, how do I work in a radio 
selection
box, and populate it with the correct selection?

=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: fsockopen() prob

2001-11-29 Thread Yura

Nop, doesn't work - the same result, supplied argument is not valid 
file handler...

Youri

> Global variables are not really global in php because they are not
> available from within functions unless you specifically declare them
> as global.  This should work:
> 
> 130   function get_line {
> 131   global $socket_open;
> 132   $buffer = fgets($socket_open,500);
> 133   $buffer = eregi_replace("(\r|\n)","",$buffer);
> 134   return $buffer;
> 135   }
> 
> Fred
> 
> Yura <[EMAIL PROTECTED]> wrote in message
> 3C054EE3.19234.2726172@localhost">news:3C054EE3.19234.2726172@localhost...
> > I have a global variable
> > $socket_open = fsockopen($pop_server, 110,  $errno, $errstr, 60 );
> > then I define the function:
> >
> > 130   function get_line {
> > 131   $buffer = fgets($socket_open,500);
> > 132   $buffer = eregi_replace("(\r|\n)","",$buffer);
> > 133   return $buffer;
> > 134   }
> >
> > Here I've got the prob - it doesn't work, it sais: Warning: Supplied
> argument is not a valid File-
> > Handle resource in .../inc/pop-functions.inc on line 131
> >
> > At the same time $socket_open returns "Resource id #2" I don't know
> > what
> it means, could
> > anyone help me with it?
> >
> > Youri
> >
> >
> >
> >
> > <>< <>< <>< <>< God is our provider ><> ><> ><> ><>
> > http://www.body-builders.org
> >
> >
> 
> 
> 

<>< <>< <>< <>< God is our provider ><> ><> ><> ><> 
http://www.body-builders.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem with urlencode

2001-11-29 Thread faeton

Hello Sjoerd,

U can try using htmlentities().

OSv> I have a problem putting through a variable which contains an & in the
OSv> string.
OSv> When the variabele is something like: 
OSv> click here



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: db connect

2001-11-29 Thread Fred

How are you passing the name of the database?  Are you replacing 'sample_db'
in the line:
$link_id = db_connect('sample_db');
in show_more_db.php?

If so, then I do not see where there would be a problem.

Fred

Ian <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Wonder if anyone can help me out.
>
> I am trying to run an example out of a book Beginning Php by wrox.
>
> One of the examples is supposed to allow me to connect to a database by
> using a function that takes a database as an argument. It has an include
> file that contains the function.
>
> Problem I get is that the argument never seems to get passed and the
> function always uses the default value.
>
> I would greatly appreciate if someone could tell me why this happens. I
> would also appreciate if no one rewrites a completely different script, as
I
> am after debugging this one. ;-)
>
> Here is the include file:
>
>  file://common_db.inc
> $dbhost = 'localhost';
> $dbusername = 'phpuser';
> $dbuserpassword = 'phppass';
> $default_dbname = 'mysql';
>
> $MYSQL_ERRNO = '';
> $MYSQL_ERROR = '';
>
> function db_connect($dbname=' ') {
>global $dbhost, $dbusername, $dbuserpassword, $default_dbname;
>global $MYSQL_ERRNO, $MYSQL_ERROR;
>
>$link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword);
>if(!$link_id) {
>   $MYSQL_ERRNO = 0;
>   $MYSQL_ERROR = "Connection failed to the host $dbhost.";
>   return 0;
>}
>else if(empty($dbname) && !mysql_select_db($default_dbname)) {
>   $MYSQL_ERRNO = mysql_errno();
>   $MYSQL_ERROR = mysql_error();
>   return 0;
>}
>else if(!empty($dbname) && !mysql_select_db($dbname)) {
>   $MYSQL_ERRNO = mysql_errno();
>   $MYSQL_ERROR = mysql_error();
>   return 0;
>}
>else return $link_id;
> }
>
> function sql_error() {
>global $MYSQL_ERRNO, $MYSQL_ERROR;
>
>if(empty($MYSQL_ERROR)) {
>   $MYSQL_ERRNO = mysql_errno();
>   $MYSQL_ERROR = mysql_error();
>}
>return "$MYSQL_ERRNO: $MYSQL_ERROR";
> }
> ?>
>
> And here is the php script that uses this include file:
>
>
>  file://show_more_db.php
> include "./common_db.inc";
>
> $link_id = db_connect('sample_db');
> $result = mysql_query("SELECT * FROM user", $link_id);
>
> while($query_data = mysql_fetch_row($result)) {
> ?>
>   echo "'",$query_data[1],"' is also php ' known as ",$query_data[3],"";
> }
> ?>
>
>
> I hope someone can help me out please.
>
> Thankyou.
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help anyone

2001-11-29 Thread faeton

Hello Dan,

Thursday, November 29, 2001, 7:11:22 PM, you've written:
DM> I need to edit a entry into the database via an admin script, how do I work in a 
radio selection
DM> box, and populate it with the correct selection?

Something like that, maybe :)








Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] CSV output displayed in Excel or similar.

2001-11-29 Thread Matthew Clark

I have a PHP script that outputs several lines of comma separated values.. I
would like to display this output in Excel without having to write the
output to a file with a .csv extension and redirecting.

I have tried setting the content-type: application/vnd.ms-excel and Excel
isn't happy.. it complains that it can't open the file and on the odd chance
that I do get it working, it doesn't read the file as csv..

anyone know what's going wrong here??

Incidentally, if I do save the info down to a .csv and open it, it works
just fine.. but then I have a temporary file issue :-(

Regards,

Matthew Clark.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help anyone

2001-11-29 Thread Mike Eheler

ew
How about:

?>

>On-Line
>Off-Line

Here is what I did.
>if ($edit[status]=="On-line") {
>print "Status:  \n";
>print "On-line\n";
>print "Off-line\n";
>print "\n";
>} else {
>print "Status:  \n";
>print "On-line\n";
>print "Off-line\n";
>print "\n";
>}
>//and 
>if ($edit[single]=="1") {
>print "Single:  Yes  or No 
>type=\"radio\" name=\"single\" value=\"0\">\n";
>} else {
>print "Single:  Yes  or No type=\"radio\"
>name=\"single\" value=\"0\" checked>\n";
>}
>
>that works
>--- faeton <[EMAIL PROTECTED]> wrote:
>
>>Hello Dan,
>>
>>Thursday, November 29, 2001, 7:11:22 PM, you've written:
>>DM> I need to edit a entry into the database via an admin script, how do I work in a 
>radio
>>selection
>>DM> box, and populate it with the correct selection?
>>
>>Something like that, maybe :)
>>
>>
>>
>>
>>
>>
>>
>>
>>Ivan 'Faeton aka xetrix' Danishevsky
>>ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>=
>Dan McCullough
>---
>"Theres no such thing as a problem unless the servers are on fire!"
>h: 603.444.9808
>w: McCullough Family
>w: At Work
>
>__
>Do You Yahoo!?
>Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
>http://geocities.yahoo.com/ps/info1
>




[PHP] Would like to join list...

2001-11-29 Thread Steve Osborne

Can anyone email me directly and tell me how to subscribe to this list?

Thanks,

Steve Osborne
Database Programmer
Chinook Multimedia Inc.
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help anyone

2001-11-29 Thread Jani Mikkonen


> 
> 
> 

And if you want to make one of those selected use something like this:



 >
 >
 >




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] Help anyone

2001-11-29 Thread faeton

Hello Mike,

And cleaner:
';
print '';
?>

:)

ME> 
ME>  selected="selected"'; } ?>>On-Line
ME>  selected="selected"'; } ?>>Off-Line
ME> 
ME>  There's much better/general ways to do it, but the above is a nice,
ME> clean, quick and dirty way of doing it. Yes, clean and dirty. ;)



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Äåíüãè - çëî. È òåì áîëüøå, ÷åì èõ ìåíüøå. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help anyone

2001-11-29 Thread Dan McCullough

Here is what I did.
if ($edit[status]=="On-line") {
print "Status:  \n";
print "On-line\n";
print "Off-line\n";
print "\n";
} else {
print "Status:  \n";
print "On-line\n";
print "Off-line\n";
print "\n";
}
//and 
if ($edit[single]=="1") {
print "Single:  Yes  or No 
\n";
} else {
print "Single:  Yes  or No \n";
}

that works
--- faeton <[EMAIL PROTECTED]> wrote:
> Hello Dan,
> 
> Thursday, November 29, 2001, 7:11:22 PM, you've written:
> DM> I need to edit a entry into the database via an admin script, how do I work in a 
>radio
> selection
> DM> box, and populate it with the correct selection?
> 
> Something like that, maybe :)
> 
> 
> 
> 
> 
> 
> 
> 
> Ivan 'Faeton aka xetrix' Danishevsky
> ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
Dan McCullough
---
"Theres no such thing as a problem unless the servers are on fire!"
h: 603.444.9808
w: McCullough Family
w: At Work

__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] in_array error

2001-11-29 Thread Steve Osborne

Can anyone explain why I am getting the following error?

Fatal error: Call to unsupported or undefined function in_array() in
includes/chinlib21stCentury.inc on line 3131


Code:
if( (is_array($List)) AND (is_array($RemoveList)) )
 {
  $ListItems = count($List);
  sort($List);
  for($ListItem=0; $ListItem < $ListItems; $ListItem++)
  {
   //printf("List value: $List[$ListItem]\n");
   if(!(in_array($List[$ListItem],$RemoveList)) AND (trim($List[$ListItem])
<> "") ) // Line 3131
$diff[] = $List[$ListItem];
  }
 }elseif($debugit){
  echo "In function ListDiff List and RemoveList are NOT arrays";
 }
 return ($diff);


Thanks,

Steve Osborne
Database Programmer
Chinook Multimedia Inc.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Server wont execute my PHP files!!

2001-11-29 Thread Mike

I am being hosted by South West Bell, and my php files are not even
recognized.  They are stored in the correct folder, but SWB ONLY allows
read/write permissions, and NO chmod access.  The tech support guy told me
that I have to code the Execute permission in my php file.  Is that true?
and if so, how do I do that.  The error log on their server show that http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] in_array error

2001-11-29 Thread Gerard Onorato

Steve,

What version of PHP are you running. in_array is >= 4.0. is_array was in 3.0
so this may be an issue for you.

Gerard

-Original Message-
From: Steve Osborne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 29, 2001 3:08 PM
To: PHP-General (E-mail)
Subject: [PHP] in_array error


Can anyone explain why I am getting the following error?

Fatal error: Call to unsupported or undefined function in_array() in
includes/chinlib21stCentury.inc on line 3131


Code:
if( (is_array($List)) AND (is_array($RemoveList)) )
 {
  $ListItems = count($List);
  sort($List);
  for($ListItem=0; $ListItem < $ListItems; $ListItem++)
  {
   //printf("List value: $List[$ListItem]\n");
   if(!(in_array($List[$ListItem],$RemoveList)) AND (trim($List[$ListItem])
<> "") ) // Line 3131
$diff[] = $List[$ListItem];
  }
 }elseif($debugit){
  echo "In function ListDiff List and RemoveList are NOT arrays";
 }
 return ($diff);


Thanks,

Steve Osborne
Database Programmer
Chinook Multimedia Inc.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Server wont execute my PHP files!!

2001-11-29 Thread John S. Huggins

On Thu, 29 Nov 2001, Mike wrote:

>-I am being hosted by South West Bell, and my php files are not even
>-recognized.  They are stored in the correct folder, but SWB ONLY allows
>-read/write permissions, and NO chmod access.  The tech support guy told me
>-that I have to code the Execute permission in my php file.  Is that true?
>-and if so, how do I do that.  The error log on their server show that -command isn't even recognized!! So I assume their server isn't seeing the
>-file as a php and executing it.  Please help, anyone.

Sounds like their elevator does not do to the top floor when it comes to
PHP.

Seems to me like they do not even support PHP on the server they stuck you
on.

Try this simple file to test things out:



and then try...





**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

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

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: color problems when resizing image with GD

2001-11-29 Thread Andrew Chase

Are you using GD 2.0.1 and PHP 4.0.6?  If yes then try

$dst_img = ImageCreateTrueColor ($new_w,$new_h);

(http://www.php.net/manual/en/function.imagecreatetruecolor.php)

-Andy



> -Original Message-
> From: Michael Hall [mailto:[EMAIL PROTECTED]]
> Subject: color problems when resizing image with GD

> The problem I'm having is that the resized image drops huge chunks of the
> color pallette, creating what is basically a monochromatic image.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] getting a user's ip address

2001-11-29 Thread Ken Savage

Super new to PHP but I'm putting in the effort to learn quickly.
How would I output the user's IP address in a php file.

I want the webpage to say...

Your IP address is xx.xx.xx.xx

thanks
Ken Savage
http://kensavage.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] resizing images.

2001-11-29 Thread faeton

BTW, could anybody share its experience in writing scripts that can
resize images? And what extensions should be installed on server 4
such operationz.

Thanx.

--- Hit any user to continue. --- :)


Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Fatal error: memory size too big. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] getting a user's ip address

2001-11-29 Thread John S. Huggins

On Thu, 29 Nov 2001, Ken Savage wrote:

>-Super new to PHP but I'm putting in the effort to learn quickly.
>-How would I output the user's IP address in a php file.
>-
>-I want the webpage to say...
>-
>-Your IP address is xx.xx.xx.xx

Try finding it in these variables:

  $HTTP_SERVER_VARS["REMOTE_ADDR"]

or

  $REMOTE_ADDR

John


**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

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

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] getting a user's ip address

2001-11-29 Thread Mike Eheler

Your IP address is 

That is all case sensitive too, by the way.

Mike

Ken Savage wrote:

>Super new to PHP but I'm putting in the effort to learn quickly.
>How would I output the user's IP address in a php file.
>
>I want the webpage to say...
>
>Your IP address is xx.xx.xx.xx
>
>thanks
>Ken Savage
>http://kensavage.com
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Help anyone

2001-11-29 Thread Mike Eheler

Maybe, but where I come from, printing HTML is illegal, and XHTML 
compliance must be 100%, so:

>
>

Mike

faeton wrote:

>Hello Mike,
>
>And cleaner:
>print '';
>print ''').'>';
>?>
>
>:)
>
>ME> 
>ME> ME> selected="selected"'; } ?>>On-Line
>ME> ME> selected="selected"'; } ?>>Off-Line
>ME> 
>ME> ME> There's much better/general ways to do it, but the above is a nice,
>ME> clean, quick and dirty way of doing it. Yes, clean and dirty. ;)
>
>
>
>Ivan 'Faeton aka xetrix' Danishevsky
>ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
>::: Äåíüãè - çëî. È òåì áîëüøå, ÷åì èõ ìåíüøå. :::
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: resizing images.

2001-11-29 Thread Henrik Hansen

[EMAIL PROTECTED] (Faeton) wrote:

 > BTW, could anybody share its experience in writing scripts that can
 > resize images? And what extensions should be installed on server 4
 > such operationz.

here are some examples:
http://www.zend.com/codex.php?CID=344

you need GDlib installed or a command line tool such as imagemagick.

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] in_array error

2001-11-29 Thread Steve Osborne

I'm using php 4 on my machine, however the server that I am testing on only
supports php3

- Original Message -
From: "Gerard Onorato" <[EMAIL PROTECTED]>
To: "Steve Osborne" <[EMAIL PROTECTED]>; "PHP-General
(E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, November 29, 2001 11:29 AM
Subject: RE: [PHP] in_array error


> Steve,
>
> What version of PHP are you running. in_array is >= 4.0. is_array was in
3.0
> so this may be an issue for you.
>
> Gerard
>
> -Original Message-
> From: Steve Osborne [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 29, 2001 3:08 PM
> To: PHP-General (E-mail)
> Subject: [PHP] in_array error
>
>
> Can anyone explain why I am getting the following error?
>
> Fatal error: Call to unsupported or undefined function in_array() in
> includes/chinlib21stCentury.inc on line 3131
>
>
> Code:
> if( (is_array($List)) AND (is_array($RemoveList)) )
>  {
>   $ListItems = count($List);
>   sort($List);
>   for($ListItem=0; $ListItem < $ListItems; $ListItem++)
>   {
>//printf("List value: $List[$ListItem]\n");
>if(!(in_array($List[$ListItem],$RemoveList)) AND
(trim($List[$ListItem])
> <> "") ) // Line 3131
> $diff[] = $List[$ListItem];
>   }
>  }elseif($debugit){
>   echo "In function ListDiff List and RemoveList are NOT arrays";
>  }
>  return ($diff);
>
>
> Thanks,
>
> Steve Osborne
> Database Programmer
> Chinook Multimedia Inc.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: resizing images.

2001-11-29 Thread faeton

Hello Henrik,

That should be oK 4 my server, but how about my home apache+php on
win? Any solution?

HH> here are some examples:
HH> http://www.zend.com/codex.php?CID=344
HH> you need GDlib installed or a command line tool such as imagemagick.



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP 4.1 out?

2001-11-29 Thread ~~~i LeoNid ~~

On Wed, 28 Nov 2001 20:57:41 +0100 impersonator of [EMAIL PROTECTED] (Zeev
Suraski) planted &I saw in php.general:

>There were some last minute issues that required further testing...
>
It could be stated on the site, or (and) tar could be re-moved. As far as
I am concerned, as soon as something is placed on the web, you have no
control over reference to it..  And access you can regulate of c0urse:)

>Zeev
>
>At 20:53 28/11/2001, Julio Nobrega Trabalhando wrote:
>>   Mind if I ask why? I do have a few ideas, but I feel I am terribly wrong
>>about them :-)
>>
>>--
>>
>>Julio Nobrega
>>
>>No matter where you go, &this.
>>
>>"Zeev Suraski" <[EMAIL PROTECTED]> wrote in message
>>5.1.0.14.2.20011128204245.01e71090@localhost">news:5.1.0.14.2.20011128204245.01e71090@localhost...
>> > And for a good reason.  Please don't publish such URLs in the future...
>> >
>> > Zeev
>> >
>> > At 18:56 28/11/2001, Mike Eheler wrote:
>> > >Try it:
>> > >
>> > >http://www.php.net/distributions/php-4.1.0.tar.gz
>> > >
>> > >No word on the website, though.
>> > >
>> > >Mike

i Leon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Enabling magic quotes and sybase quotes for just one domain on a virtual server

2001-11-29 Thread Alain DESEINE

Hi,

I got a linux server with many domain names using PHP and various 
Database. Theses applications exists and were developped with this 
settings in php.ini :

magic_quotes_gpc= Off
magic_quotes_runtime 
= Off
magic_quotes_sybase = Off

Now for a new application using a sybase server, i need having these 
settings :

magic_quotes_gpc= On
magic_quotes_sybase = On

The problem is that if i modify the php.ini file the other applications 
will go with many bugs ...

So, is there a way to modify theses parameters for an entire domain 
name, i've notice that it will be perharps possible in some messages, 
but don't find how to do this ...

If somebody know how to do this ...

Many thanks for responses.

Best regards,

Alain DESEINE.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: CSV output displayed in Excel or similar.

2001-11-29 Thread Fred

I have had success using tab delimted files instead of comma delimited
files.  For some reason Excel does not behave as expected when opening csv
files from the web.  At least, it acts differently than it does when opening
them from the local disk.  At any rate, I use tabs to delimit fields and new
lines to delimit rows and it opens in Excel as expected, with one exception.
All numbers are treated as numbers even if they are enclosed in qoutes.  The
result it that "0009" is rendered as 9 in Excel.  Again, this does not
happen if the file is first saved, because Excel asks how to treat the
fields.

Fred

Matthew Clark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a PHP script that outputs several lines of comma separated values..
I
> would like to display this output in Excel without having to write the
> output to a file with a .csv extension and redirecting.
>
> I have tried setting the content-type: application/vnd.ms-excel and Excel
> isn't happy.. it complains that it can't open the file and on the odd
chance
> that I do get it working, it doesn't read the file as csv..
>
> anyone know what's going wrong here??
>
> Incidentally, if I do save the info down to a .csv and open it, it works
> just fine.. but then I have a temporary file issue :-(
>
> Regards,
>
> Matthew Clark.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Enabling magic quotes and sybase quotes for just one domain on a virtual server

2001-11-29 Thread faeton

Hello Alain,

In httpd.conf (or .htaccess) you can make:

php_value magic_quotes_gpc On
php_value magic_quotes_sybase On

Yeah, just like that :)

AD> magic_quotes_gpc= On
AD> magic_quotes_sybase = On

AD> The problem is that if i modify the php.ini file the other applications 
AD> will go with many bugs ...

AD> So, is there a way to modify theses parameters for an entire domain 
AD> name, i've notice that it will be perharps possible in some messages, 
AD> but don't find how to do this ...

AD> If somebody know how to do this ...



Ivan 'Faeton aka xetrix' Danishevsky
ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
::: Äåâóøêàì íå õâàòàåò æåíñòâåííîñòè, à æåíùèíàì - äåâñòâåííîñòè. :::


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] in_array error

2001-11-29 Thread Fred

You will not be able to use this and many other functions on a php3 only
machine.  For your convenience, all of the function references in the manual
state which versions of php support them and which do not.

Fred

Steve Osborne <[EMAIL PROTECTED]> wrote in message
008401c17916$dd87f200$[EMAIL PROTECTED]">news:008401c17916$dd87f200$[EMAIL PROTECTED]...
> I'm using php 4 on my machine, however the server that I am testing on
only
> supports php3
>
> - Original Message -
> From: "Gerard Onorato" <[EMAIL PROTECTED]>
> To: "Steve Osborne" <[EMAIL PROTECTED]>; "PHP-General
> (E-mail)" <[EMAIL PROTECTED]>
> Sent: Thursday, November 29, 2001 11:29 AM
> Subject: RE: [PHP] in_array error
>
>
> > Steve,
> >
> > What version of PHP are you running. in_array is >= 4.0. is_array was in
> 3.0
> > so this may be an issue for you.
> >
> > Gerard
> >
> > -Original Message-
> > From: Steve Osborne [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 29, 2001 3:08 PM
> > To: PHP-General (E-mail)
> > Subject: [PHP] in_array error
> >
> >
> > Can anyone explain why I am getting the following error?
> >
> > Fatal error: Call to unsupported or undefined function in_array() in
> > includes/chinlib21stCentury.inc on line 3131
> >
> >
> > Code:
> > if( (is_array($List)) AND (is_array($RemoveList)) )
> >  {
> >   $ListItems = count($List);
> >   sort($List);
> >   for($ListItem=0; $ListItem < $ListItems; $ListItem++)
> >   {
> >file://printf("List value: $List[$ListItem]\n");
> >if(!(in_array($List[$ListItem],$RemoveList)) AND
> (trim($List[$ListItem])
> > <> "") ) // Line 3131
> > $diff[] = $List[$ListItem];
> >   }
> >  }elseif($debugit){
> >   echo "In function ListDiff List and RemoveList are NOT arrays";
> >  }
> >  return ($diff);
> >
> >
> > Thanks,
> >
> > Steve Osborne
> > Database Programmer
> > Chinook Multimedia Inc.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: resizing images.

2001-11-29 Thread Henrik Hansen

[EMAIL PROTECTED] (Faeton) wrote:

 > Hello Henrik,
>
 > That should be oK 4 my server, but how about my home apache+php on
 > win? Any solution?

no problem just grab the php dist from php.net it has an gd extension
with it. If you want gif support also look for a build at php4win.de

-- 
Henrik Hansen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >