[PHP] Downloads, headers and binary data

2001-01-19 Thread Juan Germano

Hi. I'm trying to write a script to download a mp3 file. I did this:

$filesize=filesize($filename);
header("Content-disposition: attachment;filename=".basename($filename));
header("Content-type: application/octetstream");
header("Content-Transfer-Encoding: binary");
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Length: $filesize");
readfile($filename,$filesize);

I began with the first two headers but the problem is that the script works
fine with
text files but I get shorter files than the originals with mp3s, so I added
the rest trying to solve the problem.
So I tryied

$fp=fopen($filename,"r");
fread($fp,filesize($filename));
fclose($fp);

and

$fp=fopen($filename,"r");
fpassthru($fp);

None of above worked.
But I tryied using the php.exe and I got exactly what I want.
So, perhaps it is a problem with the headers. I tryied both Netscape and IE,
and also diferents content-type (audio/mpeg).
Anyone has ideas?

Juan Germano
[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] Downloads, headers and binary data

2001-01-19 Thread jeremy brand

your script is probably timing out.

Try doing:
set_time_limit(0); 

at the top of your script.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Fri, 19 Jan 2001, Juan Germano wrote:

> Date: Fri, 19 Jan 2001 05:38:48 -0300
> From: Juan Germano <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] Downloads, headers and binary data
> 
> Hi. I'm trying to write a script to download a mp3 file. I did this:
> 
> $filesize=filesize($filename);
> header("Content-disposition: attachment;filename=".basename($filename));
> header("Content-type: application/octetstream");
> header("Content-Transfer-Encoding: binary");
> header("Pragma: no-cache");
> header("Expires: 0");
> header("Content-Length: $filesize");
> readfile($filename,$filesize);
> 
> I began with the first two headers but the problem is that the script works
> fine with
> text files but I get shorter files than the originals with mp3s, so I added
> the rest trying to solve the problem.
> So I tryied
> 
> $fp=fopen($filename,"r");
> fread($fp,filesize($filename));
> fclose($fp);
> 
> and
> 
> $fp=fopen($filename,"r");
> fpassthru($fp);
> 
> None of above worked.
> But I tryied using the php.exe and I got exactly what I want.
> So, perhaps it is a problem with the headers. I tryied both Netscape and IE,
> and also diferents content-type (audio/mpeg).
> Anyone has ideas?
> 
> Juan Germano
> [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]

2001-01-19 Thread Teodor Cimpoesu

Hi Alex!
On Thu, 18 Jan 2001, Alex Black wrote:

> xml problems?
> 
> _what_ xml problems?
> 
I was refering to whole story of using `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] Setcookie problem in ie 5.0

2001-01-19 Thread Krzysztof Dziekiewicz

On Fri, 8 Dec 2000, Rustam Nabirov wrote:

> I'm using IE5.0 on Win98, it's as simple as it gets. But still I don't see
> any cookies saved. As far as I understand, on this platform cookies get
> saved in C:\WINDOWS\Cookies, and C:\WINDOWS\Temporary Internet Files has
> only shortcuts to those cookies.

C:\Windows\Profiles\\Cookies\


-- 
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] general CGI question

2001-01-19 Thread Brian Clark


Hello Hrishi, 

(H == "Hrishi") [EMAIL PROTECTED] writes:

H> I need to know how to get apache to parse CGI output with the SSI
H> parser (the [php] script will have includes, which need to go
H> through mod_include). changing the mime-type to x-server-parsed or
H> anything hooked by mod_include doesnt help.

Why not use the CGI to write the output to a shtml (or whatever) on
disk, then after the write, send the Location header() to the file
that you just wrote.

With the right extension, as defined in your server conf files, it
should treat it as an SSI parsed document.

Is that not an option?

H> thanks,
H> Hrishi

-Brian
--
I got vision, and the rest of the world wears bifocals. -- Butch Cassidy



-- 
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] File upload on linux

2001-01-19 Thread Brian Clark


Hello MacBane, 

(M == "MacBane") [EMAIL PROTECTED] writes:

M> I have some file upload code but it is not woking on debian linux,
M> could some one give me a hand



M> $the_path is set some where else

What is the value of $the_path?

M> $path = "/var/www/cms/gentext/$section/$doctype/";

This isn't even used in the code below. It's trying to copy $the_file
to $the_path. Ie. from one location, maybe /tmp if you're on Unix, to
another location. Judging by '\' you might not be on a  Unix machine.

M>  if (!@copy($the_file, $the_path."\".$the_file_name))

$the_path needs to be a valid directory -- it needs to exist, unless
you use mkdir() somewhere before it. It also must be writable by the
user the webserver is running as.

M>  {
M>// print("Something barfed, check u r path
M> $the_path$the_file_name");
M> }

M> }

Find out what $the_path is and make sure it exists.

-Brian
--
Is it possible to feel gruntled?



-- 
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] Error connecting to MySQL server

2001-01-19 Thread Brian Clark


Hello Rosen, 

(R == "Rosen") [EMAIL PROTECTED] writes:

R> When I try to connect to MySQL server I get message "Can't connect
R> to MySQL server (10060 )!

Where's your code?

Are you using someone else's application?

Is mysqld even running? Is it /still/ running after you get that error?

Are you trying to connect locally (localhost), or are you trying to
connect to another server running mysqld?

This can be cause by any number of things.

R> Please Help!
R> Thanks
R> Rosen Marinov


-Brian
--
An adequate bootstrap is a contradiction in terms.



-- 
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] Good Reads

2001-01-19 Thread Brian Clark


Hello Sean, 

(SB == "Sean Brown") [EMAIL PROTECTED] writes:

SB> Does anyone have any suggestions on a good book for beginners. I
SB> currently own "PHP3 Programming Browser-Based Applications" by
SB> David Medinets. I have no regrets thus far on purchasing the book
SB> but it seems to leave a lot out and his examples are somewhat...
SB> skewed.

I hear Julie Meloni's book is good for beginners, but I've never read
it. The Wrox books (red covers with photos) are good, as well.

http://www.php.net/books.php

(`more info' link under each)

SB> Cheers

-Brian
--
As Will Rogers would have said, "There is no such
thing as a free variable." 



-- 
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 with PHP Shell Scripting

2001-01-19 Thread Brian Clark


Hello Justin, 

(JY == "Justin Yu") [EMAIL PROTECTED] writes:

JY> When I tried connecting to Postgres through a shell script that I
JY> wrote, I get the following error:

JY> "Fatal error: Call to undefined function: pg_connect()"

Because you don't have pgsql (PostgreSQL) support built into your
version of PHP. But you know that by now.

JY> After searching the web for a solution, I realized that I have to
JY> compile PHP into its CGI version. Currently, PHP is installed as
JY> an Apache module on my machine.

Either a CGI or a DSO can have pgsql support. You just have to build
it that way.

JY> So, I tried to compile PHP by doing the following in the
JY> /usr/local/php-4.0RC1
JY> directory where the source files for PHP4.0RC1 are located:

JY> ./configure -with-pgsql
JY> make



Try the snapshot at:

http://snaps.php.net/php4-latest.tar.gz

Make sure you have a good installation of PostgreSQL from:

http://www.postgresql.org/software.html

Configure:

./configure --with-pgsql=/path/to/postgresql/base

You may want --enable-force-cgi-redirect, you decide
(http://www.php.net/manual/en/html/security.html#security.cgi)

Then see if it builds correctly.

JY> Justin

-Brian
--
Every program is a part of some other program and rarely fits.



-- 
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] Off The Topic But Please Help....

2001-01-19 Thread Brian Clark


Hello Statbat, 

(S == "Statbat") [EMAIL PROTECTED] writes:

S> 1. In my htdocs folder, I am able to access any file which is in
S> the htdocs folder but I am not able to access any file which in the
S> sub folder of htdocs. It says file not found. Lets suppose If I
S> have a test.php file in php folder in htdocs and I access it in
S> http://localhost/php/test.php than it says file not found although
S> it is in php folder in htdocs.

Make sure you created the php sub-directory _within_ the directory
that is specified in the httpd.conf's ServerRoot line.

S> 2. How do I configure apache to handle cgi. My cgi is installed in
S> c:\perl\

Do you mean you have perl installed in c:\perl?

S> Where my cgi scripts should be placed in the apache folder.

How about a sub-directory (although it might not work until you get
#1, above, corrected)?

In httpd.conf:

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi/ "C:/apache/cgi-bin/"

#
# "C:/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None


#
# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
#AddHandler cgi-script .cgi

S> Thanks again
S> Statbat

-Brian
--
A society that will trade a little liberty for a little order
will lose both, and deserve neither. --Thomas Jefferson



-- 
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] PDFLib and PHP and pdf_open_image_file

2001-01-19 Thread Brian Clark


Hello goood, 

(gg == "goood goood") [EMAIL PROTECTED] writes:

gg> I have an problem with PDFLib and PHP. I'm trying to include
gg> images in PDF file using pdf_open_image_file If in my source code
gg> is line:

gg>   $o=pdf_open_image_file($pdf,"gif","pict.gif");

gg> i get the error: Cannot find server or DNS Error (The page cannot
gg> be displayed). What's wrong.

This sounds more like a server or browser problem to me. I don't think
this has anything to do with the pdf* functions.

-Brian
--
You may be recognized soon. Hide.



-- 
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] temporary unsubscribe mailing list

2001-01-19 Thread Brian Clark


Hello Wen, 

(WNL == "Wen Ni Leong") [EMAIL PROTECTED] writes:

WNL> I would like to unsubscribe the mailing list for a week which is
WNL> effective from 20th of Jan 2001 to 28th of Jan 2001. I hope you
WNL> can automatic reactive me into the mailing list after the 28th of
WNL> Jan 2001.


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

WNL> Thank you.


Your servant, ;-)

-Brian
--
Programming is an unnatural act.



-- 
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] Newbie : info/tut on XML and PHP

2001-01-19 Thread Brian Clark


Hello Rahul, 

(RB == "Rahul Bhide") [EMAIL PROTECTED] writes:

RB> Can you give me pointers(read urls) to "Good Sites" on tutorials
RB> or info from scratch on XML with PHP.

http://www.phpbuilder.com/columns/justin2428.php3
http://www.phpbuilder.com/columns/joe2907.php3
http://www.phpbuilder.com/columns/

RB> Thanks in Advance.
RB> ~Rahul

-Brian
--
Man who pee on electric fence receive shocking news.



-- 
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] question on time-based function

2001-01-19 Thread Brian Clark


Hello Rudy, 

(RM == "Rudy McDaniel") [EMAIL PROTECTED] writes:

RM> Anyone have any ideas on how to make a function reset every
RM> 24-hours? For example, I have a function that grabs a random quote
RM> from a file and selects a new one every time the page is reloaded.
RM> What I want, however, is for the quote to remain the same for a
RM> day and then reset at some specified time (say midnight) and grab
RM> a new random quote for the next day. It seems like their should be
RM> any easy way to do this using mktime( ) or a similar function but
RM> I'm not fully grasping it. Any ideas on how to do this would be
RM> much appreciated.

Why not just make cron (once a day) read the quotes file, pick a
random line, write the quote to a file called quoteoftheday.php, then
just include() that file into your page?

Unless you're running this one a windows machine.. in that case you
might be able to do the same thing with some scheduler instead of
cron, I'm not sure.

-Brian
--
Opportunity makes a thief. -Francis Bacon, 1598



-- 
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] Good Reads

2001-01-19 Thread Boaz Yahav

Try the books section --> PHP :
http://www.weberdev.com/index.php3?GoTo=Shopping.php3

-Original Message-
From: Sean Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:18 AM
To: Php-General@Lists. Php. Net
Subject: [PHP] Good Reads


Does anyone have any suggestions on a good book for beginners. I currently
own "PHP3 Programming Browser-Based Applications" by David Medinets. I have
no regrets thus far on purchasing the book but it seems to leave a lot out
and his examples are somewhat... skewed.

Cheers


-- 
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] below10host.com as webhost?

2001-01-19 Thread Boaz Yahav

Look no further!!!

http://www.weberdev.com/phenominet/prices.htm

-Original Message-
From: Jeff Lacy [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] below10host.com as webhost?


I'm sorry, but why do you say webservpro doesn't make a lot of money?

I am really looking for a good host for a 'friend' of mine.   He has a small
website (<20mb) and I don't think it gets too many hits.  He doesn't have
very much money to spend on a web host, so it must be something cheap.  It
needs php (4 would be better), and at least 20 email accounts.  A mysql
database would be really, really good.  Ftp access (to upload pages) is a
must, but telnet/ssh is always a plus.  The host need to allow domain names.
I think this is about what my friend is looking for.  Does anyone have any
ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

Jeff



"Egan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> 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] Web hosting for PHP/MySQl development

2001-01-19 Thread Boaz Yahav

The best around!!!

http://www.weberdev.com/phenominet/prices.htm

-Original Message-
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 3:37 AM
To: PHP General
Subject: [PHP] Web hosting for PHP/MySQl development


Any recommendations for a good, savvy host for doing some PHP/MySQL
development? Not looking for a free service, obviously, but somebody with:
knowledgeable tech support, good mysql/php 4/zend support, decent mail
handling, and developers tools like: telnet/ssh, emacs, procmail, crontab
access, etc. Where are you php developers doing your hosting?

I have been scouring this list archives, but everyone is focussed on free or
extremely cheap. I also know about the PHP hosts listing, but the problem
with that is you never know if the positive comments are real or not, and
only people experienced with a host can tell you if they are any good or
not!

via private mail is fine, if you want to share that good thing with one
person instead of the list...

c
--
Chris Lott


-- 
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] Web hosting for PHP/MySQl development

2001-01-19 Thread WreckRman2


I would be willing to host sites for $10 a month with 100 meg, 25 Email,
yourdomain.com, FP2000 if you like, PHP 4.04 with MySQL. Contact me for more
information... No sites with extremely large bandwidth requirements please.

David Smith


-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 4:28 AM
To: 'Chris Lott'; PHP General
Subject: RE: [PHP] Web hosting for PHP/MySQl development


The best around!!!

http://www.weberdev.com/phenominet/prices.htm

-Original Message-
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 3:37 AM
To: PHP General
Subject: [PHP] Web hosting for PHP/MySQl development


Any recommendations for a good, savvy host for doing some PHP/MySQL
development? Not looking for a free service, obviously, but somebody with:
knowledgeable tech support, good mysql/php 4/zend support, decent mail
handling, and developers tools like: telnet/ssh, emacs, procmail, crontab
access, etc. Where are you php developers doing your hosting?

I have been scouring this list archives, but everyone is focussed on free or
extremely cheap. I also know about the PHP hosts listing, but the problem
with that is you never know if the positive comments are real or not, and
only people experienced with a host can tell you if they are any good or
not!

via private mail is fine, if you want to share that good thing with one
person instead of the list...

c
--
Chris Lott


--
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] Error connecting to MySQL server

2001-01-19 Thread Rosen

When I connect via WEB based admin, there is no problems !
The MySQL Server is remote.
But when I install on my computer software ( Artronoc Admin,  DbTools )
I receive error "Can't connect to MySQL server on host . (10060).

Please Help !
Thanks,
Rosen Marinov



"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello Rosen,
>
> (R == "Rosen") [EMAIL PROTECTED] writes:
>
> R> When I try to connect to MySQL server I get message "Can't connect
> R> to MySQL server (10060 )!
>
> Where's your code?
>
> Are you using someone else's application?
>
> Is mysqld even running? Is it /still/ running after you get that error?
>
> Are you trying to connect locally (localhost), or are you trying to
> connect to another server running mysqld?
>
> This can be cause by any number of things.
>
> R> Please Help!
> R> Thanks
> R> Rosen Marinov
>
>
> -Brian
> --
> An adequate bootstrap is a contradiction in terms.
>
>
>
> --
> 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] Error connecting to MySQL server

2001-01-19 Thread Pavel Kalian

Isn't it possible that you're just not allowed to connect to the MySQL host
remotely?

Pavel

- Original Message -
From: "Rosen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:55 AM
Subject: Re: [PHP] Error connecting to MySQL server


> When I connect via WEB based admin, there is no problems !
> The MySQL Server is remote.
> But when I install on my computer software ( Artronoc Admin,  DbTools )
> I receive error "Can't connect to MySQL server on host . (10060).
>
> Please Help !
> Thanks,
> Rosen Marinov
>
>
>
> "Brian Clark" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > Hello Rosen,
> >
> > (R == "Rosen") [EMAIL PROTECTED] writes:
> >
> > R> When I try to connect to MySQL server I get message "Can't connect
> > R> to MySQL server (10060 )!
> >
> > Where's your code?
> >
> > Are you using someone else's application?
> >
> > Is mysqld even running? Is it /still/ running after you get that error?
> >
> > Are you trying to connect locally (localhost), or are you trying to
> > connect to another server running mysqld?
> >
> > This can be cause by any number of things.
> >
> > R> Please Help!
> > R> Thanks
> > R> Rosen Marinov
> >
> >
> > -Brian
> > --
> > An adequate bootstrap is a contradiction in terms.
> >
> >
> >
> > --
> > 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] Error connecting to MySQL server

2001-01-19 Thread Brian Clark


Hello Rosen, 

(R == "Rosen") [EMAIL PROTECTED] writes:

R> When I connect via WEB based admin, there is no problems ! The
R> MySQL Server is remote. But when I install on my computer software
R> ( Artronoc Admin, DbTools ) I receive error "Can't connect to MySQL
R> server on host . (10060).

MySQL has a database of its own (named, oddly enough, mysql ;)). That
database and it's tables control permissions.

You more than likely need to set permissions for your user so that you
are allowed to connect to the database without having to connect
through localhost (ie. what you are wanting to do).

% mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 97 to server version: 3.22.32

Type 'help' for help.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe user;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| Host| char(60)  |  | PRI | |   |
| User| char(16)  |  | PRI | |   |
| Password| char(16)  |  | | |   |
| Select_priv | enum('N','Y') |  | | N   |   |
| Insert_priv | enum('N','Y') |  | | N   |   |
| Update_priv | enum('N','Y') |  | | N   |   |
| Delete_priv | enum('N','Y') |  | | N   |   |
| Create_priv | enum('N','Y') |  | | N   |   |
| Drop_priv   | enum('N','Y') |  | | N   |   |
| Reload_priv | enum('N','Y') |  | | N   |   |
| Shutdown_priv   | enum('N','Y') |  | | N   |   |
| Process_priv| enum('N','Y') |  | | N   |   |
| File_priv   | enum('N','Y') |  | | N   |   |
| Grant_priv  | enum('N','Y') |  | | N   |   |
| References_priv | enum('N','Y') |  | | N   |   |
| Index_priv  | enum('N','Y') |  | | N   |   |
| Alter_priv  | enum('N','Y') |  | | N   |   |
+-+---+--+-+-+---+
17 rows in set (0.00 sec)

mysql> describe db;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| Host| char(60)  |  | PRI | |   |
| Db  | char(32)  |  | PRI | |   |
| User| char(16)  |  | PRI | |   |
| Select_priv | enum('N','Y') |  | | N   |   |
| Insert_priv | enum('N','Y') |  | | N   |   |
| Update_priv | enum('N','Y') |  | | N   |   |
| Delete_priv | enum('N','Y') |  | | N   |   |
| Create_priv | enum('N','Y') |  | | N   |   |
| Drop_priv   | enum('N','Y') |  | | N   |   |
| Grant_priv  | enum('N','Y') |  | | N   |   |
| References_priv | enum('N','Y') |  | | N   |   |
| Index_priv  | enum('N','Y') |  | | N   |   |
| Alter_priv  | enum('N','Y') |  | | N   |   |
+-+---+--+-+-+---+
13 rows in set (0.01 sec)

mysql> describe host;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| Host| char(60)  |  | PRI | |   |
| Db  | char(32)  |  | PRI | |   |
| Select_priv | enum('N','Y') |  | | N   |   |
| Insert_priv | enum('N','Y') |  | | N   |   |
| Update_priv | enum('N','Y') |  | | N   |   |
| Delete_priv | enum('N','Y') |  | | N   |   |
| Create_priv | enum('N','Y') |  | | N   |   |
| Drop_priv   | enum('N','Y') |  | | N   |   |
| Grant_priv  | enum('N','Y') |  | | N   |   |
| References_priv | enum('N','Y') |  | | N   |   |
| Index_priv  | enum('N','Y') |  | | N   |   |
| Alter_priv  | enum('N','Y') |  | | N   |   |
+-+---+--+-+-+---+
12 rows in set (0.00 sec)

mysql>


You need to start here, and read the whole online chapter on the MySQL
Access Privilege System:

http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.html#Privilege_system


And you will need root (mysql) access to modify those tables. If you
get your databa

Re: [PHP] stripping the keywords from a search engine... again...

2001-01-19 Thread Robin Vickery

> "BC" == Brian Clark <[EMAIL PROTECTED]> writes:

 > Hello Dallas,

 > (DK == "Dallas Kropka") [EMAIL PROTECTED] writes:

 DK> Posted earlier but got no response so here it is again...

 > I gave you a quick explanation of one way to do it earlier, but I
 > know of no tutorials off the top of my head.

 > Here is a lengthy example if you _have_ to see code:

 (...)

 > But there has to be an easier solution out there that's already
 > been ridden to death. The above is going to get nasty rather
 > quickly I'd imagine, and every search engine, more than likely, is
 > going to have a completely different query string. There's no way
 > I'm going to look.  :)

Hiyah,

This is a slightly more flexible way of doing pretty much the same thing.
You can then log the output of search_term($HTTP_REFERER) for later analysis.

I've not split the search terms up into words (I'm thinking of how boolean 
searches like 'foo AND NOT bar' would skew the results and how search phrases
like 'foo AND "bar baz"' would be split up).

Unfortunately, the analysing the logs (properly) is going to be more of a job.

-robin

 "q",
   "www.google.com"=> "q",
   "search.yahoo.com"  => "p",
   "search.excite.com" => "search",
   "www.lycos.com" => "query",
   "www.lycos.co.uk"   => "query"
   );

  // if no referer's been passed, forget it.
  if(!isset($referer) || empty($referer) ) return false;

  // split the url into logical bits.
  $url = parse_url( $referer );

  // if we don't recognise the search engine forget it.
  if(! $terms = $engine[strtolower( $url['host'] )] ) return false;

  // parse the query part of the url and put it in $REFERER_GET_VARS.
  parse_str( $url['query'], $REFERER_GET_VARS );

  // find the appropriate value and return it together with the search engine as a 
hash.
  return array(
   "engine" => strtolower( $url['host'] ),
   "term"   => $REFERER_GET_VARS[$terms]
   );
}

print_r( search_term( $HTTP_REFERER ) );

?>

-- 
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] a text formating & cpu question

2001-01-19 Thread Christian Reiniger

On Thursday 18 January 2001 23:05, Noel Akins wrote:
> Question 2:
> Is there a way for php to detect the cpu speed of a users computer?

If you're on a Linux machine you can read /proc/cpuinfo and pick out the 
speed entry.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...to paraphrase Churchill, while representative  democracy may be
terrible, it's still the best system that large corporations can buy.

- David Weinberger JOHO January 25, 2000

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

2001-01-19 Thread John LYC

hi, i have a situation where i need to upload  3 img file within an
array that is within another array. 2 di-array
i have no problem with only variable type and value but its not working
with type="file".

here's my code

"; //this is working
print ""; //this is
not
   }
}


?>

i can get  check[x][x] value;
but i cant get ans[x][x] file;

how do i do this???
thanks
john


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

2001-01-19 Thread Bruno Freire

Hi My name is Bruno, I'm in Brazil and I'm new in PHP...


I wanna know how can I roll in the records in a dataset.
Like...
Move First
Move last
Move next.os something like this

Thanks..



[PHP] PATH_TRANSLATED doesn't work correctly !!!

2001-01-19 Thread Heino H. Gehlsen

I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via
Apache's Action directive (directing all requests through a script).

But PHP messes PATH_TRANSLATED up and all I end up with a copy of SCRIPT_FILENAME !

I'm using PHP 4.0.3pl1 on a standard Debian 2.2r2 installation with Apache httpd 1.3.9 
with these directives in httpd.conf:
Options +MultiViews
Action  text/html /script.php

A resuest for "/index" should result in:
PATH_TRANSLATED = /path/to/index.html
PATH_TRANSLATED = /path/to/index.en.html (for the English version)
PATH_TRANSLATED = /path/to/index.X.html (for the X version)

BUT what I get is:
PATH_TRANSLATED = /path/to/script.php (no matter what i request !)

Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy
shown in phpinfo() under "Apache Environment" but not under "PHP Variables")


Yours hopefully
Heino H. Gehlsen


--
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] RE: Ethics question...

2001-01-19 Thread Max A. Derkachev

Hello Randy,

Thursday, January 18, 2001, 9:49:37 PM, you wrote:

RJ> is there any benchmarks or proof that I should host a high traffic site on a
RJ> FREEBSD/APACHE instead of a redhat Linux/Apache server?

I can't show the figures, but I gave the feeling that FreeBSD behaves
better under heavy load. I have a production FreeBSD 4-STABLE
webserver that runs ugly 2-years-old perl scripts written by an
apprentice programmer (currently the software is being rewritten in
PHP :)). Sometimes when the site is seriously hit (sometimes i can
hardly type a letter on a console), it is going serve requests (of
course, it slows, but ...). When the load is falling after the peak,
it recovers VERY fast, and works fine then. I also have a Debian
Potato for testing. When I seriously hit it, It is NEVER recovers
itself without my intervention (maybe I lack patience ? :) ), I should
do something like killall -1 httpd to restore normal operations.

-- 
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 



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

2001-01-19 Thread Markus H. Maussner

hi...

every time i do a session_start();  with php i get in the first two lines
of the output this 
 
&PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Your data  Contact
LOGOUT  
&PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Contact  LOGOUT

do i do something wrong ? can i put this message somehow off ?

everything else work fine.. sessions and so.. just this two lines are a
bit disturbing me...

markus



-- 
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] Perl-like DBI and generic SQL

2001-01-19 Thread mlemos

Hello Dean,

Dean Hall wrote:
> 
> Is metabase in the "DB" subdirectory of PEAR?

No, Metabase is available for free in a much larger PHP component site:
the PHP Classes Repository.

Almost 4.000 real PHP users have downloaded it from here:

http://phpclasses.UpperDesign.com/browse.html/package/20

You may also find some more Metabase based database components here:

http://phpclasses.upperdesign.com/browse.html/class/10

Enjoy,
Manuel Lemos

-- 
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-CVS] cvs: php4 /ext/sablot php_sablot.h sablot.c

2001-01-19 Thread Jani Taskinen

sniper  Fri Jan 19 03:44:12 2001 EDT

  Modified files:  
/php4/ext/sablotphp_sablot.h sablot.c 
  Log:
  @- Added xslt_set_scheme_handler() function ([EMAIL PROTECTED])
  
  
Index: php4/ext/sablot/php_sablot.h
diff -u php4/ext/sablot/php_sablot.h:1.12 php4/ext/sablot/php_sablot.h:1.13
--- php4/ext/sablot/php_sablot.h:1.12   Tue Jan 16 04:02:47 2001
+++ php4/ext/sablot/php_sablot.hFri Jan 19 03:44:12 2001
@@ -52,6 +52,7 @@
 PHP_FUNCTION(xslt_create);
 PHP_FUNCTION(xslt_run);
 PHP_FUNCTION(xslt_set_sax_handler);
+PHP_FUNCTION(xslt_set_scheme_handler);
 PHP_FUNCTION(xslt_set_error_handler);
 #ifdef HAVE_SABLOT_SET_ENCODING
 PHP_FUNCTION(xslt_set_encoding);
@@ -97,6 +98,9 @@
zval *charactersHandler;
zval *endDocHandler;

+/* Scheme Handling */
+   zval *getAllHandler;
+
/* Sablotron Related */
SablotHandle p;
 
Index: php4/ext/sablot/sablot.c
diff -u php4/ext/sablot/sablot.c:1.31 php4/ext/sablot/sablot.c:1.32
--- php4/ext/sablot/sablot.c:1.31   Wed Jan 17 06:14:22 2001
+++ php4/ext/sablot/sablot.cFri Jan 19 03:44:12 2001
@@ -54,6 +54,14 @@
 static MH_ERROR _php_sablot_error(void *, SablotHandle, MH_ERROR, MH_LEVEL, char **);
 static void _php_sablot_standard_error(php_sablot_error *, php_sablot_error, int, 
int);
 
+/* Scheme Handling Functions */
+static int _php_sablot_sh_getAll(void *userData,  SablotHandle p, const char *scheme, 
+const char *rest, char **buffer, int *byteCount);
+static int _php_sablot_sh_freeMemory(void *userData,  SablotHandle p, char *buffer);
+static int _php_sablot_sh_open(void *userData,  SablotHandle p, const char *scheme, 
+const char *rest, int *handle);
+static int _php_sablot_sh_get(void *userData,  SablotHandle p, int handle, char 
+*buffer, int *byteCount);
+static int _php_sablot_sh_put(void *userData,  SablotHandle p, int handle, const char 
+*buffer, int *byteCount);
+static int _php_sablot_sh_close(void *userData,  SablotHandle p, int handle);
+
 /* PHP Utility Functions */
 static void _php_sablot_ht_char(HashTable *, char **);
 static zval *_php_sablot_string_zval(const char *);
@@ -137,6 +145,19 @@
 _php_sablot_error
 };
 
+/**
+ * Scheme Handler structure for use when Sablotron
+ * call rhe document Xpath function.
+ */
+static SchemeHandler sh = {
+  _php_sablot_sh_getAll,
+  _php_sablot_sh_freeMemory,
+  _php_sablot_sh_open,
+  _php_sablot_sh_get,
+  _php_sablot_sh_put,
+  _php_sablot_sh_close
+};
+
 #ifdef ZTS
 int sablot_globals_id;
 #else
@@ -158,6 +179,7 @@
 PHP_FE(xslt_openlog,  NULL)
 PHP_FE(xslt_closelog, NULL)
 PHP_FE(xslt_set_sax_handler,  NULL)
+PHP_FE(xslt_set_scheme_handler,   NULL)
 PHP_FE(xslt_set_error_handler,NULL)
 PHP_FE(xslt_set_base, NULL)
 #ifdef HAVE_SABLOT_SET_ENCODING
@@ -571,6 +593,13 @@
 RETURN_FALSE;
 }
 
+   ret = SablotRegHandler(handle->p, HLR_SCHEME, (void *)&sh, (void *)handle);
+
+   if (ret) {
+   SABLOTG(last_errno) = ret;
+   RETURN_FALSE;
+   }
+
 ZEND_REGISTER_RESOURCE(return_value, handle, le_sablot);
 handle->index = Z_LVAL_P(return_value);
 }
@@ -804,6 +833,11 @@
 zend_get_parameters_ex(2, &xh, &handlers) == FAILURE) {
 WRONG_PARAM_COUNT;
 }
+
+if ((*handlers)->type != IS_ARRAY) {
+   php_error(E_ERROR, "The second parameter must be an array");
+   }
+
 ZEND_FETCH_RESOURCE(handle, php_sablot *, xh, -1, "PHP-Sablotron Handle", 
le_sablot);
 
 handlers_list = HASH_OF(*handlers);
@@ -848,6 +882,54 @@
 /* }}} */
 
 
+/* {{{ proto void xslt_set_scheme_handler(resource xh, array handlers)
+   Set SAX Handlers on the resource handle given by xh. */
+PHP_FUNCTION(xslt_set_scheme_handler)
+{
+zval **xh,
+ **handlers,
+ **indiv_handlers;
+php_sablot *handle;
+HashTable *handlers_list;
+char *string_key = NULL;
+ulong num_key;
+SABLOTLS_FETCH();
+
+if (ZEND_NUM_ARGS() != 2 ||
+zend_get_parameters_ex(2, &xh, &handlers) == FAILURE) {
+WRONG_PARAM_COUNT;
+}
+
+if ((*handlers)->type != IS_ARRAY) {
+   php_error(E_ERROR, "The second parameter must be an array");
+   }
+
+ZEND_FETCH_RESOURCE(handle, php_sablot *, xh, -1, "PHP-Sablotron Handle", 
+le_sablot);
+
+handlers_list = HASH_OF(*handlers);
+
+for (zend_hash_internal_pointer_reset(handlers_list);
+ zend_hash_get_current_data(handlers_list, (void **)&indiv_handlers) == 
+SUCCESS;
+ zend_hash_move_forward(handlers_list)) {
+
+SEPARATE_ZVAL(indiv_handlers);
+
+if (zend_hash_get_current_key(handlers_list, &string_key, &num_key, 0) == 
+HASH_KEY_IS_LONG) {
+php_error(E_WARNING, "The Keys of the first dimension of your array must 
+be strings");
+RETURN_FALSE;
+}
+
+if (!strcasecmp("getall", string_key)) {
+   

[PHP] References in an array

2001-01-19 Thread Ruppel, Mathias

Hi there,
 
I'm just a beginner in programming PHP; so my problem is probably a mistake
in my thinking.
I'm using some arrays to display information of an internal news-server in a
web-browser, like
 
$overview = imap_fetch_overview($mbox, "1:$last", 0);
$IDs = array();
$i = 0;
 
foreach($overview as $val){
$IDs[$i][0] = $val->message_id;
$IDs[$i][1] = &$val;
$i++;
}
 
echo "";
foreach($IDs as $val){
echo "" . $val[1]->subject . "";
}
echo "";
 
Unfortunately I only get an empty table; the subject of the referenced
header is not printed in the HTML-Code. Where's the error in my thinking ?
 
Any idea ?
 
Thank you
 
Mathias

 
Mathias Ruppel
Abt. TAC
SAP AG
Neurottstr. 16
69190 Walldorf
 
Tel. +49 (0) 6227 76 34 23
[EMAIL PROTECTED]  

 



[PHP] PHP 4 cgi upgrade problem

2001-01-19 Thread Hrishi

Hello,

We have a problem with running php4 as the cgi handler for php requests.

Our setup was RH6.2/i586//Apache1.3.3(compiled locally) using PHP4.0.1pl2 as
cgi(compiled locally), with the .htaccess looking like:


AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php /cgi-bin/php4
Action application/x-httpd-php-source /cgi-bin/php4


when we installed 4.0.3pl1 executable(with all the same options), all the php
scripts say only one thing:


Parse error: parse error yada yadda in /cgi-bin/php

we replaced the 4.0.1pl2 executable
(the libraries for 4.0.1 & 4.0.3 are in seperate directories, and both are
configured separately).
everything works as before with the older version.
i'm stumped.

can anyone help?

TIA,
Hrishi

-- 
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] how to trigger incomming mail

2001-01-19 Thread Jeroen Olthof

hi,

I'm building a online shop where people are able to pay online. The pay part
is done by a external company who sends mail to a specifeid mail address
when orders are placed and when orders are succesfully payed. both mails
contains a order nummer in subject.
now what I want is to automaticly match those 2 mail so I can write in a
mysql database that the order is payed.
I'd made a mail address payment@

on this mail I want to trigger mail incomming on this adres so I can start a
php script that filters this standaard mail getting the order code and put
in in a database with status incompleet
and when another mail arrives on the payment address, filter order nummer
again so I can look in the database to see if it there, to compleet the
payment

kind regards
Jeroen Olthof



-- 
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] Downloading PHP 4.0.4pl1

2001-01-19 Thread AFONSO Margarida Ramos

 
Dear all
 
I can not download the 
 
 
 PHP 4.0.4pl1 - 13 January 2001
   (3.64 Mb CGI binary plus server API versions for Apache, AOL server,
ISAPI and NSAPI. MySQL support built-in, many extensions included, packaged
as zip) 
 
from the site http://www.php.net/downloads.php
 
 
When the download process is closw to the end I get the error message "File
... cannot be found"
 
Does anyone know any other way to get this file?
PS- I tried ftp but I could not access the server (maximum number of
anonymous downloads was rieched)
 
Thank you
 
Margarida Afonso

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




SV: [PHP] password()

2001-01-19 Thread Håkan Askengren

For me it´s plain text in Mysql table.
In a project with < 500 users it is easy to
to read forgotten passwords... Instead of giving away a new.
/Håkan

"Chris Lee" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:9409fm$mg$[EMAIL PROTECTED]
> Im curious to see how other php developers store their passwd's
> -plain text in db
> -use of unix password()
> -use of db password()
> -other ?
>
> Chris Lee
> Mediawaveonline.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-CVS] cvs: php4 /pear/HTML IT.php ITX.php

2001-01-19 Thread Sebastian Bergmann

sbergmann   Fri Jan 19 05:37:03 2001 EDT

  Modified files:  
/php4/pear/HTML IT.php ITX.php 
  Log:
  Whitespace only.
  
Index: php4/pear/HTML/IT.php
diff -u php4/pear/HTML/IT.php:1.2 php4/pear/HTML/IT.php:1.3
--- php4/pear/HTML/IT.php:1.2   Thu Jan 18 12:43:25 2001
+++ php4/pear/HTML/IT.php   Fri Jan 19 05:37:03 2001
@@ -13,10 +13,10 @@
 // | obtain it through the world-wide-web, please send a note to  |
 // | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 // +--+
-// | Authors: Ulf Wendel <[EMAIL PROTECTED]>   |
+// | Authors: Ulf Wendel <[EMAIL PROTECTED]>   |
 // +--+
 //
-// $Id: IT.php,v 1.2 2001/01/18 20:43:25 uw Exp $
+// $Id: IT.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $
 //
 /**
 * Integrated Template - IT
@@ -109,7 +109,7 @@
 * 
 * 
 * @author  Ulf Wendel <[EMAIL PROTECTED]>
-* @version  $Id: IT.php,v 1.2 2001/01/18 20:43:25 uw Exp $
+* @version  $Id: IT.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $
 * @accesspublic
 */
 class IntegratedTemplate {
Index: php4/pear/HTML/ITX.php
diff -u php4/pear/HTML/ITX.php:1.2 php4/pear/HTML/ITX.php:1.3
--- php4/pear/HTML/ITX.php:1.2  Thu Jan 18 12:52:33 2001
+++ php4/pear/HTML/ITX.php  Fri Jan 19 05:37:03 2001
@@ -13,10 +13,10 @@
 // | obtain it through the world-wide-web, please send a note to  |
 // | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
 // +--+
-// | Authors: Ulf Wendel <[EMAIL PROTECTED]>   |
+// | Authors: Ulf Wendel <[EMAIL PROTECTED]>   |
 // +--+
 //
-// $Id: ITX.php,v 1.2 2001/01/18 20:52:33 uw Exp $
+// $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $
 //
 /**
 * Integrated Template Extension - ITX
@@ -32,7 +32,7 @@
 *
 * @author Ulf Wendel <[EMAIL PROTECTED]>
 * @accesspublic
-* @version $Id: ITX.php,v 1.2 2001/01/18 20:52:33 uw Exp $
+* @version $Id: ITX.php,v 1.3 2001/01/19 13:37:03 sbergmann Exp $
 */
 class IntegratedTemplateExtension extends IntegratedTemplate {
 



-- 
PHP CVS 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] Downloads, headers and binary data

2001-01-19 Thread Rick Hodger


"Juan Germano" <[EMAIL PROTECTED]> wrote in message
004b01c081f3$46be8160$ddf90dd1@juangerm">news:004b01c081f3$46be8160$ddf90dd1@juangerm...
> Hi. I'm trying to write a script to download a mp3 file. I did this:
>
> $filesize=filesize($filename);
> header("Content-disposition: attachment;filename=".basename($filename));
> header("Content-type: application/octetstream");
> header("Content-Transfer-Encoding: binary");
> header("Pragma: no-cache");
> header("Expires: 0");
> header("Content-Length: $filesize");
> readfile($filename,$filesize);
>
> I began with the first two headers but the problem is that the script
works
> fine with
> text files but I get shorter files than the originals with mp3s, so I
added
> the rest trying to solve the problem.
> So I tryied
>
> $fp=fopen($filename,"r");
> fread($fp,filesize($filename));
> fclose($fp);

Try this, only change your fread line like so:

echo fread($fp,filesize($filename));

I have to do this to put out an image with a image/vnd.wap.wbmp header, and
it works for me.

--
Rick Hodger



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




SV: [PHP] Cookies still store old value(Help!!)

2001-01-19 Thread Håkan Askengren

Hi
I have got a similar problem with session handling. As session handling is
handled
by cookies this should be the same problem.

I handle (as Hendry in a similar way does) user right with session handling.
IE ver 5 is no problem. I can have as many session (browers) running as I
want. All session id
are different.
The Netscape sessions however (I have tested on ver 4.51) seems to share the
same
cookie. The different browser-sessions (yes, on the same computer...) are
handled as _one_ session
by php-session handling.

And hence user B is getting the rights of user A as Hendry descibes it, if
user A has logged on before user B in a different browser. The session is
released however
when all browser-sessions have exited.

Is this a bug in Netscape or php-handling?

best regards
Håkan


"Hendry Sumilo" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
> Dear Expert,
>
> I have to store user detail and password in the cookies so that i can
detect
> if particular user is allowed to enter certain website
> Example is like this:
>
> User "A" is allowed to enter student page
> User "B" is allowed to enter lecturer page
>
> Both have to enter password with login at login page
>
> When User "A" enter ,the cookies will store User "A" name,when he enters
the
> lecturer page,he will be directed to login page again(because he is not
> allowed to enter lecturer page) and so do User "B".
> BUT THE PROBLEM HAPPENS LIKE THIS:
> When User "A" enters ,and then User "B" enters,User "B" CAN ENTER THE
> STUDENT PAGE AND THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH
IT
> ,THE COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE.
> Can i know what the problem is?
>
> Thank you very much,it is really annoying me because someone can enter
other
> page if other has used that before
>
>
> Sincerely Yours
>
> Hendry Sumilo
> [EMAIL PROTECTED]
> http://members.tripodasia.com.my/hsumilo
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] help - templating?

2001-01-19 Thread Jaxon

I think the code below is pretty simple...
Can anyone suggest ANY way to do the bit in my last comment block???

thanks in advance!
Jaxon




-- 
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] fputs() to save mysql db file

2001-01-19 Thread Lawrence Blades

I am trying to make a tab delimited file of a mysql table so I can open
it with Excel.
I select the data - 40 fields, 808 records no prob.
I view a mysql_num_rows() query to make sure it selects all records; no prob.

I create a tab delimited format:
$result = mysql_query("SELECT * FROM $database");
$rows=mysql_num_rows($result);
while ($row = mysql_fetch_array($result) )
{
$field1="$row[field1]";
$field2="$row[field2]";  //etc

$html.="$field1 $field2 $field3."
}

Then I write it to a file:
if (! ($myfile=fopen ("tables", "w")))  {echo "file could not be opened";}
fputs ($myfile, "$html");
fclose ($myfile);

THE PROBLEM IS...

The file that is written is missing about 400 records!
If I limit the fields to a few, I get all 808 records written no problem.
So, I imagine the problem is the file size - the 400 records equate to
about 131K.
Is there a problem using the fputs() function for larger files?

Thanks for helping me.

-- 
Lawrence Blades
Digital Technologies
P.O. Box 673
Clarksdale, MS 38614
Hm: 662-627-9539
Office: 662-624-6586
Cell: 662-902-3092

-- 
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] <> Flash + PHP <>

2001-01-19 Thread Abe Asghar

Hey Guys,

Anybody have any good links for Flash with PHP simple stuff.

Any tutorials or general links that maybe useful.

Thanks,
Abe


-- 
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] Smarty bug fix 1.0a

2001-01-19 Thread Monte Ohrt

A bug was fixed that caused the templates to be recompiled every time.

Monte Ohrt wrote:
> 
> Release 1.0. Please welcome Smarty to the PHP template engine arena :-)
> 
> Inventors:
> Monte Ohrt
> Andrei Zmievski
> 
> http://www.phpinsider.com/php/code/Smarty/

-- 
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-CVS] cvs: php4 / EXTENSIONS /ext/bz2 EXPERIMENTAL /ext/crack CREDITS EXPERIMENTAL /ext/domxml EXPERIMENTAL /ext/dotnet EXPERIMENTAL /ext/ingres_ii EXPERIMENTAL /ext/openssl EXPERIMENTAL /ext/qtdom EXPERIMENTAL /ext/sablot EXPERIMENTAL /ext/satellite EXPERIMENTAL /ext/sockets EXPERIMENTAL /ext/vpopmail EXPERIMENTAL

2001-01-19 Thread Jani Taskinen

sniper  Fri Jan 19 05:43:35 2001 EDT

  Added files: 
/php4/ext/bz2   EXPERIMENTAL 
/php4/ext/crack EXPERIMENTAL CREDITS 
/php4/ext/domxmlEXPERIMENTAL 
/php4/ext/dotnetEXPERIMENTAL 
/php4/ext/ingres_ii EXPERIMENTAL 
/php4/ext/openssl   EXPERIMENTAL 
/php4/ext/qtdom EXPERIMENTAL 
/php4/ext/sablotEXPERIMENTAL 
/php4/ext/satellite EXPERIMENTAL 
/php4/ext/sockets   EXPERIMENTAL 
/php4/ext/vpopmail  EXPERIMENTAL 

  Modified files:  
/php4   EXTENSIONS 
  Log:
  Added some missing EXPERIMENTAL files plus some missing extensions
  into EXTENSIONS file. 
  
  
Index: php4/EXTENSIONS
diff -u php4/EXTENSIONS:1.13 php4/EXTENSIONS:1.14
--- php4/EXTENSIONS:1.13Thu Jan 11 01:35:14 2001
+++ php4/EXTENSIONS Fri Jan 19 05:43:24 2001
@@ -175,6 +175,7 @@
 PRIMARY MAINTAINER:  Sterling Hughes <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained
 STATUS:  Experimental
+SINCE:   4.0.3
 ---
 EXTENSION:   calendar
 MAINTENANCE: Unknown
@@ -189,7 +190,12 @@
 MAINTENANCE: Maintained
 STATUS:  Working
 ---
-EXTENSION:   CURL
+EXTENSION:   crack
+MAINTENANCE: Unknown
+STATUS:  Experimental
+SINCE:   4.0.5
+---
+EXTENSION:   curl
 PRIMARY MAINTAINER:  Sterling Hughes <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained
 STATUS:  Working
@@ -233,6 +239,11 @@
 MAINTENANCE: Unknown
 STATUS:  Working
 ---
+EXTENSION:   gmp
+MAINTENANCE: Unknown
+STATUS:  Unknown
+SINCE:   4.0.4
+---
 EXTENSION:   icap
 MAINTENANCE: Unknown
 STATUS:  Obsolete
@@ -271,6 +282,7 @@
 PRIMARY MAINTAINER:  Stig Venaas <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained
 STATUS:  Experimental
+SINCE:   4.0.4
 ---
 EXTENSION:   pcre
 PRIMARY MAINTAINER:  Andrei Zmievski <[EMAIL PROTECTED]>
@@ -293,12 +305,23 @@
 MAINTENANCE: Maintained
 STATUS:  Working
 ---
+EXTENSION:   printer
+MAINTENANCE: Unknown
+STATUS:  Experimental
+SINCE:   4.0.4
+COMMENT: Only for Win32
+---
 EXTENSION:   pspell
 PRIMARY MAINTAINER:  Vlad Krupin <[EMAIL PROTECTED]>
 MAINTENANCE: Unknown
 STATUS:  Unknown
 SINCE:   4.0.2
 ---
+EXTENSION:   qtdom
+MAINTENANCE: Unknown
+STATUS:  Experimental
+SINCE:   4.0.4
+---
 EXTENSION:   readline
 MAINTENANCE: Unknown
 STATUS:  Unknown
@@ -308,6 +331,12 @@
 MAINTENANCE: Maintained
 STATUS:  Working
 ---
+EXTENSION:   sablot
+PRIMARY MAINTAINER:  Sterling Hughes <[EMAIL PROTECTED]>
+MAINTENANCE: Maintained
+STATUS:  Experimental
+SINCE:   4.0.3
+---
 EXTENSION:   satellite
 PRIMARY MAINTAINER:  David Eriksson <[EMAIL PROTECTED]>
 MAINTENANCE: Odd Fixes
@@ -319,6 +348,12 @@
 MAINTENANCE: Maintained
 STATUS:  Working
 ---
+EXTENSION:   shmop
+PRIMARY MAINTAINER:  Unknown
+MAINTENANCE: Unknown
+STATUS:  Experimental
+SINCE:   4.0.3
+---
 EXTENSION:   snmp
 PRIMARY MAINTAINER:  Rasmus Lerdorf <[EMAIL PROTECTED]>
 MAINTENANCE: Odd Fixes
@@ -333,7 +368,8 @@
 EXTENSION:   swf
 PRIMARY MAINTAINER:  Sterling Hughes <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained
-STATUS:  Unix (won't change)
+STATUS:  Unknown
+COMMENT: Only for Unix (won't change)
 ---
 EXTENSION:   sysvsem
 MAINTENANCE: Unknown
@@ -343,6 +379,11 @@
 MAINTENANCE: Unknown
 STATUS:  Working
 --

[PHP] Date/Time Formatting

2001-01-19 Thread Jamie

I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date
functions of Both Systems, so I'd be greatfull if someone can help.
What I'm trying to do is have an 'administrator' be able to enter info
through a form to a mySQL database. Then on a seperate page have the info
reread and displayed.  The basic outline is a News page which reads and
displays from the table and shows the  News topics preceeding and inculding
the current date (ie if I enter a future Date eg 25/12/2001 and the comment
Merry christmas, in the databaes I don't want it to appear until the date
has occured)

The Table looks as follows:
CREATE TABLE news (
 news_id  INT NOT NULL primary key auto_increment,
 topic   VARCHAR(30) NOT NULL,
 live_date dateNOT NULL,
 news  BLOBNOT NULL,
 user_id   VARCHAR(20) NOT NULL);

I've used the MYSQL date type as I think this would be easier for the users
to be able to manually enter the date in is form on the admin form - also I
don't think a more accurate date/time method will be more usful.

Currently I'm using this SQL Line:
SELECT * FROM news ORDER BY live_date DESC LIMIT 4
(where Live_Date is the date to display the news after)

Also I'd like to if possible to be able to enter and display the date in
Australian / European Time format (DD,MM,)
I'm currently entering it on the form using three text fields and then
rearanging them to the Format in mySQL and indserting it as a string, but I
don't know how to 'break' up a mySQL Date value to rearange it.

Hope these arn't in the FAQ as I have spent some time looking through PHP
script sites and have been unable to find anything that can help.



[PHP] ASP Guy Looking for "Select Case" equivalent

2001-01-19 Thread Karl J. Stubsjoen

Hello,

What is the equivalent command to Select Case as in:

Select case 10 + 2
case 10
'nope
case 11
'nope
case 12
'yep
case > 13
'yep - but case 12 comes first!
end select


-- 
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] ASP Guy Looking for "Select Case" equivalent

2001-01-19 Thread Adam Wright

switch

adamw

- Original Message - 
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 3:51 PM
Subject: [PHP] ASP Guy Looking for "Select Case" equivalent


> Hello,
> 
> What is the equivalent command to Select Case as in:
> 
> Select case 10 + 2
> case 10
> 'nope
> case 11
> 'nope
> case 12
> 'yep
> case > 13
> 'yep - but case 12 comes first!
> end select
> 
> 
> -- 
> 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] Not quite relevant question about coding and query

2001-01-19 Thread Shaun Thomas

On Fri, 19 Jan 2001, Jacky@lilst wrote:

> Can I just write a query to retrive UserID right after I have inserted
> user detail into Usertable? and then assign into a variable and use
> that value to insert into UserID field in another table?
> like this:
>
> $getID = "select userID from user";
> $resultID = mysql_query($getID);

Others have explained to you why this will not work.  Still others
have suggested using:

> $getID = "select MAX(userID) from user";

But that won't work either.  If two or more people run your little
insert/find last script at the same time, this might happen:

User 1: does insert, max userid is now 10.
User 2: does insert, max userid is now 11.
User 1: does select to find last insert, gets 11.
User 2: does select to find last insert, gets 11.

Thus user 1 now has invalid data, and will corrupt your table if he
does further inserts based on this information.

The final suggestion you got:



The above code will *always* return the value you want.  Notice that
I kept track of which mysql connection I made.  This is *very*
important.  If you start using a utility that uses its own connection, or
lose track of your connect/disconnect statements, you never know which
connection you're using.

The others who told you to use mysql_insert_id also had the syntax
wrong.  You can't specify which insert id you want back.  You can only say
that you want one.  The function just returns the id of the last insert
statement that took place for the mysql connection you specify.  In other
words, this can wreak havoc with persistant connections unless you're
using the version of mysql that supports transactions.  If you're not,
you'll get the same hypothetical situation we ran into when using MAX to
find the last insert.  Still, this is the least dangerous of the two, and
will always work if connections are not persistant.

Remember, the documentation is your friend.  Download it, and if you have
*any* question about a function or family of functions, just go there.  I
found this by reading the mysql section of the documentation.

Good luck,

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. ThomasINN Database Programmer  |
| Phone: (309) 743-0812  Fax  : (309) 743-0830|
| Email: [EMAIL PROTECTED]AIM  : trifthen  |
| Web  : hamster.lee.net  |
| |
| "Most of our lives are about proving something, either to   |
| "ourselves or to someone else." |
|   -- Anonymous  |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+



-- 
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] ASP Guy Looking for "Select Case" equivalent

2001-01-19 Thread Rasmus Lerdorf

http://php.net/switch

On Fri, 19 Jan 2001, Karl J. Stubsjoen wrote:

> Hello,
>
> What is the equivalent command to Select Case as in:
>
> Select case 10 + 2
> case 10
> 'nope
> case 11
> 'nope
> case 12
> 'yep
> case > 13
> 'yep - but case 12 comes first!
> end select
>
>
> --
> 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] ENC: Datasets

2001-01-19 Thread Bruno Freire


Hi My name is Bruno, I'm in Brazil and I'm new in PHP...


I wanna know how can I roll in the records of a dataset.
Like...
Move First
Move last
Move next.os something like this
Move previous

Thanks..



Re: [PHP] Re: PHP connecting to FIlemaker Database

2001-01-19 Thread Jerry

In article 
<20010118202212.PEYN8655.femail8.sdc1.sfba.home.com@localhost>, 
[EMAIL PROTECTED] (Michael Stearne) wrote:

> True, but what if the poster has a FMP front-end to be used with the Web 
> version?  mySQL is non-existent on the desktop.  And FMP makes building 
> front-ends for destop apps very easy.  

This is extremely true; FMP's front end is extremely easy to use, to the 
point that almost the most naive users can create reports at their 
leisure, instead of waiting on user support to create reports for them, 
comment on the reports, have the comments acted on, etc.

We are in the process of moving all FMP databases that don't require a 
user-friendly front end to mySQL, but there are some where we just have 
to bite the bullet and keep FMP until there is a comparable SQL front 
end for the Macintosh. We have at least two databases that are served 
via print as well as via the web. In FileMaker it is trivial to make a 
very nice catalog of records (classes, for example), and easy to make a 
calendar of classes. And if our documentation person needs to make a new 
report for displaying a condensed form  of classes, or a 3-fold report,  
they can just do it, without even knowing that what they're doing is 
called a "report" and requires a "front end". :*)

Are there any easy to use SQL front ends for Unix?

Jerry
-- 
http://www.hoboes.com/jerry/
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.hoboes.com/jerry/Murder/)

-- 
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]GD, PHP and Apache troubles

2001-01-19 Thread Kees Hoekzema

hello all,

Rasmus, thanx for the advice you gave me :)
I had to alter two of the Makefiles and the libphp4.module file.
but now, finnally, it worked :D

thank you very much,
Kees Hoekzema
[EMAIL PROTECTED]

-Oorspronkelijk bericht-
Van: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Verzonden: Thursday, January 18, 2001 7:18 PM
Aan: Kees Hoekzema
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP]GD, PHP and Apache troubles


>
gcc  -DLINUX=2 -I/root/source/php-4.0.4 -I/root/source/php-4.0.4/main -I/roo
>
t/source/php-4.0.4/main -I/root/source/php-4.0.4/Zend -I/root/source/php-4.0
>
.4/Zend -I/root/source/php-4.0.4/TSRM -I/root/source/php-4.0.4/TSRM -I/root/
> source/php-4.0.4 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci`
> \
>   -o httpd buildmark.o modules.o modules/standard/libstandard.a
> modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a ap/libap.a
>
lib/expat-lite/libexpat.a  -rdynamic -Lmodules/php4 -L../modules/php4 -L../.
>
./modules/php4 -lmodphp4   -ldl -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -ln
> sl  -lresolv   -lm -lcrypt

Hrm.. Interesting.  -lpng should be listed after -lgd on that link line.
Find your libphp4.module file which PHP copied to your Apache tree and
edit the LIBS line and switch the order of those two.  Let me know if that
fixes it.

-Rasmus


-- 
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] PATH_TRANSLATED doesn't work correctly !!!

2001-01-19 Thread Adam Wright

Its a PHP bug, I've attached a patch (that they persistantly ignore :).

adamw

- Original Message -
From: "Heino H. Gehlsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:42 AM
Subject: [PHP] PATH_TRANSLATED doesn't work correctly !!!


I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via
Apache's Action directive (directing all requests through a script).

But PHP messes PATH_TRANSLATED up and all I end up with a copy of
SCRIPT_FILENAME !

I'm using PHP 4.0.3pl1 on a standard Debian 2.2r2 installation with Apache
httpd 1.3.9 with these directives in httpd.conf:
Options +MultiViews
Action  text/html /script.php

A resuest for "/index" should result in:
PATH_TRANSLATED = /path/to/index.html
PATH_TRANSLATED = /path/to/index.en.html (for the English version)
PATH_TRANSLATED = /path/to/index.X.html (for the X version)

BUT what I get is:
PATH_TRANSLATED = /path/to/script.php (no matter what i request !)

Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy
shown in phpinfo() under "Apache Environment" but not under "PHP Variables")


Yours hopefully
Heino H. Gehlsen


--
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 Digest 19 Jan 2001 16:23:51 -0000 Issue 464

2001-01-19 Thread php-general-digest-help


php-general Digest 19 Jan 2001 16:23:51 - Issue 464

Topics (messages 35560 through 35636):

Re: Variable method
35560 by: Steve Edberg

Re: Ethics question...
35561 by: John Hinsley
35567 by: Michael A. Peters
35577 by: jeremy brand
35578 by: Rasmus Lerdorf
35579 by: jeremy brand
35580 by: Rasmus Lerdorf
35582 by: jeremy brand
35613 by: Max A. Derkachev

Re: below10host.com as webhost?
35562 by: Jeff Lacy
35564 by: Internet Services
35573 by: Egan
35601 by: Boaz Yahav

Good Reads
35563 by: Sean Brown
35593 by: Brian Clark
35600 by: Boaz Yahav

Gear Head -- From Home Pages to Popularity
35565 by: php3.developersdesk.com
35566 by: php3.developersdesk.com

Re: a text formating & cpu question
35568 by: php3.developersdesk.com
35608 by: Christian Reiniger

Not quite relevant question about coding and query
35569 by: Jacky.lilst
35570 by: Jason Murray
35571 by: Jacky.lilst
35572 by: Dave Haggerty
35575 by: php3.developersdesk.com
35581 by: Jacky.lilst
35583 by: Jacky.lilst
35584 by: php3.developersdesk.com
35631 by: Shaun Thomas

PHP site on CD-ROM
35574 by: Philip Apostol
35576 by: Rasmus Lerdorf

temporary unsubscribe mailing list
35585 by: Wen Ni Leong
35597 by: Brian Clark

Downloads, headers and binary data
35586 by: Juan Germano
35587 by: jeremy brand
35622 by: Rick Hodger

Re:  Flash + PHP <>
35626 by: Abe Asghar

Re: Smarty bug fix 1.0a
35627 by: Monte Ohrt

Date/Time Formatting
35628 by: Jamie

ASP Guy Looking for "Select Case" equivalent
35629 by: Karl J. Stubsjoen
35630 by: Adam Wright
35632 by: Rasmus Lerdorf

Re: PHP connecting to FIlemaker Database
35634 by: Jerry

Re: GD, PHP and Apache troubles
35635 by: Kees Hoekzema

Administrivia:

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

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

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


--



At 4:53 PM -0800 1/18/01, Blaine Grady wrote:
>Suppose I have:
>  $method = "doIt";
>inside a class.  How do I construct the statment, using $method, to
>call:
>  $this->doIt();
>I tried every combination I can think of but I keep getting "Call to
>unsupported or undefined function" when doIt() is a proper method.  I
>have no problem with standard functions.
>Thanks for any help.
>


Did you think of

class foo {

function bar() {

$method = 'doIt';

$this->$method('yes');

}

function doIt($Answer) {

echo "Noodles are happy? $Answer";

}

}


It's been awhile, but I believe that should work. If not, give us more info:

What version of PHP?

What, exactly, DID you try?


- steve

-- 
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- FBI Special Agent Dale Cooper ---+





 "Randy Johnson" <[EMAIL PROTECTED]> wrote:

> is there any benchmarks or proof that I should host a high traffic site on a
> FREEBSD/APACHE instead of a redhat Linux/Apache server?

I don't know where thetre is any proof as such, but certainly the
consensus is that FreeBSD is better than the 2.2 Linux kernel at high
loads. (And I know of no Linux devotee who would deny this). But the 2.4
kernel will drastically cut back FreeBSD's lead. Really it all depends
on what you mean by "high traffic" and whether you're ready to go to 2.4
in a production environment. (If you do, please let me know how it holds
up!)

>From the last discussions I had with them, the Linux Journal folk were
considering whether to run with a pre-release version of 2.4, so they
may have made the switch by now. And that's not what I'd call a quiet
site.

Maybe you should drop them a line?
 


-- 
**
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
**




John Hinsley wrote:
> 
>  "Randy Johnson" <[EMAIL PROTECTED]> wrote:
> 
> > is there any benchmarks or proof that I should host a high traffic site on a
> > FREEBSD/APACHE instead of a redhat Linux/Apache server?

Apache doesn't have threading (yet).
If your business depends upon it, you may want to take a look at
Solaris/Zeus if you are really getting heavy load high traffic.

It's not free, though...

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A

[PHP] Integer division

2001-01-19 Thread Todd Cary

What is the syntax for dividing 7 by 2 and getting 3; not 3.5?

Todd

--
Todd Cary
Ariste Software
[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] Integer division

2001-01-19 Thread Boget, Chris

> What is the syntax for dividing 7 by 2 and getting 3; not 3.5?

you can use:

$intVar = ((int)( 7 / 2 ));

Chris



[PHP-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Sascha Schumann

sas Fri Jan 19 07:39:35 2001 EDT

  Modified files:  
/php4/main  rfc1867.c 
  Log:
  Make the code match the comment.
  
  Prior to this change, the upload code tried to add mangled names to
  the global HTTP_POST_FILES array, resulting in all kind of weird behaviour.
  
  After this change, multi-dimensional form elements are treated correctly
  and consistently.
  
  
Index: php4/main/rfc1867.c
diff -u php4/main/rfc1867.c:1.58 php4/main/rfc1867.c:1.59
--- php4/main/rfc1867.c:1.58Mon Jan 15 02:50:39 2001
+++ php4/main/rfc1867.c Fri Jan 19 07:39:35 2001
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf <[EMAIL PROTECTED]> |
+--+
  */
-/* $Id: rfc1867.c,v 1.58 2001/01/15 10:50:39 zeev Exp $ */
+/* $Id: rfc1867.c,v 1.59 2001/01/19 15:39:35 sas Exp $ */
 
 #include 
 #include "php.h"
@@ -195,7 +195,7 @@
 * start_arr is set to point to 1st [
 * end_arr points to last ]
 */
-   is_arr_upload = (start_arr = 
strrchr(namebuf,'[')) && 
+   is_arr_upload = (start_arr = 
+strchr(namebuf,'[')) && 
(end_arr = 
strrchr(namebuf,']')) && 
(end_arr = 
namebuf+strlen(namebuf)-1);
if(is_arr_upload) {



-- 
PHP CVS 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] Form Problems

2001-01-19 Thread Karl J. Stubsjoen

I'm having troubles : (
I can't seem to figure out how to retrieve the posted data.  I'm trying
this:
$HTTP_POST_VARS["Login"]

! WAIT ! as I write this, I'm guesing that maybe my problem is *scope* (and
not the mouthwash).  I'm going to try that right now, set the above var to
global within that function...

Yep, that was it... thanks guys!


-- 
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-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Rasmus Lerdorf

> - is_arr_upload = (start_arr = 
>strrchr(namebuf,'[')) &&
> + is_arr_upload = (start_arr = 
>strchr(namebuf,'[')) &&

Yes, this makes more sense.

-Rasmus


-- 
PHP CVS 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] i should have been clearer

2001-01-19 Thread Slappy Smith

>Something along the lines of this?:
>
>"X-Powered-By: PHP/4.0.2-dev Content-type: text/html"
>
>If so, stick this at the top of your script(s):
>
>#!/path/to/php -q
>
>(obviously change the /path/to/php)

This is my error:

Warning: Sybase: Server message: Changed database context to 'foobar'.
(severity 10, procedure N/A) in
/home/httpd/html/foobar/foo.php3 on line 11

---
Q: Backstreet Boys or N'Sync? 
  A: Both of them. In a house, on fire, surrounded by 
trick fire extinguishers filled with gasoline.
---

-- 
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-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Sascha Schumann

On Fri, 19 Jan 2001, Rasmus Lerdorf wrote:

> > -   is_arr_upload = (start_arr = 
>strrchr(namebuf,'[')) &&
> > +   is_arr_upload = (start_arr = 
>strchr(namebuf,'[')) &&
>
> Yes, this makes more sense.

Does anyone mind, if I bump the never used PHP_API_VERSION
number?  I need some way to tell from the outside whether the
above change exists in the installation.

- Sascha


-- 
PHP CVS 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-CVS] cvs: php4 / NEWS

2001-01-19 Thread Derick Rethans

derick  Fri Jan 19 08:03:23 2001 EDT

  Modified files:  
/php4   NEWS 
  Log:
  - Added a notice about the wordwrap function fix
  #- suggested by Jani for people depending on the buggy behaviour
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.563 php4/NEWS:1.564
--- php4/NEWS:1.563 Thu Jan 18 18:09:21 2001
+++ php4/NEWS   Fri Jan 19 08:03:22 2001
@@ -3,6 +3,7 @@
 
 ?? ??? 200?, Version 4.0.5
 - Added the pg_lolseek and pg_lotell functions (Derick)
+- Fixed wrong breaking with the wordwrap function (Derick)
 - Fixed 'O' and 'r' flags of date() to have correct sign for timezone
   offset. (Andrei)
 - Changed 'Z' flag to date() to always return timezone offset with



-- 
PHP CVS 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] is it possible to communicate javascript and php?

2001-01-19 Thread Evelio Martinez

I would like to know if it possible to pass in any way some values

from javascript functions to php variables ?

Any FAQ?

Thanks

--
Evelio Martínez
Testanet. Dept. desarrollo software.
Av. Reino de Valencia, 15 - 5
46005 Valencia (Spain)
Tel: +34 96 395 90 00
Fax: +34 96 316 23 19





[PHP] Test - please ignore

2001-01-19 Thread Jason Bouwmeester

Test



[PHP] Function / String Problem

2001-01-19 Thread Karl J. Stubsjoen

Okay, what is wrong with this:

   echo "...are you logged in: $LoggedIn()";
// outputs:...are you logged in: ()

Function is:
function LoggedIn(){
  global $HTTP_POST_VARS
if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
{return "YES";}
else
{return "NO";}
}




-- 
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] Function / String Problem

2001-01-19 Thread Boget, Chris

>echo "...are you logged in: $LoggedIn()";> //
outputs:...are you logged in: ()
> 
> Function is:
> function LoggedIn(){
>   global $HTTP_POST_VARS
> if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
> {return "YES";}
> else
> {return "NO";}
> }

Change your echo statement to:

echo "...are you logged in: " . LoggedIn() . "";

"$LoggedIn()" looks to PHP like a variable.  Any variable that is
within a double quoted string gets interpolated.  Plus, you almost
never want to put a '$' in front of a function name because then
it looks like a variable function name to PHP.  IOW, taking the
above function definition, you could do:

$functionName = "LoggedIn";

echo $functionName();

and PHP will run the function 'LoggedIn()'.

HTH

Chris




[PHP-CVS] cvs: php4 /main php.h

2001-01-19 Thread Sascha Schumann

sas Fri Jan 19 08:04:27 2001 EDT

  Modified files:  
/php4/main  php.h 
  Log:
  Bump PHP_API_VERSION
  
  
Index: php4/main/php.h
diff -u php4/main/php.h:1.129 php4/main/php.h:1.130
--- php4/main/php.h:1.129   Thu Dec  7 04:09:38 2000
+++ php4/main/php.h Fri Jan 19 08:04:27 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.129 2000/12/07 12:09:38 sas Exp $ */
+/* $Id: php.h,v 1.130 2001/01/19 16:04:27 sas Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -26,7 +26,7 @@
 #include 
 #endif
 
-#define PHP_API_VERSION 19990421
+#define PHP_API_VERSION 20010119
 
 #define YYDEBUG 0
 



-- 
PHP CVS 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-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Andi Gutmans

Are you talking about accessing it from a C extension or from a PHP script? 
Because I don't think it's accessible from a PHP script.

Andi


At 04:50 PM 1/19/2001 +0100, Sascha Schumann wrote:
>On Fri, 19 Jan 2001, Rasmus Lerdorf wrote:
>
> > > -   is_arr_upload = (start_arr = 
> strrchr(namebuf,'[')) &&
> > > +   is_arr_upload = (start_arr = 
> strchr(namebuf,'[')) &&
> >
> > Yes, this makes more sense.
>
> Does anyone mind, if I bump the never used PHP_API_VERSION
> number?  I need some way to tell from the outside whether the
> above change exists in the installation.
>
> - Sascha
>
>
>--
>PHP CVS 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 CVS 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] Function / String Problem

2001-01-19 Thread Shawn Blaylock

Try this:

echo "...are you logged in: " . LoggedIn() . "";

The reason it wasn't working is because it thought LoggedIn was a
variable and () was part of the echo statement.

"Karl J. Stubsjoen" wrote:
> 
> Okay, what is wrong with this:
> 
>echo "...are you logged in: $LoggedIn()";
> // outputs:...are you logged in: ()
> 
> Function is:
> function LoggedIn(){
>   global $HTTP_POST_VARS
> if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
> {return "YES";}
> else
> {return "NO";}
> }
> 
> --
> 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]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
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] Mail Syntax changing problem

2001-01-19 Thread Todd H MacPherson

I use the following syntax on one site to get the names in the email message
and it works fine:

mail("$we_to<$we_demail>", "$we_subject", StripSlashes($message), "From:
$we_from<$we_semail>");

and it works

BUT On another site I must change it as such to get it to work:

mail("$we_to", "$we_subject", StripSlashes($message), "From: $we_email");

I have even tried \<  \> but it still won't work.

The only difference between the two is the first is Unix and the second is
WindowsNT.

Help please...I have frigged with this all day.

Thanks

Todd


-- 
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] ENC: Datasets

2001-01-19 Thread Ignacio Vazquez-Abrams

On Fri, 19 Jan 2001, Bruno Freire wrote:

>
> Hi My name is Bruno, I'm in Brazil and I'm new in PHP...
>
>
> I wanna know how can I roll in the records of a dataset.
> Like...
> Move First
> Move last
> Move next.os something like this
> Move previous
>
> Thanks..
>

Move Next is simple; just use xxx_fetch_[array, row, etc.]().

For the other three, some DB interfaces have xxx_data_seek(), but others will
have to be manipulated within an array. However, that's not such a big deal
because you probably shouldn't be moving around arbitrarily like that, should
you? ;)

-- 
Ignacio Vazquez-Abrams  <[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] Running java under php4 (PHP4 ext/java)

2001-01-19 Thread Alex Akilov

Fraser MacKenzie wrote:

> Alex, Ok...so far, I have progress.  I have PHP recognizing Java... or at
> least, phpinfo() does.
>
> Now, when I try to do a new Java("class");
>
> I get the following error:
>
> Fatal error: Unable to load Java Library
> 
>/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so,
> error:
> 
>/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so:
> cannot
> open shared object file: No such file or directory in
> /home/rondaks_portal/httpd/docs/k2test/index.php3 on line 34
>
It's really confused since you gave it way too much information.  I'm gonna help you 
clean this up a bit and hopefully explain things a bit so that they make sense.  See 
below.

> Here is the appropriate info from my php.ini file:
>
> [Java]
> 
>java.class.path=/home/local/src/php-4.0.4/ext/java/php_java.jar:/home/local/java/jdk1.2.2/jre/lib:/home/local/java/jdk1.2.2/jre/bin
>
Remove the last two directories as they serve no purpose.  This entry is essentially 
an extension to the system CLASSPATH and should only contain directories and jars that 
contain java classes
or java resource files.

> java.home=/home/local/java/jdk1.2.2/bin:/home/local/java/jdk1.2.2/jre/bin
>
There should be only one java.home.  It should point at the base directory of the jdk 
(similar to what you specified on the --with-java=... expression).  In this case, use
java.home=/home/local/java/jdk1.2.2

> 
>java.library.path=/home/local/src/php-4.0.4/ext/java:/home/local/java/jdk1.2.2/jre/lib/i386
>
This entry is essentially equivalent to LD_LIBRARY_PATH.  Not sure if 
/home/local/src/php-4.0.4/ext/java contains any shared libraries (.so extension).  If 
not, it doesn't belong here.  However,
you should have /usr/local/lib/php/extensions/no-debug-non-zts-20001214 (location of 
libphp_java.so) listed here.  Also, you might also need to list the other directories 
in the JDK that may
contain shared libraries that you need (e.g. 
/home/local/java/jdk1.2.2/jre/lib/i386:/home/local/java/jdk1.2.2/jre/lib/i386/classic:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads).
  A good
way to find out what these are is to go into the 
/home/local/java/jdk1.2.2/jre/lib/i386 directory and run ldd libjava.so and then add 
the directories that contain the shared libraries that
libjava.so depends on to the java.library.path (or LD_LIBRARY_PATH).

> 
>java.library=/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so
>
Again, you should only have one entry here and it should simply be the name of the jvm 
shared library (i.e. java.library=libjava.so).  This library will be searched for in 
your LD_LIBRARY_PATH
or java.library.path which you specified above.  Note that on some systems/jdk's you 
might need to specify java.library=libjvm.so.  Specifically, I found I had to do that 
on Solaris or I would
start getting "Cannot locate CreateJavaVM function" errors.

> extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20001214
> extension=libphp_java.so
>
This part looks good.

> Any help you can offer is greatly appreciated.
>
You're welcome.  Hope this helps.

> Fraser
>
Alex




[PHP-CVS] cvs: php4 / EXTENSIONS

2001-01-19 Thread Sam Liddicott

samjam  Fri Jan 19 08:12:36 2001 EDT

  Modified files:  
/php4   EXTENSIONS 
  Log:
  Added muscat to EXTENSIONS as it should be there all along
  PR:
  Submitted by:
  Reviewed by:
  Obtained from:
  
  
Index: php4/EXTENSIONS
diff -u php4/EXTENSIONS:1.14 php4/EXTENSIONS:1.15
--- php4/EXTENSIONS:1.14Fri Jan 19 05:43:24 2001
+++ php4/EXTENSIONS Fri Jan 19 08:12:36 2001
@@ -278,6 +278,13 @@
 MAINTENANCE: Maintained
 STATUS:  Working
 ---
+EXTENSION:   muscat
+PRIMARY MAINTAINER:  Sam Liddicott <[EMAIL PROTECTED]>
+MAINTENANCE: Maintained
+STATUS:  Working
+SINCE:   4.0.5
+COMMENT: Not tested against windows, only core API completed, rest under 
+development
+---
 EXTENSION:   openssl
 PRIMARY MAINTAINER:  Stig Venaas <[EMAIL PROTECTED]>
 MAINTENANCE: Maintained



-- 
PHP CVS 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-CVS] cvs: php4 /main rfc1867.c

2001-01-19 Thread Sascha Schumann

On Fri, 19 Jan 2001, Andi Gutmans wrote:

> Are you talking about accessing it from a C extension or from a PHP script?
> Because I don't think it's accessible from a PHP script.

C++ extension.

- Sascha


-- 
PHP CVS 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-CVS] cvs: php4 / EXTENSIONS

2001-01-19 Thread Jani Taskinen

On Fri, 19 Jan 2001, Sam Liddicott wrote:

> ---
>+EXTENSION:   muscat
>+PRIMARY MAINTAINER:  Sam Liddicott <[EMAIL PROTECTED]>
>+MAINTENANCE: Maintained
>+STATUS:  Working
>+SINCE:   4.0.5
>+COMMENT: Not tested against windows, only core API completed, rest under 
>development
>+---

As this is quite new extension, shouldn't it be Experimental?

--Jani



-- 
PHP CVS 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] "but what if.." Function / String Problem

2001-01-19 Thread Karl J. Stubsjoen

What if I want the function to be processed within the " " quotes?  Same as
a variable might be interopelated?  IOW, can I call a function without
concantenating the function together with the string?

*being a little stubborn*


- Original Message -
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:17 AM
Subject: [PHP] Function / String Problem


> Okay, what is wrong with this:
>
>echo "...are you logged in: $LoggedIn()";
> // outputs:...are you logged in: ()
>
> Function is:
> function LoggedIn(){
>   global $HTTP_POST_VARS
> if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
> {return "YES";}
> else
> {return "NO";}
> }
>
>
>
>
> --
> 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] ENC: Datasets

2001-01-19 Thread mlemos

Hello Bruno,

Bruno Freire wrote:
> 
> Hi My name is Bruno, I'm in Brazil and I'm new in PHP...
> 
> I wanna know how can I roll in the records of a dataset.
> Like...
> Move First
> Move last
> Move next.os something like this
> Move previous

You may want to try this PHP Class that does exactly what you need and
may be more.

http://phpclasses.UpperDesign.com/browse.html/package/130

Manuel Lemos

-- 
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] "but what if.." Function / String Problem

2001-01-19 Thread Boget, Chris

> What if I want the function to be processed within the " " 
> quotes?  Same as a variable might be interopelated?  IOW, 
> can I call a function without concantenating the function 
> together with the string?
> *being a little stubborn*

No.  Why would you want to?
You *might* be able to do it if you use single quotes instead,
but I am unsure and personally doubt that it would work.

Chris



[PHP-CVS] cvs: php4 /ext/standard image.c

2001-01-19 Thread Jani Taskinen

sniper  Fri Jan 19 08:52:41 2001 EDT

  Modified files:  
/php4/ext/standard  image.c 
  Log:
  @- Added URL support for getimagesize() function (Jani)
  # tested with all imagetypes. Also the iptc works.
  
  

Index: php4/ext/standard/image.c
diff -u php4/ext/standard/image.c:1.24 php4/ext/standard/image.c:1.25
--- php4/ext/standard/image.c:1.24  Fri Aug 11 16:24:54 2000
+++ php4/ext/standard/image.c   Fri Jan 19 08:52:40 2001
@@ -15,7 +15,7 @@
| Authors: Rasmus Lerdorf  |
+--+
  */
-/* $Id: image.c,v 1.24 2000/08/11 23:24:54 derick Exp $ */
+/* $Id: image.c,v 1.25 2001/01/19 16:52:40 sniper Exp $ */
 /* 
  * Based on Daniel Schmitt's imageinfo.c which carried the following
  * Copyright notice.
@@ -42,22 +42,18 @@
 #include 
 #endif
 #include "fopen-wrappers.h"
+#include "ext/standard/fsock.h"
 #if HAVE_UNISTD_H
 #include 
 #endif
 #include "php_image.h"
 
 /* file type markers */
-const char php_sig_gif[3] =
-{'G', 'I', 'F'};
-const char php_sig_jpg[3] =
-{(char) 0xff, (char) 0xd8, (char) 0xff};
-const char php_sig_png[8] =
-{(char) 0x89, (char) 0x50, (char) 0x4e,
- (char) 0x47, (char) 0x0d, (char) 0x0a,
- (char) 0x1a, (char) 0x0a};
-const char php_sig_swf[3] =
-{'F', 'W', 'S'};
+const char php_sig_gif[3] = {'G', 'I', 'F'};
+const char php_sig_swf[3] = {'F', 'W', 'S'};
+const char php_sig_jpg[3] = {(char) 0xff, (char) 0xd8, (char) 0xff};
+const char php_sig_png[8] = {(char) 0x89, (char) 0x50, (char) 0x4e, (char) 0x47, 
+(char) 0x0d, (char) 0x0a, 
+(char) 0x1a, (char) 0x0a};
 
 /* return info as a struct, to make expansion easier */
 
@@ -69,31 +65,26 @@
 };
 
 /* routine to handle GIF files. If only everything were that easy... ;} */
-static struct gfxinfo *php_handle_gif (FILE *fp)
+static struct gfxinfo *php_handle_gif (int socketd, FILE *fp, int issock)
 {
struct gfxinfo *result = NULL;
unsigned char a[2];
+   char temp[3];
 
result = (struct gfxinfo *) ecalloc(1,sizeof(struct gfxinfo));
-   fseek(fp, 6L, SEEK_SET);
-   fread(a,sizeof(a),1,fp);
-   result->width = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
-   fread(a,sizeof(a),1,fp);
-   result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
-   return result;
-}
 
-static unsigned long php_read4(FILE *fp)
-{
-   unsigned char a[ 4 ];
+   FP_FREAD(temp, 3, socketd, fp, issock);  /* fseek(fp, 6L, SEEK_SET); */
 
-   /* just return 0 if we hit the end-of-file */
-   if (fread(a,sizeof(a),1,fp) != 1) return 0;
+   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a,sizeof(a),1,fp); */
+   result->width = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
 
-   return (((unsigned long) a[ 0 ]) << 24) + (((unsigned long) a[ 1 ]) << 16) + 
(((unsigned long) a[ 2 ]) << 8) + ((unsigned long) a[ 3 ]);
+   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a,sizeof(a),1,fp); */
+   result->height = (unsigned short)a[0] | (((unsigned short)a[1])<<8);
 
+   return result;
 }
 
+/* routines to handle SWF files. */
 static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int pos, 
unsigned int count)
 {
unsigned int loop;
@@ -107,15 +98,17 @@
return result;
 }
 
-static struct gfxinfo *php_handle_swf (FILE* fp)
+static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock)
 {
struct gfxinfo *result = NULL;
long bits;
unsigned char a[32];
-   
+   char temp[5];
+
result = (struct gfxinfo *) ecalloc (1, sizeof (struct gfxinfo));
-   fseek(fp, 8, SEEK_SET);
-   fread(a,sizeof(a),1,fp);
+   FP_FREAD(temp, 5, socketd, fp, issock); /*  fseek(fp, 8L, SEEK_SET); */
+
+   FP_FREAD(a, sizeof(a), socketd, fp, issock); /* fread(a,sizeof(a),1,fp); */
bits = php_swf_get_bits (a, 0, 5);
result->width = (php_swf_get_bits (a, 5 + bits, bits) -
php_swf_get_bits (a, 5, bits)) / 20;
@@ -124,17 +117,27 @@
return result;
 }
 
-/* routine to handle PNG files. - even easier */
-static struct gfxinfo *php_handle_png(FILE *fp)
+/* routine to handle PNG files */
+static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock)
 {
struct gfxinfo *result = NULL;
unsigned long in_width, in_height;
+   char temp[8];
+   unsigned char a[8];
 
result = (struct gfxinfo *) ecalloc(1,sizeof(struct gfxinfo));
-   fseek(fp, 16L, SEEK_SET);
-   in_width = php_read4(fp);
-   in_height = php_read4(fp);
-   result->width = (unsigned int) in_width;
+
+   FP_FREAD(temp, sizeof(temp), socketd, fp, issock);  /* fseek(fp, 16L, 
+SEEK_SET); */
+
+   if((FP_FREAD(a, sizeof(a), socketd, fp, issock)) <= 0) { 
+   in_width  = 0;
+   in_height = 0;
+   

Re: [PHP] "but what if.." Function / String Problem

2001-01-19 Thread Shawn Blaylock

It won't work even with single quotes. It'll just echo out LoggedIn() as
part of the string.

"Boget, Chris" wrote:
> 
> > What if I want the function to be processed within the " "
> > quotes?  Same as a variable might be interopelated?  IOW,
> > can I call a function without concantenating the function
> > together with the string?
> > *being a little stubborn*
> 
> No.  Why would you want to?
> You *might* be able to do it if you use single quotes instead,
> but I am unsure and personally doubt that it would work.
> 
> Chris

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
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] "but what if.." Function / String Problem

2001-01-19 Thread Boget, Chris

> It won't work even with single quotes. It'll just echo out 
> LoggedIn() as part of the string.

Yeah, I didn't think so.  But I knew that '' behaves differently
than "".  I just wasn't sure of the exact details of the differences.

Chris



[PHP] RE: unserialize() unexpectedly returns a boolean

2001-01-19 Thread TR Henigson

My original e-mail, unanswered, is referenced below. I am in serious
need of HELP.

To prevent the $SESSION variable from getting set to a boolean, I
wrote the following loop with the idea that if the error happened
in unserializing the data in the database, I would simply query the
database again, and unserialize the data anew:

while(gettype($SESSION)<>"array")
{
$sessionError++;
$select=new dbLOCAL;
$query="SELECT data FROM sessions WHERE id='".$sessid."'";
$select->query($query);
$select->next_record();
$SESSION=unserialize($select->Record["data"]);
echo $select->Record["data"];
echo "";
echo gettype($SESSION);
echo "";
}

$select is obviously an object. The next_record() method uses the
mysql_fetch_array() function to get put the data into the Record
property. I added the echo statements to see what was happening if
and when the loop executed. Well, it eventually did and I had to
physically terminate the script in my browser as the conditional
for the loop never evaluated TRUE. Echoed out to my browser was
the following:

a:2:{s:4:\"USER\";a:15:{s:8:\"loggedIn\";i:1;s:7:\"user_id\";s:1:\"1\";s:5:\
"admin\";s:3:\"Yes\";s:10:\"contact_id\";s:1:\"1\";s:5:\"first\";s:2:\"AA\";
s:4:\"last\";s:8:\"Aaaa\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:1
8:\"8158 AA Avenue\";s:4:\"city\";s:11:\"Los
Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}s:7:\"
CONTACT\";a:1:{i:1;a:11:{s:5:\"first\";s:2:\"AA\";s:4:\"last\";s:8:\"Aaa
a\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:18:\"8158 AA
Avenue\";s:4:\"city\";s:11:\"Los
Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}}}
boolean
a:2:{s:4:\"USER\";a:15:{s:8:\"loggedIn\";i:1;s:7:\"user_id\";s:1:\"1\";s:5:\
"admin\";s:3:\"Yes\";s:10:\"contact_id\";s:1:\"1\";s:5:\"first\";s:2:\"AA\";
s:4:\"last\";s:8:\"Aaaa\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:1
8:\"8158 AA Avenue\";s:4:\"city\";s:11:\"Los
Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}s:7:\"
CONTACT\";a:1:{i:1;a:11:{s:5:\"first\";s:2:\"AA\";s:4:\"last\";s:8:\"Aaa
a\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:18:\"8158 AA
Avenue\";s:4:\"city\";s:11:\"Los
Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}}}
boolean

AND SO ON...

Can anyone please tell me why this is happening and what I can
do to correct it??? Thank you,

Ted


> -Original Message-
> From: TR Henigson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 19, 2001 9:13 AM
> To: T. R. Henigson
> Subject: FW: unserialize() unexpectedly returns a boolean
>
>
> I built an e-commerce application using PHP4 session management.
> I store all data in an array, $SESSION, which I register with the
> session. Most of the time, $SESSION is restored as expected on
> the loading of a new page. Every now and then, however, $SESSION
> is restored as a boolean variable with value 0. All of the
> contents of the original array are, of course, lost. Have I
> encountered a known problem? I attempted to circumvent the issue
> by writing my own session management logic the implementation of
> which follows:
>
> I store a serialized representation of the array $SESSION with
> serialize() in a MySQL database indexed by the session id. On a
> page load, I query the database and unserialize the data with
> unserialize() and thus, $SESSION is restored. At the end of the
> page, I serialize $SESSION again and write it to the database.
> I ultimately experienced the same problem with my code where
> $SESSION was indiscriminately set to a boolean of value 0. This
> error is not reproducible in any predictable way. In my custom
> session management, I was however able to implement debugging
> logic that provides the following information:
>
> PHP is faithfully retrieving the serialized session data from the
> MySQL database. The unserialize() function seems to be the
> problem. Every so often, it results in the boolean variable
> despite the fact that the serialized data it operates on
> represents an array. For example, I determined from my debugging
> log (physical data has been altered for privacy):
>
> 1. raw data extracted from database and stored into $rawData:
> a:2:{s:4:"USER";a:15:{s:8:"loggedIn";i:1;s:7:"user_id";s:1:"1";
> s:5 :"admin";s :3:"Yes";s:10:"contact_id";s:1:"1";s:5:"first";s:
> 4:"John";s:4:"las t";s:3:"Do e";s:7:"comp

Re: [PHP] "but what if.." Function / String Problem

2001-01-19 Thread Shawn Blaylock

Yep. I think the only difference is the way it handles variable
interpolation, but I'm not entirely sure on that one.

"Boget, Chris" wrote:
> 
> > It won't work even with single quotes. It'll just echo out
> > LoggedIn() as part of the string.
> 
> Yeah, I didn't think so.  But I knew that '' behaves differently
> than "".  I just wasn't sure of the exact details of the differences.
> 
> Chris

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
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] i should have been clearer

2001-01-19 Thread mwaples

Slappy Smith wrote:
> 
> >Something along the lines of this?:
> >
> >"X-Powered-By: PHP/4.0.2-dev Content-type: text/html"
> >
> >If so, stick this at the top of your script(s):
> >
> >#!/path/to/php -q
> >
> >(obviously change the /path/to/php)
> 
> This is my error:
> 
> Warning: Sybase: Server message: Changed database context to 'foobar'.
> (severity 10, procedure N/A) in
> /home/httpd/html/foobar/foo.php3 on line 11
> 

If i recall correctly from searching the archives - that warning will
always show - just put an @sybase_connect() to supress 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] Date/Time Formatting

2001-01-19 Thread Ignacio Vazquez-Abrams

On Fri, 19 Jan 2001, Jamie wrote:

> I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date
> functions of Both Systems, so I'd be greatfull if someone can help.
> What I'm trying to do is have an 'administrator' be able to enter info
> through a form to a mySQL database. Then on a seperate page have the info
> reread and displayed.  The basic outline is a News page which reads and
> displays from the table and shows the  News topics preceeding and inculding
> the current date (ie if I enter a future Date eg 25/12/2001 and the comment
> Merry christmas, in the databaes I don't want it to appear until the date
> has occured)
>
> The Table looks as follows:
> CREATE TABLE news (
>  news_id  INT NOT NULL primary key auto_increment,
>  topic   VARCHAR(30) NOT NULL,
>  live_date dateNOT NULL,
>  news  BLOBNOT NULL,
>  user_id   VARCHAR(20) NOT NULL);
>
> I've used the MYSQL date type as I think this would be easier for the users
> to be able to manually enter the date in is form on the admin form - also I
> don't think a more accurate date/time method will be more usful.
>
> Currently I'm using this SQL Line:
> SELECT * FROM news ORDER BY live_date DESC LIMIT 4
> (where Live_Date is the date to display the news after)
>
> Also I'd like to if possible to be able to enter and display the date in
> Australian / European Time format (DD,MM,)
> I'm currently entering it on the form using three text fields and then
> rearanging them to the Format in mySQL and indserting it as a string, but I
> don't know how to 'break' up a mySQL Date value to rearange it.
>
> Hope these arn't in the FAQ as I have spent some time looking through PHP
> script sites and have been unable to find anything that can help.
>

The reason you haven't found anything on PHP sites is that they're not PHP
questions, they're MySQL questions :)

For the future date, add "live_date<=NOW()" to your WHERE clause in your
select queries.

As for the date format, MySQL only supports ANSI format (-MM-DD) for
input, but you can use the DATE_FORMAT() function to change the output. You'll
have to use substr() in PHP to chop up the input string and rearrange it for
MySQL.

-- 
Ignacio Vazquez-Abrams  <[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] "but what if.." Function / String Problem

2001-01-19 Thread Ignacio Vazquez-Abrams

On Fri, 19 Jan 2001, Shawn Blaylock wrote:

> Yep. I think the only difference is the way it handles variable
> interpolation, but I'm not entirely sure on that one.
>
> "Boget, Chris" wrote:
> >
> > > It won't work even with single quotes. It'll just echo out
> > > LoggedIn() as part of the string.
> >
> > Yeah, I didn't think so.  But I knew that '' behaves differently
> > than "".  I just wasn't sure of the exact details of the differences.
> >
> > Chris
>

Single quotes also don't do escaping (i.e., "\n", "\r", etc.).

-- 
Ignacio Vazquez-Abrams  <[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] Running java under php4 (PHP4 ext/java)

2001-01-19 Thread Fraser MacKenzie

Ok.  I have done what you said, but I am now getting:

Fatal error:  Unable to load Java Library
/home/local/java/jdk1.2.2/jre/lib/i386/libjava.so,
error: libhpi.so: cannot open shared object file: No such file or
directory in /home/rondaks_portal/httpd/docs/k2test/index.php3 on
line 34 Fraser MacKenzie wrote:
> 
> > Alex, Ok...so far, I have progress.  I have PHP recognizing Java... or at
> > least, phpinfo() does.
> >
> > Now, when I try to do a new Java("class");
> >
> > I get the following error:
> >
> > Fatal error: Unable to load Java Library
> > 
>/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so,
> > error:
> > 
>/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so:
> > cannot
> > open shared object file: No such file or directory in
> > /home/rondaks_portal/httpd/docs/k2test/index.php3 on line 34
> >
> It's really confused since you gave it way too much information.  I'm gonna help you 
>clean this up a bit and hopefully explain things a bit so that they make sense.  See 
>below.
> 
> > Here is the appropriate info from my php.ini file:
> >
> > [Java]
> > 
>java.class.path=/home/local/src/php-4.0.4/ext/java/php_java.jar:/home/local/java/jdk1.2.2/jre/lib:/home/local/java/jdk1.2.2/jre/bin
> >
> Remove the last two directories as they serve no purpose.  This entry is essentially 
>an extension to the system CLASSPATH and should only contain directories and jars 
>that contain java classes
> or java resource files.
> 
> > java.home=/home/local/java/jdk1.2.2/bin:/home/local/java/jdk1.2.2/jre/bin
> >
> There should be only one java.home.  It should point at the base directory of the 
>jdk (similar to what you specified on the --with-java=... expression).  In this case, 
>use
> java.home=/home/local/java/jdk1.2.2
> 
> > 
>java.library.path=/home/local/src/php-4.0.4/ext/java:/home/local/java/jdk1.2.2/jre/lib/i386
> >
> This entry is essentially equivalent to LD_LIBRARY_PATH.  Not sure if 
>/home/local/src/php-4.0.4/ext/java contains any shared libraries (.so extension).  If 
>not, it doesn't belong here.  However,
> you should have /usr/local/lib/php/extensions/no-debug-non-zts-20001214 (location of 
>libphp_java.so) listed here.  Also, you might also need to list the other directories 
>in the JDK that may
> contain shared libraries that you need (e.g. 
>/home/local/java/jdk1.2.2/jre/lib/i386:/home/local/java/jdk1.2.2/jre/lib/i386/classic:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads).
>  A good
> way to find out what these are is to go into the 
>/home/local/java/jdk1.2.2/jre/lib/i386 directory and run ldd libjava.so and then add 
>the directories that contain the shared libraries that
> libjava.so depends on to the java.library.path (or LD_LIBRARY_PATH).
> 
> > 
>java.library=/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjvm.so:/home/local/java/jdk1.2.2/jre/lib/i386/native_threads/libhpi.so:/home/local/java/jdk1.2.2/jre/lib/i386/classic/libjava.so
> >
> Again, you should only have one entry here and it should simply be the name of the 
>jvm shared library (i.e. java.library=libjava.so).  This library will be searched for 
>in your LD_LIBRARY_PATH
> or java.library.path which you specified above.  Note that on some systems/jdk's you 
>might need to specify java.library=libjvm.so.  Specifically, I found I had to do that 
>on Solaris or I would
> start getting "Cannot locate CreateJavaVM function" errors.
> 
> > extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20001214
> > extension=libphp_java.so
> >
> This part looks good.
> 
> > Any help you can offer is greatly appreciated.
> >
> You're welcome.  Hope this helps.
> 
> > Fraser
> >
> Alex
> 
> 


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

2001-01-19 Thread Marcelo Gulin

Hi Bruno!

   what database are you using?
   for mysql, you can use mysql_data_seek function.

regards
Marcelo Gulin

Bruno Freire escribió:
> 
> Hi My name is Bruno, I'm in Brazil and I'm new in PHP...
> 
> I wanna know how can I roll in the records in a dataset.
> Like...
> Move First
> Move last
> Move next.os something like this
> 
> Thanks..

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

2001-01-19 Thread Lou Spironello

Has anyone used the makerpm script in supplied with the tarbar php distribution
from snap.php.net?
If anyone has, do you know where the documentation is?

Thank you.
Lou Spironello


-- 
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: unserialize() unexpectedly returns a boolean

2001-01-19 Thread Ignacio Vazquez-Abrams

On Fri, 19 Jan 2001, TR Henigson wrote:

> My original e-mail, unanswered, is referenced below. I am in serious
> need of HELP.
>
> To prevent the $SESSION variable from getting set to a boolean, I
> wrote the following loop with the idea that if the error happened
> in unserializing the data in the database, I would simply query the
> database again, and unserialize the data anew:
>
> while(gettype($SESSION)<>"array")
> {
>   $sessionError++;
>   $select=new dbLOCAL;
>   $query="SELECT data FROM sessions WHERE id='".$sessid."'";
>   $select->query($query);
>   $select->next_record();
>   $SESSION=unserialize($select->Record["data"]);
>   echo $select->Record["data"];
>   echo "";
>   echo gettype($SESSION);
>   echo "";
> }
>
> $select is obviously an object. The next_record() method uses the
> mysql_fetch_array() function to get put the data into the Record
> property. I added the echo statements to see what was happening if
> and when the loop executed. Well, it eventually did and I had to
> physically terminate the script in my browser as the conditional
> for the loop never evaluated TRUE. Echoed out to my browser was
> the following:
>
> a:2:{s:4:\"USER\";a:15:{s:8:\"loggedIn\";i:1;s:7:\"user_id\";s:1:\"1\";s:5:\
> "admin\";s:3:\"Yes\";s:10:\"contact_id\";s:1:\"1\";s:5:\"first\";s:2:\"AA\";
> s:4:\"last\";s:8:\"Aaaa\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:1
> 8:\"8158 AA Avenue\";s:4:\"city\";s:11:\"Los
> Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
> y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
> 000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}s:7:\"
> CONTACT\";a:1:{i:1;a:11:{s:5:\"first\";s:2:\"AA\";s:4:\"last\";s:8:\"Aaa
> a\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:18:\"8158 AA
> Avenue\";s:4:\"city\";s:11:\"Los
> Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
> y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
> 000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}}}
> boolean
> a:2:{s:4:\"USER\";a:15:{s:8:\"loggedIn\";i:1;s:7:\"user_id\";s:1:\"1\";s:5:\
> "admin\";s:3:\"Yes\";s:10:\"contact_id\";s:1:\"1\";s:5:\"first\";s:2:\"AA\";
> s:4:\"last\";s:8:\"Aaaa\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:1
> 8:\"8158 AA Avenue\";s:4:\"city\";s:11:\"Los
> Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
> y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
> 000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}s:7:\"
> CONTACT\";a:1:{i:1;a:11:{s:5:\"first\";s:2:\"AA\";s:4:\"last\";s:8:\"Aaa
> a\";s:7:\"company\";s:3:\"ABC\";s:6:\"street\";s:18:\"8158 AA
> Avenue\";s:4:\"city\";s:11:\"Los
> Angeles\";s:5:\"state\";s:1:\"5\";s:7:\"zipcode\";s:5:\"0\";s:7:\"countr
> y\";s:13:\"United States\";s:5:\"phone\";s:14:\"(000)
> 000-\";s:3:\"fax\";s:0:\"\";s:5:\"email\";s:13:\"[EMAIL PROTECTED]\";}}}
> boolean
>
> AND SO ON...
>
> Can anyone please tell me why this is happening and what I can
> do to correct it??? Thank you,
>
> Ted
>

Yeah, there's your problem. See the output? See all those backslashes? Figured
it out yet? :)

All those backslashes are breaking the unserialization. Use stripslashes(). Or
better yet, turn off magic_quotes_runtime in php.ini.

-- 
Ignacio Vazquez-Abrams  <[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] "but what if.." Function / String Problem

2001-01-19 Thread Shawn Blaylock

O yeah! Thanks for pointing that out! =)

Ignacio Vazquez-Abrams wrote:
> 
> On Fri, 19 Jan 2001, Shawn Blaylock wrote:
> 
> > Yep. I think the only difference is the way it handles variable
> > interpolation, but I'm not entirely sure on that one.
> >
> > "Boget, Chris" wrote:
> > >
> > > > It won't work even with single quotes. It'll just echo out
> > > > LoggedIn() as part of the string.
> > >
> > > Yeah, I didn't think so.  But I knew that '' behaves differently
> > > than "".  I just wasn't sure of the exact details of the differences.
> > >
> > > Chris
> >
> 
> Single quotes also don't do escaping (i.e., "\n", "\r", etc.).
> 
> --
> Ignacio Vazquez-Abrams  <[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]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
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] Migrating from PHP3 to PHP4 issues

2001-01-19 Thread James Atkinson

I'm working on a very large project that has been built in PHP 3. I've been
charged with the task of moving it over to PHP4.

So far everything has been going swimmingly (well, except that I forgot to
compile PHP 4 --with-oci8 insted of --with-oracle). However, I've run into a
couple of wierd issues.

All the old, working perfectly, PHP3 scripts that has this in them:
@unset($var);
Throw a parse error on that..If I take out the @ it works fine. Now this has
me thinking, are there any other little oddities like this that arn't
clearly documented anywhere? (or if they are I can't fine them)

Also have any of the OCI functions changed radically from 3 to 4? (I already
ran into the OCIFreeDescriptor == OCIFreeDesc one), Also have there been any
serious changes to the ereg functions?

(Oh, and on a side note, my company is looking for 2 good PHP developers. If
you live in the Vancouver area, or want to move here, check the site in my
sig or email me.)

Thanks for any input you can give,

---
James Atkinson 100world.com Inc.
Senior Developer 512 - 1529 W. 6th Ave.
Phone: +1-604-637-8122   Vancouver, BC, V6J 1R1
Fax:   +1-604-742-1770 Canada
Email: [EMAIL PROTECTED]  http://www.100world.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] session_start problem

2001-01-19 Thread Ignacio Vazquez-Abrams

On Fri, 19 Jan 2001, Markus H. Maussner wrote:

> hi...
>
> every time i do a session_start();  with php i get in the first two lines
> of the output this
>
> &PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Your data  Contact
> LOGOUT
> &PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Contact  LOGOUT
>
> do i do something wrong ? can i put this message somehow off ?
>
> everything else work fine.. sessions and so.. just this two lines are a
> bit disturbing me...
>
> markus
>

Are you using quotes in your  tags?

-- 
Ignacio Vazquez-Abrams  <[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] Recompile GD ??

2001-01-19 Thread Richard Lynch

>How can I do it ???  I installed jpeg-6b, and I readed that before
recompile PHP(with option : --with-jpeg-dir=/.../jpeg-6b), >I must recompile
gd, its really necessary ? If si, how recompile gd.

There should be instructions in the GD source code directory.

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm




-- 
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] problems creating a png image from an array{HELP}

2001-01-19 Thread Richard Lynch

> I have a txt file as input.This file has the coordinates for a gas
> network.With php I am creating an array with the above coordinates and
then
> I create from the array the image from the network.When the txt file is
> >21Kb there is no image, else all works perfect{with a smaller txt file).I
> am using php4,apache(sometimes my system hangs with this server) or OMNI
> httpd(works fine).
> If anybody know sth PLEASE HELP ME
> I am newbie in php programming

Post some source code, or put it online as source and post URL.

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



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

2001-01-19 Thread Richard Lynch

>  for ($i=0 ; $i < 4 ; $i++)
> {
> file://do something
>
> for ($k=0 ; $k < 3 ; $k++)
>{
> print " value=\"".$K."\" >"; file://this is working
> print ""; file://this
is
> not
>}
> }

For FORMs, files as arrays were added in later, and then 2-D arrays came
after that.  So probably there is no patch yet for 2-D FILE inputs.

You're probably receiving all the files in a 1-D array, with funky indices
(keys):

$ans['0][0'] is the first file.
$ans['0][1'] is the second file
etc

If so, you can walk that and use explode('][', $key) to determine the
indices you really wanted and re-construct your desired array.

Something like:
while (list($key, $value) = each($ans)){
$keys = explode('][', $key);
list($x, $y) = each($keys);
$realans[$x][$y] = $value;
}


By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



-- 
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] Ms SQL Error with php3.0

2001-01-19 Thread Richard Lynch

> Fatal error: Call to unsupported or undefined function
> mssql_connect() in C:\HTTPD\HTDOCS\mssql.php3 on line
> 3
> 
> I have uncommented the ; in the php3.ini file.

Is that DLL actually in your php directory?...

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



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

2001-01-19 Thread Richard Lynch

> Hi My name is Bruno, I'm in Brazil and I'm new in PHP...
>
>
> I wanna know how can I roll in the records in a dataset.
> Like...
> Move First
> Move last
> Move next.os something like this

Depends on which database you use...

Assuming it's MySQL, you have http://php.net/mysql_fetch_row and
http://php.net/mysql_fetch_array which are kinda like moveNext, only better
:-)

To move back to the first (or any) record, you can use
http://php.net/mysql_data_seek (I think it's data_seek...)  It's in there
somewhere.

Oh yeah -- You've now triggered a nightmare that can only be expunged by my
singing a verse from my Microsoft Sucks song:

"Can't moveFirst in an empty record set.
Microsoft Sucks.  Microsoft Sucks."

It's a very long song.  Many, many verses.  I used to sing it aloud at work.
:-)

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



-- 
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] References in an array

2001-01-19 Thread Richard Lynch

> $overview = imap_fetch_overview($mbox, "1:$last", 0);
> $IDs = array();
> $i = 0;
>
> foreach($overview as $val){
> $IDs[$i][0] = $val->message_id;
> $IDs[$i][1] = &$val;
> $i++;
> }
>
> echo "";
> foreach($IDs as $val){
> echo "" . $val[1]->subject . "";
> }
> echo "";
>
> Unfortunately I only get an empty table; the subject of the referenced
> header is not printed in the HTML-Code. Where's the error in my thinking ?

I'm  not seeing anything to explain why you don't get your subject, but I do
wonder why you iterate through your $overview array to build an $ID array so
you can iterate through that to write out your table...

Would it not make more sense to just iterate through $overview, writing out
the HTML as you go?

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



-- 
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] how to trigger incomming mail

2001-01-19 Thread Richard Lynch

> on this mail I want to trigger mail incomming on this adres so I can start
a
> php script that filters this standaard mail getting the order code and put

Ideally you've got PHP compiled as a CGI as well as a Module.

The trigger part is in your procmail filters, which I've never done, so I
can't help much, except to say "man procmail"

Conceptually, though, the rest is fairly easy:  Something you put in your
.procmail file will look more or less like this:

blahblahblah "/full/path/to/your/script.php XXX"

Where blahblahblah is how procmail identifies which emails to send and XXX
is procmail's secret code for "shove the actual email in here"

Then your script just looks like:

#!/full/path/to/cgi/binary/php -q


You'll need to chmod your script to be executable by the process running
procmail, and you'll have to make sure it has Un*x newlines, not Windows,
because that #! line has to have a Un*x newline at the end.

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



-- 
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] Date/Time Formatting

2001-01-19 Thread Richard Lynch

> Also I'd like to if possible to be able to enter and display the date in
> Australian / European Time format (DD,MM,)
> I'm currently entering it on the form using three text fields and then
> rearanging them to the Format in mySQL and indserting it as a string, but
I
> don't know how to 'break' up a mySQL Date value to rearange it.

The breaking up of a MySQL date would be in the MySQL manual at
http://mysql.org
I dunno what it's called...  In PostgreSQL it's "date_part" though :-)

I'm afraid there was another question in there somewhere, but I couldn't
really discern it -- What you are doing seems quite reasonable to me.



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