Re: [PHP] A PHP Editor

2001-07-27 Thread Miles Thompson

Augusto,

This has been exhaustively covered, and I believe someone has set up a page 
that deals specifically with PHP and editors.

You can search the archives, however, at
http://www.php.net/search.php

Use editor as your search term, pick the general list, and there are scores 
of messages.

Good luck - Miles Thompson



At 04:08 PM 7/27/01 -0300, Augusto Cesar Castoldi wrote:
Hi.

I'm using the PHPEd (http://www.soysal.com/PHPEd) as my default editor.

But this program aren't very good, it's instable. Something crash...

Do you know a good php editor?

thanks,

Augusto


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


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




[PHP] Re: Moving a PHP/MySQL web site ???

2001-07-27 Thread Owen Rudge

You can use phpmyadmin to dump the database into .sql files and then use
phpmyadmin again on the new server to import it.

--
Owen Rudge
http://www.owenrudge.co.uk/
http://www.gamearchive.uk.tt/



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




[PHP] HTTP_REFERER is missing in SSL

2001-07-27 Thread Ezra Nugroho

I have a frameset that runs on a SSL enabled server that has two frames in it.
One of the source is the local machine and the other one is a (outsourced 
asp !!) script in another machine without SSL.
The non SSL one requires HTTP_REFERER to make sure it was hit from the 
authorized server.

This works fine with Netscape but not with IE 5. HTTP_REFERER just wasn't 
defined.

Any explanation?


Ezra Nugroho
Web/Database Application Specialist
Goshen College ITS
Phone: (219) 535-7706


Don't be humble, you're not that great. -- Golda Meir


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




[PHP] --with-imap-ssl

2001-07-27 Thread Held Markus

Hello,

i have a big problem. I want to compile php4.0.6  ./configure 
--with-imap --with-imap-ssl=/usr/lib 

checking for IMAP support... yes
checking for pam_start in -lpam... (cached) yes
checking for Kerberos support in IMAP... no
checking for SSL support in IMAP... yes
configure: error: This c-client library does not support SSL. Recompile 
or remove --with-imap-ssl from configure line.


i updated my imap to imap2000c
i updated my c-client to the newest

cp c-client.h /usr/lib/c-client.h
cp c-client.a /usr/lib/c-client.a

and copy rfc822.h, mail.h and linkage.h to   /usr/local/include


my config.log

configure:22595: checking for Kerberos support in IMAP
configure:22793: checking for SSL support in IMAP
configure:22914: gcc -o conftest -g -O2  -DEAPI_MM -DLINUX=2 
-DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT  
-Wl,-rpath,/usr/local/lib -L/usr/local/
configure:22891: warning: initialization makes integer from pointer 
without a cast
configure:22891: parse error before `void'
configure: failed program was:

DLIBS=-lssl -lcrypto -lc-client 

#line 22889 configure
#include confdefs.h


whats wrong. Have anyone an idea

mfg snooter



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




RE: [PHP] installing php as cgi on linux

2001-07-27 Thread Jon Snell

This is a long shot, but...  MSIE has a nasty habit of saving the mime type
of a page.  If you attempted to load the URL before PHP was set up properly,
it won't load until after you closed IE and reopened.


-Original Message-
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 2:20 PM
To: php
Subject: [PHP] installing php as cgi on linux


I am trying to get php as cgi installed on a RedHat7 box to be used
with Apache. I configured it with ./configure --with-mysql  did a make
and then a make install every thing whet just fine. I add
ScriptAlias /php/ /usr/local/bin/php
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps

to the httpd.conf file. and restarted Apache.

When I try to run a test file with a .php ext All it does is try to
download it. This should be simple but I can not figure it out.
What else should I look at?




















Best regards,
 Richard
mailto:[EMAIL PROTECTED]


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


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




[PHP] idiotic question

2001-07-27 Thread Jerry Lake

for the life of me I can't remember
how to convert a string to just the first
letter of itself i.e. $string = test
...a function
$string_first = t

I must be thinking in circles today.

Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com



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




Re: [PHP] HTTP_REFERER is missing in SSL

2001-07-27 Thread Rasmus Lerdorf

 I have a frameset that runs on a SSL enabled server that has two frames in it.
 One of the source is the local machine and the other one is a (outsourced
 asp !!) script in another machine without SSL.
 The non SSL one requires HTTP_REFERER to make sure it was hit from the
 authorized server.

 This works fine with Netscape but not with IE 5. HTTP_REFERER just wasn't
 defined.

 Any explanation?

Bug in IE?  PHP doesn't even enter the picture here.  The HTTP_REFERER
variable is defined by the web server if that information is provided by
the browser.

Keep in mind that there is absolutely no guarantee that the browser will
ever provide this information.  Building anything that relies on this is a
mistake.

-Rasmus


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




Re: [PHP] idiotic question

2001-07-27 Thread mike cullerton

on 7/27/01 3:46 PM, Jerry Lake at [EMAIL PROTECTED] wrote:

 for the life of me I can't remember
 how to convert a string to just the first
 letter of itself i.e. $string = test
 ...a function
 $string_first = t
 

$word = substr($word,0,1);

 -- mike cullerton



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




Re[2]: [PHP] installing php as cgi on linux

2001-07-27 Thread Richard Kurth

Hello Jon,

tried that it still just wants to download it

Friday, July 27, 2001, 2:49:14 PM, you wrote:

Jon Snell This is a long shot, but...  MSIE has a nasty habit of saving the mime type
Jon Snell of a page.  If you attempted to load the URL before PHP was set up properly,
Jon Snell it won't load until after you closed IE and reopened.


Jon Snell -Original Message-
Jon Snell From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Jon Snell Sent: Friday, July 27, 2001 2:20 PM
Jon Snell To: php
Jon Snell Subject: [PHP] installing php as cgi on linux


Jon Snell I am trying to get php as cgi installed on a RedHat7 box to be used
Jon Snell with Apache. I configured it with ./configure --with-mysql  did a make
Jon Snell and then a make install every thing whet just fine. I add
Jon Snell ScriptAlias /php/ /usr/local/bin/php
Jon Snell AddType application/x-httpd-php .php4 .php3 .phtml .php
Jon Snell AddType application/x-httpd-php-source .phps

Jon Snell to the httpd.conf file. and restarted Apache.

Jon Snell When I try to run a test file with a .php ext All it does is try to
Jon Snell download it. This should be simple but I can not figure it out.
Jon Snell What else should I look at?




















Jon Snell Best regards,
Jon Snell  Richard
Jon Snell mailto:[EMAIL PROTECTED]


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





-- 
Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] top reports Status D

2001-07-27 Thread Werner Stuerenburg

Sorry, I don't know if this is a php or Apache or MySQL or even
Linux problem. Any suggestion would be of help.

Server Version: Apache/1.3.19 (Unix) PHP/4.0.4pl1
MySQL 3.23.33

When watching top, things go nicely for a while. If there is high
load, it is significant that mostly httpd processes are shown,
very seldom a mysql process.

All of a sudden, the picture changes. Some mysql processes show
up with status column showing D instead of R, meaning
uninterruptible sleep versus running.

Looking at processlist, I may or may not see mysql processes. If
I do, there are all kinds of status reports like sorting,
opening, copying to tmp table etc.

Without that state, I have little chance to see any processes at
all (except root looking for processlist :-)), which seems to
show that mysql is extremely fast.

With these few mysql processes in status D, very fast some httpd
processes show status D as well, and in addition, if there were
many processes running and showing before, we have only a few
shown with status D and few if any running. So if I let top run
in the background without really watching, I will notice this
change by the number of rows shown alone.

Response time will decline very fast, load average will rise
instead, and we have seen values of up to 200, at which situation
the machine is essentially non responding to anything.

The only remedy we know to date is killing and restarting Apache,
which we do with a cron job every minute evaluating load average,
but that's just a workaround for the moment. We will refine this
watching for status D.

I thought about bad queries or faulty code, but the data below
does not back this idea.

Also, we thought that the machine could not handle the load, but
it happens with few hits as well and does not seem to accelerate
significantly with heavy load.

Actually, I don't know if the data shown below relates to Status D
or not, but it is highly peculiar in any case and maybe
significant. These are the first data that really show something
weird. I have processlist and Apache status, but neither showed
anything valuable.

To find out about that phenomenon I am hunting for 10 days
already, I added a stopwatch and record the elapsed time for each
URL from entry of page construction to end.

Right from the start, I get significant data:

auto Timestamp URL  secs
178 20010727193459 Preis/30-35   1.06
179 20010727193459 Preis/35-40   0.41
180 20010727193500 Preis/18-20  81.55 
181 20010727193505 Preis/40-45   0.81
182 20010727193505 Anzeigen/Woche/9  2.68
183 20010727193526 1461  0.47
184 20010727193531 Preis/20-25  91.86 
185 20010727193538 4485  0.17
186 20010727193549 Berichte/120  0.56

Entries 180 and 184 are extreme. All Preis-URLs fetch classifieds
within that price range (horses 30.000-35.000 DM, for example).

As can be seen from the timestamp alone, this is no human
scanning the pages, rather a spider.

The program is always the same, the table also, the only
difference are the conditioning numbers for the query.

Therefore, it is not likely to be a program or query fault, as
this should produce equally bad figures on all URLs with that
pattern.

The table in question for the above data is ok, as might be
suspected, because it is the same table with all queries, slow or
fast.

I just made a manual test with URL Preis/18-20: it took 2.98
seconds - so this is proof that it is not the data range that
produces the differences. I show at most 10 records, and clearly
there will be more in this range than in range 40-45 (in fact, we
have no offers in this range right now). Time is consumed not in
fetching the data but in producing the html for presenting the
data.

Did anybody ever see something like this?

Should I upgrade to 4.0.6? Is it plausible that this is a problem
with MySQL or php? Any places to look at in addition? Any ideas
of how to track this thing down?


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



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




Re: [PHP] HTTP_REFERER is missing in SSL

2001-07-27 Thread Ezra Nugroho


Bug in IE?  PHP doesn't even enter the picture here.  The HTTP_REFERER
variable is defined by the web server if that information is provided by
the browser.

No, it's not really a PHP thing, it's more HTML stuff.
I suspect that the error comes because one of the server is not running 
SSL, so IE doesn't pass HTTP_REFERER to it.
I wonder if someone has any authoritative knowledge on this problem.


Keep in mind that there is absolutely no guarantee that the browser will
ever provide this information.  Building anything that relies on this is a
mistake.

Yeah, I know, but this is an outsourced script that I have no controll off.


-Rasmus


Ezra Nugroho
Web/Database Application Specialist
Goshen College ITS
Phone: (219) 535-7706


Don't be humble, you're not that great. -- Golda Meir


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




[PHP] mkdir

2001-07-27 Thread Jerry Lake

when using mkdir
I cant seem to make subdirectories
?
$oldumask = umask(0); 
mkdir('test/test', 0777);
umask($oldumask);
?

is there any way to do this ?

Jerry Lake 
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com



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




Re: [PHP] best php editor

2001-07-27 Thread Chip

Martin Marconcini wrote:

 LOL :) I didn't ... perhaps I used an old version...

Must've been an old version, I've been using it for close to a year and
haven't
had it crash nearly as much as expected for a winblows app (at work on
winnt4).
Wish there was a *nix port of it.
--
Chip




 Regards,

 Martin Marconcini
 www.marconcini.com.ar

 Life must be lived looking forward and can be understood only looking
 backward. Soren Kierkegaard

  -Original Message-
  From: elias [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 27, 2001 6:51 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] best php editor
 
  Then you must be one of the 3% who voted Bad at cnet.com ;)
 
  Martin Marconcini [EMAIL PROTECTED] wrote in message
  001401c11673$9b2926a0$[EMAIL PROTECTED]">news:001401c11673$9b2926a0$[EMAIL PROTECTED]...
languages. It is called HTML-kit! I absolutely love it and felt I
 had
   to
share that love with you all.
   
It is free. A little like Homesite, except better in my view.
   Certainly
far
more feature-rich for PHP scripting.
   
Unless I'm missing some serious drawback, it's the best editor for
 web
work
I've found!! Works on Windows. Wish they had a Linux version.
  
   TO be honest, I've used it but it was 2 unstable...
  
   Regards,
  
   Martin.
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]

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

--
Regards,

--
Chip Wiegand
CRW Computer Services
www.wiegand.org
[EMAIL PROTECTED]
--
  Web page design
Consulting
 PC Repair
--




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




Re: [PHP] Example high-profile PHP sites

2001-07-27 Thread Ryan Fischer

You wrote:
 While I do appreciate people's contributions, let me frame the
 discussion a little.  The person I need to convince is an
 administrator of an organization within North America, and he's never
 heard of PHP.  The response I'm hoping to provoke in him is something
 like this:  You mean _ is using this PHP thing?  Wow!  They
 know what they're doing, so we'd better use it, too!

 Does this help frame things?  Thanks for the suggestions!

 -Maurice

Why don't you just say something along the lines of, Look, PHP is the
best programming language for the job you want me to do.  What other
sites are using doesn't matter.  Trust me on this.  I don't tell you how
to (fill in the blanks of whatever this person does).  I assure you that
what you're looking for will be accomplished in a way that will please
you, and that's all you need to know.  :)

Of course, say it in a more tactful, arse-kissing type way than that.
But you get my drift, I think.  ;)

I've always thought monkey-see, monkey-do or what the joneses have
type arguments were better left to the playgrounds of elementary
schools, myself.  Hopefully, the person you're trying to work with can
understand that.  :)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




Re: [PHP] substr question...

2001-07-27 Thread Ryan Fischer

You wrote:
 I am trying to receive file names but can't quite figure out the
proper  substr to do it:

 jeff.dat
 jeffrey.dat
 chris.dat
 tom.dat

 I want to receive the name to the left of the .dat

 Jeff

$file = array(jeff.dat, jeffrey.dat, chris.dat, tom.dat);
for($i=0; $icount($file); $i++){
eregi(^(.*)\.dat$, $file[$i], $ary);
$filename = $ary[1];
// Do something with $filename
print $filenamebr\n;
}

HTH!  :)

--
 -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/



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




[PHP] FORCING A PHP OUTPUT TO BE CACHED

2001-07-27 Thread Randy Johnson

Is it possible to force a confirmation page that is displayed via a post
operation to be cached so it will not rerun the script when somebody hits
the refresh button?   I am hoping it is easy as using a header   thanks
in advance


Randy


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




[PHP] Re: [PHP-DEV] Passing JavaScript variables to PHP

2001-07-27 Thread Markus Fischer

On Fri, Jul 27, 2001 at 04:31:51PM -0500, Craig Gardner wrote : 
 Is there any way to pass JavaScript variables to PHP?

This doesn't belong in here; this list is for the development OF
php and _not_ WITH. Ask at [EMAIL PROTECTED]

- Markus

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

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




RE: [PHP] Please Please Pleeeeaaaaaaaaaasssssssseeeeeee

2001-07-27 Thread Ben Bleything

There are a wealth of available scripts at other websites...
www.hotscripts.com for instance... I find it unlike at this point that
anybody will send you anything... Just go there, or to SourceForge, and
you'll find all you need.

Ben

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 27, 2001 5:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Please Please Plaaeee

Can everybody please send me a simple script they have made it doesnt
matter what, i just need some material to learn from, i learn better
hands on.


-legokiller666-
http://www.StupeedStudios.f2s.com
New address new site

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666




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




[PHP] auto refresh in every five seconds.

2001-07-27 Thread Mark Lo

Hi,

I would like to know how to do a auto refresh in every five seconds.

Thanks

Mark


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




Re: [PHP] auto refresh in every five seconds.

2001-07-27 Thread Matt Greer


- Original Message -
From: Mark Lo [EMAIL PROTECTED]
To: php general [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 10:40 PM
Subject: [PHP] auto refresh in every five seconds.


 Hi,

 I would like to know how to do a auto refresh in every five
seconds.

This isn't php, and javascript can surely do this. But this will also do
it...

META HTTP-EQUIV=Refresh
content=X;URL=http://www.website.com/index.html;

Where X is the number of seconds between refreshes, and set the url to
itself. Place this within the head.

Matt




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




[PHP] Stripping single quotes

2001-07-27 Thread Matt Stone

Hi all,
I am trying to validate some email addresses before they are entered into
the database.
The problem is, some thick or malicious people are entering single quotes
into their email addresses.
I need to strip out all these single quotes but a little ole' str_replace
doesn't seem to be working.
Here it is:

$fldemail == str_replace(',,$fldemail);

Nice and basic :)
Can anyone please enlighten me on this?
Thanks in advance,

Matt Stone


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




[PHP] PHP on win2k/Weblogic?

2001-07-27 Thread Rory O'Connor

I have been using PHP/MySQL to build alot of little utilities (like form
mailers, contact DBs etc.) for my sites on linux and freebsd, but I just
got a client requiring a win2k server running WebLogic (for JSP
purposes).  Can I even install PHP in that environment and if so, would
it conflict with the JSP servlets?  I would love to figure out a way to
leverage the PHP utilities i've built and tested.

If not, would ActiveState Perl be usable in that setup?  if I can't use
PHP, perl would be the next best thing.  Worst case scenario is I have
to bite the bullet and try to figure out JSP and re-build the utilities
with that.

Thanks!

providing the finest in midget technology

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




[PHP] Adding scripts

2001-07-27 Thread Tim Thorburn

Hi,

I'm creating a very simple script (or so I thought) in which a user can 
select items from a form, the script will take the number values of those 
items and do two things: display the names of the items selected, and add 
the items together and give the user a total price including taxes.

In my form, I use the following syntax:
input type=checkbox name=hit_955 value=14.72

The form is then sent using the POST method.

I then retrieve the values using the following syntax:
$hit_955 = $HTTP_POST_VARS[hit_955];

All together there are 14 items a user can choose - for testing purposes, I 
chose all items.  The script would only display and add the first, second, 
and tenth items.  All others are ignored.

Here is the script - its broken into three parts - the first part is 
collecting the information - the second part is doing the actual math - and 
the third part displays the item names that the user chose.  Does anyone 
see anything wrong with this script, or have a possible reason why its only 
choosing 3 out of 14 items to work with?

PART ONE:
?

$SubTotal = 0;
$FormattedSubTotal = 0;
$Total = 0;
$FormattedTotal = 0;

$PST = 1.08;
$GST = 1.07;
$CalcPST = 0;
$CalcGST = 0;
$FormattedPST = 0;
$FormattedGST = 0;

$nokia252c = 0;
$battery = 0;
$hit_955 = 0;
$hit_965 = 0;
$nok_cbl_7 = 0;
$nok_lch_6rpd = 0;
$nok_cgh10 = 0;
$nok_lch9 = 0;
$belt_252 = 0;
$nokia_0261670 = 0;
$s_nok_0261669 = 0;
$nok_mbc_3k = 0;
$nok_cark_89 = 0;
$nok_cark_90 = 0;

$nokia252c = $HTTP_POST_VARS[nokia252c];
$battery = $HTTP_POST_VARS[battery];
$hit_955 = $HTTP_POST_VARS[hit_955];
$hit_965 = $HTTP_POST_VARS[hit_965];
$nok_cbl_7 = $HTTP_POST_VARS[nok_cbl_7];
$nok_lch_6rpd = $HTTP_POST_VARS[nok_lch_6rpd];
$nok_cgh10 = $HTTP_POST_VARS[nok_cgh10];
$nok_lch9 = $HTTP_POST_VARS[nok_lch9];
$belt_252 = $HTTP_POST_VARS[belt_252];
$nokia_0261670 = $HTTP_POST_VARS[nokia_0261670];
$s_nok_0261669 = $HTTP_POST_VARS[s_nok_0261669];
$nok_mbc_3k = $HTTP_POST_VARS[nok_mbc_3k];
$nok_cark_89 = $HTTP_POST_VARS[nok_cark_89];
$nok_cark_90 = $HTTP_POST_VARS[nok_cark_90];

?

PART TWO:
?
$SubTotal = $nokia252c + $battery + $hit_955 + $hit_965 + $nok_cbl_7 + 
$nok_lch_6rpd + $nok_cgh10 + $nok_lch9 + $belt_252 + $nokia_0261670 + 
$s_nok_0261669 + $nok_mbc_3k + $nok_cark_89 + $nok_cark_90;
$CalcPST = ($SubTotal * $PST) - $SubTotal;
$CalcGST = ($SubTotal * $GST) - $SubTotal;
$Total = $SubTotal + $CalcPST + $CalcGST;
$FormattedSubTotal = number_format($SubTotal, 2);
$FormattedPST = number_format($CalcPST, 2);
$FormattedGST = number_format($CalcGST, 2);
$FormattedTotal = number_format($Total, 2);
?

PART THREE:
? if ($nokia252c  0)
{
   echo Nokia 252c;
}
   else
{
   echo ;
} ?


Thanks
-Tim


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




[PHP] install PHP --with-java on FreeBSD. No luck.

2001-07-27 Thread SlowPork

Hello.

After I compiled PHP with Java support, I instantiated new class [ eg.?  $system = 
new Java('java.lang.System');  ?  ]. I got blank response, and that child of 
Apache died.  

Is this a bug that I should report?  or I'm missing somthing here?   Any expert please 
give me some suggestions.

For Apache error log, 
[Fri Jul 27 17:40:01 2001] [notice] child pid 48040 exit signal Bus error (10)
[Fri Jul 27 17:40:02 2001] [notice] child pid 48041 exit signal Bus error (10)
[Fri Jul 27 17:40:03 2001] [notice] child pid 48042 exit signal Bus error (10)

I use PHP Version 4.0.6
./configure --with-apxs=/usr/local/sbin/apxs --with-java=/usr/local/linux-jdk1.3.1

phpinfo() shows Java section fine.
java.class.path   
/usr/local/lib/php/php_java.jar:/usr/local/linux-jdk1.3.1/jre/lib/rt.jar
java.home  /usr/local/linux-jdk1.3.1
java.library libjava.so
java.library.path 
/usr/local/lib:/usr/compat/linux/lib:/usr/local/linux-jdk1.3.1/jre/lib/i386:/usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot:/usr/local/linux-jdk1.3.1/jre/lib/i386/native_threads

From, php.ini
java.home=/usr/local/linux-jdk1.3.1
java.class.path=/usr/local/lib/php/php_java.jar:/usr/local/linux-jdk1.3.1/jre/lib/rt.jar
extension_dir=/usr/local/lib/php/20001222
extension=libphp_java.so
java.library.path=/usr/local/lib:/usr/compat/linux/lib:/usr/local/linux-jdk1.3.1/jre/lib/i386:/usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot:/usr/local/linux-jdk1.3.1/jre/lib/i386/native_threads
java.library=libjava.so

I tried both Sun Java 1.3.1, and Blackdown 1.2.2.  It gave same error on Apache.  Java 
itself works fine from shell.

I use FreeBSD 4.3 Stable,  Linux compat mode is on
# kldstat
Id Refs AddressSize Name
 13 0xc010 38c5f4   kernel
 21 0xc0d47000 3000 daemon_saver.ko  (screen saver)
 31 0xc0d4c000 12000linux.ko

I also set LD_LIBRARY_PATH before I start Apache.
# setenv LD_LIBRARY_PATH 
/usr/local/lib:/usr/compat/linux/lib:/usr/local/linux-jdk1.3.1/jre/lib/i386:/usr/local/linux-jdk1.3.1/jre/lib/i386/hotspot:/usr/local/linux-jdk1.3.1/jre/lib/i386/native_threads

I run 'ld' .  Seems it finds most dynamic links.
# ld /usr/local/linux-jdk1.3.1/jre/lib/i386/libjava.so
/usr/libexec/elf/ld: warning: cannot find entry symbol _start; not setting start 
address


Thank you. 
slowpork at hotmail.com



Re: [PHP] Dumping fields.....

2001-07-27 Thread Dell Coleman

Hi
Looks like the range of the TR block overlaps the range of the TH block
I usually generate all the TH stuff first 
You can then generate the TR TD and data elements as needed after that
for each row

HTH

Jeff Lewis wrote:

 Using this function to dump a table, having a problem outputting the value
 below after the SELECT * FROM $ID.

 function dump($ID, $link) {
 echo font class=\txt\Dumped table b$ID/b/fonttable
 border=\1\tr;
 $fields = mysql_list_fields(hyrum_nuke, $ID, $link);
 $columns = mysql_num_fields($fields);
 for ($i = 0; $i  $columns; $i++) {
   echo \tth. mysql_field_name($fields, $i) . /th\n;
 }
 echo /tr;
 $query = mysql_query(SELECT * FROM $ID;);
 while ($line = mysql_fetch_array($query)) {
 while ($value = each($line)){
 $value = ereg_replace(, lt;, $value);
 $value = ereg_replace(, gt;, $value);
 echo td valign=\top\pre$value/pre/td;
 }
 }
 echo /table;
 }

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

--
Dell Coleman
PICO Technology Corp.



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




RE: [PHP] File Upload Size Limits

2001-07-27 Thread Gunther E. Biernat

I once had the same problem in a similar environment, but I never worked on it to fix 
it because it was sufficient for the given purpose. Later, I moved the script 1:1 
(including php.ini) to a server running caudium as web server software and the problem 
was gone...

Huh?


Did anyone have any thoughts on this?  I can upload an 8 MB file, but after
that the upload fails.


I am running PHP 4.0pl1 with Apache 1.3.14 on RedHat Linux 7.1.  I am trying
to do a file upload from the users PC to my web server.  If I do a small
file, the transfer goes fine.  If I do a large file ( 50 MB), the transfer
fails saying either the file was not available for reading or my script just
bombs out.  I need to be able to have people upload large files.  I have
changed the setting in php.ini to upload_max_filesize = 100M.

Do I also need to change the following entries in php.ini?
   max_execution_time = 60
   memory_limit = 8M

Is this an apache limit?  I'm not sure what to do with this as I really need
to be able to transfer large files.


mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.com
__



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




Re[2]: [PHP] IE - View Source

2001-07-27 Thread Morten Winkler Jørgensen



 Besides... do you REALLY have anything so mind bogglingly original in your
 code that you have to
 go to all these extremes to protect it?

MG That's what I've never understood about people wanting to hide their source.
MG HTML isn't rocket science. Any server side scripting won't be seen, and
MG Javascript isn't all that difficult. I can't imagine any webpage that would
MG truly have a reason to hide their source.

Unless, of cause the author in a weak moment put some sensitive
information in a hidden input field to get home free quickly (the
dark path) - not to point at anybody.

Kind regards,
Morten Winkler



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




Re: [PHP] Re: Stripping HTML

2001-07-27 Thread Jon Yaggie

hmm i think there is a function specificlly for html.  but i am not sure

have you tried strip_tags()  it will remove html and php tags from a string
. . .




Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0


- Original Message -
From: Tobe Johnson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 2:37 AM
Subject: [PHP] Re: Stripping HTML


 I am trying to check a data element ($data - which may be up to a few
paragraphs in length) which has html codes within the text.  I need to strip
out all the html coding.  Is there an fairly simple way to do this such as
using thesigns as markers for checking and deleting the html data from
the data element to be displayed?

 Tobe Johnson
 Johnson  Associates, Inc.
 http://www.johnsons.net
 Free web based email and web sites


 --
 Brought to you by Johnson  Associates, Inc.
 http://www.johnsons.net
 Free web sites and web based email accounts


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


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




[PHP] how is it possible?

2001-07-27 Thread Balaji Ankem



Hi! dearest friends,
 
 i am able to connect to mysql server 
through php program and i am able to do operations on the database 
 like choosing particular database and inserting the 
data in to table,deletion and modification and  all..
 

But from dos prompt i am able to connect to mysql 
server.

Can u give the reason and suggestion to me.

Mine is windows 98 machine. PHP 4.0.6 and Mysql 
3.23.36

Thanks in advance.

Regards
-Balaji

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [EMAIL PROTECTED] 




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


Re: [PHP] I want to AUTO_INCREMENT fields

2001-07-27 Thread elias

yes, sort of...
both have same number.

Alexander Skwar [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
So sprach »elias« am 2001-07-26 um 11:23:56 +0200 :
 first field is the primary key and is called 'id' and is an integer,
 and i want another field of type integer to be also autoincremented...

Pardon me - but what would be the use??   Both columns would contain the
same numbers, no?

Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 18 hours 13 minutes



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




Re: Re: [PHP] Re: Stripping HTML

2001-07-27 Thread Tobe Johnson

Du.  Why didn't I catch this from the docs?!  Way to much coffee  Thanks VERY 
much for your help.  Sorry to be a bother.

Tobe Johnson
Johnson  Associates, Inc.
http://www.johnsons.net
Free web based email and web sites

 -Original Message -
 From: 'Jon Yaggie' [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Fri, 27 Jul 2001 13:40:45 +0700
 Subject: Re: [PHP] Re: Stripping HTML

hmm i think there is a function specificlly for html.  but i am not sure

have you tried strip_tags()  it will remove html and php tags from a string
. . .




Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0


- Original Message -
From: 'Tobe Johnson' [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 2:37 AM
Subject: [PHP] Re: Stripping HTML


 I am trying to check a data element ($data - which may be up to a few
paragraphs in length) which has html codes within the text.  I need to stri
p
out all the html coding.  Is there an fairly simple way to do this such as
using thesigns as markers for checking and deleting the html data fro
m
the data element to be displayed?

 Tobe Johnson
 Johnson  Associates, Inc.
 http://www.johnsons.net
 Free web based email and web sites


 --
 Brought to you by Johnson  Associates, Inc.
 http://www.johnsons.net
 Free web sites and web based email accounts


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


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




--
Brought to you by Johnson  Associates, Inc.
http://www.johnsons.net
Free web sites and web based email accounts


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




[PHP] best php editor

2001-07-27 Thread Daniel Goldin \(E-mail\)

Recently there's been a thread about what editor is best for PHP. I have
discovered a new (for me) fantastic editor for HTML, PHP and other scripting
languages. It is called HTML-kit! I absolutely love it and felt I had to
share that love with you all.

It is free. A little like Homesite, except better in my view. Certainly far
more feature-rich for PHP scripting.

Unless I'm missing some serious drawback, it's the best editor for web work
I've found!! Works on Windows. Wish they had a Linux version.

Best,

Daniel


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




[PHP] session gc question

2001-07-27 Thread Greg Donald

Is is possible to set session.gc_probability manually on a per script
basis, similar to the way error reporting is capable of being set?

Thanks,

-- 
---
destiney - (des-ti-ny) - n. 1. deity of all things html, 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...

It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://phptopsites.com/ http://destiney.com/
---



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




[PHP] help regarding mysql

2001-07-27 Thread Balaji Ankem



Hi friend,
 i am unable to connect to mysql server 
today.

windows 98 machine. PHP 4.0.6 and Mysql 3.23.36

c:\mysql\bin mysql -u balaji -p
password:*//pingpong

But i am able to connect through php. what is the 
wrong?

please help out me.

Thanks in advance.

Regards
-Balaji

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [EMAIL PROTECTED] 




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


Re: [PHP] help regarding mysql

2001-07-27 Thread Daniel Rezny

Hello Balaji,

Friday, July 27, 2001, 9:12:28 AM, you wrote:

BA Hi friend,
BAi am unable to connect to mysql server today.

BA windows 98 machine. PHP 4.0.6 and Mysql 3.23.36

c:\mysql\bin mysql -u balaji -p
BA password:*//pingpong

BA But i am able to connect through php. what is the wrong?

BA please  help out me.

BA Thanks in advance.

BA Regards
BA -Balaji

Try to specify a host:
e.g. mysql --host=localhost 

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




Re: [PHP] fopen - warnings

2001-07-27 Thread Nessi

That works!
Thanks a lot :)

Cheers, Nessi


At 17:11 26/07/01 , you wrote:
try @fopen(categories.txt,r+);


- Original Message -
From: Vanessa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 12:05 PM
Subject: [PHP] fopen - warnings


Hello List,

this is probably a very stupid question, but I dont know how to solve this
little problem:
I have a script with which text files (exported access db data sheets) can
be uploaded to the mysql tables.
It all works fine, but very annoyingly I get warning messages, if the text
file is not resident on the server. But I want it in a way that it doesnt
have
to be on the server...a catch. The php manual says that if the file
cannot be opened fopen returns false. All nice and good working, but I get
those additional warning messages. Im not sure if it has maybe something
to do with the server, but I am not convinced. Ill put the code below.
Any suggestions are highly appreciated (I tried die command but it somehow
messed up the routine).

[schnipp]

$file = array (colours.txt, categories.txt, stockmain.txt,
stockcolours.txt);
$i = 0;
while ($file[$i])
{
//öffne das textfile
  $datei = ;

  if ($datei = fopen($file[$i], r+))
  {
  $zaehler = 0;
//check wieviele zeilen das textfile hat
//um zu verhindern, dass es leer ist!
  while (!feof ($datei)) //liest jede zeile einzeln mit
fget()
  {
  $buffer = fgets($datei, 1000);
  //echo $buffer;
  //echo br;
  $zaehler++;
  } //end while (!feof ($datei))

  // MORE CODE AFTER THIS
  // .

  }
  else
  {
?
  tr
  tdThe file ? echo $file[$i]; ? could not be
opened: no Mysql insert./td
  /tr
?
  }
  $i++;
  if ($datei)
  { fclose($datei); }
}

[/schnipp]

Warning messages are:

Warning: fopen(categories.txt,r+) - No such file or directory in *some
directory* on line 32


I hope anybody can help...

- Nessi -




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


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




Re: [PHP] help regarding mysql

2001-07-27 Thread Balaji Ankem



Hello! Daniel,
i have given

c:\mysql\bin mysql --host=localhost -u 
balaji -p
 password://i 
entered correct password.
ERROR:1045 Access denied for user : 
'balaji@localhost' (Using password:YES).

But through php program it is connecting...

I don't know what is the reason...But it is giving problem 
today only.

Thanks for u'r sugestion Daniel.

Warm regards
-Balaji

  - Original Message - 
  From: 
  Daniel Rezny 
  To: [EMAIL PROTECTED] 
  Sent: Friday, July 27, 2001 1:06 PM
  Subject: Re: [PHP] help regarding 
  mysql
  Hello Balaji,Friday, July 27, 2001, 9:12:28 AM, you 
  wrote:BA Hi friend,BA i am unable to 
  connect to mysql server today.BA windows 98 machine. PHP 4.0.6 and 
  Mysql 3.23.36c:\mysql\bin mysql -u balaji -pBA 
  password:*//pingpongBA But i am able to connect through 
  php. what is the wrong?BA please help out me.BA 
  Thanks in advance.BA RegardsBA 
  -Balaji Try to specify a host: 
  e.g. mysql --host=localhost -- Best 
  regards,Daniel 
  mailto:[EMAIL PROTECTED]-- 
  PHP General Mailing List (http://www.php.net/)To unsubscribe, 
  e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]To 
  contact the list administrators, e-mail: [EMAIL PROTECTED]

The Information contained and transmitted by this E-MAIL is proprietary to 
Wipro Limited and is intended for  use only by the individual or entity to which 
it is addressed, and may contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If this is a forwarded message, 
the content of this E-MAIL may not have been sent with the authority of the 
Company. If you are not the intended recipient, an agent of the intended 
recipient or a  person responsible for delivering the information to the named 
recipient,  you are notified that any use, distribution, transmission, printing, 
copying or dissemination of this information in any way or in any manner is 
strictly prohibited. If you have received this communication in error, please 
delete this mail  notify us immediately at [EMAIL PROTECTED] 




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


Re: [PHP] ascii of euro

2001-07-27 Thread Alexander Wagner

Karl Phillipson wrote:
 Does anyone know what the ascii version of a euro symbol is?

There is none.

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

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




[PHP] Re: An integer?

2001-07-27 Thread Dan Hardiker

Why not just use a regular expression match to see if there is anything
other than numeric characters? That will tell you if it is an integer before
you do the type casting.

(sorry if that sounds a little obvious but no-one seems to have suggested
it)

- Dan

Unknown Sender [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...

 This may be a silly question, but I can't spot and easy way to do it, I
 want to check if the value inside a vriable is an integer. If I do
 is_int($variable) I always get false, because this variable qwas read in
 from a form so its a string, if I make the variable an integer using
 settype() I just end up with 0 if it was invalid, the number otherwise. I
 need something that will actually tell me if there the conversion was
 successfull. Am I missing something?

 Thanks,
 Shaun




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




Re: [PHP] ascii of euro

2001-07-27 Thread George Pitcher

According to my character map, its 0128 ... if its on the font.

George, Edinburgh
- Original Message - 
From: Alexander Wagner [EMAIL PROTECTED]
To: Karl Phillipson [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 9:25 AM
Subject: Re: [PHP] ascii of euro


 Karl Phillipson wrote:
  Does anyone know what the ascii version of a euro symbol is?
 
 There is none.
 
 regards
 Wagner
 
 -- 
 Madness takes its toll. Please have exact change.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




RE: [PHP] best php editor

2001-07-27 Thread Martin Marconcini

 languages. It is called HTML-kit! I absolutely love it and felt I had
to
 share that love with you all.
 
 It is free. A little like Homesite, except better in my view.
Certainly
 far
 more feature-rich for PHP scripting.
 
 Unless I'm missing some serious drawback, it's the best editor for web
 work
 I've found!! Works on Windows. Wish they had a Linux version.

TO be honest, I've used it but it was 2 unstable... 

Regards,

Martin.


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




Re: [PHP] problem while reading on sockets ...

2001-07-27 Thread Arnauld Dravet - smurfie

well because i'm not connecting to a web server ...


- Original Message -
From: David Robley [EMAIL PROTECTED]
To: Arnauld Dravet - smurfie [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, July 27, 2001 3:35 AM
Subject: Re: [PHP] problem while reading on sockets ...


 On Thu, 26 Jul 2001 23:43, Arnauld Dravet - smurfie wrote:
  Hello,
 
  simple question:
 
  $sock = fsockopen($server_ip, $server_port, $errno, $errstr, 30);
  while(!feof($sock)) echo fgets($sock,4096);
  fclose($sock);
 
  why does the while() makes an infinite loop, like if FEOF was never
  found ? what is the character used to tell if there's an EOF or not ?
  could my problem come from the server i'm connecting to which to not
  send a legit string ?
 
  thanks
 
  Arnauld Dravet
  [EMAIL PROTECTED]

 Not having done this, but wouldn't you need to send a GET to the server
 to have it return something? At least that seems to be what the example
 in the manual does.

 $fp = fsockopen (www.php.net, 80, $errno, $errstr, 30);
 if (!$fp) {
 echo $errstr ($errno)br\n;
 } else {
 fputs ($fp, GET / HTTP/1.0\r\n\r\n);
 while (!feof($fp)) {
 echo fgets ($fp,128);
 }
 fclose ($fp);
 }


 --
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

Cause of crash: Inadvertent contact with the ground.



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




[PHP] Euro Ascii value

2001-07-27 Thread ani

Ascii Euro value: Dec# 128 Hex# 80 if its on the font


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




Re: [PHP] ascii of euro

2001-07-27 Thread Alexander Wagner

George Pitcher wrote:
 According to my character map, its 0128 ... if its on the font.

What character map is that? Ascii? Ascii is way older than that symbol 
and has not been changed for quite a while, I think, if it ever has.

Do you mean Ansii? Or Iso-8859-15?

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

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




[PHP] Euro asccii value

2001-07-27 Thread Aniceto Lopez

Ascii Euro value: Dec# 128 Hex# 80 if its on the font



[PHP] $str = var_dump()

2001-07-27 Thread elias

Hello!

Actually, var_dump() dumps directly the structure/content of a variable to
the browser...
Now is there is anyway to capture this output and assign it to a string and
then store it to a file?
for logging/debugging purpose?

$str = var_dump($arrays);

echo on [time] [date] varname dump=$str;


//elias



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




[PHP] Re: running a function after a form submit

2001-07-27 Thread elias

why don't you save just before the submit was clicked?
what if he clicks submit and then he quickly closes and cancels everything
out? (you just saved for vain!)

Richard Kurth [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there a way to run a function when a form is submitted this is an
  example below this form is being feed buy the form above and when the
  customer verifies the data that has input he submits it again I what
  to fire a function when he submits the second time

 ?
 if (! (isset($action))) {
 ?

 form action=?=basename($PHP_SELF)? method=post
 table width=300 border=0 align=center
 tr
 tdVARFirst Name/VAR/td
 tdinput type=text name=fname value=/td
 /tr
 tr
 tdVARLast Name/VAR/td
 tdINPUT TYPE=text NAME=lname VALUE=/td
 /tr
 tr
 tdVARAddress/VAR/td
 tdINPUT TYPE=text NAME=address VALUE=/td
 /tr
 tr
 td colspan=2 align=centerSCRIPT
 document.write (input type=hidden name='AFFILIATE_ID' value=\ +
GetCookie(AFFILIATE) + \);
 /SCRIPTinput type=hidden name=action value=check
 input type=submit name=submit value=Submit
 input type=Reset/td
 /tr
 /table
 /form
 ?php
  }
 if ($action == 'check') {
 ?
   show the info for customer to varafy
 VARFirst Name/VARnbsp;nbsp;A?echo $fname?/Abr
 VARLast Name/VARnbsp;nbsp;A?echo $lname?/Abr
 VARAddress /VARnbsp;nbsp;A?echo $address?/A br

 FORM ACTION=https://www.paypal.com/cgi-bin/webscr; METHOD=POST
 INPUT TYPE=hidden NAME=last_name VALUE=?echo $lname?
 INPUT TYPE=hidden NAME=address1 VALUE=?echo $address?
 INPUT TYPE=hidden NAME=address2 VALUE=?echo $address2?
 INPUT TYPE=hidden NAME=city VALUE=?echo $city?
 input type=submit name=Submit value=Submit
 /form
 ?savetoafil(); }? I what this function to run after the
 submit button is clicked.




 Best regards,
  Richard
 mailto:[EMAIL PROTECTED]




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




Re: [PHP] best php editor

2001-07-27 Thread elias

Then you must be one of the 3% who voted Bad at cnet.com ;)

Martin Marconcini [EMAIL PROTECTED] wrote in message
001401c11673$9b2926a0$[EMAIL PROTECTED]">news:001401c11673$9b2926a0$[EMAIL PROTECTED]...
  languages. It is called HTML-kit! I absolutely love it and felt I had
 to
  share that love with you all.
 
  It is free. A little like Homesite, except better in my view.
 Certainly
  far
  more feature-rich for PHP scripting.
 
  Unless I'm missing some serious drawback, it's the best editor for web
  work
  I've found!! Works on Windows. Wish they had a Linux version.

 TO be honest, I've used it but it was 2 unstable...

 Regards,

 Martin.




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




[PHP] Re: best php editor

2001-07-27 Thread elias

 It is free.
How it's for free? and what's than then:
http://www.chami.com/html-kit/register/

Daniel Goldin ) [EMAIL PROTECTED] wrote in message
000601c1166a$9602e0c0$033a22c7@daniel">news:000601c1166a$9602e0c0$033a22c7@daniel...
 Recently there's been a thread about what editor is best for PHP. I have
 discovered a new (for me) fantastic editor for HTML, PHP and other
scripting
 languages. It is called HTML-kit! I absolutely love it and felt I had to
 share that love with you all.

 It is free. A little like Homesite, except better in my view. Certainly
far
 more feature-rich for PHP scripting.

 Unless I'm missing some serious drawback, it's the best editor for web
work
 I've found!! Works on Windows. Wish they had a Linux version.

 Best,

 Daniel




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




RE: [PHP] best php editor

2001-07-27 Thread Martin Marconcini

LOL :) I didn't ... perhaps I used an old version... 

Regards,

Martin Marconcini
www.marconcini.com.ar

Life must be lived looking forward and can be understood only looking
backward. Soren Kierkegaard

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: Friday, July 27, 2001 6:51 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] best php editor
 
 Then you must be one of the 3% who voted Bad at cnet.com ;)
 
 Martin Marconcini [EMAIL PROTECTED] wrote in message
 001401c11673$9b2926a0$[EMAIL PROTECTED]">news:001401c11673$9b2926a0$[EMAIL PROTECTED]...
   languages. It is called HTML-kit! I absolutely love it and felt I
had
  to
   share that love with you all.
  
   It is free. A little like Homesite, except better in my view.
  Certainly
   far
   more feature-rich for PHP scripting.
  
   Unless I'm missing some serious drawback, it's the best editor for
web
   work
   I've found!! Works on Windows. Wish they had a Linux version.
 
  TO be honest, I've used it but it was 2 unstable...
 
  Regards,
 
  Martin.
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
[EMAIL PROTECTED]



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




[PHP] my php script is very slow. help?

2001-07-27 Thread hassan xaaji



Hi all

I have Linux/PHP/MySQL. Some of my script really run
very slowly. painfully slow. All data are fetched from
the database. The tables in database are indexed.
Still  some scripts are very slow. I am using nested
while and for loops. Any idea how to make them faster?

What should I avoid in my scripting?

thanks all


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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




[PHP] force the output of PHP

2001-07-27 Thread Calin Uioreanu

Hi,

I would like to force the output of php in one page.

The result set is clustered and I want to send to the browser
a cluster as soon as the processing is done.

Can I do this?
I tried output buffering and something like this:

?php

ob_start();

echo microtime();

ob_end_flush();

for ($i=0;$i=10;$i++) {
 $j = md5($i);
}

ob_start();

echo hr;
echo microtime();

ob_end_flush();
?

But no way
--

Regards,
--
Calin Uioreanu
[EMAIL PROTECTED]
Tel: +49 - (0) 89 - 25 55 17 23
http://www.ciao.com
--



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




Re: [PHP] fopen - warnings

2001-07-27 Thread Slavomir Slizik


...
if ($datei = @fopen($file[$i], r+))
...


On Thu, 26 Jul 2001, Vanessa wrote:

 Hello List,

 this is probably a very stupid question, but I dont know how to solve this
 little problem:
 I have a script with which text files (exported access db data sheets) can
 be uploaded to the mysql tables.
 It all works fine, but very annoyingly I get warning messages, if the text
 file is not resident on the server. But I want it in a way that it doesnt have
 to be on the server...a catch. The php manual says that if the file
 cannot be opened fopen returns false. All nice and good working, but I get
 those additional warning messages. Im not sure if it has maybe something
 to do with the server, but I am not convinced. Ill put the code below.
 Any suggestions are highly appreciated (I tried die command but it somehow
 messed up the routine).

 [schnipp]

 $file = array (colours.txt, categories.txt, stockmain.txt,
 stockcolours.txt);
 $i = 0;
 while ($file[$i])
 {
 //öffne das textfile
  $datei = ;

  if ($datei = fopen($file[$i], r+))
  {
  $zaehler = 0;
 //check wieviele zeilen das textfile hat
 //um zu verhindern, dass es leer ist!
  while (!feof ($datei)) //liest jede zeile einzeln mit fget()
  {
  $buffer = fgets($datei, 1000);
  //echo $buffer;
  //echo br;
  $zaehler++;
  } //end while (!feof ($datei))

  // MORE CODE AFTER THIS
  // .

  }
  else
  {
 ?
  tr
  tdThe file ? echo $file[$i]; ? could not be
 opened: no Mysql insert./td
  /tr
 ?
  }
  $i++;
  if ($datei)
  { fclose($datei); }
 }

 [/schnipp]

 Warning messages are:

 Warning: fopen(categories.txt,r+) - No such file or directory in *some
 directory* on line 32


 I hope anybody can help...

 - Nessi -




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




[PHP] Re: my php script is very slow. help?

2001-07-27 Thread Jonas Delfs

Hassan xaaji [EMAIL PROTECTED] skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I have Linux/PHP/MySQL. Some of my script really run
 very slowly.

 What should I avoid in my scripting?

It's hard to tell. Try showing some code.

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases. - IDC



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




[PHP] Re: $str = var_dump()

2001-07-27 Thread Jonas Delfs

Elias [EMAIL PROTECTED] skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Actually, var_dump() dumps directly the structure/content of a variable to
 the browser...
 Now is there is anyway to capture this output and assign it to a string
and
 then store it to a file?

Output Control?

ob_start();
var_dump($flaf);
$var = ob_get_contents();
ob_end_clean();

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases. - IDC



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




Re: [PHP] Newbie Help (CLASS WAR!)

2001-07-27 Thread George Pitcher

Have a look at:

http://www.phpbuilder.com/columns/luis2420.php3

HTH

George, still a newbie after a week on php
- Original Message -
From: CC Zona [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 11:25 AM
Subject: Re: [PHP] Newbie Help (CLASS WAR!)


 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Brian White) wrote:

  There are times when I would really like to be able to do:
 
  class A
  {
   function DoStuff()
   {
  .
   }
  }
 
  class B extends A
  {
   function DoStuff()
   {
  .
  $super-DoStuff(); // Calls the function in A
   }
  }

 Maybe I'm misunderstanding you, but isn't that what the A::DoStuff()
syntax
 does?

 --
 CC

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


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


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




[PHP] Re: Global Variables - Local Scope

2001-07-27 Thread elias

$varname = hi!;

function read_global()
{
  $varname = $GLOBLS[varname];
}

[EMAIL PROTECTED] [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How can I read in all of the global variables and give them local
 scope?  PLEASE HELP ME.



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




Re: [PHP] my php script is very slow. help?

2001-07-27 Thread Deependra B. Tandukar

If your Database is big, avoid loops which goes to whole the DB.

This is just one thought.

DT
- Original Message - 
From: hassan xaaji [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 15:36
Subject: [PHP] my php script is very slow. help?


 
 
 Hi all
 
 I have Linux/PHP/MySQL. Some of my script really run
 very slowly. painfully slow. All data are fetched from
 the database. The tables in database are indexed.
 Still  some scripts are very slow. I am using nested
 while and for loops. Any idea how to make them faster?
 
 What should I avoid in my scripting?
 
 thanks all
 
 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] my php script is very slow. help?

2001-07-27 Thread Tom Carter


Do you have many DB queries? What is the average size of the result
returned?

have you tried running timing functions on it to get a measure of how long
the page is taking? theres many examples on the web..

You can also use these to calculate the time for different sections.. that
should help you work out what is taking the time.

HTH,Tom



 Hi all

 I have Linux/PHP/MySQL. Some of my script really run
 very slowly. painfully slow. All data are fetched from
 the database. The tables in database are indexed.
 Still  some scripts are very slow. I am using nested
 while and for loops. Any idea how to make them faster?

 What should I avoid in my scripting?

 thanks all

 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
 or your free @yahoo.ie address at http://mail.yahoo.ie

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



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




[PHP] intalling php as cgi on redhat7

2001-07-27 Thread Richard Kurth

I can't belive I have to ask this but I can not get it to work
I am trying to get php as cgi installed on a RedHat7 box to be used
with Apache. I configured it with ./configure --with-mysql  did a make
and then a make install every thing whet just fine. I add
ScriptAlias /php/ /usr/local/bin/php
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps

to the httpd.conf file. and restarted Apache.

When I try to run a test file with a .php ext All it does is try to
download it. This should be simple but I can not figure it out.











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




[PHP] php and javascript

2001-07-27 Thread Karl Phillipson


Does anyone know how to pass php variables to a javascript for processing.

I have a DHTML menu system that requires variables be attached to the url
contained within it. Using echo does not print the variable to the url.

Is there another way?

Thx in advance.

Karl
==
Karl Phillipson
PHP SQL Programmer

Saffron Hill Ventures
67 Clerkenwell Road
London   
EC1R 5BL
==




Re: [PHP] php and javascript

2001-07-27 Thread Vitali Falileev

Hello Karl,

Publish your code, plz. We are not wizards. :)

27 July, 2001, 14:08:05, you wrote:

KP Does anyone know how to pass php variables to a javascript for processing.

KP I have a DHTML menu system that requires variables be attached to the url
KP contained within it. Using echo does not print the variable to the url.

KP Is there another way?


-- 
Best regards,
 Vitalimailto:[EMAIL PROTECTED]



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




[PHP] FTP Resume

2001-07-27 Thread Marc Bradshaw


Is there an easy way to implement FTP Resume in PHP?

I need to log into our ftp server using username/password through a 
proxy and resume download of a logfile.  Downloading the entire thing 
each time would take too long.  I also need to check the dates of some 
files.

Thanks,
-- 
  Marc Bradshaw,   | http://www.tdhgroup.co.uk
  Web Developer,   | http://www.leafletfactory.co.uk
  TDH Group.   | http://www.championship-football.com
 [EMAIL PROTECTED]




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




Re: [PHP] php and javascript

2001-07-27 Thread Daniel Rezny

Hello Karl,

Friday, July 27, 2001, 1:08:05 PM, you wrote:


KP Does anyone know how to pass php variables to a javascript for processing.

KP I have a DHTML menu system that requires variables be attached to the url
KP contained within it. Using echo does not print the variable to the url.

KP Is there another way?

KP Thx in advance.

script language=javascript
varname='? echo $varname; ?';

some usage of varname;

/script

I had a same problem some time ago. There must be a single quotes
neither is it string nor any other type.

I hope it helps

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




Re: [PHP] hosting

2001-07-27 Thread B. van Ouwerkerk


bandwidth/space/pop accounts, I will put up with it, until I can find a
better host with comparable features, and comparable price.

This kind of cheap ISP will throw as many domains on one box as possible..

Thats how they make profit. No reason to complain if it slows down so now 
and then..

Just my 0,02


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




[PHP] another question

2001-07-27 Thread Eduardo Kokubo

Does anybody knows how to redirect a page to new window with all the vars from the old 
one? Can I leave a message in the old window?

Thanks in advance.



Re: [PHP] another question

2001-07-27 Thread Daniel Rezny

Hello Eduardo,

Friday, July 27, 2001, 1:48:01 PM, you wrote:

EK Does anybody knows how to redirect a page to new window with all the vars from the 
old one? Can I leave a message in the old window?

EK Thanks in advance.

Use a javascript window.open() function with link with all values.

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




[PHP] execution time

2001-07-27 Thread Pétur Björn Thorsteinsson


I have a slight problem and was wondering if anyone could help.

I have a php script that runs every 30 minutes. It takes the contents of a
directory (which is constantly being updated) and dumps them into a mysql
database. Recently this directory has become increasingly large and the php
script only updates a portion of it before it stops execution.

To run the php script I use a lynx command in a crontab. I'm running suse
linux and apache on both machines (the machine containting the directory
and the other machine containing the database).

I've tried changing the max execution time in php.ini file but it appears
to have no affect. When I took the php script and divided it into portions
and ran them one at a time it worked (except for one portion of the
script). the execution time of the script doesn't matter to me, I just need
it to run.

When I run the php script through a browser, and the script doesn't
complete, I get a 'page cannot be displayed' message (while I am expecting
a 'fatal error, exceeded max execution time' error message).

Maybe it could be fixed by using something other than lynx to run the php
script internally, but  I don't know of any alternatives.

hope someone can help..


-petur



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




[PHP] MySQL big table process

2001-07-27 Thread Plamen Slavov

Hi guys,
I have a big MySQL table - about 300MB
I want to get all the records from the table, make certain transformations and write 
them to a text file (i can not use select into outfile...)
the problem is when i type select * from table name the server hangs 
is there a way that i can select 1 record at a time or something similar, which would 
not put so much pressure on the server, but i still will get every record from the 
table
Thanks
--
Visit our site at http://eshop.bg



Re: [PHP] execution time

2001-07-27 Thread Plamen Slavov

You can use a standalone compiled PHP version and then You will not need a browser to 
execute scripts
see http://www.php.net/manual/en/install.commandline.php
- Original Message - 
From: Pétur Björn Thorsteinsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday 27 July 2001 ?. 3:03 PM
Subject: [PHP] execution time



I have a slight problem and was wondering if anyone could help.

I have a php script that runs every 30 minutes. It takes the contents of a
directory (which is constantly being updated) and dumps them into a mysql
database. Recently this directory has become increasingly large and the php
script only updates a portion of it before it stops execution.

To run the php script I use a lynx command in a crontab. I'm running suse
linux and apache on both machines (the machine containting the directory
and the other machine containing the database).

I've tried changing the max execution time in php.ini file but it appears
to have no affect. When I took the php script and divided it into portions
and ran them one at a time it worked (except for one portion of the
script). the execution time of the script doesn't matter to me, I just need
it to run.

When I run the php script through a browser, and the script doesn't
complete, I get a 'page cannot be displayed' message (while I am expecting
a 'fatal error, exceeded max execution time' error message).

Maybe it could be fixed by using something other than lynx to run the php
script internally, but  I don't know of any alternatives.

hope someone can help..


-petur



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





Re: [PHP] execution time

2001-07-27 Thread Wagner Tomy

http://www.php.net/manual/en/function.set-time-limit.php

the set_time_limit allows you to reset the max execution time..

the manual says:

When called, set_time_limit() restarts the timeout counter from zero. In
other words, if the timeout is the default 30 seconds, and 25 seconds into
script execution a call such as set_time_limit(20) is made, the script will
run for a total of 45 seconds before timing out.

Wagner Tomy
Editus S.A.

- Original Message -
From: Pétur Björn Thorsteinsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 2:03 PM
Subject: [PHP] execution time



 I have a slight problem and was wondering if anyone could help.

 I have a php script that runs every 30 minutes. It takes the contents of a
 directory (which is constantly being updated) and dumps them into a mysql
 database. Recently this directory has become increasingly large and the
php
 script only updates a portion of it before it stops execution.

 To run the php script I use a lynx command in a crontab. I'm running suse
 linux and apache on both machines (the machine containting the directory
 and the other machine containing the database).

 I've tried changing the max execution time in php.ini file but it appears
 to have no affect. When I took the php script and divided it into portions
 and ran them one at a time it worked (except for one portion of the
 script). the execution time of the script doesn't matter to me, I just
need
 it to run.

 When I run the php script through a browser, and the script doesn't
 complete, I get a 'page cannot be displayed' message (while I am expecting
 a 'fatal error, exceeded max execution time' error message).

 Maybe it could be fixed by using something other than lynx to run the php
 script internally, but  I don't know of any alternatives.

 hope someone can help..


 -petur



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



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




[PHP] 2D array

2001-07-27 Thread AJDIN BRANDIC

Hi

I have been trying to do this for hours now.
I have a while loop (rows from mysql db) and on each pass I want to pussh 
a new element into a 2D array, bot always end up with the last element of 
the while loop.  So:

table mytable
myname myphone myemail
john   254688  [EMAIL PROTECTED]
tom789787  [EMAIL PROTECTED]

$myquery=select * from mytable;

while ($myrow = mysql_fetch_array($myrows)) {
  .. .. . .  .

  $my2darray = array ($myname = array ($myphone,$myemail));
  
}

$mycount=count(my2darray);  // returns 1

while (list($key,$value) = each ($my2darray)) {
  echo$key,;
  echo$value[0];
  echo$value[1]br;
  // retuns only one row with tom,798779,[EMAIL PROTECTED]
}

How do I push multiple entries into a 2d array?

I tried $my2darray[]=array(...

Regards

Ajdin

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




[PHP] Destroying Session

2001-07-27 Thread Richard Baskett

Ok having a problem.  If a person just surfs to a page outside of my site or
types in a different url etc.. then it leaves the session intact.  How can I
destroy that session?

Will I need to create some type of apache/linux script to delete the
directory with all the sessions in it that are a certain amount of days old?
There has got to be a better way...

Any help would be appreciated.. thanks!

Rick


P.S. Thanks to the person that helped me with the POST headers.. I still
havent been able to get it to work, but I just figured out a different way
of doing what I wanted :)


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




Re: [PHP] 2D array

2001-07-27 Thread AJDIN BRANDIC

Wag,

I do not wish to push whole of the row into an array.
Also I need the id of the parent array to be $myname;

Ajdin

On Fri, 27 Jul 2001, Wagner Tomy wrote:

 $my2darray = Array();
 
 while($row = mysql_fetch_row($result)) {
   array_push($my2darray, $row);
 }
 
 OR:
 
 for($i = 0; $i  mysql_num_rows($result); $i++) {
   $row = mysql_fetch_row($result);
 $my2darray[$i] = $row;
 }
 
 Wagner Tomy
 Editus S.A.
 
 - Original Message -
 From: AJDIN BRANDIC [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, July 27, 2001 2:18 PM
 Subject: [PHP] 2D array
 
 
  Hi
 
  I have been trying to do this for hours now.
  I have a while loop (rows from mysql db) and on each pass I want to pussh
  a new element into a 2D array, bot always end up with the last element of
  the while loop.  So:
 
  table mytable
  myname myphone myemail
  john   254688  [EMAIL PROTECTED]
  tom789787  [EMAIL PROTECTED]
 
  $myquery=select * from mytable;
 
  while ($myrow = mysql_fetch_array($myrows)) {
.. .. . .  .
 
$my2darray = array ($myname = array ($myphone,$myemail));
 
  }
 
  $mycount=count(my2darray);  // returns 1
 
  while (list($key,$value) = each ($my2darray)) {
echo$key,;
echo$value[0];
echo$value[1]br;
// retuns only one row with tom,798779,[EMAIL PROTECTED]
  }
 
  How do I push multiple entries into a 2d array?
 
  I tried $my2darray[]=array(...
 
  Regards
 
  Ajdin
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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




Re: [PHP] 2D array

2001-07-27 Thread Wagner Tomy

$my2darray = Array();

while(list($myname, $myphone, $myemail) = mysql_fetch_row($result)) {
  $my2darray[$myname] = array($myphone, $myemail);
}

Wagner Tomy
Editus S.A.
- Original Message -
From: AJDIN BRANDIC [EMAIL PROTECTED]
To: Wagner Tomy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 2:34 PM
Subject: Re: [PHP] 2D array


 Wag,

 I do not wish to push whole of the row into an array.
 Also I need the id of the parent array to be $myname;

 Ajdin

 On Fri, 27 Jul 2001, Wagner Tomy wrote:

  $my2darray = Array();
 
  while($row = mysql_fetch_row($result)) {
array_push($my2darray, $row);
  }
 
  OR:
 
  for($i = 0; $i  mysql_num_rows($result); $i++) {
$row = mysql_fetch_row($result);
  $my2darray[$i] = $row;
  }
 
  Wagner Tomy
  Editus S.A.
 
  - Original Message -
  From: AJDIN BRANDIC [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, July 27, 2001 2:18 PM
  Subject: [PHP] 2D array
 
 
   Hi
  
   I have been trying to do this for hours now.
   I have a while loop (rows from mysql db) and on each pass I want to
pussh
   a new element into a 2D array, bot always end up with the last element
of
   the while loop.  So:
  
   table mytable
   myname myphone myemail
   john   254688  [EMAIL PROTECTED]
   tom789787  [EMAIL PROTECTED]
  
   $myquery=select * from mytable;
  
   while ($myrow = mysql_fetch_array($myrows)) {
 .. .. . .  .
  
 $my2darray = array ($myname = array ($myphone,$myemail));
  
   }
  
   $mycount=count(my2darray);  // returns 1
  
   while (list($key,$value) = each ($my2darray)) {
 echo$key,;
 echo$value[0];
 echo$value[1]br;
 // retuns only one row with tom,798779,[EMAIL PROTECTED]
   }
  
   How do I push multiple entries into a 2d array?
  
   I tried $my2darray[]=array(...
  
   Regards
  
   Ajdin
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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



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




Re: [PHP] MySQL big table process

2001-07-27 Thread Daniel Rezny

Hello Plamen,

Friday, July 27, 2001, 2:04:15 PM, you wrote:

PS Hi guys,
PS I have a big MySQL table - about 300MB
PS I want to get all the records from the table, make certain transformations and 
write them to a text file (i can not use select into outfile...)
PS the problem is when i type select * from table name the server hangs 
PS is there a way that i can select 1 record at a time or something similar, which 
would not put so much pressure on the server, but i still will get every record from 
the table
PS Thanks
PS --
PS Visit our site at http://eshop.bg

As I understood you you want to take all datas from table. For that is
very useful command
mysqldump --database  file.sql

I hope it helps to you
-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




Re: [PHP] 2D array

2001-07-27 Thread AJDIN BRANDIC


That works OK

Thank you

Ajdin


On Fri, 27 Jul 2001, Wagner Tomy wrote:

 $my2darray = Array();
 
 while(list($myname, $myphone, $myemail) = mysql_fetch_row($result)) {
   $my2darray[$myname] = array($myphone, $myemail);
 }
 
 Wagner Tomy
 Editus S.A.
 - Original Message -
 From: AJDIN BRANDIC [EMAIL PROTECTED]
 To: Wagner Tomy [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, July 27, 2001 2:34 PM
 Subject: Re: [PHP] 2D array
 
 
  Wag,
 
  I do not wish to push whole of the row into an array.
  Also I need the id of the parent array to be $myname;
 
  Ajdin
 
  On Fri, 27 Jul 2001, Wagner Tomy wrote:
 
   $my2darray = Array();
  
   while($row = mysql_fetch_row($result)) {
 array_push($my2darray, $row);
   }
  
   OR:
  
   for($i = 0; $i  mysql_num_rows($result); $i++) {
 $row = mysql_fetch_row($result);
   $my2darray[$i] = $row;
   }
  
   Wagner Tomy
   Editus S.A.
  
   - Original Message -
   From: AJDIN BRANDIC [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Friday, July 27, 2001 2:18 PM
   Subject: [PHP] 2D array
  
  
Hi
   
I have been trying to do this for hours now.
I have a while loop (rows from mysql db) and on each pass I want to
 pussh
a new element into a 2D array, bot always end up with the last element
 of
the while loop.  So:
   
table mytable
myname myphone myemail
john   254688  [EMAIL PROTECTED]
tom789787  [EMAIL PROTECTED]
   
$myquery=select * from mytable;
   
while ($myrow = mysql_fetch_array($myrows)) {
  .. .. . .  .
   
  $my2darray = array ($myname = array ($myphone,$myemail));
   
}
   
$mycount=count(my2darray);  // returns 1
   
while (list($key,$value) = each ($my2darray)) {
  echo$key,;
  echo$value[0];
  echo$value[1]br;
  // retuns only one row with tom,798779,[EMAIL PROTECTED]
}
   
How do I push multiple entries into a 2d array?
   
I tried $my2darray[]=array(...
   
Regards
   
Ajdin
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 

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




[PHP] Re: Destroying Session

2001-07-27 Thread Jonas Delfs

Richard Baskett [EMAIL PROTECTED] skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Ok having a problem.  If a person just surfs to a page outside of my site
or
 types in a different url etc.. then it leaves the session intact.  How can
I
 destroy that session?

The garbage-collector does it automaticly.

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases. - IDC



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




[PHP] Re: Can mysql_fetch_*() work on the resultpointer only?

2001-07-27 Thread Jonas Delfs

Jonas Delfs [EMAIL PROTECTED] skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Can mysql_fetch_*() work on the resultpointer that mysql_query() returns,
 only, or does the rows have to be in the database when fetching?
 I know that mysql_query() finds the specified data, but I'm not totally
sure
 in my theori about that mysql_query() is taking the data-result out so
that
 we're not depending on the database anymore.

I've got my theory confirmed.
How come at lot more professionals hang out at the national newgroup in our
little Denmark, than here?
(Not saying that there isn't any at all, around here)

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases. - IDC



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




[PHP] Re: naming conventions

2001-07-27 Thread Jeremy Maziarz

Matthew,

The convention I use goes as follows:

[ I am doing this without testing as I go so if something is wrong,
don't sue me :P ]

Lets say I have two tables...

PEOPLE
people_id (primary key)
people_namefirst
people_namelast
people_namemiddle
people_age
place_id (foreign key)

PLACE
place_id (primary key)
place_name
place_address
place_numberphone
place_numberfax

What I do is use [tablename]_[fieldname]. This convention makes SELECT
statements like this easy...

SELECT people.people_id,
people.people_namefirst,
place.place_id,
place.place_address
FROM people, place
WHERE people.place_id = place.place_id
AND place.place_name = 'IBM';

Otherwise, it would be difficult to differenciate between place_id (the
foreign key for the PEOPLE table) and place_id (the primary key for the
PLACE table).

-Jeremy
Email: [EMAIL PROTECTED]


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




[PHP] Re: session gc question

2001-07-27 Thread Jonas Delfs

Greg Donald [EMAIL PROTECTED] skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Is is possible to set session.gc_probability manually on a per script
 basis, similar to the way error reporting is capable of being set?

Yes.
PHP have a standard function for setting things like that, but of cause I
can't remember it's name. :)

--
Mvh./Best Regards
Jonas Delfs, http://delfs.dk

Developers are being asked to do more with less, do it faster, and make it
fit with the existing systems and databases. - IDC



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




[PHP] error trapping

2001-07-27 Thread Phil Spitler

I am wondering the best way to handle error trapping with PHP.  I am
farmiliar with languages, ColdFusion being one, that you can use TRY and
CATCH statements.  Any info would be appreciated.

THANKS!

-
Phil Spitler [Vice President]
Web Hut Design, Inc.
c 704-451-1324
mailto:[EMAIL PROTECTED]


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




[PHP] session tracking problem

2001-07-27 Thread Khuram Latif

Hi Sir,
I have a problem in session tracking,

After checking User name and password from database, I register a

session as

session_register(User_name);

For next page authentication, at the top of every page i check

if ($HTTP_SESSION_VARS[User_name] != )
{
// Display Page Contents
}
else
{
echo Invalid User;
}

This code run fine in different location but not any where,
Please fix the problem.

Regards,
khuram latif


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




Re: [PHP] php and javascript

2001-07-27 Thread Sheridan Saint-Michel

I am not sure exactly what you are doing, but the thing
to remember is that your PHP script is writing your HTML
and JavaScript.  As long as you keep that in mind it is
fairly easy to see how to pass variables to JS.

Here is a very simple example

?php $foo = bar; ?
HTML
Body
Script language=Javascript
var foo = ?php echo $foo; ?;
document.writeln(foo);
/Script
/Body
/HTML

If you need something more specific post some code.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Karl Phillipson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 6:08 AM
Subject: [PHP] php and javascript



 Does anyone know how to pass php variables to a javascript for processing.

 I have a DHTML menu system that requires variables be attached to the url
 contained within it. Using echo does not print the variable to the url.

 Is there another way?

 Thx in advance.

 Karl
 ==
 Karl Phillipson
 PHP SQL Programmer

 Saffron Hill Ventures
 67 Clerkenwell Road
 London
 EC1R 5BL
 ==




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




Re: [PHP] asp to php

2001-07-27 Thread Willie Dresler Leiva

RedHat 7.1 (Linux) has a package that converts from ASP
to PHP pages. I didn't use it, so I don't know if it
is useful neither if it is available for Windows.

Kind regards,
Willie


_
Seja avisado de novas mensagens do Hotmail e use o comunique-se com seus 
amigos com o MSN Messenger em http://messenger.msn.com.br


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




[PHP] Frames, Sessions Search Engines

2001-07-27 Thread Jeroen Geusebroek

Hi there,

I have a question about how Search Engines handle sessions and frames.

Since my site uses frames, and i think search engines link to pages
individualy and not the
frameset, i wanted to use sessions to indicate if a user comes from a
search engine (then
it doesn't have a valid session) and if so just redirect the user to the
main page.

But i'm afraid that search engines will get redirected to the main page
everytime it try's to index
a page. What do you all think, and might there be another solution?

Thanks,

Jeroen Geusebroek

P.S. Please CC me in your reply, i'm not a member of the list.

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




[PHP] Moving a PHP/MySQL web site ???

2001-07-27 Thread PHP Junkie

Hi ?PHPrEAks!?

I will be having to face the dubious task of moving my PHP/MySQL-based website to 
another server.  Can anyone out there point me to some GOOD documentation on this?  
The .php files I'm not as concerned about.  I've been using the $DOCUMENT_ROOT in all 
of my includes.  I'm more concerned about getting the MySQL databases ( actual files 
??? ) moved over correctly.

I know this isn't a MySQL list, but I thought that enough of you out there work with 
PHP/MySQL enough to get some good feedback.  I'd also like to hear feedback on just 
your general experience with the process of moving from one web server over to another.

Thanks all -- --

Gene Kelley
BizFlow Data Solutions
http://www.bizflowdata.net/



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


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




Re: [PHP] Moving a PHP/MySQL web site ???

2001-07-27 Thread Jeff Lewis

Why don't you just dump the data and structure and then use that to import
it?  I'm sure there is something to do in telnet but I am unfamiliar :)

Jeff
- Original Message -
From: PHP Junkie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 10:21 AM
Subject: [PHP] Moving a PHP/MySQL web site ???


 Hi ?PHPrEAks!?

 I will be having to face the dubious task of moving my PHP/MySQL-based
website to another server.  Can anyone out there point me to some GOOD
documentation on this?  The .php files I'm not as concerned about.  I've
been using the $DOCUMENT_ROOT in all of my includes.  I'm more concerned
about getting the MySQL databases ( actual files ??? ) moved over correctly.

 I know this isn't a MySQL list, but I thought that enough of you out there
work with PHP/MySQL enough to get some good feedback.  I'd also like to hear
feedback on just your general experience with the process of moving from one
web server over to another.

 Thanks all -- --

 Gene Kelley
 BizFlow Data Solutions
 http://www.bizflowdata.net/



 __
 Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

 Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


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





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




[PHP] Re: File Upload Size Limits

2001-07-27 Thread bill

I think you need to check your Apache time limits too.

Michael Conley wrote:

 I am running PHP 4.0pl1 with Apache 1.3.14 on RedHat Linux 7.1.  I am trying
 to do a file upload from the users PC to my web server.  If I do a small
 file, the transfer goes fine.  If I do a large file ( 50 MB), the transfer
 fails saying either the file was not available for reading or my script just
 bombs out.  I need to be able to have people upload large files.  I have
 changed the setting in php.ini to upload_max_filesize = 100M.

 Do I also need to change the following entries in php.ini?
 max_execution_time = 60
 memory_limit = 8M

 Is this an apache limit?  I'm not sure what to do with this as I really need
 to be able to transfer large files.


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




RE: [PHP] my php script is very slow. help?

2001-07-27 Thread Jack Dempsey

Be careful with any sort of nested loops. You may not be able to avoid
them, but if you nest a while loop within another while loop, and simply
iterate through results, you will have quadratic running time. This
isn't a big deal if you've got 20 results, but for every increase in N
(size of result) your running time will increase N^2. So, if you've got
a large dataset, the process time will be enormous.

Jack

-Original Message-
From: hassan xaaji [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 27, 2001 5:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] my php script is very slow. help?



Hi all

I have Linux/PHP/MySQL. Some of my script really run
very slowly. painfully slow. All data are fetched from
the database. The tables in database are indexed.
Still  some scripts are very slow. I am using nested
while and for loops. Any idea how to make them faster?

What should I avoid in my scripting?

thanks all


Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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


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




[PHP] Delete

2001-07-27 Thread Jeremy Morano

Hi, im trying to delete a record from a table where the value of a field
must be equal to the value of a field of another table.I know
this is wrong but I need to show you what I mean. I think I'm missing a very
important select statement to join them...can anyone
help me out?


sql=Delete from table1 where table1.value = table2.value


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




Re: [PHP] Moving a PHP/MySQL web site ???

2001-07-27 Thread Tim

You can just use mysqldump to copy the contents of the database to a
file, and it will be easy to re-create it on the new site.

- Tim
  http://www.phptemplates.org

 I will be having to face the dubious task of moving my PHP/MySQL-based website to 
another server.  Can anyone out there point me to some GOOD documentation on this?  
The .php files I'm not as concerned about.  I've been using the $DOCUMENT_ROOT in all 
of my includes.  I'm more concerned about getting the MySQL databases ( actual files 
??? ) moved over correctly.



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




Re: [PHP] Moving a PHP/MySQL web site ???

2001-07-27 Thread Plamen Slavov

I think that as far as you have the same version of MySQL on both servers, you can 
simply copy the table files, otherwise you should use mysqldump or something like that
- Original Message - 
From: PHP Junkie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday 27 July 2001 ?. 5:21 PM
Subject: [PHP] Moving a PHP/MySQL web site ???


Hi ?PHPrEAks!?

I will be having to face the dubious task of moving my PHP/MySQL-based website to 
another server.  Can anyone out there point me to some GOOD documentation on this?  
The .php files I'm not as concerned about.  I've been using the $DOCUMENT_ROOT in all 
of my includes.  I'm more concerned about getting the MySQL databases ( actual files 
??? ) moved over correctly.

I know this isn't a MySQL list, but I thought that enough of you out there work with 
PHP/MySQL enough to get some good feedback.  I'd also like to hear feedback on just 
your general experience with the process of moving from one web server over to 
another.

Thanks all -- --

Gene Kelley
BizFlow Data Solutions
http://www.bizflowdata.net/



__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/


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





[PHP] OK............... Yell!~

2001-07-27 Thread Nicole4Av1611

Hello,

I am new at all this. Please help!

I am using PHP4 on windows 98, Apache, MySql server.
Apache is working fine. However when I try to view the phpinfo test page 
nothing happens.
Should I put it in the Apache docs file??(thats were it is)
Is it better to configure PHP for Apache as a script alias or a module??
I added it as a script alias.
Should I save the phpinfo as a .php or .html file??
This one may the the stupidest (if that's a word lol) question of all 
drum roll please DO you have to manually 
start PHP like I do Apache and MySQL for it to work?

Thnx bunches, sorry if you all have answered these questions a 100xs! 
 %)

The Crazy Blonde,
Nicole~

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




[PHP] e-mail confirmation #76215525

2001-07-27 Thread julie15525

This is a confirmation e-mail for your request.

You can come anytime and claim your FREE Sex Toys at
http://www.freevibrator.com

All Free Sex Toys we feature are absolutly free with no purchase necessary whatsoever.
(Small reasonable shipping charges apply)


Thank You for subscribing to FreeSexToys updates list.
This Is OPT-IN list.
To make sure that we won't send anything to you in ERROR - You HAVE TO CONFIRM that 
you would like to be added to our list.

To confirm that you want to be added send e-mail to: [EMAIL PROTECTED]

If you received this e-mail in error (my apologies) or do not wish to be added to our 
list DO NOTHING. You will NOT be added to our list without Your Confirmation.

Freely Yours
Julie Aston

[EMAIL PROTECTED]
message confirmation ID#1312076215525118128826213

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




[PHP] successful error?

2001-07-27 Thread Jon Yaggie


okay i just got this error.  what doe sit mean

Warning: file() - Success in /var/www/html/login/login.php on line 45

the lines of code involved are

 $filename = log/userdb.txt.
 $list = file($filename);


Thank You,
 
Jon Yaggie
www.design-monster.com
 
And they were singing . . . 
 
'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code
 
101 little bugs in the code . . .'
 
And it continued until they reached 0





[PHP] Grabbing data up to \n

2001-07-27 Thread Jeff Lewis

I am grabbing lines of a file using:

$buffer = fgets($fd, 4096);

How can I grab the line up to \n or does this do it?  Like if the line is only a few 
characters, it will only grab up to \n?

And if the line up to the \n is a huge message will I still be able to grab all of it 
with the 4096?

Jeff



Re: [PHP] Grabbing data up to \n

2001-07-27 Thread Wagner Tomy

$data = file(myfile);

$data = array of the lines from myfile ( they still contain the newline
character )

Wagner Tomy
Editus Luxembourg S.A.

- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 27, 2001 5:14 PM
Subject: [PHP] Grabbing data up to \n


I am grabbing lines of a file using:

$buffer = fgets($fd, 4096);

How can I grab the line up to \n or does this do it?  Like if the line is
only a few characters, it will only grab up to \n?

And if the line up to the \n is a huge message will I still be able to grab
all of it with the 4096?

Jeff



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




RE: [PHP] Re: File Upload Size Limits

2001-07-27 Thread Michael Conley

I increased apache to 60 seconds, but it still fails.  it doesn't actually
go for 60 seconds.  It's more like 10 seconds before it fails.  Any idea
where I would allow Apache to deal with a larger POST?  

-Original Message-
From: bill [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 27, 2001 7:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: File Upload Size Limits


I think you need to check your Apache time limits too.

Michael Conley wrote:

 I am running PHP 4.0pl1 with Apache 1.3.14 on RedHat Linux 7.1.  I am
trying
 to do a file upload from the users PC to my web server.  If I do a small
 file, the transfer goes fine.  If I do a large file ( 50 MB), the
transfer
 fails saying either the file was not available for reading or my script
just
 bombs out.  I need to be able to have people upload large files.  I have
 changed the setting in php.ini to upload_max_filesize = 100M.

 Do I also need to change the following entries in php.ini?
 max_execution_time = 60
 memory_limit = 8M

 Is this an apache limit?  I'm not sure what to do with this as I really
need
 to be able to transfer large files.


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

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




RE: [PHP] my php script is very slow. help?

2001-07-27 Thread Matthew Loff


If you're only doing one DB query per page, then the query is probably
what's taking the longest.

Log into mysql, and execute EXPLAIN SELECT ...rest of query  ... It'll
tell you how MySQL plans on performing the query across the rows of the
table(s).  You can use the information it provides to optimize your
tables and/or indicies.

See this section of the MySQL manual for more info:

http://www.mysql.com/doc/E/X/EXPLAIN.html


-Original Message-
From: Tom Carter [mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 27, 2001 6:48 AM
To: hassan xaaji; [EMAIL PROTECTED]
Subject: Re: [PHP] my php script is very slow. help?



Do you have many DB queries? What is the average size of the result
returned?

have you tried running timing functions on it to get a measure of how
long the page is taking? theres many examples on the web..

You can also use these to calculate the time for different sections..
that should help you work out what is taking the time.

HTH,Tom



 Hi all

 I have Linux/PHP/MySQL. Some of my script really run
 very slowly. painfully slow. All data are fetched from
 the database. The tables in database are indexed.
 Still  some scripts are very slow. I am using nested
 while and for loops. Any idea how to make them faster?

 What should I avoid in my scripting?

 thanks all

 
 Do You Yahoo!?
 Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your 
 free @yahoo.ie address at http://mail.yahoo.ie

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



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


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




  1   2   >