[PHP] remote desktop control

2002-10-01 Thread Rahul

Hello all,
  
   Is it possible to implement Web Based Remote Desktop Control using PHP or anyother 
webbased language? 
Aim is to share the remote(visitor's) system(desktop).
If possible, plz let me know how to proceed.


Advance thanks,
-sadha



RE: [PHP] remote desktop control

2002-10-01 Thread Smith, Benjamin

Not really, no. It goes well beyond the capabilities of a server-side scripting 
language.

There is a java implementation in VNC that allows this capability, though.

-Original Message-
From: Rahul [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 1 October 2002 4:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] remote desktop control


Hello all,
  
   Is it possible to implement Web Based Remote Desktop Control using PHP or anyother 
webbased language? 
Aim is to share the remote(visitor's) system(desktop).
If possible, plz let me know how to proceed.


Advance thanks,
-sadha

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




[PHP] Re: PHP Include Help

2002-10-01 Thread Erwin

 On line 6, I have the list of musicians in the song.
 Example (ignore the quotes): Doyle Lawson -- lead vocal; Dale Perry -
 - bass vocal
 Is there a way to make it so that, when I include line 6 in my PHP
 template, the ; will be replaced with a line break so I get one
 musician per line in the HTML output?

You could use str_replace on the line you've just read...
http://www.php.net/str_replace

 Lines 7 and so on are the lyrics. The text file has one line per line
 (makes sense, right?) and a blank line between sections of the song.
 I have the script set up to read all the lines from 7 on, but it
 jumbles them all together, ignoring the line breaks. Is there a way
 to script PHP to add the line breaks, or should the line break HTML
 just be inserted everywhere needed in all my separate files?

Use nl2br: http://www.php.net/nl2br
This function replaces all \n (newlines) with BR\n (HTML break with
newline)

HTH
Erwin


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




[PHP] conditional statement problems

2002-10-01 Thread Pablo Oliva

$title_err = ($adTitle == ) ? 1 : strlen($adTitle)  50 ? 2 : 0;

Can anyone tell me why this is not evaluating correctly (returning a
value of 1) when $adTitle is an empty string?


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




Re: [PHP] conditional statement problems

2002-10-01 Thread Tom Rogers

Hi,

Tuesday, October 1, 2002, 5:11:08 PM, you wrote:
PO $title_err = ($adTitle == ) ? 1 : strlen($adTitle)  50 ? 2 : 0;

PO Can anyone tell me why this is not evaluating correctly (returning a
PO value of 1) when $adTitle is an empty string?


It is right according to your expression, try  ($adTitle != )

-- 
regards,
Tom


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




Re: [PHP] conditional statement problems

2002-10-01 Thread René Moonen

Pablo Oliva wrote:

$title_err = ($adTitle == ) ? 1 : strlen($adTitle)  50 ? 2 : 0;

Can anyone tell me why this is not evaluating correctly (returning a
value of 1) when $adTitle is an empty string?


  

I have no idea... but if you change your code to this, it works:

$title_err = ($adTitle == ) ? 1 : (strlen($adTitle)  50 ? 2 : 0);

Does anyone know why ?



René




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




Re: [PHP] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread Chris Hewitt

James Mackie wrote:

On most of my servers that are running 4.2.2 (and before) I used
'killall -USR1 httpd' to reload my apache config. Now all servers that I
install with 4.2.3 instead of 4.2.2 this shuts down apache instead of
reloading the config files. (-HUP still works as it should). 

Base server is RH7.3, Apache and PHP are compiled from source, staticly,
not as modules.

I don't know why the USR1 signal appears to have changed, but on RH the 
nice way of restarting apache is service httpd restart. Does this work?

HTH
Chris


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




Re: [PHP] conditional statement problems

2002-10-01 Thread René Moonen

René Moonen wrote:

 Pablo Oliva wrote:

 $title_err = ($adTitle == ) ? 1 : strlen($adTitle)  50 ? 2 : 0;

 Can anyone tell me why this is not evaluating correctly (returning a
 value of 1) when $adTitle is an empty string?


  

 I have no idea... but if you change your code to this, it works:

 $title_err = ($adTitle == ) ? 1 : (strlen($adTitle)  50 ? 2 : 0);

 Does anyone know why ?



 René




Yes... that's it. Your statement is probably evaluated like this:

$title_err = ( ($adTitle == ) ? 1 : strlen($adTitle)  50 ) ? 2 : 0;

The first ?: returns 1 so the second ?: will return 2


Regards


René



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




[PHP] imap problems

2002-10-01 Thread Chris Woollard




I am getting the following  when i try to connect to an imap server with PHP
4.1.2
whatever i run gives this message when i try to connect to the imap
server( i.e. i try connecting with IMP and a completely different webmail
program)

-
server=localhost user=cmw mailbox={localhost:143}INBOX

Warning: Couldn't open stream {localhost:143}INBOX in
/var/www/html/horde/imp/test.php on line 157

PHP is configured as follows

 './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext'
'--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-mm' '--with-openssl' '--with-png' '--with-pspell'
'--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared'
'--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr'
'--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mbstring' '--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs'





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




[PHP] Thanks!

2002-10-01 Thread Rick Beckman

Thanks, Erwin!

-- 
Kyrie Eleison,
Rick
www.spiritsword.com/phpBB2/


Erwin wrote:
 On line 6, I have the list of musicians in the song.
 Example (ignore the quotes): Doyle Lawson -- lead vocal; Dale Perry
 -
 - bass vocal
 Is there a way to make it so that, when I include line 6 in my PHP
 template, the ; will be replaced with a line break so I get one
 musician per line in the HTML output?

 You could use str_replace on the line you've just read...
 http://www.php.net/str_replace

 Lines 7 and so on are the lyrics. The text file has one line per line
 (makes sense, right?) and a blank line between sections of the song.
 I have the script set up to read all the lines from 7 on, but it
 jumbles them all together, ignoring the line breaks. Is there a way
 to script PHP to add the line breaks, or should the line break HTML
 just be inserted everywhere needed in all my separate files?

 Use nl2br: http://www.php.net/nl2br
 This function replaces all \n (newlines) with BR\n (HTML break
 with newline)

 HTH
 Erwin



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




[PHP] IMAP Failing to connect

2002-10-01 Thread Chris Woollard




I am getting the following  when i try to connect to an imap server with PHP
4.1.2
whatever i run gives this message when i try to connect to the imap
server( i.e. i try connecting with IMP and a completely different webmail
program)

-
server=localhost user=cmw mailbox={localhost:143}INBOX

Warning: Couldn't open stream {localhost:143}INBOX in
/var/www/html/horde/imp/test.php on line 157

PHP is configured as follows

 './configure' 'i386-redhat-linux' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--prefix=/usr' '--with-config-file-path=/etc'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3'
'--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd'
'--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext'
'--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-mm' '--with-openssl' '--with-png' '--with-pspell'
'--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib'
'--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif'
'--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid'
'--enable-yp' '--enable-wddx' '--without-oci8' '--with-imap=shared'
'--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared'
'--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr'
'--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared'
'--enable-memory-limit' '--enable-bcmath' '--enable-shmop'
'--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio'
'--enable-mbstring' '--enable-mbstr-enc-trans' '--with-apxs=/usr/sbin/apxs'




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




Re: [PHP] mail headers mail filtering

2002-10-01 Thread debbie_dyer

Hi Tom

I did finally get my mails on this account (my personal mailbox) hours later
but my main problem is with mails sent by scripts on my site (using the
mailserver of my web provider) and other people complaining to me that they
dont get mails sent from their websites to their ISP mailboxes (using my
scripts).

More and more legitimate mails are being trashed as a result of
anti-spamming systems - read around the IT news. Whether it is illegal or
not I don't know but yesterday I cancelled my account with my ISP because
they refuse to answer my questions re if they have a mail filtering policy
and if they do what is it.

Debbie

- Original Message -
From: Tom Rogers [EMAIL PROTECTED]
To: debbie_dyer [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 2:13 AM
Subject: Re: [PHP] mail headers  mail filtering


 Hi,

 Tuesday, October 1, 2002, 12:09:06 AM, you wrote:
 d More and more emails seem to be getting blocked by mail filtering
systems looking for spam (but trashing legitimate mail at the same time).
Does anyone have any tips for ensuring mails get through
 d these systems (with regard to headers) or do we just have to accept now
that email can no longer be relied upon as a means of communication?

 d Debbie

 This one arrived ok to the list. If the isp is interfering with
 legitimate mail then they are probably infringing some law or other :)

 --
 regards,
 Tom



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




Re: [PHP] Multiple Tables Select

2002-10-01 Thread Chris Hewitt

Bob Irwin wrote:



What I am getting is not accurated, it just seems to grab the one entry,
which is correct, but there are 3 entries that fall within the range I am
trying to select on.

What are the other two records you think ought to be returned? I feel 
the sql statement probably gets the correct number of records, but 
possibly you are not seeing why the others do not match.

Alternatively, the code is only getting the first row and not the rest 
(show code that loops round all records)?

HTH
Chris




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




Re: [PHP] remote desktop control

2002-10-01 Thread Rahul

Hello Smith,

 Thanks for your reply. Do you have any idea in implementing same with any
other language?
But VNC and all needs download  process to use (control remote desktop).
I'm asking abt web based(anywhere control- no need to download and install).

if you have any idea in doing this, plz tell me.

thanks a lot,
-sadha

From: Smith, Benjamin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 12:14 PM
Subject: RE: [PHP] remote desktop control


Not really, no. It goes well beyond the capabilities of a server-side
scripting language.

There is a java implementation in VNC that allows this capability, though.


Hello all,

   Is it possible to implement Web Based Remote Desktop Control using PHP or
anyother webbased language?
Aim is to share the remote(visitor's) system(desktop).
If possible, plz let me know how to proceed.


Advance thanks,
-sadha

--
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] Install php under some other drive

2002-10-01 Thread Uma Shankari T.


Hello,

  I am trying to install php under some other drive like d: or e: ..it was 
installed properly without telling any error...but i couldn't run even the 
testing program ( ? phpinfo(); ? )

I have mentioned in the php.ini and apache conf file with d: where ever i 
have mentioned c: ..but it not coming..Can anyone please tell me other 
than this any settings to be made ??

Regards,
Uma


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




Re: [PHP] Re: mail headers filtering

2002-10-01 Thread Debbie Dyer

Hi Chris

They are having the problem receiving the mail sent by the script not
sending.
They go to my site and generate a form mailer using their email ad
They upload it to their webserver
Then they email me saying that they are testing the mailer out on their site
and it seems to work but they never receive the email that it sends
Always when I test the scripts (with my email ad) there is nothing wrong
with it and I receive the mail

So I don't know what to tell them apart from it must be filtering, nor do I
know how to attempt to fix the problem. Maybe this problem of 'lost mail' is
more noticeable to me because a few hundred a week use this generator so we
are talking about running these scripts on a lot of different websites using
a lot of different mailservers/mailboxes.

From now on when I get these complaints I will ask them for the name of the
mailserver that sends the mail - maybe then I can get back to you for some
tests.

Thanks
Debbie


- Original Message -
From: Chris Hewitt [EMAIL PROTECTED]
To: Debbie Dyer [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 8:48 AM
Subject: Re: [PHP] Re: mail headers  filtering


 Debbie Dyer wrote:

 I was talking about my second prob..
 
 Debbie,

 I had not read your post well enough. Yes, if customers are sometimes
 having a similar problem when they are sending email then it could be
 their domain is not in dns.

 If I can help in a test, perhaps forwarding an email from you to an
 address you can't get through to directly, I'm happy to help. It will
 aid checking whether dns is the issue.

 I've only ever had one refusal to recieve email (except when the user no
 longer has the account) and that was when I sent an attachment that was
 a windows executable (.exe) file. Changing the extension to .zip and
 it went through. Not having had the problem, I disagree with you
 statement that email seems unreliable these days. So there must be
 something different with the setups we have that accounts for it. DNS is
 the only difference I can think of.

 Regards

 Chris
 PS I'm  not on-line all the time, I pick up email every hour or two.





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




Re: [PHP] GZip

2002-10-01 Thread Marek Kilimajer

Depends on your connection and CPU speed, slow connection - higher 
compression, slow CPU - lower compression, and vice versa

Jay wrote:

I have the output_handler = ob_gzhandler turned on in the php.ini file so
it will automatically compress all my pages.  I was just wondering what is a
good zlib.output_compression level to put it on or is the default (4kb) a
good size?

thanks!


  



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




[PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Daniel Alsén

John W. Holmes propably said:

 Do you have a session_start() on the page? It looks like you have a
 trans_sid enabled. PHP will add that to all of your URLs
 automatically. Can you disable it in php.ini?

Yes trans_sid is enabled and i have a session_start on the page. What is
trans_sid doing exactly? I tried looking it up in the documentation but
don't really get it.

What would i loose if i disabled trans_sid (or actually - tried to persuade
my webhotel to disable it).

The strange thing is also that it only adds the session id to url:s when the
page is first loaded. After the first click it goes away.

- D






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




Re: [PHP] Reading a PHP-as-CGI script into another PHP script

2002-10-01 Thread Marek Kilimajer

Have you tried
include(

http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php

);

Phil Powell wrote:

I have the following URL:

http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php

This is a PHP script that is evaluated and compiled by a CGI script, php4.cgi, to 
allow for file and directory manipulation w/o having to change file and directory 
permissions to world-write.

This URL works just fine as follows:

!--#INCLUDE 
VIRTUAL=http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php
 -- 

If I place this tag inside .shtml files, the results are exactly what I want.. 
however, I am now required to get the contents of 
http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php and 
place inside another PHP script; to date, nothing occurs.

I am able to read other CGI script inside via fopen(../mycgi.cgi, r); and able to 
read PHP via fopen(../myphp.php, r); with no problem.

Does anyone know of a way then that I might be able to produce the contents of a 
uniquely-formed URL such as 
http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php into 
another PHP script since fopen and require() both do not seem to work in this case?

Thanks
Phil

  



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




SV: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Daniel Alsén

To reply to myself .)

I disabled trans_sid on the actual site by using:

ini_set('session.use_trans_sid',false);
session_start();

But i still want to know what trans_sid does for me. What am i missing out
on when not using it?

- D, loves google




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




Re: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Justin French

on 01/10/02 7:45 PM, Daniel Alsén ([EMAIL PROTECTED]) wrote:

 John W. Holmes propably said:
 
 Do you have a session_start() on the page? It looks like you have a
 trans_sid enabled. PHP will add that to all of your URLs
 automatically. Can you disable it in php.ini?
 
 Yes trans_sid is enabled and i have a session_start on the page. What is
 trans_sid doing exactly? I tried looking it up in the documentation but
 don't really get it

IF you're using sessions, and IF the client (browser) doesn't have cookies
available, PHP's trans sid re-writes the URLs on your pages to include a
session ID.


 What would i loose if i disabled trans_sid (or actually - tried to persuade
 my webhotel to disable it).

You'd loose session for those without cookies.  The work around for this
would be to hard-code the session ID to all URLs across your site for all
pages you wish to carry a session through -- a real pain.


 The strange thing is also that it only adds the session id to url:s when the
 page is first loaded. After the first click it goes away.

It HAS TO use a session ID from the first page to the second, to be sure
that the session is being carried... on the second page, it assesses if the
cookie was set, and if so, doesn't bother rewriting any of the URLs, else,
it continues.


Most people beg to HAVE trans_sid enabled on their server, not to have it
removed.  It ensures the widest array of people can access your site without
breaking sessions, and without the need for you to include (pass around) a
session ID throughout your site via URLs.


Justin


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




Re: SV: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Chris Marschall

On Tue, 1 Oct 2002 12:06:04 +0200, Daniel Als‚n wrote:

To reply to myself .)

I disabled trans_sid on the actual site by using:

ini_set('session.use_trans_sid',false);
session_start();

But i still want to know what trans_sid does for me. What am i missing out
on when not using it?

- D, loves google




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


Testing - please ignore.

Sorry for any inconcenience.




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




[PHP] tricky gd question

2002-10-01 Thread electroteque

here is a tricky question, i have created a photo gallery script where i can
edit the photo and gammacorrect the photos, at the moment i post the gamma
value and refreshes the resized preview image , what i'd like to do is be
able to have a before and after preview so half the image is the normal
image and half the image is the gamma corrected image , is this possible ?
any leads would be excellent



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




SV: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Daniel Alsén

Justin French propably said:

 You'd loose session for those without cookies.  The work around for
 this would be to hard-code the session ID to all URLs across your
 site for all pages you wish to carry a session through -- a real pain.

Indeed.

 It HAS TO use a session ID from the first page to the second, to be
 sure that the session is being carried... on the second page, it
 assesses if the cookie was set, and if so, doesn't bother rewriting
 any of the URLs, else, it continues.

Aha...i got a bit confused first when i read your answer since i _know_ i
have cookies enabled. But isn´t there any other way to work around this? Can
i check if the cookie is set myself and if it is disable trans_sid with
'ini_set('session.use_trans_sid',false);'?

 Most people beg to HAVE trans_sid enabled on their server, not to
 have it removed.  It ensures the widest array of people can access
 your site without breaking sessions, and without the need for you to
 include (pass around) a session ID throughout your site via URLs.

Thanks.

- D




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




Re: SV: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Justin French

In order to set and then check a cookie, you need to go through a page... so
you'd have to set something in the URL like ?cookieset=1 anyway, in order to
knwo you had set it, in order to check it.

In other words, you'll need some guff in the URL, in order for it to all
work, so why not let it be the session key, and let trans_sid do the work?

Without trying to sound rude, get over it or deal with it :)


Justin


on 01/10/02 8:53 PM, Daniel Alsén ([EMAIL PROTECTED]) wrote:

 Aha...i got a bit confused first when i read your answer since i _know_ i
 have cookies enabled. But isn´t there any other way to work around this? Can
 i check if the cookie is set myself and if it is disable trans_sid with
 'ini_set('session.use_trans_sid',false);'?


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




SV: SV: [PHP] trans_sid? (was: SV: [PHP] Quickie)

2002-10-01 Thread Daniel Alsén

Justin French propably said:

 In order to set and then check a cookie, you need to go through a
 page... so you'd have to set something in the URL like ?cookieset=1
 anyway, in order to knwo you had set it, in order to check it.
 
 In other words, you'll need some guff in the URL, in order for it to
 all work, so why not let it be the session key, and let trans_sid do
 the work? 
 
 Without trying to sound rude, get over it or deal with it :)

Guess i'll have to ;)

- D




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




[PHP] GET POST Problem

2002-10-01 Thread Francisco Vaucher

Hi (I'm sending this again becasue i didn't find a solution yet)
 
I have a problem when i'm sending form data. The issue happens when I build
a mysql query with some form input data. I send the info and I get 'n'
results from mysql server. With this I build a list that has links to the
records that match
the query. Next step I display one of the items on my query. OK, now here is
where I have the problem. When I go back, the IE gives me an error that
can't show the page because it was made up with form data and if I want to
see the page again, i have to make a refresh. IE wount send the information
itself.
 
I'm running an Apache Server under RH 7.2. and PHP 4.2.0/1
 
With IIS I don't have this problem.
 
Anyone have an idea for this issue ? I think that is a directive in the
php.ini file. But I don't know wich one is.
 
Help would be appreciated
 
Thanks

Francisco M. Vaucher



Re: [PHP] Re: mail headers filtering

2002-10-01 Thread Debbie Dyer

Ah, so this is happening on another server. 

Both - mine and others.

Does that server send emails OK other than by your script?

Others - not known - the reason they use the generator (mostly) is because
they dont know how to write the code themselves. But their webserver is
running PHP and they have no reason to believe that it will not work. They
say there is no error but I know that display errors is probably off.

Are you using the mail() function or Manuel Lemos's classes and do you
check the return value in your script to show whether it was delivered OK.

mail() function - I am going to look at Manuels classes today.
on the signup page to use the generator (where I sometimes have non-receipt
of confirmation mail by user probs) - yes I check the return value
on the generated scripts used on other peoples servers - no - I will change
that for the next version of the generator

re testing From your server or theirs?

Using my server

Check the logs of the server configured in php.ini to send the email
(assuming you are using the emails services of the computer on which the php
script is run).

Dont think they will have access to these logs (most of them - me too - are
running on providers servers not their own)

Have you got Return-Path configured in all cases. The bounce messsage you
posted would have been sent to you via this header.

my signup page - no - I have configured reply-to instead which I thought was
sufficient - I will change that
generated scripts - no - I will change that for the next version

I need to change a few things I can see that.

At least now I will have more chance of finding out why and when I get
complaints about non-receipt of emails I am better informed and in a better
position to answer.

Thank you very much for your help Chris.

Debbie

- Original Message -
From: Chris Hewitt [EMAIL PROTECTED]
To: Debbie Dyer [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 10:56 AM
Subject: Re: [PHP] Re: mail headers  filtering


 Debbie Dyer wrote:

 Hi Chris
 
 They are having the problem receiving the mail sent by the script not
 sending.
 They go to my site and generate a form mailer using their email ad
 They upload it to their webserver
 Then they email me saying that they are testing the mailer out on their
site
 and it seems to work but they never receive the email that it sends
 
 Ah, so this is happening on another server. Does that server send emails
 OK other than by your script? Are you using the mail() function or
 Manuel Lemos's classes and do you check the return value in your script
 to show whether it was delivered OK. I suspect you don't.

 
 Always when I test the scripts (with my email ad) there is nothing wrong
 with it and I receive the mail
 
  From your server or theirs?

 So I don't know what to tell them apart from it must be filtering, nor do
I
 
 Check the logs of the server configured in php.ini to send the email
 (assuming you are using the emails services of the computer on which the
 php script is run). If a linux box then its usually in the file
 /var/log/maillog. There will be information in there as to whether the
 email was sent without error. The sending will be to the recipient's
 mail host or dns MX record. The logs will indicate whether it got there
 without error or not. Whether the user can pick up mail from their mail
 host is another matter and not reported. At a minimun, the domain the
 email is originating from should be in both forward and reverse dns.

 
 know how to attempt to fix the problem. Maybe this problem of 'lost mail'
is
 more noticeable to me because a few hundred a week use this generator so
we
 are talking about running these scripts on a lot of different websites
using
 a lot of different mailservers/mailboxes.
 
 Yes, quite possibly. smtp does not (I don't think) guarantee delivery
 but you should get either a MAILER_DAEMON bounce message to the address
 you configure in the Return-Path header or a line in the smtp server
 log to say why it has not been sent without error. Have you got
 Return-Path configured in all cases. The bounce messsage you posted
 would have been sent to you via this header.

 
 From now on when I get these complaints I will ask them for the name of
the
 mailserver that sends the mail - maybe then I can get back to you for
some
 tests.
 
 Yes, good idea. Check it is in both forward and reverse dns.

 Regards

 Chris




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




RE: [PHP] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread James Mackie

Since I installed apache from source and not an RPM I do not have an rc
file that the service command would use. I start apache in the rc.local
file. -USR1 should be the 'NICE' way to reload the configuration files
as per the apache documentation and has worked for many versions. Its
just with PHP 4.2.3 that it stops working. 



-Original Message-
From: Chris Hewitt [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 12:56 AM
To: James Mackie
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Apache 1.3.26 + PHP 4.2.3


James Mackie wrote:

On most of my servers that are running 4.2.2 (and before) I used
'killall -USR1 httpd' to reload my apache config. Now all servers that
I
install with 4.2.3 instead of 4.2.2 this shuts down apache instead of
reloading the config files. (-HUP still works as it should). 

Base server is RH7.3, Apache and PHP are compiled from source,
staticly,
not as modules.

I don't know why the USR1 signal appears to have changed, but on RH the 
nice way of restarting apache is service httpd restart. Does this
work?

HTH
Chris





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




[PHP] PHP and JavaScript on a validation NIGHTMARE

2002-10-01 Thread Riccardo Sepe

Hi every1 I'm stucked with this page in which I would like to perform 
some check before submit and in the meantime I need to be able to change 
some content upon a choice at the top of the page.
My first attempt was:
The form has been submitted every time I change the option at the top of 
the page ... PHP decides the content of the page..
Javascript performs the checks and then submit the form.
PHP has to recognise the status (I mean checked performed do the real 
task) so I used an isset statement.
The problem using isset is that PHP doesn't find the variable after 
Javascript has performed its check
If I use a hidden field then PHP doesn't understand when I'm asking to 
change the content or actually sending the form for the real task.
After this I said Javascript could manage the dinamically changing of 
the content but I found out that Layer feature is not supported with 
mozilla .
Any clue ??

thanks a lot guys !



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




RE: [PHP] GET POST Problem

2002-10-01 Thread Francisco Vaucher

You mean using GET Method to retrieve the info ? I don't know. I'll have to
check it. But is strange. I'm going to test it from a linux box with
Konqueror, or Netscape to see if it's a browser problem or a server problem.
Maybe the IIS send the info by it self.

I'm going to try that,

tks


Francisco M. Vaucher
Departamento IT
Tyco / ADT Security Services
Buenos Aires - Argentina
mailto:[EMAIL PROTECTED]


-Mensaje original-
De: Matt Schroebel [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 01 de octubre de 2002 8:42
Para: Francisco Vaucher
Asunto: RE: [PHP] GET POST Problem


I think that's standard browser behavior with IE and POST date.  Each
browser handles it different.  Since it's a client issue, I don't
understand how IIS would have anything to do with it.  Are you sure
you're IIS example wasn't using GET?

 -Original Message-
 From: Francisco Vaucher [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, October 01, 2002 7:29 AM
 To: PHP List (E-mail)
 Subject: [PHP] GET POST Problem
 
 
 Hi (I'm sending this again becasue i didn't find a solution yet)
  
 I have a problem when i'm sending form data. The issue 
 happens when I build
 a mysql query with some form input data. I send the info and I get 'n'
 results from mysql server. With this I build a list that has 
 links to the
 records that match
 the query. Next step I display one of the items on my query. 
 OK, now here is
 where I have the problem. When I go back, the IE gives me an 
 error that
 can't show the page because it was made up with form data 
 and if I want to
 see the page again, i have to make a refresh. IE wount send 
 the information
 itself.
  
 I'm running an Apache Server under RH 7.2. and PHP 4.2.0/1
  
 With IIS I don't have this problem.
  
 Anyone have an idea for this issue ? I think that is a 
 directive in the
 php.ini file. But I don't know wich one is.
  
 Help would be appreciated
  
 Thanks
 
 Francisco M. Vaucher
 

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




RE: [PHP] conditional statement problems

2002-10-01 Thread Ford, Mike [LSS]



 -Original Message-
 From: Pablo Oliva [mailto:[EMAIL PROTECTED]]
 Sent: 01 October 2002 08:11
 To: [EMAIL PROTECTED]
 Subject: [PHP] conditional statement problems
 
 
 $title_err = ($adTitle == ) ? 1 : strlen($adTitle)  50 ? 2 : 0;
 
 Can anyone tell me why this is not evaluating correctly (returning a
 value of 1) when $adTitle is an empty string?

Yes.  According to the list at http://uk.php.net/manual/en/language.operators.php, the 
?: operator is left-associative, and of lesser precedence than , so your expression 
is equivalent to the following:

   (($adTitle == ) ? 1 : strlen($adTitle)  50) ? 2 : 0

... and you can probably see why that is giving the wrong answer!  You need to use 
parentheses to force the order of evaluation you want, thus:

   ($adTitle == ) ? 1 : (strlen($adTitle)  50 ? 2 : 0)

(Incidentally, if you've programmed in c or derivatives, this will come as a surprise 
since in c ?: is right-associative and would give your desired result without the 
additional parentheses.)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] Regular Expression

2002-10-01 Thread Ford, Mike [LSS]

 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]]
 Sent: 01 October 2002 02:21
 To: 'Daren Cotter'; 'PHP General Mailing List'
 
  City: Just '  ??
 
 I'd allow space and period, too, for Ft. Gordon for example.
 
 ^[-a-zA-Z0-9' .]+$

Well, there's an English west country resort that rejoices in the name of
Westward Ho! -- complete with exclamation mark!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




Re: [PHP] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread Erwin

James Mackie wrote:
 Since I installed apache from source and not an RPM I do not have an
 rc file that the service command would use. I start apache in the
 rc.local file. -USR1 should be the 'NICE' way to reload the
 configuration files as per the apache documentation and has worked
 for many versions. Its just with PHP 4.2.3 that it stops working.

Is apachectl graceful an option?
apachectl resided in the apache installation dir.

Grtz Erwin

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




Re: [PHP] PHP and JavaScript on a validation NIGHTMARE

2002-10-01 Thread skitum

Use globals variables instead hidden fields. Maybe it works.

Peace  Love
skitum

- Original Message - 
From: Riccardo Sepe [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 1:34 PM
Subject: [PHP] PHP and JavaScript on a validation NIGHTMARE


 Hi every1 I'm stucked with this page in which I would like to perform 
 some check before submit and in the meantime I need to be able to change 
 some content upon a choice at the top of the page.
 My first attempt was:
 The form has been submitted every time I change the option at the top of 
 the page ... PHP decides the content of the page..
 Javascript performs the checks and then submit the form.
 PHP has to recognise the status (I mean checked performed do the real 
 task) so I used an isset statement.
 The problem using isset is that PHP doesn't find the variable after 
 Javascript has performed its check
 If I use a hidden field then PHP doesn't understand when I'm asking to 
 change the content or actually sending the form for the real task.
 After this I said Javascript could manage the dinamically changing of 
 the content but I found out that Layer feature is not supported with 
 mozilla .
 Any clue ??
 
 thanks a lot guys !
 
 
 
 -- 
 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] PHP and JavaScript on a validation NIGHTMARE

2002-10-01 Thread Riccardo Sepe

skitum wrote:

Use globals variables instead hidden fields. Maybe it works.

Peace  Love
skitum

  

Cool mate I' ll let u know!

bye


  

  





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




[PHP] spell checker

2002-10-01 Thread Lowell Allen

I need to install a spell checker on a content management system that I
wrote in PHP a few months ago. I've found a free, simple spell checker
written in ASP that I can easily port to PHP, but the more daunting task for
me is creating the JavaScript to implement the spell checker. I haven't been
able to find an existing, inexpensive PHP spell checker solution. Can anyone
direct me to one or provide advice?

Thanks.

--
Lowell Allen


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




Re: [PHP] spell checker

2002-10-01 Thread Justin French

Google it!!

http://www.google.com/search?hl=enie=ISO-8859-1q=php+spell+checkerbtnG=Go
ogle+Search

Seems to be a few good starts on the first 10 results!!


Justin French


on 01/10/02 10:10 PM, Lowell Allen ([EMAIL PROTECTED]) wrote:

 I need to install a spell checker on a content management system that I
 wrote in PHP a few months ago. I've found a free, simple spell checker
 written in ASP that I can easily port to PHP, but the more daunting task for
 me is creating the JavaScript to implement the spell checker. I haven't been
 able to find an existing, inexpensive PHP spell checker solution. Can anyone
 direct me to one or provide advice?
 
 Thanks.
 
 --
 Lowell Allen
 


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




RE: [PHP] PHP Include Help

2002-10-01 Thread Jay Blanchard

[snip]
On line 6, I have the list of musicians in the song.
Example (ignore the quotes): Doyle Lawson -- lead vocal; Dale Perry -- bass
vocal
Is there a way to make it so that, when I include line 6 in my PHP template,
the ; will be replaced with a line break so I get one musician per line in
the HTML output?

Lines 7 and so on are the lyrics. The text file has one line per line (makes
sense, right?) and a blank line between sections of the song. I have the
script set up to read all the lines from 7 on, but it jumbles them all
together, ignoring the line breaks. Is there a way to script PHP to add the
line breaks, or should the line break HTML just be inserted everywhere
needed in all my separate files?
[/snip]

Have a look at eregi_replace() on http://www.php.net, that should get you
headed in the direction of a solution.

HTH!

Jay

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



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




Re: [PHP] How to get a total...

2002-10-01 Thread Paul Nicholson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
Try: http://www.php.net/manual/en/language.operators.arithmetic.php
I think that'll get you started:)
~Paul

On Tuesday 01 October 2002 09:44 am, Chuck Payne wrote:
 Hi,

 I am really lost. I have spent an hour looking on the net and php.net for
 how to get total and how to do math with php. If anyone has a link to a
 site that show it or can example to me how to do it, that would be great. I
 have a small project where I am going to track invoices. But they want to
 be able to see how total amount of the invoice that I am tracking. I know
 this is got to be simple but it hard if I do have example of the commands
 to do it.

 Chuck Payne
 Magi Design and Support

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

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

iD8DBQE9mag+DyXNIUN3+UQRAqGLAJ0f4NDQU3/kQ6z7lYGfp8Esa+ZzEwCeLmBU
eT8+TDyHoS6B9Rjv3TDMwjQ=
=y7LJ
-END PGP SIGNATURE-

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




Re: [PHP] How to get a total...

2002-10-01 Thread Justin French

lol

or you could just try

?
$value1 = 100;
$value2 = 24;

$total = $value1 + $value2;
?


on 01/10/02 11:50 PM, Paul Nicholson ([EMAIL PROTECTED]) wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hey,
 Try: http://www.php.net/manual/en/language.operators.arithmetic.php
 I think that'll get you started:)
 ~Paul
 
 On Tuesday 01 October 2002 09:44 am, Chuck Payne wrote:
 Hi,
 
 I am really lost. I have spent an hour looking on the net and php.net for
 how to get total and how to do math with php. If anyone has a link to a
 site that show it or can example to me how to do it, that would be great. I
 have a small project where I am going to track invoices. But they want to
 be able to see how total amount of the invoice that I am tracking. I know
 this is got to be simple but it hard if I do have example of the commands
 to do it.
 
 Chuck Payne
 Magi Design and Support
 
 - -- 
 ~Paul Nicholson
 Design Specialist @ WebPower Design
 The webthe way you want it!
 [EMAIL PROTECTED]
 
 It said uses Windows 98 or better, so I loaded Linux!
 Registered Linux User #183202 using Register Linux System # 81891
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE9mag+DyXNIUN3+UQRAqGLAJ0f4NDQU3/kQ6z7lYGfp8Esa+ZzEwCeLmBU
 eT8+TDyHoS6B9Rjv3TDMwjQ=
 =y7LJ
 -END PGP SIGNATURE-


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




[PHP] $_SESSION only takes 1 character?

2002-10-01 Thread Tim Stoop

Hi there,

I've got some strange behaviour here (at least, I can't explain it). I'm 
running PHP 4.2.3 on a Mandrake 9.0 machine. I'm using sessions in my 
little app and want to use the $_SESSION-variable to keep track of all my 
variabeles.

Well, when I tell it
$_SESSION[something-intelligent] = $myName;
echo($_SESSION[something-intelligent]);

I get Tim on my screen. But when I do:

$nr = 12;
$_SESSION[things][$nr][intelligent] = $myName;
echo $_SESSION[things][$nr][intelligent];

I don't get any output at all! Can anyone shed any light on this? Thanks in 
advance!!

-- 
Kind regards,
Tim

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




[PHP] apache2.x and php

2002-10-01 Thread Anil Garg

Hi,
i came to know from someone that i can  *not* make php a shared module in
apache 2.x   .It works only in
1.3x.

If thats true can someone point me to some link saying the same.

thanx and regards
anil


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




[PHP] PHPDoc?

2002-10-01 Thread Francis

Is their any comparable tool/util whatever to automaticly create
documentation from your PHP Code (like java's JavaDoc)?



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




[PHP] Re: $_SESSION strange behaviour? (was: $_SESSION only takes 1 character?)

2002-10-01 Thread Tim Stoop

Hmm... subject wasn't what I wanted it to be :) Sorry about that.

-- 
Kind regards,
Tim

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




Re: [PHP] $_SESSION only takes 1 character?

2002-10-01 Thread @ Edwin

Hello,

On Tuesday, October 01, 2002 11:13 PM
Subject: [PHP] $_SESSION only takes 1 character?
Tim Stoop wrote:
 Hi there,

 I've got some strange behaviour here (at least, I can't explain it). I'm
 running PHP 4.2.3 on a Mandrake 9.0 machine. I'm using sessions in my
 little app and want to use the $_SESSION-variable to keep track of all my
 variabeles.

 Well, when I tell it
 $_SESSION[something-intelligent] = $myName;
 echo($_SESSION[something-intelligent]);

 I get Tim on my screen. But when I do:

 $nr = 12;
 $_SESSION[things][$nr][intelligent] = $myName;
 echo $_SESSION[things][$nr][intelligent];

 I don't get any output at all!

What happens? No error message? Nothing?

Anyway, you can try this:

  echo {$_SESSION[things][$nr][intelligent]};

Can anyone shed any light on this? Thanks in
 advance!!


- E

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




Re: [PHP] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread Rick Widmer

At 01:54 PM 10/1/02 +0200, Erwin wrote:
James Mackie wrote:
  Since I installed apache from source and not an RPM I do not have an
  rc file that the service command would use. I start apache in the
  rc.local file. -USR1 should be the 'NICE' way to reload the
  configuration files as per the apache documentation and has worked
  for many versions. Its just with PHP 4.2.3 that it stops working.

Is apachectl graceful an option?
apachectl resided in the apache installation dir.


 From apachectl...


graceful)
if [ $RUNNING -eq 0 ]; then
 ...
 ...
else
   if $HTTPD -t /dev/null 21; then
  if kill -USR1 $PID; then
   ^

I don't think apachectl will help, since it uses kill -USR1 to do a 
graceful restart.




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




Re: [PHP] PHPDoc?

2002-10-01 Thread Scott Houseman

www.phpdoc.de is one I know of.
I'm not surewhat the current development activity is, but I think it's still in beta.
The front page states 'Last update: 2000/12/03' - so I don't know what's happening 
there.

Regards

Scott

On 10/1/2002 4:18 PM, Francis wrote:
 Is their any comparable tool/util whatever to automaticly create
 documentation from your PHP Code (like java's JavaDoc)?
 
 
 


-- 
////
// Scott Houseman //
// Jam Warehouse http://www.jamwarehouse.com/ //
// Smart Business Innovation  //
// +27 21 4477440 / +27 82 4918021//
////


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




[PHP] Stopping apache from sending HTTP headers

2002-10-01 Thread Thiago Rafael Becker

Hi, I'm new to the news.

How can I stop Apache from sending HTTP headers when I execute a script. Who
handle the HTTP headers, is Apache or PHP engine?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.282 / Virus Database: 150 - Release Date: 25/09/01



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




Re: [PHP] remote desktop control

2002-10-01 Thread Alex Moundalexis

Read the documentation for VNC, and read what Ben wrote.

VNC - http://www.uk.research.att.com/vnc/
We have a Java viewer, which will run in any Java-capable browser.
Read: no download required.

Implementing in another language would be beyond the scope of this forum.

- A

On Tue, 1 Oct 2002, Rahul wrote:

 Hello Smith,

  Thanks for your reply. Do you have any idea in implementing same with any
 other language?
 But VNC and all needs download  process to use (control remote desktop).
 I'm asking abt web based(anywhere control- no need to download and install).

 if you have any idea in doing this, plz tell me.

 thanks a lot,
 -sadha

 From: Smith, Benjamin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 12:14 PM
 Subject: RE: [PHP] remote desktop control


 Not really, no. It goes well beyond the capabilities of a server-side
 scripting language.

 There is a java implementation in VNC that allows this capability, though.


 Hello all,

Is it possible to implement Web Based Remote Desktop Control using PHP or
 anyother webbased language?
 Aim is to share the remote(visitor's) system(desktop).
 If possible, plz let me know how to proceed.


 Advance thanks,
 -sadha

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



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




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




Re: [PHP] apache2.x and php

2002-10-01 Thread Rasmus Lerdorf

You have it backwards.  Apache 2.x can only have PHP as a shared module at
this point, no static.

-Rasmus

On Tue, 1 Oct 2002, Anil Garg wrote:

 Hi,
 i came to know from someone that i can  *not* make php a shared module in
 apache 2.x   .It works only in
 1.3x.

 If thats true can someone point me to some link saying the same.

 thanx and regards
 anil


 --
 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] remote desktop control

2002-10-01 Thread Bill Farrell

By the way, it works beautifully, either using the
VNCViewer or through the java applet in a web browser.
 I do a lot of remote support and it's indispensible. 
Win2K seems to have some issues (frequent disconnects)
but a refresh usually puts you right back.  But on
*nix systems, it's as stable as anything else I've
ever used on any system.  

Also, if you're running on RedHat 7.1 or later, VNC
comes with.  If you didn't install it when you
installed the rest of RedHat, the RPM is on the
install CD.
B


--- Alex Moundalexis [EMAIL PROTECTED] wrote:
 Read the documentation for VNC, and read what Ben
 wrote.
 
 VNC - http://www.uk.research.att.com/vnc/
 We have a Java viewer, which will run in any
 Java-capable browser.
 Read: no download required.
 
 Implementing in another language would be beyond the
 scope of this forum.
 
 - A
 
 On Tue, 1 Oct 2002, Rahul wrote:
 
  Hello Smith,
 
   Thanks for your reply. Do you have any idea in
 implementing same with any
  other language?
  But VNC and all needs download  process to use
 (control remote desktop).
  I'm asking abt web based(anywhere control- no need
 to download and install).
 
  if you have any idea in doing this, plz tell me.
 
  thanks a lot,
  -sadha
 
  From: Smith, Benjamin [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 01, 2002 12:14 PM
  Subject: RE: [PHP] remote desktop control
 
 
  Not really, no. It goes well beyond the
 capabilities of a server-side
  scripting language.
 
  There is a java implementation in VNC that allows
 this capability, though.
 
 
  Hello all,
 
 Is it possible to implement Web Based Remote
 Desktop Control using PHP or
  anyother webbased language?
  Aim is to share the remote(visitor's)
 system(desktop).
  If possible, plz let me know how to proceed.
 
 
  Advance thanks,
  -sadha
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit:
 http://www.php.net/unsub.php
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Bill Farrell
Multivalue and *nix Support Specialist

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

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

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




[PHP] Quick question.

2002-10-01 Thread Simon Angell

Hi everyone.
I asked this a week or so ago but i am unsure if it got to the list, so here
we go again.

I am trying to get a remote file to be copied onto my own web server, I have
looked at fopen() and fread() and fwrite() and get the general idea of each,
but im wondering how to join the commandes to get the file i want from the
remote ftp server, copied and written onto my own server.


--
Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.



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




Re: [PHP] Quick question.

2002-10-01 Thread Adam Voigt

Everything you need:

http://www.php.net/ftp

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-10-01 at 11:50, Simon Angell wrote:
 Hi everyone.
 I asked this a week or so ago but i am unsure if it got to the list, so here
 we go again.
 
 I am trying to get a remote file to be copied onto my own web server, I have
 looked at fopen() and fread() and fwrite() and get the general idea of each,
 but im wondering how to join the commandes to get the file i want from the
 remote ftp server, copied and written onto my own server.
 
 
 --
 Cheers
 -
 Simon Angell
 Canberra ACT
 www.canberra-wx.com
 -
 Member of:
 Australian Severe Weather Association.
 www.severeweather.asn.au
 -
 This email is virus free.
 Scanned before leaving my mailbox
 using Norton Antivirus 2002 for Win2k
 Scanned with the latest definition File.
 
 
 
 -- 
 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] PHP with Oracle

2002-10-01 Thread Jadiel Flores

Hi guys, I'm having some problems here, I have to do an application using 
Oracle in Windows, I enabled the extension php_oci8.dll but I'm receiving 
this error:

Warning: Unable to load dynamic library 'C:\PHP\extensions/php_oci8.dll' - 
Access is denied. in Unknown on line 0

The dll is in the directory but I have no idea why php can't load it.

Any suggestion??


Jadiel Flores
-
http://www.abargon.com
[EMAIL PROTECTED]
(52-55) 52-29-80-34



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




Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings

Simon Angell wrote:
 
 Hi everyone.
 I asked this a week or so ago but i am unsure if it got to the list, so here
 we go again.
 
 I am trying to get a remote file to be copied onto my own web server, I have
 looked at fopen() and fread() and fwrite() and get the general idea of each,
 but im wondering how to join the commandes to get the file i want from the
 remote ftp server, copied and written onto my own server.

Something like the following might work (not tested AT ALL):

$rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) );

if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
{
fputs( $fp, $rContents );
fclose( $fp );
}

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP] PEAR DB problem

2002-10-01 Thread Peter Hall

Hi, I'm a bit new to mySQL. I got my program working fine locally, but it
doesn't work when I upload it to my ISP.

db.php and pear.php couldn't be found on my server when I first ran it. I
uploaded them, but could that be part of my problem?

The following code is returning DB Error: not found:

 $database_address = mysql://user:[EMAIL PROTECTED]/dbname;
 require_once('DB.php');
 $c_db = DB::connect($database_address);
 if(DB::iserror($c_db)){
  die($c_db-getMessage());
 }

Peter



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




RE: [PHP] PHP with Oracle

2002-10-01 Thread Francisco Vaucher


Have you tried to check the access permissons ? Maybe the Oracle/PHP
user/app doesn't have the right permissons in that directory.

Regards,


Francisco M. Vaucher
Departamento IT
Tyco / ADT Security Services
Buenos Aires - Argentina
mailto:[EMAIL PROTECTED]


-Mensaje original-
De: Jadiel Flores [mailto:[EMAIL PROTECTED]]
Enviado el: martes, 01 de octubre de 2002 12:51
Para: [EMAIL PROTECTED]
Asunto: [PHP] PHP with Oracle


Hi guys, I'm having some problems here, I have to do an application using 
Oracle in Windows, I enabled the extension php_oci8.dll but I'm receiving 
this error:

Warning: Unable to load dynamic library 'C:\PHP\extensions/php_oci8.dll' - 
Access is denied. in Unknown on line 0

The dll is in the directory but I have no idea why php can't load it.

Any suggestion??


Jadiel Flores
-
http://www.abargon.com
[EMAIL PROTECTED]
(52-55) 52-29-80-34



-- 
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] Works from the command line but NOT from PHP

2002-10-01 Thread DonPro

Does anyone have any experience with FULLTEXT indexed MySQL tables?  I've
created such a key.  When I type the following from the MySQL command line,
I get the desired records returned, i.e., a subset of my entire table:

SELECT HSCode, UOM, EDescript FROM HSCodes WHERE MATCH(EDescript) AGAINST
('exercise');

However, the following PHP code returns the entire table, i.e., every single
column and I don't know why:

$queryID = mysql_query(SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
MATCH(EDescript) AGAINST (' . $description . ') ORDER BY HSCode, UOM,
EDescript);
if ($queryID) {
   while ($queryRow = mysql_fetch_assoc($queryID)) {
  echo '$queryRow[HSCode] . ' | ' . $queryRow[UOM] . ' | ' .
$queryRow[EDescript];
   }
}




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




Re: [PHP] Works from the command line but NOT from PHP

2002-10-01 Thread Chris Hewitt

DonPro wrote:

$queryID = mysql_query(SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
MATCH(EDescript) AGAINST (' . $description . ') ORDER BY HSCode, UOM,
EDescript);

I don't see what is wrong but try echoing the text of the query itself 
and see if it contains what you think it does around the $desription area.

HTH
Chris



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




Re: [PHP] OOP class names

2002-10-01 Thread Debbie Dyer

From what you say you dont want get_class_name because this gives you the
name of the class not the instance of it - which is really no different from
asking how to get the name of any var.

I dont really know why you would want to do this unless you are dynamically
naming the objects.

There is get_defined_vars but this gives you everything, environment vars
etc and u would have to go through the lot.

I am assuming you have the objects in some sort of container - because if
you dont know their names that is the only way you can access them - so the
only way I can think of is how you name them in the first place.

eg. use the name as the key in the container

  $arr = array();
  for ($i = 0; $i  10; $i++) {
$name = classname$i;
$$name = new blah();
$arr[$name] = $$name;
  }

Maybe there's another way but I cant think of one.

Debbie


- Original Message -
From: Davíð Örn Jóhannsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 1:59 PM
Subject: [PHP] OOP class names


 Is there any way to get a print out of class names of an object, lets
 say I have a object called obj and I have x number of classes and I want
 to find out, theyr names, for example obj-class1 obj-class2 etc.

 Thanks David



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




[PHP] submitting a form to multiple places!!!

2002-10-01 Thread Henry

Hi All,

I have a problem that I hope you can help me with.

I'm using a third party shopping cart solution which is quite frankly naff.
They bundle some autoresponders with it. Unfortunately the autoresponders do
not work!.  I want to find a temporary solution  to this. The easiest way
would be to allow a form to be submitted to more than one place!

Basically I would lke to have an intermediate php page that will submit the
details (submitted to it) to two other pages and then follow the response of
one of those other pages (the primary page). That way I can insert a
different autoresponder handling system into the submission process but
continue to use the shopping carts pages for the time being.

Any suggestions?

Henry



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




[PHP] Re: tricky gd question

2002-10-01 Thread Mike Mannakee

Have a look at ImageCopy in the manual.

HTH

Mike


Electroteque [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 here is a tricky question, i have created a photo gallery script where i
can
 edit the photo and gammacorrect the photos, at the moment i post the gamma
 value and refreshes the resized preview image , what i'd like to do is be
 able to have a before and after preview so half the image is the normal
 image and half the image is the gamma corrected image , is this possible ?
 any leads would be excellent





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




[PHP] reg exp and basename help?

2002-10-01 Thread Jennifer Swofford

I need help with some regular expression matching.

Here is what I am doing.  In one php file, I'm reading
in the contents of an html file.  Both reside on the
same server.  What I need to do is change all image
tags that are like this:

img src=directory1/directory2/directoryN/image.gif

To this:

img src=image.gif

I know that basename works if you have something
like $path = /directory1/image.gif... $file =
basename($path) will return image.gif, which is what I
want.

But... how do I use ereg_replace (probably) and
basename together while reading this file?

The php file I currently have, which does read in the
file, is:

?
$filename = example.html;
$fd = fopen ($filename, r);
$contents = fread ($fd, filesize ($filename));
print $contents;
fclose ($fd);
?

So, I'd want to add something like...

$contents =
ereg_replace(/src=\[A-z0-9_\-\/]*\..+(gif|jpg)\/,
src=\blah.jpg\, $contents);

Um, except I know the regular expression is wrong
(haven't completely figured that out yet) and I
*don't* want to replace the image name with
blah.jpg... I was just using this line to test.

It seems like I should be able to go through and find
each path to each image, basename it, and replace it
with just the image name.  But how?  There will be
multiple numbers of img tags in the html file.

Thank you profusely in advance.
Jen
[EMAIL PROTECTED]

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

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




Re: [PHP] Quick question.

2002-10-01 Thread Simon Angell

i tried that ine and got this...
Warning: fopen(/test/canberra.txt, w+) - No such file or directory in
C:\Xitami\webpages\bomonster\test2.php on line 4

code..
?php
$rContents = implode( \n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );

if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
{
fputs( $fp, $rContents );
fclose( $fp );
}
?

I think i know what the probelm is.
.if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
should be
 if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ,
'w+' )) !== false )

But, where do i put the file name and directory to write?

--
Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.

Robert Cummings [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Simon Angell wrote:
 
  Hi everyone.
  I asked this a week or so ago but i am unsure if it got to the list, so
here
  we go again.
 
  I am trying to get a remote file to be copied onto my own web server, I
have
  looked at fopen() and fread() and fwrite() and get the general idea of
each,
  but im wondering how to join the commandes to get the file i want from
the
  remote ftp server, copied and written onto my own server.

 Something like the following might work (not tested AT ALL):

 $rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) );

 if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
 {
 fputs( $fp, $rContents );
 fclose( $fp );
 }

 --
 .-.
 | Robert Cummings |
 :-`.
 | Webdeployer - Chief PHP and Java Programmer  |
 :--:
 | Mail  : mailto:[EMAIL PROTECTED] |
 | Phone : (613) 731-4046 x.109 |
 :--:
 | Website : http://www.webmotion.com   |
 | Fax : (613) 260-9545 |
 `--'



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




Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings

You're a Windows guy so probably you need the directory delimiters facing
the other way :)

Try this one (not tested AT ALL):

$rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) );

if( ($fp = fopen( 'c:\path\to\directory\outfile.txt', 'wb+' )) !== false )
{
fputs( $fp, $rContents );
fclose( $fp );
}

Make sure the directry path in the fopen() statement already exists since
it won't try to make the directory structure.

Cheers,
Rob.

Simon Angell wrote:
 
 i tried that ine and got this...
 Warning: fopen(/test/canberra.txt, w+) - No such file or directory in
 C:\Xitami\webpages\bomonster\test2.php on line 4
 
 code..
 ?php
 $rContents = implode( \n, file(
 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
 
 if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
 {
 fputs( $fp, $rContents );
 fclose( $fp );
 }
 ?
 
 I think i know what the probelm is.
 .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
 should be
  if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ,
 'w+' )) !== false )
 
 But, where do i put the file name and directory to write?
 
 --
 Cheers
 -
 Simon Angell
 Canberra ACT
 www.canberra-wx.com
 -
 Member of:
 Australian Severe Weather Association.
 www.severeweather.asn.au
 -
 This email is virus free.
 Scanned before leaving my mailbox
 using Norton Antivirus 2002 for Win2k
 Scanned with the latest definition File.
 
 Robert Cummings [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Simon Angell wrote:
  
   Hi everyone.
   I asked this a week or so ago but i am unsure if it got to the list, so
 here
   we go again.
  
   I am trying to get a remote file to be copied onto my own web server, I
 have
   looked at fopen() and fread() and fwrite() and get the general idea of
 each,
   but im wondering how to join the commandes to get the file i want from
 the
   remote ftp server, copied and written onto my own server.
 
  Something like the following might work (not tested AT ALL):
 
  $rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) );
 
  if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
  {
  fputs( $fp, $rContents );
  fclose( $fp );
  }

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




Re: [PHP] Quick question.

2002-10-01 Thread Simon Angell

i removed a / and it worked :)
?php
$rContents = implode( \n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );

if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false )
{
fputs( $fp, $rContents );
fclose( $fp );
}
?

Now the format of the content is no longer, can this be fixed?
This is how it is originally.
IDN10035
BUREAU OF METEOROLOGY
CANBERRA METEOROLOGICAL OFFICE
FORECAST FOR THE ACT
Issued at 3:34pm on Tuesday the 1st of October 2002

SITUATION:

AND this is how the text file writes
IDN10035BUREAU OF METEOROLOGYCANBERRA METEOROLOGICAL OFFICEFORECAST FOR THE
ACTIssued at 3:34pm on Tuesday the 1st of October 2002SITUATION:

with  all through it where a new line is suppose to be.

Can this be fixed, or will i just need to work around it?
--
Cheers
-
Simon Angell
Canberra ACT
www.canberra-wx.com
-
Member of:
Australian Severe Weather Association.
www.severeweather.asn.au
-
This email is virus free.
Scanned before leaving my mailbox
using Norton Antivirus 2002 for Win2k
Scanned with the latest definition File.

Simon Angell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 i tried that ine and got this...
 Warning: fopen(/test/canberra.txt, w+) - No such file or directory in
 C:\Xitami\webpages\bomonster\test2.php on line 4

 code..
 ?php
 $rContents = implode( \n, file(
 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );

 if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
 {
 fputs( $fp, $rContents );
 fclose( $fp );
 }
 ?

 I think i know what the probelm is.
 .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
 should be
  if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ,
 'w+' )) !== false )

 But, where do i put the file name and directory to write?

 --
 Cheers
 -
 Simon Angell
 Canberra ACT
 www.canberra-wx.com
 -
 Member of:
 Australian Severe Weather Association.
 www.severeweather.asn.au
 -
 This email is virus free.
 Scanned before leaving my mailbox
 using Norton Antivirus 2002 for Win2k
 Scanned with the latest definition File.

 Robert Cummings [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Simon Angell wrote:
  
   Hi everyone.
   I asked this a week or so ago but i am unsure if it got to the list,
so
 here
   we go again.
  
   I am trying to get a remote file to be copied onto my own web server,
I
 have
   looked at fopen() and fread() and fwrite() and get the general idea of
 each,
   but im wondering how to join the commandes to get the file i want from
 the
   remote ftp server, copied and written onto my own server.
 
  Something like the following might work (not tested AT ALL):
 
  $rContents = implode( \n, file(
'ftp://www.foo.bar/me/my/data.txt' ) );
 
  if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
  {
  fputs( $fp, $rContents );
  fclose( $fp );
  }
 
  --
  .-.
  | Robert Cummings |
  :-`.
  | Webdeployer - Chief PHP and Java Programmer  |
  :--:
  | Mail  : mailto:[EMAIL PROTECTED] |
  | Phone : (613) 731-4046 x.109 |
  :--:
  | Website : http://www.webmotion.com   |
  | Fax : (613) 260-9545 |
  `--'





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




[PHP] comparison of apache 1.3.x and 2.x

2002-10-01 Thread Anil Garg

Hi,

Thanx for you mails.
As per your suggestion i have decided to install apache 1.3.26(latest 1.3.x)
with php-4.2.3.
But, one thing still boggling me(and i couldnt find any documentaion about
that) is that whats the major difference between apache1.3.x series and
apache 2.x series...for what reason are both the threads beings processed?(i
m asking this coz i want to know what will i be missing if i use 1.3.26
instead of 2.0.40.
Can u plz gimme some pointers.

Thanx and regards
anil


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




[PHP] Re: comparison of apache 1.3.x and 2.x

2002-10-01 Thread Rasmus Lerdorf

Read the release notes and docs for each.  Basically Apache 2 introduces
an mpm architecture which allows you to plug in different protocol
handlers that make use of different processing models for handling
requests.  Most notably all the mpms except for the pre-fork mpm are
threaded, but since FreeBSD's kernel threading support is broken anyway,
you can't use those and you can only use the prefork mpm on your server.
The prefork mpm makes Apache 2 look exactly like Apache 1 so in your case
there is no difference except Apache 1 is a more mature and less buggy
codebase.

-Rasmus

On Tue, 1 Oct 2002, Anil Garg wrote:

 Hi,

 Thanx for you mails.
 As per your suggestion i have decided to install apache 1.3.26(latest 1.3.x)
 with php-4.2.3.
 But, one thing still boggling me(and i couldnt find any documentaion about
 that) is that whats the major difference between apache1.3.x series and
 apache 2.x series...for what reason are both the threads beings processed?(i
 m asking this coz i want to know what will i be missing if i use 1.3.26
 instead of 2.0.40.
 Can u plz gimme some pointers.

 Thanx and regards
 anil



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




Re: [PHP] Quick question.

2002-10-01 Thread Robert Cummings

Windows makes me cry... this will fix the problem...

Change: $rContents = implode( \n, file( 
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
To: $rContents = implode( \r\n, file( 
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );

If that doesn't work:

To: $rContents = implode( \n\r, file( 
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );

I can never remember the order :)

Cheers,
Rob.

Simon Angell wrote:
 
 i removed a / and it worked :)
 ?php
 $rContents = implode( \n, file(
 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
 
 if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false )
 {
 fputs( $fp, $rContents );
 fclose( $fp );
 }
 ?
 
 Now the format of the content is no longer, can this be fixed?
 This is how it is originally.
 IDN10035
 BUREAU OF METEOROLOGY
 CANBERRA METEOROLOGICAL OFFICE
 FORECAST FOR THE ACT
 Issued at 3:34pm on Tuesday the 1st of October 2002
 
 SITUATION:
 
 AND this is how the text file writes
 IDN10035BUREAU OF METEOROLOGYCANBERRA METEOROLOGICAL OFFICEFORECAST FOR THE
 ACTIssued at 3:34pm on Tuesday the 1st of October 2002SITUATION:
 
 with  all through it where a new line is suppose to be.
 
 Can this be fixed, or will i just need to work around it?
 --
 Cheers
 -
 Simon Angell
 Canberra ACT
 www.canberra-wx.com
 -
 Member of:
 Australian Severe Weather Association.
 www.severeweather.asn.au
 -
 This email is virus free.
 Scanned before leaving my mailbox
 using Norton Antivirus 2002 for Win2k
 Scanned with the latest definition File.
 
 Simon Angell [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  i tried that ine and got this...
  Warning: fopen(/test/canberra.txt, w+) - No such file or directory in
  C:\Xitami\webpages\bomonster\test2.php on line 4
 
  code..
  ?php
  $rContents = implode( \n, file(
  'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
 
  if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
  {
  fputs( $fp, $rContents );
  fclose( $fp );
  }
  ?
 
  I think i know what the probelm is.
  .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
  should be
   if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ,
  'w+' )) !== false )
 
  But, where do i put the file name and directory to write?
 
  --
  Cheers
  -
  Simon Angell
  Canberra ACT
  www.canberra-wx.com
  -
  Member of:
  Australian Severe Weather Association.
  www.severeweather.asn.au
  -
  This email is virus free.
  Scanned before leaving my mailbox
  using Norton Antivirus 2002 for Win2k
  Scanned with the latest definition File.
 
  Robert Cummings [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Simon Angell wrote:
   
Hi everyone.
I asked this a week or so ago but i am unsure if it got to the list,
 so
  here
we go again.
   
I am trying to get a remote file to be copied onto my own web server,
 I
  have
looked at fopen() and fread() and fwrite() and get the general idea of
  each,
but im wondering how to join the commandes to get the file i want from
  the
remote ftp server, copied and written onto my own server.
  
   Something like the following might work (not tested AT ALL):
  
   $rContents = implode( \n, file(
 'ftp://www.foo.bar/me/my/data.txt' ) );
  
   if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
   {
   fputs( $fp, $rContents );
   fclose( $fp );
   }

-- 
.-.
| Robert Cummings |
:-`.
| Webdeployer - Chief PHP and Java Programmer  |
:--:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109 |
:--:
| Website : http://www.webmotion.com   |
| Fax : (613) 260-9545 |
`--'

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




[PHP] Protecting files in PHP

2002-10-01 Thread stas


Hello,

I have some files off of the web root which I'd like to be able to serve up
to users (*.doc, *.xls). I know I can do this with header(), but how do I
reference a file that's outside of the webroot? Thanks!




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




[PHP] SOAP slllloooowwwwww.

2002-10-01 Thread Seth Northrop


We've been playing around with SOAP from a J2EE framework with PHP as the
client (via WSDL).  Needless to say, it's SLOW.  I think this has more to
do with the Java/SOAP layer than anything to do with PHP but it's
borderline unusable.

That being said, would PHP+java integration be any faster - or, am I
hopelessly bogged down by Java's slowness?  The logic on the Java end, up
until it gets to serializing data for SOAP, seems reasonably snappy - but,
will I have the same data transfer problems with PHP+Java integration as I
have with a SOAP integration - I'd presume not, but, I'm desperately
seeking first hand advice.

Thanks for any advice.
Seth


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




[PHP] stuck n00b

2002-10-01 Thread Chris Nielsen

I have a simple form:

form action=addUser.php method=post
  Enter Username:
  input type=text name=userNamebrbr
  input type=submit value=Submit
/form

Submits to addUser.php:

?php
echo $HTTP_SERVER_VARS['userName'];
?

Returns this error in my browser:

Notice: Undefined index: userName in E:\Inetpub\wwwroot\Test\addUser.php on
line 11

Is there a setting in my php.ini file I need to change? register_globals is
off, as that seems to be the preferred method now. But that's my issue,
trying to access this external variable. $_REQUEST doesn't work. $_POST
doesn't either. I have other scripts that it's working in, but I may not
know what I'm saying here.

PHP 4.2.3 on IIS (personal web server or whatever it's called) on WinXP Pro.

Thanks for any help you can give.




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




[PHP] Re: Protecting files in PHP

2002-10-01 Thread J Smith

[EMAIL PROTECTED] wrote:

 
 Hello,
 
 I have some files off of the web root which I'd like to be able to serve
 up to users (*.doc, *.xls). I know I can do this with header(), but how do
 I reference a file that's outside of the webroot? Thanks!

Try using filesystem links or the PHP function readfile().

J

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




[PHP] Confirm a Deletion

2002-10-01 Thread Roger Lewis

I know this should be very simple, but I just don't get it.

I want to delete a record from a mysql table, but prior to deleting the
record I want to receive an option to confirm the deletion.  On page one
(kb_areas_add.php) I have a form for inputting the field (area_todelete) for
the record I want to delete.  The form action goes to page two
(kb_areas_delete) on which I am asked to confirm the deletion.  I want to be
able to press the delete button to delete the record, or the cancel button
to cancel the operation.

The way the code is written, the record gets deleted immediately upon
clicking the submit button on page one.  Is there some way I can keep the
script on page two from executing until after I press the confirmation
button?

Thanks for any suggestions.


/* FORM FOR SELECTING AREA TO DELETE */

form action='kb_areas_delete.php' method=post name=DeleteAnArea
input type=submit name=DeleteArea value=Delete Area border=0
Area: input type=text name=area_todelete size=24 border=0
/form


/* FORM TO CONFIRM DELETION */

?php
//Delete Areas and All Subjects for the Area
$host = localhost;
$user = root;
$pass = pwd;
$database = new_kb;

// Connecting to the Database
$connect = mysql_connect($host, $user, $pass) or die(could not connect to
server);
$db_select = mysql_select_db($database) or die(could not select the
database);

// Get Area ID
$sql = SELECT id FROM kb_areas WHERE area = '$area_todelete' ;
$result = mysql_query($sql) or die(could not complete your query for Area
ID);
$area_id = mysql_result($result, 0, id);
?

pConfirm Deletion/p
pAre you sure you wish to delete the general area, b?php echo
$area_todelete?/b/p

form action='kb_areas_add.php' method=post name=DeleteTopic
input type=submit name=DeleteArea value=Delete   ba
href=kb_areas_add_test.phpCancel/a/b
/form

?php
//Delete area from kb_areas
$sql2 =  DELETE FROM kb_areas WHERE id = $area_id;
$result2 = mysql_query($sql2) or die(couldn't complete your query to delete
the areas);
?

?php
//Delete subjects from kb
$sql3 =  DELETE FROM kb WHERE area_id = $area_id;
$result3 = mysql_query($sql3) or die(couldn't complete your query to delete
the subjects);
?




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




[PHP] Re: stuck n00b

2002-10-01 Thread Jome

 ?php
 echo $HTTP_SERVER_VARS['userName'];
 ?

Make it $_POST['userName'] (or $HTTP_POST_VARS['userName'], but that's
deprecated).

   Jome



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




RE: [PHP] stuck n00b

2002-10-01 Thread Jay Blanchard

[snip]
Submits to addUser.php:

?php
echo $HTTP_SERVER_VARS['userName'];
?

Returns this error in my browser:

Notice: Undefined index: userName in E:\Inetpub\wwwroot\Test\addUser.php on
line 11

Is there a setting in my php.ini file I need to change? register_globals is
off, as that seems to be the preferred method now. But that's my issue,
trying to access this external variable. $_REQUEST doesn't work. $_POST
doesn't either. I have other scripts that it's working in, but I may not
know what I'm saying here.

PHP 4.2.3 on IIS (personal web server or whatever it's called) on WinXP Pro.
[/snip]

You mentioned everything but $_GET{'userName'] :^]
Since the form method=GET this is what you would have to do to 'get' the
result you're looking for.

HTH!

Jay



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




RE: [PHP] Confirm a Deletion

2002-10-01 Thread Jay Blanchard

[snip]
The way the code is written, the record gets deleted immediately upon
clicking the submit button on page one.  Is there some way I can keep the
script on page two from executing until after I press the confirmation
button?
[/snip]

One of two ways, an intermediary PHP page that asks Are you sure? while
carrying the information forward, or a JavaScript pop-up confirmation dialog
box.

HTH!

Jay



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




RE: [PHP] stuck n00b

2002-10-01 Thread Jay Blanchard

[snip]
You mentioned everything but $_GET{'userName'] :^]
[/snip]

Ooops, typo!

$_GET['userName']

HTH!

Jay


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




Re: [PHP] stuck n00b

2002-10-01 Thread Chris Nielsen

My form is actually using method=post. And I did use $_POST. Can't
remember if I tried $_GET, but if I'm using post would that even work? I'll
give it a try later and let you know.

Jay Blanchard [EMAIL PROTECTED] wrote in message
000101c2697c$4ad74bc0$8102a8c0@000347D72515">news:000101c2697c$4ad74bc0$8102a8c0@000347D72515...
 [snip]
 Submits to addUser.php:

 ?php
 echo $HTTP_SERVER_VARS['userName'];
 ?

 Returns this error in my browser:

 Notice: Undefined index: userName in E:\Inetpub\wwwroot\Test\addUser.php
on
 line 11

 Is there a setting in my php.ini file I need to change? register_globals
is
 off, as that seems to be the preferred method now. But that's my issue,
 trying to access this external variable. $_REQUEST doesn't work. $_POST
 doesn't either. I have other scripts that it's working in, but I may not
 know what I'm saying here.

 PHP 4.2.3 on IIS (personal web server or whatever it's called) on WinXP
Pro.
 [/snip]

 You mentioned everything but $_GET{'userName'] :^]
 Since the form method=GET this is what you would have to do to 'get' the
 result you're looking for.

 HTH!

 Jay





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




RE: [PHP] Confirm a Deletion

2002-10-01 Thread John W. Holmes

Just create a middle page that stores the value of $area_todelete in a
hidden field.

input type=hidden name=area_todelete
value=?=htmlentities($_POST['area_todelete'])?

You YES button would submit it to the delete code you already have,
the NO confirmation button would send the user somewhere else, maybe
back to the choose area page. 

I hope that's not too confusing.

---John Holmes...

 -Original Message-
 From: Roger Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 2:51 PM
 To: Php-General
 Subject: [PHP] Confirm a Deletion
 
 I know this should be very simple, but I just don't get it.
 
 I want to delete a record from a mysql table, but prior to deleting
the
 record I want to receive an option to confirm the deletion.  On page
one
 (kb_areas_add.php) I have a form for inputting the field
(area_todelete)
 for
 the record I want to delete.  The form action goes to page two
 (kb_areas_delete) on which I am asked to confirm the deletion.  I want
to
 be
 able to press the delete button to delete the record, or the cancel
button
 to cancel the operation.
 
 The way the code is written, the record gets deleted immediately upon
 clicking the submit button on page one.  Is there some way I can keep
the
 script on page two from executing until after I press the confirmation
 button?
 
 Thanks for any suggestions.
 
 
 /* FORM FOR SELECTING AREA TO DELETE */
 
 form action='kb_areas_delete.php' method=post name=DeleteAnArea
 input type=submit name=DeleteArea value=Delete Area border=0
 Area: input type=text name=area_todelete size=24 border=0
 /form
 
 
 /* FORM TO CONFIRM DELETION */
 
 ?php
 //Delete Areas and All Subjects for the Area
 $host = localhost;
 $user = root;
 $pass = pwd;
 $database = new_kb;
 
 // Connecting to the Database
 $connect = mysql_connect($host, $user, $pass) or die(could not
connect to
 server);
 $db_select = mysql_select_db($database) or die(could not select the
 database);
 
 // Get Area ID
 $sql = SELECT id FROM kb_areas WHERE area = '$area_todelete' ;
 $result = mysql_query($sql) or die(could not complete your query for
Area
 ID);
 $area_id = mysql_result($result, 0, id);
 ?
 
 pConfirm Deletion/p
 pAre you sure you wish to delete the general area, b?php echo
 $area_todelete?/b/p
 
 form action='kb_areas_add.php' method=post name=DeleteTopic
 input type=submit name=DeleteArea value=Delete   ba
 href=kb_areas_add_test.phpCancel/a/b
 /form
 
 ?php
 //Delete area from kb_areas
 $sql2 =  DELETE FROM kb_areas WHERE id = $area_id;
 $result2 = mysql_query($sql2) or die(couldn't complete your query to
 delete
 the areas);
 ?
 
 ?php
 //Delete subjects from kb
 $sql3 =  DELETE FROM kb WHERE area_id = $area_id;
 $result3 = mysql_query($sql3) or die(couldn't complete your query to
 delete
 the subjects);
 ?
 
 
 
 
 --
 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] stuck n00b

2002-10-01 Thread Jay Blanchard

[snip]
My form is actually using method=post. And I did use $_POST. Can't
remember if I tried $_GET, but if I'm using post would that even work? I'll
give it a try later and let you know.
[/snip]

My bad! I looked at two e-mails from different folks and saw a GET in one,
and a POST in another. Since you are using POST it should be
$_POST['userName'] or $_POST[userName]

Jay



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




RE: [PHP] Protecting files in PHP

2002-10-01 Thread John W. Holmes

 I have some files off of the web root which I'd like to be able to
serve
 up
 to users (*.doc, *.xls). I know I can do this with header(), but how
do I
 reference a file that's outside of the webroot? Thanks!

You can use an absolute or relative path, just like any other reference.

Send the appropriate headers and then use readfile() to send the data.

---John Holmes...



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




[PHP] session lifetime

2002-10-01 Thread Pablo Oliva

session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up
 
Let's say it's set to 900.  How is this counted, from the time of the
session is initialized, or is this counter reset every time you go to a
new page.  Does this makes sense?



RE: [PHP] session lifetime

2002-10-01 Thread John W. Holmes

 session.gc_maxlifetime specifies the number of seconds after which
data
 will be seen as 'garbage' and cleaned up
 
 Let's say it's set to 900.  How is this counted, from the time of the
 session is initialized, or is this counter reset every time you go to
a
 new page.  Does this makes sense?

It would only make sense if the time was reset each time the file is
accessed. So, if the session file hasn't been accessed for over 900
seconds, then it'll be cleaned up. Otherwise, you'd lose a perfectly
fine session after 900 seconds even if you're still active. 

---John Holmes...



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




RE: [PHP] GET POST Problem

2002-10-01 Thread John W. Holmes

This question comes up a lot. It's a browser setting, if I remember
right. IE decides it will not repost the data for you, so the page
isn't rendered. 

You could use the GET method in your forms and this won't happen.

---John Holmes...

 -Original Message-
 From: Francisco Vaucher [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 7:29 AM
 To: PHP List (E-mail)
 Subject: [PHP] GET POST Problem
 
 Hi (I'm sending this again becasue i didn't find a solution yet)
 
 I have a problem when i'm sending form data. The issue happens when I
 build
 a mysql query with some form input data. I send the info and I get 'n'
 results from mysql server. With this I build a list that has links to
the
 records that match
 the query. Next step I display one of the items on my query. OK, now
here
 is
 where I have the problem. When I go back, the IE gives me an error
that
 can't show the page because it was made up with form data and if I
want
 to
 see the page again, i have to make a refresh. IE wount send the
 information
 itself.
 
 I'm running an Apache Server under RH 7.2. and PHP 4.2.0/1
 
 With IIS I don't have this problem.
 
 Anyone have an idea for this issue ? I think that is a directive in
the
 php.ini file. But I don't know wich one is.
 
 Help would be appreciated
 
 Thanks
 
 Francisco M. Vaucher



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




[PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

Hi,

how can I call a html site from my php script? I want to redirect the user
to different html site depends on the php script result.

Thanks!




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




Re: [PHP] Call HTML from php

2002-10-01 Thread Adam Williams

www.php.net/header

Adam


On Tue, 1 Oct 2002, Anna Gyor wrote:

 Hi,

 how can I call a html site from my php script? I want to redirect the user
 to different html site depends on the php script result.

 Thanks!







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




RE: [PHP] Call HTML from php

2002-10-01 Thread John W. Holmes

 how can I call a html site from my php script? I want to redirect the
user
 to different html site depends on the php script result.

Header(Location: http://www.domain.com/page.html;);

---John Holmes...



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




[PHP] Server Running Slow

2002-10-01 Thread Jay

Hello-

I'm running Engarde Linux v1.2 (a secure version of Linux) and it has PHP
4.0.6 installed on it as default (if asked I will explain why it's such an
old version).  When I run Apache's ab command the results I am getting in
return are not very good.  Almost 10 seconds for a script to run.  On my
production server right now it's taking less than a second.  The production
server is running AMD 650 with 512 Ram with PHP 4.0.6.  The new servers I'm
testing and trying to move to one is a Web server and the other is the DB
server.  Their specs are PIII 933 witha Gig of ram each.  My phpinfo is
located at http://206.242.133.162:96/phpinfo.php and below is what my
httpd.conf file looks like.  I'm not sure why php is running so slowly on
the machine so any ideas/help would be great!

httpd.conf
===


# httpd.conf -- Configuration file for apache.
# Customized for use with EnGarde Linux and the AllCommerce package.
#
# Ryan W. Maple [EMAIL PROTECTED]
# December 2, 2000





# Server Defaults
##



### This should always be 'standalone'.
ServerType standalone

### The 'root' of the server (config, modules, etc).
ServerRoot /etc/httpd

### The lock file used by the process.
LockFile /var/lock/httpd.lock

### The file that holds the PID of the master process.
PidFile /var/run/httpd.pid

###  The amount of time Apache will wait for some operations (GET, POST,
etc).
Timeout 300

### Allow multiple requests to be sent over the same TCP connection.
KeepAlive On

### Basic performance tuning.  Read the apache manual for information.
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 20
StartServers 8
MaxClients 150
MaxRequestsPerChild 100

### Default port, user, and group the daemon runs to/listens on.
Port 80
User webd
Group webd

### Ports to listen on.
#duclaw.org
Listen 80
Listen 443

#krox.com
Listen 82

#klbjfm.com
Listen 84

#klbjam.com
Listen 86

#kgsr.com
Listen 88

#kxmg.com
Listen 90

#oldies103austin.com
Listen 92

#kgsritm
Listen 94

#lbjs.com
Listen 96


### Generate self-referenced URLs.
UseCanonicalName On

### Disable DNS lookups.
HostnameLookups Off

### Default 'Content-type:' used when an unknown is encountered.
DefaultType text/plain

### Only send product information, not version or host information.
ServerTokens Prod





# Load Modules
#


LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule env_module modules/mod_env.so
LoadModule config_log_module  modules/mod_log_config.so
LoadModule agent_log_module   modules/mod_log_agent.so
LoadModule referer_log_module modules/mod_log_referer.so
LoadModule mime_modulemodules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule status_module  modules/mod_status.so
LoadModule info_modulemodules/mod_info.so
LoadModule includes_modulemodules/mod_include.so
LoadModule autoindex_module   modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule asis_modulemodules/mod_asis.so
LoadModule imap_modulemodules/mod_imap.so
LoadModule action_module  modules/mod_actions.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module   modules/mod_alias.so
LoadModule access_module  modules/mod_access.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_modulemodules/mod_setenvif.so
LoadModule ssl_module modules/libssl.so
LoadModule auth_modulemodules/mod_auth.so
LoadModule auth_modulemodules/mod_auth.so
LoadModule php4_modulemodules/libphp4.so





# Add Modules
##


ClearModuleList

AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule 

Re: [PHP] Call HTML from php

2002-10-01 Thread John Wards

header(location:http://yourstuff;);

Do this before any output to the user. eg echos or displaying html

John
- Original Message -
From: Anna Gyor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 8:40 PM
Subject: [PHP] Call HTML from php


 Hi,

 how can I call a html site from my php script? I want to redirect the user
 to different html site depends on the php script result.

 Thanks!




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

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




RE: [PHP] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread James Mackie

Yes.. Apachectl just calls the commands that I send manually.. Which is
why I don't use it. Apachectl graceful just recalls 'kill -USR1 PID'. 

-Original Message-
From: Rick Widmer [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 7:35 AM
To: Erwin; [EMAIL PROTECTED]
Subject: Re: [PHP] Apache 1.3.26 + PHP 4.2.3


At 01:54 PM 10/1/02 +0200, Erwin wrote:
James Mackie wrote:
  Since I installed apache from source and not an RPM I do not have an
  rc file that the service command would use. I start apache in the
  rc.local file. -USR1 should be the 'NICE' way to reload the
  configuration files as per the apache documentation and has worked
  for many versions. Its just with PHP 4.2.3 that it stops working.

Is apachectl graceful an option?
apachectl resided in the apache installation dir.


 From apachectl...


graceful)
if [ $RUNNING -eq 0 ]; then
 ...
 ...
else
   if $HTTPD -t /dev/null 21; then
  if kill -USR1 $PID; then
   ^

I don't think apachectl will help, since it uses kill -USR1 to do a 
graceful restart.




-- 
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] Apache 1.3.26 + PHP 4.2.3

2002-10-01 Thread James Mackie

You are correct.. Installing from source would not delete the file..
But.. I install servers from scratch.. When installing RedHat I only
install the base packages that are required for it to boot up and
maintain the server. All server programs (Apache, MySQL, FTP, SSH, Etc),
critial libraries (Openssl, GD, Etc), and the latest Linux Kernel, are
all installed from source manually after the RedHat install is
completed. 

The other problem is that the rc files only call apachectl. Apachectl
just makes the sames calls that I do manually to control the server. So
therfore the rc files, or apachectl would still crash the server.

Does anyone else have a server setup other than myslef with that can
verify that it isn't just my servers that die on a -USR1 (graceful)
restart? Or am I just cursed in some way. :) 



-Original Message-
From: Chris Hewitt [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 01, 2002 6:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Apache 1.3.26 + PHP 4.2.3




James Mackie wrote:

Since I installed apache from source and not an RPM I do not have an

It would have existed before you compiled/installed from source 
(assuming apache was installed beforehand). If the httpd executable is 
in the same place then the service command should still work. At 
least, I'd be very surprised if installing from source deletes it. Does 
/etc/init.d/httpd not exist?

for many versions. Its just with PHP 4.2.3 that it stops working.

Have you managed to find the file apachectl?

Regards

Chris



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





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




RE: [PHP] Confirm a Deletion

2002-10-01 Thread Roger Lewis

Jay Blanchard wrote:

 One of two ways, an intermediary PHP page that asks Are you sure? while
 carrying the information forward, or a JavaScript pop-up confirmation
dialog
 box.

 HTH!

 Jay

 And John Holmes wrote:
 Just create a middle page that stores the value of $area_todelete in a
 hidden field.

 input type=hidden name=area_todelete
 value=?=htmlentities($_POST['area_todelete'])?

 You YES button would submit it to the delete code you already have,
 the NO confirmation button would send the user somewhere else, maybe
 back to the choose area page.

 I hope that's not too confusing.

 ---John Holmes...
Thanks guys.  The intermediate page scheme worked.

I added the hidden field like so because I couldn't get htmlentities to
work:

input type=hidden name=area_todelete value=?=$area_todelete?

I appreciate the help.

Roger

 -Original Message-
 From: Roger Lewis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 2:51 PM
 To: Php-General
 Subject: [PHP] Confirm a Deletion

 I know this should be very simple, but I just don't get it.

 I want to delete a record from a mysql table, but prior to deleting
the
 record I want to receive an option to confirm the deletion.  On page
one
 (kb_areas_add.php) I have a form for inputting the field
(area_todelete)
 for
 the record I want to delete.  The form action goes to page two
 (kb_areas_delete) on which I am asked to confirm the deletion.  I want
to
 be
 able to press the delete button to delete the record, or the cancel
button
 to cancel the operation.

 The way the code is written, the record gets deleted immediately upon
 clicking the submit button on page one.  Is there some way I can keep
the
 script on page two from executing until after I press the confirmation
 button?

 Thanks for any suggestions.


 /* FORM FOR SELECTING AREA TO DELETE */

 form action='kb_areas_delete.php' method=post name=DeleteAnArea
 input type=submit name=DeleteArea value=Delete Area border=0
 Area: input type=text name=area_todelete size=24 border=0
 /form


 /* FORM TO CONFIRM DELETION */

 ?php
 //Delete Areas and All Subjects for the Area
 $host = localhost;
 $user = root;
 $pass = pwd;
 $database = new_kb;

 // Connecting to the Database
 $connect = mysql_connect($host, $user, $pass) or die(could not
connect to
 server);
 $db_select = mysql_select_db($database) or die(could not select the
 database);

 // Get Area ID
 $sql = SELECT id FROM kb_areas WHERE area = '$area_todelete' ;
 $result = mysql_query($sql) or die(could not complete your query for
Area
 ID);
 $area_id = mysql_result($result, 0, id);
 ?

 pConfirm Deletion/p
 pAre you sure you wish to delete the general area, b?php echo
 $area_todelete?/b/p

 form action='kb_areas_add.php' method=post name=DeleteTopic
 input type=submit name=DeleteArea value=Delete   ba
 href=kb_areas_add_test.phpCancel/a/b
 /form

 ?php
 //Delete area from kb_areas
 $sql2 =  DELETE FROM kb_areas WHERE id = $area_id;
 $result2 = mysql_query($sql2) or die(couldn't complete your query to
 delete
 the areas);
 ?

 ?php
 //Delete subjects from kb
 $sql3 =  DELETE FROM kb WHERE area_id = $area_id;
 $result3 = mysql_query($sql3) or die(couldn't complete your query to
 delete
 the subjects);
 ?




 --
 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] checkbox objects returning false for isset() when submitted via a form.

2002-10-01 Thread DonPro

Hi,

I have a form that submits to itself via:
form name=hsform method=POST action=?=$_SERVER['PHP_SELF'] ? 

Within my form, I have some checkbox objects.  If I check them and submit my
form, isset(variable) returns true.  However, if I do not check them and
submit my form, isset(variable) returns false.

I am confused as I though that isset() returns true if the variable exists
regardless if it is empty or not.  Is there a way to do what I want?

Using php 4.2.1 on RedHat Linux 6.2

Thanks,
Don



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




[PHP] eregi_replace / preg_match_all

2002-10-01 Thread Jennifer Swofford

Why does this work:

$contents =
eregi_replace((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
\blah.gif, $contents);

But this does not:

preg_match_all((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
$contents, $matches);

for ($i=0; $i count($matches[0]); $i++) {
echo matched: .$matches[0][$i].\n
}

I get this error:

Warning: Unknown modifier '(' in
/home/littleduck/www/www/newcontrol/temp/fread.php on
line 20

The first example finds/replaces fine.  The second
does not find at all.  (If I replace the regular
expression string with something simple like
(gif|jpg) it works.)

Thank you for any hints!
Jen


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

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




Re: [PHP] checkbox objects returning false for isset() when submittedvia a form.

2002-10-01 Thread Chris Wesley

On Tue, 1 Oct 2002, DonPro wrote:

 Within my form, I have some checkbox objects.  If I check them and submit my
 form, isset(variable) returns true.  However, if I do not check them and
 submit my form, isset(variable) returns false.
 I am confused as I though that isset() returns true if the variable exists
 regardless if it is empty or not.  Is there a way to do what I want?

Checkbox values are only sent if they are on (checked).

http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.2

~Chris


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




Re: [PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

First thanks a lot, but

I have the following code:

?
$database=PH;
mysql_connect(localhost,test,test);
@mysql_select_db($database);
$query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE (ph_user.FIRST_NAME
= \test\  );
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
if ($num  0){ Header(Location: file://c:/Test/company.html); }
else { Header(Location: file://c:/Test/register.html); }
?

And I become an error message:

Warning: Cannot add header information - headers already sent by (output
started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11

What can I do?

Thanks!


John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
 header(location:http://yourstuff;);

 Do this before any output to the user. eg echos or displaying html

 John
 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 8:40 PM
 Subject: [PHP] Call HTML from php


  Hi,
 
  how can I call a html site from my php script? I want to redirect the
user
  to different html site depends on the php script result.
 
  Thanks!
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



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




Re: [PHP] eregi_replace / preg_match_all

2002-10-01 Thread Kevin Stone

Unknown modifier definitely has to do with the regular expression. Don't
regex's need a beginning and ending delimeter apart from the quote?

/(\)(.(\/))*[A-Z0-9_\/-]+(.gif|.jpg)/

Maybe that's it?  But if so I dunno why the other one would be working.

-Kevin

- Original Message -
From: Jennifer Swofford [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 2:20 PM
Subject: [PHP] eregi_replace / preg_match_all


 Why does this work:

 $contents =
 eregi_replace((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
 \blah.gif, $contents);

 But this does not:

 preg_match_all((\)(.(/))*[A-Z0-9_/-]+(.gif|.jpg),
 $contents, $matches);

 for ($i=0; $i count($matches[0]); $i++) {
 echo matched: .$matches[0][$i].\n
 }

 I get this error:

 Warning: Unknown modifier '(' in
 /home/littleduck/www/www/newcontrol/temp/fread.php on
 line 20

 The first example finds/replaces fine.  The second
 does not find at all.  (If I replace the regular
 expression string with something simple like
 (gif|jpg) it works.)

 Thank you for any hints!
 Jen


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

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



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




[PHP] Re: submitting a form to multiple places!!!

2002-10-01 Thread Henry

No takers?

Is this such a difficult problem?

Please help.

Henry

Henry [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All,

 I have a problem that I hope you can help me with.

 I'm using a third party shopping cart solution which is quite frankly
naff.
 They bundle some autoresponders with it. Unfortunately the autoresponders
do
 not work!.  I want to find a temporary solution  to this. The easiest way
 would be to allow a form to be submitted to more than one place!

 Basically I would lke to have an intermediate php page that will submit
the
 details (submitted to it) to two other pages and then follow the response
of
 one of those other pages (the primary page). That way I can insert a
 different autoresponder handling system into the submission process but
 continue to use the shopping carts pages for the time being.

 Any suggestions?

 Henry





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




  1   2   3   >