[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.

RE: [PHP] OT Smarty problem

2008-05-28 Thread George Pitcher
Iv,

Thanks, but its Firefox to blame. Apparently it holds previously stored values 
in form fields. These are released when the user holds shift while reloading.

Cheers

George

>| -Original Message-
>| From: Iv Ray [mailto:[EMAIL PROTECTED]
>| Sent: 28 May 2008 4:55 pm
>| To: George Pitcher
>| Cc: php-general@lists.php.net
>| Subject: Re: [PHP] OT Smarty problem
>| 
>| 
>| Hi George,
>| 
>| I tried your code and it works.
>| 
>| If you have some way of remote assistance I can have a look "on-site", 
>| if you like.
>| 
>| But it could be that you just need a good sleep, and then look again ;)
>| 
>| Iv
>| 


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



[PHP] OT Smarty problem

2008-05-28 Thread George Pitcher
Hi,

Apologies for posting this here but coudn't find a decent Smarty list.

I've been using Smarty for 4 years without much problem. I'm adding some
extra functionality to a page used by 2 members of staff. My snippets of
relevant code are:

$smarty->assign('clearance',  $clearbits['clearance_alt']);

Clearance {$clearance}
 

  Select
  Yes
  No
  Failed


You will see that I have called the variable in the first column. On the web
page, this displays as "Clearance 1". I would then expect 'Yes' to appear
selected in the column three drop-down box. Unfortunately, this displays as
'Select'.

I have tried deleting all the cached template files as well as single and
double quotes around the 0,1,2,3 values, all to no avail.

All the other Smarty stuff seems to be working on the site.

Can anyone point me in the right direction?
Cheers

George in wet and windy Edinburgh



[PHP] Anyone using clsMsDocGenerator?

2008-03-20 Thread George Pitcher
Hi,

If anyone is using clsMsDocGenerator to produce MSWord files without using
COM, I have a just one question (I tried the PHPClasses forum, but couldn't
get my forum post in).

How do you remove borders from tables?

I am preformatting a html string with att the data going into the document,
including tables, but they always show a fine border, even though border is
set to 0 in my  formatting.

Any suggestions?

Cheers

George


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



RE: [PHP] php book

2008-03-19 Thread George Pitcher
> On Wed, Mar 19, 2008 at 10:50 AM, alexus <[EMAIL PROTECTED]> wrote:
> > what book would you guys suggest for someone who's new and
> wants to learn php?
>
> This is just my opinion, of course, but I wouldn't recommend
> starting with a book.  I'd recommend the online manual at
> http://php.net/manual/ and jumping right in, head-first with writing
> scripts and figuring out how to fix things when they break.  Others
> may recommend good printed material though.
>
> --
> 

I must agree with Dan's approach. I've messed with Frontier, ASP, Java and
PHP using this approach and it works for me. I always find that books just
miss out on that vital topic I need to work on.

Set up a small project (I'd recommend something database related) and look
for sample scripts in the manual and elsewhere.

Cheers

George


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



[PHP] Anyone else doing PHP on Symbian?

2008-02-05 Thread George Pitcher
Hi,

I've recently installed PAMP (PHP, Apache, MySQL & Python) on my Nokia N95.
I can do my development in Dreamweaver and move across to the phone and it
all works.

I have some questions, but won't bother asking if there's no-one else here
doing it.

Cheers

George, in a very wet Edinburgh

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



RE: [PHP] Which file called the function?

2007-12-20 Thread George Pitcher
> On Thu, December 20, 2007 8:37 am, Christoph Boget wrote:
> > Let's say I have the following 3 files
> >
> > global.php
> >  >   function myFunc() { echo __FILE__; }
> > ?>
> >
> > one.php
> >  >   include( 'global.php' );
> >   echo 'You are in file: ';
> >   myFunc();
> > ?>
> >
> > two.php
> >  >   include( 'global.php' );
> >   echo 'You are in file: ';
> >   myFunc();
> > ?>
> >
> > In each case, what is echoed out for __FILE__ is global.php.  Apart
> > from
> > analyzing the debug_backtrace array, is there any way that myFunc()
> > would
> > display "one.php" and "two.php" respectively?
>
> $_SERVER['PHP_SELF'] and other bits in $_SERVER have the "main" PHP
> filename in them.
>
> __FILE__ will always be exactly the file that it's in.
>
> In between, I think you are stuck with the debug_backtrace.
>
> NOTE:
> If it's for error logging or error reporting, note that trigger_error
> automatically passes in the file/line to the error handler.

I'm far from being an expert, and often see more efficient ways of doing
things (more efficient tham my own methods). Howevr, I've just been dealing
with a similar problem.

I have a functions file with over 400 functions (and that may be too many -
but it works). I've been adding some error reporting in to my PEAR::DB
queries, but wanted to know which page triggered the function. I went
theough my php pages and gane each one a $pg variable at the start
containing the bare name of the file, eg 'home' rather than 'home.php'. I
then went to each function containing either a DB query (ore one which calls
another DB-related function. I did a global search and replace for the
function name 'func(' replaced by 'func($pg,'. I use Dreamweaver so this was
fairly straightforward.

It worked for me, but now someone is about to show me a quicker, cleaner
way, aren't they?

Cheers, and seasonal greetings from Oxford/Edinburgh

George

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



RE: [PHP] ini_set('memory_limit', '16M')

2007-11-28 Thread George Pitcher
Hi,

> On one script (pulling large amount of data from mysql) I'm getting error:
> "Fatal error: Allowed memory size of 16777216 bytes exhausted..."
> I put on the beginning of the page
> ini_set('memory_limit', '64M');
> but I'm still getting the same error message?!?
>

ini_set() returns the old value, so it might work if you assign the return
value:

$x = ini_set('memory_limit', '64M');

George

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



RE: [PHP] Can I create flash via php?

2007-11-28 Thread George Pitcher
Ronald,

Add 'example' to the end of the search query.

George

> -Original Message-
> From: Ronald Wiplinger [mailto:[EMAIL PROTECTED]
> Sent: 28 November 2007 8:07 am
> To: Jay Blanchard
> Cc: PHP General list
> Subject: Re: [PHP] Can I create flash via php?
> 
> 
> Jay Blanchard wrote:
> > [snip]
> > I want to create flash animations via a web page. Is it possible? What
> > do I need. I do not want to use Windows 
> > [/snip]
> >
> > STFW http://www.google.com/search?hl=en&q=create+flash+using+PHP
> >
> >
> >
> >   
> Excellent link (and bet I tried that one before!!!),  can you please
> help me to find the right page of the about 58,200,000 pages. (In words:
> 58 million 200 thousand)  ;-)
> 
> Thanks in advance!
> 
> bye
> 
> Ronald
> 
> -- 
> 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] Emailing dilemma

2007-11-27 Thread George Pitcher
Hi Rob,

>
> You could try the following headers (they might also cause trouble to the
> antispam soft, but I'd give it a try)
>
> // Replies delivered to the user
> Reply-To: <[EMAIL PROTECTED]>
> // Bounces delivered to the user
> Return-Path: <[EMAIL PROTECTED]>
> // Errors delivered to the user
> Errors-To: <[EMAIL PROTECTED]>
>
> I don't know if either Return-Path or Errors-To will work (maybe
> both work)
> but I believe Errors-To would be more suitable... just give it a
> try and let
> us know.
>
Tried these but it doesn't stop the actual email envelope from using the
sendmail_from tag as the Return-path.

Did some testing and putting ini_set('sendmail_from', $useremail) just ahead
of the $mail->send() command did the trick. It may be that it needs to have
the headers set correctly to work, as I had tried this setting change in the
past unsuccessfully.

Anyway, another small problem removed from my list.

Thanks to all who chipped in on this one.

George

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



RE: [PHP] Emailing dilemma

2007-11-27 Thread George Pitcher
Miles,

I see that tha manual talks about a trusted sender list
(/etc/mail/trusted-users). Do you know if there is something similar for a
Windows NT server?

Cheers

George

> -Original Message-
> From: Miles Thompson [mailto:[EMAIL PROTECTED]
> Sent: 26 November 2007 8:44 pm
> To: PHP List
> Subject: Re: [PHP] Emailing dilemma
>
>
> George,
>
> Had this problem a year ago, although I'm not using PEAR. Have a look at
> http://ca3.php.net/manual/en/function.mail.php
> and this down in the additional_parameters(optional) section:
>
> "For example, this can be used to set the envelope sender address
> when using
> sendmail with the *-f* sendmail option."
>
> It is not well documented, don't know if this helps, but it may get you
> started.
>
> Cheers - Miles
>
> On Nov 26, 2007 3:21 PM, George Pitcher
> <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I have almost 30 websites that use PEAR::Mail to send emails on
> behalf of
> > users at universities (one site for each) to lecturers at the same
> > university.
> >
> > The problem I have is that if a lecturer sets an 'Out of Office' status,
> > it
> > gets bounced back to my server instead of to the user at the university.
> >
> > I did have the 'From' set to the user's email address, but that wasn't
> > very
> > successful ats it caused problems with the universities' anti-spam
> > systems.
> >
> > I've tried using ini_set('sendmail_from',$useremail); but that doesn't
> > seem
> > to work either.
> >
> > Can anyone point me in the right direction, 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



[PHP] Emailing dilemma

2007-11-26 Thread George Pitcher
Hi,

I have almost 30 websites that use PEAR::Mail to send emails on behalf of
users at universities (one site for each) to lecturers at the same
university.

The problem I have is that if a lecturer sets an 'Out of Office' status, it
gets bounced back to my server instead of to the user at the university.

I did have the 'From' set to the user's email address, but that wasn't very
successful ats it caused problems with the universities' anti-spam systems.

I've tried using ini_set('sendmail_from',$useremail); but that doesn't seem
to work either.

Can anyone point me in the right direction, please?


Cheers

George in Edinburgh

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



RE: [PHP] PHP access of FileMaker data

2007-11-14 Thread George Pitcher
Paul,

> What I'm really looking for is a PHP class that will read FileMaker
> files in their native format.  I'm beginning to suspect that none
> exists in the public arena.  Someone please tell me there is!

I've been a Filemaker user (and had some Lasso and Frontier driven sites
once). I still use it for some personal stuff. I'm about to move some of my
personal stuff to MySQL to see if it can do better (probably can't, down to
the FMP layout strength).

I'm just exporting my tables (files rather than tables as I never upgraded
beyong v5). Why not try that and then use PHP to transfer from the exported
files into whatever you want?

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'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

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] 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] Re: how PHP is batter?

2007-07-03 Thread George Pitcher
Colin,

> Either phrase can be a good or a bad thing, it all depends on tone -
> Scottish is very like Japanese in that respect :p
> 
Nips are good, but drams are better!

George

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



RE: [PHP] Anyone scripted Crossover?

2007-06-06 Thread George Pitcher
Tijnema,

> > Nothing found in the archive, so asking the question: has
> anyone done any
> > scripting of Crossover to control MS Office applications on Linux?
> >
> > I would love to move to Linux, but have some apps that create
> MS Word docs
> > and some doing Excel parsing.
> >
> > Cheers
> >
> > George in Edinburgh/Oxford
>
> Can't you use some OpenOffice.org tools for that? OOo can open all
> kind of MS Word and Excel documents.

So, can I create a '*.doc' file on a Linux box? And can I read the data from
an Excel spreadsheet to parse into a MySQL db?

If so, can anyone point me in the right direction for examples etc?

Cheers

George in Edinburgh/Oxford
==

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



[PHP] Anyone scripted Crossover?

2007-06-06 Thread George Pitcher
Hi,

Nothing found in the archive, so asking the question: has anyone done any
scripting of Crossover to control MS Office applications on Linux?

I would love to move to Linux, but have some apps that create MS Word docs
and some doing Excel parsing.

Cheers

George in Edinburgh/Oxford
==

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



RE: [PHP] List

2007-04-24 Thread George Pitcher
> Does anyone else have this problem with the list. It seems that
> every time I
> check my email there is one or more messages from the list that royally
> screws up Outlook. I usually have to delete all list messages from the
> actual server and reboot. It only happens with emails from
> [EMAIL PROTECTED]
>
> Just trying to narrow down the problem. Not sure if this is spam that's
> sneaking into the list messing things up or what.

I've had no problem using Outlook 2000 on XP, and also not using digest
mode.

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



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



[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,

> > 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



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



[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] 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



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
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
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



[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] Problem with wanting something NOT to round

2006-11-17 Thread George Pitcher
> George Pitcher wrote:
> >> Are you sure the web service is giving you 160.44? I get it
> displayed as
> >> expected...
> >>
> >> http://dev.stut.net/php/pitcher.php
> >>
> > Yes, I am echoing the 160.44 ok. I'm just not getting the 44c
> in my display
> > price. I'm on Windows NT - could that be a factor?
>
> I'm not sure what you mean by "in my display price". Please elaborate?
>
If I paste your code (from your web-page example), into a new php file, I
get 160.44. However, replacing my existing code with the example code into
the page that is to  do the work, I get 160.00.

To simplify things, I've now done the following in the new php file and then
on my page:

$fee = 160.44;
echo "fee: ".$fee."";
$fee2 = $fee + 0.00;
echo "fee2: ".$fee2."";

I get 160.44 on the standalone page and 160.00 on my web page.

I am using PHP5.1 with Smarty templates on my page (but not on the
standalone page).

Smarty doesn't offer anything other than the sprintf() options for string
formatting of decimal numbers, and I'm already doing that.

Do you think Smarty could be so unsmart as to undo the formatting?

As another test, I did settype($fee2, "float")then the gettype($fee2) and
got 'float' on the standalone page and NULL on my Smarty page.

Truly stumped!

George

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



RE: [PHP] Problem with wanting something NOT to round

2006-11-17 Thread George Pitcher
> George Pitcher wrote:
> > As part of a result from a web-service call, I get a price in
> dollars and
> > cents as a decimal number eg.160.44 (the example I am working on.  This
> > price is for permission to re-use some published material and for each
> > additional separate pagerange, $3 needs to be added afterwards.
> >
> > So I have the following code in my script:
> >
> > $range = explode(",",$pr);
> > $rangecounter = count($range);
> > $rangecounter = ($rangecounter>1?$rangecounter-1:0);
> > $ccc_supp =  floatval($rangecounter * 3);
> > $fee2 = floatval($fee + $ccc_supp);
> > echo sprintf("%01.2f",$fee2);
> >
> > $pr is my pagerange which, in this case is 9-24, generates a
> rangecounter of
> > 1, so does not get any additional $3 added.
> >
> > My echo produces 160, instead of the 160.44 which I want.
> >
> > Can anyone point me in the direction of a solution?
> >
>
> Are you sure the web service is giving you 160.44? I get it displayed as
> expected...
>
> http://dev.stut.net/php/pitcher.php
>
Hi,

Yes, I am echoing the 160.44 ok. I'm just not getting the 44c in my display
price. I'm on Windows NT - could that be a factor?

George

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



[PHP] Problem with wanting something NOT to round

2006-11-17 Thread George Pitcher
Hi,

As part of a result from a web-service call, I get a price in dollars and
cents as a decimal number eg.160.44 (the example I am working on.  This
price is for permission to re-use some published material and for each
additional separate pagerange, $3 needs to be added afterwards.

So I have the following code in my script:

$range = explode(",",$pr);
$rangecounter = count($range);
$rangecounter = ($rangecounter>1?$rangecounter-1:0);
$ccc_supp =  floatval($rangecounter * 3);
$fee2 = floatval($fee + $ccc_supp);
echo sprintf("%01.2f",$fee2);

$pr is my pagerange which, in this case is 9-24, generates a rangecounter of
1, so does not get any additional $3 added.

My echo produces 160, instead of the 160.44 which I want.

Can anyone point me in the direction of a solution?

MTIA

George

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



RE: [PHP] Controlling a scanner with PHP

2006-06-28 Thread George Pitcher
Hi guys,

Back onto the original topic. I spoke to my potential client this m orning
and they were just looking for the scanning steps to be recordable in the
CMS - which my CMA already does.

Thanks for all the positive suggestions and nice to see me starting a useful
conversation for once.

Cheers

George in Oxford

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



[PHP] Controlling a scanner with PHP

2006-06-27 Thread George Pitcher
Hi,

I have been asked to look at extending one of my CMS systems to incorporate
integration to a library management system, as well as LDAP and Active
Directory. The requirement also asks for scanning and OCR of documents to be
controlled by the CMS.

Does anyone have any experience of implementing the scanning into a PHP
application?

MTIA

George

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



RE: [PHP] templating

2006-06-22 Thread George Pitcher
Ryan,

I would still recommend Smarty.

It can be as big as you like, but it can also be very simple to set up and
maintain. It has the features should your friend decide to expand his usage
in the future. If you opt now for something with limited features and later
decide to step beyond them, you'll be faced with making another major change
then.

Just my 2p worth.

George in Oxford

> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: 22 June 2006 12:10 pm
> To: php php
> Subject: [PHP] templating
>
>
> Hi,
>
> A pal of mine needed some help on his project, he is
> using a "header" and "footer" file to "template" his
> project... but its gotten a bit complicated as he has
> a few dynamic parts in the header and footer files, so
> I told him to go with a proper templating method of
> templating the whole page rather than includ()ing the
> top and bottom.
>
> After having a better look at his scripts, I am just
> not sure if something big (like SMARTY for instance)
> would be good for him. He just needs maybe 5 template
> pages, same pages, different color.
>
> Searching google I see literally hundreds of
> "templating solutions" can anyone recommend a simple
> one or should I tell him to just use str_replace() for
> tags like: {{menu_here}} {{header_here} etc?
> Something like SMARTY would be like using a nuke to
> kill a fly (IMHO) esp since this project will not
> expand to anything much bigger or complicated.
>
> Thanks!
> Ryan
>
> --
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



[PHP] file_exists() behind firewall

2006-06-15 Thread George Pitcher
Hi,

I have several websites that are using a common set of pages (to reduce
maintenance, development and upgrading) and use configuration files to give
the customer the feeling that it is their own unique site. The customers are
all universities and use the sites to manage digitisation and copyright
permission processes. These sites are all hosted om my company server.

I would like them to be able to see whether a PDF file hosted by their
universities is available or not.

Using file_exists($url) won't work because the actual PDFs should be sitting
behind the universities' firewalls.

I think that something working on the client-side, such as JavaScript might
work, because it would be able to look from the client's machine to the PDF,
both of which should be behind the firewall to the PDF. However, I haven't
been able to find any js that looks like it will do that for me.

Does anyone have any constructive suggestions?

MTIA

George in Oxford

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



RE: [PHP] Including Functions; one file or many?

2006-05-26 Thread George Pitcher
Mark,

I use one functions file per site, then I know that if I include it, and all
of my functions are available.

George

> -Original Message-
> From: Mark Kelly [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2006 9:02 am
> To: php-general@lists.php.net
> Subject: [PHP] Including Functions; one file or many?
>
>
> Hi
>
> I'm writing a set of db abstraction functions for an internal app
> which will
> give us a set of simple function calls for dealing with the db, like
>
> $result = db_AddEmployee($EmployeeData);
> $EmployeeData = db_GetEmployee($EmployeeID);
>
> etc.
>
> There will be quite a few functions needed to deal with all the different
> ways the app touches the db, so my question is:
>
> Am I better off putting all these functions into one big include
> file (which
> could get pretty big) or using a seperate 'include' file for each
> function?
>
> I'm thinking about the tradeoff between simplifying code by only having a
> single include file (parsing a lot of functions that aren't used,
> but less
> disk access) and having several include files (no extra funcs but
> lots more
> disk access).
>
> I realise there probably isn't a 'correct' way to do this, I'm
> curious about
> which methods folk here use in situations like this.
>
> TIA in advance for any advice,
>
> Mark
>
> --
> 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] Slow query-building function

2006-05-25 Thread George Pitcher
Hi,

Last year I switched from using FileMaker Pro to MySQL. One of FileMaker's
quirks was that if, in a text field, you searched for say, 'free ass boo',
it would find any records with those three substrings in that field (in this
example, its 'Free Association Books').

I want to have this quirkiness on my site, along with the option of adding +
or ! before substrings.

I've got it working using the following function:

function sql_fltr($sql,$field,$input){
  $input = addslashes($input);
  if(strlen($input)>0){
if(substr_count($input,"*")>0 || substr_count($input,"!")>0 ||
substr_count($input,"^")>0 || substr_count($input,"+")>0){
  $output="";
/* search for substring conditions */
  $tempy = str_replace(" +","|+",str_replace(" !","|!",str_replace("
*","|*",str_replace(" ^","|^",($input);
  $temp = explode("|",$tempy);
  $i=0;
  while($i < sizeof($temp)){
if(substr($temp[$i],0,1)=="*"){
  $temp[$i]=" and ".$field." LIKE
'%".strim(str_replace("*","",$temp[$i]))."%'";
  $output.= $temp[$i]."|";
}elseif(substr($temp[$i],0,1)=="!"){
  $temp[$i]=" and ".$field." NOT LIKE
'%".strim(str_replace("!","",$temp[$i]))."%'";
  $output.= $temp[$i]."|";
}elseif(substr($temp[$i],0,1)=="+"){
  $temp[$i]=" and ".$field." LIKE
'%".strim(str_replace("+","",$temp[$i]))."%'";
  $output.= $temp[$i]."|";
}else{
  $temp[$i]="and ".$field." LIKE '%".strim($temp[$i])."%'";
  $output.= $temp[$i]."|";
}
$i++;
  }
  $output = strim(substr($output,0,strlen($output)-1));
  if(substr(strtolower(strim($output)),0,3)=='and'){
$output = str_replace("|"," ",$output);
  } else {
$output = substr($output,4,strlen($output)-1);
  }
/* search for whole string conditions */
} elseif(substr($input,0,1)=="*"){
  $output=$field." LIKE '%".strim(str_replace("*","",$input))."%'";
} elseif(substr($input,0,1)=="!"){
  $output=$field." NOT LIKE '%".strim(str_replace("!","",$input))."%'";
} elseif(substr($input,0,1)=="="){
  $output=$field."='".strim(str_replace("=","",$input))."'";
} else {
  $input = str_replace(" ","|",$input);
  $output ="";
/* search for all substrings */
  if(substr_count($input,"|")>0){
$temp = explode("|",$input);
$d=0;
while($d < sizeof($temp)){
  $temp[$d]=" and ".$field." LIKE '%".rtrim($temp[$d])."%'";
  $output.= $temp[$d]."|";
  $d++;
}
  } else {
$output=$field." LIKE '%".rtrim(str_replace("|", " ",$temp))."%'";
  }
}
  } else {
$output="";
  }
  if(substr(strtolower(strim($output)),0,3)=='and'){
$query = str_replace("|"," ",$output);
  } else {
$query = substr($output,4,strlen($output)-1);
  }
  $output = str_replace("|"," ",$query);
  return str_replace("and and","and",$output);
}

For info the strim() function combines ltrim() and rtrim().

My usage example is:

$sqlp = "select supplier_id from suppliers where (supplier_id>0 ";
$sqlp.= sql_fltr($sqlp, 'imprint', $pubname);
$sqlp.=")";
echo "".$sqlp."";

I just add extra sql_fltr() lines for additional fields.

The main problem with this function is that takes 12 seconds on my XP
laptop, to build the query (I'm not even hitting the DB, but pasting that
into my DB front end gives a quick result.

I'm running PHP5.1RC on the laptop (PHP5.0.2 on my server) - both with
Apache 2.

Can anyone suggest a solution that will improve performance while retaining
the functionality?


George

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



RE: [PHP] Security Concerns with Uploaded Images:

2006-05-17 Thread George Pitcher
> On Mon, May 15, 2006 1:58 am, Jason Wong wrote:
> > 2) the uploaded file is a "script" (perl/php/python/etc)
>
> > In the case of (2), if the script relies on its shebang line to
> > execute
>
> Not necessarily -- What if I upload an "image" file named
> "badscript.php" and then I surf to it, after it's in your /images
> directory?

On my sites, I know aht file extensions that I will allow, so block (by
script) anything that doesn't match - in my case, that's '.tif' and '.pdf'.

George

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



RE: [PHP] extract text from pdf

2006-05-11 Thread George Pitcher
Have a look at the iText java class. I use it in conjuction with php for
file splitting and concatenation, but it has a whole host of other features.
It's accessible via sourceforge or from the author at
www.lowagie.com/iText/.

Hope it helps

George

> -Original Message-
> From: cajbecu [mailto:[EMAIL PROTECTED]
> Sent: 11 May 2006 9:46 am
> To: 'PHP General (E-mail)'
> Subject: [PHP] extract text from pdf
>
>
> Hello,
>
> Is there any posibility to extract all text from a PDF file? (I have
> read all the documentation about PHP PDF-Lib but no answer...)
>
> Thanks in advance,
>   cajbecu
>
> --
> 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] making a tutorial

2006-03-17 Thread George Pitcher
> >>> Which of the following pets do have at home:
> >>> dog
> >>> cat
> >>> snake
> >>> snake
> >>> none of
> >>> these
> >>> 
> > [snip]
> >> I don't know if this works in PHP as well.
> > It is a "checkbox" so it won't work without "[]" in PHP.
> >
>
> It will work without []. It will just not be an array.
>
> For checkboxes you could use it without [] but then it would be more like
> a radio button. Or you could use it with different names in name="".
>


Surely parsing the final checkbox would overwrite any previous ones unless
they were clearly identifiable as different.

George

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



[PHP][SOLVED] Problem with mail() on Debian

2006-02-24 Thread George Pitcher
Hi,

Thanks to David - his suggestion to comment out the php.ini sendmail_path
line and reverting to using Manuel's email class solved the problem.

Many thanks to all.

George

> -Original Message-
> From: Manuel Lemos [mailto:[EMAIL PROTECTED]
> Sent: 23 February 2006 7:58 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] Problem with mail() on Debian
>
>
> Hello,
>
> on 02/23/2006 11:32 AM George Pitcher said the following:
> >  My apache error.log says:
> >
> > sh: line 1: /usr/sbin/sendmail -t: no such file or directory
>
> /usr/sbin/sendmail is not the correct sendmail program path. The correct
> path is /usr/lib/sendmail . It may be odd that a program is located in
> /usr/lib but that has always been the standard path for sendmail and
> compatible MTA. Sometimes it is a symbolic link to /usr/sbin/sendmail
> but that is not necessarily true.
>
> --
>
> Regards,
> Manuel Lemos
>
> Metastorage - Data object relational mapping layer generator
> http://www.metastorage.net/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] Problem with mail() on Debian

2006-02-23 Thread George Pitcher
Jochem,

>
> personally I'd rather stick my head in a blender than use webmin to edit
> such conf files. (no I wouldn't but you get the point hopefully)
>
> how are you restarting apache? possibly your being told that the restart
> occured but really your being lied to ... try doing it 'manually':
>
> e.g.:
>
> ?> apachectl stop; sleep 5; apachectl start


Webmin was a means to an end. Your restarting method solved the problem of
php.ini being read (or at least being displayed in phpinfo()), but doesn't
get round my email problem.

 My apache error.log says:

sh: line 1: /usr/sbin/sendmail -t: no such file or directory

 if I replace sendmail with exim4, i get an equivalent error.

ls -l sendmail in /usr/sbin gives me:
lrwxrwxrwx  1 root root 5 2005-11-17 15:51 sendmail -> exim4

Any (constructive) thoughts?

Cheers

George

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



RE: [PHP] Problem with mail() on Debian

2006-02-22 Thread George Pitcher
Manuel,

> > I have found that any changes I make to php.ini are ignored, even after
> > restarting Apache. I have been editing httpd.conf via Webmin,
> which for most
> > configs works fine (and is displayed in phpinfo(), the sendmail
> changes are
> > never displayed (always shows sendmail_path = /usr/sbin/sendmail).
>
> There are no miracles. If you change restarted Apache and phpinfo()
> shows the same in sendmail_path, either you have other Apache
> configuration changing PHP options, or you have not really changed
> php.ini, which is very likely.
>
> No, I am not saying you are crazy. It is very likely that the real
> php.ini is not in the path you think it is. This may happen if you have
> installed Zend Studio or some other tool that needs to replace the real
> php.ini and moves it elsewhere.
>
> Look again to the phpinfo() output to determine the real path of php.ini .
>
That's the crazy part! phpinfo() shows the path to the php.ini file as the
one that I have been editing, and if I open that file in vi, it shows all
the changes I've made. This is a bare debian install in as much as it has no
windowing environments. No Zend Studio, or anything else fancy. Smarty and
PEAR work, its just the emailing that is letting me down just now. Once
that's resolved I'll move on to spreadsheet reading.

Cheers

George

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



RE: [PHP] Problem with mail() on Debian

2006-02-22 Thread George Pitcher
Jochem,

Thanks, but I tried that and it made no difference.

I have found that any changes I make to php.ini are ignored, even after
restarting Apache. I have been editing httpd.conf via Webmin, which for most
configs works fine (and is displayed in phpinfo(), the sendmail changes are
never displayed (always shows sendmail_path = /usr/sbin/sendmail).

Cheers

George

> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: 22 February 2006 7:01 pm
> To: George Pitcher; [php] PHP General List
> Subject: Re: [PHP] Problem with mail() on Debian
>
>
> George Pitcher wrote:
> > Hi,
> >
> > I am in the process of moving from Windows (NT/XP) to Linux.
> I'm starting
> > with a new small application which I have working on my Windows
> XP laptop.
> >
> > On my Linux box, I have php.ini saying:
>
> search this page for 'exim' - it should help:
>
> http://php.net/mail
>
> >
> > sendmail_path /usr/sbin/sendmail
>
> this may need to become:
>
>   sendmail_path /usr/sbin/sendmail -t
>
> and it may require quotes:
>
>   sendmail_path "/usr/sbin/sendmail -t"
>
> >
> > That 'sendmail' is a symbolic link to exim4 in the same directory. I can
> > send mail using exim4 from the command line, but not using PHP.
> I couldn't
> > find anything in the manual or on Google that helps me solve
> the problem.
> >
> > Can anyone give me a clue where to look to solve this problem?
> >
> > Cheers
> >
> > George, in Oxford
> >
>
>

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



[PHP] Problem with mail() on Debian

2006-02-21 Thread George Pitcher
Hi,

I am in the process of moving from Windows (NT/XP) to Linux. I'm starting
with a new small application which I have working on my Windows XP laptop.

On my Linux box, I have php.ini saying:

sendmail_path /usr/sbin/sendmail

That 'sendmail' is a symbolic link to exim4 in the same directory. I can
send mail using exim4 from the command line, but not using PHP. I couldn't
find anything in the manual or on Google that helps me solve the problem.

Can anyone give me a clue where to look to solve this problem?

Cheers

George, in Oxford

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



RE: [PHP] Problem with php.ini and include_path

2006-02-15 Thread George Pitcher
Richard, et al,

I tried your suggestion of the .htaccess file but that didn't do anything.

I'm using Webmin to administer the linux box and the Apache server configs
has a PHP module and that allowed me to set a directory level include_path.
Problem solved.

Now onwards towards configuring pear.

Cheers

George

> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]
> Sent: 14 February 2006 11:56 pm
> To: George Pitcher
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] Problem with php.ini and include_path
>
>
> http://php.net/set_include_path
>
> .htaccess
> php_value include_path ".:/whatever/you/want/here"
>
> Also, you are comparing the output of php CLI which may or may not be
> the same as --with-apxs compilation, especially if you have an *OLD*
> CLI php sitting around...
>
> From the command line, compare:
> which php
> with the output from your "make install" of PHP and see if you're even
> running the php binary you THINK you are running.
>
> On Tue, February 14, 2006 9:13 am, George Pitcher wrote:
> >> George Pitcher wrote:
> >> > Hi,
> >> >
> >> > I have compiled php-5.1.2 with apache on Debian and have a
> >> problem with the
> >> > include_path.
> >> >
> >> > My configure was './configure' '--with-mysql' '--with-pear'
> >> '--with-apxs'
> >>
> >> the '--with-apxs' suggest your probably running php as an apache
> >> module,
> >> if so then you'll need to restart apache for the settings in php.ini
> >> to take affect.
> >>
> >
> > Jochem,
> >
> > Sorry, I should have said that I'd done that as well. Still no joy.
> >
> > One other thing that I have noticed is that if I do 'php -i |grep
> > include_path' from outside the directory where php.ini is it says
> > 'include_path => .:/usr/lib/php' but if I do that from within the same
> > directory as php.ini I get the include_path that I have set in
> > php.ini.
> >
> > Cheers
> >
> > George
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
>
>

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



RE: [PHP] Problem with php.ini and include_path

2006-02-14 Thread George Pitcher
> George Pitcher wrote:
> > Hi,
> >
> > I have compiled php-5.1.2 with apache on Debian and have a
> problem with the
> > include_path.
> >
> > My configure was './configure' '--with-mysql' '--with-pear'
> '--with-apxs'
>
> the '--with-apxs' suggest your probably running php as an apache module,
> if so then you'll need to restart apache for the settings in php.ini
> to take affect.
>

Jochem,

Sorry, I should have said that I'd done that as well. Still no joy.

One other thing that I have noticed is that if I do 'php -i |grep
include_path' from outside the directory where php.ini is it says
'include_path => .:/usr/lib/php' but if I do that from within the same
directory as php.ini I get the include_path that I have set in php.ini.

Cheers

George

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



[PHP] Problem with php.ini and include_path

2006-02-14 Thread George Pitcher
Hi,

I have compiled php-5.1.2 with apache on Debian and have a problem with the
include_path.

My configure was './configure' '--with-mysql' '--with-pear' '--with-apxs'
'--with-config-file-path=/usr/local/lib'.

php.ini is in '/usr/local/lib' and phpinfo tells me that php.ini is in
'/usr/local/lib'. However, where my php.ini has: 'include_path =
".:/php/includes:/usr/lib/php/pear"', phpinfo shows the include_path as
being '/usr/lib/php' which doesn't exist.

Can anyone tell me how do I get my php to use the correct include_path?

MTIA

George in Oxford

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



RE: [PHP] Limitation on PEAR : Spreadsheet_Excel_Writer

2006-02-10 Thread George Pitcher
Does your text get truncated or turned into hash '#' signs?

I know that Excel has some limits regarding how many characters will go into
a text column.

There is also a 64k row limit as well, but most sane people wouldn't use a
spreadsheet to handle such a dataset.

George

> -Original Message-
> From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
> Sent: 10 February 2006 2:41 pm
> To: Bagus Nugroho; php-general
> Subject: RE: [PHP] Limitation on PEAR : Spreadsheet_Excel_Writer
>
>
> -Original Message-
> From: Bagus Nugroho [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 09, 2006 5:48 PM
> To: php-general
> Subject: [PHP] Limitation on PEAR : Spreadsheet_Excel_Writer
>
> Hello Everyone,
>
> I'm succesfully generate report from mysql table using PEAR :
> Spreadsheet_Excel_Writer, but I have problem to generate from table
> which contain long text, the text is not download completely.
> such as  blablabla.
> it only contain  blab
>
> How can manipulate PEAR, to get full text on excel sheet.
>
> Thanks in advance
> Bgs
>
>
>
>
> MySQL fields can contain 65535 characters.  Excel fields can only hold
> 32767 characters.  If you have any text fields longer than 32767
> characters, then they will be truncated by Excel.
>
>
> kgt
>
> --
> 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 encountered with stristr-based function

2006-01-20 Thread George Pitcher
David,

No html involved. Just db results.

I've found that eregi_replace() does the job adequately, if not perfectly.
Us typesetters are hard to please when it comes to string handling.

Cheers

George

> -Original Message-
> From: David Grant [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2006 2:54 pm
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] problem encountered with stristr-based function
>
>
> George,
>
> George Pitcher wrote:
> > For info, I am trying to highlight search terms in results.
>
> If you're searching and replacing within HTML, you ought to be aware of
> issues if someone's search term happens to be an HTML tag or attribute.
>  For example, Alice might search for "href" and get the following:
>
> href="URL">Text
>
> back, which is clearly fubar, which highlights the necessity for some
> handy regex skills.  Following a quick google, I found this page:
>
> http://aidanlister.com/repos/?file=function.str_highlight.php
>
> David
> --
> David Grant
> http://www.grant.org.uk/
>
> http://pear.php.net/package/File_Ogg0.2.1
> http://pear.php.net/package/File_XSPF   0.1.0
>
> --
> 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] problem encountered with stristr-based function

2006-01-20 Thread George Pitcher
Hi,

I'm having a problem with the following function:

function terms($term,$field){
  if(strlen($term)>0){
if(!stristr($term, $field) === FALSE) {
  $output = str_replace($term, "".$term."", $field);
} elseif(!stristr(strtolower($term), $field) === FALSE) {
  $output = str_replace(strtolower($term),
"".strtolower($term)."", $field);
} elseif(!stristr(strtoupper($term), $field) === FALSE) {
  $output = str_replace(strtoupper($term),
"".strtoupper($term)."", $field);
} elseif(!stristr(ucfirst($term), $field) === FALSE) {
  $output = str_replace(ucfirst($term), "".ucfirst($term)."",
$field);
}
  } else {
$output = $field;
  }
  return $output;
}
I'm not comfortable enough with regex etc, so tried it my way, but no joy.

For info, I am trying to highlight search terms in results.

Any suggestions?

George

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



RE: [PHP] Case-Insensitive include on linux.

2006-01-11 Thread George Pitcher
Mathijs wrote:

> Is there a way to have include() be case-insensitive?

If you are know that all your file and directory names are lower case, but
users may input mixed case responses that will be used to determine the
include, you can set the case of the user input to lower case with
strtolower(). Or strtoupper() - the choice is yours.

If you have been a bit careless in naming your directories or filenames,
then I'd do some site maintenance and get that sorted first.

George

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



RE: [PHP] Re: asianwhiteskin beauty product

2005-12-20 Thread George Pitcher
Ah, Michelle, but think of the problems getting dressed
(http://spysports.net/blueshirt.wmv). No offense!

george

> -Original Message-
> From: Dan McCullough [mailto:[EMAIL PROTECTED]
> Sent: 20 December 2005 2:39 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] Re: asianwhiteskin beauty product
>
>
> Maybe this is a disk space product, increases disk space on all
> types of drives.
>
> On 12/20/05, Michelle Konzack <[EMAIL PROTECTED]> wrote:
> > Am 2005-12-15 15:00:41, schrieb Dan McCullough:
> > > Is this some sort of new Zend product? :)
> >
> > Can this implemented?  I have only 75A and do
> > not like become patched with plastic.  ;-P
> >
> > If men can increase 3-4 inches...
> >...why not me 3-4 cups?  =8 >
> > Greetings
> > Michelle
> >
> > --
> > Linux-User #280138 with the Linux Counter, http://counter.li.org/
> > # Debian GNU/Linux Consultant #
> > Michelle Konzack   Apt. 917  ICQ #328449886
> >   50, rue de Soultz MSM LinuxMichi
> > 0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] What software do you use for writing PHP?

2005-12-06 Thread George Pitcher
I've used Dreamweaver MX, working with 9 remote sites, shared between IIS
and Apache.

George

> -Original Message-
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: 6 December 2005 2:15 pm
> To: php
> Subject: [PHP] What software do you use for writing PHP?
>
>
> Hey all,
>
> Forever now I've been using Frontpage for all my web work including php.
> I'm sure there's better software out there that is more suited to
> writing and editing PHP pages.  What do you all use?
>
> Thanks,
>
> Jeff
>
> --
> 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] Validating Email addrs

2005-11-15 Thread George Pitcher
I grabbed the following from a web-published article (sorry, can't remember
where):

function validate_email($email) {
if(preg_match("/^( [a-zA-Z0-9] )+( [a-zA-Z0-9\._-] )*@( [a-zA-Z0-9_-] 
)+(
\.[a-zA-Z0-9_-] +)+$/" , $email)){
list($username,$domain)=split('@',$email);
if(!customCheckDnsrr($domain)){
$valid = 0;
} else {
$valid = 1;
}
} else {
$valid = 0;
}
return $valid;
}
function customCheckDnsrr($host,$recType='') {
if(!empty($host)) {
if($recType=='') $recType="MX";
exec("nslookup -type=$recType $host",$output);
foreach($output as $line) {
if(preg_match("/^$host/", $line)) {
return true;
}
}
return false;
}
return false;
}
I think this covers a windows server (like mine), but there is a shorter one
for Linux (which I'm moving to in the near future).

Never tested this, so can't comment on usefulness.

George


> -Original Message-
> From: Curt Zirzow [mailto:[EMAIL PROTECTED]
> Sent: 16 November 2005 4:04 am
> To: php-general@lists.php.net
> Subject: Re: [PHP] Validating Email addrs
>
>
> On Tue, Nov 15, 2005 at 11:16:15AM -0500, Leonard Burton wrote:
> > Hi All,
> >
> > I know that it is pretty darn impossible to come up with a regular
> > expression for validating emails.
> >
> > How do you all validated emails on form submission?
> >
> > Is it good just to do something like "/[EMAIL PROTECTED]/"  ?  That (or a
> > close derivative) should match that there is at least a @ and a . with
> > chars before and after each.  I will be sending an email to each new
> > registration with a confirmation link.
>
> Since you will be validating emails via a confirmation link, i'd
> probably suggest using the minimal testing, I dont think it is
> worth the headache.  If you become to strict on your regex you
> might eliminate something that is valid but the regex thought was
> invalid.
>
> At minimum [EMAIL PROTECTED] so to modify the regex a bit:
>
>   /[EMAIL PROTECTED],}$/
>
> Curt
> --
>
> --
> 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] T_PAAMAYIM_NEKUDOTAYIM

2005-11-10 Thread George Pitcher

> >
> > It means that you have two colons not being used correctly
>
> its a good thing this mailinglist is not about the practice
> of medicine ;-)
>
If it was, I suppose you would recommend 'colonic irrigation' then? Twice,
perhaps?

George

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



RE: [PHP] Problem reading SimpleXML array NOT SOLVED but NO LONGER A PROBLEM

2005-10-25 Thread George Pitcher
Hi,

Got round the problem by doing this instead:

$param = array(
'country1' => 'uk',
'country2' => 'usa'
);
$wsdl="http://www.xmethods.net/sd/2001/CurrencyExchangeService.wsdl";;
$curr_client = new nusoapclient($wsdl, 'wsdl');
$rate = $curr_client->call('getRate' ,$param);

The ends justified the means, though I am still using SimpleXML to parse my
Copyright Clearance Center processes.

Cheers

George

> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: 24 October 2005 8:50 pm
> To: [EMAIL PROTECTED]
> Cc: George Pitcher; php-general@lists.php.net
> Subject: Re: [PHP] Problem reading SimpleXML array
>
>
> Richard,
>
> I'm guessing you haven't played with simpleXML ...
>
> (apologies inadvance for any/all mistakes :-)
>
> chances are the var_dump() pointer you gave (which under
> normal circumstances would be spot on) will probably
> lead to more confusion. to put it lightly SimpleXML
> doesn't lend itself to introspection (ATM?) because of the
> very #%^$ (for the totally naive: that was masking the word 'nice')
> string casting magic. at least it drove me absolutely nuts.
>
> anyway copious and experimental use of explicit casting to
> strings [i.e. using '(string)'] was the order of the day for me.
>
> as far as I understand it the problem lies in the fact that the object
> you get back has properties which behave as strings and objects which
> for good measure can (all) can be iterated [foreach] like arrays.
>
> all very simple, well ... you decide. :-)
>
> Richard Lynch wrote:
> > On Mon, October 24, 2005 3:50 am, George Pitcher wrote:
> >
> >>Hi,
> >>
> >>I'm having a problem reading an xml feed. This is my object:
> >>
> >>SimpleXMLElement Object (
> >>[Header] => SimpleXMLElement Object (
> >>[ID] => FX12GB
> >>[Test] => false
> >>[Name] => Foreign Exchange United Kingdom Pound Noon Rates
> >>[Prepared] => 2005-10-24
> >>[Sender] => SimpleXMLElement Object (
> >>[Name] => Federal Reserve Bank of New York
> >>[Contact] => SimpleXMLElement Object (
> >>[Name] => George Matthes
> >>[Email] => [EMAIL PROTECTED] ) )
> >>[ReportingBegin] => 1994-01-06 )
> >>[DataSet] => SimpleXMLElement Object (
> >>[Series] => SimpleXMLElement Object (
> >>[Key] => SimpleXMLElement Object (
> >>[FREQ] => D
> >>[CURR] => GBP
> >>[FX_TIME] => 12
> >>[FX_TYPE] => S )
> >>[Obs] => SimpleXMLElement Object (
> >>[TIME_PERIOD] => 2005-10-21
> >>[OBS_VALUE] => 1.7692 ) ) ) )
> >>
> >>I'm trying to get those last two lines: TIME_PERIOD and OBS_VALUE.
> >>
> >>I can get the ID (third line) using $s->Header->ID (where $s is my
> >>object).
> >>$s->DataSet->Series->Obs->TIME_PERIOD;   // 'Trying to get property of
> >>non-object'
> >
> >
> >
> > echo "";
> > var_dump($s);
> > echo "\n";
> > var_dump($s->DataSet);
> > echo "\n";
> > var_dump($s->DataSet->Series);
> > echo "\n";
> > .
> > .
> > .
> >
>
>

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



[PHP] Problem reading SimpleXML array

2005-10-24 Thread George Pitcher
Hi,

I'm having a problem reading an xml feed. This is my object:

SimpleXMLElement Object (
[Header] => SimpleXMLElement Object (
[ID] => FX12GB
[Test] => false
[Name] => Foreign Exchange United Kingdom Pound Noon Rates
[Prepared] => 2005-10-24
[Sender] => SimpleXMLElement Object (
[Name] => Federal Reserve Bank of New York
[Contact] => SimpleXMLElement Object (
[Name] => George Matthes
[Email] => [EMAIL PROTECTED] ) )
[ReportingBegin] => 1994-01-06 )
[DataSet] => SimpleXMLElement Object (
[Series] => SimpleXMLElement Object (
[Key] => SimpleXMLElement Object (
[FREQ] => D
[CURR] => GBP
[FX_TIME] => 12
[FX_TYPE] => S )
[Obs] => SimpleXMLElement Object (
[TIME_PERIOD] => 2005-10-21
[OBS_VALUE] => 1.7692 ) ) ) )

I'm trying to get those last two lines: TIME_PERIOD and OBS_VALUE.

I can get the ID (third line) using $s->Header->ID (where $s is my object).

$s->DataSet->Series->Obs->TIME_PERIOD;   // 'Trying to get property of
non-object'
$s->DataSet->Series->Obs['TIME_PERIOD']  // 'Trying to get property of
non-object'
$s->DataSet->Series->TIME_PERIOD // 'Trying to get property of
non-object'
$s->DataSet->Series['TIME_PERIOD']   // No error but no data
$s->DataSet->TIME_PERIOD // No error but no data
$s->DataSet['TIME_PERIOD']   // No error but no data

Can anyone point me in the right direction please?

MTIA

George

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



[PHP] php5.1RC/COM/Word

2005-10-11 Thread George Pitcher
Hi,

My dev machine has PHP 5.1RC installed (no problems so far, apart from
this), its on Win XP. My server is running PHP 5.0.4 on Win NT.

I'm building some MS Word docs and it works fine except when I need to add
something that uses more than one parameter - eg.:

$word->Selection->ParagraphFormat->TabStops->Add->Position(418,0,0);

Whenever I use something that needs more than one parameter, I get my Word
document generated up to that point and an error message on the web page:
"PHP Fatal error: Uncaught exception 'com_exception' with message 'Error
[0x8002000e] Invalid number of parameters.'".

Does anyone know of a solution?

No smart-Alec replies please.

cheers

George in Oxford

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



RE: [PHP] incrementing cookie

2005-09-14 Thread George Pitcher
Hi,

> if (isset($add)) {
>   $pakora++;
>   setcookie("cookie[pakora]", "$pakora Pakora");
> }

If I'm not mistaken, you also need to be sure that you are writing your
script to html/display and not redirecting to another page after the cookie
has been set - as redirecting will not write the cookie.

Just my 2p.

George

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



RE: [PHP] ASP (VBScript) to PHP Converters?

2005-09-09 Thread George Pitcher
Jay,

> I have started searching around for VBScript to PHP converters and was
> hoping that the group might have some recommendations. My new position
> places me squarely into the middle of a Windows shop and one of
> the reasons
> that they wanted me here was to help them take the steps to the
> next levels.

This reminds me of an old joke from The FileMaker list: 'The box said:
"works with Windows 97 or better", so I bought a Mac'.

> the existing
> code was generated with Dreamweaver which has introduced some
> bloat. I feel

As a Dreamweaver user, I'd have to say that poor use of DW (staying in the
'Design' window) will certainly lead to bloat.

As for your actual question, sorry never been near VB.

Cheers

George

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



RE: [PHP] Getting current page name without path

2005-09-06 Thread George Pitcher
> I want to get the name of current page. I use $PHP_SELF or
> SCRIPT_FILENAME, but it also provides the path name . I just want to
> retrieve the file name with extension. How can I do that?
>

$_SERVER['SCRIPT_NAME'] and $_SERVER['ORIG_SCRIPT_NAME'] will give you the
current filename without the path.

I'm currently using PHP5.1RC so it might differ in your version but check
out phpinfo.php

These things are all displayed in phpinfo.php.

George

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



[PHP] Problem with new extension

2005-09-02 Thread George Pitcher
Hi,

I think that I may have messed up my php (v5.0.1).

Earlier today, I downloaded the most recent extensions and replaced my
php_pdf.dll (aug 2004)with the most recent (Mar 2005) - set the permissions
to be the same as the other extensions - then restarted the machine.

I'm now getting an error:

PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_pdf.dll' - The
specified procedure could not be found.

I'm on WinXP Pro SP2 and used the pdf extension quite a bit - but it didn't
cover things such as 'PDF_create_textflow'.

Can anyone suggest a workround, or will I need to reinstall php using the
most recent version?

MTIA

George

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



RE: [PHP] changes in php.ini

2005-08-26 Thread George Pitcher
For IIS, where you have defined your index.html as a default page, you laso
need to define index.php as well. To to this, open the 'Properties' for your
website in the IIS Admin tool, click on the 'Documents' tab and its
straightforward from there. You need to do this for each site.

George

> -Original Message-
> From: hope [mailto:[EMAIL PROTECTED]
> Sent: 26 August 2005 8:56 am
> To: php-general@lists.php.net
> Subject: Re: [PHP] changes in php.ini
>
>
> Nops
> I m using IIS
>
>
> Hope
>
>
> Jasper Bryant-Greene wrote:
>
> > hope wrote:
> >> Hi all
> >>
> >> Whenever I create a site
> >> and create a index.php file as my home page.
> >>
> >> Whenever i run it a http://localhost/myproject/
> >>
> >>
> >> it says Page cannot be found
> >>
> >> However if I have index.html file it displays.
> >>
> >> SOmebody told me that i need to make changes to php.ini
> >>
> >> bt where and what to change there.
>
> > You don't need to change php.ini, you need to configure your server (is
> > it Apache?) to display index.php files as the DirectoryIndex. If it is
> > Apache, then either insert the following line in the relevant part of
> > httpd.conf for that virtual host/directory, or put it in an .htaccess
> > file in the root of your web application:
>
> > DirectoryIndex index.php
>
> > Jasper
>
> --
> 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] Printing \n and \r to the screen

2005-08-24 Thread George Pitcher
> [snip]
> I seem to be having trouble with \n and \r in variables. I write my
> code on a linux box, and the server is linux. So I should always have
> \n\r, no? Is there a way the I could print $variable; and have it show
> me the /n and /r 's ? I tried with a srt_replace() on /n and on /r,
> but they do not get replaced. I also tried escaping the backslash,
> then double escaping that as was suggested somewhere in the
> php.net/manual, then triple escaping!
>
> Thanks ahead of time for any insight.
> [/snip]

I use \r\n on my winbox but maybe it doen't matter, though I though I had a
problem a few years back when I inadvertently used \n\r by mistake.

George

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



RE: [PHP] Re: setting 'sendmail_from' on windows

2005-08-19 Thread George Pitcher
Mark,

Just to let you know that it did the trick.

Cheers

George

> -Original Message-
> From: Mark Rees [mailto:[EMAIL PROTECTED]
> Sent: 19 August 2005 9:42 am
> To: php-general@lists.php.net
> Subject: [PHP] Re: setting 'sendmail_from' on windows
> 
> 
> ""George Pitcher"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > I am sending emails out from php using a variety of 'From addresses',
> > depending on who is logged on. I would like bounced messages to go
> directly
> > to the sender, but they are not. I suspect that this is because in
> php.ini,
> > I have to set the 'sendmail_from' to a specific address.
> >
> 
> I don't know if this will work, but try using ini_set  to change
> sendmail_from as necessary
> 
> http://uk2.php.net/manual/en/function.ini-set.php
> 
> List of ini options here
> 
> http://uk2.php.net/manual/en/ini.php#ini.list
> 
> 
> > Can anyone suggest an alternative, other than switching platforms?
> >
> > MTIA
> >
> >
> > 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



RE: [PHP] Re: setting 'sendmail_from' on windows

2005-08-19 Thread George Pitcher
Mark,

Thanks, I'll have a look at that over the weekend.

Cheers

George

> -Original Message-
> From: Mark Rees [mailto:[EMAIL PROTECTED]
> Sent: 19 August 2005 9:42 am
> To: php-general@lists.php.net
> Subject: [PHP] Re: setting 'sendmail_from' on windows
> 
> 
> ""George Pitcher"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi,
> >
> > I am sending emails out from php using a variety of 'From addresses',
> > depending on who is logged on. I would like bounced messages to go
> directly
> > to the sender, but they are not. I suspect that this is because in
> php.ini,
> > I have to set the 'sendmail_from' to a specific address.
> >
> 
> I don't know if this will work, but try using ini_set  to change
> sendmail_from as necessary
> 
> http://uk2.php.net/manual/en/function.ini-set.php
> 
> List of ini options here
> 
> http://uk2.php.net/manual/en/ini.php#ini.list
> 
> 
> > Can anyone suggest an alternative, other than switching platforms?
> >
> > MTIA
> >
> >
> > 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] setting 'sendmail_from' on windows

2005-08-19 Thread George Pitcher
Hi,

I am sending emails out from php using a variety of 'From addresses',
depending on who is logged on. I would like bounced messages to go directly
to the sender, but they are not. I suspect that this is because in php.ini,
I have to set the 'sendmail_from' to a specific address.

Can anyone suggest an alternative, other than switching platforms?

MTIA


George

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



RE: [PHP] how to clear cache content in IE using php

2005-08-18 Thread George Pitcher
and are we talking about metric doohickies or imperial ones? No point
getting the wrong type.

George

> -Original Message-
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: 18 August 2005 2:33 pm
> To: php
> Subject: Re: [PHP] how to clear cache content in IE using php
>
>
> Jay Blanchard wrote:
> > [snip]
> >  how to clear the contents of cache in Internet explorer
> > using php.If any one finds the solution do reply.
> > [/snip]
> >
> > You cannot do this with PHP as PHP is server-side and you would need a
> > client-side doohickey to clear the client's cache.
> >
>
> Geez, have you seen the price of doohickies these days?
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
Mark,

Thanks, I'll follow that up as well. I don't have to do this straight away.

Cheers

George

> -Original Message-
> From: Mark Rees [mailto:[EMAIL PROTECTED]
> Sent: 16 August 2005 3:33 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] Advice sought on PHP site maintenance
>
>
> ""George Pitcher"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > John,
> >
> > Thanks for the input. I just knew I hadn't covered everything. My server
> is
> > currently set up as NT4/IIS. I suppose I could look to
> switching to Apache
> > though.
>
> Far be it from me to discrouage you from switching to Apache. However, on
> IIS, you can store the include files and classes you wish to use across
> several sites in a single location. You can then make this
> accessible to all
> sites by adding the location in as a virtual directory. This basically
> allows you to refer to it as if it were a directory within your
> webroot (if
> I remember right, it's been a while).
>
> There's a brief guide here:
> http://www.mvps.org/marksxp/WindowsXP/IIS/iis3.php
>
> Giood luck
>
> Mark
>
> >
> > Cheers
> >
> > George
> >
> > > -Original Message-
> > > From: John Nichel [mailto:[EMAIL PROTECTED]
> > > Sent: 16 August 2005 2:25 pm
> > > To: php-general@lists.php.net
> > > Subject: Re: [PHP] Advice sought on PHP site maintenance
> > >
> > >
> > > George Pitcher wrote:
> > > > Hi,
> > > >
> > > > I manage several sites for my company. Some are running our own
> > > service to
> > > > about 80 customers and others are running a service for some (5
> > > and growing)
> > > > of our customers. Its the latter one that I need advice on.
> > > >
> > > > I have an application where each customer has a website on our
> > > service. The
> > > > functionality and layout are almost identical throughout these
> > > sites and I
> > > > am striving to move any differences into configuration files.
> > > However, when
> > > > I make a change, I then need to make that change on each site.
> > > >
> > > > I would like, if possible to maintain a single set of web pages and
> have
> > > > that work for all sites. I currently use PEAR::DB and Smarty
> > > templating. The
> > > > current url syntax is www.mysite.com/client/ and I would like
> > > to keep them
> > > > thinking that they each have their own unique site.
> > > >
> > > > Can anyone suggest a structure for this?
> > >
> > > If I'm reading you right, you're looking to keep a group of
> > > scripts/classes in one place that all sites can draw from.  If this is
> > > the case, you could always set a global include directory
> (make it read
> > > only for the users of your service), and configure that path
> in Apache's
> > > httpd.conf or an .htaccess.  I do this on our box (all the sites are
> > > ours, but when I have to update Smarty/PEAR/custom scripts, I like to
> > > just do it in one place).
> > >
> > > 
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > > ->
> > >
> > > So on, and so forth.
>
> --
> 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] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
John,

Thanks for the input. I just knew I hadn't covered everything. My server is
currently set up as NT4/IIS. I suppose I could look to switching to Apache
though.

Cheers

George

> -Original Message-
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: 16 August 2005 2:25 pm
> To: php-general@lists.php.net
> Subject: Re: [PHP] Advice sought on PHP site maintenance
>
>
> George Pitcher wrote:
> > Hi,
> >
> > I manage several sites for my company. Some are running our own
> service to
> > about 80 customers and others are running a service for some (5
> and growing)
> > of our customers. Its the latter one that I need advice on.
> >
> > I have an application where each customer has a website on our
> service. The
> > functionality and layout are almost identical throughout these
> sites and I
> > am striving to move any differences into configuration files.
> However, when
> > I make a change, I then need to make that change on each site.
> >
> > I would like, if possible to maintain a single set of web pages and have
> > that work for all sites. I currently use PEAR::DB and Smarty
> templating. The
> > current url syntax is www.mysite.com/client/ and I would like
> to keep them
> > thinking that they each have their own unique site.
> >
> > Can anyone suggest a structure for this?
>
> If I'm reading you right, you're looking to keep a group of
> scripts/classes in one place that all sites can draw from.  If this is
> the case, you could always set a global include directory (make it read
> only for the users of your service), and configure that path in Apache's
> httpd.conf or an .htaccess.  I do this on our box (all the sites are
> ours, but when I have to update Smarty/PEAR/custom scripts, I like to
> just do it in one place).
>
> 
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>   ->
>
> So on, and so forth.
>
>
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



[PHP] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
Hi,

I manage several sites for my company. Some are running our own service to
about 80 customers and others are running a service for some (5 and growing)
of our customers. Its the latter one that I need advice on.

I have an application where each customer has a website on our service. The
functionality and layout are almost identical throughout these sites and I
am striving to move any differences into configuration files. However, when
I make a change, I then need to make that change on each site.

I would like, if possible to maintain a single set of web pages and have
that work for all sites. I currently use PEAR::DB and Smarty templating. The
current url syntax is www.mysite.com/client/ and I would like to keep them
thinking that they each have their own unique site.

Can anyone suggest a structure for this?

MTIA

George in Oxford

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



RE: [PHP] 'God' has spoken... :-)

2005-08-15 Thread George Pitcher
> Not only that, but as time goes by, community support (this list for
> instance) for 4 will likely diminish as others move on to later releases.
> Not only will the die-hard PHP4 users find it harder to get
> answers to their
> questions, but their answers to others will become less relevant to
> newer-version users.

I can speak form experience here, not PHP as this is such a wonderful
community, but Lasso. I used Lasso v3 from 2001-2005, hooking a FileMaker
solution to the web for a relatively small but complex UK-wide university
service and didn't need to upgrade to v5 when that rolled out (it wasn't
broke etc etc).

As I developed the PHP/MySQL solution that has now replaced it, I still
needed to maintain and improve the existing Lasso site. I found that I was
one of the only v3 users on the list and started getting nil responses to
pleas for help.

If you have the time, it's worth going with the flow, if not, then consider
jumping at say - every two years (at most) to keep up to date.

Just my 2p (no cents in England)

George in Oxford

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



RE: [PHP] Restarting windows from php

2005-08-10 Thread George Pitcher
Just out of interest, how is the restart going to authenticate itself to get
up and running?

I used to do something like this between two servers - but the were Macs and
I was using Frontier and it did work, but not without the odd mishap.

If you just want to do it remotely (without recourse to PHP), look at VNC.

George

> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sent: 10 August 2005 3:09 pm
> To: Karl-Heinz Christian Zeck; php-general@lists.php.net
> Subject: RE: [PHP] Restarting windows from php
>
>
> [snip]
> Does anyone have any idea how to restart windows from a php script?
> I tried the following:
>  exec('SHUTDOWN -r -t 01');
> or
>  exec('SHUTDOWN /r');
>
> I received the following warning message:  Warning: exec(): Unable to
> fork [SHUTDOWN -r -t 01].
>
> I never used this kind of functions before. What's wrong? In IIS for
> "Execute Permissions" I have "Scripts and Executables". What
> permissions should I set for the Internet Guest Account? Or something
> else caused the problem, not the permissions? Please help me.:)
> [/snip]
>
> Everyone, repeat after me..
>
> PHP is server-side, there's no place like home,
> PHP is server-side, there's no place like home,
> PHP is server-side, there's no place like home..
>
> If you are trying to restart Windows, locally, you have to use something
> client-side to affect that.
>
> --
> 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] cURL - is it best for me?

2005-07-26 Thread George Pitcher
Hi,

My main site allows authenticated users to insert bibliographic data into
our database. We ask them to start by putting in an ISBN or ISSN. Some
documentes don't have them, or the use is too lazy to look for them. Rather
than them entering jibberish, we first check that if they have entered
something - that its mathematically correct (there's a algorithm to check
these).

Where they don't know the ISBN/ISSN, I would like them to enter their
document title and then get my system to check the UK's main library biblio
service (COPAC) and see if the title exists on their db. I've set up a
simple cURL test which queries the COPAC site and displays the page as if it
was from my site (not quite what I wanted - I'd rather have a list of
ISBN/ISSNs and their associated titles without all the baggage).

So my questions are:

Is there a way for me to (using cURL) ask COPAC how many records match the
search and if >0, return the data in a way that I can use it as I wish?

If not, is there another tool that I should be using?

MTIA

George in Oxford (using a mix of NT4/XP by command of the company)

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



[PHP] SOAP client for CCC?

2005-07-07 Thread George Pitcher
Before I get too deep in building something, has anyone done any
devel;opment on a soap client for the USA Copyright Clearance Center's
Gateway webservice?

MTIA

George in Oxford

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



RE: [PHP] PHP vs. ColdFusion

2005-07-01 Thread George Pitcher
You need to define 'normal mailing list'. I'm on about 20 different lists
and only one of them has a default of 'reply to all'.

George

> -Original Message-
> From: Andrew Scott [mailto:[EMAIL PROTECTED]
> Sent: 1 July 2005 3:22 pm
> To: 'John Nichel'; php-general@lists.php.net
> Subject: RE: [PHP] PHP vs. ColdFusion
>
>
> John you're funny.
>
> No serious, these php lists don't work like the normal mailing lists where
> it send to an email address that is then broadcast to subscribers.
>
> But I guess you get what you pay for:-)
>
>
>
> -Original Message-
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 2 July 2005 12:15 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] PHP vs. ColdFusion
>
> Andrew Scott wrote:
> > Hey it's not my fault that this stupid list needs a reply all!
> 
>
> Learn how to use your mail client instead of expecting someone to
> bastardize the email headers.
>
> Andrew, meet /dev/null; /dev/null this is Andrew.
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] Copy to network share

2005-06-01 Thread George Pitcher
I never managed to get this working with IIS. I could with Apache (win)
though, after making sure that Apache was logged in as the administrator.

George

> -Original Message-
> From: Mikey [mailto:[EMAIL PROTECTED]
> Sent: 1 June 2005 7:54 pm
> To: php
> Subject: Re: [PHP] Copy to network share
>
>
> Jeff McKeon wrote:
>
> >That won't work.  I don't want the users mapping a drive on their local
> >machine.  I tried mapping it on the server running the IIS and doing as
> >you suggest, but it doesn't work.
> >
> >Jeff
> >
> >
> >
> Have you made sure that the IUSR account that IIS is running has has got
> the right permissions to access the drive that you have mapped?
>
> HTH,
>
> Mikey
>
> --
> 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] Building multi-page Word docs with PHP?

2005-05-26 Thread George Pitcher
Well guys, thanks for the feedback.

Firstly, I am on Windows, and my server runs on NT4. I have no say on that -
company policy.

The files are not zipped in any way as they are being sent to publishers'
rights departments, who struggle with PDFs at times.

I think I'll give COM a try. I do use it to parse an Excel file that we
receive in a predefined format.

Cheers

George

> -Original Message-
> From: Rory Browne [mailto:[EMAIL PROTECTED]
> Sent: 26 May 2005 2:47 am
> To: Jochem Maas
> Cc: George Pitcher; php-general@lists.php.net
> Subject: Re: [PHP] Building multi-page Word docs with PHP?
>
>
> Before we get ahead of ourselves, can we ask what OS you're using George?
>
> If you're using Windows, then you have COM. If you're not insane, then
> you'll have to use unix tools. For turning documents TO word docs,
> then the only way I can think of is to script OOo in some way.
>
> I'm assuming that you're already gzipping your rtf files?
>
> On 5/26/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> > George Pitcher wrote:
> > > Hi,
> > >
> > > I currently create my multipage docs by saving my word
> templates as chunks
> > > of rtf and then calling them as required as a very long string then
> > > outputting them to an rtf file and renaming it as '*.doc'. It
> works great
> > > except for the filesize which comes out at 900k for a
> two-page document.
> > > Opening in Word and saving reduces the file down
> dramatically, but that
> > > would prevent auto-generation and emailing - without human
> intervention.
> > >
> > > Does anyone know how to either create multipage docs in Word
> format to begin
> > > with, or to convert (on the fly) rtf to doc, or to save rtf
> as smaller file?
> >
> > I googled a bit a stumbled across this:
> >
> > http://www.xmlw.ie/aboutxml/wordml.htm
> >
> > requires word2003 tho.
> >
> > >
> > > MTIA
> > >
> > >
> > > 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] Building multi-page Word docs with PHP?

2005-05-25 Thread George Pitcher
Hi,

I currently create my multipage docs by saving my word templates as chunks
of rtf and then calling them as required as a very long string then
outputting them to an rtf file and renaming it as '*.doc'. It works great
except for the filesize which comes out at 900k for a two-page document.
Opening in Word and saving reduces the file down dramatically, but that
would prevent auto-generation and emailing - without human intervention.

Does anyone know how to either create multipage docs in Word format to begin
with, or to convert (on the fly) rtf to doc, or to save rtf as smaller file?

MTIA


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



[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] 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] 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] 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] 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] 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



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



[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] 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



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] 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] 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



[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] 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] 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] 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



  1   2   >