Re: [PHP] pspell problems

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 07:03, Noodles wrote:
> Jason Wong wrote:
> > --with-pspell=/usr is what you want.
>
> I tried this and it still didn't help things

That *is* what you want -- your problem lies elsewhere.

> I have:
> /usr/include/aspell.h
> /usr/lib/libaspell.so
> /usr/lib/libaspell.so.15
> /usr/lib/libaspell.so.15.0.3
> /usr/lib/libpspell.so.15
> /usr/lib/libpspell.so.15.0.3

That looks good.

> (your find script didn't seem to do anything on my box, so i just used
> locate)

I would have asked you to use locate if I could have been sure you have 
updated the db after removing and installing the various packages.

Anyway, do you have these as well:

/usr/include/pspell/
/usr/include/pspell/pspell.h

The directory is required for the ./configure command to succeed, and you 
actually need the header file for the make command to succeed.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
 so, how's everything in the world of Quack?
 just ducky
 excellent, fried duck is mighty fine tasty.
*/

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



Re: [PHP] Big table dump stopping in between

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 07:14, Ritesh Nadhani wrote:

Please do not top post.

> Here is page that shows phpinfo() in my webserver.
>
> http://www.webyog.com/indexsam.php
>
> As I can see, the configure command has '--enable-safe-mode'  but in the
> PHP core configuration - safe_mode is set to off.

It's probably because safe_mode is disabled in php.ini. 

> The max_execution_time is given to be 30 by default, but in my PHP i have
> set set_time_limit(30)

If you want to give your script infinite time to run (ie as much time as it 
needs) use:

  set_time_limit(0);

at the beginning of your script.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
/* now make a new head in the exact same spot */
 -- Larry Wall in cons.c from the perl source code
*/

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



[PHP] Problems with mail function

2004-11-08 Thread Pete

I have a problem with a standard mail() function.  

If I put a short message ( "test" ) into it, then the email is sent.  

If I put a longer  message in (Visitors name and address collected from
webpage), then the mail is not sent.  

No error message is generated, the mail just doesn't arrive.

The client has PHP Version 4.3.1 on Windows NT localhost 5.2 build 3790 
-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com

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



Re: [PHP] Help:escape_string and stripslashes

2004-11-08 Thread Jason Wong
On Sunday 07 November 2004 14:27, Stuart Felenstein wrote:

> Another thing I'm wondering and not clear on .
> I have 5 pages of forms, a 6th page is where the
> processing , transaction is taking place.
> Would it be sufficient to add stripslashes_deep() to
> only the last page (6th page) ?
> Each succeeding page, posts the previous page
> varibles.
> I'm guessing the last (6th page) would be enough, but
> would like to confirm.

The logical answer is run it wherever it is needed. As magic quotes are 
enabled I would have thought that you need to strip slashes (using whatever 
method) before you can validate the data.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
*** Knghtbrd is now known as SirKewLDooD
*** Mercury kicked SirKewlDooD from #quakeforge (*WHACK*)
*/

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



[PHP] Detecting image types for uploaded images

2004-11-08 Thread Karthik
Hi,

  How do I differentiate between progressive and standard jpegs for
files "already" on the server ? getimagesize does return a mime type,
but doesn't seem to differentiate between image/jpeg and image/pjpeg
and returns image/jpeg for all jpeg images.

Any ideas?
Thanks
-K

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



Re: [PHP] Problems with mail function

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 08:23, Pete wrote:
> I have a problem with a standard mail() function.
>
> If I put a short message ( "test" ) into it, then the email is sent.
>
> If I put a longer  message in (Visitors name and address collected from
> webpage), then the mail is not sent.

So you're suspecting size is the problem? Have you tried to figure out what 
size limit is?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
In the long run we are all dead.
  -- John Maynard Keynes
*/

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



Re: [PHP] pspell problems

2004-11-08 Thread Noodles
Jason Wong wrote:
Anyway, do you have these as well:
/usr/include/pspell/
/usr/include/pspell/pspell.h
The directory is required for the ./configure command to succeed, and you 
actually need the header file for the make command to succeed.

No, I have no pspell directory or header file, I had installed pspell 
seperately which made configure work, but caused problems when trying to 
use the pspell commands in php (couldn't find dictionaries). I was told 
that aspell had all the pspell stuff that php needed.

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


Re: [PHP] Pb'lm of Regular Expression

2004-11-08 Thread Klaus Reimer
[EMAIL PROTECTED] wrote:
"https://abc.com/first.php?
site_id=abc&aid=keyin&lid=keyin&ref=&q=\" width=\"1\" height=\"1\">";
//s
The complete tag is in index 0, the src is in index 1 of the match-array.

Now what regular expression i write so i can fetch the image tag from my site of
above syntex.And if possible send me the regular expression of fetching 
 
/(.*?)<\/a>/s
The complete tag is in index 0, the href attrib in index 1 and the link 
text in index 2.

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


RE: [PHP] Detecting image types for uploaded images

2004-11-08 Thread nate
What about mime_content_type()... see what that returns.

Nate

-Original Message-
From: Karthik [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 08, 2004 12:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Detecting image types for uploaded images

Hi,

  How do I differentiate between progressive and standard jpegs for
files "already" on the server ? getimagesize does return a mime type,
but doesn't seem to differentiate between image/jpeg and image/pjpeg
and returns image/jpeg for all jpeg images.

Any ideas?
Thanks
-K

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

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



[PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread Tobias Neumann
Hello!

I have the same script on two webservers with php 4.3.9 and apache 2, both
with the same php configurations. On one server I can not access
$_FILES or $HTTP_POST_FILES, although a form with a file has been
correctly submitted.

apache_request_headers() contains:

[Content-Type] => multipart/form-data;
boundary=---207315575716727585901748724465
[Content-Length] => 5779

So php should have received the form data. I can access $_GET and $_POST
without any problem.

$_FILES and $HTTP_POST_FILES do simply not exist, and when I try
to access them I just get an undefined index error, or with print_r() an
empty array.

Regards,
  Tobias Neumann

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



[PHP] Session Handling

2004-11-08 Thread Vinayakam Murugan
Hello

Can anyone point me a good tutorial for session handling in PHP? I
want answers to questions like

1) What's the difference between session & cookies?
2) What does session_destroy do? (I know the definition from
www.php.net) I want to know the internals.

Thanks in advance.

-- 
Warm Regards

Vinayak

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



Re: [PHP] pspell problems

2004-11-08 Thread Noodles
Jason Wong wrote:
Anyway, do you have these as well:
/usr/include/pspell/
/usr/include/pspell/pspell.h
As I said in my other email, I don't, but I have found the debian 
package which has pspell.h in it.

It's libpspell-dev
So from start to finish, this should install pspell on debian
apt-get install aspell libpspell libaspell
download the source for the version of php on your machine, extract it 
to a temp dir

change to that temp dir, and do ./configure --with-pspell=shared
then make
don't do a make install (being that you're using a packaged version of php)
find pspell.so
which should be in php-4.3.9/modules/pspell.so
copy this to your extensions directory and edit your php.ini to call 
this extension.

Bingo, works
Thanks for everyone for their help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread Marek Kilimajer
Tobias Neumann wrote:
Hello!
I have the same script on two webservers with php 4.3.9 and apache 2, both
with the same php configurations. On one server I can not access
$_FILES or $HTTP_POST_FILES, although a form with a file has been
correctly submitted.
apache_request_headers() contains:
[Content-Type] => multipart/form-data;
boundary=---207315575716727585901748724465
[Content-Length] => 5779
So php should have received the form data. I can access $_GET and $_POST
without any problem.
$_FILES and $HTTP_POST_FILES do simply not exist, and when I try
to access them I just get an undefined index error, or with print_r() an
empty array.
Regards,
  Tobias Neumann
http://sk2.php.net/manual/en/features.file-upload.php
Read the Related Configurations Note and also check enctype attribute of 
your 

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


Re: [PHP] pspell problems

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 08:36, Noodles wrote:
> Jason Wong wrote:
> > Anyway, do you have these as well:
> >
> > /usr/include/pspell/
> > /usr/include/pspell/pspell.h
> >
> > The directory is required for the ./configure command to succeed, and you
> > actually need the header file for the make command to succeed.
>
> No, I have no pspell directory or header file, I had installed pspell
> seperately which made configure work, but caused problems when trying to
> use the pspell commands in php (couldn't find dictionaries). I was told
> that aspell had all the pspell stuff that php needed.

Methinks you need to install both. pspell provides an interface into aspell, 
it is aspell which actually does the dirty work. Some distros combine both 
aspell and pspell in one package, whilst others mat have split them up.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Computers are like air conditioners.  Both stop working, if you open windows.
 -- Adam Heath
*/

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



Re: [PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread raditha dissanayake
Tobias Neumann wrote:
Hello!
I have the same script on two webservers with php 4.3.9 and apache 2, both
with the same php configurations. On one server I can not access
$_FILES or $HTTP_POST_FILES, although a form with a file has been
correctly submitted.
 

Quick question: is file uploads enabled on this server and is the 
temporary directory writable?

apache_request_headers() contains:
[Content-Type] => multipart/form-data;
boundary=---207315575716727585901748724465
[Content-Length] => 5779
So php should have received the form data. I can access $_GET and $_POST
without any problem.
$_FILES and $HTTP_POST_FILES do simply not exist, and when I try
to access them I just get an undefined index error, or with print_r() an
empty array.
Regards,
 Tobias Neumann
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 09:07, Tobias Neumann wrote:

> I have the same script on two webservers with php 4.3.9 and apache 2, both
> with the same php configurations. On one server I can not access
> $_FILES or $HTTP_POST_FILES, although a form with a file has been
> correctly submitted.

Are the httpd.conf config the same as well?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
"I go on working for the same reason a hen goes on laying eggs."
- H. L. Mencken
*/

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



Re: [PHP] Big table dump stopping in between

2004-11-08 Thread Ritesh Nadhani
Hello,
- Original Message - 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 08, 2004 9:59 PM
Subject: Re: [PHP] Big table dump stopping in between


On Monday 08 November 2004 07:14, Ritesh Nadhani wrote:
Please do not top post.
I dont know what you mean by that. I just pressed reply all in my outlook.
Here is page that shows phpinfo() in my webserver.
http://www.webyog.com/indexsam.php
As I can see, the configure command has '--enable-safe-mode'  but in the
PHP core configuration - safe_mode is set to off.
It's probably because safe_mode is disabled in php.ini.
The max_execution_time is given to be 30 by default, but in my PHP i have
set set_time_limit(30)
If you want to give your script infinite time to run (ie as much time as 
it
needs) use:

 set_time_limit(0);
Sorry for my previous post but I am actually doing set_time_limit(0) at top 
of my script.

at the beginning of your script.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
/* now make a new head in the exact same spot */
-- Larry Wall in cons.c from the perl source code
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Big table dump stopping in between

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 10:04, Ritesh Nadhani wrote:

> > Please do not top post.
>
> I dont know what you mean by that. I just pressed reply all in my outlook.

google > top post

> Sorry for my previous post but I am actually doing set_time_limit(0) at top
> of my script.

Then your problem most likely lies elsewhere.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Microsoft broke Volkswagen's world record:  Volkswagen only made 22 million
bugs!
*/

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



[PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein
Say I have a script that processes input data.  How do
I get the script to work, where  after processing the
user is taken to another page ?  The script outputs
nothing to the screen and will end either in failure
or success.  
Seems header won't work for me.


Stuart

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



Re: [PHP] Question: Exiting a script

2004-11-08 Thread Richard Davey
Hello Stuart,

Monday, November 8, 2004, 10:31:51 AM, you wrote:

SF> Say I have a script that processes input data. How do I get the
SF> script to work, where after processing the user is taken to
SF> another page ? The script outputs nothing to the screen and will
SF> end either in failure or success.

SF> Seems header won't work for me.

A redirect (Location) header is the only way to send the user to
another page from within a PHP script (that or output a meta refresh
tag, which is a bit messy).

Header will work, providing you haven't already output anything - use
the headers_sent() function to test if you've output the headers
already and do something based on that, i.e:

if (headers_sent())
{
   echo 'I have ballsed up somewhere and output some text or
   white-space, aborting';
}
else
{
header('Location: http://www.blah.com/page2.html');
}

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein

--- Richard Davey <[EMAIL PROTECTED]> wrote:

 some
> text or
>white-space, aborting';
> }
> else
> {
 
> Richard Davey

I think white space is my problem.  What causes white
space ?

Stuart

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



Re: [PHP] Question: Exiting a script

2004-11-08 Thread Stuart Felenstein
Never mind , I found it!
http://www.w3.org/

TR/xhtml1/DTD/xhtml1-transitional.dtd">

One of these days I'll master the header function ;)


Stuart

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



Re[2]: [PHP] Question: Exiting a script

2004-11-08 Thread Richard Davey
Hello Stuart,

Monday, November 8, 2004, 10:46:00 AM, you wrote:

SF> I think white space is my problem.  What causes white
SF> space ?

Spaces and similar characters, carriage-returns, line-feeds, etc
output to the browser. Perhaps before the opening PHP tag, or after
the closing PHP tag. Any would screw it.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread Tobias Neumann
On Mon, 08 Nov 2004 15:52:53 +0600, Raditha Dissanayake wrote:

> Quick question: is file uploads enabled on this server and is the 
> temporary directory writable?

Hmm. upload_tmp_dir was unset. The php.ini says that in this case the
systems default tempoary directory is used. So I guessed it would be
/tmp, because php also saves the session data there. Now I set the
upload_tmp_dir explicit to /tmp and it works.

So where on linux systems is the default tempoary directory set?

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



[PHP] mysql networking ??

2004-11-08 Thread Aalee
Hi guys,
I have a small home network working with just 4 computers (PC's on WinXP
Pro) connected through a switch just using the local ip's 192.168.0.1 and so
on. And the netwok is working fine. I have installed MySQL on one computer
and setup a database and installed MySQL on the other PCs aswell. But am
having problem getting into the server computer where the databases are
setup. Does any one of you know of any good tutorials out there how to setup
a small network using MySQL using windows XP. I have come across some tutes,
but most of them are on using Linux. Or any advice would be helpful.

Thanks on advance

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



[PHP] mysql networking??

2004-11-08 Thread Aalee
Hi guys,
I have a small home network working with just 4 computers (PC's on WinXP
Pro) connected through a switch just using the local ip's 192.168.0.1 and so
on. And the netwok is working fine. I have installed MySQL on one computer
and setup a database and installed MySQL on the other PCs aswell. But am
having problem getting into the server computer where the databases are
setup. Does any one of you know of any good tutorials out there how to setup
a small network using MySQL using windows XP. I have come across some tutes,
but most of them are on using Linux. Or any advice would be helpful.

Thanks on advance
aalee

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



[PHP] mysql netwoking??

2004-11-08 Thread Aalee
Hi guys,
I have a small home network working with just 4 computers (PC's on WinXP
Pro) connected through a switch just using the local ip's 192.168.0.1 and so
on. And the netwok is working fine. I have installed MySQL on one computer
and setup a database and installed MySQL on the other PCs aswell. But am
having problem getting into the server computer where the databases are
setup. Does any one of you know of any good tutorials out there how to setup
a small network using MySQL using windows XP. I have come across some tutes,
but most of them are on using Linux. Or any advice would be helpful.

Thanks on advance
aalee

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



Re: [PHP] mysql netwoking??

2004-11-08 Thread John Nichel
Aalee wrote:
Hi guys,
I have a small home network working with just 4 computers (PC's on WinXP
Pro) connected through a switch just using the local ip's 192.168.0.1 and so
on. And the netwok is working fine. I have installed MySQL on one computer
and setup a database and installed MySQL on the other PCs aswell. But am
having problem getting into the server computer where the databases are
setup. Does any one of you know of any good tutorials out there how to setup
a small network using MySQL using windows XP. I have come across some tutes,
but most of them are on using Linux. Or any advice would be helpful.
Thanks on advance
aalee
This is still the PHP mailing list, right?
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] What about pgsql error codes ?

2004-11-08 Thread Bambero
Hello
How can I get an error code of my last pgsql query like in mysql 
'mysql_errno()' ?

http://www.postgresql.org/docs/7.4/static/errcodes-appendix.html
Bambero
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re. [PHP] mysql networking ?

2004-11-08 Thread Manoj Kumar
Hi its a php mailing list ? Okey .

-- Manoj Kr. Sheoran 


"Aalee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi guys,
> I have a small home network working with just 4 computers (PC's on WinXP
> Pro) connected through a switch just using the local ip's 192.168.0.1 and so
> on. And the netwok is working fine. I have installed MySQL on one computer
> and setup a database and installed MySQL on the other PCs aswell. But am
> having problem getting into the server computer where the databases are
> setup. Does any one of you know of any good tutorials out there how to setup
> a small network using MySQL using windows XP. I have come across some tutes,
> but most of them are on using Linux. Or any advice would be helpful.
> 
> Thanks on advance
> aalee
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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

Re: [PHP] mysql netwoking??

2004-11-08 Thread Robert Cummings
On Mon, 2004-11-08 at 07:41, John Nichel wrote:
> Aalee wrote:
> 
> > Hi guys,
> > I have a small home network working with just 4 computers (PC's on WinXP
> > Pro) connected through a switch just using the local ip's 192.168.0.1 and so
> > on. And the netwok is working fine. I have installed MySQL on one computer
> > and setup a database and installed MySQL on the other PCs aswell. But am
> > having problem getting into the server computer where the databases are
> > setup. Does any one of you know of any good tutorials out there how to setup
> > a small network using MySQL using windows XP. I have come across some tutes,
> > but most of them are on using Linux. Or any advice would be helpful.
> > 
> > Thanks on advance
> > aalee
> > 
> 
> This is still the PHP mailing list, right?

You Ediot. We became a MySQL list a few months ago. We retained
the name php-general for backwards compatibility :l

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Detecting image types for uploaded images

2004-11-08 Thread Karthik
Hi,

   same thing mate - comes up as "image/jpeg image/jpeg" - The images
in question are definitely pjpegs - i.e. checking file type during
uploads registers them as pjpegs.

Cheers,
-K

On Mon, 8 Nov 2004 01:17:24 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> What about mime_content_type()... see what that returns.
> 
> Nate
> 
> -Original Message-
> From: Karthik [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 08, 2004 12:35 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Detecting image types for uploaded images
> 
> Hi,
> 
>  How do I differentiate between progressive and standard jpegs for
> files "already" on the server ? getimagesize does return a mime type,
> but doesn't seem to differentiate between image/jpeg and image/pjpeg
> and returns image/jpeg for all jpeg images.
> 
> Any ideas?
> Thanks
> -K

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



Re: [PHP] pspell problems

2004-11-08 Thread John Nichel
Jason Wong wrote:
Methinks you need to install both. pspell provides an interface into aspell, 
it is aspell which actually does the dirty work. Some distros combine both 
aspell and pspell in one package, whilst others mat have split them up.

It depends on what version you install.  All the latest versions of 
aspell ( > 0.50 I think) contain both...at least when doing a source 
install.  When they first combined this, I had problems getting php to 
configure with pspell when both pspell and aspell were installed on the 
system.

BTW, what's up with your system clock Jason? ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] set_include_path() isn't persistent

2004-11-08 Thread Justin French
Hi,
Experimenting with set_include_path(), but it would appear that it 
doesn't persist for the duration of the request, just the current 
script.  That is to say, an included file will not inherit the 
include_path() of the parent file.

Is there any way to persist this without re-setting it on each file?
Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PEAR mail

2004-11-08 Thread marc serra
hi,
i'm using Mail PEAR package and i want to send a mail to a recipient and 
to some other in Cc.
So i try to add Cc in header but it failed and mail didn't been 
delivered to Cc. It was only delivered to adress specified in From field.

I use that code :
   $hdrs = array(
   "From"=> "[EMAIL PROTECTED]",   
   "Cc" => "[EMAIL PROTECTED]"
   "Subject" => "Tests"
   );
   $mime = new Mail_mime($crlf);   
   $mime->setHTMLBody(stripslashes($html));
   $body = $mime->get();
   $hdrs = $mime->headers($hdrs);
   $mail =& Mail::factory('smtp',$params); 
   $mail->send($recipients, $hdrs, $body);

Can someone say me how to use pear package to send a mail to an adress 
and to send it in copy to another one ?

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


Re: [PHP] set_include_path() isn't persistent

2004-11-08 Thread John Nichel
Justin French wrote:
Hi,
Experimenting with set_include_path(), but it would appear that it 
doesn't persist for the duration of the request, just the current 
script.  That is to say, an included file will not inherit the 
include_path() of the parent file.

Is there any way to persist this without re-setting it on each file?
Justin
.htaccess or in the httpd.conf
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] set_include_path() isn't persistent

2004-11-08 Thread Justin French
On 09/11/2004, at 1:26 AM, John Nichel wrote:
Justin French wrote:
Hi,
Experimenting with set_include_path(), but it would appear that it 
doesn't persist for the duration of the request, just the current 
script.  That is to say, an included file will not inherit the 
include_path() of the parent file.
Is there any way to persist this without re-setting it on each file?
Justin
.htaccess or in the httpd.conf
Figured as much... the catch is that I'd rather not have to explicitly 
set the path in htaccess (eg "/usr/home/foo/public/bah/"), but can't 
find a way yet to set a relative path in htaccess (eg "../" for "one 
level up from this htaccess file).

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


Re: [PHP] pspell problems

2004-11-08 Thread Jason Wong
On Monday 08 November 2004 14:12, John Nichel wrote:

> BTW, what's up with your system clock Jason? ;)

I'll figure out how to set the clock one of these days. (Stop laughing).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Never call a man a fool.  Borrow from him.
*/

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



Re: [PHP] set_include_path() isn't persistent

2004-11-08 Thread Justin French
On 09/11/2004, at 1:19 AM, Justin French wrote:
Experimenting with set_include_path(), but it would appear that it 
doesn't persist for the duration of the request, just the current 
script.
Actually, it does apply to included files... I just ed up my paths 
:)

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


[PHP] Re: PEAR mail

2004-11-08 Thread Ben Ramsey
Marc Serra wrote:
   $hdrs = array(
   "From"=> "[EMAIL PROTECTED]",   
   "Cc" => "[EMAIL PROTECTED]"
   "Subject" => "Tests"
   );
In your $hdrs array, you're missing a comma separating Cc from Subject. 
That's probably causing the problem. It should be:

$hdrs = array(
"From" => "[EMAIL PROTECTED]",
"Cc" => "[EMAIL PROTECTED]",
"Subject" => "Tests"
);
--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com
---
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Syntax highlighting of odd language

2004-11-08 Thread Aaron Gould
M. Sokolewicz wrote:
Now, the problem with such a "solution" is the following. Imagine you 
have the following keywords:
include
require
in
of
typof
now, when you replace include with include, it'll go on, and also replace all 
instances of in, so you'll end up with things like include 
(very ugly).
I did encounter this during some experimenting.  I figured I'd just sort 
the array of commands from from shortest strong to longest string.  But 
like you said, far too many embedded  tags would result!

*a* way to get around that is by using word boundries around the keyword 
to be replaced (eg. preg_replace('\(\W|^)+('.$highlight[$i].')(\W|$)\i', 
'$1$2$3') )
My regular expression skills are very basic, but I understand the gist 
of your preg_replace statement.  Now I just need to polish my regex 
knowledge!

Thanks,
--
Aaron Gould
Parts Canada - Web Developer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] You know you're a geek when...

2004-11-08 Thread Greg Donald
On Mon, 08 Nov 2004 10:40:30 +0600, raditha dissanayake
<[EMAIL PROTECTED]> wrote:
> You know you're a geek when you know which list deals with which top
> and when you know that subselects in mysql is not much faster than the
> nested loop you have been using.

Can you point me to some benchmarks that support this claim?  Thanks.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Session Handling

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 15:00:33 +0530, Vinayakam Murugan
<[EMAIL PROTECTED]> wrote:
> Can anyone point me a good tutorial for session handling in PHP? I
> want answers to questions like

> ./google.pl "php session" 10
Result:
http://www.php.net/session
http://www.phpfreaks.com/tutorials/41/0.php
http://www.webkreator.com/php/configuration/php-session-security.html
http://www.sitepoint.com/blog-post-view.php?id=156260
http://www.sitepoint.com/article/users-php-sessions-mysql
http://martin.f2o.org/php/session
http://www.onlamp.com/pub/a/php/excerpt/webdbapps_8/
http://www.zend.com/manual/ref.session.php
http://www.easysoft.com/tech/php/tut_001/main.phtml
http://shiflett.org/talks/phpworks2004/php-session-security


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...

2004-11-08 Thread raditha dissanayake
Greg Donald wrote:
On Mon, 08 Nov 2004 10:40:30 +0600, raditha dissanayake
<[EMAIL PROTECTED]> wrote:
 

You know you're a geek when you know which list deals with which top
and when you know that subselects in mysql is not much faster than the
nested loop you have been using.
   

Can you point me to some benchmarks that support this claim?  Thanks.
 

Sorry no benchmarks, i am talking from personal experience where I 
converted some code from a php nested loop to mysql. I was rather 
surprised by the results. I will concede that I may not have optimized 
the query properly or that I may not have had the correct indexes, but 
since I have been doing this for quite a few years i like to think i got 
the query right. (feel free to deflate my ego :-) )

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Search engine : build a new one or use an alreadry existing one ?

2004-11-08 Thread Greg Donald
On Sun, 7 Nov 2004 19:10:32 -0400, robert mena <[EMAIL PROTECTED]> wrote:
> I need to improve my current "search mecanism" but got stuck in a
> dilema : build one or use an existing engine?

I recently put together a large company intranet site search using
htdig and a simple php wrapper script:

http://www.devshed.com/c/a/PHP/Search-This/
http://www.htdig.org/

This setup allows me a great deal of graphical customization in the
results display while putting all the real work with search results
and search logic on htdig.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Re: PEAR mail

2004-11-08 Thread Jim Wharton
I'm not very familiar with php's drawing abilities. I have found out how
to get it to create multipoint polygons.

What I am trying to do is implement something along the lines of LOGO.
(You know, that old language that told a robotic turtle to draw on the
floor)

Seriously, I currently have an inherited Java program that takes traverse
information (strings that look like this: BAS(L66D24R66U24)) and createds
this: Left:66 Down:24 Right: 66 Up:24 and draws it out to the screen.
These are building drawings made by field appraisers (for the local
property appraisers office).

I would really like to drop the Java stuff as I don't really use it. What
I would really like to do is somehow turn these strings into coordinates
so I can draw them using PHP's polygon function.

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



[PHP] whoops, forgot to change the subject on that last one...

2004-11-08 Thread Jim Wharton
Jim Wharton said:
> I'm not very familiar with php's drawing abilities. I have found out how
> to get it to create multipoint polygons.
>
> What I am trying to do is implement something along the lines of LOGO.
> (You know, that old language that told a robotic turtle to draw on the
> floor)
>
> Seriously, I currently have an inherited Java program that takes traverse
> information (strings that look like this: BAS(L66D24R66U24)) and createds
> this: Left:66 Down:24 Right: 66 Up:24 and draws it out to the screen.
> These are building drawings made by field appraisers (for the local
> property appraisers office).
>
> I would really like to drop the Java stuff as I don't really use it. What
> I would really like to do is somehow turn these strings into coordinates
> so I can draw them using PHP's polygon function.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Re: PEAR mail

2004-11-08 Thread Ben Ramsey
Is this somehow related to the "PEAR mail" thread? I don't see the 
connection. I think you're trying to ask a new question. When doing so, 
please don't reply to an existing message in an existing thread (even if 
you change the subject) because you're new question will become a part 
of the old thread. ALWAYS start a brand new message; a descriptive 
subject is also helpful. You'll get a better response and more help this 
way.

Thanks!
Jim Wharton wrote:
I'm not very familiar with php's drawing abilities. I have found out how
to get it to create multipoint polygons.
What I am trying to do is implement something along the lines of LOGO.
(You know, that old language that told a robotic turtle to draw on the
floor)
Seriously, I currently have an inherited Java program that takes traverse
information (strings that look like this: BAS(L66D24R66U24)) and createds
this: Left:66 Down:24 Right: 66 Up:24 and draws it out to the screen.
These are building drawings made by field appraisers (for the local
property appraisers office).
I would really like to drop the Java stuff as I don't really use it. What
I would really like to do is somehow turn these strings into coordinates
so I can draw them using PHP's polygon function.

--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com
---
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Search engine : build a new one or use an alreadry existing one ?

2004-11-08 Thread Ben Ramsey
Greg Donald wrote:
I need to improve my current "search mecanism" but got stuck in a
dilema : build one or use an existing engine?
I recently put together a large company intranet site search using
htdig and a simple php wrapper script:
http://www.devshed.com/c/a/PHP/Search-This/
http://www.htdig.org/
I've used the Zoom search engine by Wrensoft 
 with PHP on a Windows system, and it 
worked well. Also, I've never used it, but I've heard that mnoGoSearch 
works, well, too.

--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com
---
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] set_include_path() isn't persistent

2004-11-08 Thread Skippy
On Tue, 9 Nov 2004 01:39:03 +1100 Justin French
<[EMAIL PROTECTED]> wrote:
> 
> On 09/11/2004, at 1:26 AM, John Nichel wrote:
> 
> > Justin French wrote:
> >> Hi,
> >> Experimenting with set_include_path(), but it would appear that it 
> >> doesn't persist for the duration of the request, just the current 
> >> script.  That is to say, an included file will not inherit the 
> >> include_path() of the parent file.
> >> Is there any way to persist this without re-setting it on each file?
> >> Justin
> >
> > .htaccess or in the httpd.conf
> 
> Figured as much... the catch is that I'd rather not have to explicitly 
> set the path in htaccess (eg "/usr/home/foo/public/bah/"), but can't 
> find a way yet to set a relative path in htaccess (eg "../" for "one 
> level up from this htaccess file).
> 
> Any ideas?

Did you try ini_set('include_path','path')? I recall doing this recently in
a root script and then include() -ing other scripts. It worked out well.

-- 
Skippy - Romanian Web Developers - http://ROWD.ORG

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



Re: [PHP] FW by MAILER-DAEMON@pb1.pair.com : *****SPAM_sub***** failure notice

2004-11-08 Thread Michelle Konzack
Am 2004-11-08 02:38:48, schrieb Curt Zirzow:
> * Thus wrote Michelle Konzack:

> > For every Message I send I get an error Message...
> > But the E-Mails was correctly  delivered...
> > 
> 
> This is rather new.. I'm looking into why this is occuring.

Thanks

> Curt

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] New/changing subject... was [PHP] Re: PEAR mail

2004-11-08 Thread Jim Wharton
Ben Ramsey said:
>
> Is this somehow related to the "PEAR mail" thread? I don't see the
> connection. I think you're trying to ask a new question. When doing so,
> please don't reply to an existing message in an existing thread (even if
> you change the subject) because you're new question will become a part
> of the old thread. ALWAYS start a brand new message; a descriptive
> subject is also helpful. You'll get a better response and more help this
> way.
>
> Thanks!

Yeah, sorry, I am aware of that. I wasn't sure of the list's address, so I
replied to an existing message. I simply forgot to change the subject
line.

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



[PHP] Drawing polygons from traverse information

2004-11-08 Thread Jim Wharton
Sorry for the traffic I have created with this:

I'm not very familiar with php's drawing abilities. I have found out how
to get it to create multipoint polygons.

What I am trying to do is implement something along the lines of LOGO.
(You know, that old language that told a robotic turtle to draw on the
floor)

Seriously, I currently have an inherited Java program that takes traverse
information (strings that look like this: BAS(L66D24R66U24)) and createds
this: Left:66 Down:24 Right: 66 Up:24 and draws it out to the screen.
These are building drawings made by field appraisers (for the local
property appraisers office).

I would really like to drop the Java stuff as I don't really use it. What
I would really like to do is somehow turn these strings into coordinates
so I can draw them using PHP's polygon function.

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



[PHP] Re: PEAR mail

2004-11-08 Thread Matthew Weier O'Phinney
* Marc Serra <[EMAIL PROTECTED]>:
> i'm using Mail PEAR package and i want to send a mail to a recipient and 
> to some other in Cc.
> So i try to add Cc in header but it failed and mail didn't been 
> delivered to Cc. It was only delivered to adress specified in From field.
>
> I use that code :
>
>
> $hdrs = array(
> "From"=> "[EMAIL PROTECTED]",   
> "Cc" => "[EMAIL PROTECTED]"
 ^
Need a comma at the end of that line.

> "Subject" => "Tests"
> );
> $mime = new Mail_mime($crlf);   
> $mime->setHTMLBody(stripslashes($html));
> $body = $mime->get();
> $hdrs = $mime->headers($hdrs);
> $mail =& Mail::factory('smtp',$params); 
> $mail->send($recipients, $hdrs, $body);

What is $recipients? Is it an array with both [EMAIL PROTECTED] and
[EMAIL PROTECTED] or a comma-separated string with both addresses?

Those are the two accepted forms for the first argument to the send()
method. The common pitfall I run into is that I forget to add the Cc
and/or Bcc elements to it before sending -- which means they do not get
delivered.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

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



[PHP] Re: New/changing subject... was [PHP] Re: PEAR mail

2004-11-08 Thread Matthew Weier O'Phinney
* Jim Wharton <[EMAIL PROTECTED]>:
> Ben Ramsey said:
> >
> > Is this somehow related to the "PEAR mail" thread? I don't see the
> > connection. I think you're trying to ask a new question. When doing
> > so, please don't reply to an existing message in an existing thread
> > (even if you change the subject) because you're new question will
> > become a part of the old thread. ALWAYS start a brand new message; a
> > descriptive subject is also helpful. You'll get a better response
> > and more help this way.
> >
> > Thanks!
>
> Yeah, sorry, I am aware of that. I wasn't sure of the list's address,
> so I replied to an existing message. I simply forgot to change the
> subject line.

Actually, you *did* change the subject. Read what was said in that
paragraph: 

[P]lease don't reply to an existing message in an existing thread
(even if you change the subject) because you're new question will
become a part of the old thread.

If you use a threaded mail/news reader, as many people do, your messages
will be grouped based on the original topic sent:

timestamp sender subject
---
10:00am   <> PEAR Mail
10:05am   <>  -> Re: PEAR Mail
10:07am   <> -> Re: PEAR Mail
10:06am   <>  -> Something about something else
10:08am   <>  -> Re: PEAR Mail

What's more, such readers also have the ability to 'collapse' threads
and show message counts -- so you can visually save space in your box,
and see if certain threads have received new messages. So it's rather
frustrating to open up a thread on PEAR Mail and discover something
about PHP's drawing functions inside it.

If you want to start a new thread, but don't know the list address...
Look at another post's To: or CC: headers; you'll likely find it there.
Then put that address in your address book so you don't need to look
next time.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

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



Re: [PHP] Re: New/changing subject... was [PHP] Re: PEAR mail

2004-11-08 Thread Jim Wharton
Matthew Weier O'Phinney said:

>
> Actually, you *did* change the subject. Read what was said in that
> paragraph:
>
> [P]lease don't reply to an existing message in an existing thread
> (even if you change the subject) because you're new question will
> become a part of the old thread.
>
> If you use a threaded mail/news reader, as many people do, your messages
> will be grouped based on the original topic sent:

I'm a mutt user typically. I know this.

> So it's rather
> frustrating to open up a thread on PEAR Mail and discover something
> about PHP's drawing functions inside it.

I'm truly sorry about that. What's even more frustrating is making a
simple mistake and having a bunch of people jump down your throat about
it. Point taken. Apology offered.

I am sorry though. Any more correspondance on this particular issue needs
to be directed to my personal email address - not the list. (That is,
unless, you feel the need to publically teach me a lesson.)

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



[PHP] Variable for search results

2004-11-08 Thread Stuart Felenstein
I have a form element which allows a user to go back
"x number of days" in the records.


$sql.=sprintf("SELECT * FROM records WHERE
Date_Sub(Curdate(), interval  day) "$%s" <=
PostStart") 

This formula works when I actually hardcode the number
of days in where this mess --> "$%s" is right now.

I'm not entirely sure how this should be coded.  Can I
put the variable right there? 

I'll take any suggestions, cause I'm stuck here.

Thank you,
Stuart

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



[PHP] Re: Variable for search results

2004-11-08 Thread Ben Ramsey
Stuart Felenstein wrote:
$sql.=sprintf("SELECT * FROM records WHERE
Date_Sub(Curdate(), interval  day) "$%s" <=
PostStart") 
Yes, you can put the variable in right there. Read up on variables here 
.

I'm not exactly sure what the SQL statement you have above is supposed 
to do, but you could just do something like this:

$curdate = date('Y-m-d H:i:s');
$sql = "SELECT * FROM records WHERE '$curdate' <= PostStart;";
--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com
---
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] DATE()

2004-11-08 Thread Aaron Todd
Is there any way yo get the date and time using date() from a Internet time 
server?  Right now I am getting it from my servers date and time which seems 
to be unpredictable since my ISP seems to change it at random.

Windows shows two time servers time.windows.com and time.nist.gov and I was 
wondering if I could use one of them instead of the time from my server.

Thanks,

Aaron 

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



Re: [PHP] Re: Variable for search results

2004-11-08 Thread Stuart Felenstein

--- Ben Ramsey <[EMAIL PROTECTED]> wrote:

> I'm not exactly sure what the SQL statement you have
> above is supposed 
> to do, but you could just do something like this:
> 
> $curdate = date('Y-m-d H:i:s');
> $sql = "SELECT * FROM records WHERE '$curdate' <=
> PostStart;";
> 

I'm having some problems still.  I'm trying to work
here with a Dreamweaver extension and the code is not
clear.  Are there are good tutorials around , to learn
how to create a database search and results page.
Basically there would be about 6 form elements, some
list boxes, some text fields.  The more criteria that
is filled in on the form the more refined the search.
Not sure if this is beyond my skill level or not. 
Beginner. 

Thank you
Stuart

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



Re: [PHP] Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...

2004-11-08 Thread Greg Donald
On Mon, 08 Nov 2004 21:57:41 +0600, raditha dissanayake
<[EMAIL PROTECTED]> wrote:
> Sorry no benchmarks, i am talking from personal experience where I
> converted some code from a php nested loop to mysql. I was rather
> surprised by the results. I will concede that I may not have optimized
> the query properly or that I may not have had the correct indexes, but
> since I have been doing this for quite a few years i like to think i got
> the query right. (feel free to deflate my ego :-) )

Well yeah.. It's hard to believe a well written MySQL sub select query
with proper indexing would be slower than looping through the results
with PHP scripting.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] PHP Accelerator

2004-11-08 Thread Adrian Madrid
Klaus Reimer wrote:
raditha dissanayake wrote:
this one:
- Turck MMCache for PHP

Turck MM Cache does not work with PHP 5. It's possible to compile and
load it and some pages are working but most of the time it segfaults.
By the way: Does anybody know if the Turck MM Cache project is still
active? The last change in CVS is 5 months old, the last release is
nearly a year old. And there were rumors that the main developer was
assimilated by Zend.
I've been running Turck for some time now on PHP5 and haven't had
segfault problems yet. I must say I'm running the latest CVS and using
file sessions (Turck's would give you segfaults). About new developments
there's been a lot of talk in the forums but so far only one person
mentioned having done changes int he code. The original developers have
not answered the call so far so we would have to hope for somebody else
to step up.
--
Adrian Madrid
HyperX Inc.
Mobile: 801.815.1870
Office: 801.566.0670
[EMAIL PROTECTED]
www.hyperxmedia.com
9000 S. 45 W.
Sandy, UT 84070
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Accelerator

2004-11-08 Thread Paul Reinheimer
I tried using MMCache With PHP5, and Apache 1.x, it segfaulted
frequently. Serendipity's HTML nuggets stopped working, as did a lot
of my own scripts.

I am under the impression that the author of Turck is now employed by
Zend, so I doubt that he will continue the project as it is in direct
competition with Zend's own commercial accelerator.

I spoke with one of the programmers behind APC a week or two ago, and
he suggested that it would be PHP 5 ready within a few weeks.


paul



On Mon, 08 Nov 2004 11:49:55 -0700, Adrian Madrid
<[EMAIL PROTECTED]> wrote:
> Klaus Reimer wrote:
> 
> 
> 
> > raditha dissanayake wrote:
> >
> >> this one:
> >>
> >>> - Turck MMCache for PHP
> >>
> >
> > Turck MM Cache does not work with PHP 5. It's possible to compile and
> > load it and some pages are working but most of the time it segfaults.
> >
> > By the way: Does anybody know if the Turck MM Cache project is still
> > active? The last change in CVS is 5 months old, the last release is
> > nearly a year old. And there were rumors that the main developer was
> > assimilated by Zend.
> 
> I've been running Turck for some time now on PHP5 and haven't had
> segfault problems yet. I must say I'm running the latest CVS and using
> file sessions (Turck's would give you segfaults). About new developments
> there's been a lot of talk in the forums but so far only one person
> mentioned having done changes int he code. The original developers have
> not answered the call so far so we would have to hope for somebody else
> to step up.
> 
> --
> Adrian Madrid
> HyperX Inc.
> Mobile: 801.815.1870
> Office: 801.566.0670
> [EMAIL PROTECTED]
> www.hyperxmedia.com
> 
> 9000 S. 45 W.
> Sandy, UT 84070
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Paul Reinheimer
Zend Certified Engineer

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



Re: [PHP] DATE()

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 13:06:41 -0500, Aaron Todd <[EMAIL PROTECTED]> wrote:
> Is there any way yo get the date and time using date() from a Internet time
> server?

php -r "system('ntpdate -q ntp.nasa.gov');"


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Re: Variable for search results

2004-11-08 Thread Ben Ramsey
Stuart Felenstein wrote:
--- Ben Ramsey <[EMAIL PROTECTED]> wrote:
I'm not exactly sure what the SQL statement you have
above is supposed 
to do, but you could just do something like this:

$curdate = date('Y-m-d H:i:s');
$sql = "SELECT * FROM records WHERE '$curdate' <=
PostStart;";
I'm having some problems still.  I'm trying to work
here with a Dreamweaver extension and the code is not
clear.  Are there are good tutorials around , to learn
how to create a database search and results page.
Basically there would be about 6 form elements, some
list boxes, some text fields.  The more criteria that
is filled in on the form the more refined the search.
Not sure if this is beyond my skill level or not. 
Beginner. 
While you may be a beginner and this may be beyond your current skill 
level, I think it's an excellent exercise for you to learn how to work 
with both PHP and a SQL database. So, turn to both the PHP manual 
 and some manual on SQL syntax (use the 
manual for the database you're using).

It appears to me that you're relying on Dreamweaver (or the DW 
extension) to write the code for you, and my advice to you is: don't let 
Dreamweaver write the code for you; you'll never learn anything that 
way. Instead, take this as an opportunity to learn how to code in PHP 
and to learn how to write SQL queries on your own.

First off, I'm not sure what database you're working from, so it would 
help to know that, but I did a quick Google search on "php search 
tutorial" and found a good many links to tutorials that might help.

Here's one in particular that may do the job 


Hope that gets you started.
--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com
---
Atlanta PHP - http://www.atlphp.org/
The Southeast's premier PHP community.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: New/changing subject... was [PHP] Re: PEAR mail

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 12:08:30 -0500 (EST), Jim Wharton
<[EMAIL PROTECTED]> wrote:
> I'm truly sorry about that. What's even more frustrating is making a
> simple mistake and having a bunch of people jump down your throat about
> it. Point taken. Apology offered.

I just pretend like I'm posting to vger.kernel.org.. seems to keep
most people from yelling at me too much.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] User's language settings

2004-11-08 Thread Dmitri Pissarenko
Hello!
I have a web-site, part of which is in Russian and another part in English.
English and Russian parts are located in different directories. The 
web-site is static.

I want to create a PHP file, which redirects the user from /index.php to 
/ru/index.html, when his primary language is Russian and to 
/en/index.html, when his primary language is non-Russian.

In other words:

if ($languageRussian)
{
header("Location: http://dapissarenko.com/ru/index.html";);
}
else
{
header("Location: http://dapissarenko.com/en/index.html";);
}
exit;
?>
How can I determine user's primary language?
Thanks!
dap
--
Dmitri Pissarenko
Software Engineer
http://dapissarenko.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] apache 2, mysql 5.0.1.rpm and php 5.0.2 on RH9

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 07:19:30 +0500, Haseeb Iqbal <[EMAIL PROTECTED]> wrote:
> /usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9d0): first defined here
> collect2: ld returned 1 exit status
> make: *** [libphp5.la] Error 1

Does /usr/lib/mysql/libmysqlclient.a actually exist?  After you
installed MySQL from rpms, did you run ldconfig?


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] upload via FTP

2004-11-08 Thread Alessandro Rosa
Dear all subscribers,

I'm coding a send-mail form, also including
edit boxes keeping the path of files to be uploaded
from the remote host onto an FTP server.

Is there the possibility (and if so, which ones) to
manage FTP permissions to have a file including
the variable with ID and PSW (for FTP access)
and which is usable
by the code running on the server exclusively but
cannot be accessed by any other user?

Alessandro


[PHP] Why cookie is created?

2004-11-08 Thread Jerry Swanson
I don't use cookie for my page. I use session. As I understand cookies
don't create any files on user  computer. I have this code below on my
page.
When I access this page immediately cookie is created on my computer.
Any ideas why?




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



Re: [PHP] images doesn't seem to cache

2004-11-08 Thread Marek Kilimajer
anders thoresson wrote:
 This code seems to work. Have I got it right?

 No. I have not. Sometimes the images are viewed from the cache, just to 
get downloaded from the server again next time, just a minute later, 
when I try again.

 My local development server is running IIS, my production server is 
running Apache. Where is the best place to look for If-Modified-Since? 
Is $_GET['If-Modified-Since'] a safe bet?
No, it's a http header, not a get parameter. I'm not sure if this header 
is made available under IIS. Under apache you could use 
apache_request_headers().

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


RE: [PHP] Why cookie is created?

2004-11-08 Thread Jay Blanchard
[snip]
...SESSION...
[/snip]

Because the use of sessions creates cookiesbut you can set it up
where it will not...

http://www.php.net/session

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



Re: [PHP] Why cookie is created?

2004-11-08 Thread John Nichel
Jerry Swanson wrote:
I don't use cookie for my page. I use session. As I understand cookies
don't create any files on user  computer. I have this code below on my
page.
When I access this page immediately cookie is created on my computer.
Any ideas why?
As soon as you call session_start(), you are 'given' a session id.  To 
track this id from page to page throughout you site, it is stored in a 
cookie by default.  It's all in the manual...

http://us4.php.net/session
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: User's language settings

2004-11-08 Thread Daniel Schierbeck
Dmitri Pissarenko wrote:
Hello!
I have a web-site, part of which is in Russian and another part in English.
English and Russian parts are located in different directories. The 
web-site is static.

I want to create a PHP file, which redirects the user from /index.php to 
/ru/index.html, when his primary language is Russian and to 
/en/index.html, when his primary language is non-Russian.

In other words:

if ($languageRussian)
{
header("Location: http://dapissarenko.com/ru/index.html";);
}
else
{
header("Location: http://dapissarenko.com/en/index.html";);
}
exit;
?>
How can I determine user's primary language?
Thanks!
dap
I don't think it's possible. You can, however, ask the user to select 
which language he wishes to see, then store that option in a cookie so 
he doesn't have to do it every time he visits the site.

--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

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


Re: [PHP] Drawing polygons from traverse information

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 11:36:39 -0500 (EST), Jim Wharton
<[EMAIL PROTECTED]> wrote:
> What I am trying to do is implement something along the lines of LOGO.
> (You know, that old language that told a robotic turtle to draw on the
> floor)

Man.. it was like 1987 when I last used LOGO.  We were using Apple
IIc's and stuff.  The nostalgia is overwhelming.  :)

> Seriously, I currently have an inherited Java program that takes traverse
> information (strings that look like this: BAS(L66D24R66U24)) and createds
> this: Left:66 Down:24 Right: 66 Up:24 and draws it out to the screen.

This sort of string parsing could be handled with preg_match_all().


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Trying to Integrate PHP 4.3.4 w/ JDK 1.5.0

2004-11-08 Thread Jost Boekemeier
[resent, this time with the correct subject, sorry]

> I have tried to compile "php-java-bridge" v1.0.5.
> /opt/php/php-4.3.9/php-java-
> bridge_1.0.5/server/natcJavaBridge.c:202:
> too many arguments to function `sigwait'

Solaris has a non-standard sigwait() function.  It
requires a special flag to archive POSIX compatibility
(see man page).  Another Solaris problem is that stdio
is broken; you cannot use stdio buffering for
non-seekable streams. 

Version 1.0.6a of the PHP/Java Bridge solves both
problems.  I have tested on a Sparc64 system with
Solaris 9.

-->
http://prdownloads.sourceforge.net/php-java-bridge/php-java-bridge_1.0.6a.tar.bz2?download


> compile the standard java extension in "ext/java"

Even if you succeed to compile the bridge, this will
not help you to solve the problem on Unix.  The
"standard" java extension does not work on Unix with
the default (prefork) Apache because of its design.  

On Unix it is necessary to separate the JVM from the
apache request handling processes.  Either by running
a servlet engine or via the php/java bridge.


Jost







___
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: 
http://mail.yahoo.de

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



Re: [PHP] User's language settings

2004-11-08 Thread Marek Kilimajer
Dmitri Pissarenko wrote:
Hello!
I have a web-site, part of which is in Russian and another part in English.
English and Russian parts are located in different directories. The 
web-site is static.

I want to create a PHP file, which redirects the user from /index.php to 
/ru/index.html, when his primary language is Russian and to 
/en/index.html, when his primary language is non-Russian.

In other words:

if ($languageRussian)
{
header("Location: http://dapissarenko.com/ru/index.html";);
}
else
{
header("Location: http://dapissarenko.com/en/index.html";);
}
exit;
?>
How can I determine user's primary language?
Thanks!
dap
$_SERVER["HTTP_ACCEPT_LANGUAGE"] - string with user's language 
preferences. However only a fraction of users willingly set it, so many 
times it will be on its default value, english even for russian speaking 
visitors.

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


Re: [PHP] Why cookie is created?

2004-11-08 Thread Jerry Swanson
; Whether to use cookies.
session.use_cookies = 0

; This option enables administrators to make their users invulnerable to 
; attacks which involve passing session ids in URLs; defaults to 0.
session.use_only_cookies = 1

I changed the global variables on PHP. It still stores cookies on my
harddrive. Any ideas why?
PHP version 4.3.4




On Mon, 08 Nov 2004 16:01:27 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> Jerry Swanson wrote:
> > I don't use cookie for my page. I use session. As I understand cookies
> > don't create any files on user  computer. I have this code below on my
> > page.
> > When I access this page immediately cookie is created on my computer.
> > Any ideas why?
> 
> As soon as you call session_start(), you are 'given' a session id.  To
> track this id from page to page throughout you site, it is stored in a
> cookie by default.  It's all in the manual...
> 
> http://us4.php.net/session
> 
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] Why cookie is created?

2004-11-08 Thread John Nichel
Jerry Swanson wrote:
; Whether to use cookies.
session.use_cookies = 0
; This option enables administrators to make their users invulnerable to 
; attacks which involve passing session ids in URLs; defaults to 0.
session.use_only_cookies = 1

I changed the global variables on PHP. It still stores cookies on my
harddrive. Any ideas why?
PHP version 4.3.4
You're telling to not use cookies, then telling it to only use cookies?
Anywho, did you restart your webserver?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why cookie is created?

2004-11-08 Thread Marek Kilimajer
Jerry Swanson wrote:
; Whether to use cookies.
session.use_cookies = 0
; This option enables administrators to make their users invulnerable to 
; attacks which involve passing session ids in URLs; defaults to 0.
session.use_only_cookies = 1
These settings don't make much sense. You forbid their usage and require 
it at the same time.

I changed the global variables on PHP. It still stores cookies on my
harddrive. Any ideas why?
PHP version 4.3.4

On Mon, 08 Nov 2004 16:01:27 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
Jerry Swanson wrote:
I don't use cookie for my page. I use session. As I understand cookies
don't create any files on user  computer. I have this code below on my
page.
When I access this page immediately cookie is created on my computer.
Any ideas why?
As soon as you call session_start(), you are 'given' a session id.  To
track this id from page to page throughout you site, it is stored in a
cookie by default.  It's all in the manual...
http://us4.php.net/session
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Auto Form Fill on option select

2004-11-08 Thread GH
prado? Hunh?


On Sun, 7 Nov 2004 14:56:36 -0600 (CST), Jonel Rienton <[EMAIL PROTECTED]> 
wrote:
> This can be done with javascript or you can use an  event-driven solution
> like PRADO
> 
> 
> 
> > Hi all,
> > I have a question that I can't get my head around and was hoping
> > someone
> > could answer for me.
> >
> > I have a form with a number of fields.
> >
> > Field one is a 
> > The option fields are built from an sql statement and a where clause
> > builds the options fields
> > ...
> >  > $teamname;
> > ?>
> > 
> > etc...
> >
> > When I select one of the options, the form automatically goes off and
> > does another sql select a with the WHERE value of the selected
> > $teamname,  and then populates the next field, but I can't think how.
> >
> > Any pointers?
> >
> > TIA
> > K
> 
> 
> --
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] User's language settings

2004-11-08 Thread Daniel Schierbeck
Marek Kilimajer wrote:
Dmitri Pissarenko wrote:
Hello!
I have a web-site, part of which is in Russian and another part in 
English.

English and Russian parts are located in different directories. The 
web-site is static.

I want to create a PHP file, which redirects the user from /index.php 
to /ru/index.html, when his primary language is Russian and to 
/en/index.html, when his primary language is non-Russian.

In other words:

if ($languageRussian)
{
header("Location: http://dapissarenko.com/ru/index.html";);
}
else
{
header("Location: http://dapissarenko.com/en/index.html";);
}
exit;
?>
How can I determine user's primary language?
Thanks!
dap

$_SERVER["HTTP_ACCEPT_LANGUAGE"] - string with user's language 
preferences. However only a fraction of users willingly set it, so many 
times it will be on its default value, english even for russian speaking 
visitors.
Yup. I think it's better if you let the visitors decide.
--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

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


Re: [PHP] Why cookie is created?

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 15:56:03 -0500, Jerry Swanson <[EMAIL PROTECTED]> wrote:
> I don't use cookie for my page. I use session. As I understand cookies
> don't create any files on user  computer. 

Your understanding is incorrect.  Using cookies does indeed place
files on the user's computer.  That's what a cookie is, a file on the
user's computer, created by the web client.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Why cookie is created?

2004-11-08 Thread Jerry Swanson
I don't want to use cookies.
I want to use session. When I use this code. It stores data on the harddrive.

session_start();
$referral = $_SESSION['referral'];
if(empty($referral)) {
$referral = $_SERVER['QUERY_STRING'];
$_SESSION['referral'] = $referral;
}


On Mon, 8 Nov 2004 16:19:49 -0600, Greg Donald <[EMAIL PROTECTED]> wrote:
> On Mon, 8 Nov 2004 15:56:03 -0500, Jerry Swanson <[EMAIL PROTECTED]> wrote:
> > I don't use cookie for my page. I use session. As I understand cookies
> > don't create any files on user  computer.
> 
> Your understanding is incorrect.  Using cookies does indeed place
> files on the user's computer.  That's what a cookie is, a file on the
> user's computer, created by the web client.
> 
> --
> Greg Donald
> Zend Certified Engineer
> http://gdconsultants.com/
> http://destiney.com/
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

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



Re: [PHP] Why cookie is created?

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 17:31:33 -0500, Jerry Swanson <[EMAIL PROTECTED]> wrote:
> I don't want to use cookies.
> I want to use session. When I use this code. It stores data on the harddrive.

You must have your PHP sessions configured to use cookies.

ini_set('session.use_cookies', 0);

will override the php.ini setting. 


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] Why cookie is created?

2004-11-08 Thread Paul Reinheimer
 --
 I don't want to use cookies.
 I want to use session. When I use this code. It stores data on the harddrive.
 --
 
 When you use Sessions, the data you put in the session is NOT stored
 on the users hard drive in a cookie. Only the Session ID is stored
 there. All of the other information you store in the session (say
 their userid, name, prefernces, security level, etc) is stored on the
 SERVER. The session ID stored in the cookie only serves as a pointer
 to the data stored on your server.
 
 The alternative to allowing PHP to store the users session id in a
 cookie is to have php re-write all of the urls on your page to include
 their session id. Generally this is not the preferred solution for
 several reasons:
 1. URLs look a lot messier eg:
 a) without cookies
 http://forum.example.com/index.php?sid=a568a4c022a2f8491323c5f3ef5888d8
 b) with cookies
 http://forum.edonkey.com/index.php
 2. Users may accidentally give away their session id, and possibly
 open the door to session hijacking.
 3. Users bookmark pages with stale session ids
 
 So, in summary. Using sessions only stores the session id on the users
 hard drive. The rest of the data stored in the session is saved on the
 server.
 
 paul
 
 --
 Paul Reinheimer

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



[PHP] Arrays

2004-11-08 Thread Ben
I hope this is not a stupid question, but I am learning how to work with 
Arrays, and am having trouble figuring out how to move array values from 
page to page and/or store in a db.  Once again, I am new to arrays (and 
fairly new to PHP for that matter), so please don't get too technical in 
replies.  Thanks so much for help.

ben 

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



RE: [PHP] Arrays

2004-11-08 Thread Ben Miller
edit


I hope this is not a stupid question, but I am learning how to work with
Arrays, and am having trouble figuring out how to move array values [the
whole array and all of it's values] from
page to page and/or store in a db.  Once again, I am new to arrays (and
fairly new to PHP for that matter), so please don't get too technical in
replies.  Thanks so much for help.

ben

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

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



Re: [PHP] Arrays

2004-11-08 Thread Greg Donald
On Mon, 8 Nov 2004 16:01:16 -0700, Ben <[EMAIL PROTECTED]> wrote:
> I hope this is not a stupid question, but I am learning how to work with
> Arrays, and am having trouble figuring out how to move array values from
> page to page and/or store in a db.  Once again, I am new to arrays (and
> fairly new to PHP for that matter), so please don't get too technical in
> replies.  Thanks so much for help.

Where is you (broken) PHP code that you have written so far?

What is it not doing that you are expecting it to do?


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] User's language settings

2004-11-08 Thread Skippy
On Mon, 08 Nov 2004 22:37:41 +0100 Marek Kilimajer <[EMAIL PROTECTED]>
wrote:
>> How can I determine user's primary language?
>
> $_SERVER["HTTP_ACCEPT_LANGUAGE"] - string with user's language 
> preferences. However only a fraction of users willingly set it, so many 
> times it will be on its default value, english even for russian speaking 
> visitors.

Perhaps try to advertise it somewhere on your site, how to set it in
various browsers. People will use this once they realise the setting is
there. It's very nice to go to a website without doing anything special and
be greeted by your mother tongue. Once they experience this they will like
it.

HTTP_ACCEPT_LANGUAGE will look like this: ro,en-us;q=0.7,en;q=0.3
Comma is the main delimiter, separating languages. The "q" signifies
precedence among similar languages, such as en-us vs en. Otherwise, the
order in which the languages were given sets precedence.


-- 
Skippy - Romanian Web Developers - http://ROWD.ORG

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



Re: [PHP] upload via FTP

2004-11-08 Thread raditha dissanayake
Alessandro Rosa wrote:
Dear all subscribers,
I'm coding a send-mail form, also including
edit boxes keeping the path of files to be uploaded
from the remote host onto an FTP server.
Is there the possibility (and if so, which ones) to
manage FTP permissions to have a file including
the variable with ID and PSW (for FTP access)
and which is usable
by the code running on the server exclusively but
cannot be accessed by any other user?
Alessandro
 

Your question is not very clear. Do you mean to say you only want your 
FTP server to be accessible by your php scripts? If so the trick is to 
listen only on localhost and not on the public ip.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Fping problem

2004-11-08 Thread mwestern
Hi All,

I have written a simple page that uses fping and was working perfectly just
shelling out to it using the backtick.

The server it was on crapped out and I'm trying to get it going again on our
new server.I have installed fping, given permissions to everyone to run
it and copied it to the places where it was before.   /usr/local/bin   /bin
/sbin

And it will not return the input I give it.

Anybody in the house got an ideas?   Idiot me didn't document what I did to
get it going in the first place...

Thanks
Matthew



[PHP] Meta refresh best answer ??

2004-11-08 Thread Michael Gale
Hello,
	I am working on a site where people will be updating information in a 
database and should have up to date info. Now since HTTP is stateless 
the user will not know about any new information until they click on a 
link or hit a button on the page.

My question is -- if I want to keep a user up to date about changes to 
any information they might want to know would it be best to create a 
hidden frame of some sort which does a mete-refresh to a page looking 
for updates, and if found display a java popup window with a small FYI ?

If so would a meta-refresh of 3-5 seconds be to aggressive ? What about 
server load ?

Is there a better way ?
Hope I was clear, thanks.
Michael.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Arrays

2004-11-08 Thread Zareef Ahmed

Hi Ben,

 Welcome to the wonderful world of PHP.

Working with array in PHP is very easy. A large number of functions are
there.
Please visit the manual
http://www.phpcertification.com/manual.php/ref.array.html

You can move values ( including Arrays) from page to page in session
variables.

But you need to do serialize and unserialize in case of array or object.


Do ::

$val_ar=array("one","two","three");
$_SESSION['val_ar_store']=serialize($val_ar);

Now you can get your array in any page simply

$val_ar=unserialize($_SESSION['val_ar_store']);
Print_r($val_ar);

This process is very simple. Please see manual

http://www.phpcertification.com/manual.php/function.serialize.html

http://www.phpcertification.com/manual.php/function.unserialize.html

Revert back with any other problem.

Zareef ahmed 



-Original Message-
From: Ben [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 09, 2004 4:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Arrays


I hope this is not a stupid question, but I am learning how to work with

Arrays, and am having trouble figuring out how to move array values from

page to page and/or store in a db.  Once again, I am new to arrays (and 
fairly new to PHP for that matter), so please don't get too technical in

replies.  Thanks so much for help.

ben 


--
Zareef Ahmed :: A PHP develoepr in Delhi ( India )
Homepage :: http://www.zasaifi.com

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



Re: [PHP] Syntax Limitation - dynamic static member access

2004-11-08 Thread Jake Press
Hi all,
Just to let everyone know - I've reported this as a bug.
http://bugs.php.net/bug.php?id=30716
Fingers crossed :)

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


RE: [PHP] Re: User's language settings

2004-11-08 Thread Zareef Ahmed
Hi,
  You may try a ip locator and then guess for users country.
IN this way you can design your programme to treat users from Russia to
Russian language etc.

Visit 
http://zareef.users.phpclasses.org/browse/package/1477.html 

Zareef Ahmed 


-Original Message-
From: Daniel Schierbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 09, 2004 1:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: User's language settings


Dmitri Pissarenko wrote:
> Hello!
> 
> I have a web-site, part of which is in Russian and another part in 
> English.
> 
> English and Russian parts are located in different directories. The
> web-site is static.
> 
> I want to create a PHP file, which redirects the user from /index.php 
> to
> /ru/index.html, when his primary language is Russian and to 
> /en/index.html, when his primary language is non-Russian.
> 
> In other words:
> 
>  
> if ($languageRussian)
> {
> header("Location: http://dapissarenko.com/ru/index.html";);
> }
> else
> {
> header("Location: http://dapissarenko.com/en/index.html";);
> }
> 
> exit;
> ?>
> 
> How can I determine user's primary language?
> 
> Thanks!
> 
> dap
I don't think it's possible. You can, however, ask the user to select 
which language he wishes to see, then store that option in a cookie so 
he doesn't have to do it every time he visits the site.


-- 
Daniel Schierbeck

Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

-- 

--
Zareef Ahmed :: A PHP develoepr in Delhi ( India )
Homepage :: http://www.zasaifi.com

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



Re: [PHP] Arrays

2004-11-08 Thread Ligaya Turmelle
There are a couple of ways to pass arrays (and their values) between 
pages.  I personally would put the array into a session variable 
($_SESSION - see reference) and access the various parts as needed. 
Another option is sending the whole array or it's parts as hidden fields 
in a form (access with the $_GET and $_POST - again see reference), but 
that means the user has to click a submit button.

If you are trying to store the array in a Database I would suggest you 
make each element of the array into it's own column of the database. 
Databases generally should only have 1 piece of information being saved 
per cell (think excel).  If you would like a link to database design, 
let me know and I will send it.

If all you really were asking was how to iterate through an array - then 
 I would recommend looking at the manual's page on arrays ( 
http://www.php.net/manual/en/language.types.array.php ).

Respectfully,
Ligaya Turmelle
References:
http://www.php.net/language.variables.predefined
Ben wrote:
I hope this is not a stupid question, but I am learning how to work with 
Arrays, and am having trouble figuring out how to move array values from 
page to page and/or store in a db.  Once again, I am new to arrays (and 
fairly new to PHP for that matter), so please don't get too technical in 
replies.  Thanks so much for help.

ben 


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

RE: [PHP] Arrays

2004-11-08 Thread Ben Miller
Thank you to all for help with this.  Once I have a general idea of which
path to head down, I can figure it out pretty well from there, and you have
all given me a pretty good road map.  Anyway, thanks again.  It is greatly
appreciated.  I'll let you know hot it all comes out.

Ben

-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
Sent: Monday, November 08, 2004 10:03 PM
To: Ben
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Arrays


There are a couple of ways to pass arrays (and their values) between
pages.  I personally would put the array into a session variable
($_SESSION - see reference) and access the various parts as needed.
Another option is sending the whole array or it's parts as hidden fields
in a form (access with the $_GET and $_POST - again see reference), but
that means the user has to click a submit button.

If you are trying to store the array in a Database I would suggest you
make each element of the array into it's own column of the database.
Databases generally should only have 1 piece of information being saved
per cell (think excel).  If you would like a link to database design,
let me know and I will send it.

If all you really were asking was how to iterate through an array - then
  I would recommend looking at the manual's page on arrays (
http://www.php.net/manual/en/language.types.array.php ).

Respectfully,
Ligaya Turmelle

References:
http://www.php.net/language.variables.predefined

Ben wrote:
> I hope this is not a stupid question, but I am learning how to work with
> Arrays, and am having trouble figuring out how to move array values from
> page to page and/or store in a db.  Once again, I am new to arrays (and
> fairly new to PHP for that matter), so please don't get too technical in
> replies.  Thanks so much for help.
>
> ben
>

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



Re: [PHP] Meta refresh best answer ??

2004-11-08 Thread Michael Gale
Hello,
	I really wanted to know if there was a better way to do this using PHP 
? That is why I e-mailed the list.

Michael.

Michael Gale wrote:
Hello,
I am working on a site where people will be updating information in 
a database and should have up to date info. Now since HTTP is stateless 
the user will not know about any new information until they click on a 
link or hit a button on the page.

My question is -- if I want to keep a user up to date about changes to 
any information they might want to know would it be best to create a 
hidden frame of some sort which does a mete-refresh to a page looking 
for updates, and if found display a java popup window with a small FYI ?

If so would a meta-refresh of 3-5 seconds be to aggressive ? What about 
server load ?

Is there a better way ?
Hope I was clear, thanks.
Michael.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php