Re: [PHP] PHP 5.2 and Apache 2.2 are really compatible?

2011-10-19 Thread Tim Thorburn

On 10/19/2011 11:36 AM, Joseph Adenuga wrote:

Dear All,


I’m using Window XP operating system. I’ve just installed
PHP 5.2.5 and Apache 2.2.8 over a week now. I’ve checked if Apache installation
is okay with ‘localhost’ in my Firefox browser and it displays ‘It Works!’ But, my php code?php  
echo h1Hello Web!/h1;
?  that I saved as ‘first.php’ in the ‘htdocs’ will not display “Hello Web! in 
my browser. In the ‘Review
Error Log file’ I found:


PHP Warning:  PHP
Startup: Unable to load dynamic library 'C:\\php\\ext\\php_msql.dll' - The
specified module could not be found.\r\n in Unknown on line 0

[Wed Oct 19 16:22:12 2011] [notice] Child 7728: Child
process is running

[Wed Oct 19 16:22:13 2011] [notice] Child 2016: Released the
start mutex

[Wed Oct 19 16:22:13 2011] [notice] Child 7728: Acquired the
start mutex.

[Wed Oct 19 16:22:13 2011] [notice] Child 7728: Starting 64
worker threads.

[Wed Oct 19 16:22:14 2011] [notice] Child 2016: All worker
threads have exited.

[Wed Oct 19 16:22:14 2011] [notice] Child 2016: Child
process is exiting

[Wed Oct 19 16:22:14 2011] [notice] Child 7728: Starting
thread to listen on port 80.


I’ve checked my Apache and PHP configurations again and
again. I’ve checked the information on the internet with more configuration
info. I don’t know what else to do. Please I’m very new to PHP codeand Apache 
environment. I need
your help. I don’t know what I’m doing wrong and what to do. Please please help.
Joseph


How did you install Apache/PHP on your computer?  If you went with the 
Windows binaries for each, did you ensure to get the VC6 version of PHP 
if you installed Apache2 from apache.org?  You may also need to set a 
binding in your hosts file that points to 127.0.0.1


Failing this, do you need Apache?  If you just want a web server to test 
some stuff on, you can download Microsoft's Web Platform - it will 
install and configure IIS to run with PHP, I think it'll even do MySQL 
as well if you install one of the available CMS'.  Less clicking and 
playing with text files if you're a beginner.  Could also try running a 
Linux distro in a VM on your computer - many will come pre-configured 
with Apache and PHP, or provide an easy installer/command line to get 
you up and running.  Ubuntu is very beginner friendly.


HTH,
-Tim


Re: [PHP] PHP installations, usage, and popularity

2011-09-20 Thread Tim Thorburn

On 9/19/2011 5:08 PM, Tedd Sperling wrote:

As such, I need information regarding how wide-spread PHP is (i.e., number of 
installations), who's using it (i.e., companies, organizations), and how it 
compares with other Web Languages (i.e., ASP, Ruby, etc.).
Since it's a school, you might also want to point out Moodle 
http://moodle.org/ is another example of PHP based, open source software 
that is used by many educational institutions throughout Canada and 
Australia (I'd assume the rest of the world as well).


By my own completely unscientific research and experience - it's very 
strange to come upon a URL that ends with .aspx or .jsp.  Considering 
that Linux (and its variants) powers the overwhelming majority of the 
Internet's web servers - it seems fair to conclude that PHP would be the 
most accessible web language there is.


Best of luck breaking through the education bubble.


Re: [PHP] Fwd: ezmlm warning

2011-07-20 Thread Tim Thorburn

On 7/20/2011 6:19 AM, Ashley Sheridan wrote:


Louis Huppenbauerlouis.huppenba...@gmail.com  wrote:


got the same problem today
mayhabs gmail had a small problem... who knows ;)

2011/7/20 Lester Caineles...@lsces.co.uk


Tamara Temple wrote:


Um... what's going on here? Why would google mail be bouncing??


Happens quite often ... just means that an email server has hickupped
somewhere so an email addressed to you has not got through

'76.75.200.58'

which I think is the same machine address on the message a deleted

this

morning for my email address

--
Lester Caine - G8HFL
-
Contact -

http://lsces.co.uk/wiki/?page=**contacthttp://lsces.co.uk/wiki/?page=contact

L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird -

http://www.firebirdsql.org/**index.phphttp://www.firebirdsql.org/index.php


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



I got it too, so its not just limited to gmail. Maybe a server in between not 
working correctly. I'm in the UK, are the rest of you who had problems this way 
too?
Thanks,
Ash
http://www.ashleysheridan.co.uk
I got the same email as well.  Not using gmail, and I'm located in 
Canada.  Guessing the mail server just had an oops.


Now, on to the next crisis.


Re: [PHP] PHP and Windows 7 g6-bit

2011-06-15 Thread Tim Thorburn

On 6/15/2011 11:37 AM, Byron Como wrote:

Does the precompiled windows binary work on win 7 64?

It does, however if you're using Apache as your webserver, for PHP 5.3+ 
you won't be able to use the binaries from apache.org for Windows.  
There is a link to Apache Lounge found here: 
http://windows.php.net/download/ which instructs you to download a VC9 
compiled version of Apache.


If you're using IIS, I think you can just download the version of PHP 
you're after and go.


Re: [PHP] iPhone sadness

2011-05-30 Thread Tim Thorburn
Is there any way that we could simply ban these ridiculous top-posting 
vs bottom-posting threads that seem to come along every few weeks?  I 
frankly don't care where a person writes a reply - I'm quite able to 
scan through an email message to find the relevant points regardless.  
Maybe we could add a [posting position rant] tag onto emails that 
discuss this topic so those of us who couldn't care less could simply 
have them directed straight to the trash can?


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



Re: [PHP] Newbie Question

2011-01-03 Thread Tim Thorburn

On 1/2/2011 5:56 PM, Adolfo Olivera wrote:

Thanks for the replies. I'll just put a php on all my html containing php.
A little of topic. Wich IDE are you guys using. I'm sort of in a catch
twenty two here. I been alternating vim and dreamweaver. I'm trying to go
100% open source, but I really find dreamweaver easier to use so far.
While I may get shot for saying this - I wouldn't worry too much about 
being 100% open source.  Use whatever gets the job done, period.  If 
you're more comfortable with Dreamweaver, stick with Dreamweaver.  In my 
day-to-day work I'll end up using a combination of Dreamweaver, Eclipse, 
and Notepad++, along with a little Pico/Nano to do quick edits on the 
server.  I know a few people who swear by NetBeans, though I haven't 
felt the need to try yet another editor just now.  I tend to prefer an 
editor that has code completion - sometimes makes for less typo mistakes 
and such, but that's just a personal preference, non-code completion is 
just as fine.


Now, onto the real debate - editor color scheme and font choices!  
(Don't reply, I know better ... I just had to .)




[PHP] Re: [!! SPAM] Re: [PHP] 1984 (Big Brother)

2010-09-13 Thread Tim Thorburn

 On 9/13/2010 9:10 AM, Steve Staples wrote:

here's a silly idea...

put the database on his computer (or the entire app).  that way, when
he's *there* he is logged in.  if the computer is off, he's not there,
the app wont work (and the database).

Steve



On Mon, 2010-09-13 at 11:26 +0100, Richard Quadling wrote:

On 12 September 2010 17:32, teddt...@sperling.com  wrote:

Hi gang:

I have a client who wants his employees' access to their online business
database restricted to only times when he is logged on. (Don't ask why)

In other words, when the boss is not logged on, then his employees cannot
access the business database in any fashion whatsoever including checking to
see if the boss is logged on, or not. No access whatsoever!

Normally, I would just set up a field in the database and have that set to
yes or no as to if the employees could access the database, or not. But
in this case, the boss does not want even that type of access to the
database permitted. Repeat -- No access whatsoever!

I was thinking of the boss' script writing to a file that accomplished the
yes or no thing, but if the boss did not log off properly then the file
would remain in the yes state allowing employees undesired access. That
would not be acceptable.

So, what methods would you suggest?

Cheers,

tedd

What operating system is he using?

Does he (for example), log into his computer and logoff/shutdown when
he goes home?

If he is using Windows (and I'm sure there are many ways to achieve
this), then in the Startup folder, a small PHP script which sets a
flag I'm here, would allow the DB to know he's at least logged in.

There are different ways to do this.
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_21195727.html
covers login/logout/startup/shutdown.


Do they have a clock card system for clocking in/out the building?
Could you read the database that the clockings are logged in? An odd
number for the day = he's in, even = he's out, missed clocking =
screwed/guess.

Ideally you want to hook into his normal activity if you can.



--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY




I'm pretty sure I'd have run for the hills after my first meeting with 
this client, but if you're sure you want to proceed ... Beyond the 
options mentioned, you could set it up so that the boss would log in 
each morning with a session that times out at the end of the work day 
(8, 10, 12, w/e hours later).  To make it even more secure, you could 
have the boss create new logins for each employee at the start of each 
day.  Since yesterdays passwords will no longer work, the boss will have 
to be there to issue new passwords to whomever he deems worthy of access 
on this day.  These passwords would of course expire at the normal 
leaving time, so if someone came in late for a password at 4pm and work 
ends at 6pm, their password would only last two more hours.


All in all, I'd still grill him more about what it is he actually wants 
and why, as all of the ideas presented thus far have at least a dozen 
different ways things can go wrong.  Putting the app on the bosses 
computer sounds great and all, but if he's sick or away on business 
suddenly no one in the office is doing any work.  Or when his hdd gives 
out or is replaced and IT's backup system wasn't as great as it could 
have been you'll have fun getting paid to re-do everything.  Having 
everything require a usb stick to launch sounds secure, until he loses 
the stick or forgets it at home one day.  For fun I'd suggest tagging 
him with a microchip which your application will constantly scan for and 
only activate when he's within a certain radius of his desk.  Retna 
scans shouldn't be overlooked either. insert Mission Impossible theme here


May the force be with you on this one.

-Tim


Re: [PHP] Convert deprecated POSIX functions into wrappers for equivalent PCRE functions

2009-11-09 Thread Tim Thorburn

Tony Marston wrote:
How many hosting companies write to all their account holders to ask 
permission before upgrading PHP, not just from 4 to 5, but all the releases 
in between? Very few of them, if any, in my experience.
  
I've no idea what horrible hosting companies you've had experiences 
with, however all of the companies I've used in the last few years have 
had an option to move back and forth between PHP4 and PHP5 in the event 
that certain scrips/frameworks/apps/whatever required one version over 
the other.  What makes you think these companies won't do the same thing 
when they finally decide to add PHP6 to their servers?  I doubt very 
many reputable hosting companies would simply upgrade to the latest 
flavor of PHP/Apache/MySQL/anything simply because it was released this 
morning without doing ample internal testing; if you or your clients are 
using one that does this - I'd advise you look elsewhere.


Whenever PHP6 reaches a stable release build, it will still be quite 
some time before its offered as an option to any mainstream shared 
hosting service - this should leave you ample time to adapt to incoming 
changes.  Failing that, you always have the option of purchasing your 
own server or VPS from any number of hosts to configure as you see fit.  
Or you can explain your moral outrage to potential clients detailing 
your refusal to work because you disagree with a proposed change that 
won't see the light of day for years to come; your call.


Incessant whining under the guise of expressing your own opinion isn't 
going to make everything better.  Sorry.


Re: [PHP] Semi-OT: PHP Login with client security

2008-05-21 Thread Tim Thorburn

Wolf wrote:

IMHO, you should be testing this long before taking it to the customer and 
having another failure to show off.

Personally, 2 failures is good reason NOT to purchase someone's services...

Wolf
Yes, I'm well aware of this - the point which you've continually failed 
to realize is that this code works on a large variety of servers (shared 
hosting, VPS, and managed), browsers, and internal network setups for 
the other 20+ clients I deal with regularly.  The problem is specific to 
a single clients internal setup.  In the future, kindly refrain from 
hitting the reply button if you simply don't have an answer beyond the 
standard your code is bad response.


Tim




Re: [PHP] Semi-OT: PHP Login with client security

2008-05-19 Thread Tim Thorburn

Wolf wrote:
 Tim Thorburn [EMAIL PROTECTED] wrote: 
  

Hi all,

Having a slight problem with a demo I gave at a clients last week - 
looking for a little advise.  Part of my demo involved a password 
protected area - the simplified process is: client enters password on 
login page  if login/password match encrypted database, PHP session is 
created, form forwards to a secured area  secured area checks to make 
sure PHP session is valid  if valid display content, if not, return to 
login screen.


This procedure is what I've used for many years, tested on a variety of 
servers and connections.  It works.  During the demo with my client, I 
was able to enter login/password info, the PHP session was created - 
however the screen would not forward to the secured area.  Instead I was 
pretended with a blank screen (client only has an outdated/non-updated 
version of IE6).  If I were to type in the URL to the secured area, it 
would display content properly.  As a test, I logged out, closed my 
browser and started again, this time entering an incorrect 
login/password - again it would not forward to the next screen properly, 
however this time when I typed in the full URL, it would not display as 
the session hadn't been created.


I've spoken briefly with my clients IT person, however he's unwilling to 
share any firewall information or really anything regarding their 
security setup - which I understand as I'm not an employee and just a 
contractor.


So, after long winded description - does anyone with network security 
experience have any idea either a) what I would need to ask the IT 
person to allow for their site only, or b) have any suggestions for 
alternate password authentication that may work given the above conditions?


TIA
-Tim



It sounds like your code is hokey, since IE is more stringent then other 
browsers, the code looks to be at fault.

What browsers did you test this with before taking it to the client?  

Firewalls shouldn't be any type of issue at all in this case, unless your browser is trying to redirect to another port, in which case, that should be something that the firewall won't affect internally anyways.  


So all roads point back to code failure.

Wolf
  
The code has been tested on Win2k, XP, Vista, Linux and OSX - IE5.x, 
IE6.x, IE7, Netscape 9, Firefox 2, Firefox 5 beta 5, and Safari.  Works 
on a variety of connections and locations outside of the clients office 
- does not work inside the clients office.


Re: [PHP] Semi-OT: PHP Login with client security

2008-05-19 Thread Tim Thorburn

robert wrote:


On May 18, 2008, at 10:14 PM, Tim Thorburn wrote:


Hi all,

Having a slight problem with a demo I gave at a clients last week - 
looking for a little advise.  Part of my demo involved a password 
protected area - the simplified process is: client enters password on 
login page  if login/password match encrypted database, PHP session 
is created, form forwards to a secured area  secured area checks to 
make sure PHP session is valid  if valid display content, if not, 
return to login screen.


This procedure is what I've used for many years, tested on a variety 
of servers and connections.  It works.  During the demo with my 
client, I was able to enter login/password info, the PHP session was 
created - however the screen would not forward to the secured area.  
Instead I was pretended with a blank screen (client only has an 
outdated/non-updated version of IE6).  If I were to type in the URL 
to the secured area, it would display content properly.  As a test, I 
logged out, closed my browser and started again, this time entering 
an incorrect login/password - again it would not forward to the next 
screen properly, however this time when I typed in the full URL, it 
would not display as the session hadn't been created.


I've spoken briefly with my clients IT person, however he's unwilling 
to share any firewall information or really anything regarding their 
security setup - which I understand as I'm not an employee and just a 
contractor.


So, after long winded description - does anyone with network security 
experience have any idea either a) what I would need to ask the IT 
person to allow for their site only, or b) have any suggestions for 
alternate password authentication that may work given the above 
conditions?


TIA
-Tim




try to use a full url instead of relative. e.g.

header('location: thankyou.php');

vs.

header('location: http://www.mysite.com/thankyou.php');

or use $_SERVER['DOCUMENT_ROOT'] for portability.

i think this is some weirdness on IE6. this worked for me.

I'll try $_SERVER['DOCUMENT_ROOT'] during my next demonstration which 
should be sometime next week.  Odd that this issue has never come up 
before O.o


[PHP] Semi-OT: PHP Login with client security

2008-05-18 Thread Tim Thorburn

Hi all,

Having a slight problem with a demo I gave at a clients last week - 
looking for a little advise.  Part of my demo involved a password 
protected area - the simplified process is: client enters password on 
login page  if login/password match encrypted database, PHP session is 
created, form forwards to a secured area  secured area checks to make 
sure PHP session is valid  if valid display content, if not, return to 
login screen.


This procedure is what I've used for many years, tested on a variety of 
servers and connections.  It works.  During the demo with my client, I 
was able to enter login/password info, the PHP session was created - 
however the screen would not forward to the secured area.  Instead I was 
pretended with a blank screen (client only has an outdated/non-updated 
version of IE6).  If I were to type in the URL to the secured area, it 
would display content properly.  As a test, I logged out, closed my 
browser and started again, this time entering an incorrect 
login/password - again it would not forward to the next screen properly, 
however this time when I typed in the full URL, it would not display as 
the session hadn't been created.


I've spoken briefly with my clients IT person, however he's unwilling to 
share any firewall information or really anything regarding their 
security setup - which I understand as I'm not an employee and just a 
contractor.


So, after long winded description - does anyone with network security 
experience have any idea either a) what I would need to ask the IT 
person to allow for their site only, or b) have any suggestions for 
alternate password authentication that may work given the above conditions?


TIA
-Tim


[PHP] Images PHP

2004-04-19 Thread Tim Thorburn
Hi,

I've created a small program that allows users to upload an image, and then 
resize that image one or more times depending on the desired outcome (once 
for web documents, twice for photo galleries, etc).  Anyways, it seems that 
a large number of my clients are using older digital cameras to show case 
their businesses (most often resorts).  This usually means taking pictures 
in poor lighting conditions which leaves the images either so black you 
can't see anything or completely washed out.  I've seen a few functions on 
php.net that speak of changing color options, but so far these seem to be 
simple make this purple square red now types.  Is there something built 
into PHP, or a 3rd party function that I'm not aware of, that would do 
simple color correction on uploaded files?  I'm looking for a very quick 
and cheap auto levels like function found within Photoshop.

Any idea if this is even possible?

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


[PHP] PHP on Novell server

2004-03-10 Thread Tim Thorburn
Hi,

I'm putting together a proposal to design a website that is to be hosted on 
a Novell Enterprise 5.1 webserver - I'm told its an off-shoot of the 
Netscape Enterprise server.  I've spoken with the network admin, and we're 
playing some phone tag right now, so I thought I'd ask here - is it 
possible to install PHP on this server?

Now part two which is most likely unrelated to this group, but maybe 
someone has come across this problem.  As of now, there is no database 
installed - the client wants to be able to update the content of all their 
sites by themselves ... with no database, this presents a problem as I see 
it.  I've only dabbled in Perl years ago until I found PHP to be much 
easier and faster for me to use.  Is there a way that ppl know of where I 
could let the client update their own content using only Perl (no idea what 
version) and no database?  I suppose there's some sick method of editing 
text files, but that seems a little bit more hokey than I'd like to get into.

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


[PHP] writing a manual

2004-02-09 Thread Tim Thorburn
Hi,

Sorry for the slightly off-topic post, but I've just had a client ask me to 
create a manual for the site management tool I wrote for them last 
fall.  Since I've never had to do one before I'm a bit lost on what would 
be a reasonable amount to charge and whether or not I should put any 
restrictions on how many copies they receive or if I'm ok with them 
photocopying and handing them out all over the organization.

Any thoughts on what a going rate for a manual is?  The site management 
tool does what most content management scripts do - lets the client 
add/edit/remove any and all text on their site, upload pictures, upload and 
re-size pics for a photo gallery ... nothing ground breaking - standard 
PHP/MySQL stuff, though last time I tried to put a manual together it 
quickly got to be over 40 pages and that client decided they didn't want it 
in the end.

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


Re: [PHP] FreeBSD to Linux -- PHP Issues

2004-02-03 Thread Tim Thorburn
I've moved sites between 3 or 4 different hosting providers until I found 
one that didn't sell out the week after we signed up, and was actually fast 
enough along with decent tech support.  Never had any troubles with PHP as 
long as the version was somewhat similar.  Started with Sun Solaris, went 
to RedHat Linux, then Debian, now on FreeBSD - all works well ;)

Though, now that I think of it, there was one situation where a client 
chose the hosting company - I have a set password restricted area that I 
use for most sites - it wouldn't work with the client chosen host ... after 
5 or 6 emails back and forth I finally got the host to make the one minor 
change in their php.ini file ... but it was a pain.

If you can, I'd suggest asking to see the result from phpinfo(); and 
compare the config settings between your current host and the target host - 
just for any inconsistencies you can look forward to later on ;)

At 05:39 PM 2/3/2004, John Nichel wrote:
Daryl Meese wrote:

Hello all,
I am considering changing hosting providers and moving from FreeBSD to
Linux.
My question is are there any PHP related issues to moving (functions that
don't work on Linux but do on FreeBSD, etc)?
I doubt there are but have to cover the bases.
Nope, no issues that I'm aware of (shouldn't be).  Functions working and 
not working will depend on a) the functions you're currently using, b) 
version of php on the different hosts, and c) if the new host has the 
options compiled in that you're currently using.

Also, if you got any suggestions for hosts with solid dedicated server plans
I would appreciate replies of the list.
Thanks,
Daryl Meese
I've had good experiences with JTLNet (http://www.jtlnet.com)

--
By-Tor.com
It's all about the Rush
http://www.by-tor.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


Re: [PHP] Why we love Microsoft (0t)

2004-01-23 Thread Tim Thorburn
At 04:00 PM 1/23/2004, you wrote:
Hey all,
heres something really interesting about that lovely company called
microsoft...(heard of them?)
Anyway, a 17yr old kid by the name of Mike Rowe opens up a webdesigning
company and names
it MikeRoweSoft (say it out loud..if you're really daft not to get it just
be reading it)..then registers
mikerowesoft.com...a couple of days later he gets an email from microsoft's
lawyers to hand over the
domain for 10$...he refuses and says no way, how about 10,000? a couple of
days later he gets
a legal document of around 25 pages from the lawyers!! They are going after
him extortion!!
Well there's also the small fact that under US copyright law if a company 
doesn't enforce its rights over said copyright, they lose the right to use 
it exclusively.  Take a look at Kleenex - they failed to take steps to 
protect their name and now all tissue paper is known as Kleenex.

If you step back and look at the situation from another angle - what if 
this 17yr kid was a 34yr old guy in a basement and what if Microsoft were 
Red Hat or SuSE or Debian or some company that alot of ppl don't 
hate.  Clearly this kid knew what he was doing - prolly had no malicious 
intent, but knew that he was using a similar sounding name for his personal 
company.

If the emotion is taking out of the equation - then it would seem right 
that the company enforced its rights on someone who may or may not have 
been impeding on their registered works.

Not that I'm a huge MS person or anything - in fact I've spent the last few 
weeks converting 3 sites from ASP/Access to PHP/MySQL ... just seems they 
automatically are painted to be the bad guy without due consideration.

Now as for the RIAA - these kids could not have handled their situation in 
a worse way.  Suing everyone in sight might sound like a good idea behind 
closed doors ... but c'mon now.  They would have been much more effective 
to realize that consumers would rather have music readily available - make 
an effort to buy Kazaa (since thats the one P2P they seem to be going after 
the most) and setup a monthly fee based service.  They would have made a 
killing, kept their monies coming in (which only serve to make sure that 
the execs have a shiny new Jag for each day of the week - the artists 
themselves make little to nothing from the studios - the majority of their 
income comes from merchandising and concert tours).

But enough for this week :P  

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


[PHP] PHP and email attachments

2004-01-21 Thread Tim Thorburn
Hi,

A client of mine asked today if I could setup their current mass mailer to 
send out attachments - I've never sent attachments with the mail() function 
before, but before we get into that ... I wanted to ask an opinion of the 
group.

Would it not be better, rather than sending a file out to hundreds of email 
addresses, to include a simple link in the body of the email to the image 
or file stored on the sites server?  I'm thinking this for two reasons - a) 
its a shared server and I wouldn't like it if the admins suddenly said I 
wasn't allowed to send mass emails with PHP anymore and b) I'm sure there 
are a growing number of ppl who really would not want to receive an email 
attachment.

This is the way I'm pitching it tomorrow, but are there any benefits to 
actually sending these ppl a file attachment to their email that maybe I'm 
not realizing?

Thanks

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


Re: [PHP] connecting PHP to MS Access

2004-01-20 Thread Tim Thorburn
Actually I found an even better program on mysql.com called MyDbConverter - 
converted the Access database into MySQL in a whole wopping second - now 
just needs a little cleanup and I can put it into the new table I've 
already created.

Thanks for all the help
-Tim
At 09:34 AM 1/20/2004, Brian V Bonini wrote:
On Mon, 2004-01-19 at 22:24, Tim Thorburn wrote:

 Now, the question is - how to connect PHP to MS Access?  I've done some
 searching on Google - most pages say wow, good luck with that or
 something similar - any thoughts?  I'm sure someone has had to do this
 before - am I on the right track or should I be looking elsewhere?
You can use MyODBC available at the MySQL site

--
BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] connecting PHP to MS Access

2004-01-19 Thread Tim Thorburn
Hi,

Ok, I know I've already spoken blasphemy ... but hear me out.  I have a 
client who wants to move her real estate site from a local ISP to a 
somewhat decent service.  Currently her site is all in Access/ASP - since I 
know not of that world, I'm converting it to MySQL/PHP.  The person they 
had before I'm told either took the database file they're currently using 
from a friends job, or some manual somewhere, so its not setup as well as 
it could be, so I've re-created the tables in MySQL to function a little 
better.

I've used most of the same names from the Access file, but a few things 
have had to be changed - its not a huge database, about 200 entries with 
about 40 rows each, but I'd rather not cut and paste all that in - I've 
tried exporting to CVS ... but its quite a jumbled mess, so the next best 
thing I thought would be to write a script to do the work for me.

I'm guessing its just a matter of connecting to Access, and going query by 
query through its database, pulling the fields I want then inserting them 
into MySQL and looping through the process once again.

Now, the question is - how to connect PHP to MS Access?  I've done some 
searching on Google - most pages say wow, good luck with that or 
something similar - any thoughts?  I'm sure someone has had to do this 
before - am I on the right track or should I be looking elsewhere?

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


[PHP] if and like together?

2003-10-26 Thread Tim Thorburn
Hi,

Is there an IF LIKE statement in PHP?  I've got a MySQL database setup with 
headings and text (think a news article site) - headings in one field, text 
in another.  In some cases, I don't want the contents of the heading field 
to appear on the site - in these cases, the headings begin with 'noshow-'.

So I'm thinking the easiest way to handle this is if there is something 
similar to the MySQL 'LIKE' command in PHP ... is there such a beast?

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


[PHP] when clients go bad

2003-09-18 Thread Tim Thorburn
Hi,

I've done freelance web design for about 7 years now off and on.  Just 
recently I've found myself dealing with the worst clients in the history of 
the world - ok, maybe not, but they've been pretty awful.

After about a year of working together, the business relationship became so 
bad that we decided to part ways.  They have now found themselves a 
beginner designer who whipped together a quick template site for them, but 
would now like access to all my source code (PHP, Flash, MySQL, and a 
little ASP) - without really giving any specific reasons.

The site was hosted on a 3rd party shared server which the client had full 
access to, up until the point they terminated the hosting contract - now 
they're demanding the site on CD.

As there is a very small web market in my area, I do not feel at all 
comfortable about just handing someone my source code.  I know in the 
graphics realm, unless the contract specifically states that the original 
source files will be provided - they are not given.

Has anyone had to deal with a similar situation?  Any thoughts or opinions?

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


Re: [PHP] when clients go bad

2003-09-18 Thread Tim Thorburn
As this is a very small market, for this one client I did not create a 
contract - there was however a very detailed proposal which did not include 
any source files.  Whether it'll stand or not, we also had a verbal 
agreement that they did not want any source files as at the time that we 
began our relationship, I had informed them that the source files would 
cost extra - the client at that time agreed that they did not want any 
source code.

Basically what is happening is the new guy in town wants an easy break 
and to get a look at how a real designer does work.

My thoughts on this matter are the client purchased the right to use the 
content management system that I created - not the actual content 
management system itself.  I have no qualms over providing the client with 
the content and mailing lists stored in the database - as the textual 
content was all supplied by them, and the email addresses were collected 
for their purposes.

I do take issue with handing over source code when in the beginning there 
was an understanding that they did not want source code - yet now when the 
new guy wants to learn something really quick, suddenly the source code is 
necessary.

The sad part of the entire situation is that the code still remains on 
their 3rd party shared hosting providers server - its just that the new guy 
doesn't know how to use an FTP program to download.

I do see what many of your are saying though - I will have to consider what 
to do further as from programmers I am getting an answer more leaning 
towards handing it all over, and from graphic artists I am getting a 
response saying that it's as much mine as a negative is to a photographer.

This has certainly taught me the benefit of just hanging up when you get 
that bad vibe from the beginning.

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


[PHP] change PHP include directory

2003-09-13 Thread Tim Thorburn
Hi,

Normally to change a sites include directory for PHP I'd use a .htaccess 
file and the following command:

php_value include_path .:/path/to/web/

Again normally, I would get the path to the site by doing a simple 
phpinfo(); command and find the _ENV[DOCUMENT_ROOT]  line near the end of 
the phpinfo(); page.

I've just setup an account with a shared hosting provider - I'm not fully 
sure if they allow me to use .htaccess or not, I've got a call into tech 
support but waiting is boring.  So while I wait - is there a better or more 
accurate way of determining the actual path to my site on their 
server?  I'm sure it has been written into PHP to specifically not allow 
this - just curious.

Secondly, if it is proven that my host does not allow .htaccess - is there 
another way for me to change the include directory from its default and 
into my sites root?

This current site isn't all that large, so I could live without changing 
the include path - but my next job (which is already committed to this same 
host) is fairly large and will be a necessity for the change to occur.

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


[PHP] get current path

2003-08-17 Thread Tim Thorburn
Hi,

The PHP site seems to be down right now ... so here's the question:  Is it 
possible for PHP to tell me the current path of a page?  For example: 
www.whatever.com/this/page.php - I'd like PHP to return /this/page.php ... 
is that possible and if so, how so?

TIA
-Tim


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


Re: [PHP] PHP vs ASP.NET formal opinions request

2003-08-14 Thread Tim Thorburn
I'm not so sure it's an entirely horrible idea for a university to focus on 
one area over another.  I went to art school - so I'm sure I'll be burned 
at the stake for having comments :P  But a great deal of my friends who 
took comp sci or comp eng in uni are greatly unemployed - why you 
ask?  Their school taught them how to use, program in, administer, and 
setup Linux Red Hat 7.3, then 8.0, and they just got a glimpse of 9.0 
before graduation ... cool right?  Funny thing is that a surprising number 
of businesses and corporations would much rather you be proficient in some 
manner of Microsoft product - the reason?  If it breaks there's someone you 
can call for help.

If your Windows Server blows up - you dial a very expensive Microsoft 
number to get help.  If your Linux server running some manner of PHP script 
blows up, you send out countless emails to mailing lists hoping someone out 
there in the open source community has had to deal with something similar 
to what you're doing now.

By no means am I saying that MS is a good thing, but from a corporate 
atmosphere - it's very difficult to get the upper management types to see 
why anything other than Windows 98 should be on a computer.

Although, I say go for making Linux a good thing ... goto netcraft.com - 
there you can type in the names of any of your favorite websites, 
commercial or corporate, or anything really and it'll tell you what web 
server their running and wether or not PHP is installed (well, in most 
cases anyways).  The best would be to find out what the favorite sites of 
the boss-types are and just hope they're all run by PHP :P

At 08:39 PM 8/10/2003 -0700, you wrote:
--- Douglas Douglas [EMAIL PROTECTED] wrote:
 In my University, people in charge of approving the
 graduation works advocate Microsoft's technologies.
 They don't believe in the free software movement or
 the open source movement. Some guys tried to develop a
 system using PHP and those people made them change to
 ASP.NET. They say because It's the future. According
 to them it's where the money is.
It is disappointing to me that a university exists that focuses on where the
money is rather than educating students. While I disagree with their 
prediction
of the future, I think it is irrelevant anyway. If they were to choose PHP
based on its promising future, it would be a better choice but for the wrong
reason (the right choice is to let the students choose their platform, since
it should be irrelevant to the lessons being taught).

Of course, my argument is moot if you are speaking of a vocational school or
something that is intended to teach applied skills, but I wouldn't call such a
school a university. These types of educational institutions are great, but
they have a much different purpose.
I would rather a university let the students choose their own platform, since
people are going to be most passionate about learning in an environment that
they choose. Besides, as I mentioned above, the platform should be irrelevant.
If you want to teach students to learn to program for the Web, you have failed
if they cannot apply what they have learned to any language - PHP, mod_perl,
ColdFusion, Java, etc.
To answer your original question, I suppose you can search zend.com for some
sort of comparison, but I am afraid you may be wasting your effort. It sounds
like your university has some fundamental misnuderstandings about education,
and that is going to be difficult to resolve.
Good luck.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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


[PHP] HTML email with Outlook

2003-07-15 Thread Tim Thorburn
Hi,

I've made a PHP script that sends out an automatic email through my servers 
cron system, it works well, but I thought I'd try to do some HTML email to 
get things to line up a little better.

To do so, I added the following line in my mail() command: -Type: 
text/html; charset=iso-8859-1

When I check the messages sent out with Eudora, the HTML email comes in 
perfectly.  However, when I check with Outlook Express 6 - I get the actual 
HTML code rather than the nicely formatted email that I had created.

Should I be using another line in my mail() command?  I've recieved HTML 
email before with Outlook Express on my machine without changing any 
settings at all.  Also, I had sent an email from my script to hotmail and 
the HTML email worked fine there too.

Any thoughts?

Thanks
-Tim


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


Re: [PHP] HTML email with Outlook

2003-07-15 Thread Tim Thorburn
Thanks to all those who responded, as always, spelling is key.  Where I had 
-Type: text/html ... it should have read Content-Type : text/html ...

So it works for now, and hopefully will continue to.  I know that there are 
a number of email programs out there that do not support HTML mail, as well 
I know there are a great many of individuals who do not enjoy it 
either.  We're just running a trial base here to see what works, if it 
turns out that the majority of our customers do not enjoy it, then we'll 
switch to plain text (actually built the plain-text one first, this is just 
an add-on)





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


[PHP] mail()

2003-07-14 Thread Tim Thorburn
Hi,

I've made a script that loops through a MySQL database and sends a message 
to all users with an email address on file.  My client is now not certain 
if all their email addresses are accurate and would like to know which ones 
are and which ones are not.

Is there a way, using mail() to tell if an email was not sent to a 
specified address?  I'm on a shared server, so I don't have access to logs 
other than the standard ones from apache for web tracking.

We're using PHP 4.3.0, MySQL 4.0.13, and Apache 1.3.26

Thanks
-Tim


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


[PHP] changing PHP include location without .htaccess

2003-06-22 Thread Tim Thorburn
Hi,

I have a site running on a shared server (and as such, I have no access to 
the php.ini file) that I'd like to be able to change the default include 
path.  I've done this before using the .htaccess file and the following 
command:

php_value include_path .:/path/to/web/

However, on this particular server that command produces an error 500 on 
all PHP files with the above command in the .htaccess file.  Is there 
another way that I can change the default include path?

The server is running FreeBSD 4.4 and PHP 4.3.2RC4

Thanks
-Tim


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


[PHP] reverse DNS lookup with PHP

2003-06-14 Thread Tim Thorburn
Hi,

I'm setting up a simple tracking program for a website I'm working 
on.  Currently it records a visitors IP address, but I would like to be 
able to do a DNS lookup of these IP addresses.  Is this possible with PHP 
and if so, how is it done?  I've been looking through Google, and the very 
few real results I've come across are large perl programs which make little 
to no sense to me.

Any help would be greatly appreciated.

Thanks
-Tim


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


[PHP] getting page title using PHP

2003-06-10 Thread Tim Thorburn
Hi,

As a matter of curiosity I've created a little script that will check what 
screen resolution visitors to my site are using and store the information 
into a MySQL database.

So far, I'm recording the users IP address, screen resolution, and the 
date/time they visited.  Now I'd like to be able to use this same script 
for all my pages - but I don't want to have to add in a page title each 
time I want to use the script, nor do I want to make page titles in PHP for 
all my pages.

Is there a command in PHP that can get what's between the title and 
/title tags?  I found a few scripts that can get page titles if they are 
given a URL to go seek - but these scripts seem to store most of the pages 
HTML code in memory and I don't think my web host would enjoy that.

TIA
-Tim


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


[PHP] setting up a cron job for a PHP script

2003-06-04 Thread Tim Thorburn
Hi,

I've setup a simple PHP script that runs through a database table and sends 
an email to a group of members asking them to verify their information.  My 
new ISP allows me to access the cron tab so we can have this script run at 
set intervals.  However I'm a little new to the whole cron tab command line 
... is it possible to have a PHP script execute on command from a cron 
tab?  And if so, could someone proide an example of say having the script 
run on the first of every month?  We're using 4.3.0 if that helps.

Thanks
-Tim


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


[PHP] selecting first character from a MySQL table

2003-06-04 Thread Tim Thorburn
Hi,

First, let me say many thanks to those who responded to my cron tab 
question - it's working well now.  And now for my next trick ;)

I'm looking for more of an opinion here.  I'm doing an alphabetical listing 
of members for this site, I've done a general query of my MySQL table to 
select all the members, but I was wondering if PHP could select only the 
first character and display only those members who's name begins with an 
'A', 'B', 'C', etc?

I know I can do a selective query in MySQL using the LEFT command - but 
that would mean doing a query for each letter of the alphabet - is there a 
better way, or shall I start querying away?

Thanks
-Tim


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


Re: [PHP] chill out

2003-04-02 Thread Tim Thorburn
Hi,

I'd have to agree with the original poster on this topic - I've been on 
this list for about 3 years now, at times it is helpful - and then there's 
every other day.

Granted, there are guru's out there that know all there is to know about 
PHP, and then there's the new kid that has no idea what it is, but either 
wants to learn or has to learn.  And it is quite possible that not everyone 
is as adept at finding information online - if you're new to server-side 
programming languages in general - how or why would you know of the great 
many repositories of information available online?

Sarcasm is one thing, gawd knows I use it on a by the minute basis ... but 
when a newbie posts a question that may seem simple to some - yet utterly 
impossible to others, is it constructive to tell them to go back and RTFM 
in a violent manner?  Suggesting that they review the manual again may 
help, or better yet - if you think it's not worth your time, that's what 
the trash can button is for.

In general, I've had great luck with this list - it just seems the majority 
of puter ppl don't have super ppl skills ;)

Now back to work



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


[PHP] Select email addresses from MySQL

2003-03-20 Thread Tim Thorburn
Hi,

A few days ago I posted a question about sending mass emails through PHP - 
the good news is I've got my script sending an email to each address stored 
in my MySQL database.  Now my client would like the ability to individually 
select the email addresses that are sent out.

Has anyone done something similar to this?  Any pointers to offer?

Right now I'm thinking that I'll display all the email addresses stored in 
the database with check boxes beside them, then only those addresses which 
are checked will be sent ... however, I'm not sure if that's the best or 
most efficient way to handle this ... the more I think about it the more I 
think that's going to make it overly and unnecessarily complex.

Any thoughts?

Thanks
-Tim


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


[PHP] mass mail and selected mailings

2003-03-18 Thread Tim Thorburn
Hi,

I've just been asked by a client to create a mass mail program in PHP which 
the client can use to send a single message to everyone in it's email 
database, but also have the option to select which email address the 
message will go to.

I've done a simple script like this before which basically loops through 
the database, selects all the email addresses, and then sends out one big 
message.  The problem with that one, was that the To: field listed all the 
email addresses that were sent.  For obvious reasons, they do not want all 
email addresses included within the To:, CC:, or Bcc: fields.

Using PHP's mail() function, is it possible to conceal the email addresses 
being sent?  If there are not, are there any PHP/MySQL based applications 
that will do this?  Keeping in mind that I am using a shared hosting 
provider and do not have direct access to the server itself.

Thanks
-Tim


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


Re: [PHP] sososoosos!!!!

2003-02-13 Thread Tim Thorburn
ROTFLMAO!!

Strong Bad on PHP ... we totally need to make Strong Bad the PHP mascot ;)

At 03:32 PM 2/13/2003 -0500, you wrote:

Do you know how many internet etiquette rules you're breaking by typing in 
all caps like that?  Well you're breaking one.  Don't type in all caps.
--Strong Bad

Anyway, download the .zip from http://www.php.net/downloads.php and read 
the installation instructions included with it.

Luis A wrote:

HI EVERY BODY=20


I HAVE THE FOLLOWING TROUBLE INSTALING PHP


GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING =
APACHE
VERSION


apache_1.3.26-win32-x86-no_src.msi


I BEEN TRIED THE VERSIONapache_1.3.26-win32-x86-no_src.exe  BUT HE =
SEND
IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST
??








--
The above message is encrypted with double rot13 encoding.  Any 
unauthorized attempt to decrypt it will be prosecuted to the full extent 
of the law.




--
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] Why PHP doesn't work with Apache2?

2003-01-23 Thread Tim Thorburn
Just to add a little fuel to the fire, the only way I've seen or been able 
to get PHP and Apache 2 working together is by installing each from my Red 
Hat 8.0 CD's.  When I tried to compile each together, I got many an error.

When I start doing some actually web work on my testing server, I imagine 
I'll uninstall Apache 2, and go with some version of 1.3



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



[PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
Hi,

After a day and a half of pounding my head against the wall I believe I've 
identified the source of the problem.  When I create and register the 
session in my login page - it does not carry forward to any other 
pages.  I've found this by going through several different tutorials for 
making password protected areas using PHP and Sessions that I've found both 
online and in books - all produce the same result on the server with 
attitude - yet all work on all other servers I'm currently using for my 
hosting.

So, since this is an eCommerce site for my client and they're getting 
increasingly impatient with the progress made I'm left with little choice 
in this matter - as moving the site now would be unthinkable, and tech 
support at the hosting company is less than stellar, and generally not in 
English.  Are there any obvious PHP settings that I'd need to adjust to 
ensure that Sessions can be carried forward to additional pages?  My only 
other option now is to force my client to login to each screen in the admin 
area (conceivably this could mean the client would need to log in to a 
minimum of 8 different pages to observe their records and make changes to 
the site).

I'm at the point of desperation and sleep deprivation ... If there are no 
obvious PHP settings that need to be altered - what else could be producing 
this problem?

Thanks
-Tim



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



RE: [PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
Hi,

I'm using PHP 4.1.2 on the server with problems - it's hosted on a shared 
server and thus I have no direct access to much of anything.  I have had 
this script running on versions 4.0.6 thru 4.2.2 with no problems until now.

Here are the settings attained from phpinfo(); for the server that does not 
work - 4.1.2 ... and from the server that does work 4.2.2

After the Configure Command of each is a list of settings that differ.

Much thanks for responding so quickly and at such a late hour!!

Thanks
-Tim

PHP 4.2.2 (works fine)

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mcrypt' 
'--enable-bcmath' '--enable-calendar' '--with-xml' 
'--with-swf=/usr/local/flash' '--with-gd=../gd-1.8.4' 
'--with-jpeg-dir=/usr/local' 
'--with-imap=../imap-2001.BETA.SNAP-0107112053' '--with-ming=../ming-0.1.1' 
'--enable-magic-quotes' '--with-mysql' '--enable-safe-mode' 
'--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-curl' 
'--with-zlib'

Settings:
allow_call_time_pass_reference ON
extension_dir ./
magic_quotes_gpc ON
register_argc_argv ON
sendmail_from no value
unserialize_callback_func no value
variables_order EGPCS

PHP 4.1.2 (doesn't work)

'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' 
'--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' 
'--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' 
'--with-db' '--with-gdbm' '--enable-mbstring' '--enable-mbstr-enc-trans' 
'--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' 
'--enable-xml' '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap' '--with-curl=shared' '--with-pdflib=shared'

Settings:
allow_call_time_pass_reference OFF
extension_dir /usr/lib/apache/php
magic_quotes_gpc OFF
register_argc_argv OFF
sendmail_from [EMAIL PROTECTED]
variables_order GPCS


At 07:11 PM 1/21/2003 +1000, Timothy Hitchens \(HiTCHO\) wrote:
What version of PHP are you using and do you have globals turned on?


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Tim Thorburn [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 21 January 2003 6:59 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP Sessions


 Hi,

 After a day and a half of pounding my head against the wall I
 believe I've
 identified the source of the problem.  When I create and register the
 session in my login page - it does not carry forward to any other
 pages.  I've found this by going through several different
 tutorials for
 making password protected areas using PHP and Sessions that
 I've found both
 online and in books - all produce the same result on the server with
 attitude - yet all work on all other servers I'm currently
 using for my
 hosting.

 So, since this is an eCommerce site for my client and they're getting
 increasingly impatient with the progress made I'm left with
 little choice
 in this matter - as moving the site now would be unthinkable,
 and tech
 support at the hosting company is less than stellar, and
 generally not in
 English.  Are there any obvious PHP settings that I'd need to
 adjust to
 ensure that Sessions can be carried forward to additional
 pages?  My only
 other option now is to force my client to login to each
 screen in the admin
 area (conceivably this could mean the client would need to
 log in to a
 minimum of 8 different pages to observe their records and
 make changes to
 the site).

 I'm at the point of desperation and sleep deprivation ... If
 there are no
 obvious PHP settings that need to be altered - what else
 could be producing
 this problem?

 Thanks
 -Tim



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




Re: [PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
Yes, the examples from the manual do work on the server using PHP 4.2.2 - 
however they do not work on the server using PHP 4.1.2.

I've been using this same script for many sites with PHP versions 4.0.6 
thru 4.2.2 with no problems until now which leads me to believe that I must 
attempt to change a PHP setting through .htaccess since it is hosted on a 
shared server.

I've tried the example from the manual on several other sites - works 
everywhere but on this problem server.

Thanks
-Tim

At 05:56 PM 1/21/2003 +0800, you wrote:
On Tuesday 21 January 2003 17:39, Tim Thorburn wrote:
 Hi,

 I'm using PHP 4.1.2 on the server with problems - it's hosted on a shared
 server and thus I have no direct access to much of anything.  I have had
 this script running on versions 4.0.6 thru 4.2.2 with no problems until
 now.

 Here are the settings attained from phpinfo(); for the server that does not
 work - 4.1.2 ... and from the server that does work 4.2.2

 After the Configure Command of each is a list of settings that differ.

Again, does the simple example from the manual work? If it works we can
eliminate config settings and concentrate on your code.

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Endless the world's turn, endless the sun's spinning
Endless the quest;
I turn again, back to my own beginning,
And here, find rest.
*/


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




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




RE: [PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
There is some discussion as to whether my globals are on or not ... I am 
using session_register to name my sessions, and then the global command 
later on on the individual pages to remember which session it is we're 
looking for.

It would be simply priceless if sessions were broken in 4.1.2 - and make 
much sense in the long run.

Thanks
-Tim

At 05:19 AM 1/21/2003 -0500, you wrote:
 Yes, the examples from the manual do work on the server using PHP
4.2.2 -
 however they do not work on the server using PHP 4.1.2.

 I've been using this same script for many sites with PHP versions
4.0.6
 thru 4.2.2 with no problems until now which leads me to believe that I
 must
 attempt to change a PHP setting through .htaccess since it is hosted
on a
 shared server.

 I've tried the example from the manual on several other sites - works
 everywhere but on this problem server.

Wasn't it 4.1.2 that had broken sessions? I remember one version that
came out that was just broke and you had to do a bunch of workarounds to
get things to work normally. Was that it?

Are you using the $_SESSION array or relying on register_globals?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.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




Re: [PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
Ok, here's the sample code I found in one of my PHP books - it doesn't work 
exactly like my original script for checking passwords, but it does a close 
enough job to let me know that the sessions aren't staying registered.

I could ask my host if anyone else has had problems, but that would mean 
being able to get them on the phone, find someone who speaks English, and 
then hope that person has any kind of experience with Linux/PHP - which I'm 
quickly finding does not exist.

As it is a shared hosting situation, and I have no shell access (through 
telnet or SSH), I cannot check the php.ini file to see.

authmain.php
?
session_start();

if ($userid  $password)
{
// if the user has just tried to log in

$db_conn = mysql_connect(localhost, login, passWord);
mysql_select_db(databaseName, $db_conn);
$query = SELECT * FROM userlogin WHERE user='$userid' AND 
passwd=password('$password');
$result = mysql_query($query, $db_conn);
if (mysql_num_rows($result)  0)
{
// if they are in the database register the user id
$valid_user = $userid;
session_register(valid_user);
}
}
?
html
head
titleTest Sessions/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body
?

if (session_is_registered(valid_user))
{
echo You are logged in as: $valid_user bra 
href=\logout.php\Log out/abr;
}
else
{
if (isset($userid))
{
// if they've tried and failed to log in
echo Could not log you in;
}
else
{
// they have not tried to log in yet or have 
logged out
echo You are not logged in.br;
}

// provide form to log in
echo form method=post action=\authmain.php\;
echo table;
echo trtdUserid:/td;
echo tdinput type=text name=userid/td/tr;
echo trtdPassword:/td;
echo tdinput type=password name=password/td/tr;
echo trtd colspan=2 align=center;
echo input type=submit value=\log in\/td/tr;
echo /table/form;
}
?
br
a href=members_only.phpMembers section/a
/body
/html

members_only.php
?
global $userid;
session_start();

echo h1Members only/h1;

// check session variable

if (session_is_registered(valid_user))
{
echo pYou are logged in as $valid_user./p;
echo pMembers only content goes here/p;
}
else
{
echo pYou are not logged in./p;
echo pOnly logged in members may see this page./p;
}

echo a href=\authmain.php\Back to main page/a;
?

At 06:29 PM 1/21/2003 +0800, Jason Wong wrote:
On Tuesday 21 January 2003 17:59, Tim Thorburn wrote:
 Yes, the examples from the manual do work on the server using PHP 4.2.2 -
 however they do not work on the server using PHP 4.1.2.

 I've been using this same script for many sites with PHP versions 4.0.6
 thru 4.2.2 with no problems until now which leads me to believe that I must
 attempt to change a PHP setting through .htaccess since it is hosted on a
 shared server.

 I've tried the example from the manual on several other sites - works
 everywhere but on this problem server.

It's time to see some code :)

Does sessions work at all for the other people on your shared server? Ask 
your
host whether anybody else has complained.

 PHP 4.1.2 (doesn't work)
 '--enable-mm=shared'

Would this have anything to do with it? Apparently there could be problems
with storing sessions in mm:

  http://marc.theaimsgroup.com/?l=php-generalm=104311365417871w=2

Check in php.ini whether sessions are file based or using mm.

--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Goals... Plans... they're fantasies, they're part of a dream world...
-- Wally Shawn
*/


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



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




Re: [PHP] PHP Sessions

2003-01-21 Thread Tim Thorburn
Ok, here's what I've found:

register_globals is ON
however
register_argc_argv is OFF on the server with problems.

The server is a Sun Cobalt server running some form of Linux.

My local machine that I work on is WinXP Pro using PHP 4.3.0, on this 
machine I've got register_globals set to ON and register_argc_argv ON as 
well ... I'm not entirely sure what register_argc_argv does, but could this 
be the problem?

At 09:41 PM 1/21/2003 +1100, Justin French wrote:
on 21/01/03 9:25 PM, Tim Thorburn ([EMAIL PROTECTED]) wrote:

 There is some discussion as to whether my globals are on or not ... I am
 using session_register to name my sessions, and then the global command
 later on on the individual pages to remember which session it is we're
 looking for.

No no no... check the output of phpinfo(), or check your php.ini file to see
if the directive register_globals has a value of ON or OFF.

This is more than likely the problem I think.

Also check the same value on your local machine.

Justin


--
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] PHP and Sessions?

2003-01-20 Thread Tim Thorburn
Hi,

I've created a password protected area on the site I'm working on using PHP 
Sessions - I've done this several times before without any 
difficulty.  This time, I've copied my old code - made the necessary 
changes for login/passwd/database names, yet the sessions don't appear to 
be working.

I've been comparing the PHP settings on each server - the server that works 
is using 4.2.2, the one that does not is using 4.1.2.  Other than that, the 
only difference is that on the server that works I've changed the path to 
the PHP include dir (from the server set default into my account).

Can anyone offer any suggestions?



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



Re: [PHP] PHP and Sessions?

2003-01-20 Thread Tim Thorburn
Yes, I've also had this script working on PHP 4.0.6 - basically I'm looking 
for reasons as to why the sessions may not be functioning properly.  Right 
now I'm going line by line through the configuration of PHP on the server 
that works (4.2.2) and the server that doesn't work (4.1.2) - I'm hoping to 
find some difference, otherwise I don't know how to put password protection 
on the site.

Another interesting issue with the site that doesn't work - if I try to add 
a .htaccess file changing the default include directory of PHP (as I've 
done many other times with various hosting companies) suddenly all my .php 
files cease to work and error screens popup.

I wouldn't call myself a newbie, but I wouldn't call myself an expert - I 
think I'm somewhere in the middle ground of moderate user who's clued right 
now ...

Any help on this would be greatly appreciated.

Below I've compiled a list of the differences between the PHP 
configurations - perhaps something in here may shed some light?

PHP 4.2.2 (works fine)

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mcrypt' 
'--enable-bcmath' '--enable-calendar' '--with-xml' 
'--with-swf=/usr/local/flash' '--with-gd=../gd-1.8.4' 
'--with-jpeg-dir=/usr/local' 
'--with-imap=../imap-2001.BETA.SNAP-0107112053' '--with-ming=../ming-0.1.1' 
'--enable-magic-quotes' '--with-mysql' '--enable-safe-mode' 
'--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-curl' 
'--with-zlib'

Settings:
allow_call_time_pass_reference ON
extension_dir ./
magic_quotes_gpc ON
register_argc_argv ON
sendmail_from no value
unserialize_callback_func no value
variables_order EGPCS

PHP 4.1.2 (doesn't work)

'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' 
'--with-gettext=/usr' '--enable-safe-mode' 
'--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' 
'--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' 
'--with-db' '--with-gdbm' '--enable-mbstring' '--enable-mbstr-enc-trans' 
'--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' 
'--enable-xml' '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib' 
'--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' 
'--with-imap' '--with-curl=shared' '--with-pdflib=shared'

Settings:
allow_call_time_pass_reference OFF
extension_dir /usr/lib/apache/php
magic_quotes_gpc OFF
register_argc_argv OFF
sendmail_from [EMAIL PROTECTED]
variables_order GPCS

Thanks
-Tim



[PHP] Mass Mailing with PHP MySQL

2003-01-19 Thread Tim Thorburn
Hi,

I'm working on a mailing solution for a client.  His site collects email 
address from a 'Send this site to a friend' page (user enters their email 
address and up to 10 other addresses - a message is then sent to the 10 
addresses from the users own email address).  The addresses are then stored 
in a MySQL database - a column for the users email address, and then a 
column each for the additional 10 addresses.

Now the client would like to have the ability to send an email to all 
addresses collected at once - to inform the addresses of a sale, etc.  I'm 
guessing for this to be done, I'd have to select all the DISTINCT email 
addresses from the 11 columns (users email, and the 10 addresses), then use 
a loop to send the mail out.

I had planned on using PHP's mail() function - does anyone know of any 
limitations imposed by this method?  Normally, I'd contact the ISP and ask 
them directly, however it's been several weeks since they've answered the 
phones.

Does anyone have any other/better options that I should pursue?  This will 
be my first mass mailing typed job so I'm not really sure where to begin or 
if I'm on the right path at all.

Thanks
-Tim



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



[PHP] Finding last entry in MySQL database

2002-11-15 Thread Tim Thorburn
Hi,

I'm creating a form which will allow individuals to add themselves to an 
online database and ask if they'd like to upload a picture.  I have the 
form setup which allows the individuals to add themselves - currently it 
asks if they have a picture to upload (a yes or no drop menu).  On the 
screen after the individual adds them self, I'd like to check the database 
for the last entry (the one just made) and then see if the picture column 
has a yes or a no stored.

What I don't know is how to select the last entry in a database ... I'm 
sure its something very simple, but with being up until 5am working on this 
site - it's slipped by caffeine powered brain.

Thanks
-Tim



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



[PHP] PHP4.2.2 Windows

2002-09-12 Thread Tim Thorburn

Hi,

I've got a local test machine running WinXP Pro SP1 with PHP 4.2.2 and 
Apache 1.3.26.  What I'd like to do is change the include_path settings for 
PHP in a .htaccess file (as I have several sites being tested on this 
machine and do not wish to have to edit the php.ini in my Windows directory 
each time I switch sites).

I've made this work under several flavors of Unix, but not under Windows - 
does the Windows version of Apache not support .htaccess?

Here is the command I'm using:

php_value include_path .;D:\WebPages\2002\www.site.com\docs\

now under Unix it works by doing the following:

php_value include_path .:/client/site/docs

Is there some little step that I've completely missed?

Thanks
-Tim



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




Re: [PHP] redirecting after login

2002-07-23 Thread Tim Thorburn



Once they've been redirected, can they just bookmark the resulting page
and never have to log in again?


Actually, yes - after a couple hours of playing around with the login and 
finally getting the Meta tags to work for me, I found that if the person 
were to simply type in the URL of the protected page, they would have full 
access.  Right now I'm playing with sessions and global sessions to try and 
correct this problem.  Although its not working as well as I had hoped.

Basically the plan is for all users to goto Page 1 - the login page, and 
then be re-directed to their proper destination - Page 2.  But, if a clever 
bad person were to simply type in the URL to Page 2 they could have access 
to the database and run amuck.  So I added a line checking to see if the 
session from Page 1 is registered, if not, goto Page 1.  That part works - 
what doesn't work is after they login to Page 1, the redirect sends them to 
Page 2 and right back to Page 1 because the global session isn't staying 
registered.

Since its 2am I'm quitting for the nite ... but maybe some friendly 
European people awake at this hour might have an idea on this one?  Or even 
friendly caffeine addicts on the side of the pond :P

Thanks
-Tim



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




[PHP] redirecting after login

2002-07-22 Thread Tim Thorburn

Hi,

A site I'm working on requires a login screen where various individuals 
will log into the site and add information for their various 
departments.  Rather than setup a different script for each department, I 
was hoping to create one script that would either accept or deny a login 
based on the username/password stored in a database, then based on the 
username/password - redirect the individuals browser to a URL.

I've got the login part working perfectly, and I can turn the URL into a 
link on the page, but I'd rather have the script just automatically forward 
the person to the page they're login gives them access to.

I've tried using header(), but since the redirection takes place about 
mid-script, it doesn't work.  I've also tried using meta tag redirects, 
but those don't seem to accept the PHP/MySQL combo.

Any ideas?

Thanks
-Tim



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




[PHP] Setting include_path

2002-07-13 Thread Tim Thorburn

Hi,

I'm having some difficulties setting the include path for two of my 
sites.  I had this working previously on a PHP3 server with the command in 
the .htaccess file:

php3_include_path .:/path/to/account/root/

However, I seem to be unable to set the include path with two new sites - 
one running PHP 4.1.2, the other using PHP 4.2.0.

I've gone through the settings listed on the PHP Configuration page:
http://www.php.net/manual/en/configuration.php

Yet none seem to work.

php_value include_path .:/path/to/account/root
php_include_path .:/path/to/account/root/
php4_include_path .:/path/to/account/root/

Could someone please shed some light on this subject?  I'm in a sort of 
bind as my client desperately needs their site up for a week long sporting 
event that just began this past Friday (yesterday).

Thanks in advance
-Tim



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




[PHP] Setting PHP Include Dir

2002-06-02 Thread Tim Thorburn

Hi,

I'm trying to set a PHP include directory for one of my sites.  I'm on a 
shared hosting system, so I don't have access to the php.ini file.

My plan was to do it using a .htaccess file in Apache - however I must be 
doing something very much wrong, as it isn't working.

Here is what I've tried:

php_value include_dir = .:/data/sites/site_name/htdocs/includes

I've checked the above path by running phpinfo(); on my site to determine 
where its located on my servers hard drive.

When I add the above line to my .htaccess file - I get a 500 Internal 
Server Error.

My site is using Apache 1.3.12 and PHP 3.0.18, any thoughts on how I might 
get this to work?

Thanks
-Tim



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




[PHP] PHP command for redirect?

2002-05-29 Thread Tim Thorburn

Hi,

I'm setting up an error checking element to a registration site and would 
like to redirect the user to a certain page if they missed any fields on 
the previous registration page ... the problem is I can't seem to find a 
redirect command for PHP.

I was using the header command, but its giving me attitude now that I've 
also got the script setup to send an email to the admins if a form is 
filled out incorrectly.

I just went through the list of commands on the PHP website - but without 
really knowing what kind of name I'm looking for ... well, it wasn't all 
that enlightening.

Thanks
-Tim



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




Re: [PHP] PHP command for redirect?

2002-05-29 Thread Tim Thorburn

The error the header() command is giving me now is:

Warning: Cannot add header information - headers already sent by (output 
started at \registrations\reg_mudfling.php:5)

I've moved the header command around (line position) and still nothing ... 
not sure why its suddenly not working.  I've been trying to add an extra 
feature to the form - sending an email to the admins if the form doesn't 
get entered into the database, but even when I take the email part out its 
still giving this error message.

Any ideas?

Thanks
-Tim


[PHP] header solved

2002-05-29 Thread Tim Thorburn

Hi,

Just wanted to thank you for your responses ... I solved my header problem 
- I wasn't using the full address (I left out the http:// bit)

Thanks again ... must be working at 3.30am thats not so good for the brain ...

-Tim



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




[PHP] PHP Include directory

2002-05-27 Thread Tim Thorburn

Hi,

I'm trying to setup an include directory for my site using .htaccess but 
I'm having some difficulties.

The command I'm typing is as follows:
php_value include_dir .:/path/to/my/site/includes

When I try this, I get an error 500 with Apache.  Have I typed something wrong?

Here's my setup:
Apache 1.3.12
PHP 3.0.18
Sun Solaris

Thanks
-Tim



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




[PHP] PHP Hosting ...

2002-05-11 Thread Tim Thorburn

Hi,

I've about had it with my current hosting company as they've turned off SSH 
for the past month due to security reasons which means I can no longer 
add/remove tables from my MySQL database.  Looking at two other hosting 
companies - SBC Webhosting - www.webhosting.com and Verio - www.verio.com

Does anyone here use either of these companies?  If so, could you please 
let me know your opinions of each?

Thanks
-Tim



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




[PHP] PHP 5??

2002-05-11 Thread Tim Thorburn

Hi,

In my seemingly never ending search for a decent hosting company, I've 
contacted some customer service people from Verio who tell me a very 
interesting story ... they're currently upgrading their PHP to version 5 
... which I find odd as there's only mention of 4.2.0 on php.net ...

So my question is, was the guy I was talking to knowledgeable of inside 
things, or did he not have a clue what he was talking about?

Thanks
-Tim



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




RE: [PHP] Self Destruct code

2002-05-07 Thread Tim Thorburn

I'm sure we've all had our problems with the client who just doesn't feel 
like paying.  In my particular market, summer resorts and vacation spots 
are pretty much the main source of web work.  Now alot of these businesses 
are very good in paying, normally I receive payment within a week of 
sending a bill - however, there are always one or two black sheep in the heard.

Last summer I had one of the clients owing in the upper thousands for work 
I had been doing over a 7 month period - always with the promise that 
whenever I needed to get the money, it'd be there ... you know, cuz we're 
all so well off doing web work we can just let a client sit for 7 months 
and not get anything out of it ... its fun working for free.

Anyways, it came down to a small point - this client was starting up a new 
addition to his business which required participants to register online for 
... another plus on my side was that this client had just moved his site 
from an NT server to UNIX and I was still mid-converting the code ... well, 
I sorta dragged my feet in getting the files uploaded to the new server 
until one Saturday morning I receive this angry panic call that nothings 
working, he has people who claim they've registered and he has no record, 
blah blah blah ...

Short story long, he drove into town that very same morning, I received a 
notarized check from his bank stating that he did in fact have the funds in 
his account, and then uploaded the files.

Its best to avoid these types of clients, but if you are in a small market 
such as I am, ignoring one sector or even one client of that sector is 
inevitable suicide ... frequent bills and frequent calls seem to be the way 
to go ... 



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




Re: [PHP] Re: PHP based search engine

2002-03-13 Thread Tim Thorburn

I've gone to the mnoGoSearch page - it does look like it would do the job 
nicely, however my hosting company absolutely refuses to upgrade to 
anything above PHP 3.0.16, also it appears as though I'd have to compile a 
good portion of mnoGoSearch on the server itself - another thing I'm not 
allowed to do.

I think I've got the Fluid Dynamics search engine working fairly well now - 
its not perfect, but it'll do until I can come up with something better.

Thanks
-Tim


At 11:39 AM 3/13/2002 +0100, you wrote:
David Robley wrote:
PHP from around 4.05 has functions available to interface with the 
mnoGOSearch search engine, available from http://www.mnogosearch.ru/
I recommend you look at this combination.

I recommend this one to, its a very good alternative which I used for 
several projects.

The nice thing is that you can easily update and keep the index updated by 
yourself, no need for that stupid indexer that comes along to crawl around 
your site.

I have a small script which inserts new keywords/descriptions/titles 
directly in the index on update of something that should be searchable.
This is probably easiest to do when you're using a database as a backend 
for the search.

Another soloution is to have a hourly cronscript that updates the index. I 
have used that on bookmarks.egp.cx . Since I have a  modification 
timestamp on each link there I only need to update those who where changed 
since the last indexinground. Often there are no links modified in the 
last hour, so its not very resourcehungry, but that depends on the data 
off course. :)

Just my ideas. :)

Good luck!
 Eric


--
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] PHP based search engine

2002-03-10 Thread Tim Thorburn

Hi,

Does anyone know of a PHP based search engine for a website?  I was using 
Fluid Dynamics on my site - as I've got some sections of the site in a 
MySQL database, and some sections are just static pages.  However, it seems 
to get stuck in a loop while trying to index portions of my database that 
are DATE formatted.

Is it even possible to have a PHP search engine search a site that is mixed 
with MySQL and static pages?

Thanks
-Tim



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




[PHP] Reuse variables?

2002-02-28 Thread Tim Thorburn

Hi,

I've setup a form that users to our site fill out to request to be added to 
our listings  Currently its setup so that the user fills out the form, and 
the information is emailed to me for reviewing - however I'd like to carry 
it a step further and enter only some of the emailed information 
automatically into a MySQL database

The way the script is setup now, it gathers the information from the 
previous form, sends the email, and then is supposed to enter itself into 
the database  Although it doesn't get this far - it seems that once the 
mail command is used, there is nothing left over - and vice versa

Is it not possible to do two things with the same form data?

Thanks
-Tim



-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




[PHP] apostrphe's entered into MySQL database

2002-02-27 Thread Tim Thorburn

Hi,

I've sent a few emails thus far regarding adding apostrophe's through a PHP 
script form into a MySQL database.  The responses I received indicated to 
me that I needed to get my hosting company to activate magic_quotes_gpc.

After several days of talking with what seems to be the sole tech support 
person left at my hosting company - I was told that the magic_quotes_gpc 
variable is not supported by them.

Sooo ... this leaves me in a rather awkward situation.  I need to have a 
basic content management system up and running in the extremely near future 
that will be utilized by a great number of individuals.  If when an 
apostrophe is entered - all the information entered through the form is 
rejected by the database - the entire endeavour suddenly becomes rather 
useless.

I know that if I enter a \ before any apostrophe's in the form, it all 
works well ... but I highly doubt that the large number of volunteer's 
we're going to be working with here will take the time to add them, or even 
remember 5 minutes after I tell them.

Does anyone have any possible solutions for this problem?  I'll include the 
portion of code that seems to be causing the problems now ...

I'm already using the addslashes() command and it is not working ... I'm 
desperate at this point ...

Again, the following works flawlessly on my local test machine running 
Apache 1.3.23 and PHP 4.1.1 with MySQL 3.23.39 but not at all on my web 
host running Apache 1.3.12 and PHP 3.0.16 with MySQL 3.22.32

Thanks in advance,
-Tim


?php
$db = mysql_connect(localhost, , );
mysql_select_db(edoinfo,$db);

if ($submit) {
// here if no ID then adding else we're editing
if ($id) {
$sql = UPDATE ai_data SET 
section='$section',subsection='$subsection',heading='$heading',title='$title',info='$info',entry=NOW()
 
WHERE id=$id;
} else {
 $sql = INSERT INTO ai_data 
(section,subsection,heading,title,info,entry) VALUES 
('$section','$subsection','$heading','$title','$info',NOW());
}
// run SQL against the DB
$result = mysql_query($sql);
echo Record updated/edited!p;
echo a href='add_info.php' class='comcal'ADD A RECORD/a;

} elseif ($delete) {
// delete a record
 $sql = DELETE FROM ai_data WHERE id=$id; 

 $result = mysql_query($sql);

echo $sql Record deleted!p;
echo a href='add_info.php' class='comcal'ADD A RECORD/a;

} else {
// this part happens if we don't press submit
if (!$id) {
// print the list if there is not editing
 $result = mysql_query(SELECT * FROM ai_data,$db);
 while ($myrow = mysql_fetch_array($result)) {
 printf(a href=\%s?id=%s\ class='comcal'%s/a \n, $PHP_SELF, 
$myrow[id], $myrow[title]);

printf(a href=\%s?id=%sdelete=yes\ class='comcal'(DELETE)/abr, 
$PHP_SELF, $myrow[id]);
 }
}

?
   p a href=?php echo $PHP_SELF? class=comcalADD A RECORD/a
   p form method=post action=?php echo $PHP_SELF?
   ?php
if ($id) {
// editing so select a record
$sql = SELECT * FROM ai_data WHERE id=$id;
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);

$id = $myrow[id];
$section = $myrow[section];
$subsection = $myrow[subsection];
$heading = $myrow[heading];
$title = addslashes($myrow[title]);
$info = addslashes($myrow[info]);
   $entry = $myrow[entry];

// print the id for editing
?
   input type=hidden name=id value=?php echo $id ?
   ?php
}
?
 /td
 td align=left valign=topSectionfont size=1/font:/td
 td align=left valign=top
   input type=text name=section value=?php echo $section ? 
size=35 maxlength=100 ?php include('../../../scripts/forms.css'); ?
 /td
   /tr
   tr
 td align=left valign=topSub-Section: /td
 td align=left valign=top
   input type=text name=subsection value=?php echo $subsection 
? size=35 maxlength=100 ?php include('../../../scripts/forms.css'); ?
 /td
   /tr
   tr
 td align=left valign=topHeading Graphic: /td
 td align=left valign=top
   input type=text name=heading value=?php echo $heading ? 
size=35 maxlength=255 ?php include('../../../scripts/forms.css'); ?
 /td
   /tr
   tr
 td align=left valign=topSection Title: /td
 td align=left valign=top
   input type=text name=title value=?php echo $title ? 
size=35 maxlength=255 ?php include('../../../scripts/forms.css'); ?
 /td
   /tr
   tr
 td align=left valign=top colspan=2nbsp;/td
   /tr
   tr
 td align=left valign=topDocument Information: /td
 td align=left valign=top
   textarea cols=35 name=info rows=5 ?php 
include('../../../scripts/forms.css'); ??php echo 

[PHP] a question of syntax ...

2002-02-27 Thread Tim Thorburn

Hi,

First off, let me say thank you to all those who replied helping me get 
magic quotes turned back on my server

Now that I'm fully able to enter quotes and such into my database and do 
not need to put the addslashes() command in  should I?  Is it in a 
better style to include the addslashes() command, or if I don't need it, 
should I not use it?

Thanks again,
-Tim



-- 
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp




Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?

2002-02-26 Thread Tim Thorburn

Hi,

Consider yourself lucky - my hosting company is still using 3.0.16.  Even 
though at least once a month I complain about this bitterly (the client has 
already paid several years in advance so moving is not in the cards).

They tell me that there are major security issues with PHP version 4 and 
that's why they have not upgraded yet.  My question is, if this is the case 
- why are there a great number of ISP's and individuals using version 4 if 
there are so many security issues?

I can understand the point that alot of the hosting companies online 
management systems were all written in PHP3 - but you'd think they would 
keep their stuff on a separate server from client pages.

It just makes it difficult when there are new and improved features that 
either cannot be utilized at all - or at least not without pages and pages 
of work arounds.



At 06:44 PM 2/26/2002 +, you wrote:
My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even
although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see.
I will be writing to them about this as I belive it is a factor leading to
why i need to recode when going from my local server (php4.1.1 apache) to
there systems.
If someone would like to try and justify such an old version running I would
like to hear your suggestions.
(personal servers is not included here :) )



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

2002-02-25 Thread Tim Thorburn

Hi,

Is it possible to activate magic_quotes_gpc on a server running PHP 3.0.16 
without the php.ini settings being physically altered?

I ask became my hosting company is hesitant to activate it for some unknown 
reason - however without it I cannot enter information into a database for 
a content management system I'm working on.

Thanks
-Tim



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




[PHP] Entering data into MySQL

2002-02-24 Thread Tim Thorburn

Hi,

I'm having troubles entering information from a form into a MySQL 
database.  Specifically if the user enters an apostrophe anywhere in the 
form, all the information is rejected and nothing is entered into the database.

After researching a little on php.net I found the addslashes() command - 
this did help briefly and I was able to use apostrophe's in the form ... 
but it seems as the problem has resurfaced.

To make matters more frustrating, the addslashes() command works perfectly 
well on my local test machine (Win2k Pro, PHP 4.1.1, MySQL 3.23.44, Apache 
1.3.23) but not at all on the server which is hosted by another company 
(Sun Solaris, PHP 3.0.16, MySQL 3.22.32, Apache 1.3.12).

Does anyone have any suggestions as to why the addslashes() command worked 
for a short time on the webserver and why it stopped?  Or better yet, is 
there a variation of addslashes() that will work on an older version of PHP 
such as 3.0.16?

I'd be eternally grateful for any prompt replies as its already 2.38am and 
my deadline is 9am :P

Thank you
-Tim Thorburn



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




[PHP] apostrophe's in PHP MySQL

2002-01-08 Thread Tim Thorburn

Hi,

I've been experiencing some sporadic problems with a few web forms written 
in PHP 3.0.16 and MySQL 3.23.31 with text fields (both single lines and 
rows).  Generally if any of the text in these forms contains an apostrophe 
- either nothing is entered into the database, or nothing after the 
apostrophe is entered.

Is there a way around this?  Or is this a limitation of my older versions 
of PHP and MySQL?

Thanks
-Tim



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




[PHP] Pulling information out of a MySQL database

2001-11-25 Thread Tim Thorburn

Hi,
I'm having some new troubles pulling information out of a MySQL database. 
The page I'm currently working on has a simple form, that asks the user to 
select a month and year from two dropdown menu's then forwards their 
choices on to a new page which displays community events for the chosen 
month and year. This all works great.

However, this new page that displays the community events along with their 
date allows the user to click on the name of the event for a more detailed 
list (location, time, description, etc) - this is the part that isn't working.
The problem seems to be that the script forgets the previously chosen month 
and year when it goes to display the event in greater detail.

How can I get the script to remember the month and year so it will display 
the proper information? My immediate thought is a cookie, but I have no 
idea how to do this ... can anyone offer any other suggestions, or if a 
cookie is the way to go - can someone point me in the right direction?

The site is hosted on a Sun Solaris box with PHP 3.0.16 and MySQL 3.23.31

Thanks



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




Re: [PHP] Pulling information out of a MySQL database

2001-11-25 Thread Tim Thorburn

Hi again,

Ok, I've heard some suggestions to my problem ... but I'm not entirely 
certain how to incorporate them, perhaps taking a look at the code would be 
helpful.

Again, the problem I'm having is as follows.  I have a simple form in which 
the user selects a month and year from two drop down menu's - based on 
their choice, the following PHP script searches a MySQL database and 
displays a basic listing (event name and date) for the selected 
month.  Then the user has the option to click an event name and receive a 
more detailed listing of the event - this is the portion that isn't working.

It seems that the script is forgetting the values entered by the user - I 
have come to this conclusion as when I replaced .$month. and .$year. 
with an actual month and year ie. 'November' and '2001' respectively, the 
detailed display works perfectly.

How can I get both the basic and detailed event listings working at the 
same time?

Thanks
-Tim


?

$db = mysql_connect(localhost, login, password);
mysql_select_db(edoinfo,$db);

if ($id) {

// query for extented information

$result = mysql_query(SELECT *, DATE_FORMAT(EventStartDate, '%W %M %D %Y') 
AS FormattedEventStartDate, DATE_FORMAT(EventEndDate, '%W %M %D %Y') AS 
FormattedEventEndDate, TIME_FORMAT(EventStartTime, '%r') AS 
FormattedEventStartTime, TIME_FORMAT(EventEndTime, '%r') AS 
FormattedEventEndTime FROM comcal WHERE id=$id and EventMonth='.$month.' 
and EventYear='.$year.',$db);

$myrow = mysql_fetch_array($result);

//display extended information

 echo table width='65%' border='0' cellspacing='2' cellpadding='2';
   echo tr;
 echo td valign='top' align='left'bEvent: /b/td;
 echo td valign='top' align='left';
echo ($myrow[EventName]);
echo /td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'bLocation: /b/td;
echo td valign='top' 
align='left'.($myrow[EventLocation])./td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bCity: /b/td;
echo td valign='top' align='left'.($myrow[EventCity])., 
.($myrow[EventState])./td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'bTime: /b/td;
echo td valign='top' 
align='left'.($myrow[FormattedEventStartTime])./td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'bDate: /b/td;
echo td valign='top' 
align='left'.($myrow[FormattedEventStartDate])./td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bContact Person(s): /b/td;
 echo td valign='top' align='left'.($myrow[EventC1FN]). 
.($myrow[EventC1LN]).br.($myrow[EventC2FN]). 
.($myrow[EventC2LN])./td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'bPhone: /b/td;
 echo td valign='top' 
align='left'.($myrow[EventC1ACPhone])...($myrow[EventC1ExcPhone])...($myrow[EventC1ExtPhone]).
 
;
echo 
br.($myrow[EventC2ACPhone])...($myrow[EventC2ExcPhone])...($myrow[EventC2ExtPhone]).
 
;
echo /td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bFax: /b/td;
 echo td valign='top' 
align='left'.($myrow[EventACFax])...($myrow[EventExcFax])...($myrow[EventExtFax])./td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bCell: /b/td;
 echo td valign='top' 
align='left'.($myrow[EventACCell])...($myrow[EventExcCell])...($myrow[EventExtCell])./td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bEmail: /b/td;
 echo td valign='top' align='left'a 
href='mailto:;.($myrow[EventEmail]).'.($myrow[EventEmail])./a/td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bWeb: /b/td;
 echo td valign='top' align='left'a 
href='.($myrow[EventWeb]).'.($myrow[EventWeb])./a/td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bDescription: /b/td;
 echo td valign='top' 
align='left'.($myrow[EventDescription])./td;
   echo /tr;
   echo tr;
echo td valign='top' align='left'bCost: /b/td;
 echo td valign='top' 
align='left'.($myrow[EventCost])./td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'b/b/td;
 echo td valign='top' align='left'nbsp;/td;
   echo /tr;
   echo tr;
 echo td valign='top' align='left'b/b/td;
 echo td valign='top' align='left'nbsp;/td;
   echo /tr;
 echo /table;


} else {

//display basic information from 

[PHP] Uploading Image to Database

2001-08-15 Thread Tim Thorburn

Hi,

I'm trying to get a script working that will upload an image to a MySQL 
database ... the script seems to be working, in that its not giving errors 
- but it does nothing ... it doesn't add the image to the database at all.

Can someone take a look at this script and let me know where I've gone wrong?

Thanks

Here is the script I'm using:

?php


if ($submit) {



 MYSQL_CONNECT(localhost,user,pass);
 mysql_select_db(binary_date);

 $data = addslashes(fread(fopen($form_data, r), filesize($form_data)));

 $result=MYSQL_QUERY(INSERT INTO binary_date 
(description,bin_data,filename,filesize,filetype) .
 VALUES 
('$form_description','$data','$form_data_name','$form_data_size','$form_data_type'));

 $id= mysql_insert_id();
 print pThis file has the following Database ID: b$id/b;

 MYSQL_CLOSE();

} else {

 // else show the form to submit new data:
?

 form method=post action=?php echo $PHP_SELF; ? 
enctype=multipart/form-data
 File Description:br
 input type=text name=form_description  size=40
 INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
 brFile to upload/store in database:br
 input type=file name=form_data  size=40
 pinput type=submit name=submit value=submit
 /form

?php

}

?


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




Re: [PHP] Attitude of B van Ouwerkerk

2001-07-31 Thread Tim Thorburn

Ok, I've been following this thread for the last few minutes ... and I have 
to wonder what is this list for if not to ask questions, thereby 
learning.  Yes there's tons of different resources online, yup, that would 
mean this is one too.

If you don't want to waste your time and read a question, then answer it 
... fine, don't, erase it, and move on with your life.  But lets not talk 
down the people who ask questions and make them feel worse for asking.


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




[PHP] Adding scripts

2001-07-27 Thread Tim Thorburn

Hi,

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

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

The form is then sent using the POST method.

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

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

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

PART ONE:
?

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

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

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

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

?

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

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


Thanks
-Tim


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




[PHP] Percentages

2001-06-24 Thread Tim Thorburn

Hi,

Working on a site that needs some billing information.  Once upon a time 
done in ASP where we had the option to use the FormatPercent command - is 
there an equivalent command within PHP?

Using PHP 3.0.16


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




Re: [PHP] PHP Interact with DreamWaver

2001-06-20 Thread Tim Thorburn

Hi,

I've got Dreamweaver UD 4, by default it supports ASP, JSP, and ColdFusion 
- as of yet Macromedia isn't overly interested in supporting PHP as there 
is no company backing it.

There are however several PHP engine extensions in the works for PHP4 - 
they're on release 0.6.8 now I think, so its not exactly ready for 
production level work.  I had the beta engine installed on my machine until 
UD started acting up - I don't know if it was a result of the beta PHP 
engine or some other extensions I installed from Macromedia's website.

For the most part, I'll design the site in UD, and any scripting that it 
won't handle (and even some that it will) I'll use a text web editor such 
as HotDog or Homesite to add the necessary code.

I'm also looking forward to the day UD supports PHP :)

Thanks
-Tim




[PHP] email forms

2001-06-18 Thread Tim Thorburn

Hello,

First let me say its good to have this list back up and running - and now 
time for the questions to keep rolling in.

I've got an email form setup on a site (well actually many of them) to 
collect basic information from people which will eventually be entered into 
our local database and even more eventually be placed online ...

My forms work, they send the information fine ... my only complaint is that 
when you view the message in any email program, it comes from 
Underprivileged User with nobody@hosting company name here.com

I'd like to be able to change that to ... well anything other than 
Underprivileged User - for now its not the end of the world, only a few 
people are receiving this message, and all are internal working on the 
site.  What I'd like to be able to do is have the script send a message to 
the individuals who entered the information as a confirmation that we 
received their message.

Here is a sample of the script I'm using:

?
$toaddress = [EMAIL PROTECTED];
$subject = Business/Organization Form;
$mailcontent = Business/Organization Name: .$bname.\n
.First Name: .$fname.\n
.Last Name: .$lname.\n
.Phone: (.$ACphone.) .$phone.\n
.Fax: (.$ACfax.) .$fax.\n
.Cell: (.$ACcell. .$cell.\n
.Email Address: .$email.\n
.Website URL: .$url.\n
.Street: .$street.\n
.City: .$city.\n
.State/Province: .$state.\n
.Country: .$country.\n
.P.O. Box: .$pobox.\n
.Postal/ZIP Code: .$zip.\n
.Category: .$category.\n
.Sub-Category: .$subcategory.\n
.Brief Description of Business/Organization: 
.$description.\n
.Do you have a logo you'd like included: .$logo.\n
.Any additional comments: .$comments.\n;

$fromaddress = [EMAIL PROTECTED];

mail($toaddress, $subject, $mailcontent, $fromaddress);
?

I've spoken to the hosting company, they say they will not provide any 
assistance to PHP script related problems.  They are running on Solaris 
servers with PHP 3.0.16.

Thanks
-Tim




[PHP] Browser Detection

2001-04-30 Thread Tim Thorburn

Hi,

Is it possible with PHP (3.0.16) to detect which browser a user has and 
then load an image based on the browser type?  I've found the get_browser() 
command in the manual, but it doesn't look like that does what I want, or I 
could just be looking at it wrong.

Has anyone tried this before?  and if so, could you provide some assistance.

Thank you

-Tim 


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




[PHP] Reporting from Database

2001-04-29 Thread Tim Thorburn

Hi,

I'm setting up an event calendar for an organization, and I'm running into 
several problems.  Firstly, there seems to be no standardization in the 
event listings - by this I mean that some events are single days while 
others span several days - some events have only one start time during the 
day while others have three or more.

I have the database setup in MySQL already to cope with the different 
listings, however, I want to use a PHP script (version 3.0.16) to display 
the information in a web browser.  This part mostly works, I say mostly, 
because it displays everything in the database that satisfies the search 
(in this case by the month, then by the event).  I would like to have 
someway of making the PHP script determine if there is a value in the table 
and if not, to not display anything.

An example is as follows:

Event A begins at 10:00AM and goes to 11:30AM, then begins again at 3:30PM 
until 5:00PM.  While Event B simply begins at 1:30PM.  In this example I do 
not want the second time block to show up for Event B, but I do want it for 
Event A.

I hope this does not come across as too confusing, but I've been working on 
it all weekend with my limited beginners knowledge of PHP.

Thanks
-Tim


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




Re: [PHP] I don't get it ... suddenly my script doesn't work ...

2001-04-22 Thread Tim Thorburn

Hi all,

Just to let you know, I found out my problem with my PHP script ... I had 
installed the self installer version of PHP on my system this time around, 
rather than installing the full version - now the script works great.

Thanks again

-Tim 


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




[PHP] I don't get it ... suddenly my script doesn't work ...

2001-04-20 Thread Tim Thorburn

Hi,

I have a PHP script that I wrote several months ago which allows a user to 
enter information into a MySQL database through a basic web form - it 
worked very well.  However, since then I had a system crash - luckily I 
made a backup of the script days before the crash.

My problem is, that now the script generates errors which were not present 
before.  I've gone over it twice, even re-coded it just now, and still I 
get the same errors.

Currently, I am using Win2k Pro, MySQL 3.23.33 and PHP4.0.4pl1 installed as 
CGI.

Interestingly, when I try to run this script on my RH7.0 Linux box with 
MySQL 3.22.32 and PHP3.0.18 it does not generate these errors.  I have this 
system setup with older versions of MySQL and PHP as those are the versions 
that my hosting service uses.

Could someone please look over my code and tell me where I'm going wrong??

Thank you

-Tim

The errors I get are as follows:
Warning: Undefined variable: submit in index.php3 on line 17

Warning: Undefined variable: delete in index.php3 on line 37

Warning: Undefined variable: id in index.php3 on line 51

Warning: Undefined variable: id in 
E:\WebPages\2001\AtikokanInfo\Web\www.atikokaninfo.com\htdocs\aedc\comcal\mcx\webmonkey.php3
 
on line 83

Here is the script which I am attempting to use:

html

body



?php



$db = mysql_connect("localhost", "user", "passwd");

mysql_select_db("edoinfo",$db);



if ($submit) {

   // here if no ID then adding else we're editing

   if ($id) {

 $sql = "UPDATE comcal001 SET 
eventCategory='$eventCategory',eventName='$eventName',eventLocation='$eventLocation',eventCity='$eventCity',eventState='$eventState',eventCountry='$eventCountry',eventTime='$eventTime',eventAMPM='$eventAMPM',eventDuration='$eventDuration',eventMonth='$eventMonth',eventDay='$eventDay',eventDate='$eventDate',eventYear='$eventYear',eventC1Fname='$eventC1Fname',eventC1Lname='$eventC1Lname',eventC2Fname='$eventC2Fname',eventC2Lname='$eventC2Lname',eventACphone='$eventACphone',eventPhone='$eventPhone',eventACfax='$eventACfax',eventFax='$eventFax',eventACcell='$eventACcell',eventCell='$eventCell',eventEmail='$eventEmail',eventWeb='$eventWeb',eventDetails='$eventDetails',entryDate='$entryDate'
 
WHERE id=$id";

   } else {

 $sql = "INSERT INTO comcal001 
(eventCategory,eventName,eventLocation,eventCity,eventState,eventCountry,eventTime,eventAMPM,eventDuration,eventMonth,eventDay,eventDate,eventYear,eventC1Fname,eventC1Lname,eventC2Fname,eventC2Lname,eventACphone,eventPhone,eventACfax,eventFax,eventACcell,eventCell,eventEmail,eventWeb,eventDetails,entryDate)
 
VALUES 
('$eventCategory','$eventName','$eventLocation','$eventCity''$eventState','$eventCountry','$eventTime','$eventAMPM','$eventDuration','$eventMonth','$eventDay','$eventDate','$eventYear','$eventC1Fname','$eventC1Lname','$eventC2Fname','$eventC2Lname','$eventACphone','$eventPhone','$eventACfax','$eventFax','$eventACcell','$eventCell','$eventEmail','$eventWeb','$eventDetails','$entryDate')";

   }

   // run SQL against the DB

   $result = mysql_query($sql);

   echo "Record updated/edited!p";

} elseif ($delete) {

 // delete a record

 $sql = "DELETE FROM comcal001 WHERE id=$id";

 $result = mysql_query($sql);

 echo "$sql Record deleted!p";

} else {

   // this part happens if we don't press submit

   if (!$id) {

 // print the list if there is not editing

 $result = mysql_query("SELECT * FROM comcal001",$db);

 while ($myrow = mysql_fetch_array($result)) {

   printf("a href=\"%s?id=%s\"%s %s/a \n", $PHP_SELF, $myrow["id"], 
$myrow["eventCategory"], $myrow["eventName"]);

   printf("a href=\"%s?id=%sdelete=yes\"(DELETE)/abr", 
$PHP_SELF, $myrow["id"]);

 }

   }



   ?

   P

   a href="?php echo $PHP_SELF?"ADD A RECORD/a

   P

   form method="post" action="?php echo $PHP_SELF?"

   ?php



   if ($id) {

 // editing so select a record

 $sql = "SELECT * FROM comcal001 WHERE id=$id";

 $result = mysql_query($sql);

 $myrow = mysql_fetch_array($result);

 $id = $myrow["id"];

 $eventCategory = $myrow["eventCategory"];

 $eventName = $myrow["eventName"];

 $eventLocation = $myrow["eventLocation"];

 $eventCity = $myrow["eventCity"];

 $eventState = $myrow["eventState"];

 $eventCountry = $myrow["eventCountry"];

 $eventTime = $myrow["eventTime"];

 $eventAMPM = $myrow["eventAMPM"];

 $eventDuration = $myrow["eventDuration"];

 $eventMonth = $myrow["eventMonth"];

 $eventDay = $myrow["eventDay"];

 $eventDate = $myrow["eventDate"];

 $eventYear = $myrow["eventYear"];

 $eventC1Fname = $myrow["eventC1Fname"];

 $eventC1Lname = $myrow["eventC1Lname"];

 $eventC2Fname = $myrow["eventC2Fname"];

 $eventACphone = $myrow["eventACphone"];

 $eventPhone = $myrow["eventPhone"];

 $eventACfax = $myrow["eventACfax"];

 $eventFax = $myrow["eventFax"];

 $eventACcell = $myrow["eventACcell"];

 $eventCell = 

[PHP] include files with PHP 3.0.16

2001-04-16 Thread Tim Thorburn

Hi,

I'm currently working on a rather large site and have just completed the 
navigation portion of it.  I'd like to make use of server side includes so 
that if I have to make changes down the road, I won't have to chance 
potentially 100s of files.  Normally I use !--#include 
file="filename.inc"-- with .asp and .shtml files, however, this does not 
seem to work for me using PHP 3.0.16 (the version my web host uses).

Is there an equivalent to !--#include file="filename.inc"-- in PHP?  And 
will it work in version 3.0.16.  I've gone through the online manual but 
found nothing that would help in this situation.

Thanks
-Tim


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