[PHP] header and writing problem

2003-02-26 Thread George Pitcher
Hi all,

Back on the list after a long break.

I want to be able to write all my sql queries (well at least the ones that
change or create records) to a log file.

However some of the pages that contain these queries are just used to
redirect the user depending on the result.

Writing to a file id not permitted before creating the header for the
redirect.

can anyone suggest a workaround.

Cheers

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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



RE: [PHP] header and writing problem

2003-02-26 Thread George Pitcher
Ernest,

That worked a treat, many thanks.

George

> -Original Message-
> From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]
> Sent: 26 February 2003 9:16 am
> To: George Pitcher
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] header and writing problem
> 
> 
> At 10:02 26.02.2003, George Pitcher said:
> [snip]
> >Hi all,
> >
> >Back on the list after a long break.
> >
> >I want to be able to write all my sql queries (well at least the 
> ones that
> >change or create records) to a log file.
> >
> >However some of the pages that contain these queries are just used to
> >redirect the user depending on the result.
> >
> >Writing to a file id not permitted before creating the header for the
> >redirect.
> [snip] 
> 
> This works for me:
> 
>  $hf = fopen('cache/sample.txt', 'w');
> fwrite($hf, 'Test');
> fclose($hf);
> header('Location: http://www.php.net/');
> ?>
> 
> (./cache is an apache-writable directory on my test server)
> 
> This seamlessly writes the file, then redirects to the requested site...
> what errors do you get?
> 
> 
> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 
> 
> 

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



RE: [PHP] coockies in windows xp

2003-03-05 Thread George Pitcher
Just in case - check the spelling of setcookie. There's no c before the k.

George

> -Original Message-
> From: Chris Hayes [mailto:[EMAIL PROTECTED]
> Sent: 05 March 2003 2:45 pm
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] coockies in windows xp
>
>
> At 15:29 5-3-03, you wrote:
> >having to use coockies to identify visitors I seem to have a problem with
> >visitors using windows xp.
> >
> >the command I use is setcoockie("coockie1", "true", time()+600)
> >
> >any ideas???
> Did you test this with various versions of windows?
> Do these people have cookies turned on, do you have a test built in?
> Do these people use one of these nightmare 'Safe Internet' tools
> installed?
>
>
> --
> 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] Any Tiki users on the list

2003-03-07 Thread George Pitcher
Hi,

I'm trying to evaluate Tiki 1.5 but just keep getting an error message on
the setup.php page:

"Warning: Invalid argument supplied for foreach() in
C:\Inetpub\wwwroot\tiki\setup.php on line 11".

I've followed the instructions in the Tiki manual.

Any suggestions?

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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



RE: [PHP] Any Tiki users on the list

2003-03-07 Thread George Pitcher
Jason,

Duh! I should have checked that out first.

Thanks

George.
==
In a marching band, I'd be carrying the piano!
==
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: 07 March 2003 9:49 am
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Any Tiki users on the list
> 
> 
> On Friday 07 March 2003 16:09, George Pitcher wrote:
> 
> > I'm trying to evaluate Tiki 1.5 but just keep getting an error 
> message on
> > the setup.php page:
> >
> > "Warning: Invalid argument supplied for foreach() in
> > C:\Inetpub\wwwroot\tiki\setup.php on line 11".
> >
> > I've followed the instructions in the Tiki manual.
> >
> > Any suggestions?
> 
> There may be some Tiki users on this list. But I'm sure there are 
> more Tiki 
> users in the Tiki forum(s) and the Tiki list(s). You should try 
> getting help 
> there first.
> 
> -- 
> 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
> --
> /*
> We'll pivot at warp 2 and bring all tubes to bear, Mr. Sulu!
> */
> 
> 
> -- 
> 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] javascript

2003-03-07 Thread George Pitcher
Well, it saves having to handle the form - so that the user still has all
their entered data in the fields without having to overcomplicate the
response page. You can have optional fields which aren't mandatory and you
can also do number, string and date validation too.

George

> -Original Message-
> From: Liam Gibbs [mailto:[EMAIL PROTECTED]
> Sent: 07 March 2003 1:55 pm
> To: php list
> Subject: Re: [PHP] javascript
>
>
> > If you want to validate form data before sending it, javascript is the
> > choise.
>
> Yeah, before sending it. Just wondering what the advantage is in
> validating
> before sending.
>
>
> --
> 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] Opening a file in a new window

2003-03-10 Thread George Pitcher
Todd,

if that script is the result of a link being follwed, add target="blank" to
the end.

George

> -Original Message-
> From: Todd Cary [mailto:[EMAIL PROTECTED]
> Sent: 10 March 2003 5:28 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Opening a file in a new window
>
>
>   Thanks to your help, this now is working:
>
>$session_id  = $HTTP_POST_VARS[session_id];
>   $filename= $HTTP_POST_VARS[filename];
>
>   /* Validate session_id here */
>
>   header("Content-type: text/html");
>   header("Content-Disposition: filename=" . $filename);
>   $fp = fopen($filename, "r");
>   if($fp) {
> fpassthru($fp);
> fclose($fp);
>   }
> ?>
>
> Now I would like to open the file in a new window and I am not sure how
> to do that.
>
> Todd
>
> --
> Ariste Software, Petaluma, CA 94952 \n [EMAIL PROTECTED]
>


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



[PHP] Parsing my big file - I'm back

2003-03-11 Thread George Pitcher
Hi all,

I asked the question a couple of weeks ago and started off some kind of
disagreement.

I don't want to spark things off again, so if anyone wants to reply, fine -
if not, fine too.

The program,mers here have had a go with Perl and got halfway before other
work pressures have put this on the back burner (at least another week).

I'd still like to do this with PHP and would like some guidance at
nitty-gritty level rather than on the concept (but a bit of that as well).

My text file has a return at the end of every field and the only thing that
separates the records is the name of the company who supplied the file.

Within each 'field' there are subfields, with a completely different
separator '|'.

I expect to start by doing a quick and dirty search replace for the '|x'
with '[return]|x', adding spaces to pad the label out so that the following
value will match the start position of other values.

My plan is then to loop through the file and create an array for each field
with the key set to the field label and the value set to the 'value' (of
course).

I need to take account of duplicate field labels within some records by
adding an index to each field label (nested loop).

Finally, I need to gather these arrays into a bigger array set at record
level.

Can anyone see any flaws in this approach? I've not done this sort of stuff
for about 5 years, and that was using Frontier on a Mac.

All helpful suggestions appreciated

George

===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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



RE: [PHP] what the hell in this sql

2003-03-12 Thread George Pitcher
Firstly,

This isn't a php question and should be directed at a sql list or to php-db

Have you lokked at erro 1064 in the manual? What does it say?

There are several things that you should do before coming to the list with a
problem.

Without checking I suspect that you need to specify a 'JOIN' in your
statement - again refere to the manual for instructions.

George

> -Original Message-
> From: Alawi [mailto:[EMAIL PROTECTED]
> Sent: 12 March 2003 11:07 am
> To: [EMAIL PROTECTED]
> Subject: [PHP] what the hell in this sql
>
>
>
>   SELECT * FROM cont_types, cont_data, cont_cats
>   WHERE cont_data.cont_id = $cont_id
>   AND cont_types.type_id = cont_data.type_id
>   AND cont_cats.cat_id = cont_data.cat_id
>
>
> its not work , give me 1064
>
>
>
> -
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online


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



[PHP] OT a lttle bit of Javascript needed

2003-07-03 Thread George Pitcher
Hi,

I'm developing a mini-website for a customer and want to build a link  so
that there is the option to see what I have in a database on my site.

It will feature in a form and when they fill in the ISBN field, their input
is added to a URL link on that page. The user can click on the link and see
what I have for that ISBN.

I've searched Google with only confusion as a result.

Can anyone here help me?

Cheers

George in Oxford


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



RE: [PHP] Setting Cookie Going Nuts

2003-07-04 Thread George Pitcher
Mike,

Just a thought - are you outputting any HTML on the page where you are
declaring your cookie?

If not, then it won't work.

I got stuck a few months back with a filter script where someone logs in and
depending on who they were were redirected to various pages. I was decalring
their cookies in the redirect script and it didn't work until I started
doing in on a 'written' page.

Hope this solves your problem.

Cheers

George in Oxford

> -Original Message-
> From: Boaz Yahav [mailto:[EMAIL PROTECTED]
> Sent: 04 July 2003 10:05 am
> To: Mike Morton; [PHP - GENERAL]
> Subject: RE: [PHP] Setting Cookie Going Nuts
>
>
> Did you solve this issue?
> What does $_SERVER["HTTP_HOST"] return?
>
> Sincerely
>
> berber
>
> Visit http://www.weberdev.com/ Today!!!
> To see where PHP might take you tomorrow.
>
>
> -Original Message-
> From: Mike Morton [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 4:03 PM
> To: [PHP - GENERAL]
> Subject: [PHP] Setting Cookie Going Nuts
>
>
> I am trying to issue a cookie, using the set cookie directive, and it is
> not working for some reason.  The code below I have used before with
> perfect success.  The only difference between the other place that I am
> using it is that the other place has globals on, this server has globals
> off (tho I turned them on a and it made no difference), and the other
> server is running 4.3.2 where this one is 4.3.0
>
> I am sure that it is something small that I missed when copying the code
> over, but I cannot for the life of me see what it is.  The only other
> difference is the other server is using a domain name, while the server
> this code is on is an IP address only (that should not make a difference
> tho)
>
> Why is the cookie not being isseued?  I am going nuts trying to figure
> this out!
>
> $ADMIN_COOKIE_NAME="scavengeradmin"; //name of the issuing cookie
> $COOKIE_EXPIRY=1800; //time in seconds to expiry
>
> function adminCookie() {
> global $ADMIN_COOKIE_NAME,$COOKIE_EXPIRY;
>
> //check to see if a cookie exists already.
> $cookieid=$_COOKIE[$ADMIN_COOKIE_NAME];
>
> //if there is no cookieid - then we are going to set a cookie.
> if(strlen($cookieid) < 1) {
> //find a unique value.
> list($msec,$sec)=explode(" ",microtime());
> $cookiekey=ereg_replace("\.","",($msec+$sec));
> //set expiry - 30 mins from now.
> $cookieexpiry=time()+$COOKIE_EXPIRY;
>
> setcookie($ADMIN_COOKIE_NAME,$cookiekey,$cookieexpiry,"/",$_SERVER["HTTP
> _HOS
> T"],0);
> $_COOKIE[$ADMIN_COOKIE_NAME]=$cookiekey;
> unset($cookiekey);unset($msec);unset($sec);unset($cookieexpiry);
> } else {
> //if the cookie has been set then we are just going to adjust
> the expiry date.
> //set expiry - 30 mins from now.
> $cookieexpiry=time()+$COOKIE_EXPIRY;
>
> setcookie($ADMIN_COOKIE_NAME,"$cookieid",$cookieexpiry,"/",$_SERVER["HTT
> P_HO
> ST"],0);
> unset($cookieexpiry);
> }
>
> unset($cookieid);
> }
>
> adminCookie(); //issue the cookie
>
> --
> Cheers
>
> Mike Morton
>
> 
> *
> * Tel: 905-465-1263
> * Email: [EMAIL PROTECTED]
> *
> 
>
> "Indeed, it would not be an exaggeration to describe the history of the
> computer industry for the past decade as a massive effort to keep up
> with Apple."
> - Byte Magazine
>
> Given infinite time, 100 monkeys could type out the complete works of
> Shakespeare. Win 98 source code? Eight monkeys, five minutes.
> -- NullGrey
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



[PHP] Frustrating problem with log-in script

2003-07-07 Thread George Pitcher
Hi,

I' running a self-registration script. On the login page are 2 fields:
'username' and 'paswd'.

The contents are checked against a db.

New users must enter 'new' and 'user' into these fields and that will skip
the db check and dump them into a registration page.

On testing (after it worked fine last week) I find that new/user dumps me
back into the login page (home.html).

The code is ...



Any suggestions? This is running on Win NT.

Chers

George


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



RE: [PHP] Frustrating problem with log-in script - DOHHH - Solved

2003-07-07 Thread George Pitcher

Sorry guys,

I wasted your time if you looked at this.

The local.php as copied from my local machine and had 'localhost' as the
base url rather than the proper web address.

Meet Dumbererer!

George


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



RE: [PHP] retrieving form checkbox values

2003-07-17 Thread George Pitcher
Here's my register globals off version:

Make sure that your form send a post with the highest index value [howmany].

$howmany=$_POST['howmany'];
for ($index = 1; $index < $howmany; $index++){
$checkbox = 'checkbox'.$index;
$checkbox= $_POST[$checkbox];
... Repeat for your other row-level form inputs ...
Do something with the data...

}

Hope this helps

George in Oxford


> -Original Message-
> From: Sævar Öfjörð [mailto:[EMAIL PROTECTED]
> Sent: 17 July 2003 10:35 am
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] retrieving form checkbox values
>
>
>
> I think you have to do 
> Then $File becomes an array. If you want to retrieve the value for each
> checkbox you can use a for loop and do value=$File[$i]
>
> -Original Message-
> From: Jason Wong [mailto:[EMAIL PROTECTED]
> Sent: 17. júlí 2003 08:58
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] retrieving form checkbox values
>
> On Thursday 17 July 2003 16:45, caspar kennerdale wrote:
> > I have a form which I want to post multiple values from one function
> to
> > another using checkboxes.
> >
> > Having one value is simple- the form submits the value $File and is
> then
> > retrieved in the target function via $_Request['File'] So far so good.
> >
> > Now I want to have multiple values for $File, because $File is a value
> > assigned to a dynamically generated list of files in a folder (which
> will
> > change from folder to folder).
> >
> > If I have multiple  then
> only
> > the last value is posted to the next function and retrieved by
> > $_Request['File']
> >
> > How can I post and retrieve all values of $File or am I going about
> this
> > the wrong way?
>
> manual > PHP and HTML
>
> Or search the archives and/or ask google.
>
> --
> 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
> --
> /*
> My doctor told me to stop having intimate dinners for four.  Unless
> there
> are three other people.
>   -- Orson Welles
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] XX outputting X signs

2003-07-22 Thread George Pitcher
Would it not make sese to store the number as a decimal and have the '£'
added at output?

George, in Oxford, where £££=pints

> -Original Message-
> From: David Nicholson [mailto:[EMAIL PROTECTED]
> Sent: 22 July 2003 3:51 pm
> To: David Goodchild
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] XX outputting X signs
>
>
> Hello,
>
> This is a reply to an e-mail that you wrote on Tue, 22 Jul 2003 at
> 15:01, lines prefixed by '>' were originally written by you.
> > My suggesstion would be as your adding the data to the database
> > convert the
> > £ to £
>
> I wouldn't do that, it will eman extra CPU cycles if at a later date
> you decide you want to use the data in your database for anything
> other than a HTML page.  Also it is 6 bytes of wasted disk space per
> record - in a very large database that would show.
>
> David.
>
> --
> phpmachine :: The quick and easy to use service providing you with
> professionally developed PHP scripts :: http://www.phpmachine.com/
>
>   Professional Web Development by David Nicholson
> http://www.djnicholson.com/
>
> QuizSender.com - How well do your friends actually know you?
>  http://www.quizsender.com/
> (developed entirely in PHP)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] arguments against moving site from Linux/Apache/PHP server to Windows/IIS/PHP needed

2003-07-23 Thread George Pitcher
> I know that PHP under windows is intended to be used only as test
> platform, but this is not enough to convince him.
>
Errr ... says who?

I'm out of a job here if this is true as I'm doing quite a bit of PHP
development on NT/IIS with both MySQL and MS Access (not my choice, but a
clients).

I'm quite happy with NT but I'll be switching over to Linux later in the
year - company policy to gradually move away from Win to Linux for servers.

I'd look at security as the main argument.

George


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



[PHP] Removing columns from a text file

2003-03-27 Thread George Pitcher
I have a text file file ready to go into a Filemaker database. It has over
5000 rows, each containing over 500 columns.

If I do a straight import I can only pull in the first 442 colums, but all
records. I can't take it in via Excel for the same reason - column limit
stops at 'IV' - never got that far before.

Is there a way to remove columns from the file using php on a fgets() basis?
I can identify which columns I can do without quite easily - certainly
enough to pare the file down to a reasonable extent.

An alternative would be to create a MySQL Table and drop columns there.

Advice on best route would be welcome.

Cheers

George


===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T  +44 (0)1865 799137 direct
T  +44 (0)1865 799000 switchboard
F  +44 (0)1865 799134
E  [EMAIL PROTECTED]

www.ingenta.com
Ingenta: Empowering the exchange of academic and professional content
online.


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



[PHP] RE: Removing columns from a text file

2003-03-27 Thread George Pitcher
Philip,

I'm on Windoze. So are you suggesting that I should read the line in,
explode into an array, pop those fields that I don't want/need and then
implode the array back into a string before fwrite?

George

> -Original Message-
> From: Philip Hallstrom [mailto:[EMAIL PROTECTED]
> Sent: 27 March 2003 3:38 pm
> To: George Pitcher
> Subject: Re: Removing columns from a text file
>
>
> If you have a unix/linux/bsd box around "man cut" would probably do it.
> Otherwise you could read it in with php and use explode().
>
> -philip
>
> On Thu, 27 Mar 2003, George Pitcher wrote:
>
> > I have a text file file ready to go into a Filemaker database.
> It has over
> > 5000 rows, each containing over 500 columns.
> >
> > If I do a straight import I can only pull in the first 442
> colums, but all
> > records. I can't take it in via Excel for the same reason - column limit
> > stops at 'IV' - never got that far before.
> >
> > Is there a way to remove columns from the file using php on a
> fgets() basis?
> > I can identify which columns I can do without quite easily - certainly
> > enough to pare the file down to a reasonable extent.
> >
> > An alternative would be to create a MySQL Table and drop columns there.
> >
> > Advice on best route would be welcome.
> >
> > Cheers
> >
> > George
> >
> >
> > ===
> >
> > George Pitcher
> > HERON Technical Manager
> > Ingenta plc
> > 23-38 Hythe Bridge Street, Oxford, OX1 2ET
> > T  +44 (0)1865 799137 direct
> > T  +44 (0)1865 799000 switchboard
> > F  +44 (0)1865 799134
> > E  [EMAIL PROTECTED]
> >
> > www.ingenta.com
> > Ingenta: Empowering the exchange of academic and professional content
> > online.
> >
> >
> > --
> > 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] Coercing a date calc - problem - or am I just dumb tryin g it this way

2003-06-21 Thread George Pitcher
Hi all,

I've just written this function:

$term='Michaelmas';
function f_week($w,$t)
{
$P=7*($w-1);
if( $t == 'Michaelmas'){
$D = 06;
$M = 10;
$Y = 2003;
} else {
$D = 12;
$M = 01;
$Y = 2004;
}
$week=date("d/m/Y", mktime(0,0,0,$D+$P,$M,$Y));
return $week;
}
?>
Michaelmas week 4 is 

But the date it shows is '10/03/2005 ' rather than '03/10/2003'.

Suggestions please.

George in Oxford



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



RE: [PHP] Re: Passing Variables

2003-06-21 Thread George Pitcher
Nabil,

That is one way but it means that Jay would have to use a form and not a
link.

You could set a cookie. That would work, but it relies on the user allowing
cookies.

George

> -Original Message-
> From: nabil [mailto:[EMAIL PROTECTED]
> Sent: 21 June 2003 2:58 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Passing Variables
>
>
> use hidden field (pure html) and then u have it as $yourhiddenfield on the
> next page even u have the register global off..
>
> Nabil
>
>
> "Jay Fitzgerald" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have been searching for an answer to this for a couple of
> hours now and
> > cant find anything. I believe that there is a secure way of
> doing this but
> > I think my brain is having a momentary lapse...
> >
> > I have these variables:
> >
> > $eventid = "1";
> > $age = "15";
> >
> > Is there a way to pass these variables to the next page so I
> can continue
> > using them without doing something like this:
> >
> > 
> >
> > I would rather not have the variables be seen or known to the
> end user for
> > security reasons because they could change them in the URL. I
> know it has
> > something to do with $_GET and $_POST because I do have register_globals
> > set to OFF in my php file and I do not want to turn them on
> >
> > TIA
> >
>
>
>
> --
> 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] Coercing a date calc - problem - or am I just dumb tryin g it this way SOLVED

2003-06-21 Thread George Pitcher
Yeah - just dumb!. I'd put my date vars into mktime in the european order.
Once I switched them it worked fine.

Chers

George

> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]
> Sent: 21 June 2003 2:50 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Coercing a date calc - problem - or am I just dumb tryin
> g it this way
>
>
> Hi all,
>
> I've just written this function:
>
> $term='Michaelmas';
> function f_week($w,$t)
> {
>   $P=7*($w-1);
>   if( $t == 'Michaelmas'){
>   $D = 06;
>   $M = 10;
>   $Y = 2003;
>   } else {
>   $D = 12;
>   $M = 01;
>   $Y = 2004;
>   }
>   $week=date("d/m/Y", mktime(0,0,0,$D+$P,$M,$Y));
>   return $week;
> }
> ?>
> Michaelmas week 4 is 
>
> But the date it shows is '10/03/2005 ' rather than '03/10/2003'.
>
> Suggestions please.
>
> George in Oxford
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Re: Passing Variables

2003-06-21 Thread George Pitcher
Jay,

I've never ventured into 'sessions' (not ones without drinks) but I've a
feeling that if the user has turned cookies off then sessions are out as
well as they require a cookie being stored on the user's machine.

Someone will surely correct me if I am wrong.

I went to the PHP conference in Frankfurt about 18 months ago and Rasmus was
talking about 'clean' URLs (ithout the 'query' string. I never did find out
how though?

Cheers

George

> -Original Message-
> From: Jay Fitzgerald [mailto:[EMAIL PROTECTED]
> Sent: 21 June 2003 3:19 pm
> To: George Pitcher; nabil; [EMAIL PROTECTED]
> Subject: RE: [PHP] Re: Passing Variables
>
>
> That was my thought too, George. But if the user does not have cookies
> enabled, then I believe, as Thomas pointed out, that a SESSION is
> the only
> way to handle the variables. I have never done a "correct"
> session so I am
> trying to learn how to do them without having a userid and password for
> each user. I have played with sessions but I don't know if I am
> doing them
> correctly or how to do sessions without authentication.
>
> Jay
>
>
>
> At 03:14 PM 6/21/2003 +0100, George Pitcher wrote:
> >Nabil,
> >
> >That is one way but it means that Jay would have to use a form and not a
> >link.
> >
> >You could set a cookie. That would work, but it relies on the
> user allowing
> >cookies.
> >
> >George
> >
> > > -Original Message-
> > > From: nabil [mailto:[EMAIL PROTECTED]
> > > Sent: 21 June 2003 2:58 pm
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Re: Passing Variables
> > >
> > >
> > > use hidden field (pure html) and then u have it as
> $yourhiddenfield on the
> > > next page even u have the register global off..
> > >
> > > Nabil
> > >
> > >
> > > "Jay Fitzgerald" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > I have been searching for an answer to this for a couple of
> > > hours now and
> > > > cant find anything. I believe that there is a secure way of
> > > doing this but
> > > > I think my brain is having a momentary lapse...
> > > >
> > > > I have these variables:
> > > >
> > > > $eventid = "1";
> > > > $age = "15";
> > > >
> > > > Is there a way to pass these variables to the next page so I
> > > can continue
> > > > using them without doing something like this:
> > > >
> > > > 
> > > >
> > > > I would rather not have the variables be seen or known to the
> > > end user for
> > > > security reasons because they could change them in the URL. I
> > > know it has
> > > > something to do with $_GET and $_POST because I do have
> register_globals
> > > > set to OFF in my php file and I do not want to turn them on
> > > >
> > > > TIA
> > > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



[PHP] TIP parsing form row data into variables

2003-06-22 Thread George Pitcher
Hi all,

This might be well known, so apologies if I'm going over old ground - I've
not seen this explained this way.

Last year I did a site using the variable variables method to parse row
data.

Now that I've moved to globals=off, I couldn't get that to work so I tried a
few other options settling for the following:

('howmany' is  the number of form rows on the previous page)

$howmany = $_REQUEST['howmany'];
for ($index = 1; $index < $howmany; $index++){
   $e_id = 'e_id'.$index;
   $e_id = $_REQUEST[$e_id];

Then do something with it.

Hope this helps someone.

George in Oxford


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



RE: [PHP] TIP parsing form row data into variables

2003-06-22 Thread George Pitcher
Justin,

I'm using 4.3. V4.1 was my first ever exposure to PHP.

The example I provided used a field I knew had to be popluated (because of
where it came from, but for others I do some isset() validation.

The scenario I'm working with is university reading lists. A university has
several reading lists for which they want to purchase online materials. When
they run a course more than once (material is generally licensed on a
course-by-course basis, lasting for 1 year), I want to be able to generate a
fresh list, based on the old one but modifiable. Its working quite nicely,
but I need to get it finished before Tuesday, including re-writing the code
(and databases) to MS Access, rather than my development version using
MySQL.

Cheers

George

> -Original Message-
> From: justin gruenberg [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2003 10:14 am
> To: George Pitcher; PHP-General
> Subject: Re: [PHP] TIP parsing form row data into variables
>
>
> Nothing appears blatently wrong in the code you provided, but it's 4am
> here, so I might be off.
>
> This comes to my mind:
> 1.  $_REQUEST was available from PHP 4.1.0 and later, are you using
> somthing before that?
> 2.  I assume you're doing somthing with $e_id within your loop, or else
> you're just resetting the contents of it.
> 3.  You might want to try print_r($_REQUEST) to see if it contains what
> you think it contains.
>
> George Pitcher wrote:
>
> >Hi all,
> >
> >This might be well known, so apologies if I'm going over old
> ground - I've
> >not seen this explained this way.
> >
> >Last year I did a site using the variable variables method to parse row
> >data.
> >
> >Now that I've moved to globals=off, I couldn't get that to work
> so I tried a
> >few other options settling for the following:
> >
> >('howmany' is  the number of form rows on the previous page)
> >
> >$howmany = $_REQUEST['howmany'];
> >for ($index = 1; $index < $howmany; $index++){
> >   $e_id = 'e_id'.$index;
> >   $e_id = $_REQUEST[$e_id];
> >
> >Then do something with it.
> >
> >Hope this helps someone.
> >
> >George in Oxford
> >
> >
> >
> >
>
>
>


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



RE: [PHP] Fw: Front Page equivalent

2003-06-22 Thread George Pitcher
Graham,

PHP editors is a frequent topic on this list. I would suggest that you have
a look at the archives and see if the answer is there.

BTW, I only use Dreamweaver and don't have any problems.

George

> -Original Message-
> From: Graham Webb [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2003 12:06 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Fw: Front Page equivalent
>
>
>
> - Original Message -
> From: "Gabor Hojtsy" <[EMAIL PROTECTED]>
> To: "Graham Webb" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Sunday, June 22, 2003 11:59 AM
> Subject: Re: Front Page equivalent
>
>
> Please ask support questions at [EMAIL PROTECTED]
>
> Goba
>
> Graham Webb írta:
> > I am looking for software that will allow me to write PHP in WYSIWYG.
> something like front page. Although I can code directly I have become so
> lazy that I use packages such as this a Dreamweaver and then alter the
> coding afterwards.
> >
> > Please advise.
> >
> > Regards,
> >
> > Graham Webb.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Re: generate word docs

2003-06-25 Thread George Pitcher
RTF is the way to go.

If you know what you want your word doc to look like, set it up in Word, or
whatever will save a formatted rtf file (Sorry, I'm Windows/Mac based, but I
presume that Open Office  etc will do this on Linux).

I insert placeholders into the document where I want to put dynamic data I
use %_varname_% to avoid any RTF conflicts.

In php, read the file into a string and str_replace() or preg_replace() the
placeholders for your data. Save the target file as *.doc and there you go -
done.

George

> -Original Message-
> From: dorgon [mailto:[EMAIL PROTECTED]
> Sent: 25 June 2003 9:06 am
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: generate word docs
>
>
> hmm... sounds troublesome.
> do you need all text/paragraph formatting features of word? what if
> finding a spec for RTF, which is much easier and specifying the word
> MIME key respectifely saving as .doc (words opens rtf without a convert
> dialog I think).
>
> just a thought
>
> Evan Nemerson wrote:
> > Summary: I have to create a word document on the fly. what's
> the best way to
> > go about it?
> >
> > Okay so I have a client that would like something output to a
> word document. I
> > already have HTML and PDF versions... I'm trying to figure out
> the best way
> > to do this. I am already aware of the open html in word hack.
> The way I see
> > it, these are my choices:
> >
> > 1)  Use the hack that I'm really don't like. It never looks
> quite right (which
> > is the whole point of this).
> > 2)  Move everything over to a windows host and use COM.
> > 3)  Somehow convice host (hurricane electric) to run PHP5 CVS
> w/ Sterling's
> > mono extension, and use .net to create the word document (does
> mono support
> > that class yet?). I hate C#. VB is even worse.
> > 4)  Find an open-source library that writes word documents
> (quick search
> > revealed nothing...), write an extension for php.
> > 5)  Find a spec for word docs and write a library in php
> > 6)  find a spec and write a library in c, then create php
> extension. I'm
> > willing to do this, but it would take a long time...
> > 7)  Tell my boss to sod off (politely, though), it's not
> currently feasible...
> > I think this is what he's expecting, anyways.
> >
> > So, does anyone have any suggestions/comments? Anyone know
> where I could find
> > a library (in c or php) or a spec? I'm kinda thinking aloud here hoping
> > someone will prod me in the right direction...
> >
> > Thanks
> > Evan
>
>
> --
> 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] Installation and/or configuration problems w 4.2.1 on NT

2002-06-11 Thread George Pitcher

Hi all,

I have PHP running happily on three of my servers (NT/2000/Linux) and need
to set it up on NT on a server 400 miles away. I have remote access to the
server.

I have followed the instructions for both the ISAPI version and the CGI
version with no success.

This is the error message I get when I try to call phpinfo.php:

HTTP Error 401
401.3 Unauthorized: Unauthorized due to ACL on resource

I'm now just about to start pulling my hair out, so can someone help before
I'm totally bald.



I did try the PHP-Win list but no response there.



Regards

George



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




RE: [PHP] Installation and/or configuration problems w 4.2.1 on N T

2002-06-12 Thread George Pitcher


Ed,
 
That's possible. I'm on NT running IIS4. I've followed all the guide without any 
success. This site is due to go live and take over from one in my office in the next 2 
weeks.
 
Help please someone?
 
George 
  "Lazor, Ed" <[EMAIL PROTECTED]> wrote: I don't know the answer, but... It sounds 
almost like a server configuration
issue. Almost as if the web server (Apache?) doesn't have the php extension
configured correctly.

-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 3:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Installation and/or configuration problems w 4.2.1 on NT


Hi all,

I have PHP running happily on three of my servers (NT/2000/Linux) and need
to set it up on NT on a server 400 miles away. I have remote access to the
server.

I have followed the instructions for both the ISAPI version and the CGI
version with no success.

This is the error message I get when I try to call phpinfo.php:

HTTP Error 401
401.3 Unauthorized: Unauthorized due to ACL on resource

I'm now just about to start pulling my hair out, so can someone help before
I'm totally bald.


This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message. Thank you very
much. 


-
Relive the FIFA World Cup goals with exclusive video highlights!

http://fifaworldcup.yahoo.com/fc/en


Re: [PHP] Installation and/or configuration problems w 4.2.1 on NT

2002-06-12 Thread George Pitcher

Ed,

Thanks, the server is IIS4 and I've tried both the CGI and ISAPI approach,
even tried using the installer. All to no avail.

I have taken the error mesage to mean that some security contraint is
preventing the server from accessing eithet the PHP.exe or the .dll file.

Stumped.

George


- Original Message -
From: "Lazor, Ed" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 12:33 AM
Subject: RE: [PHP] Installation and/or configuration problems w 4.2.1 on NT


> I don't know the answer, but... It sounds almost like a server
configuration
> issue.  Almost as if the web server (Apache?) doesn't have the php
extension
> configured correctly.
>
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 3:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Installation and/or configuration problems w 4.2.1 on NT
>
>
> Hi all,
>
> I have PHP running happily on three of my servers (NT/2000/Linux) and need
> to set it up on NT on a server 400 miles away. I have remote access to the
> server.
>
> I have followed the instructions for both the ISAPI version and the CGI
> version with no success.
>
> This is the error message I get when I try to call phpinfo.php:
>
> HTTP Error 401
> 401.3 Unauthorized: Unauthorized due to ACL on resource
>
> I'm now just about to start pulling my hair out, so can someone help
before
> I'm totally bald.
>
>

> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.


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




[PHP] Installing php_4.0.6 on Mandarke

2002-02-15 Thread George Pitcher

Hi all,

I have just installed Mandrake 8.1 with MySQL, Apache and PHP and Apache and
MySQL are working but when I do the phpinfo.php file I get a 404 error even
though the file is there.

It is as though it cannot see php files.

Any suggestions?

George



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




Re: [PHP] Getting the data for MySQL and then putting it back withPHP - at a loss!

2002-02-22 Thread george Pitcher

Michael,

Been there recently!

You want to use variable variables:

$index=0;
for (index=0; $index < $rowcount; $index++){
$formvar='formvar'.$index;
$formvar=$$formvar;

Do the last two lines for each piece of data you want to handle.

Think about how you are isolating the formvars on the submitted page to
make sure that you are sure you are reading the right stuff.

Hope this helps.

George in Edinburgh



On Fri, 2002-02-22 at 12:24, Michael Romagnoli wrote:
> 
> I have a special set of information retrieved from a while loop that I would
> like a person to be able to edit and send back into a MySQL table.
> 
> I know all of the basic MySQL commands for doing such, but the PHP side to
> get the input from the form to go in is really stumping me.
> 
> This is what I have:
> 
> -
> 
> $or = 0;
> 
> while($or < $orderidrows) {
> 
> $orderinfo = mysql_fetch_row($orderidinfo);
> $domain[$or] = $orderinfo[2];
> $cancel[$or] = $orderinfo[3];
> 
> print " $domain[$or] size=2 face=Arial>Cancel This Domain? face=Arial> size=3>";
> 
> $or++;
> }
> 
> --
> 
> The values/data I would normally insert into the MySQL from the form would be
> $confirm, based on $domain - however, in this case, I have a number of rows
> with the same
> name. I've received help as far as distinguishing one row from another -
> thanks.  :)
> 
> The problem I am really having is trying to insert the data back into one
> particular table.  You see, when I select the data, I get multiple
> orderid's with multiple domains attached to them.  When I try to UPDATE the
> MySQL with the data, only the last orderid seems to be the one getting
> updated.  And, to boot, I want to update based on the domain name (since
> that is unique) and ignore the orderids.  I only used the orderids to pull
> the data out.
> 
> So, I've been using a query like this in a loop;
> 
> $update = "UPDATE table2 SET cancel='$cancel[$a]' WHERE domain = $domain[$a]
> 
> Any suggestions?  I'm getting pretty desparate here!  :\
> 
> Thanks,
> 
> -Mike
> 
> 



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


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




[PHP] Can anyone improve on this?

2002-04-08 Thread George Pitcher

Hi all,

I'm working on a small solution and want to do some configuration during the
initialising process.

The solution is aimed at non tecchies in universities and the idea is that
the system does some of the environment stuff for them.

This is the first time I've done any of this stuff so I might be off-target.
Any suggested imptovements?

George





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




[PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Hi all,

I am delivering my PDF files from a non-internet directory. The file gets
delivered but the filename is always changed to the name of the php script.

Can anyone tell me how to get the file delivered so that the name stays as
it was on the server?

My PHP code. This is all the php code I use in my site (so far).
==

=

Regards

George Pitcher, Edinburgh


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Rasmus,

Thanks for the suggestion but it didn't change anything.

George
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 10:54 AM
Subject: Re: [PHP] Delivering NAMED pdf files


> The obvious hack would be to simply make the link:
>
>   http://your.domain.com/script.php/filename_you_want.pdf
>
> -Rasmus
>
> On Fri, 19 Oct 2001, George Pitcher wrote:
>
> > Hi all,
> >
> > I am delivering my PDF files from a non-internet directory. The file
gets
> > delivered but the filename is always changed to the name of the php
script.
> >
> > Can anyone tell me how to get the file delivered so that the name stays
as
> > it was on the server?
> >
> > My PHP code. This is all the php code I use in my site (so far).
> > ==
> >  > $fp1 = "D:\\Pdf\\" . $fp;
> > $len = filesize($fp1);
> > header("Content-type: application/pdf");
> > header("Content-Disposition: inline; filename=$fp1");
> > header("Content-Length: $len");
> > readfile($fp1);
> > ?>
> > =
> >
> > Regards
> >
> > George Pitcher, Edinburgh
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> >


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Arpi,

Thanks for the suggestion but it didn't change anything.

George

- Original Message - 
From: "Arpad Tamas" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 11:13 AM
Subject: Re: [PHP] Delivering NAMED pdf files


> On Friday 19 October 2001 11:52, George Pitcher wrote:
> > Hi all,
> >
> > I am delivering my PDF files from a non-internet directory. The
> > file gets delivered but the filename is always changed to the name
> > of the php script.
> >
> > Can anyone tell me how to get the file delivered so that the name
> > stays as it was on the server?
> It works this way for me on many browsers (included ie):
> 
> header("Content-Type: application/octectstream");
> header("Content-Disposition: filename=$name");
> header("Pragma: no-cache");
> header("Expires: 0");
> 
> Don't forget to double-check every capital letter, because it matters 
> in http and for most browsers too (for example your Content-Type's 
> capitals are wrong below).
> Arpi
> 
> > ==
> >  > $fp1 = "D:\\Pdf\\" . $fp;
> > $len = filesize($fp1);
> > header("Content-type: application/pdf");
> > header("Content-Disposition: inline; filename=$fp1");
> > header("Content-Length: $len");
> > readfile($fp1);
> > ?>
> > =
> >
> > Regards
> >
> > George Pitcher, Edinburgh
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Sebastian,

Just tried it - it dosn't work for me.

George
- Original Message -
From: "Sebastian" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>; "'Php-General"
<[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 12:19 PM
Subject: AW: [PHP] Delivering NAMED pdf files


Hi George

I had the same problem a while ago.
The only solution i found was to change the link to :
www.blabla.com/pdffile/test.pdf
test.pdf does not exist, but
in /pdffile/ there is a .htaccess which redirects the 404 to the php
script that reads/generates the pdfs. And for my purpose checks if user
is
authorized to get these files.

sebastian

> -Ursprüngliche Nachricht-
> Von: George Pitcher [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 19. Oktober 2001 12:55
> An: Arpad Tamas; [EMAIL PROTECTED]
> Betreff: Re: [PHP] Delivering NAMED pdf files
>
>
> Arpi,
>
> Thanks for the suggestion but it didn't change anything.
>
> George
>
> - Original Message -
> From: "Arpad Tamas" <[EMAIL PROTECTED]>
> To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, October 19, 2001 11:13 AM
> Subject: Re: [PHP] Delivering NAMED pdf files
>
>
> > On Friday 19 October 2001 11:52, George Pitcher wrote:
> > > Hi all,
> > >
> > > I am delivering my PDF files from a non-internet
> directory. The file
> > > gets delivered but the filename is always changed to the
> name of the
> > > php script.
> > >
> > > Can anyone tell me how to get the file delivered so that the name
> > > stays as it was on the server?
> > It works this way for me on many browsers (included ie):
> >
> > header("Content-Type: application/octectstream");
> > header("Content-Disposition: filename=$name");
> > header("Pragma: no-cache");
> > header("Expires: 0");
> >
> > Don't forget to double-check every capital letter, because
> it matters
> > in http and for most browsers too (for example your Content-Type's
> > capitals are wrong below).
> > Arpi
> >
> > > ==
> > >  > > $fp1 = "D:\\Pdf\\" . $fp;
> > > $len = filesize($fp1);
> > > header("Content-type: application/pdf");
> > > header("Content-Disposition: inline; filename=$fp1");
> > > header("Content-Length: $len");
> > > readfile($fp1);
> > > ?>
> > > =
> > >
> > > Regards
> > >
> > > George Pitcher, Edinburgh
> > >
> > >
> > > _
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED] To contact the list
> administrators, e-mail: [EMAIL PROTECTED]
>
>



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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Thanks for the [non] suggestion.

I will not host these in a web-accessable directory. They are copyright
materials.

I've done this type of hosting previously using Frontier on a Mac and it
worked fine.

I thought that php was better than Frontier, though.

George
- Original Message -
From: "speedboy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 12:27 PM
Subject: Re: [PHP] Delivering NAMED pdf files


> > Thanks for the suggestion but it didn't change anything.
>
> It won't. Put them in a web accessible directory and don't use custom
header calls because they do not work reliably.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

James,

I can. The text in square brackets is a pdf filename referenced in full from
a Filemaker database using Lasso.






And the php page which is fileaccess.php:



HTH

George
- Original Message -
From: "James Cox" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; "Php-General@Lists. Php. Net"
<[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 12:45 PM
Subject: RE: [PHP] Delivering NAMED pdf files


> can you paste the full text of the code as you have it? I don't see
anywhere
> where you define the name of the file.
>
> James Cox
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
> .
> Politicalia admin and editor
> e: [EMAIL PROTECTED]  :: w: http://www.politicalia.com/
> Today's Discussion, Tomorrow's Agenda.
>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
> .
>
>
> > -Original Message-
> > From: George Pitcher [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 19, 2001 12:27 PM
> > To: speedboy; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Delivering NAMED pdf files
> >
> >
> > Thanks for the [non] suggestion.
> >
> > I will not host these in a web-accessable directory. They are copyright
> > materials.
> >
> > I've done this type of hosting previously using Frontier on a Mac and it
> > worked fine.
> >
> > I thought that php was better than Frontier, though.
> >
> > George
> > - Original Message -
> > From: "speedboy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, October 19, 2001 12:27 PM
> > Subject: Re: [PHP] Delivering NAMED pdf files
> >
> >
> > > > Thanks for the suggestion but it didn't change anything.
> > >
> > > It won't. Put them in a web accessible directory and don't use custom
> > header calls because they do not work reliably.
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-19 Thread George Pitcher

Yes,

If I download the file as it is named, it is the file I expected, only not
named the way I wanted.

George

"MrBaseball34" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > And the php page which is fileaccess.php:
> >
> >  > $fp1 = "D:\\Pdf\\" . $fp;
> > $len = filesize($fp1);
> > header("Content-Type: application/pdf");
> > header("Content-Disposition: inline; filename=$fp1");
> > header("Content-Length: $len");
> > readfile($fp1);
> > ?>
>
> Have you CHECKED the value of $fp?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] Delivering NAMED pdf files

2001-10-29 Thread George Pitcher

Thanks to all who offered suggestions.

I have now solved the problem.

Realising that what was actually happening was the offered filename being
the same as the php script name, I built a routine which checks to see if a
script with the desired .php exists and if not it copies my script
to  a file with that name. This takes place when the page is first loaded,
redirecting to the next page in the web-process (remember that I'm doing all
this with Lasso/Filemaker). The button on that page then calls for the
 script which pushes out the correctly named pdf document to the
user. I have another button which asks for confirmation that the download
was completed satisfactorily and that is used to delete the temporary
.php script.

This methgod may be of use to someone else. If so, please email me and I'll
share my code.

Regards

George P in Edinburgh and looking forward to Frankfurt next week


- Original Message -
From: "Bill Rausch" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 8:22 PM
Subject: RE: [PHP] Delivering NAMED pdf files


> George,
>
> Rasmus' suggestion is correct, but he was terse as usual :) and you
> might not have understood what he was saying.
>
> My solution is to present a list of the filenames available as LINKS
> (to non-existent files). Then the script does what you've already
> got.  The problem is that some browsers "cheat" and ignore the
> filename that you send in the headers "because they think they know
> better" because of the URL that is currently active. So you fool them
> by making a fake URL.
>
> In my case I have links that look like:
> file.pdf
>
> and my dl.php script looks something like:
>
> ...
> $uri = urldecode(substr($REQUEST_URI,8));   # skip over the /dl.php/
> $x = strpos( $uri, "?" ); # get rid of trailing SID, etc.
> if( $x > 0 )
>  $uri = substr($uri,0,$x);
>
> header( ...
> header( ...
>
> readfile( "$realfileloc/$uri" );
> ...
>
> Bill
> --
>   Bill Rausch, Software Development, Unix, Mac, Windows
>   Numerical Applications, Inc.  509-943-0861   [EMAIL PROTECTED]


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


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




Re: [PHP] Form's : making me sick!

2001-11-13 Thread George Pitcher

I don't think that you can nest forms.

George

- Original Message -
From: "De Necker Henri" <[EMAIL PROTECTED]>
To: "PHP-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, November 13, 2001 1:09 PM
Subject: [PHP] Form's : making me sick!


> I just want to know how to make a  inside a  get to respond or
> dont make any browser errors?
>
> It looks someting like this :
>
> 
> 
> 
> 
>//This must
> change the next  values !
> 
> 
> 
> //this values must be cahnge
> 
> 
>
> Everthing is working fine but i just cant get the two forms to work
> together.If i only can get some ideas on what action,or onchange values to
> change it will be greatfull!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] Cannot add header information...

2001-11-22 Thread George Pitcher

Per,

Its a hard rule but you cannot sent any HTML content before the header. Try
reversing the order and see if that works.

George (a newbie, trying to find time to learn more)
- Original Message -
From: "Per Waagen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 22, 2001 10:19 AM
Subject: [PHP] Cannot add header information...


> Need some help here, Im getting this error:
>
> Warning: Cannot add header information - headers already sent by (output
> started at /home/p/pe/perphp/public_html/login.php:4) in
> /home/p/pe/perphp/public_html/login.php on line 44
>
> ...while trying to run the following .PHP code on my server. Any ideas why
> this doesnt work?
> (Im trying to setup user authentication and found this on the Webmonkey
> site)
>
> All tips are appreciated!!
>
>
> dummy
> 
>
> 
>  // File Name: auth02.php
>  // Check to see if $PHP_AUTH_USER already contains info
>
>  if (!isset($PHP_AUTH_USER)) {
>   // If empty, send header causing dialog box to appear
>   header('WWW-Authenticate: Basic realm="My Private Stuff"');
>   header('HTTP/1.0 401 Unauthorized');
>   echo 'Authorization Required.';
>   exit;
>  } else if (isset($PHP_AUTH_USER)) {
>
>   if (($PHP_AUTH_USER != "admin") || ($PHP_AUTH_PW != "abc123")) {
>header('WWW-Authenticate: Basic realm="My Private Stuff"');
>header('HTTP/1.0 401 Unauthorized');
>echo 'Authorization Required.';
>exit;
>
>   } else {
>echo "
>You're authorized!
>";
>   }
>  }
> ?>
> 
> 
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




[PHP] Re: [PHP-WIN] Re: Read Session in ASP in PHP

2001-11-19 Thread George Pitcher

> Sorry, I'm a PHP newbie.  The only way I know you can pass values to a php
> script is the normal way, through the URL, as in:  a
> href=yourscript.php?var1=value&var2=value... etc.

Not strictly true.

I am primarily a Lasso developer and I can pass values (and do) using Form,
URL and Cookies. In Lasso Cookies are not set in the headers or as part of
an explicit session instruction, but rather just like setting a global
variable, but obviously linked to the user's session.

George, also a php newbie, but constantly wowed by what appears possible
with it

"anch.org" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Sorry, I'm a PHP newbie.  The only way I know you can pass values to a php
> script is the normal way, through the URL, as in:  a
> href=yourscript.php?var1=value&var2=value... etc.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




[PHP] 'Running' a file from PHP script

2001-12-04 Thread George Pitcher

Hi all,

I'm a PHP newbie, my main scipring being done in Blueworld's Lasso.

I have used php fro time to time with Lasso to do some file handling.

My question is: 'Can I run a file from a PHP script?'

The file in question would be a Filemaker database file. I want to be able
to open the file in the Filemaker application if the file is not already
running.

MTIA

George in Edinburgh


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




[PHP] 'Running' a file from PHP script

2001-12-04 Thread George Pitcher

Hi all,

I'm a PHP newbie, my main scipring being done in Blueworld's Lasso.

I have used php fro time to time with Lasso to do some file handling.

My question is: 'Can I run a file from a PHP script?'

The file in question would be a Filemaker database file. I want to be able
to open the file in the Filemaker application if the file is not already
running.

MTIA

George in Edinburgh



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


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




Re: [PHP] 'Running' a file from PHP script

2001-12-04 Thread George Pitcher

Steve,

Thanks for the response, but it's a server-side 'run' I'm looking for, not
client-side (they get web access to the db).

Basically I want to be able to test that the db is running and if it isn't
then I want to 'run' it. Platform is NT, server is IIS4

George

- Original Message -
From: "Steve Cayford" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 3:39 PM
Subject: Re: [PHP] 'Running' a file from PHP script


>
> On Tuesday, December 4, 2001, at 02:22  AM, George Pitcher wrote:
>
> > Hi all,
> >
> > I'm a PHP newbie, my main scipring being done in Blueworld's Lasso.
> >
> > I have used php fro time to time with Lasso to do some file handling.
> >
> > My question is: 'Can I run a file from a PHP script?'
> >
> > The file in question would be a Filemaker database file. I want to be
> > able
> > to open the file in the Filemaker application if the file is not already
> > running.
> >
>
> If you mean can you open the Filemaker application on the client's
> machine using PHP, then no. Keep in mind that PHP is only running on the
> server(*), all the client machine sees is the HTML output from your PHP
> script. Maybe you could use javascript to do this, but I haven't used
> javascript much.
>
> -Steve
>
> (*) Assuming you're using PHP in its normal web-server scripting mode.
>
>
> > MTIA
> >
> > George in Edinburgh
> >
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >


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


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




Re: [PHP] 'Running' a file from PHP script

2001-12-04 Thread George Pitcher

Jon,

Not quite as simple as that. I can run the db application without any
problem, but the db files tend to fall over occasionally. I have a script
which cxhecks every 5 mins and boots them up if they are down. I'm looking
for a way to get them up if the db search detects that they are down. I can
do the detection bit, it's the getting the db file up and running bit I
can't do.

George

- Original Message -
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 4:44 PM
Subject: RE: [PHP] 'Running' a file from PHP script


> >
> > Basically I want to be able to test that the db is running and if it
isn't
> > then I want to 'run' it. Platform is NT, server is IIS4
> >
>
> It's a database, right? So surely it should be running as an NT service,
in
> which case it should be set to start automatically when the computer
starts.
> Your best bet to test for the existence is to try and connect to it with a
> known good username and password - if that fails, it's likely that the
> service isn't running.
>
> If it's not running automatically and all the time, then you don't have a
> database server, you have a computer that happens to have database
software
> installed on it, in which case you should change your ISP. You can't use
the
> key inside the locked box to unlock the box.
>
> Cheers
> Jon
>
>
> **
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or
confidentiality'
>
> **


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


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




Re: [PHP] 'Running' a file from PHP script

2001-12-04 Thread George Pitcher

Jon,

Of course not, I'm a newbie!

George

- Original Message -
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 5:03 PM
Subject: RE: [PHP] 'Running' a file from PHP script


> Aha, I understand :-)
>
> Have you looked at exec() and passthru()?
>
> Start with http://www.php.net/manual/en/ref.exec.php, there are some notes
> relating to Windows there...
>
> Cheers
> Jon
>
>
>
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]]
> Sent: 04 December 2001 16:51
> To: Jon Haworth
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] 'Running' a file from PHP script
>
>
> Jon,
>
> Not quite as simple as that. I can run the db application without any
> problem, but the db files tend to fall over occasionally. I have a script
> which cxhecks every 5 mins and boots them up if they are down. I'm looking
> for a way to get them up if the db search detects that they are down. I
can
> do the detection bit, it's the getting the db file up and running bit I
> can't do.
>
> George
>
>
> **
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or
confidentiality'
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] headers

2001-12-05 Thread George Pitcher

I'm a newbie but how about:

 header(location: http://www.xxx.yyy/somepage.php?var1=$var1)
 and so on.

And location: needs a space after it!

George


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


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




Re: [PHP] very urgent assistance

2001-12-05 Thread George Pitcher

Ben,

Except that its been around for a couple of years now, in various guises.

SPAM!

George
- Original Message - 
From: "Smith, Benjamin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 6:20 AM
Subject: RE: [PHP] very urgent assistance


This would have to be the most bizarre spam I have ever read.
 

-Original Message-
From: Adewale.Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 6 March 2001 6:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] very urgent assistance

Dr.Adewale.Johnson.
16 Kingsway Road 
Ikoyi, Lagos 
Nigeria.. 
[EMAIL PROTECTED]
6th, December , 2001. 
 
Sir, 
 
Request for Urgent Business Relationship. 
 
First I must solicit your confidence in this transaction. This is by 
virtue of its nature as being utterly confidential and top secret. We
shall 
be counting on your ability and reliability to prosecute a transaction
of 
great magnitude  involving a pending business transaction requiring 
maximum confidence. 
 
We are top officials of the Federal Government Contract Review Panel who

are interested  in importation of goods into our country with 
funds which are presently trapped in Nigeria. In order to commence this 
business we solicit  your assistance to enable us RECIEVE the 
said trapped funds ABROAD. 
 
The source of this fund is as follows : During the regime of our late 
head of state, Gen.  Sani Abacha, the government officials set up 
companies and awarded themselves contracts which were grossly 
over-invoiced in various  Ministries. The NEW CIVILIAN Government 
set up a Contract Review Panel (C.R.P) and we have identified a lot of 
inflated contract  funds which are presently floating in the Central 
Bank of Nigeria (C.B.N). However, due to our position as civil servants 
and members of this  panel, we cannot acquire this money in our 
names. I have therefore, been delegated as a matter of trust by my 
colleagues of the panel  to look for an Overseas partner INTO whose 
ACCOUNT the sum of US$31,000,000.00 (Thirty one Million United States 
Dollars) WILL  BE PAID BY TELEGRAPHIC TRANSFER. 
Hence we are writing you this letter.  
We have agreed to share the money thus: 
70% for us (the officials) 
20% for the FOREIGN PARTNER (you) 
10% to be used in settling taxation and all local and foreign expenses. 
 
It is from this 70% that we wish to commence the importation business. 
Please note that this  transaction is 100% safe and we hope that the
funds arrive your 
account in latest ten (10)  banking days from  the date of reciept of
the following 
information  by email: A suitable name and bank account into which the
funds can 
be paid. 
 
The above information will enable us write letters of claim and job 
description respectively. 
This way we will use your company's name to 
apply for payments and re-award the contract in your company name. 
 
We are looking forward to doing business with you and solicit your 
confidentiality in this  transaction. 
 
For security reasons, please respond only to the above email address or
fax number 234 
1 7747907. I will bring you  into the complete picture of this pending
project when I have 
heard from you. 
 
Yours Faithfully, 
Dr.Adewale.Johnson.
Tel/fax: 234 1 7747907 


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


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


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


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




Re: [PHP] FOLLOW UP on "column names not liked by odbc/php/access"

2001-12-05 Thread George Pitcher

Just a thought. 'Label' might be a reserved name on win as it is/was used to
describe the name of a volume (drive).

But then again, maybe not.

George

- Original Message -
From: "mweb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, December 05, 2001 10:45 AM
Subject: [PHP] FOLLOW UP on "column names not liked by odbc/php/access"


> Hello,
>
> On the same database, this query works:
>
> $SQL_Exec_String = "INSERT INTO Multimedia (Titolo,Descrizione,Logo,Link)
> VALUES ('prova titolo','prova descrizione','.gif','prova link');";
> $cur= odbc_exec( $cnx, $SQL_Exec_String );
>
> This one gives this error:
> ISQL_exec_String = "Insert Into (Artista, Opera, Label, Anno, Nazione,
CDNow,
> Autore, AutoreNome, Genere, GenereCustom, SulWeb, Autorizzato, Unico,
VALUES
> ('prova2', 'inedita', 'ignota',
> '2001','IT', 'nonesiste', 'io', 'lui','3', 'ulteriori dettagli sul genere
> musicale', 'http://www.no.it', '1', '20011205111456', 'asdas erfver',
'ciao
> ni', '2.5', 'Non andare a capo!');"
>
>
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error
in
> INSERT INTO statement., SQL state 37000 in SQLExecDirect in
> C:\domini\m.net\inserzione3.php on line 115
> Error in odbc_exec( no cursor returned )
>
> Does the second qyury look syntactically wrong to you? May it be that some
> column name or quoting is wrong, or some value I try insert is not
matching
> the column type? If so, why would this be a *syntax* error?
>
> Is it possible to query access via Php so that it will tell the internal
> strucure of the table?
> (this database was developed and left online by somebody else, that's why
> I don't have all this info)
>
> Any help is greatly appreciated, as are working sql statements for similar
> (php+odbc+access) cases.
>
> regards,
> mweb
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] Online editor that edits all pages

2001-12-13 Thread George Pitcher

I'm using EditPlus to edit files on my server, from my laptop, but that
accesses the files via the NT network, which might not be what yopu are
looking for.

George
- Original Message -
From: "Andreas Landmark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 11:16 AM
Subject: Re: [PHP] Online editor that edits all pages


> On Fri, Dec 14, 2001 at 12:11:14AM -0800, R. Lindeman wrote:
> > sorry for the inconvieniance but i have to restate my question i'm
looking
> > for a online editor that is able to edit pages that are not on the same
host
> > as the editor is.
> >
>
> And how is it supposed to do that?
>
> ftp/ssh/frontpage-ext ?
>
> Can't think of a ootb solution that does what you want...
> --
> Andreas D Landmark / noXtension
> On Monday mornings I am dedicated to the proposition that all men are
> created jerks.
> -- Avery
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01


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


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




Re: [PHP] Printing file PDF and not seve

2001-12-14 Thread George Pitcher

Don't think so. The whole premise of PDFs is that they are downloaded to the
client's machine for local viewing (even on-line). What you need to think
about is what security you can build in which although not preventing
storage, prevents any unwanted use such as passing on to others etc.

We've done various things over the years to accomplish this but not in a php
environment.

HTH

George
- Original Message -
From: "rino" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 10:56 AM
Subject: [PHP] Printing file PDF and not seve


Is posible whit pdflib print file pdf only in browser client and not save
file 

Thank you



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/01


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


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




Re: [PHP] ascii of euro

2001-07-27 Thread George Pitcher

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

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


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


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


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




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

2001-07-27 Thread George Pitcher

Have a look at:

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

HTH

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


> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Brian White) wrote:
>
> > There are times when I would really like to be able to do:
> >
> > class A
> > {
> >  function DoStuff()
> >  {
> > .
> >  }
> > }
> >
> > class B extends A
> > {
> >  function DoStuff()
> >  {
> > .
> > $super->DoStuff(); // Calls the function in A
> >  }
> > }
>
> Maybe I'm misunderstanding you, but isn't that what the A::DoStuff()
syntax
> does?
>
> --
> CC
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] PHP Manual in PDF Format

2001-08-03 Thread George Pitcher

Er, that's a MySQL manual and it doesn't have much in terms of php coding i
n it, IIRC.

GP
- Original Message -
From: Augusto Cesar Castoldi <[EMAIL PROTECTED]>
To: Andreas D. Landmark <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 3:51 PM
Subject: Re: [PHP] PHP Manual in PDF Format


> You can get here:
>
> http://monica.inf.ufsc.br/Docs/MySQL.pdf
>
> see you.
>
> Augusto
>
> On Fri, 3 Aug 2001, Andreas D. Landmark wrote:
>
> > At 03.08.2001 10:36, Pere Vineta wrote:
> > >Dear friends,
> > >
> > >Any one of you know when PHP Manual in PDF Format will be available?
> > >
> > >Thanks
> >
> > Probably when Adobe stops picking on innocent cryptographers pointing
out
> > weaknesses in their software and stops hiding the source for what they
forced
> > through as the defacto standard for document distribution...
> >
> > ;-)
> >
> >
> > --
> > Andreas D Landmark / noXtension
> > Real Time, adj.:
> >  Here and now, as opposed to fake time, which only occurs there
> > and then.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




[PHP] newbie installation help needed - LinuxPPC

2001-08-15 Thread George Pitcher

Hi all,

I've been playing around a little with php/mysql/apache on my NT box but I
have just set up one of my Macs as a LinuxPPC machine. I have downloaded
PHP-4.0.6 but now I want to install it to work with the apache server
software already installed.

I'm a complete newbie as far as linux is concerned so can someone give me
simple step by step instructions on how to do this.

I also need a little help getting started with MySQL. I have somehow managed
to set it up with my username and password (I think) but I don't know how to
get it stated. Any help there?

MTIA

George, Edinburgh, learning something new every day


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




[PHP] Delivering an authenticated pdf

2001-09-06 Thread George Pitcher

Hi all,

I want to be able to, after authentication, read a pdf into a string and
then write it out to the client through the browser.

I can't do all of the procedure in PHP as it's an add on to a
Lasso/Filemaker site. I can handle the transfer between the two processes, I
just need to do the writing out to the client.

Has anyone done this sort of thing before? (Not the lasso/php stuff but pdf
delivery.)

The reasoning is that the user should not be able to get to the pdf unless
they have been authenticated (in Lasso).

Any suggestions?


Regards

George Pitcher

Technical Manager
HERON Project
Napier University
Edinburgh EH10 5DT

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Work: www.heron.ac.uk
Play  : www.pingu.napier.ac.uk


   programmer -  A device for transmuting caffeine into code.





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


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




Re: [PHP] ordering a query

2001-09-07 Thread George Pitcher

It is simply ordering them as type data rather than as type integer. Change
your data type in the db.

George, a newbie
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 9:16 AM
Subject: [PHP] ordering a query


Me again :)

I have a query that orders by id#, the problem is I have 17 items and I get
an output like so: 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9

So it thinks 1 and 10 are the same, and it thinks 11 is less than 2 and so
on and so forth. Remedy please? (I'd rather not rename the items 01, 02, 03,
04, etc.)

Thanks again.

Nate



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


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




Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread George Pitcher

Andrew,

I am in a similar position witha Lasso site, which I am considering php-ing.
I need to do conditional redirects.

George P, Edinburgh

- Original Message -
From: "Andrew Penniman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 3:37 PM
Subject: [PHP] PHP Redirect in the middle of code?


> I am trying to figure out how to use PHP to redirect the user to a new
> location *after* processing and most likely outputting a bunch of code.
> Because this redirection would happen late in the game I can't use
> header("Location: ".$redirect_to);
>
> I come from a ColdFusion background and am used to CFAS' 
> tag.  Does PHP have an equivalent function?
>
> I am really hoping not to use JavaScript, I want this redirection to
> happen at the server and not the client.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] PHP and IIS4

2001-09-10 Thread George Pitcher

Yes, it will. But try not to mix and match.

George
- Original Message - 
From: "pong-TC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 3:53 PM
Subject: [PHP] PHP and IIS4


> Hello All
> 
> I am using ASP on IIS4, and interested in PHP.  I would like to know that
> if I install PHP on IIS4, can I still use ASP as well?
> 
> Thank you.
> Pong
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] NT?

2001-09-10 Thread George Pitcher

I've got PHP running under 3 environments (sort of).

LinuxPPC(Mac) with Apache and MySQL
NT with IIS4 and Lasso/Filemaker (not quite working yet)
NT with Apache and MySQL.

Installation was very easy.

George P in Edinburgh
- Original Message -
From: "nayco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 5:47 PM
Subject: Re: [PHP] NT?


> I don't think that will be a problem : try zend.com 'apache + php4' >
go
> and see http://zend.com
>
> Anyone tried under NT ???
>
> I won't say : 'try Linux' 
>
> (°-Nayco,
> //\[EMAIL PROTECTED]
> v_/_ http://nayco.free.fr
>
>
> - Original Message -
> From: Jeremy Morano <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 10, 2001 6:26 PM
> Subject: [PHP] NT?
>
>
> > Hello,
> > Sorry to bother everyone. I was just wondering if php runs on NT?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




[PHP] Accessing pdf file thru php

2001-09-12 Thread George Pitcher

Hi all,

I'm trying to build php into an existing solution which uses Lasso.

I have tested the passing of data from Lasso to php and that works fine.

I want Lasso to pass the filename over to a php page and for that page to
grab the file from a folder outside of the webroot and push it out to the
user, at the same time as presenting them with a confirmation form so that
downloading can be confirmed.

I have tried the following code without any good results:



I get a parse error on the line that calls the header.

Can anyone help me with this please?

Regards

George Pitcher

Technical Manager
HERON Project
Napier University
Edinburgh EH10 5DT

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.heron.ac.uk

   programmer -  A device for transmuting caffeine into code.




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


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




Re: [PHP] Accessing pdf file thru php

2001-09-12 Thread George Pitcher

Brad,

Thanks for that pointer.

However, with that implemented, all I get is the PDF coding dumped onto the
screen - no pdf file downloaded!

Any further suggestions. I feel as though I'm getting there . . . slowly.

George

- Original Message -
From: "Brad S. Jackson" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>
Sent: Wednesday, September 12, 2001 2:52 PM
Subject: Re: [PHP] Accessing pdf file thru php


>
>
> You should call header() for each header line.  And you should only send
one
> content type header.
>
> header("Content-type: application/pdf");
> header("Content-Disposition: inline;
filename=D:\\Pdf\\0226138097(57-77).pdf");
> header("Content-Length: $len");
>
>
> "George Pitcher" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm trying to build php into an existing solution which uses Lasso.
>
> I have tested the passing of data from Lasso to php and that works fine.
>
> I want Lasso to pass the filename over to a php page and for that page to
> grab the file from a folder outside of the webroot and push it out to the
> user, at the same time as presenting them with a confirmation form so that
> downloading can be confirmed.
>
> I have tried the following code without any good results:
>
>  $filename="D:\\Pdf\\0226138097(57-77).pdf";
> $len = filesize($filename);
> $header="
> Content-type: application/pdf
> Content-type: application/x-octet-stream
> Content-Disposition: inline; filename=D:\\Pdf\\0226138097(57-77).pdf
> Content-Length: $len";
> header=($header);
> readfile($filename);
> ?>
>
> I get a parse error on the line that calls the header.
>
> Can anyone help me with this please?
>
> Regards
>
> George Pitcher
>
> Technical Manager
> HERON Project
> Napier University
> Edinburgh EH10 5DT
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
> http://www.heron.ac.uk
> 
>programmer -  A device for transmuting caffeine into code.
> 
>


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


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




[PHP] sending PDF to the user (www)

2001-09-13 Thread George Pitcher

Hi all,

 I am using Lasso to authenticate user access to PDF files with the actual
delivery being handled by PHP.

I can download the PDF by clicking a 'submit' button. However, in IE or
Netscape, it puts it into the browser with the name of the php script as the
filename. I would like the filename to be the one the file lives with
normally. Can this be done?

Also, I would like it to be downloaded to the user's computer without
opening in the browser. Any suggestions.

My coding in php is:



Any suggestions?

George Pitcher
Edinburgh


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


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




[PHP] another easy cookie question

2001-09-14 Thread George Pitcher

Hi all,

This is what I have at the top of my php page (php-4.0.6-winNT).




Untitled Document



I get the following error.

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers.  The headers it did return are:

... and nothing else!

Where am I going wrong? I bet it's a simple answer.

George P in Edinburgh





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


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




Re: [PHP] another easy cookie question

2001-09-14 Thread George Pitcher

Kelly,

Thanks for the tip but having re-arranged my code I still get the same
message.

New coding =




Untitled Document




Any suggestions?

George

- Original Message -
From: "Kelly Barrett" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 11:31 AM
Subject: Re: [PHP] another easy cookie question


> Hi George,
> You must output all headers (including cookies) before you output any
> content.
>
> So, you just need to move your header and setcookie calls so they are
above
> the  and  tags.
>
> e.g.
>header("Location:index.php");
>  setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789")
>  time()+3600);
>  ?>
>  
>  
>
>
> Cheers,
> Kelly.
>
> > Hi all,
> >
> > This is what I have at the top of my php page (php-4.0.6-winNT).
> >
> > 
> > 
> >  > header("Location:index.php");
> > setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789")
> > time()+3600);
> > ?>
> > Untitled Document
> > 
> > 
> >
> > I get the following error.
> >
> > CGI Error
> > The specified CGI application misbehaved by not returning a complete set
> of
> > HTTP headers.  The headers it did return are:
> >
> > ... and nothing else!
> >
> > Where am I going wrong? I bet it's a simple answer.
> >
> > George P in Edinburgh
> >
> >
> >
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] another easy cookie question

2001-09-14 Thread George Pitcher

No, absolutely nothing.

George
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 11:34 AM
Subject: Re: [PHP] another easy cookie question


> Do you have any white spaces or carriage returns before your headers? If
so
> get rid of them.
>
> - Original Message -
> From: "George Pitcher" <[EMAIL PROTECTED]>
> To: "Kelly Barrett" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> Sent: Friday, September 14, 2001 3:21 AM
> Subject: Re: [PHP] another easy cookie question
>
>
> > Kelly,
> >
> > Thanks for the tip but having re-arranged my code I still get the same
> > message.
> >
> > New coding =
> >
> >  > header("Location:index.php");
> > setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789",
> > time()+3600);
> > ?>
> > 
> > 
> > Untitled Document
> > 
> > 
> >
> >
> > Any suggestions?
> >
> > George
> >
> > - Original Message -
> > From: "Kelly Barrett" <[EMAIL PROTECTED]>
> > To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Friday, September 14, 2001 11:31 AM
> > Subject: Re: [PHP] another easy cookie question
> >
> >
> > > Hi George,
> > > You must output all headers (including cookies) before you output any
> > > content.
> > >
> > > So, you just need to move your header and setcookie calls so they are
> > above
> > > the  and  tags.
> > >
> > > e.g.
> > >   > >  header("Location:index.php");
> > >  setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789")
> > >  time()+3600);
> > >  ?>
> > >  
> > >  
> > >
> > >
> > > Cheers,
> > > Kelly.
> > >
> > > > Hi all,
> > > >
> > > > This is what I have at the top of my php page (php-4.0.6-winNT).
> > > >
> > > > 
> > > > 
> > > >  > > > header("Location:index.php");
> > > > setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789")
> > > > time()+3600);
> > > > ?>
> > > > Untitled Document
> > > > 
> > > > 
> > > >
> > > > I get the following error.
> > > >
> > > > CGI Error
> > > > The specified CGI application misbehaved by not returning a complete
> set
> > > of
> > > > HTTP headers.  The headers it did return are:
> > > >
> > > > ... and nothing else!
> > > >
> > > > Where am I going wrong? I bet it's a simple answer.
> > > >
> > > > George P in Edinburgh
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _
> > > > Do You Yahoo!?
> > > > Get your free @yahoo.com address at http://mail.yahoo.com
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] another easy cookie question - SOLVED

2001-09-21 Thread George Pitcher

Hi all,

I solved my Cookie problem by making it simple:

On cookietest.php I have:



and on cookietest.lasso I have

Display Cookie:
[Cookie:'Cookievalue']

and the cookie is displayed properly.

This will allow me to integrate Lasso and PHP together and be able to pass
data between them using cookies.

I am already using PHP to download PDF files in a Lasso solution.

If and when I become proficient, I'll rebuild my solution in php. It's using
a 12-db Filemaker system as the database and I don't really want to change
that as its just s easy for the clients to use.

Thanks for everyone's suggestions.

George, in Edinburgh



- Original Message -
From: "Richard Baskett" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 7:04 PM
Subject: Re: [PHP] another easy cookie question


> The way I see it is that your script never has a chance to set the cookie
> plus you can not send headers after html, one other thing is that you have
a
> ")" at the end of your setcookie function value so if you reformatted it
> this way:
>
>setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789",
> time()+3600);
>   header("Location: index.php");
>   exit;
> ?>
>
> 
> 
> Untitled Document
> 
> 
>
> What that will do is as soon as it comes to the page it will set a cookie
> and then take you to index.php.  You do not need to use the full URL in
the
> Location.  Plus I have had nothing but trouble with the setcookie function
> so I just send the header setcookie instead, for example I use this code:
>
> header("Set-Cookie: $CookieName=$CookieValue; path=/;
expires=$expireDate");
>
> Make sure expire is in this format and it'll work on all browsers:
>
> $expireDate  = gmdate("l, d-M-");
> $expireDate .= gmdate("Y")+1;
> $expireDate .= gmdate(" H:i:s")." GMT";
>
> this sets the expiration date for one year.
>
> All in all your new code would look like:
>
>$expireDate  = gmdate("l, d-M-");
>   $expireDate .= gmdate("Y")+1;
>   $expireDate .= gmdate(" H:i:s")." GMT";
> header("Set-Cookie: $CookieName=$CookieValue; path=/;
expires=$expireDate");
> header("Location: index.php");
> exit;
> ?>
>
> 
> 
> Untitled Document
> 
> 
>
>
> > 
> > 
> >  > header("Location:index.php");
> > setcookie("Cookievalue", "abcdefghijklmnopqrstuvwxyz0123456789")
> > time()+3600);
> > ?>
> > Untitled Document
> > 
> > 
> >
> > I get the following error.
> >
> > CGI Error
> > The specified CGI application misbehaved by not returning a complete set
> of
> > HTTP headers.  The headers it did return are:
> >
> > ... and nothing else!
> >
> > Where am I going wrong? I bet it's a simple answer.
> >
> > George P in Edinburgh
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] WEB LOG

2001-09-24 Thread George Pitcher

Hi all,

I'm new to php but I would look at the concept of setting a cookie on the
log-in page and then testing for that cookie on the http://therealsite page
and redirecting failues accordingly. In fact that could be set into every
page to make sure that people have to go thru the log-in page. You still
check for the password though.

George, a php newbie

- Original Message -
From: "Andreas Gietl" <[EMAIL PROTECTED]>
To: "Jeffrey Paul" <[EMAIL PROTECTED]>; "Chris Herring"
<[EMAIL PROTECTED]>; "php list" <[EMAIL PROTECTED]>
Sent: Monday, September 24, 2001 3:09 PM
Subject: Re: [PHP] WEB LOG


> On Monday 24 September 2001 16:04, Jeffrey Paul wrote:
>
> Well. If you check the HTTP_REFERER on the target-site it would work and
give
> you at least some "security". However it is still not really secure.
>
>
>
> > At 07:08 AM 9/24/2001, Chris Herring wrote:
> > >OOPS, again, elseif isn't what needs to be done.
> > >
> > >Ok, here we go.
> > >
> > >if $pwd == $real_pwd {
> > >header ("Location: http://therealsite";);
> > >} else {
> > >header ("Location: http://badsite";);
> > >}
> >
> > For the record, that won't stop someone from going to the destination
page
> > if the password doesn't match, which is what the person asked about.
All
> > this will do is send them a redirect to an error page if the password
> > doesn't match, it doesn't prevent anyone at all from hitting, in your
> > example, http://therealsite.
> >
> > -j
> >
> >
> > 
> > Jeffrey Paul  [EMAIL PROTECTED]  (877) 748 3467
> > ICQ: 14295546 AIM: kw34hd1 NXTL/DC: 130*21*16749
> > PGP: 0xF50BB9D7 A21AFD828C30EC77545DA0B3F501F50BB9D7
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




[PHP] Building Dynamic Value list using ohp

2001-09-26 Thread George Pitcher

Hi all,

I'm having a problem with dynamically building a value list.

My code:

$row[0]");
   }
 }
?>

But this generates:

"Parse error:  parse error in c:\program files\apache
group\apache\htdocs\bizflyers\login.php on line 22"

Any suggestions?

Regards

George


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


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




Re: [PHP] Building Dynamic Value list using ohp

2001-09-26 Thread George Pitcher

Thanks Gottfried, but that doesn't change the response I get.

Any more suggestions.

George P in Edinburgh

PS I am hoping to come over to Frankfurt for the conference in November
(boss might pay)

- Original Message -
From: <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 2:46 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


> hi!
>
> try:
>
> $query = "select HEI from heronuser"; // line 22
>
> greetinx!
> gottfried
>
> > Hi all,
> >
> > I'm having a problem with dynamically building a value list.
> >
> > My code:
> >
> >  > mysql_connect ('localhost', 'root', 'monty');
> > mysql_select_db ('Heronsql');
> >$query = ("select HEI from heronuser"); // LINE 22 on original script
> >$result = mysql_query($query, $mysql_link);
> >  if(mysql_num_rows($result)) {
> >// show all HEIs as options in select form
> >while($row = mysql_fetch_row($result))
> >{
> >   print("$row[0]");
> >}
> >  }
> > ?>
> >
> > But this generates:
> >
> > "Parse error:  parse error in c:\program files\apache
> > group\apache\htdocs\bizflyers\login.php on line 22"
> >
> > Any suggestions?
> >
> > Regards
> >
> > George
> >
> >
> > _
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net


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


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




Re: [PHP] Building Dynamic Value list using ohp

2001-09-26 Thread George Pitcher

Thanks for everyone's help but this is still failing to work.

Revised code is:

{$row[0]}");
   }
 }
mysql_close($link);
?>

Any more suggestions (please)?

George
- Original Message -
From: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>
To: "'George Pitcher'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 3:17 PM
Subject: RE: [PHP] Building Dynamic Value list using ohp



1. this:
print("$row[0]");
 should be this:
print("{$row[0]}");
 or like this:
echo ''.$row[0].'');

The reason for it is that within double quote you can parse for 'simple'
variables only (es: $var, not $var[]). Otherwise it gives you a parse
error.

2. this:
mysql_connect ('localhost', 'root', 'monty');
 better be this:
mysql_connect ('localhost', '', ''); // for security
reasons obviously, you don't wanna give the password our to the group,
even so it is your local server (you might not be original with the
password on production machines, no?)


Hope it helps,
Maxim Maletsky

PHPBeginner.com




-Original Message-
From: George Pitcher [mailto:[EMAIL PROTECTED]]
Sent: mercoledì 26 settembre 2001 15.31
To: [EMAIL PROTECTED]
Subject: [PHP] Building Dynamic Value list using ohp


Hi all,

I'm having a problem with dynamically building a value list.

My code:

$row[0]");
   }
 }
?>

But this generates:

"Parse error:  parse error in c:\program files\apache
group\apache\htdocs\bizflyers\login.php on line 22"

Any suggestions?

Regards

George



_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com




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



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


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


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




Re: [PHP] Building Dynamic Value list using ohp

2001-09-26 Thread George Pitcher

Sheridan,

I added the error stuff (adding an else bit) but when I went to my browser,
I got the same resulting error I've always had.

I have tried pasting the select statement striaght into MySQL_Front and I
get my nice neat list. So it doen't look like a SQL problem.

Head banging off wall right now.

George

- Original Message -
From: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 4:00 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


> - Original Message -
> From: "George Pitcher" <[EMAIL PROTECTED]>
> To: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, September 26, 2001 9:42 AM
> Subject: Re: [PHP] Building Dynamic Value list using ohp
>
>
> > Thanks for everyone's help but this is still failing to work.
> >
> > Revised code is:
> >
> >  > $link = mysql_connect ('localhost', '', '')
> >or die ("Could not select db");
> > mysql_select_db ('Heronsql')
> >or die ("Could not connect");
> > $query="select distinct HEI from heronuser";
> >$result = mysql_query ($query); // I've also tried with ($query,
$link)
> >  if(mysql_num_rows($result)) {
> >// show all HEIs as options in select form
> >while($row = mysql_fetch_row($result))
> >{
> >   print("{$row[0]}");
> >}
> >  }
> > mysql_close($link);
> > ?>
> >
> > Any more suggestions (please)?
> >
> > George
>
> I don't see anything glaringly wrong with your code.
> I would change this:
>
> $result = mysql_query ($query)
>
> into:
>
> if( !($result = mysql_query ($query)) )
>   echo "Error: " . mysql_error() . "";
>
> as I find that most of my errors in something this simple
> are in something fairly simple with the query itself (misspelled
> table or something).
>
> also make sure that if you copy your query and paste it directly
> into MySQL that it works.
>
> Sheridan Saint-Michel
> Website Administrator
> FoxJet, an ITW Company
> www.foxjet.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




Re: [PHP] Building Dynamic Value list using php [SOLVED]

2001-09-26 Thread George Pitcher

Derek,

That worked a treat - not to try and get the flatness out of my head - that
wall was hard!

What still has me stumped is that as far as the query-building goes, both
methods are pretty much the same yet yours doesn't generate the error yet
mine does

Prepare yourselves as this is the login page to a system which at present
runs to 45 pages of Lasso?Filemaker coding which I'm hoping to convert to
PHP/MySQL (or MS-SQL as we have that and DB2 too).

Thanks again

George
- Original Message -
From: "Derek Mailer" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 4:14 PM
Subject: Re: [PHP] Building Dynamic Value list using ohp


> what's the error you're getting now?
>
> if you aren't getting any error, but it just isn't working try something
> like...(note that I haven't tested this code).
>
>  $drop_down_list = "";
>
> $link = mysql_connect ('localhost', '', '')
> or die ("Could not select db");
> mysql_select_db ('Heronsql')
> or die ("Could not connect");
> $query="select distinct HEI from heronuser";
> $result = mysql_query ($query);
> $num = mysql_num_rows($result);
> for ($i = 0; $i < $num; $i++) {
> $HEI = mysql_result($result, $i, "HEI");
> $drop_down_list .= "$HEI";
> }
> mysql_close($link);
>
> $drop_down_list .= "";
>
> echo "$drop_down_list";
>
>
> Cheers the noo,
>
> Derek
>
> - Original Message -
> From: "George Pitcher" <[EMAIL PROTECTED]>
> To: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, September 26, 2001 3:42 PM
> Subject: Re: [PHP] Building Dynamic Value list using ohp
>
>
> > Thanks for everyone's help but this is still failing to work.
> >
> > Revised code is:
> >
> >  > $link = mysql_connect ('localhost', '', '')
> >or die ("Could not select db");
> > mysql_select_db ('Heronsql')
> >or die ("Could not connect");
> > $query="select distinct HEI from heronuser";
> >$result = mysql_query ($query); // I've also tried with ($query,
$link)
> >  if(mysql_num_rows($result)) {
> >// show all HEIs as options in select form
> >while($row = mysql_fetch_row($result))
> >{
> >   print("{$row[0]}");
> >}
> >  }
> > mysql_close($link);
> > ?>
> >
> > Any more suggestions (please)?
> >
> > George
> > - Original Message -
> > From: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>
> > To: "'George Pitcher'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, September 26, 2001 3:17 PM
> > Subject: RE: [PHP] Building Dynamic Value list using ohp
> >
> >
> >
> > 1. this:
> > print("$row[0]");
> >  should be this:
> > print("{$row[0]}");
> >  or like this:
> > echo ''.$row[0].'');
> >
> > The reason for it is that within double quote you can parse for 'simple'
> > variables only (es: $var, not $var[]). Otherwise it gives you a parse
> > error.
> >
> > 2. this:
> > mysql_connect ('localhost', 'root', 'monty');
> >  better be this:
> > mysql_connect ('localhost', '', ''); // for security
> > reasons obviously, you don't wanna give the password our to the group,
> > even so it is your local server (you might not be original with the
> > password on production machines, no?)
> >
> >
> > Hope it helps,
> > Maxim Maletsky
> >
> > PHPBeginner.com
> >
> >
> >
> >
> > -Original Message-
> > From: George Pitcher [mailto:[EMAIL PROTECTED]]
> > Sent: mercoledì 26 settembre 2001 15.31
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Building Dynamic Value list using ohp
> >
> >
> > Hi all,
> >
> > I'm having a problem with dynamically building a value list.
> >
> > My code:
> >
> >  > mysql_connect ('localhost', 'root', 'monty');
> > mysql_select_db ('Heronsql');
> >$query = ("select HEI from heronuser"); // LINE 22 on origi

Re: [PHP] php and java problem

2001-10-01 Thread George Pitcher

Nikola,

I'm not a javascript user and new to php too.

Is it possible to form your javascript result into a 'hidden' form value.
That could then be read by the next php page.

HTH

George
- Original Message -
From: "Nikola Veber" <[EMAIL PROTECTED]>
To: "php forum" <[EMAIL PROTECTED]>
Sent: Sunday, September 30, 2001 10:36 PM
Subject: [PHP] php and java problem


> Hi !
>
> I was able to determine the user's screen resolution, but I'd like to let
php know
> that(the next page loaded should be in
> the right resolution, I'd like to pass a value to php, but I don't know
how).
>
> Thanx
> Nikola
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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


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




[PHP] running exec() on client

2007-01-16 Thread George Pitcher
Hi,

I am looking for a solution to a server problem. I am part of a 2-person
team - I look after document scanning, OCR (by outside agencies) as well as
all development.

My colleague is responsible for obtaining copyright permission from
publishers (for what I do). Part of her process is sending emails to
publishers with Word attachments. These are presently being generated by PHP
on our NT server,but recently the process has started to slow down the
server to the point of uselessness.

I'm looking for an alternative way to do this. My colleague has rejected
text file attachments as looking unprofessional. I would like to find a way
of generating these files without actually needing to use COM, or winword on
the server. We looked at RTF templates but found the filesize too great.

One option I am considering is installing PHP on her PC and doing the letter
generation locally, but don't know how I'm going to trigger it esp as our IT
person has said I can't install Apache.

Doe anyone have any suggestions?


Cheers

George, an Englishman abroad in sunny Edinburgh

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



RE: [PHP] running exec() on client

2007-01-16 Thread George Pitcher
Miguel,
>
> You do not need to have apache installed to run PHP you just need
> PHP-CLI (Command Line Interface)
>
Yes, I do know that, but what I want is for my colleague to follow a link on
her web page that will trigger the php command, passing any required
parameters.

Cheers

George

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



RE: [PHP] running exec() on client

2007-01-16 Thread George Pitcher
Jochem,

> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: 16 January 2007 3:31 pm
> To: George Pitcher
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] running exec() on client
>
>
> George Pitcher wrote:
> > Hi,
> >
> > I am looking for a solution to a server problem. I am part of a 2-person
> > team - I look after document scanning, OCR (by outside
> agencies) as well as
> > all development.
> >
> > My colleague is responsible for obtaining copyright permission from
> > publishers (for what I do). Part of her process is sending emails to
> > publishers with Word attachments. These are presently being
> generated by PHP
> > on our NT server,but recently the process has started to slow down the
> > server to the point of uselessness.
>
> why is it slowing down? is this down to other work the server is doing?
> are the files being generated becoming 'heavier'? (it's a have your cake
> or eat it kind of situation, no?)

The other wor being done is requests for the documents being made by our
clients (universities), file upload (usually large tiff files) and file
download (usually small text-PDFs). We only have 80 clients so I would have
thought the server should cope.
>
> isn't it cheaper to install a dedicated server for your app?
> (rather than making you jump thru hoops, I mean AFAICT this is
> a core business activity.) an entry level windows server will set you
> back for the price of a few days work - seems to me to be a much more
> cost effective attack plan.
>
Unfortunately my bosses are pennypinching when it comes to these things,
though I will be asking - just in case.

> >
> > I'm looking for an alternative way to do this. My colleague has rejected
> > text file attachments as looking unprofessional. I would like
> to find a way
> > of generating these files without actually needing to use COM,
> or winword on
> > the server. We looked at RTF templates but found the filesize too great.
> >
> > One option I am considering is installing PHP on her PC and
> doing the letter
> > generation locally, but don't know how I'm going to trigger it
> esp as our IT
> > person has said I can't install Apache.
>
> what he allows and what you can actually do are 2 different thing. ;-)
>
Alas, my colleague often needs IT help, and the tecchie is 6 feet away
(literally), whereas I am 380 miles away, so any underhand activity by me is
bound to be noticed.

Cheers

George

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



RE: [PHP] running exec() on client

2007-01-16 Thread George Pitcher
Roman,

> -Original Message-
> From: Roman Neuhauser [mailto:[EMAIL PROTECTED]
> Sent: 16 January 2007 4:53 pm
> To: George Pitcher
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] running exec() on client
> 
> 
> # [EMAIL PROTECTED] / 2007-01-16 15:18:50 -:
> > > You do not need to have apache installed to run PHP you just need
> > > PHP-CLI (Command Line Interface)
> >
> > Yes, I do know that, but what I want is for my colleague to follow a
> > link on her web page that will trigger the php command, passing any
> > required parameters.
> 
> You probably don't want to do that, at least not when you can't install
> a web server.  Or was that ban Apache-specific?
> 
> 1. Modify the PHP script to use $argv instead of $_GET/$_POST.
> 2. Install the CLI SAPI.
> 3. Write a small dialogue that prompts for whatever arguments using any
>of the languages available on Windows (Python would be ok) and start
>your PHP script from that, $argv populated from the form.
> 
> Your colleague will see a usual buttons-sweet-buttons GUI application,
> you will be able to reuse the PHP script.
> 
> -- 
> How many Vietnam vets does it take to screw in a light bulb?
> You don't know, man.  You don't KNOW.
> Cause you weren't THERE. http://bash.org/?255991
> 
I think it was any web server.

Thanks for the suggestion - I'll have a look at that.

Cheers

George

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



RE: [PHP] running exec() on client

2007-01-16 Thread George Pitcher


> I'm guessing a bit but it sounds like inserting a stack of RAM will make
> the problem go away for the foreseable future.
>
I will ask.

> >> isn't it cheaper to install a dedicated server for your app?
> >> (rather than making you jump thru hoops, I mean AFAICT this is
> >> a core business activity.) an entry level windows server will set you
> >> back for the price of a few days work - seems to me to be a much more
> >> cost effective attack plan.
> >>
> > Unfortunately my bosses are pennypinching when it comes to these things,
> > though I will be asking - just in case.
>
> in which case he should understand that RAM is *a lot* cheaper
> than the days
> of work your going to be doing (on top of your normal activities), no?
>
> >
> >>> I'm looking for an alternative way to do this. My colleague
> has rejected
> >>> text file attachments as looking unprofessional. I would like
> >> to find a way
> >>> of generating these files without actually needing to use COM,
> >> or winword on
> >>> the server. We looked at RTF templates but found the filesize
> too great.
>
> what about PDF generation? no need for COM, should give you nice
> compact file
> sizes (as well as readonly docs) ... downside is the ammount of
> coding it would take
> ... then again your average penny-wise, pound-foolish PHB will
> probably see it as a
> cheaper alternative.
>
I do a lot of PDF building and that was my first suggestion, before we
looked at Word. My colleague rejected this on the grounds that publishers
wouldn't know what to do with them!

I think she is wrong. But I yielded on this point. You know what female
colleagues are like? (To any females on this list - you are all wonderful
people.)

> >>>
> >>> One option I am considering is installing PHP on her PC and
> >> doing the letter
> >>> generation locally, but don't know how I'm going to trigger it
> >> esp as our IT
> >>> person has said I can't install Apache.
> >> what he allows and what you can actually do are 2 different thing. ;-)
> >>
> > Alas, my colleague often needs IT help, and the tecchie is 6 feet away
> > (literally), whereas I am 380 miles away, so any underhand
> activity by me is
> > bound to be noticed.
> >
Cheers

George

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



[PHP] WinSCP and PHP

2007-02-08 Thread George Pitcher
Hi,

I run specialised websites on my NT server on behalf of some universities.
These sites offer processes to librarians (mainly) enabling them to order
services from my company as well as doing some processes themselves. The
processes involve handling PDF files, and I've done all the
PDF-building-scripts etc that they need.

I would now like to extend the services, allowing users more interactivity
with their own filesystems - checking that PDFs are in the right place,
being able to put them in the right place and removing them when the
licencing says they must be removed - etc etc.

By testing, I know that I can do this using PHP's ftp functions, but when I
visited one of my main customers recently, they said they would prefer me to
use SCP. I've found WinSCP (as it will need to run on the NT box) but am
stumped as to how I can use it with PHP to offer equivalent (or even close)
functionality to PHP's ftp function.

Does anyone have any experience of using SCP/WinSCP as part of a PHP
application, and if so, could they help me on to the next stage please?


Cheers

George in Edinburgh

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



RE: [PHP] WinSCP and PHP

2007-02-08 Thread George Pitcher
Edward,

Thanks. This has pointed me towards ssh2_sftp, new negotiations with
customer ahead.

Cheers

George

> -Original Message-
> From: Edward Kay [mailto:[EMAIL PROTECTED]
> Sent: 8 February 2007 11:45 am
> To: George Pitcher; PHP General List
> Subject: RE: [PHP] WinSCP and PHP
>
>
> What about the secure shell2 functions?:
> http://uk.php.net/manual/en/ref.ssh2.php
>
> I haven't used them myself but these two functions sound like the could be
> useful:
>
> ssh2_scp_recv — Request a file via SCP
> ssh2_scp_send — Send a file via SCP
>
> Edward
>
> > -Original Message-
> > From: George Pitcher [mailto:[EMAIL PROTECTED]
> > Sent: 08 February 2007 11:30
> > To: php-general@lists.php.net
> > Subject: [PHP] WinSCP and PHP
> >
> >
> > Hi,
> >
> > I run specialised websites on my NT server on behalf of some
> universities.
> > These sites offer processes to librarians (mainly) enabling
> them to order
> > services from my company as well as doing some processes themselves. The
> > processes involve handling PDF files, and I've done all the
> > PDF-building-scripts etc that they need.
> >
> > I would now like to extend the services, allowing users more
> interactivity
> > with their own filesystems - checking that PDFs are in the right place,
> > being able to put them in the right place and removing them when the
> > licencing says they must be removed - etc etc.
> >
> > By testing, I know that I can do this using PHP's ftp functions,
> > but when I
> > visited one of my main customers recently, they said they would
> > prefer me to
> > use SCP. I've found WinSCP (as it will need to run on the NT box) but am
> > stumped as to how I can use it with PHP to offer equivalent (or
> > even close)
> > functionality to PHP's ftp function.
> >
> > Does anyone have any experience of using SCP/WinSCP as part of a PHP
> > application, and if so, could they help me on to the next stage please?
> >
> >
> > Cheers
> >
> > George in Edinburgh
> >
> > --
> > 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] problem generating a file link

2007-03-05 Thread George Pitcher
Jochem,

> > I have tried variations on the following:
> >
> > $storelink = " > target=\"_blank\">PDF";
> >
> > and the link keeps coming out as:
> >
> > file:///G:/575991.pdf
>
> is that what the browser (let me guess: IE) is interpreting
> the link as or is that what is literally in the html source?
>
I'm using Smarty so the link doesn't appear as HTML as such. This is what
the browser (guessed wrong - I'm using Firefox) shows in the status bar.

George

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



[PHP] problem generating a file link

2007-03-05 Thread George Pitcher
Hi,

I have a web page that only I see, and I want to link to a PDF file on a
mapped drive so that it will open in Acrobat.

I have tried variations on the following:

$storelink = "PDF";

and the link keeps coming out as:

file:///G:/575991.pdf

So I have 3 x '/' and a '/' where I want a '\'.

Can anyone tell me how to code this to get it right?

MTIA

Cheers

George

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



RE: [PHP] problem generating a file link

2007-03-05 Thread George Pitcher
Jochem,

> > This is what
> > the browser (guessed wrong - I'm using Firefox) shows in the status bar.
>
> ok, right - so what does the html source actually contain?
>
PDF

> I'm assuming that the way firefox is interpreting the link makes
> it not work?
> does the link work in IE?
>
I get exactly the same in IE6. Source is good, link is bad.

Cheers

George

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



RE: [PHP] problem generating a file link

2007-03-05 Thread George Pitcher
> Jochem,
> > 
> >>> This is what
> >>> the browser (guessed wrong - I'm using Firefox) shows in the 
> status bar.
> >> ok, right - so what does the html source actually contain?
> >>
> > PDF
> 
> so what happens when you make it like so:
> 
> PDF
> 
> ?

No change. 

George

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



[PHP] SOAP problem

2012-09-25 Thread George Pitcher
Hi,

My first post for several years. Using PHP 5.2.6 on Debian.

I'm trying to connect to an external SOAP server where no WSDL file exists. 
I've been unsuccessful in getting a response which I've put down to the message 
being sent.

My code is:

$params = array(
'RequestSystem'  => 
'PackTrackerTest',
'SenderName'   => 'George',
'MessageId'=> '1234'
 );
$client = new SoapClient(null, array(
'soap_version' => 'SOAP_1_2',
'location' => "XX",
'uri'  => "XX",
'trace'=> TRUE, ));
$result = 
$client->__soapCall("GetReferenceData",array("GetReferenceData"=>$params));

Which generates the following message:


http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="http://"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:ns2="http://xml.apache.org/xml-soap"; 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>





RequestSystem

PackTrackerTest



SenderName

George



MessageId

1234






The SOAP server is expecting to get something like:

http://www.w3.org/2003/05/soap-envelope"; 
xmlns:v1="">


 
  
 PackTrackerTest 

   George 

1024







Does anyone have any suggestions as to how I can format my xml message 
accordingly?

MTIA

George

The information in this message is intended solely for the addressee and should 
be considered confidential.  Publishing Technology does not accept legal 
responsibility for the contents of this message and any statements contained 
herein which do not relate to the official business of Publishing Technology 
are neither given nor endorsed by Publishing Technology and are those of the 
individual and not of Publishing Technology. This message has been scanned for 
viruses using the most current and reliable tools available and Publishing 
Technology excludes all liability related to any viruses that might exist in 
any attachment or which may have been acquired in transit.

[PHP] zipfile problems

2005-04-07 Thread George Pitcher
Hi,

My first posting for a long while.

If anyone is using the 'class.zipfile.php' library, can they help me. I am
trying to create some PDFs, then zip and email them back to me.

I get the zipfile but it only contains the first pdf file, even though 4 are
being created in my test site.

I am getting the following errors on my page:
=
Notice: Undefined variable: crc in C:\Program Files\Apache
Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 62
Notice: Undefined variable: c_len in C:\Program Files\Apache
Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 63
Notice: Undefined variable: unc_len in C:\Program Files\Apache
Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 64
=

I've looked on the web and can't find any decent documentation for this
class.

Can anyone help me get round this problem?

For info, my server is NT4 and I'm using PHP 5.0.2.

George

===

George Pitcher
HERON Technical Manager
Ingenta plc
23-38 Hythe Bridge Street, Oxford, OX1 2ET
T +44 (0)1865 799051 direct
T +44 (0)1865 799000 switchboard
F +44 (0)1865 799134
E [EMAIL PROTECTED]

www.ingenta.com

Ingenta: Technology + Services for the Publishing and Information Industries

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



RE: [PHP] zipfile problems

2005-04-07 Thread George Pitcher
Ken,

Thanks, but I did explain the problem. The zipfile contains only one of the
pdf files instead of the four that the script creates:

The actual script looks like this (just the zip bit):
==
$zipfile = new zipfile();
$zipfile -> add_dir("dir/");
$inputpath = "C:\\Program Files\\Apache
Group\\Apache2\\htdocs\\egretgui\\includes\\invoices\\";
$outputpath = "C:\\";
$outfile = $outputpath."inv_".date("Y_m").".zip";
if ($handle = opendir($inputpath)) {
while (false !== ($file = readdir($handle))){
$fn = explode(".",$file);
if ($fn[1]=="pdf"){
echo $inputpath.$file."";
$handle = fopen($inputpath.$file,"r");
$filedata = fread($handle, filesize($inputpath.$file));
$zipfile -> add_file($filedata, "dir/".$file);
}
}
}
$fd = fopen ($outfile, "wb");
$out = fwrite ($fd, $zipfile -> file());
fclose ($fd);
========

George


> -Original Message-
> From: Ken [mailto:[EMAIL PROTECTED]
> Sent: 7 April 2005 1:04 pm
> To: George Pitcher; php-general@lists.php.net
> Subject: Re: [PHP] zipfile problems
>
>
> On Apr 7, 2005 1:54 PM, George Pitcher <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > My first posting for a long while.
> >
> > If anyone is using the 'class.zipfile.php' library, can they
> help me. I am
> > trying to create some PDFs, then zip and email them back to me.
> >
> > I get the zipfile but it only contains the first pdf file, even
> though 4 are
> > being created in my test site.
> >
> > I am getting the following errors on my page:
> > =
> > Notice: Undefined variable: crc in C:\Program Files\Apache
> > Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 62
> > Notice: Undefined variable: c_len in C:\Program Files\Apache
> > Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 63
> > Notice: Undefined variable: unc_len in C:\Program Files\Apache
> > Group\Apache2\htdocs\egretgui\includes\class.zipfile.php on line 64
> > =
> >
> > I've looked on the web and can't find any decent documentation for this
> > class.
> >
> > Can anyone help me get round this problem?
> >
> > For info, my server is NT4 and I'm using PHP 5.0.2.
> >
> > George
> >
> > ===
> >
> > George Pitcher
> > HERON Technical Manager
> > Ingenta plc
> > 23-38 Hythe Bridge Street, Oxford, OX1 2ET
> > T +44 (0)1865 799051 direct
> > T +44 (0)1865 799000 switchboard
> > F +44 (0)1865 799134
> > E [EMAIL PROTECTED]
> >
> > www.ingenta.com
> >
> > Ingenta: Technology + Services for the Publishing and
> Information Industries
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> That's not really an error... that's just a notice... I think
> everything should be fine with the script.
>
> You might want to try turning off error_reporting in php.ini...
>
> Hope this helps...
>
> Ken
>

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



RE: [PHP] zipfile problems - SOLVED

2005-04-07 Thread George Pitcher
Hi all,

I found the cause of the problem.

01 $zipfile = new zipfile();
02 $zipfile -> add_dir("dir/");
03 $inputpath = "C:\\Program Files\\Apache
04 Group\\Apache2\\htdocs\\egretgui\\includes\\invoices\\";
05 $outputpath = "C:\\";
06 $outfile = $outputpath."inv_".date("Y_m").".zip";
07 if ($handle = opendir($inputpath)) {
08  while (false !== ($file = readdir($handle))){
09  $fn = explode(".",$file);
10  if ($fn[1]=="pdf"){
11  echo $inputpath.$file."";
12  $handle = fopen($inputpath.$file,"r");
13  $filedata = fread($handle, filesize($inputpath.$file));
14  $zipfile -> add_file($filedata, "dir/".$file);
15  }
16  }
17 }
18 $fd = fopen ($outfile, "wb");
19 $out = fwrite ($fd, $zipfile -> file());
10 fclose ($fd);

It was the re-use of the variable '$handle' on line 12. I've now changed
that (and its uses) to '$handle2' and the problem has been solved.

Thanks to all for their suggestions.

George in rainy Oxford

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



[PHP] Strange problem with DB queries

2005-05-02 Thread George Pitcher
Hi,

I am encountering a strange problem with a pop-up window. On my site, users
(very specialised, closed site with small numbers) have to click a link on
page x which pops up page y. Page x and y both contain pricing information
based on a functions.php include file. On page x, the data is being
displayed correctly. On page y, most of the data is not being displayed.

On page y, I've echoed the queries and they work fine when I paste them into
MySQLCC. However, if I do print_r($row), I get an ampty array. Echoing the
$result gives me Object id #3 (on page x this is Object id #6).

I have another popup window which is used to build xml output etc and the
queries (some using the same functions) seem to wortk there.

Any suggestions?

George

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



RE: [PHP] Strange problem with DB queries - MORE

2005-05-02 Thread George Pitcher
Sorry, I forgot to mention that I'm using PEAR::DB and Smarty, Server is
WinNT running Apache 2.0.52, and PHP 5.0.2. MySQL 4.0.5-beta-max-nt is
running on a separate server (NT also). All this is about 70 miles away and
I haven't seen the servers for over 3 years (oh how wonderful remote access
is!).


Cheers

> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED]
> Sent: 2 May 2005 12:07 pm
> To: php-general@lists.php.net
> Subject: [PHP] Strange problem with DB queries
>
>
> Hi,
>
> I am encountering a strange problem with a pop-up window. On my
> site, users
> (very specialised, closed site with small numbers) have to click a link on
> page x which pops up page y. Page x and y both contain pricing information
> based on a functions.php include file. On page x, the data is being
> displayed correctly. On page y, most of the data is not being displayed.
>
> On page y, I've echoed the queries and they work fine when I
> paste them into
> MySQLCC. However, if I do print_r($row), I get an ampty array. Echoing the
> $result gives me Object id #3 (on page x this is Object id #6).
>
> I have another popup window which is used to build xml output etc and the
> queries (some using the same functions) seem to wortk there.
>
> Any suggestions?
>
> George
>
> --
> 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] I'm having a blond moment with a while loop???

2005-05-08 Thread George Pitcher
Hi guys,

I'm doing something dumb but I can't see it.

The basic premise is:

sql search of orders sorted by customer
set g_customer_id to ''
loop through resultset
  if customer_id not same as last record's customer_id (g_customer_id)
get customer email details
set up message header if this is the first record for a customer
set item details
  else
set item details
set g_customer_id to customer_id
  endif
  send email
end loop

The problem is that as a sample I have two records from one demo customer
(me) and I can only get my email to handle one record - either sending
separate records for each record or one email covering the last record only

Its as if I should have another inner loop

Any tips

MTIA

George

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



RE: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread George Pitcher
Andy, and the others who have kindly responded,

I managed to get this sorted.

Ta

George

> -Original Message-
> From: Andy Pieters [mailto:[EMAIL PROTECTED]
> Sent: 8 May 2005 3:26 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] I'm having a blond moment with a while loop???
> 
> 
> On Sunday 08 May 2005 12:55, George Pitcher wrote:
> > Hi guys,
> >
> > I'm doing something dumb but I can't see it.
> >
> Actually you are doing many dumb things ;-)
> 
> Please post your real code instead of pseudo.  Then we'll have a 
> look.  And if 
> possible append a "describe table" so we can see how your table 
> looks like.
> 
> 
> Andy
> 
> -- 
> Registered Linux User Number 379093
> -- --BEGIN GEEK CODE BLOCK-
> Version: 3.1
> GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C$(+++) UL>$ P-(+)>++
> L+++>$ E---(-)@ W+++>+++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
> PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
> e>$@ h++(*) r-->++ y--()>
> -- ---END GEEK CODE BLOCK--
> --
> Check out these few php utilities that I released
>  under the GPL2 and that are meant for use with a 
>  php cli binary:
>  
>  http://www.vlaamse-kern.com/sas/
> --
> 
> --
> 
> -- 
> 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] pointing to localhost from remote server

2005-05-11 Thread George Pitcher
Hi,

I have a system running on my main server containg separate user and staff
interfaces to the same MySQL databases.

Part of my process involves spawning off pdf front covers to a local
directory, grabbing files from an archive on a networked pc and adding them
together to ftp back to the server (which, incidentally is 70 miles away).
My own machine runs IIS5/PHP5 and the Java classes to do the pdf joining.

I have a link on a server mounted page that opens the localhost page and
successfully prints off the pdf covers. However, on completion, the popup
disappears and I then get a 'file open/save' dialog box which, if I 'open'
tries to open the php file in Dreamweaver (my chosen IDE). What should
happen is that on completion, a smarty template should be opened.

Has anyone experienced something similar or is there a solution?

Cheers

George

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



RE: [PHP] mysql with php

2005-05-20 Thread George Pitcher
Noticed that there was still something missing in this:

$sql = "select User_name, User_pass from user where User_name = 
'$_POST['user_id']' and User_pass = '$_POST['user_pass']'";

Quotes around the POST Args.

George

> -Original Message-
> From: eoghan [mailto:[EMAIL PROTECTED]
> Sent: 20 May 2005 11:21 am
> To: Rittwick Banerjee
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] mysql with php
> 
> 
> $sql = "select User_name, User_pass from user where User_name = 
> '$_POST[user_id]' and User_pass = '$_POST[user_pass]'";
> 
> assuming user_id isnt an int
> 
> Rittwick Banerjee wrote:
> > Hi friends,
> > 
> > I am Rittwick Banerjee
> > 
> > and i have made a mysql based  user name and password program but I 
> > found that
> > what ever I entered in the user name and password feild the php file 
> > dose not working.
> > 
> > I set this code for user name and password
> > 
> > $sql = " SELECT `User_name` AND `User_pass` FROM `user` WHERE 
> > `User_name`= '$_POST[user_id]' AND `User_pass` = '$_POST[user_pass]' "
> > 
> > But this code dose not working properly.
> > This code dosen't checking if the user name and password is correct or 
> > incorrect
> > 
> > Please help me with some source code.
> > 
> > Thank you.
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



RE: [PHP] PHP ide?

2007-11-08 Thread George Pitcher
> Apart from that Eclipse is excellent and is improving.

I used Eclipse a few years ago when I was pretending to be a java developer. 

Since then I've mainly been using Dreamweaver, which works well with Smarty, 
and the 30-odd sites I manage.

How easy would it be for me to move my existing PHP sites into Eclipse, or do 
they need to be started off as projects?

Cheers

George

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



RE: [PHP] Creating PDF files with more than one font?

2007-11-09 Thread George Pitcher
> I want to create a pdf file with several fonts. Which tool is 
> better, pdflib, ezpdf, ?
> Any suggestions?

I can't say which is better, but I use ezpdf and have been able to do 
multi-font stuff so that I can match corporate styles.

George in Edinburgh

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



RE: [PHP] Creating PDF files with more than one font?

2007-11-09 Thread George Pitcher
I've only used .afm. I seem to recall that there was a conversion utility
available.

George

> -Original Message-
> From: Shelley Shyan [mailto:[EMAIL PROTECTED]
> Sent: 9 November 2007 8:16 am
> To: George Pitcher; php-general@lists.php.net
> Subject: RE: [PHP] Creating PDF files with more than one font?
> 
> 
> I often see that it uses .afm files, can it use .ttf format files?
> 
> If yes, how to?
> Thank you very much. 
> 
> 
> Regards,
> Shelley
> 
> -Original Message-
> From: George Pitcher [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 09, 2007 3:38 PM
> To: Shelley Shyan; php-general@lists.php.net
> Subject: RE: [PHP] Creating PDF files with more than one font?
> 
> > I want to create a pdf file with several fonts. Which tool is better, 
> > pdflib, ezpdf, ?
> > Any suggestions?
> 
> I can't say which is better, but I use ezpdf and have been able 
> to do multi-font stuff so that I can match corporate styles.
> 
> George in Edinburgh
> 
> 
> 

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

  1   2   >