Re: [PHP] Windows/Apache Shopping Cart Software

2006-05-23 Thread Michael Crute

On 5/23/06, P. Guethlein <[EMAIL PROTECTED]> wrote:

Anyone have any recommendations/Links to Shopping Cart Software that
will run on Windows/Apache/PHP ?

Thanks, -Pete


Have you tried OSCommerce?

-Mike


--

Michael E. Crute
http://mike.crute.org

It is a mistake to think you can solve any major problems just with potatoes.
--Douglas Adams

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



Re: [PHP] RSS Generation

2006-04-10 Thread Michael Crute
On 4/10/06, Robbert van Andel <[EMAIL PROTECTED]> wrote:
> First off, and I'm sorry that this isn't a PHP specific question, but does
> RSS require an XML extension?  And if it does, how do I get the server to
> serve the PHP file correctly if I rename it with the xml extension?

No, you can use any extension you like for the RSS document, including
.php its the contents that matters.

-Mike


--

Michael E. Crute
http://mike.crute.org

It is a mistake to think you can solve any major problems just with potatoes.
--Douglas Adams

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



Re: [PHP] Why does this work on one server, but not another?

2006-03-23 Thread Michael Crute
On 3/23/06, tedd <[EMAIL PROTECTED]> wrote:
> >Are you escaping the image string before you insert it?
>
> Aaahh, no ?? Why is it going to attack me?
>
> But seriously, it works on one server, why not the other?
>
> On the other hand, it appears to object to
> something within the string -- so that might be
> the problem. Please forgive my ignorance, but how
> would I escape the image string -- do I use
> dbx_escape_string() or would something else be
> better?

I would base64encode the image string before puting it into the
database then you would probably not run in to quoting issues.

http://us3.php.net/base64encode


--

Michael E. Crute
http://mike.crute.org

It is a mistake to think you can solve any major problems just with potatoes.
--Douglas Adams

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



Re: [PHP] Upload via email?

2006-02-15 Thread Michael Crute
On 2/15/06, Nicholas Couloute <[EMAIL PROTECTED]> wrote:
> How would u make a script that uploads files to ur server via email? 1.
> user emails the server 2. if there is a audio file (amr) attached then
> add it a folder! Are there any scripts that can do that?


This will take some work but what you want to do is setup a email
account that you designate as the "upload email". You will want to
write a script to access this email box and download the content
directory. Will probably cron this script.

To really do this you need to understand how an email works, here is a
quick and dirty tutorial you will DEFINITELY want to do some further
reading on this. The headers define "metadata" (if you will) about the
message. The body follows. In an email with attachments the header
field 'Content-Type:' wil be 'multipart/mixed' and there will be a
boundary field. The boundary field lists a string of text that will be
used to separate the multiple parts of a message.You need to first
verify that the message is a multipart message and if it is extract
the boundary header. You can then parse through the message body
splitting it about the boundaries. Have a look at this sample body:

--_=_NextPart_001_01C62DA8.DE513F67
Content-Type: multipart/alternative;
boundary="_=_NextPart_002_01C62DA8.DE513F67"


--_=_NextPart_002_01C62DA8.DE513F67
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable



--_=_NextPart_001_01C62DA8.DE513F67--

--_=_NextPart_001_01C62DA8.DE513F67
Content-Type: image/jpeg;
name="Lights-0001.jpg"
Content-Transfer-Encoding: base64
Content-Description: Lights-0001.jpg
Content-Disposition: attachment;
filename="Lights-0001.jpg"

/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEPAAA/+4ADkFkb2JlAGTAAf/b
AIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxsc



--_=_NextPart_002_01C62DA8.DE513F67--


Notice that each part of the message begins and ends with the boundary
you extracted from the header. Once you have the contents of the
attachment you will need to base64-decode it and save it to a file.
All the necessary information to do this is contained within the body
block. Make sure you also check the content type, size, and filename
to make sure you are in fact getting the type of file you want.

The rest is up to your imagination. I would check out
http://pear.php.net/package/Net_POP3 and http://us2.php.net/imap. Let
me know how it goes.

-Mike

--

Michael E. Crute
http://mike.crute.org

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Routing downloads through PHP

2006-02-15 Thread Michael Crute
On 2/15/06, J_K9 <[EMAIL PROTECTED]> wrote:
> Barry wrote:
> > J_K9 wrote:
> >> Duncan Hill wrote:
> >>
> >>> On Wednesday 15 February 2006 11:35, J_K9 wrote:
> >>>
>  Duncan Hill wrote:
> 
> > On Wednesday 15 February 2006 11:05, J_K9 wrote:
> >
> >> Here's the exact 500 error I'm getting:
> >
> > Standard Apache error.  Look in your error log for more details
> > like it
> > suggests?
> 
>  I would, but I can't find it. I thought it was under /var/log, but
>  having taken a good look I just can't find the logs. And the fact
>  that I
>  can't use slocate to find them because I can't get root access to run
>  updatedb doesn't help either ;)
> >>>
> >>>
> >>> If you have read access to the apache configuration files, the
> >>> ErrorLog statement (+ServerRoot) should tell you where your logs are.
> >>>
> >>> (There's no need to CC me, I get the list :p)
> >>>
> >> Nothing's in the right place! I can't even find the Apache conf
> >> file... This is the problem with using external hosting - they do
> >> things differently. :@
> >>
> >> Aren't there any PHP functions I can use to let me know where the
> >> errors are happening? I'm sure I've seen one somewhere; I just don't
> >> remember it, that's all... ;)
> >>
> >> Thanks,
> >>
> >> J_k9
> >
> > The error you get is an "Apache" error and has nothing to do with php so
> > there are no error reportings within PHP for apache.
> >
> > There might be a problem setting the content header prolly because
> > Apache dont have them or what the hell i know.
> >
> > Sorry i can't help from here without any log output and or config files.
> >
> > Doesn't locate work on you system?
> > $ locate log
> >
> > Probably you have a virtual hosting.
> >
> > look at /var/www
> >
> > Otherwise no idea.
> >
> > The code is okay, i use it myself and it works just great.
> >
> > Greets
> > Barry
> >
>
> No - I'll have to get in contact with my hosting support team, because
> this is beginning to annoy me.
>
> locate doesn't work because it has no database to work from - and I
> can't updatedb because I don't have the necessary perms. I tried a 'find
> -name 'httpd.conf'', but that didn't work because it spat out a bunch of
> tasks from within /proc and also references to /home/user.daily/etc,
> ~.daily/ssl, ~.daily/mail, and a few more from there: all of which I
> don't have permission to access.
>
> Thanks for confirming that it works though - now all I have to do is
> send an email to the support team and wait for their reply. :)
>
> Cheers,
>
> J_K9

May I suggest you get a cheap box (you could build one for a few
hundred bucks, or ebay), get a copy of 
and do development locally, beats the heck out of external hosting for
development/learning stuff.

-Mike

--

Michael E. Crute
http://mike.crute.org

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Please Help!

2006-01-25 Thread Michael Crute
On 1/25/06, S Yang <[EMAIL PROTECTED]> wrote:
> Dear Sir/Madam:
>
> I am trying to split a DSA signature that is generated by openssl_sign()
> function in PHP, which should be made up of 2 numbers: r and s, but I don't
> know how to build the structure of the signature generated by PHP and then
> to split it into two numbers (r,s). Which method might I use to split the
> signature I have built in PHP into (r,s)? How can I know what the signature
> looks like? I appreciate your any helps in advance. I am looking forward to
> hearing from you.

http://www.catb.org/~esr/faqs/smart-questions.html

*SIGH* How many times must you tell people to use a descriptive
subject line. I swear reading ESR's how to ask questions the smart way
should be a requirement to posting on lists.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Can PHP works with telnet?

2006-01-23 Thread Michael Crute
On 1/22/06, HoWang Wang <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Recently I got a job to write a PHP webpage to display some infomation
> which have to obtain from telnet. Telnet is the only way to query the
> software. I have made a quick search on php.net but I can't found amy
> extension support telnet. Is there any way to do so? Or it is impossible
> with PHP but can be done with external binaries?
> Please help, thanks.
>
> HoWang Wong

http://www.google.com/search?q=php+telnet

And remember, if all else fails you can use sockets directly to do
what you want.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] DOM saveHTML() not outputting XHTML Strict

2006-01-23 Thread Michael Crute
On 1/23/06, Chris <[EMAIL PROTECTED]> wrote:
> Steve Clay wrote:
> >Monday, January 23, 2006, 1:35:13 PM, Chris wrote:
> >
> >>the ->saveHTML() method ... outputs as ``
> >>I need my output HTML to conform to XHTML strict.
> >>
> >Since XHTML is XML, try ->saveXML()?
> >
> >Steve
> >
> I've tried that, and it suits my purposes except for the fact that it
> always outputs the  tag in the front, which I can't have.

Why? XHTML is technically XML which requires a xml declaration. In any
case it is trivial to write a script that generates the files as XML
and strips off the first line of the file.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Graphs

2006-01-22 Thread Michael Crute
On 1/22/06, Weber Sites LTD <[EMAIL PROTECTED]> wrote:
> What is the best (Free) way to create good looking graphs with PHP?
>

Jpgraph is my favorite. Its got a pretty clean OO API and decent
documentation. Plus its PHP5 compatible.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

--
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 Michael Crute
On 12/6/05, Ben <[EMAIL PROTECTED]> wrote:
> Michael Crute said the following on 12/06/2005 09:53 AM:
> > On 12/6/05, Richard Davey <[EMAIL PROTECTED]> wrote:
> > Indeed, if you are bad at VI things go very slow but if you are good
> > at VI (I am semi-good) you can code FAR faster than any GUI I have
> > ever used.
>
> If you take the upfront time to learn how to use VIM you'll discover it
> is very powerful and very quick.  It's even better if you use it in
> conjunction with screen.
>
> > Plus you can use VIM on Windows too.
>
> Yes, though if you're stuck on Windows I'd suggest using VIM via Putty
> (even if you're using Putty to SSH to your local machine) so that you
> can resize your shell window horizontally as well as vertically.
>
> - Ben

Well if you properly setup GVIM (turn off the menus and toolbars) you
have about the same thing. Thats what I use at work instead of
notepad. It works really well.

My _gvimrc file looks like so and accomplishes exactly what you are
saying with GVIM

au GUIEnter * simalt ~x
set guioptions=
syn on
set guifont=Lucida_Console:h9:cANSI
set wrap!
set nu
set tabstop=4
emenu Edit.Color Scheme.torte
set nocp
set bs=2
set swapfile!

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

--
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 Michael Crute
On 12/6/05, Richard Davey <[EMAIL PROTECTED]> wrote:
> On 6 Dec 2005, at 17:36, M. Sokolewicz wrote:
>
> > Jason Petersen wrote:
> >> On 12/6/05, Jeff McKeon <[EMAIL PROTECTED]> wrote:
> >> Vim is my editor of preference.  If I have to use Windows, I
> >> usually go with
> >> Homesite (because I already have a licensed copy) or Textpad
> >> (because it's
> >> better than Notepad).
> >> IDEs?  Who needs 'em ;)
> >>
> > same here :)
> > Vim on UNIX machines, and Textpad on Windows
> >
> > both very good, simple, quick editors
>
> I used to think like that (10 years ago maybe), but then I realised
> that actually, my time is quite valuable and worth a fair bit, and
> it's best not to waste it.

Indeed, if you are bad at VI things go very slow but if you are good
at VI (I am semi-good) you can code FAR faster than any GUI I have
ever used.

Plus you can use VIM on Windows too.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

--
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 Michael Crute
On 12/6/05, Jeff McKeon <[EMAIL PROTECTED]> wrote:
> 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

Actually, there isn't much WORSE than FrontPage for any kind of
coding. My personal favorite for projects at work is Eclipse with
phpEclipse plugin and at home I use vim almost exclusively.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] page duration tracking

2005-11-30 Thread Michael Crute
On 11/30/05, MikeL <[EMAIL PROTECTED]> wrote:
> Is there a way to incorporate some type of time in a page to track the
> duration of time each individual visitor spent on a specific page with ..PHP?
>
> I know I can keep a counter with JavaScript, but I would like it to keep
> track in my stats file.
>
> I can track & log the arrival time, but would like to either track the page
> exit time, too.  It would be great to convert it to minutes:seconds for time
> spent viewing the page.
>
> I only want to track how much time someone spends on my index.php page
> before they leave the page.  I can track when they click to the next page in
> my site.
>
>
> Thanks for any help and suggestions!

Theoretically you should be able to use a javascript function in the
page unload to submit back to your server when somebody navigates away
from your page. Not sure if it would work 100% of the time but its
worth a try.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Re: Real-Time Form Updating

2005-11-18 Thread Michael Crute
On 11/18/05, Chase <[EMAIL PROTECTED]> wrote:
> Yikes...  I am dreadfully sorry to have offended everyone with my OBVIOUSLY
> non-PHP question.  I will look to JavaScript for help in this matter.
>
> Please end the spiteful personal emails regarding this topic.
>
>
> ""Chase"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I am trying to build an order form for our clients to use to order hardware
> >and software, or atleast get a price quote for such.  The page is done and
> >working using a FORM POST to a second page taht works on the variables and
> >generates the totals.
> >
> > That being siad, I have a field for total number of users that I would
> > like to calculate the total of about five variables in real-time, before
> > the submit button is activated.  Is this possible?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Must be a tough crowd around here on Friday afternoons.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



Re: [PHP] Is echo tag reasonably portable?

2005-11-15 Thread Michael Crute
On 11/15/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
>
> Jim Moseby wrote:
> >>Robin Vickery wrote:
> >>
> >>>On 11/15/05, Roman Ivanov <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> Can ' >>>
> >>>
> >>>The manual's reasonably explicit on the subject:
> >>>
> >>>"Note: Using short tags should be avoided when developing
> >>>applications or libraries that are meant for redistribution, or
> >>>deployment on PHP servers which are not under your control, because
> >>>short tags may not be supported on the target server. For portable,
> >>>redistributable code, be sure not to use short tags."
> >>
> >>I've seen this note. But I haven't seen a single server where
> >>short tags
> >>were disabled.
> >
> >
> > Nor have I. However, if I use long tags, my script will *always* work.
> If
> > I use short tags there is a *possibility* that it won't. So, when
> writing
> > code that is required to be portable, there is no reason to ever use
> short
> > tags.
>
> so how many people actually _need_ to write portable code? ok so many you
> are starting a project which will become a runaway success but until it
> starts
> receiving alot of attention use of short-open-tags is probably not your
> biggest
> issue either.
>
> lets assume that everyone should be writing completely portable apps, why
> does this
> ini setting exist? what is the point of offering a setting that can be set
> to a
> bad(tm) value by design?
>
>
Its just a best practice similar to setting error reporting to E_STRICT on
development web servers. Why is it such a big deal anyhow, just type the
three extra characters and get it over with. You could also use smarty to
avoid putting PHP in your templates at all.

I will throw in my vote for short open tags = off on the roughly 30 servers
that I administer across various organizations.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.


Re: [PHP] Can I call .html file as a form action instead of .php?

2005-10-10 Thread Michael Crute
On 10/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
> In addition to the Good column, let me add this:
>
> Once I made all my .html files go through PHP, I found myself adding a
> lot of cool little snippets to my files that I wouldn't have bothered
> with if I had to re-name the file, fix all the links, worry about
> search engines "losing" my page, etc.
>
> I would encourage anybody but the most hard-core million-hits-per-day
> super-stressed folks to just go ahead and use PHP on .htm and .html


Except its terrible form and not at all portable.

If 5% to 10% is putting you over the edge on performance, you're
> already in trouble anyway.
>
> NOTE:
> 5% to 10% was a lonnng time ago. I'd love to see more current
> benchmarks or, better, real-live stats from a moderately busy/complex
> server.


I highly doubt that many people use this configuration so there really
hasn't been any need for a new benchmark.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"


Re: [PHP] Question

2005-10-07 Thread Michael Crute
On 10/7/05, Sven Simons <[EMAIL PROTECTED]> wrote:
>
> I've installed PHP using the windows installer
> I try to open then php pages containing the following script :
>  echo "Current IP Address: ";
> $ipx = getenv("HTTP_CLIENT_IP") ? getenv("HTTP_CLIENT_IP") : 0;
> $ipx = !$ipx && getenv("HTTP_X_FORWARDED_FOR") ?
> getenv("HTTP_X_FORWARDED_FOR") : 0 ;
> $ipx = !$ipx && getenv("REMOTE_ADDR") ? getenv("REMOTE_ADDR") : 0 ;
> echo !$ipx ? "UNKNOWN" : $ipx;
>
> echo "";
>
> echo "Server IP Address: ";
> $ipx = getenv("SERVER_ADDR") ? getenv("SERVER_ADDR") : 0;
> echo !$ipx ? "UNKNOWN" : $ipx;
> ?>
> It works and gives me a correct current IP address
>
> When manually installing PHP it always gives me the status UNKNOWN.
>
>
Just use the $_SERVER[] superglobal array to grab the stuff you need. Don't
use the getenv function.
 -Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"


Re: [PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Michael Crute
On 10/6/05, Rick Emery <[EMAIL PROTECTED]> wrote:
>
> Knowing that I'm not the only one to want to connect to Microsoft SQL
> Server on Windows from PHP and Apache on Linux, I'm seeking advice.
>
> I set up a proof-of-concept application, using Gentoo Linux (with which
> I'm most familiar) as my base. Being a compile-from-source distribution
> with a lot of packages available, I simply had to set the "mssql" USE
> flag and emerge freetds and php. Voila; connectivity.
>
> Not surprisingly, now that my organization has decided to go with PHP
> on Linux, management wants to use a commercially supported distribution
> (Red Hat or Novell/SUSE). I was surprised to discover that I couldn't
> find RPMs for freetds, nor could I find php-mssql RPMs, and the php
> RPMs available in the yum repositories weren't compiled with
> --with-mssql.
>
> Is my only recourse to build freetds and php from source? I'm certainly
> capable of doing it, but I won't be the server administrator and I
> think it defeats what management wants to accomplish with a
> commercially supported distro (package management with easy updates).
>
> Is anybody in a similar environment that has an easy solution, or can
> anybody offer advice?
>


Being that you are already a Gentoo user you could use Portage to build your
RPMs for you. Not positive how to do this as I personally despise RPM but I
know it can be done. Check the man pages. " It is possible to create RPMs
(Redhat package manager files) using Gentoo's Portage, but it is not
currently possible to use already existing RPMs to install packages." (from
the Gentoo site).

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"


[PHP] PHP5 Webhost

2005-10-04 Thread Michael Crute
Hi All,

I am in the process of looking for a webhost for the company I work
for. I must have PHP5 support as the CMS I am using only supports
PHP5. Does anyone know of any good quality hosts that also support
PHP5 and MySQL for less than $40/mo? Dedicated hosting is right out as
we obviously don't have the budget for that. Any thoughts/suggestions
would be very much appreciated. Thanks.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"

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