Re: [PHP] Really Annoying Require/Include Error

2004-03-31 Thread Burhan Khalid
Mike R wrote:
I am getting this error:



Fatal error: Failed opening required
'/home/sites/site111/web/news/settings/newsletter.settings.inc.php'
(include_path='') in
/home/sites/site111/web/news/forms/sign_in_out_form.inc.php on line 7

From this piece of code:
require
(/home/sites/site111/web/news/settings/newsletter.settings.inc.php);
Before I totally lose my mind, can someone point out to me why I would be
getting the error?  The file is there, and named correctly.  I had two other
people in the office confirm the path and filename.
Do you have open_basedir restrictions? (time to check the php.ini)

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


Re: [PHP] web statistics

2004-03-31 Thread Ben Joyce
I use AWStats for my web stats stuff.  Pretty easy once the minimal
configuration is done.

http://awstats.sourceforge.net/

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: Elliot J. Balanza [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 7:00 PM
Subject: RE: [PHP] web statistics


[snip]
Does any one knows of a good gnu php web statistics software?
[/snip]

[smart-ass alert]
Yes and no depending on your definition of good.
[/smart-ass alert]

What kind of features are you looking for?

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

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



[PHP] RE: Simple one I think

2004-03-31 Thread Dave Carrera
Thanks for the insight Ben,

Straight forward when I looked at your code examples and this answers a
couple of other things to.

Thanks once again for your clear help

Dave C
-Original Message-
From: Ben Ramsey [mailto:[EMAIL PROTECTED] 
Sent: 30 March 2004 17:08
To: Dave Carrera
Subject: Re: Simple one I think


DC Thanks for the help but adding curly dose not seem to work. Any 
DC ideas why ?
DC
DC I get and output of [0][0][0][1][1][1][2][2][2] why ?
DC
BR Try putting curly braces around your variables.  Like this:
BR
BR {$val[name][$i]}

Please reply to the list so that others can help you out, as well--and 
so others can learn from your questions, if they happen to have the same 
ones.

All right, I've taken a closer look at the code, and here's what's going 
wrong:

When you do foreach($vocals as $val), it only sees 3 rows in $vocals, 
one for name, one for skill, and one for fee.  You can see this when you 
do print_r($vocals).  Thus, it can't find $val[name][$i] or any of the 
other variables because they don't exist in $val.  You could change it 
to $val[$i], but then you're table would print out like this:

Jonny FlashJonny FlashJonny Flash
77 77 77
39000  39000  39000

So, now you see a little bit of where the problem is.  You need to 
rework your foreach to get things right.  There are several ways you can 
do this.  One is to store your array differently, like this:

$vocals = array(
   array('name' = 'Jonny Flash', 'skill' = 87, 'fee' = 22000),
   array('name' = 'Bill Banger', 'skill' = 77, 'fee' = 18500),
   array('name' = 'Sarah Jane', 'skill' = 93, 'fee' = 39000) );

Then, you would print it out like this:

$rows = table;
foreach($vocals as $val){
  $rows .= 
  tr
   td{$val[name]}/tdtd{$val[skill]}/tdtd{$val[fee]}/td
  /tr
  ;
}
$rows .= /table;
echo $rows;

Another way, using the same array you had, would be to print it out like 
this:

$rows = table;
for ($i = 0; $i  count($vocals['name']); $i++) {
  $rows .= 
  tr
 
td{$vocals[name][$i]}/tdtd{$vocals[skill][$i]}/tdtd{$vocals[fee][$
i]}/td
  /tr
  ;
}
$rows .= /table;
echo $rows;

However, I feel that it is more logical and easier to use to store the 
array in the way I suggested above.

-- 
Regards,
  Ben Ramsey
  http://benramsey.com
  http://www.phpcommunity.org/wiki/People/BenRamsey



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.645 / Virus Database: 413 - Release Date: 28/03/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.645 / Virus Database: 413 - Release Date: 28/03/2004
 

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



RE: [PHP] adding days to a given date

2004-03-31 Thread Hawkes, Richard
You'll want to do something like this:

  $timeStamp = strtotime(2004-04-29);
  $timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
  $newDate = date(Y-m-d, $timeStamp); 

The 'strtotime' function converts all sorts of standard dates to the Unix
Epoch seconds (seconds since 1/1/1970). You then just add the required
seconds!

Cheers
Richard



-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 10:01
To: [EMAIL PROTECTED]
Subject: [PHP] adding days to a given date


Hi there,

I am trying to add days to a given day, but somehow I am lost in all the time
functions.
This should be a standard function. Maybe someone has a good hint for me?

This is the given day:
2004-04-29
I would like to add 2 days to it.
So php should anyhow now how many days April has to result in this:
2004-04-30
2004-05-1

Thank you for any helpful hint,

merlin

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



Re: [PHP] adding days to a given date

2004-03-31 Thread Jason Wong
On Wednesday 31 March 2004 17:08, Hawkes, Richard wrote:
 You'll want to do something like this:

   $timeStamp = strtotime(2004-04-29);
   $timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
   $newDate = date(Y-m-d, $timeStamp);

 The 'strtotime' function converts all sorts of standard dates to the Unix
 Epoch seconds (seconds since 1/1/1970). You then just add the required
 seconds!

strtotime() can do more than that, time to RTFM.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
QOTD:
My life is a soap opera, but who gets the movie rights?
*/

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



RE: [PHP] adding days to a given date

2004-03-31 Thread Hawkes, Richard
What else can it do other than convert dates to time strings Jason? 

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 10:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] adding days to a given date


On Wednesday 31 March 2004 17:08, Hawkes, Richard wrote:
 You'll want to do something like this:

   $timeStamp = strtotime(2004-04-29);
   $timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
   $newDate = date(Y-m-d, $timeStamp);

 The 'strtotime' function converts all sorts of standard dates to the Unix
 Epoch seconds (seconds since 1/1/1970). You then just add the required
 seconds!

strtotime() can do more than that, time to RTFM.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
QOTD:
My life is a soap opera, but who gets the movie rights?
*/

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



Re: [PHP] Re: STOP to send me mails !!!! Re: [PHP] Re: list to array help :-)

2004-03-31 Thread Lester Caine
Wabyan wrote:

I do not know why I received this newsgroup infos, even if I like PHP :-)
I will follow procedure unsbcribe 
But if you have subscribed for email delivery - unsubscribe 
does not work. I know I now get both eMail and have to use 
the newsgroup to post. There are MAJOR problems with the 
system that NOBODY seems to be addressing !

Thanks for your reply
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] adding days to a given date

2004-03-31 Thread Merlin
thanx Richard, that works excellent.

Merlin

Richard Hawkes wrote:

You'll want to do something like this:

  $timeStamp = strtotime(2004-04-29);
  $timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
  $newDate = date(Y-m-d, $timeStamp); 

The 'strtotime' function converts all sorts of standard dates to the Unix
Epoch seconds (seconds since 1/1/1970). You then just add the required
seconds!
Cheers
Richard


-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 10:01
To: [EMAIL PROTECTED]
Subject: [PHP] adding days to a given date
Hi there,

I am trying to add days to a given day, but somehow I am lost in all the time
functions.
This should be a standard function. Maybe someone has a good hint for me?
This is the given day:
2004-04-29
I would like to add 2 days to it.
So php should anyhow now how many days April has to result in this:
2004-04-30
2004-05-1
Thank you for any helpful hint,

merlin

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


[PHP] WARNING! Virus

2004-03-31 Thread Firman Wandayandi
Be carefull guys, maybe email attacment contain a virus, NAV 2003 catch a
virus [EMAIL PROTECTED] I don't know from which list, php-general,
php-windows, pear-general, pear-dev or pear-cvs.

Firman

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



[PHP] adding days to a given date

2004-03-31 Thread Merlin
Hi there,

I am trying to add days to a given day, but somehow I am lost in all the time 
functions.
This should be a standard function. Maybe someone has a good hint for me?
This is the given day:
2004-04-29
I would like to add 2 days to it.
So php should anyhow now how many days April has to result in this:
2004-04-30
2004-05-1
Thank you for any helpful hint,

merlin

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


RE: [PHP] adding days to a given date

2004-03-31 Thread Harish

The time function available in PHP can be used for your requirement/

$two_days_later = date(Y-m-d,mktime(0,0,0,$month,$day+2,$year));

where $month, $day and $year are the respective parts of the given day

$year=2004
$month=04
$day=29

You can specify the number of days to be +/- in the mktime function, like its 
specified above.
You can also +/- the months and year if necessary.


regards
Harish

-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 2:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] adding days to a given date


Hi there,

I am trying to add days to a given day, but somehow I am lost in all the time 
functions.
This should be a standard function. Maybe someone has a good hint for me?

This is the given day:
2004-04-29
I would like to add 2 days to it.
So php should anyhow now how many days April has to result in this:
2004-04-30
2004-05-1

Thank you for any helpful hint,

merlin

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




[PHP] Re: Sessions and PHP

2004-03-31 Thread pete M
THis does the same

http://0x00.org/php/phpApplication/

pete

Patrik Fomin wrote:

Hi,,

is there anyway to get the number of people connected to the site?
in asp you just use Application and session_terminate to accomplish this
is there anyway to do this in PHP ?
regards
patrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] What's the use in OOP?

2004-03-31 Thread Peter Albertsson
The OO paradigm maps very closely to problem domains, and is very easy to
model. OO let us build more complex software with less effort.

In general, OO code has more branches and hence use the stack more than
procedural code does. That is why OO code is thought not to be as fast as
procedural code. On the other hand it is easier to build better solutions
when using OOP, and therefore it is often said that applications written in
an OO language is +-10% faster or slower. 

One can use the OO features in PHP without having to worry about performance
penalties. If you are concerned about performance, discussing whether or not
to use OOP in PHP would simply be stupid (don't mean to offend anyone),
there is so many other variables that will have a far bigger impact on
performance than that.

Regards,

Peter Albertsson
Software Engineer and System Architect

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED] 
Sent: den 29 mars 2004 23:53
To: Stephen Craton; 'PHP List'
Subject: Re: [PHP] What's the use in OOP?

--- Stephen Craton [EMAIL PROTECTED] wrote:
 I've been reading up on object oriented programming in PHP for a while
 now and I just don't get what's the use in using it. It supposedly
 makes it faster, but I don't really see how in any of my scripts.

Makes it faster in what way? I'm curious to know what you've been reading.

Using objects is generally faster for the programmer and slower for the
computer. YMMV.

 What's the advantage of OOP anyway, and why are so many people using
 it now?

To really understand this, you need to use it. No one can tell you in one
or two lines enough information to explain the entire paradigm or even
convince you of its merits.

The one-liner attempt of mine would be something like:

It helps you associate data with functions that use that data.

There are lots of other things, of course. One method of learning about
this would be to take every OO term (encapsulation, namespacing, etc.) and
find a really good explanation of the term.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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

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



[PHP] Re: plz help

2004-03-31 Thread Aidan Lister
Please ask a specific question, not a jumble of poor English ramblings.

plz help is a stupid, stupid subject. Post again with a more appropriate
title.













Curlybraces Technologies Ltd [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

- Original Message - 
From: CurlyBraces Technologies ( Pvt ) Ltd
To: PHP ; Curt Zirzow ; Vail, Warren
Sent: Sunday, March 28, 2004 10:56 AM
Subject: plz help


hi ,

i have an apache web server in linux . Those php scripts runs in that pc.
Mean while another perl scrips runs associate with that php scripts .
altogether they develop a out put and store in the mysql database.That
process perfectly running.There is no any dout.
Once this web server started , no body can access this machine directly .
This machnie is behind the firewall . This machnie assingned as a web server
. That's mean all the ports has been blocked by the firewall except port 80
( this web server running under port 80 ). ping also has been blocked.
That certain url can access from any other out side pcs.
Some request handling purpose i want to stop that perl script where it is
runing in the web server . But from the web server we do it ctrl+c perl.pl
I want to do this through the web browser.
when pressing a stop button , it should effect to the perl script in the web
server and also when pressing start button it should start again .
.

i think u all can understand my problem , ..plz help ,

can some body help me to coverup the php scripting part,

thanx in advance

curlys

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



[PHP] Re: PEAR::SOAP

2004-03-31 Thread Jason Barnett
Robby Russell wrote:
I am trying to debug some xml issues with a SOAP/Client-based script.

$sc = new SOAP_Client(...);

is there a way to display the XML it attempts to send the server when I 
perform a
$sc-call(...)

*back to his google searches*



Just as a note, you might try posting to the php.pear.general group for 
your PEAR questions - some of the developers help out over there.  In 
any case it looks like you should be able to find the xml message in 
your transport class's send() method; check the SOAP/Transport directory

SOAP/Transport/HTTP.php

function send($msg, $options = null)
{
print_r($msg);
...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] finding certain dates in the future (again)

2004-03-31 Thread Andy B
Hi...

Is there any way to find say the third monday of the month (all months of the year) 
for any year (up to 2038) and show them in a combo box as exact dates? Have been 
trying to get something of the sort to work and havent quite figured out how thats 
supposed to work yet.  I tried strtotime and mktime but strtotime shows to be somewhat 
complicated to get to work with the general audience of the web service it is supposed 
to be put in. I need the day(s) of the month, the month and the year all in seperate 
combo boxes... Is this even possible? oh and before i forget the most important 
part...the final calculated date has to be put in a mysql db as a timestamp(14) 
field... the final version of the web service will be running on the setup below:
PHP Version 4.0.4pl1
Linux noir.propagation.net 2.0.36 #5 Wed Dec 16 18:09:02 CST 1998 i686 unknown
mysql version 3.23.22-beta
does anybody have any recommendations for this sort of problem??

tnx
(very stumped and confused)



Re[2]: [PHP] adding days to a given date

2004-03-31 Thread Richard Davey
Hello Richard,

Wednesday, March 31, 2004, 10:14:39 AM, you wrote:

JW strtotime() can do more than that, time to RTFM.

RH What else can it do other than convert dates to time strings Jason?

I have to agree with Jason on this one - the following code is just
reinventing the wheel:

$timeStamp = strtotime(2004-04-29);
$timeStamp += 24 * 60 * 60 * 7; // (add 7 days)
$newDate = date(Y-m-d, $timeStamp);

This is a very long winded way of getting the resulting date when you
can simply do this:

$newDate = strtotme(+7 day, time());

If you want it based on the current time the above will work, or just
replace time() with any other valid timestamp you may have.

Look at the manual entry for it for lots of other examples.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] finding certain dates in the future (again)

2004-03-31 Thread Harish
Hi

try mktime you can get it there

-Harish

-Original Message-
From: Andy B [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 4:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] finding certain dates in the future (again)


Hi...

Is there any way to find say the third monday of the month (all months of the year) 
for any year (up to 2038) and show them in a combo box as exact dates? Have been 
trying to get something of the sort to work and havent quite figured out how thats 
supposed to work yet.  I tried strtotime and mktime but strtotime shows to be somewhat 
complicated to get to work with the general audience of the web service it is supposed 
to be put in. I need the day(s) of the month, the month and the year all in seperate 
combo boxes... Is this even possible? oh and before i forget the most important 
part...the final calculated date has to be put in a mysql db as a timestamp(14) 
field... the final version of the web service will be running on the setup below:
PHP Version 4.0.4pl1
Linux noir.propagation.net 2.0.36 #5 Wed Dec 16 18:09:02 CST 1998 i686 unknown
mysql version 3.23.22-beta
does anybody have any recommendations for this sort of problem??

tnx
(very stumped and confused)



Re: [PHP] finding certain dates in the future (again)

2004-03-31 Thread Jason Wong
On Wednesday 31 March 2004 19:28, Andy B wrote:

 Is there any way to find say the third monday of the month (all months of
 the year) for any year (up to 2038) and show them in a combo box as exact
 dates?

strtotime(third monday, mktime(0, 0, 0, $month, 1, $year));

I'm sure you can work out the rest.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Time is fluid ... like a river with currents, eddies, backwash.
-- Spock, The City on the Edge of Forever, stardate 3134.0
*/

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



[PHP] array_search does not find the first element

2004-03-31 Thread Merlin
Hi there,

I am trying to find values inside an array. This array always starts with 0.
unfortunatelly array_search start searching with the array element 1.
So the first element is always overlooked.
How could I shift this array to start with 1, or make array-search start with 0?
The array comes out of an xml webservice, so I can not rally modify the results.
array_search($check_date, $results)

Thanx for any help on that.

Merlin

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


Re: [PHP] array_search does not find the first element

2004-03-31 Thread Tom Rogers
Hi,

Wednesday, March 31, 2004, 10:20:06 PM, you wrote:
M Hi there,

M I am trying to find values inside an array. This array always starts with 0.
M unfortunatelly array_search start searching with the array element 1.
M So the first element is always overlooked.

M How could I shift this array to start with 1, or make array-search start with 0?
M The array comes out of an xml webservice, so I can not rally modify the results.

M array_search($check_date, $results)

M Thanx for any help on that.

M Merlin


If you are checking the return value you will need to use === as 0
will fail in == tests. As far as I know array_search() starts at the 0
key.

-- 
regards,
Tom

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



Re: [PHP] array_search does not find the first element

2004-03-31 Thread John Holmes
Merlin wrote:

I am trying to find values inside an array. This array always starts 
with 0.
unfortunatelly array_search start searching with the array element 1.
So the first element is always overlooked.
Please read the text inside the big Warning box on the following page:

http://us2.php.net/array_search

Thanks.

---John Holmes...

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


[PHP] Re: array_search does not find the first element

2004-03-31 Thread Jason Barnett
Merlin wrote:

Hi there,

I am trying to find values inside an array. This array always starts 
with 0.
Do you mean the keys?  Or the values?  Unnamed keys _should_ start with 0.

unfortunatelly array_search start searching with the array element 1.
So the first element is always overlooked.
How could I shift this array to start with 1, or make array-search 
Careful with your terminology... I almost thought you meant this...
http://www.php.net/function.array-shift
start with 0?
The array comes out of an xml webservice, so I can not rally modify the 
results.

array_search($check_date, $results)

Thanx for any help on that.

Merlin
I don't entirely understand what you're trying to do here.  See the 
manual, it might help you:
http://www.php.net/manual/en/function.array-search.php

If what you're trying to do is use increase the key by one, you can do:

function my_array_search($needle, $haystack, $strict=false) {
$key = array_search($needle, $haystack, $strict);
if (is_integer($key)) $key++;
return $key;
}
my_array_search($xml_service_array);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] fsockopen connection error on IIS

2004-03-31 Thread Michael Egan
Hello all,

I'm working with somebody using IIS (honest - it's not me) to try and develop some web 
services whereby a site hosted on IIS is able to access data using a nusoap client 
with a nusoap server set up on a linux/apache server. I can do this satisfactorily 
from another linux/apache server but my colleague is having problems doing this from 
IIS.

The main problem seems to be that fsockopen isn't working from their system. We have 
tried running the following script:

?php
$fp = fsockopen(www.thehostname.com, 80, $errno, $errstr, 30);

if (!$fp) 

{
   echo $errstr ($errno)br /\n;
} 

else 

{

   echo Success;

}
? 

But the following error is returned:

Warning: fsockopen(): unable to connect to www.thehostname.com:80 in 
C:\Inetpub\wwwroot\webservice\fsocktest.php on line 2
A connection attempt failed because the connected party did not properly respond after 
a period of time, or established connection failed because connected host has failed 
to respond. (10060)

I've searched through a few mailing list archives and the only thing I came across was 
the suggestion that the client server is not allowing outgoing connections. Is there 
any way of testing this or indeed any other suggestions as to what might be going 
wrong.

I confess I feel I'm on extremely thin ice with this - I'm not overly familiar with 
nusoap and have no familiarity whatsoever with IIS. Any general pointers would be 
extremely welcome.

Regards,

Michael Egan

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



[PHP] Hinding URL

2004-03-31 Thread Will
Hello all,

I am hoping someone can help me.

When someone brings up a page in the browser, is there a way to hide the URL
in the browser bar to a set URL??

Example: I want them to see this URL in the browser:
http://domain.com/test.htm But, I want them to see the url of
http://domain.com in the browser bar. Is this possible?? I hope so!!!

~WILL~

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



RE: [PHP] Hinding URL

2004-03-31 Thread James Nunnerley
Will,

This isn't really a PHP thing... you can do it a number of ways... probably
the best is to use frames.  If you only have one then just create a single
frameset with one frame in it

Have a look at a HTML help site...

Nunners

 -Original Message-
 From: Will [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:38
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hinding URL


 Hello all,

 I am hoping someone can help me.

 When someone brings up a page in the browser, is there a way to
 hide the URL
 in the browser bar to a set URL??

 Example: I want them to see this URL in the browser:
 http://domain.com/test.htm But, I want them to see the url of
 http://domain.com in the browser bar. Is this possible?? I hope so!!!

 ~WILL~

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





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



RE: [PHP] Hinding URL

2004-03-31 Thread Hawkes, Richard
You could use HTML Frames, ensuring 'index.html' was your main frame. Not much
PHP required though!

-Original Message-
From: Will [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 14:38
To: [EMAIL PROTECTED]
Subject: [PHP] Hinding URL


Hello all,

I am hoping someone can help me.

When someone brings up a page in the browser, is there a way to hide the URL
in the browser bar to a set URL??

Example: I want them to see this URL in the browser:
http://domain.com/test.htm But, I want them to see the url of
http://domain.com in the browser bar. Is this possible?? I hope so!!!

~WILL~

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



Re: [PHP] Hinding URL

2004-03-31 Thread Duncan Hill
On Wednesday 31 March 2004 14:38, Will wrote:
 Hello all,

 I am hoping someone can help me.

 When someone brings up a page in the browser, is there a way to hide the
 URL in the browser bar to a set URL??

Why should a remote server have control over what a local client can display?

The closest you can come is to hide the entire location bar by using 
javascript to open a new window with no location bar, but that'll fail on any 
client that has JS disabled, or has rules set to override JS messing around 
with the browser (like my browsers are configured to do).

Alternately, you can use frames, but that's a whole other can of worms.

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



RE: [PHP] Hinding URL[Scanned]

2004-03-31 Thread Michael Egan
Will,

I had a look at this a while ago though never pursued it. If you do a search on google 
for url cloaking this should give you some pointers.

I think the only way of doing it is to set up an empty frame and load all pages within 
that frame. This will hide more complex urls but with all the costs of using frames.

HTH,

Michael Egan

 -Original Message-
 From: Will [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:38
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hinding URL[Scanned]
 
 
 Hello all,
 
 I am hoping someone can help me.
 
 When someone brings up a page in the browser, is there a way 
 to hide the URL
 in the browser bar to a set URL??
 
 Example: I want them to see this URL in the browser:
 http://domain.com/test.htm But, I want them to see the url of
 http://domain.com in the browser bar. Is this possible?? I hope so!!!
 
 ~WILL~
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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



RE: [PHP] Hinding URL {OT}

2004-03-31 Thread Jay Blanchard
[snip]
When someone brings up a page in the browser, is there a way to hide the
URL
in the browser bar to a set URL??

Example: I want them to see this URL in the browser:
http://domain.com/test.htm But, I want them to see the url of
http://domain.com in the browser bar. Is this possible?? I hope so!!!
[/snip]

I typed 'hiding url' into the little search box at Google and received
dozens of answers? You?

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



RE: [PHP] Hinding URL[Scanned]

2004-03-31 Thread Hawkes, Richard
So we're all agreed on Frames then?!

-Original Message-
From: Michael Egan [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 14:43
To: Will; [EMAIL PROTECTED]
Subject: RE: [PHP] Hinding URL[Scanned]


Will,

I had a look at this a while ago though never pursued it. If you do a search
on google for url cloaking this should give you some pointers.

I think the only way of doing it is to set up an empty frame and load all
pages within that frame. This will hide more complex urls but with all the
costs of using frames.

HTH,

Michael Egan

 -Original Message-
 From: Will [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:38
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hinding URL[Scanned]
 
 
 Hello all,
 
 I am hoping someone can help me.
 
 When someone brings up a page in the browser, is there a way 
 to hide the URL
 in the browser bar to a set URL??
 
 Example: I want them to see this URL in the browser:
 http://domain.com/test.htm But, I want them to see the url of
 http://domain.com in the browser bar. Is this possible?? I hope so!!!
 
 ~WILL~
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



RE: [PHP] Hinding URL[Scanned]

2004-03-31 Thread Will
Thanks everyone! :)  I was not sure what it was called.

Thanks again,
~WILL~
PS: Sorry I thought you could do something in PHP.


-Original Message-
From: Michael Egan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 31, 2004 8:43 AM
To: Will; [EMAIL PROTECTED]
Subject: RE: [PHP] Hinding URL[Scanned]

Will,

I had a look at this a while ago though never pursued it. If you do a
search on google for url cloaking this should give you some pointers.

I think the only way of doing it is to set up an empty frame and load
all pages within that frame. This will hide more complex urls but with
all the costs of using frames.

HTH,

Michael Egan

 -Original Message-
 From: Will [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:38
 To: [EMAIL PROTECTED]
 Subject: [PHP] Hinding URL[Scanned]
 
 
 Hello all,
 
 I am hoping someone can help me.
 
 When someone brings up a page in the browser, is there a way 
 to hide the URL
 in the browser bar to a set URL??
 
 Example: I want them to see this URL in the browser:
 http://domain.com/test.htm But, I want them to see the url of
 http://domain.com in the browser bar. Is this possible?? I hope so!!!
 
 ~WILL~
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

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



Re: [PHP] Hinding URL{ot}

2004-03-31 Thread John W. Holmes
From: Will [EMAIL PROTECTED]

 Thanks everyone! :)  I was not sure what it was called.

 Thanks again,
 ~WILL~
 PS: Sorry I thought you could do something in PHP.

Don't think for a second that you're actually hiding anything here. The only
people you'll fool are newbies browsing the web. While there are a lot of
them, those are probably not the people you're looking to hide information
from.

---John Holmes...

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



RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Michael Egan
John,

I agree with you but when I first looked at this I too thought there was some way of 
doing this in php which might look more elegant. Seeing urls such as 
www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy67eh4563yh4635 looks 
fairly cumbersome and I'm sure I've seen something about problems with some of the 
search engines where session id's are included in urls.

On seeing that the only way of doing this was to use frames I decided that the costs 
of doing this probably outweighed what is in effect a purely cosmetic issue.

Regards,

Michael Egan

 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 14:59
 To: Will; [EMAIL PROTECTED]
 Subject: Re: [PHP] Hinding URL{ot}[Scanned]
 
 
 From: Will [EMAIL PROTECTED]
 
  Thanks everyone! :)  I was not sure what it was called.
 
  Thanks again,
  ~WILL~
  PS: Sorry I thought you could do something in PHP.
 
 Don't think for a second that you're actually hiding anything 
 here. The only
 people you'll fool are newbies browsing the web. While 
 there are a lot of
 them, those are probably not the people you're looking to 
 hide information
 from.
 
 ---John Holmes...
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



RE: [PHP] fsockopen connection error on IIS[Scanned]

2004-03-31 Thread Michael Egan
Problem solved. It seems there was a proxy server involved which was screwing things 
up.

Regards,

Michael Egan

 -Original Message-
 From: Michael Egan 
 Sent: 31 March 2004 14:20
 To: PHP General (E-mail)
 Subject: [PHP] fsockopen connection error on IIS[Scanned]
 
 
 Hello all,
 
 I'm working with somebody using IIS (honest - it's not me) to 
 try and develop some web services whereby a site hosted on 
 IIS is able to access data using a nusoap client with a 
 nusoap server set up on a linux/apache server. I can do this 
 satisfactorily from another linux/apache server but my 
 colleague is having problems doing this from IIS.
 
 The main problem seems to be that fsockopen isn't working 
 from their system. We have tried running the following script:
 
 ?php
 $fp = fsockopen(www.thehostname.com, 80, $errno, $errstr, 30);
 
 if (!$fp) 
 
 {
echo $errstr ($errno)br /\n;
 } 
 
 else 
 
 {
 
echo Success;
 
 }
 ? 
 
 But the following error is returned:
 
 Warning: fsockopen(): unable to connect to 
 www.thehostname.com:80 in 
 C:\Inetpub\wwwroot\webservice\fsocktest.php on line 2
 A connection attempt failed because the connected party did 
 not properly respond after a period of time, or established 
 connection failed because connected host has failed to 
 respond. (10060)
 
 I've searched through a few mailing list archives and the 
 only thing I came across was the suggestion that the client 
 server is not allowing outgoing connections. Is there any way 
 of testing this or indeed any other suggestions as to what 
 might be going wrong.
 
 I confess I feel I'm on extremely thin ice with this - I'm 
 not overly familiar with nusoap and have no familiarity 
 whatsoever with IIS. Any general pointers would be extremely welcome.
 
 Regards,
 
 Michael Egan
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Matt Matijevich
snip
I agree with you but when I first looked at this I too thought there
was some way of doing this in php which might look more elegant. Seeing
urls such as
www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy67eh4563yh4635
looks fairly cumbersome and I'm sure I've seen something about problems
with some of the search engines where session id's are included in
urls.
/snip

If you use apache you could try these links

http://www.alistapart.com/articles/urls/
http://www.alistapart.com/articles/succeed/

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



RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Aaron Wolski
 On seeing that the only way of doing this was to use frames I decided
that
 the costs of doing this probably outweighed what is in effect a purely
 cosmetic issue.

Never ever underestimate the cosmetic factor when you are talking
about Usability and search engines.

For example, if you are developing an ecommerce site - you have to think
about your users/customers.

In my testing and research, I have found that a large percentage of
users will not bookmark URLS that look like:

http://www.domain.com?id=1232subcat=32prodId=165412 

They will, however, be more apt to bookmark URLS that look like:

http://www.domain.com/shirts/white/flanel_button_down/

Why are users more apt to bookmark the latter? They make sense to the
user.

If you want people to come back to your site, bookmark your pages, and
forward pages along to their friends... you gotta think like they do.
You have to use URLs that make sense to THEM - not you.

Search engine marketing is another factor to usable URLs.

Just my thoughts.

Aaron

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



Re: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread John W. Holmes
From: Michael Egan [EMAIL PROTECTED]

 I agree with you but when I first looked at this I too
 thought there was some way of doing this in php
 which might look more elegant. Seeing urls such
 as
www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy67eh4563yh4635
 looks fairly cumbersome and I'm sure I've seen something
 about problems with some of the search engines where
 session id's are included in urls.

Do a search for search engine friendly URLs or somethig along those lines
to see how to fix this. Using frames is not a very elegant solution. I'm not
sure how/if search engines will index your pages if you have frames.

---John Holmes...

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



RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Michael Egan
Matt,

Many thanks for these excellent links - I think I might have reached a different 
conclusion if I'd come across these at the outset.

Cheers,

Michael Egan

 -Original Message-
 From: Matt Matijevich [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 15:11
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Hinding URL{ot}[Scanned]
 
 
 snip
 I agree with you but when I first looked at this I too thought there
 was some way of doing this in php which might look more 
 elegant. Seeing
 urls such as
 www.mydomain.com/index.php?article_id=2id=e5t28er647ryh362hy6
7eh4563yh4635
 looks fairly cumbersome and I'm sure I've seen something 
 about problems
 with some of the search engines where session id's are included in
 urls.
 /snip
 
 If you use apache you could try these links
 
 http://www.alistapart.com/articles/urls/
 http://www.alistapart.com/articles/succeed/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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



RE: [PHP] Hinding URL{ot}[Scanned]

2004-03-31 Thread Aaron Wolski
 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]
 
 Do a search for search engine friendly URLs or somethig along those
 lines to see how to fix this. Using frames is not a very elegant
solution.  I'm not sure how/if search engines will index your pages if
you have   frames.

They will, however, careful planning and proper coding must be taken
into account to ensure when a page is indexed in Google - for example -
that it's not a loner' page or that when the user clicks the link found
it will not be void of the design teamplte.

Not impossible, but more work in the short-term.

HTH

Aaron 



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



[PHP] Is There a Stack Trace for Errors?

2004-03-31 Thread Hawkes, Richard
Hi Gang,

I'm now writing the dreaded support document for the code, and I need to
enhance my PHP to show error numbers so we can diagnose where it failed. All
fine so far, but I've found a couple of functions that can be called from
various other functions, so it's difficult to track where it came from.

So... Is there a 'printStackTrace()' type function in PHP like there is in
Java? 

Hope that's clear!

Thanks
Richard

-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 15:16
To: 'Michael Egan'; 'John W. Holmes'; 'Will'; [EMAIL PROTECTED]
Subject: RE: [PHP] Hinding URL{ot}[Scanned]


 On seeing that the only way of doing this was to use frames I decided
that
 the costs of doing this probably outweighed what is in effect a purely
 cosmetic issue.

Never ever underestimate the cosmetic factor when you are talking
about Usability and search engines.

For example, if you are developing an ecommerce site - you have to think
about your users/customers.

In my testing and research, I have found that a large percentage of
users will not bookmark URLS that look like:

http://www.domain.com?id=1232subcat=32prodId=165412 

They will, however, be more apt to bookmark URLS that look like:

http://www.domain.com/shirts/white/flanel_button_down/

Why are users more apt to bookmark the latter? They make sense to the
user.

If you want people to come back to your site, bookmark your pages, and
forward pages along to their friends... you gotta think like they do.
You have to use URLs that make sense to THEM - not you.

Search engine marketing is another factor to usable URLs.

Just my thoughts.

Aaron

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



[PHP] Recode and OpenBSD

2004-03-31 Thread Michael Rasmussen
Hi all,

Is recode broken in php4.3.3 on OpenBSD? When I try recode it returns an
empty string! The same string used in mb* and iconv performs as expected.

-- 
Hilsen/Regards
Michael Rasmussen
--
You would if you could but you can't so you won't.

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



Re: [PHP] Is There a Stack Trace for Errors?

2004-03-31 Thread Red Wingate
Maybe you would like to check out debug_bracktrace();

Hawkes, Richard wrote:
Hi Gang,

I'm now writing the dreaded support document for the code, and I need to
enhance my PHP to show error numbers so we can diagnose where it failed. All
fine so far, but I've found a couple of functions that can be called from
various other functions, so it's difficult to track where it came from.
So... Is there a 'printStackTrace()' type function in PHP like there is in
Java? 

Hope that's clear!

Thanks
Richard
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 15:16
To: 'Michael Egan'; 'John W. Holmes'; 'Will'; [EMAIL PROTECTED]
Subject: RE: [PHP] Hinding URL{ot}[Scanned]


On seeing that the only way of doing this was to use frames I decided
that

the costs of doing this probably outweighed what is in effect a purely
cosmetic issue.


Never ever underestimate the cosmetic factor when you are talking
about Usability and search engines.
For example, if you are developing an ecommerce site - you have to think
about your users/customers.
In my testing and research, I have found that a large percentage of
users will not bookmark URLS that look like:
http://www.domain.com?id=1232subcat=32prodId=165412 

They will, however, be more apt to bookmark URLS that look like:

http://www.domain.com/shirts/white/flanel_button_down/

Why are users more apt to bookmark the latter? They make sense to the
user.
If you want people to come back to your site, bookmark your pages, and
forward pages along to their friends... you gotta think like they do.
You have to use URLs that make sense to THEM - not you.
Search engine marketing is another factor to usable URLs.

Just my thoughts.

Aaron

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


Re: [PHP] determining number of rows in a mysql table

2004-03-31 Thread Richard Davey
Hello Andy,

Tuesday, March 30, 2004, 6:48:47 AM, you wrote:

AB $rows=mysql_query(select count(*) as count from users);
AB $count=mysql_fetch_array($rows);

There's no need to extract the result into an array in this instance,
why bother giving PHP that extra overhead? Unless the query failed,
the value count will *always* exist at row 0, so you can simply do:

$count = mysql_result($rows, 0, 'count');

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] Is There a Stack Trace for Errors?

2004-03-31 Thread Hawkes, Richard
Thank you very much. Perhaps I should RTFM eh? Much better to get good advice
though wouldn't you say?!

Cheers
Richard

-Original Message-
From: Red Wingate [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 16:16
To: Hawkes, Richard
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Is There a Stack Trace for Errors?


Maybe you would like to check out debug_bracktrace();

Hawkes, Richard wrote:
 Hi Gang,
 
 I'm now writing the dreaded support document for the code, and I need to
 enhance my PHP to show error numbers so we can diagnose where it failed. All
 fine so far, but I've found a couple of functions that can be called from
 various other functions, so it's difficult to track where it came from.
 
 So... Is there a 'printStackTrace()' type function in PHP like there is in
 Java? 
 
 Hope that's clear!
 
 Thanks
 Richard
 
 -Original Message-
 From: Aaron Wolski [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2004 15:16
 To: 'Michael Egan'; 'John W. Holmes'; 'Will'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Hinding URL{ot}[Scanned]
 
 
 
On seeing that the only way of doing this was to use frames I decided
 
 that
 
the costs of doing this probably outweighed what is in effect a purely
cosmetic issue.
 
 
 Never ever underestimate the cosmetic factor when you are talking
 about Usability and search engines.
 
 For example, if you are developing an ecommerce site - you have to think
 about your users/customers.
 
 In my testing and research, I have found that a large percentage of
 users will not bookmark URLS that look like:
 
 http://www.domain.com?id=1232subcat=32prodId=165412 
 
 They will, however, be more apt to bookmark URLS that look like:
 
 http://www.domain.com/shirts/white/flanel_button_down/
 
 Why are users more apt to bookmark the latter? They make sense to the
 user.
 
 If you want people to come back to your site, bookmark your pages, and
 forward pages along to their friends... you gotta think like they do.
 You have to use URLs that make sense to THEM - not you.
 
 Search engine marketing is another factor to usable URLs.
 
 Just my thoughts.
 
 Aaron
 

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


==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==

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



[PHP] Regex

2004-03-31 Thread Brent Clark
Hi all

does anyone know of a regex expression to get only the number number from after the 
Code 39

Kind Regards
Brent Clark

1 barcodes found Code 39-10005215 
This is the search1 barcodes found 2 barcodes found Code 39-10005216 Datalogic 2 of 
5-4 
This is the search2 barcodes found 1 barcodes found Code 39-10005210 
This is the search1 barcodes found 2 barcodes found Code 39-10006106 IATA 2 of 5-2 
This is the search2 barcodes found 1 barcodes found Code 39-10005218 
This is the search1 barcodes found 1 barcodes found Code 39-10004516 
This is the search1 barcodes found 1 barcodes found Code 39-10006087 
This is the search1 barcodes found 3 barcodes found Code 39-10005802 IATA 2 of 5-2 
IATA 2 of 5-8 
This is the search3 barcodes found 1 barcodes found Code 39-10006081 
This is the search1 barcodes found 1 barcodes found Code 39-10004518 
This is the search1 barcodes found 1 barcodes found Code 39-10004531 
This is the search1 barcodes found 1 barcodes found Code 39-10004039 
This is the search1 barcodes found 1 barcodes found Code 39-10004521 
This is the search1 barcodes found 1 barcodes found Code 39-10004519 
This is the search1 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found No barcodes found 
This is the searchNo barcodes found No barcodes found 
This is the searchNo barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 

Re: [PHP] Regex

2004-03-31 Thread Red Wingate
preg_match( #39-([0-9]{8})# , $source , $result );

Brent Clark wrote:

Hi all

does anyone know of a regex expression to get only the number number from after the Code 39

Kind Regards
Brent Clark
1 barcodes found Code 39-10005215 
This is the search1 barcodes found 2 barcodes found Code 39-10005216 Datalogic 2 of 5-4 
This is the search2 barcodes found 1 barcodes found Code 39-10005210 
This is the search1 barcodes found 2 barcodes found Code 39-10006106 IATA 2 of 5-2 
This is the search2 barcodes found 1 barcodes found Code 39-10005218 
This is the search1 barcodes found 1 barcodes found Code 39-10004516 
This is the search1 barcodes found 1 barcodes found Code 39-10006087 
This is the search1 barcodes found 3 barcodes found Code 39-10005802 IATA 2 of 5-2 IATA 2 of 5-8 
This is the search3 barcodes found 1 barcodes found Code 39-10006081 
This is the search1 barcodes found 1 barcodes found Code 39-10004518 
This is the search1 barcodes found 1 barcodes found Code 39-10004531 
This is the search1 barcodes found 1 barcodes found Code 39-10004039 
This is the search1 barcodes found 1 barcodes found Code 39-10004521 
This is the search1 barcodes found 1 barcodes found Code 39-10004519 
This is the search1 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found No barcodes found 
This is the searchNo barcodes found No barcodes found 
This is the searchNo barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 2 barcodes found Code 39-47429 Code 39-10004306 
This is the search2 barcodes found 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Regex

2004-03-31 Thread Burhan Khalid
Brent Clark wrote:
Hi all

does anyone know of a regex expression to get only the number number from after the Code 39

Kind Regards
Brent Clark
1 barcodes found Code 39-10005215
$barcodes = Code 39-10005216;

$parts = explode(,$barcodes);
echo Number is .$parts[1];
Might be faster.

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


Re: [PHP] Regex

2004-03-31 Thread Red Wingate
Faster, but wrong. Take a look at his question and examples.

Burhan Khalid wrote:

Brent Clark wrote:

Hi all

does anyone know of a regex expression to get only the number number 
from after the Code 39

Kind Regards
Brent Clark
1 barcodes found Code 39-10005215


$barcodes = Code 39-10005216;

$parts = explode(,$barcodes);
echo Number is .$parts[1];
Might be faster.

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


Re: [PHP] File Download link not working in PHP 4.3.4

2004-03-31 Thread Andrew Hauger
Curt,

Thanks for the suggestions. Unfortunately, no luck
yet. Here's the current version of the affected lines
of code:

$file_type = vnd.ms-excel;
$file_ending = xls;
header ( Content-Type: application/$file_type );
header ( 'Content-Disposition: attachment;
filename=product.'.$file_ending.'' );
header ( 'Expires: ' . date ( 'r', 0 ));

Still getting the same behavior, on both the Windows
and Solaris platforms.

Andy

 From: Curt Zirzow [EMAIL PROTECTED]
 Sent: Tuesday, March 30, 2004 9:56 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] File Download link not working in
PHP 4.3.4
 
 * Thus wrote Andrew Hauger ([EMAIL PROTECTED]):
  the file name. When the OK button is clicked, an
  error dialog pops up with the message Internet
  Explorer cannot download ... [snipped URL].
Internet
  Explorer was not able to open this Internet site.
The
  requested site is either unavailable or cannot be
  found. Please try again later.
 
 This can mean a lot of things, IE tends to be too
friendly
 sometimes.
 
 
  
  Here are the header commands:
  
  $file_type = vnd.ms-excel;
  $file_ending = xls;
  header ( Content-Type: application/$file_type );
  header ( Content-Disposition: attachment;
  filename=product..$file_ending );
 
 Quote the filename, although it most likley wont be
the problem.
 
Conent-Type: attachment; filename=product.xls
 
 
  header ( Expires: 0 );
 
 I might wage this is the problem, it needs to be a
valid HTTP date,
 something like this will do the job:
 
   header('Expires: ' . date('r', 0); 
 
 
 Curt
 -- 
 I used to think I was indecisive, but now I'm not
so sure.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system
(http://www.grisoft.com).
 Version: 6.0.624 / Virus Database: 401 - Release
Date: 3/15/2004

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



Re: [PHP] Regex

2004-03-31 Thread John W. Holmes
From: Burhan Khalid [EMAIL PROTECTED]

 Brent Clark wrote:
  Hi all
 
  does anyone know of a regex expression to get only the number number
from after the Code 39
 
  Kind Regards
  Brent Clark
 
  1 barcodes found Code 39-10005215

 $barcodes = Code 39-10005216;

 $parts = explode(,$barcodes);
 echo Number is .$parts[1];

Something like this would work, but you'd have to skip $part[0], like he
does, then take the substr($part[x],0,8) of each element to get the numbers
(since you have multiple lines of numbers).

Use what you understand. :)

---John Holmes...

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



Re: [PHP] determining number of rows in a mysql table

2004-03-31 Thread John W. Holmes
From: Richard Davey [EMAIL PROTECTED]

 AB $rows=mysql_query(select count(*) as count from users);
 AB $count=mysql_fetch_array($rows);
 
 There's no need to extract the result into an array in this instance,
 why bother giving PHP that extra overhead? Unless the query failed,
 the value count will *always* exist at row 0, so you can simply do:
 
 $count = mysql_result($rows, 0, 'count');

Or even just 

$count = mysql_result($rows,0);

;)

---John Holmes...

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



Re: [PHP] File Download link not working in PHP 4.3.4

2004-03-31 Thread John W. Holmes
Check the comments on this page:

http://us2.php.net/manual/en/function.session-cache-limiter.php

---John Holmes...

- Original Message - 
From: Andrew Hauger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:18 AM
Subject: Re: [PHP] File Download link not working in PHP 4.3.4


 Curt,
 
 Thanks for the suggestions. Unfortunately, no luck
 yet. Here's the current version of the affected lines
 of code:
 
 $file_type = vnd.ms-excel;
 $file_ending = xls;
 header ( Content-Type: application/$file_type );
 header ( 'Content-Disposition: attachment;
 filename=product.'.$file_ending.'' );
 header ( 'Expires: ' . date ( 'r', 0 ));
 
 Still getting the same behavior, on both the Windows
 and Solaris platforms.
 
 Andy
 
  From: Curt Zirzow [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 9:56 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] File Download link not working in
 PHP 4.3.4
  
  * Thus wrote Andrew Hauger ([EMAIL PROTECTED]):
   the file name. When the OK button is clicked, an
   error dialog pops up with the message Internet
   Explorer cannot download ... [snipped URL].
 Internet
   Explorer was not able to open this Internet site.
 The
   requested site is either unavailable or cannot be
   found. Please try again later.
  
  This can mean a lot of things, IE tends to be too
 friendly
  sometimes.
  
  
   
   Here are the header commands:
   
   $file_type = vnd.ms-excel;
   $file_ending = xls;
   header ( Content-Type: application/$file_type );
   header ( Content-Disposition: attachment;
   filename=product..$file_ending );
  
  Quote the filename, although it most likley wont be
 the problem.
  
 Conent-Type: attachment; filename=product.xls
  
  
   header ( Expires: 0 );
  
  I might wage this is the problem, it needs to be a
 valid HTTP date,
  something like this will do the job:
  
header('Expires: ' . date('r', 0); 
  
  
  Curt
  -- 
  I used to think I was indecisive, but now I'm not
 so sure.
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  ---
  Incoming mail is certified Virus Free.
  Checked by AVG anti-virus system
 (http://www.grisoft.com).
  Version: 6.0.624 / Virus Database: 401 - Release
 Date: 3/15/2004
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



[PHP] Stop/Start a perl script

2004-03-31 Thread CurlyBraces Technologies \( Pvt \) Ltd



by using php technology, is there any possibility 
to stop/start perl script ina remote machine ?

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

Re: [PHP] Re: STOP to send me mails !!!! Re: [PHP] Re: list to array

2004-03-31 Thread Justin Patrin
Lester Caine wrote:

Wabyan wrote:

I do not know why I received this newsgroup infos, even if I like PHP :-)
I will follow procedure unsbcribe 


But if you have subscribed for email delivery - unsubscribe does not 
work. I know I now get both eMail and have to use the newsgroup to post. 
There are MAJOR problems with the system that NOBODY seems to be 
addressing !

Thanks for your reply


Are you sure you did it right?
http://us4.php.net/unsub.php
--
paperCrane Justin Patrin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] OOP Class Interaction

2004-03-31 Thread Jonathan Pitcher
I have been writing OOP programs for the past couple years.  Over these 
years I have run into the same problem, I have solved the problem in 
many different ways.  I was wondering if there is a recommended way to 
solve the problem I have listed below.

To keep it simple, lets say I have 3 classes.  A main class, an error 
class and a log class.

The classes are laid out as:

  MAIN
  |
  
  ||
ERROR  LOG
Now I want error to write a message to the log file.

Solution 1

  Store the Main class in a Session variable. And the access the 
Log through main.

 $_SESSION[Main]-Log-Write_Error(My Error);

Solution 2

 Almost the same as above.  I store main in a Session Variable but 
the I create a global function to access log.

  function Write_Error($Message)
  {
 $_SESSION[Main]-Log-Write_Error($Message);
 }
	This ways saves coding time because I don't have to write out the long 
session reference.

I know there are more ways to do this.  But every way I can think of 
requires you to store the main class in a session variable to access 
log.  Is there a way to access a parent class or a parents parent 
without doing what I did above ?

Thanks in advance,

Jonathan Pitcher


[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
$count = mysql_result($rows, 0, 'count');

i guess that would work too if all you need is the # of rows in a table...
if you need it in an array then...

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



Re: [PHP] OOP Class Interaction

2004-03-31 Thread Robert Cummings
On Wed, 2004-03-31 at 12:55, Jonathan Pitcher wrote:
 I have been writing OOP programs for the past couple years.  Over these 
 years I have run into the same problem, I have solved the problem in 
 many different ways.  I was wondering if there is a recommended way to 
 solve the problem I have listed below.
 
 To keep it simple, lets say I have 3 classes.  A main class, an error 
 class and a log class.
 
 The classes are laid out as:
 
MAIN
|

||
 ERROR  LOG
 
 
 Now I want error to write a message to the log file.
 
 Solution 1
 
Store the Main class in a Session variable. And the access the 
 Log through main.
 
   $_SESSION[Main]-Log-Write_Error(My Error);
 
 Solution 2
 
   Almost the same as above.  I store main in a Session Variable but 
 the I create a global function to access log.
 
function Write_Error($Message)
{
   $_SESSION[Main]-Log-Write_Error($Message);
   }
 
   This ways saves coding time because I don't have to write out the long 
 session reference.
 
 
 I know there are more ways to do this.  But every way I can think of 
 requires you to store the main class in a session variable to access 
 log.  Is there a way to access a parent class or a parents parent 
 without doing what I did above ?

You can use a base object service class. The InterJinn framework uses
this method to access all such classes. In this way a single common and
inheritable method can be used to retrieve singleton objects, or to act
as a factory. This provides loose coupling for any given object from the
consumer of it's services. For instance:

class Exception extends BaseClass
{
function triggerError( $errorMsg )
{
// Some erroneous condition.

$log = $this-getServiceRef( 'log' );
$log-log( $errorMsg );
}
}

InterJinn does a lot of things behind the scenes in the getService()
method such as lazy loading of the source code, and lazy instantiation
of the object. This way unused services have a minimal impact on
application's performance when they are not actually needed. Hope this
helps you with your question.

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

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



[PHP] globals

2004-03-31 Thread Daniel Bahena
is it too bad to have the globals = on in /etc/php.ini ?

Best wishes

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



Re: [PHP] globals

2004-03-31 Thread Robert Cummings
On Tue, 2004-03-30 at 20:31, Daniel Bahena wrote:
 is it too bad to have the globals = on in /etc/php.ini ?

It is strongly advised to have this set to off for security and
maintainability reasons.

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

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



Re: [PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Richard Davey
Hello Andy,

Wednesday, March 31, 2004, 7:02:59 PM, you wrote:

AB i guess that would work too if all you need is the # of rows in a table...
AB if you need it in an array then...

... then you read the part of my post that said There's no need to
extract the result into an array **in this instance**, why bother giving
PHP that extra overhead?

I **highlighted** the relevant part for you :)

Don't forge that nearly all replies to this list are meant in the
context of the original problem, not generically, and this was
certainly no exception.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
I **highlighted** the relevant part for you :)

i know what you mean... if you highlighted the part you were talking about
with color then would explain why i didnt get what part you were talking
about... my screen reader doesnt pay much attention to color highlights so
probably missed it...

sorry...

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



Re: [PHP] Re: TUX web server replacement

2004-03-31 Thread William Lovaton
Hi Manuel,

El mar, 30-03-2004 a las 18:11, Manuel Lemos escribió:
  This might work... I gues that any web server to make advantage of the
  new kernel 2.6 has to make explicit use of the sendfile() system call. 
  I know for sure that boa does it.  I don't know about thttpd or apache2.
 
 Honestly I think your are crazy to start using such early versions of 
 Linux 2.6. It is very likely that it is still buggy and prone to 
 security holes that were not yet found and fixed. In general it is a 
 very bad idea to be an early adopter of the first releases of a new 
 software version. If I were you I would be patient and would probably 
 give it a year before start using Linux 2.6 in critical production 
 environments.


Well... I'm not crazy, really  :-).  MDK 10 features a 2.6.3 kernel and
it is much more stable than 2.4.3 was for example.

In fact, from all distros I've ever tried, this one is the less
problematic (if you can call it problematic).  Not a single issue with
the installation and configuration of the server.  The only problem I
had was that mounting a CD from the desktop wasn't working properly out
of the box but it was fairly easy to fix.

The single seriuos problem I have left to solve is with the NIC
interface, I suspect it is working Half Duplex and mii-tool doesn't seem
to work.

OTOH, You might be right about security holes but the server is working
in an intranet so it is way less risky than the internet.


-William

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



[PHP] Dynamic picture loading

2004-03-31 Thread Lieve Vissenaeken
Hi,

Has anyone the code for me to load dynamic pictures in a website? I mean: so
that any user on my website can add dynamic a picture to that website which
is immedeatly visible?

Thanks for helping.

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



[PHP] [ANNOUNCE] PHP extension for neural networks

2004-03-31 Thread Evan Nemerson
Hi everyone,

I just wanted to send a one-time announcement regarding a new extension that 
we're (the FANN project) releasing today.

URL: http://prdownloads.sourceforge.net/fann/fannphp-0.1.0.tar.bz2?download

fann (Fast Artificial Neural Network Library) implements multilayer 
feedforward ANNs. This extension basically wraps the library, providing an 
easy way to use neural networks from PHP.

The documentation, which is on http://fann.sourceforge.net/ , is pretty 
verbose, and includes an API reference for the PHP extension. Also, there is a 
demo.php included which should help a bit.

I'm sending something over to pecl-dev right now, so hopefully the extension 
will be there sometime soon. Meanwhile, if you want to play with it, I'd love 
to get some feedback- positive or negative.


Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

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



[PHP] extracting data from XML file to PHP variable ..

2004-03-31 Thread Kenn Murrah
Greetings.

I've been RTFM all morning and for the live of me can't figure out how
to relate the element name to its data, e.g. if the element name is
fullname and the data is John Doe' how do I achieve $fullname =
John Doe  I must not be understanding how xml_parse works, and
my searches have turned up nothing.
Any help would be appreciated.

thanks.



function startElement($xml_parser, $name, $attributes) {

print(piEncountered Start Element For: /i$name\n);
}
function endElement($xml_parser, $name) {
print(piEncountered End Element For: i/$name\n);
}
function characterData($xml_parser, $data) {
if ($data != \n) {
$data = ereg_replace (\:, , $data);
print (piEncountered Character Data: /i$data\n);
}
}
function load_data($file) {
$fh = fopen($file, r) or die (pCOULD NOT OPEN FILE!);
$data = fread($fh, filesize($file));
return $data;
}
$xml_parser = xml_parser_create();
xml_set_element_handler ($xml_parser, startElement, endElement);
xml_set_character_data_handler($xml_parser, characterData);
xml_parse($xml_parser, load_data($file)) or die (pERROR PARSING XML!);
xml_parser_free($xml_parser) ;


 Yahoo! Groups Sponsor --

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


[PHP] Re: Stop/Start a perl script

2004-03-31 Thread Jason Barnett
Curlybraces Technologies Ltd wrote:
by using php technology, is there any possibility to stop/start perl 
script in a remote machine ?
 
thanx in advance
curlys 
You probably want to check out XML-RPC.  You'd create server/client 
scripts that pass xml messages back and forth.  As long as your server 
is able to start the perl script then you could do this and then pass 
the result back to the client, or maybe just a true/false for success at 
starting the perl script.

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


[PHP] Re: extracting data from XML file to PHP variable ..

2004-03-31 Thread Jason Barnett
Kenn Murrah wrote:

Greetings.

I've been RTFM all morning and for the live of me can't figure out how
to relate the element name to its data, e.g. if the element name is
fullname and the data is John Doe' how do I achieve $fullname =
John Doe  I must not be understanding how xml_parse works, and
my searches have turned up nothing.
Perhaps you should consider how you want your data structured.  I'm not 
sure what you're doing exactly, but consider the following file:
root
  people
person
  fullnameJohn Doe/fullname
/person
  /people
  person
fullnameKen Murrah/fullname
  /person
  person
fullnameJason Barnett/fullname
  /person
/root

Do you see the problem?  By assigning the character data to the element 
tag each time, you would end up with $fullname = Jason Barnett.  Would 
you want this to be an array instead to grab all fullname tags?

Any help would be appreciated.

thanks.



function startElement($xml_parser, $name, $attributes) {

print(piEncountered Start Element For: /i$name\n);
}
function endElement($xml_parser, $name) {
print(piEncountered End Element For: i/$name\n);
}
function characterData($xml_parser, $data) {
if ($data != \n) {
$data = ereg_replace (\:, , $data);
print (piEncountered Character Data: /i$data\n);
}
}
function load_data($file) {
$fh = fopen($file, r) or die (pCOULD NOT OPEN FILE!);
$data = fread($fh, filesize($file));
return $data;
}
$xml_parser = xml_parser_create();
xml_set_element_handler ($xml_parser, startElement, endElement);
xml_set_character_data_handler($xml_parser, characterData);
xml_parse($xml_parser, load_data($file)) or die (pERROR PARSING XML!);
xml_parser_free($xml_parser) ;


If you're trying to keep track of attributes more directly you might try 
using the Dom functions instead.
PHP4: http://www.php.net/domxml
(recommended) PHP5: https://www.zend.com/php5/articles/php5-xmlphp.php

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


Re: [PHP] Re: extracting data from XML file to PHP variable ..

2004-03-31 Thread Kenn Murrah
Jason:

Yes, I am aware of the problem.  However, for the very simple XML files 
that I'm being asked to process, it's not an issue -- each file has, for 
example, one and only one occurrence of fullname  So, while I 
realize that any solution I achieve for this project will have virtually 
no portability to any future project, it would help me out of a terrible 
mind in dealing with today's issue :-)

thanks.

kenn

Jason Barnett wrote:

Kenn Murrah wrote:

Greetings.

I've been RTFM all morning and for the live of me can't figure out how
to relate the element name to its data, e.g. if the element name is
fullname and the data is John Doe' how do I achieve $fullname =
John Doe  I must not be understanding how xml_parse works, and
my searches have turned up nothing.


Perhaps you should consider how you want your data structured.  I'm 
not sure what you're doing exactly, but consider the following file:
root
  people
person
  fullnameJohn Doe/fullname
/person
  /people
  person
fullnameKen Murrah/fullname
  /person
  person
fullnameJason Barnett/fullname
  /person
/root

Do you see the problem?  By assigning the character data to the 
element tag each time, you would end up with $fullname = Jason 
Barnett.  Would you want this to be an array instead to grab all 
fullname tags?

Any help would be appreciated.

thanks.



function startElement($xml_parser, $name, $attributes) {
print(piEncountered Start Element For: /i$name\n);
}
function endElement($xml_parser, $name) {
print(piEncountered End Element For: i/$name\n);
}
function characterData($xml_parser, $data) {
if ($data != \n) {
$data = ereg_replace (\:, , $data);
print (piEncountered Character Data: /i$data\n);
}
}
function load_data($file) {
$fh = fopen($file, r) or die (pCOULD NOT OPEN FILE!);
$data = fread($fh, filesize($file));
return $data;
}
$xml_parser = xml_parser_create();
xml_set_element_handler ($xml_parser, startElement, endElement);
xml_set_character_data_handler($xml_parser, characterData);
xml_parse($xml_parser, load_data($file)) or die (pERROR PARSING 
XML!);
xml_parser_free($xml_parser) ;


If you're trying to keep track of attributes more directly you might 
try using the Dom functions instead.
PHP4: http://www.php.net/domxml
(recommended) PHP5: https://www.zend.com/php5/articles/php5-xmlphp.php

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


[PHP] Printer functions

2004-03-31 Thread Lou Apolonia
My question involves sending html to the printer to be printed properly.
Here is my code:

$handle = printer_open('Lexmark Z25-Z35');
printer_start_doc($handle, test);
printer_start_page($handle);

printer_set_option($handle, PRINTER_MODE, 'raw');
printer_set_option($handle, PRINTER_PAPER_FORMAT,
PRINTER_FORMAT_LETTER);
$file = file_get_contents('http://localhost/'.$page.'.php?mid='.$mid);
printer_draw_text($handle, $file, 10, 10);

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

When this code runs, a page prints .. However all that prints is the
html source, and it only prints one line across the top of the page and
nothing else.  How does one send html to the printer and have the
rendered page print?

I've also tried using printer_write instead of printer_draw_text, but to
no avail.  

As always, any help is greatly appreciated.

Thank you in advance,
Lou

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



Re: [PHP] Re: extracting data from XML file to PHP variable ..

2004-03-31 Thread Jason Barnett
Kenn Murrah wrote:

Jason:

Yes, I am aware of the problem.  However, for the very simple XML files 
that I'm being asked to process, it's not an issue -- each file has, for 
example, one and only one occurrence of fullname  So, while I 
realize that any solution I achieve for this project will have virtually 
no portability to any future project, it would help me out of a terrible 
mind in dealing with today's issue :-)

thanks.

kenn

Well a solution might be the function xml_parse_into_struct()
http://www.php.net/xml_parse_into_struct
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Build on Mac OS X

2004-03-31 Thread John Nichel
I'm trying to get php running on a Mac OS X box, but even though the 
configure of php runs fine, I get this when I try to build php

make: *** No rule to make target 
`files/php-4.3.5/sapi/apache/sapi_apache.c', needed by 
`sapi/apache/sapi_apache.lo'.  Stop.

This is the only thing it outputs.  Messing with Makefiles is beyond my 
knowledge.  Any ideas?

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


Re: [PHP] Re: extracting data from XML file to PHP variable ..

2004-03-31 Thread Justin Patrin
Jason Barnett wrote:

Kenn Murrah wrote:

Jason:

Yes, I am aware of the problem.  However, for the very simple XML 
files that I'm being asked to process, it's not an issue -- each file 
has, for example, one and only one occurrence of fullname  So, 
while I realize that any solution I achieve for this project will have 
virtually no portability to any future project, it would help me out 
of a terrible mind in dealing with today's issue :-)

thanks.

kenn

Well a solution might be the function xml_parse_into_struct()
http://www.php.net/xml_parse_into_struct
Hmmm, that looks interesting.

On another note, I've made a simple parse based on PEAR's XML_Parser 
that parses an entire XML tree into associative arrays. Feel free to use it.

http://www.reversefold.com/~papercrane/XML_Parser_Assoc/Assoc.phps

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


Re: [PHP] Build on Mac OS X

2004-03-31 Thread John Nichel
John Nichel wrote:
I'm trying to get php running on a Mac OS X box, but even though the 
configure of php runs fine, I get this when I try to build php

make: *** No rule to make target 
`files/php-4.3.5/sapi/apache/sapi_apache.c', needed by 
`sapi/apache/sapi_apache.lo'.  Stop.

This is the only thing it outputs.  Messing with Makefiles is beyond my 
knowledge.  Any ideas?

Forget this post.  The path to the php source on the Mac system has a 
space in it (/installer files/php-4.x.x/), and that was causing 
problems with make.  Damn Mac people.  ;)

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


Re: [PHP] Re: extracting data from XML file to PHP variable ..

2004-03-31 Thread Jason Barnett
Hmmm, that looks interesting.

On another note, I've made a simple parse based on PEAR's XML_Parser 
that parses an entire XML tree into associative arrays. Feel free to use 
it.

http://www.reversefold.com/~papercrane/XML_Parser_Assoc/Assoc.phps

I haven't used that class before, or else I probably would have 
suggested it instead of reinventing the wheel.  On another note: what's 
the word on XML in PHP5?  Do most of the XML implementations in PEAR 
plan to continue using a SAX based parser or switching to a new 
Dom/SimpleXML implementation?  Just curious, I'd been thinking about a 
little something I might want to whip up.

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


Re: [PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Richard Davey
Hello Andy,

Wednesday, March 31, 2004, 7:21:44 PM, you wrote:

AB i know what you mean... if you highlighted the part you were talking about
AB with color then would explain why i didnt get what part you were talking
AB about... my screen reader doesnt pay much attention to color highlights so
AB probably missed it...

I don't use colour in emails to this (or any) list, sorry. I would
have hoped the screen reader said asterisk asterisk highlighted
(etc).

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Help w/Bug

2004-03-31 Thread Joey
While running the below code, a form passes the image name to this code, the
values when executed are as follows:
 
Step1: upload_file_type: 
Step1: upload_file: C:\\Documents and Settings\\jack.IISG\\Desktop\\BVP.jpg
Step1: extention: 

Step2: upload_file_type: 
Step2: upload_file: C:\\Documents and Settings\\jack.IISG\\Desktop\\BVP.jpg
Step2: extention: image/pjpeg

And what happens is it keeps giving me the following error:
 
Not a Valid Image Extension, .jpg only!
 
 
This is going to be something stupid that I am being blind to... any help
appreciated!
 
 
--- Code Below 
 
 
//The file to be uploaded
global $upload_file_name;
 
echo Step1: upload_file_type:  . $upload_file_type .br;
echo Step1: upload_file:  . $upload_file.br;
echo Step1: extention:  . $extention .br;
 
if($upload_file !=)
{
//image size esle will ignore ...
$img_max_width=750;
$img_max_height=750;
$extention=  
$file_type1 = image/pjpeg;
$file_type2 = image/jpeg;
$file_type3 = image/gif;
$file_type4 = image/jpg;
 
echo Step2: upload_file_type:  . $upload_file_type .br;
echo Step2: upload_file:  . $upload_file.br;
echo Step2: extention:  . $extention .br;
 
if (($upload_file_type == $file_type1) or ($upload_file_type == $file_type2)
or ($upload_file_type == $file_type3) or ($upload_file_type == $file_type4))
{
$ext=strrchr($upload_file_name, .);//
 
$picture_name=get_param(first_name)._.get_param(last_name);
 
$picture_name=str_replace( ,_,$picture_name);
 
$picture_name=explode(.,$picture_name);
 
$upload_file_name=$picture_name[0]..$ext;
 
$image_url=images/contacts/.$upload_file_name;
 
@copy($upload_file, images/contacts/.$upload_file_name); 
chmod(images/contacts/.$upload_file_name,0777);
 
$image_test_size = images/contacts/.$upload_file_name;
$image_size = getimagesize($image_test_size);
$img_width = (($image_size[0]));
$img_height = (($image_size[1]));
if (($img_width  $img_max_width or $img_height  $img_max_height)) {
   unlink(images/contacts/.$upload_file_name);
}
 
} else {
   echo Not a Valid Image Extension, .jpg only!;
}
}

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



RE: [PHP] Help w/Bug

2004-03-31 Thread Chris W. Parker
Joey mailto:[EMAIL PROTECTED]
on Wednesday, March 31, 2004 2:54 PM said:

 Step1: upload_file_type:
 Step1: upload_file: C:\\Documents and
 Settings\\jack.IISG\\Desktop\\BVP.jpg Step1: extention:
 
 Step2: upload_file_type:
 Step2: upload_file: C:\\Documents and
 Settings\\jack.IISG\\Desktop\\BVP.jpg Step2: extention: image/pjpeg

in both cases $upload_file_type is empty. you're comparing
$upload_file_type to $file_type1,2,3,4. of course there won't be a
match.

at least, that's what it looks like to me at a cursory glance.


hth,
chris.

p.s. extention != extension

:)

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



[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
I don't use colour in emails to this (or any) list, sorry. I would
have hoped the screen reader said asterisk asterisk highlighted

all i heard it say was *** on the line that said something like
***highlighted... but thats whas only when you referrenced to you
highlighted the stuff... anyways all is better now and i can drop out of
this thread ...

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



[PHP] file super global and functions

2004-03-31 Thread Bruno Santos
hello all

i've a problem, serious one.

how can i pass the name of a file upload to a function ?

i need to do the upload of 1 file, but want to use a function, so that 
the main file stays small

the problem is, when passing the file name, throw the $_FILES super 
global , is not recognized in the function...

here is the code:

 the function (or part of it)

function uploadfile ($userfile, $name2file,$uploadir) {
//userfile is where file went on webserver
echo 'inside';   debuging purpose
$userfile = $_FILES['userfile']['tmp_name'];
//userfile_name is original file name
$userfile_name = $_FILES['userfile']['name'];
	echo 'User File name: '.$userfile_name;  --- debuging purpose

## main program ##33

uploadfile 
($_FILES['user_picture'],$_SESSION['valid_user'].'_picture',$USERPICS);

this is the call to the function above

the problem is that inside the function, the file name is not recognized...
when i try to print the filename, is empty 
any ideas 

it only works if $_FILSE['user_picture'] is $userfile ..

should i pass the values by reference ?i mean, putting some sort of  ??

cheers and best regars

Bruno
--
-
   .-'-.
 .' `.
: :
   :   :
   :  _/|  :   Bruno Santos
:   =/_/  : [EMAIL PROTECTED]
 `._/ | .'
  (   /  ,|...-'Pagina Pessoal
   \_/^\/||__   http://feiticeir0.no-ip.org
_/~  `~`` \_
 __/  -'/  `-._ `\_\__
   /jgs  /-'`  `\   \  \-.\
   Written very small on the back poket of a girl's jeans
   - 'If you can read this, you're WAY too close.'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP charset encoding

2004-03-31 Thread Ma Siva Kumar
On Tuesday 30 March 2004 19:31, Rob Ellis 
wrote:
 On Tue, Mar 30, 2004 at 11:23:03AM +0300, 
nabil wrote:
  When submitting a data from an HTML page
  and inserting them in MySQL: what
  encoding they will be ?
  is it the page encoding?
  the field size like VARCHAR 15 won't fit
  the same in both encoding for the same
  text. !!
  Is the font any relation with encoding?
  phpmyadmin doesn't support UTF-8 so
  dumping your data using it will screw it
  up is it a way to convert it inside
  the database...
 
  Explain to me please , or if you can
  tell me where to find my answers (not
  google)

 if the page that the input form is on sets
 utf-8 as the content type, then most (?)
 browsers will send utf-8. you can use a
 meta tag like:

   meta http-equiv=Content-Type
 content=text/html; charset=utf-8


What we have done in a similar situation is 
to set the client encoding in php.ini as 
below and this solved the same problems as 
you describe:
==
default_mimetype = text/html
default_charset = utf-8
=

Hope this helps.

Best regards,

-- 
Integrated Management Tools for leather 
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

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



[PHP] [Newbie Guide] For the benefit of new members

2004-03-31 Thread Ma Siva Kumar
===
This message is for the benefit of new 
subscribers and those new to PHP.  Please 
feel free to add more points and send to the 
list.
===
1. If you have any queries/problems about PHP 
try http://www.php.net/manual/en first. You 
can download a copy and use it offline also. 

Please also try 
http://www.php.net/manual/faq.php 
for answers to frequently answered questions 
about PHP (added by Christophe Chisogne).

2. Try http://www.google.com next. Searching 
for php YOUR QUERY may fetch you relevant 
information within the first 10 results.

3. There is a searchable archive of the 
mailing list discussion at 
http://phparch.com/mailinglists. Many of the 
common topics are discussed repeatedly, and 
you may get answer to your query from the 
earlier discussions. 

For example: One of the repeatedly discussed 
question in the list is Best PHP editor. 
Everyone has his/her favourite editor. 
You can get all the opinions by going through 
the list archives. If you want a chosen list 
try this link : 
http://phpeditors.linuxbackup.co.uk/ 
(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want 
find out what extensions are available to 
you?

Just put the following code into a file with 
a .php extension and access it through your 
webserver:

?php
phpinfo();
? 

If PHP is installed you will see a page with 
a lot of information on it. If PHP is not 
installed (or not working correctly) your 
browser will try to download the file.

(contributed by Teren and reworded by Chris W 
Parker)

5. If you are stuck with a script and do not 
understand what is wrong, instead of posting 
the whole script, try doing some research 
yourself. One useful trick is to print 
the variable/sql query using print or echo 
command and check whether you get what you 
expected. 

After diagnosing the problem, send the 
details of your efforts (following steps 1, 
2  3) and ask for help.

6. PHP is a server side scripting language. 
Whatever processing PHP does takes place 
BEFORE the output reaches the client. 
Therefore, it is not possible to access 
users'  computer related information (OS, 
screen size etc) using PHP. Nor can you 
modify any the user side settings. You need 
to go for JavaScript and ask the question in 
a JavaScript list.

On the other hand, you can access the 
information that is SENT by the user's 
browser when a client requests a page from 
your server. You can find details about 
browser, OS etc as reported by 
this request. - contributed by Wouter van 
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line. 
Avoid general subjects like Help!!, A 
Question etc.  Especially avoid blank 
subjects. 

8. When you want to start a new topic, open a 
new mail composer and enter the mailing list 
address [EMAIL PROTECTED] instead of 
replying to an existing thread and replacing 
the subject and body with your message.

9. It's always a good idea to post back to 
the list once you've solved your problem. 
People usually add [SOLVED] to the subject 
line of their email when posting solutions. 
By posting your solution you're helping the 
next person with the same question. 
[contribued by Chris W Parker]

10. Ask smart questions  
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

Hope you have a good time programming with 
PHP.

Best regards,
-- 
Integrated Management Tools for leather 
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

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



Re: [PHP] *FIXED* PHP Seg Faults, How to Trackdown?

2004-03-31 Thread Tim Schaab
Ok, so it took some tracking, but I believe I have found the problem.  The
problem was with the putenvs conflicting with mod_perl.  The full rundown
is from an old php-install post.  See it at

http://www.phpbuilder.com/lists/php-install/2003092/0018.php

The summary is mod_perl and PHP on my system were not playing together
nicely in a threaded enviroment.

I recompiled perl from the SRPM with the -Accflags=-DPERL_USE_SAFE_PUTENV
hacked into the spec file.  After installing that new RPM and recompiling
mod_perl then apache, my PHP install has not crashed since then and I have
been hammering it pretty hard.  Good Times. :)

Thanks for tips Rasmus, it sent me in the right direction!

Cheers,

Tim


-- 
Tim Schaab
http://madweb.org   http://madtown.cc
[EMAIL PROTECTED]  [EMAIL PROTECTED]

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not Eureka! (I found it!) but That's funny
   -- Isaac Asimov


Tim Schaab said:
 Howdy,

 I tried the suggestion, though I had to load up some extra files to get
 it to work.  I had to do a

  LD_PRELOAD=/lib/i686/libc.so.6 /lib/i686/libm.so.6
 /lib/i686/libpthread.so.0

 /lib/i686/libpthread.so.0 had to be in since /lib/tls/libpthread.so.0
 would not load when /lib/i686/libc.so.6 was preloaded.  I just threw
 /lib/i686/libm.so.6 in there to make sure I was using nothing in the
 /lib/tls directory if that would help things.

 In the end, it crashed again. :(

 Here's the links to the latest crash files.

 http://madweb.org/errors/Error6.txt
 http://madweb.org/errors/Error7.txt
 http://madweb.org/errors/Error8.txt

 I also tried it again, but with the same files stored in /lib instead of
 /lib/i686, and I got this crash:

 http://madweb.org/errors/Error9.txt

 Thanks for helping me out.  Let me know what else might be an option.

 Cheers,

 Tim

 Rasmus Lerdorf wrote:
 3 of those are putenv() crashes.  Whenever I see that I always think
 thread safety issues.  In your case you are linking against the
 NTPL-aware
 libc on Redhat (/lib/tls/libc.so.6).  Could you try doing this:

LD_PRELOAD=/lib/i686/libc.so.6

 in your Apache startup script and let me know if it still crashes?

 -Rasmus

 On Tue, 30 Mar 2004, Tim Schaab wrote:

I need help tracking down a crash in PHP.  I have not been able to work
out a test case where it will crash reliably, so I have been hesitant to
fill out a bug report.

Here's the kit I have running:

PHP4 - Latest Stable Snapshot as of 30/Mar/2004 12:18
Apache - 1.3.29
mod_ssl - 2.8.16
mod_perl - 1.29
Red hat 9 - 2.4.20 Kernel

The problem is when I try to access my web-mail sites, it will crash
after a period of time.  I have done a number of gdb sessions, but I
need some help interpreting the results.  You can find the gdb log from
a few of the crashes here:

http://madweb.org/errors/Error1.txt
http://madweb.org/errors/Error2.txt
http://madweb.org/errors/Error3.txt
http://madweb.org/errors/Error4.txt
http://madweb.org/errors/Error5.txt

I thought it might be something to do with IMAP since the web-mail pages
(IMP/HORDE and SquirrelMail), so I tried different versions of the UW
IMAP client, but crashes still took place with both the 2000 and 2002
versions.

When PHP is compiled in debug mode, I got a ton of leak messages in
Apache's error log.

I tried to setup a different Apache instance on a different port to use
that one for debugging purposes.  However, I can not get that on to
crash.  I have it running on ports 4080 and 4443(SSL) and I can not get
it to crash even after pounding and pounding the web-mail sites.

So I have a decent amount of info to work from, not sure what to do next
to get the crashes to stop.  I am open to any and all suggestions to try
and pin this bugger down.



 --
 Tim Schaab
 http://madweb.org   http://madtown.cc
 [EMAIL PROTECTED]  [EMAIL PROTECTED]

 The most exciting phrase to hear in science, the one that heralds new
 discoveries, is not Eureka! (I found it!) but That's funny
 -- Isaac Asimov

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




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



[PHP] re:[PHP] [Newbie Guide] For the benefit of new members

2004-03-31 Thread Andy B
===
This message is for the benefit of new
subscribers and those new to PHP.  Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try
http://www.php.net/manual/en
first. You
can download a copy and use it offline also.

Please also try
http://www.php.net/manual/faq.php

for answers to frequently answered questions
about PHP (added by Christophe Chisogne).

2. Try
http://www.google.com
next. Searching
for php YOUR QUERY may fetch you relevant
information within the first 10 results.

3. There is a searchable archive of the
mailing list discussion at
http://phparch.com/mailinglists.
Many of the
common topics are discussed repeatedly, and
you may get answer to your query from the
earlier discussions.

For example: One of the repeatedly discussed
question in the list is Best PHP editor.
Everyone has his/her favourite editor.
You can get all the opinions by going through
the list archives. If you want a chosen list
try this link :
http://phpeditors.linuxbackup.co.uk/

(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want
find out what extensions are available to
you?

Just put the following code into a file with
a .php extension and access it through your
webserver:

?php
phpinfo();
?

If PHP is installed you will see a page with
a lot of information on it. If PHP is not
installed (or not working correctly) your
browser will try to download the file.

(contributed by Teren and reworded by Chris W
Parker)

5. If you are stuck with a script and do not
understand what is wrong, instead of posting
the whole script, try doing some research
yourself. One useful trick is to print
the variable/sql query using print or echo
command and check whether you get what you
expected.

After diagnosing the problem, send the
details of your efforts (following steps 1,
2  3) and ask for help.

6. PHP is a server side scripting language.
Whatever processing PHP does takes place
BEFORE the output reaches the client.
Therefore, it is not possible to access
users'  computer related information (OS,
screen size etc) using PHP. Nor can you
modify any the user side settings. You need
to go for JavaScript and ask the question in
a JavaScript list.

On the other hand, you can access the
information that is SENT by the user's
browser when a client requests a page from
your server. You can find details about
browser, OS etc as reported by
this request. - contributed by Wouter van
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line.
Avoid general subjects like Help!!, A
Question etc.  Especially avoid blank
subjects.

8. When you want to start a new topic, open a
new mail composer and enter the mailing list
address
[EMAIL PROTECTED]
instead of
replying to an existing thread and replacing
the subject and body with your message.

9. It's always a good idea to post back to
the list once you've solved your problem.
People usually add [SOLVED] to the subject
line of their email when posting solutions.
By posting your solution you're helping the
next person with the same question.
[contribued by Chris W Parker]

10. Ask smart questions
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

11. In versions of php prior to 4.1, $_POST doesn't exist. Instead use
$HTTP_POST_VARS array (it is the same thing just a different name). This
will solve almost any form posting problems to php  prior to 4.1
Hope you have a good time programming with
PHP.

Best regards,
--
Integrated Management Tools for leather
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

--
PHP General Mailing List (
http://www.php.net/)

To unsubscribe, visit:
http://www.php.net/unsub.php

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



RE: [PHP] [SOLVED]File Download link not working in PHP 4.3.4

2004-03-31 Thread Andy Hauger
I was using an offline copy of the PHP manual without the discussion
included on the online page pointed to by the link in John's response. The
discussion on the online page provided the information I needed to
understand the full extent of the caching issue. The application is now
working correctly.

Andy

-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 10:55 AM
To: Andrew Hauger; [EMAIL PROTECTED]
Subject: Re: [PHP] File Download link not working in PHP 4.3.4


Check the comments on this page:

http://us2.php.net/manual/en/function.session-cache-limiter.php

---John Holmes...

- Original Message -
From: Andrew Hauger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:18 AM
Subject: Re: [PHP] File Download link not working in PHP 4.3.4


 Curt,

 Thanks for the suggestions. Unfortunately, no luck
 yet. Here's the current version of the affected lines
 of code:

 $file_type = vnd.ms-excel;
 $file_ending = xls;
 header ( Content-Type: application/$file_type );
 header ( 'Content-Disposition: attachment;
 filename=product.'.$file_ending.'' );
 header ( 'Expires: ' . date ( 'r', 0 ));

 Still getting the same behavior, on both the Windows
 and Solaris platforms.

 Andy

  From: Curt Zirzow [EMAIL PROTECTED]
  Sent: Tuesday, March 30, 2004 9:56 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] File Download link not working in
 PHP 4.3.4
 
  * Thus wrote Andrew Hauger ([EMAIL PROTECTED]):
   the file name. When the OK button is clicked, an
   error dialog pops up with the message Internet
   Explorer cannot download ... [snipped URL].
 Internet
   Explorer was not able to open this Internet site.
 The
   requested site is either unavailable or cannot be
   found. Please try again later.
 
  This can mean a lot of things, IE tends to be too
 friendly
  sometimes.
 
 
  
   Here are the header commands:
  
   $file_type = vnd.ms-excel;
   $file_ending = xls;
   header ( Content-Type: application/$file_type );
   header ( Content-Disposition: attachment;
   filename=product..$file_ending );
 
  Quote the filename, although it most likley wont be
 the problem.
 
 Conent-Type: attachment; filename=product.xls
 
 
   header ( Expires: 0 );
 
  I might wage this is the problem, it needs to be a
 valid HTTP date,
  something like this will do the job:
 
header('Expires: ' . date('r', 0);
 
 
  Curt
  --
  I used to think I was indecisive, but now I'm not
 so sure.
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  ---
  Incoming mail is certified Virus Free.
  Checked by AVG anti-virus system
 (http://www.grisoft.com).
  Version: 6.0.624 / Virus Database: 401 - Release
 Date: 3/15/2004

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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.624 / Virus Database: 401 - Release Date: 3/15/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.624 / Virus Database: 401 - Release Date: 3/15/2004

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



[PHP] PHP and HTTPS POSTs

2004-03-31 Thread Chris Streeter
Has anyone had any problems with the $_POST super global not working in a
HTTPS environment?

My code works perfectly fine through a unsecured HTTP POST but when I do an
HTTPS POST it only handles a few variable (I think 15 or 16). Any more than
that and it looses all the $_POSTed variables.

Has anyone seen this and more importantly know the fix for the problem?

Thank you.

Chris

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



Re: [PHP] Help w/Bug

2004-03-31 Thread Curt Zirzow
* Thus wrote Joey ([EMAIL PROTECTED]):
 ...
  
 if($upload_file !=)
 {
 //image size esle will ignore ...
 $img_max_width=750;
 $img_max_height=750;
 $extention=  
 $file_type1 = image/pjpeg;

Here is your bug as you described. $extention is assigned the
value of $file_type1 after it is assigned 'image/pjpeg'.


 ...

 if (($upload_file_type == $file_type1) or ($upload_file_type == $file_type2)
 or ($upload_file_type == $file_type3) or ($upload_file_type == $file_type4))
 {

  There are several more elegant solutions to testing to ensure
  that the file_type is good, one of them is:

  $accept_file_types = array('image/jpeg', 'image/gif');

  if (in_array($upload_file_type, $accept_file_types) ) 
  {


 ...
  
 $image_url=images/contacts/.$upload_file_name;
  
 @copy($upload_file, images/contacts/.$upload_file_name); 

see http://php.net/move_uploaded_file
about the proper way to handle uploaded files. 



 chmod(images/contacts/.$upload_file_name,0777);

0644 should be used. 777 is evil, contrary to common belief.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



RE: [PHP] Regex

2004-03-31 Thread Daevid Vincent
Just thought I'd throw this amazing tool out there as I just discovered it
too:
http://www.weitz.de/regex-coach/

Windows and linux versions for free! 

 -Original Message-
 From: Brent Clark [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 31, 2004 7:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Regex
 
 Hi all
 
 does anyone know of a regex expression to get only the number 
 number from after the Code 39
 
 Kind Regards
 Brent Clark
 
 1 barcodes found Code 39-10005215 
 This is the search1 barcodes found 2 barcodes found Code 
 39-10005216 Datalogic 2 of 5-4 
 This is the search2 barcodes found 1 barcodes found Code 39-10005210 
 This is the search1 barcodes found 2 barcodes found Code 
 39-10006106 IATA 2 of 5-2 
 This is the search2 barcodes found 1 barcodes found Code 39-10005218 
 This is the search1 barcodes found 1 barcodes found Code 39-10004516 
 This is the search1 barcodes found 1 barcodes found Code 39-10006087 
 This is the search1 barcodes found 3 barcodes found Code 
 39-10005802 IATA 2 of 5-2 IATA 2 of 5-8 
 This is the search3 barcodes found 1 barcodes found Code 39-10006081 
 This is the search1 barcodes found 1 barcodes found Code 39-10004518 
 This is the search1 barcodes found 1 barcodes found Code 39-10004531 
 This is the search1 barcodes found 1 barcodes found Code 39-10004039 
 This is the search1 barcodes found 1 barcodes found Code 39-10004521 
 This is the search1 barcodes found 1 barcodes found Code 39-10004519 
 This is the search1 barcodes found 2 barcodes found Code 
 39-47429 Code 39-10004306 
 This is the search2 barcodes found 2 barcodes found Code 
 39-47429 Code 39-10004306 
 This is the search2 barcodes found No barcodes found 
 This is the searchNo barcodes found No barcodes found 
 This is the searchNo barcodes found 2 barcodes found Code 
 39-47429 Code 39-10004306 
 This is the search2 barcodes found 2 barcodes found Code 
 39-47429 Code 39-10004306 
 This is the search2 barcodes found 2 barcodes found Code 
 39-47429 Code 39-10004306 
 This is the search2 barcodes found 
 

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



[PHP] I think this is a bug...cant use exec commands.

2004-03-31 Thread Brian Duke
I can't seem to use the shell_exec() command.

Here is the program:

 

?php

 

$data = shell_exec(free -b);

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

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

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

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

$dataArray = explode(' ',$data);

 

$total = $dataArray[16];

$used = $dataArray[17];

 

echo $used.chr(10);

echo $total.chr(10);

?

 

 I can make this script executable via chmod 700 mem.php and run it directly
via the command line. Only then I can get it to work on my redhat 9 machine.

The problem is I call this script from another script to plot out the data
on MRTG graphs.   

 

I expect to see something like :

 

[EMAIL PROTECTED] php-4.3.2]# php /var/www/html/swap/mem.php

 

 246789242

 512689734

 

[EMAIL PROTECTED] php-4.3.2]#

 

But in fact I get the warning :

 
[EMAIL PROTECTED] php-4.3.2]# php /var/www/html/swap/mem.php
 
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/var/www/html/swap/swap.php on line 3
 
[EMAIL PROTECTED] php-4.3.2]# 
 
The warning would be applicable if any php.ini file on my system had Safe
Mode enabled. As the bug people said shell_exec() == ``.  But that applies
if anywhere on my box safemode was enabled. I have spent 4 solid days
looking and verifying there is no safe mode enabled on my box. It's an
internal monitoring server there is absolutely no need for safe mode. This
is what is in my PHP.ini   

 

; Safe Mode

;

safe_mode = Off

safe_mode_gid = Off

 

Can someone tell me if they can run that script on their *nix machine? I'm
running php 4.32 apache 2.0 server on a up-to-date redhat 9 server. I don't
think this script can be run from another program.  

 

 



[PHP] Checkdnsrr ?

2004-03-31 Thread Dave Carrera
Hi List,

Is using checkdnsrr a good way to tell if a domain name is available ?

If I ask checkdnsrr to look for 'NS' records and the result comes back as
false then dose that mean a domain name is available to use ?

Also what dose checkdnsrr use to lookup records. Is it the internal DNS
server ?

Thank you in advance for any help or advice you may want to give.

I am writing a domain name lookup util.

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.645 / Virus Database: 413 - Release Date: 28/03/2004
 

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



RE: [PHP] Re: [PHP-WIN] ASP.NET web control in PHP?

2004-03-31 Thread Ralph Guzman
You might also want to look at opensource frameworks like

Ampoliros

or

Ez publish

-Original Message-
From: Ignatius Reilly [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 30, 2004 9:21 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Bill
Subject: [PHP] Re: [PHP-WIN] ASP.NET web control in PHP?

Check the PEAR library, especially:
- Quickform
- Quickform Controller
- Datagrid
and many other nice things
_
- Original Message - 
From: Bill [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 30, 2004 7:04 PM
Subject: [PHP-WIN] ASP.NET web control in PHP?


 Dear All,
 
 I've a few months of experience in PHP programming.
 
 I'd like to know whether PHP has anything similar to the web control in 
 ASP.NET?
 
 I found that ASP.NET is really handy when creating GUI for web 
 applications.  The web controls are quite easy to use and I like the 
 DataGrid in ASP.NET a lot.
 
 I wonder whether there's any opensource project using PHP to build 
 reusable GUI widgets for HTML pages?
 
 Thank you very much for your help.
 
 Yours,
 Bill
 
 -- 
 PHP Windows Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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