|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Aug 02 2001 - 11:23:58 CDT
php-general Digest 2 Aug 2001 16:23:58 -0000 Issue 792
Topics (messages 60804 through 60945):
Re: CGI installation
60804 by: Richard Lynch
Re: What would you want in a PHP web host?
60805 by: Richard Lynch
60822 by: Matt Rogers
60834 by: Richard Lynch
60922 by: mike cullerton
60940 by: Jeff Pearson
Re: env var
60806 by: Richard Lynch
Re: HTTP_SESSION_VARS
60807 by: Richard Lynch
60814 by: Richard Lynch
60850 by: Jon Yaggie
Re: Download file
60808 by: Richard Lynch
60829 by: Richard Lynch
Re: check if user exists
60809 by: Richard Lynch
Re: REPOST: DB logic help...
60810 by: Richard Lynch
Re: not null
60811 by: Richard Lynch
Re: Strange behaviour while adding a line at the BOF
60812 by: Richard Lynch
Re: writing while reading
60813 by: Richard Lynch
Re: [PHP-DEV] Passing JavaScript variables to PHP
60815 by: Richard Lynch
60842 by: Ryan Fischer
Re: Installing PHP probs
60816 by: Richard Lynch
Re: path_info
60817 by: Richard Lynch
Re: Testing if Scripting has been disabled
60818 by: Richard Lynch
Re: wish list
60819 by: Richard Lynch
ad tracking system
60820 by: Jack
60832 by: Richard Lynch
60851 by: B. van Ouwerkerk
60890 by: Tom Carter
Getting rows in a db...
60821 by: Chris Cocuzzo
60840 by: David Robley
60841 by: Richard Lynch
60845 by: Lawrence.Sheed.dfait-maeci.gc.ca
PHP-GTK v0.1 released
60823 by: Andrei Zmievski
Re: MSACCESS Insert/Updates via ODBC
60824 by: Richard Lynch
Re: YA Session Problem
60825 by: Richard Lynch
60898 by: Thomas Deliduka
60900 by: Thomas Deliduka
Re: Take JS array send by form
60826 by: Richard Lynch
Re: Multi Uploads
60827 by: Richard Lynch
Re: Get USERNAME (Windows...)
60828 by: Richard Lynch
Re: Being a SERVER (you cant kill me, im.... DAMN!!)
60830 by: Richard Lynch
60854 by: Ralph Guzman
60855 by: elias
60861 by: B. van Ouwerkerk
60864 by: Ralph Guzman
60869 by: MindHunter
60879 by: Owen Rudge
Re: Replacing template variables with values?
60831 by: Richard Lynch
60836 by: Tyrone Mills
60844 by: Ryan Fischer
60910 by: scott [gts]
Re: Fun Question - What if...
60833 by: Richard Lynch
Re: issues with __sleep() and __wakeup()
60835 by: mike cullerton
Re: FAQ
60837 by: Rasmus Lerdorf
Get when it should be Post
60838 by: Christian
60839 by: Rasmus Lerdorf
60843 by: Christian
60846 by: Rasmus Lerdorf
60848 by: CC Zona
60852 by: Christian
Multiple search options...
60847 by: Jeff Lewis
Re: Make associative array from two arrays
60849 by: elias
Re: Hmmm?
60853 by: elias
PHP Extension Documentation?
60856 by: Darryl Sokoloski
Re: PHP_SELF
60857 by: Ralph Guzman
Re: detecting mysql
60858 by: Jon Yaggie
60859 by: David Robley
Re: SetLocal() problem
60860 by: Frédéric Mériot
MySql help #1
60862 by: elias
60866 by: Lawrence.Sheed.dfait-maeci.gc.ca
60872 by: elias
60874 by: Lawrence.Sheed.dfait-maeci.gc.ca
60884 by: elias
60905 by: Miles Thompson
Mysql Help #2
60863 by: elias
60889 by: Tom Carter
60906 by: Miles Thompson
Re: How to compile PHP with IMAP option?
60865 by: Adrian D'Costa
Re: SQL syntax error in PHP script. dunno what's wrong
60867 by: Tim Ward
60933 by: mike cullerton
Very strange problem with session files
60868 by: Jarek
60871 by: Andras Balogh
<---- is being an ass!
60870 by: Kyle Smith
60873 by: Alexander Wagner
<----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
60875 by: Kyle Smith
60877 by: Lawrence.Sheed.dfait-maeci.gc.ca
60878 by: Lawrence.Sheed.dfait-maeci.gc.ca
60918 by: scott [gts]
re:mysql help #1
60876 by: Andras Balogh
60886 by: elias
PHP-Linux >> Sybase-Windows
60880 by: Veniamin Goldin
60895 by: Andrew Hill
60896 by: Erik H. Mathy
PHPTriad users
60881 by: Kyle Smith
60883 by: Jon Haworth
URGENT!!! Can't start Apache with php4 and mysql
60882 by: Richard Kurth
60901 by: Mark Roedel
60908 by: Thomas Deliduka
60909 by: Miles Thompson
Emailing the results of form entry NOT working
60885 by: Denis Croombs
60902 by: B. van Ouwerkerk
Netscape Enterprise Server
60887 by: Herman Tolentino
Adopt A Newbie (ME)
60888 by: Kyle Smith
60891 by: Werner Stuerenburg
60893 by: Marty Landman
60899 by: B. van Ouwerkerk
60903 by: Sandeep Hundal
60904 by: Kyle Smith
60907 by: Tim
60928 by: Inércia Sensorial
60929 by: Kyle Smith
60941 by: mike cullerton
Apache
60892 by: tom.hurstlinks.com
60894 by: Angerer, Chad
php_value and virtualhost
60897 by: Jean-Charles Preaux
How to Compare dates?
60911 by: Jack Sasportas
60912 by: Johnson, Kirk
60913 by: Rasmus Lerdorf
60917 by: scott [gts]
60943 by: Jack Sasportas
60944 by: Tim
newbie question - apache-win2K-authentication
60914 by: Shari Fletcher
60921 by: Miles Thompson
Re: How can I make a Loading... screen?
60915 by: Martin Marconcini
global keyword and references
60916 by: Philip X
UDP Port listening, can it be done?
60919 by: William Bailey
Syntax
60920 by: BRACK
60923 by: Jack Dempsey
60927 by: Tim
shtml or php ??
60924 by: Dave.O
60926 by: Rasmus Lerdorf
60935 by: Dave.O
60939 by: Rasmus Lerdorf
Mysql join and aliasing with mysql_fetch_object()
60925 by: rkirk.com Mail
Spot the difference?
60930 by: Kyle Smith
60931 by: kath
60932 by: Jon Yaggie
60934 by: Inércia Sensorial
60937 by: Ezra Nugroho
60938 by: scott [gts]
60942 by: Tim
mail - sendmail
60936 by: Michael Mehlmann
New lists (was [PHP] Attitude of B van Ouwerkerk)
60945 by: Darren Henderson
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I *think* that was a bug introduced in PHP4.mumble and has been fixed in
PHP4.mumble...
Check your version against the ChangeLog.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Sheni R. Meledath <sheni
cyber-gear.com> Newsgroups: php.general To: PHP Masters <php-general
lists.php.net> Sent: Wednesday, August 01, 2001 9:09 AM Subject: CGI installation
> Hello: > > We have hosted one php project where PHP Installed as CGI binary. Since the > PHP parser binary put somewhere outside of the web tree of files, we have > to include "#!/usr/local/bin/php" as the first line of each file containing > php tags. This line will display on each page at the time of browsing. Any > idea to avoid the display of this line? > > Many Thanks > > > Sheni R Meledath > sheni
cyber-gear.com >
attached mail follows:
> > I have been developing PHP for a while now, and I am wondering how other > > developers find their PHP hosting company.
Get recommendations from other users.
Also, be ready to move at any time.
I lucked out on my second ISP, and was (mostly) happy for several years.
Actually, I didn't know how good I had it, until... [darkening sky and thunder in the distance]
They got bought out. The nightmare begins...
I'll skip all the sordid details, as you don't have several hours to listen to it all.
But I've spent uncountable man-hours trying to get the old ISP to keep my sites up-and-running while spending uncountable man-hours moving them to another server. I went from maintenance mode on a dozen sites to panic mode on the old server, and re-install and test everything on the new server.
On the bright side: I trust the new host implicitly, and I *KNOW* he's not looking to sell out, and is in this for the long haul of providing good service at a fair price.
> > We want to make sure that we are providing appropriate support to our PHP > > developers. I see too many hosting companies saying that they support > > PHP, > > but not having anyone familiar with PHP on hand. We want to have actual > > support, a developer to call when you have a PHP issue.
That's really more than required -- I need a SysAdmin who understands PHP and whatever extensions they promised well enough to know how to keep it running. I don't need a PHP developer to fix my code.
Counter-example: The "bad" ISP above literally called me at one point, and he said he knew Oracle, but not PostgreSQL (which was dead on their server at the time) and asked if I'd be willing to help. "Sure", I said. The tech then began reading to me from the first page of the PostgreSQL manual... [This is a small scene in the nightmare I promised not to go into... Sorry.]
> > What do you think a medium sized hosting company could do to give you (the > > developer) better service and support?
Clearly list which extensions you have enabled, and at what versions. Clearly state your upgrade policy up-front for PHP *and* all extensions.
MAINTAIN IT! If you lose your MySQL guru, then find another one fast, or phase out MySQL "support"
> > Is access to professional PHP developers useful when an issue arises?
No, that's what the mailing list is for. I want access to a SysAdmin, not a PHP developer.
> > Are hosting companies reluctant to give you more access rights?
Actually, the original "good" ISP gave me compiler access, as I was playing with gnupg in beta status, and they figured that was better than re-compiling for me every couple days :-)
They also ran PHP as a CGI with suExec because their other customers didn't need it, and they weren't willing to install it and increase httpd risks just for me. This was a pain sometimes, but they were always willing to help me work around it.
Alas, they also gave CGI access to some idiots who continually ran run-away scripts (Perl probably) that would bring the server to its knees. Sigh. Oh well, guess you can't have everything.
The "bad" ISP wouldn't even send me a list of the files in my PostgreSQL directories. Had they done that, I coulda told them it was puking because /var was full because a bunch of long-dead temp tables were left over from queries that were just too big and crashed the server. We could have wiped those out and saved uncountable hours of pain. I might even still be their customer if they'd done one little thing different on day one.
It's always a judgement call whom to trust how much. Either your ISP is good at it, and everybody's happy, or they've got an inflexible policy in place, and most people are happy, or they suck, and nobody's happy.
> > Are they willing to re-compile their PHP build to add other options?
Probably not.
> > How long do requested changes to the server take?
Most should be done within 24 hours. Tricky ones should get a non-automated response as to why they aren't done, and some sort of negotiation/counter-offer of how to solve the problem.
> > What other suggestions do you have for improving the relationship between > > the server administrator and the PHP developer?
Build a tracking db to issue ticket numbers for each problem, and use it religiously. Respond with a live answer that it's fixed, or an ETA, or establishes a dialog for how to resolve within 24 hours.
If you *REALLY* want to provide top-notch PHP services, consider using vmware and giving each customer root. Or give each customer their own pool of httpd processes to configure they way they want.
You won't be able to squeeze as many customers on the box, but they'll be happy and probably willing to pay a little more.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
I must say that we have been very lucky... For the past 5 years, we have been with pair Networks (pair.com) and have had no serious problems or complaints with them.
Although, it _would_ be nice to have the ability to ask a person (developer) a question and get a response quite soon, but that is pretty much for newbies, as a developer or like anyone else here, uses mailing lists and newsgroups.
If you can provide excellent service to your customers from the beginning and continue as they pay you more and you fork out more, there's no doubt you will have any trouble doing as you wish for and with your clients.
But, of course, as any business person knows-- there's ALWAYS going to be an unhappy soul that tries to ruin it for you.
-----------------------
-- M&D Creations
- Matt Rogers
- Web Design Dept.
- webdesign
desertstars.com
attached mail follows:
> caveat--if there are some options that most folks would reasonably call > 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at > programming and php, so i have no idea if things like this exist. i > personally only compile in the options i use.
There are like 107 PHP third-party extensions.
A couple are pretty new/raw, a couple are pretty defunct, and some are just so damn esoteric or have such a small user-base as to be pointless to install unless you really know a customer wants it...
Anticipating what customers want can be tricky, though...
You can now compile PHP and later on add in PHP Extension Modules which is cool... I've done it with GD once, but it doesn't seem stable, or maybe I'm doing something funky in the PHP code, as it displays one image only 20% (ish) of the time. I'll add GD for real later, but 20% is fine for the proof-of-concept I'm working on right now.
Anyway, you may be able to add in new PHP extensions without re-compiling everything, but you'll need to check up on the stability issue.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
on 8/1/01 11:22 PM, Richard Lynch at ceo
l-i-e.com wrote:
>> caveat--if there are some options that most folks would reasonably call >> 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at >> programming and php, so i have no idea if things like this exist. i >> personally only compile in the options i use. > > There are like 107 PHP third-party extensions.
i was really only talking about the features and packages that come with the php distribution (mysql, snmp, gd, imap, etc) i may have misunderstood the question.
> > A couple are pretty new/raw, a couple are pretty defunct, and some are just > so damn esoteric or have such a small user-base as to be pointless to > install unless you really know a customer wants it... > > Anticipating what customers want can be tricky, though...
:)
> > You can now compile PHP and later on add in PHP Extension Modules which is > cool... I've done it with GD once, but it doesn't seem stable, or maybe I'm > doing something funky in the PHP code, as it displays one image only 20% > (ish) of the time. I'll add GD for real later, but 20% is fine for the > proof-of-concept I'm working on right now. > > Anyway, you may be able to add in new PHP extensions without re-compiling > everything, but you'll need to check up on the stability issue.
this is cool to know, thanks.
-- mike cullerton
attached mail follows:
I am currently working with a hosting company that is striving to attain everything you all have mentioned. Check out http://www.eaccounts.net/ref/jp52950052/referer=emaillink
I do the Beta testing for them and have all of my sites hosted there. If there is something missing, let me know and I'll bring it up to them.
Jeff Pearson
> -----Original Message-----
> From: Richard Baskett [mailto:rickbaskett
home.com]
> Sent: Wednesday, August 01, 2001 6:00 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] What would you want in a PHP web host?
>
>
> Please tell me what host you use!! I cant even seem to get the host I am
> going through to upgrade php. They'll do it when they feel like is pretty
> much the response I get. Other host responses: "We don't support php or
> mysql" "Sometime in the future, but currently no support",
> "You're the only
> person that has requested it, so until more demand, we're not going to
> support it" Frustrating, frustrating, frustrating, especially when I feel
> like it's the wave of the future. A host that provides everything you've
> specified... is to die for :)
>
> So if you have a list... please do tell! :)
>
> Rick
>
> > [this is long]
> >
> > on 8/1/01 1:06 AM, Derek Del Conte at derek
gambitdesign.com wrote:
> >
> >> I have been developing PHP for a while now, and I am wondering
> how other
> >> developers find their PHP hosting company. So far this has not been an
> >> issue for me because I am always in full control of my servers
> (well, as
> >> much control as possible with any web server :), but recently
> we have begun
> >> to host other PHP sites.
> >
> > my background is networking. i've built and maintained a number of
> > increasingly complex networks over the years and at times have been
> > intimately involved in the customer support piece. i have had
> many jobs in
> > the customer support area outside of technology too. now i
> write and host
> > php apps.
> >
> >> We want to make sure that we are providing appropriate support
> to our PHP
> >> developers. I see too many hosting companies saying that they
> support PHP,
> >> but not having anyone familiar with PHP on hand. We want to
> have actual
> >> support, a developer to call when you have a PHP issue.
> >
> > do you _really_ want to pay someone 24x7x365 to maintain a php
> help line?
> > the best coding happens outside the 9-5 window.
> >
> > the way i see it, as a php hosting site, your job is to keep
> the servers up
> > and running, 24x7x365, bug-free and up-to-date. php support is
> for software
> > consultants (which isn't to say that you can't do both) folks who need
> > hosting want realiable hosting.
> >>
> >>
> >> What do you think a medium sized hosting company could do to
> give you (the
> >> developer) better service and support?
> >
> > honesty, reliability, communication, response, bandwidth.
> >
> >> Is access to professional PHP developers useful when an issue arises?
> >
> > i doubt it, but imagine you could come up with a business model for
> > providing php development support. probably long term stuff.
> maybe write and
> > maintain an application for someone, or possibly training...
> >
> > i would think of hosting and consulting as separate symbiotic
> businesses.
> > you'll get some referral business and a little cross-over, but
> don't expect
> > most hosting customers to want support or for folks who've used you to
> > consult on a project to host their app with you.
> >
> >> Are hosting companies reluctant to give you more access rights?
> >
> > if they say 'no', does their reason atleast seem reasonable? are they
> > willing to think about it and get back to you? do they say
> 'yes' when they
> > should be saying 'yes'?
> >
> >> Are they willing to re-compile their PHP build to add other options?
> >
> > as someone else has said, all options. php hosting should be
> php hosting.
> >
> > caveat--if there are some options that most folks would reasonably call
> > 'optional' or 'dangerous', these shouldn't be expected. i am
> pretty new at
> > programming and php, so i have no idea if things like this exist. i
> > personally only compile in the options i use.
> >
> >> How long do requested changes to the server take?
> >
> > unreasonable delays are unacceptable. i mean, if you can get it
> done, do it.
> > these are our customers. they are giving us money :)
> >
> > you (or your server dude(ette)) should be as excited as your
> customer is for
> > the new features. you should be saying "whoa, i can't believe
> that's not in
> > there. hold on... ... ... ok, try it now. it works? cool, have
> a good one.
> > <click>" :)
> >
> > (obviously, don't do anything to your box you don't understand, and
> > security, security, security, but you get the picture)
> >
> >> What other suggestions do you have for improving the
> relationship between
> >> the server administrator and the PHP developer?
> >
> > do the right thing!
> >
> > i've been on both sides of this (positive and negative :) tell your
> > customers everything you know. make it easy for them to obtain
> any and all
> > reasonable information 24 hours a day. anticipate customer
> needs. constantly
> > re-evaluate all of your policies and let your customers know them.
> >
> > your business should constantly evolve to your changing
> customer base. when
> > a customer makes a request for something you haven't considered, your
> > response should be "hmmm..., that's interesting. let us talk
> about that a
> > little and get back to you". and then, slap yourself for not having
> > anticipated the request, talk about it and get back to them. keep them
> > informed.
> >
> > the successful enterprises i've been involved with cared about their
> > customers, educated themselves about their endeavor and did the
> right thing.
> > too many businesses make decisions for the wrong reasons--political
> > infighting, process management, knee-jerk reaction, unmotivated
> employee,
> > you name it. when a question arises, folks need to openly discuss it and
> > come to concensus. too many folks can't admit they might not
> know something
> > (or even that times have changed) and they keep doing the wrong thing.
> >
> > do the right thing!
> >
> >> I spent some time going through the PHP site looking at the
> list of hosts
> >> supporting PHP, but I didn't find any real discussion about
> what people want
> >> in a host (although I did find plenty of things they don't want :).
> >
> > think about what you want in support from your vendors. support
> is support.
> > even monkeys can be trained. it takes someone who cares to provide good
> > support.
> >
> >> I just figured that I would ask the PHP community exactly what
> they wanted.
> >> Thank you for any insight that you can give me.
> >
> > well, not much of my knowledge is php related, but what the heck :)
> >
> >>
> >> --derek
> >
> >
> > -- mike cullerton
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> is there a reson i get soem of these twice???? is it the fault of the > people sending them? the list? or my mail program???
Also, the news server articles got re-numbered during the move, so some news clients may be quite confused.
attached mail follows:
>while (list ($key, $val) = each ($HTTP_session_VARS)) { > echo "$key => $val<br>"; >} > >i get the error - > >Warning: Variable passed to each() is not an array or object in /var/www/html/adult/func.php >on line 5 > >and well it looks liek an array to me . . is there soemthing i can do to make this work?
Spell it with SESSION, not session.
$HTTP_session_VARS ain't nothing unless you set it.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> SORRY i just coppied it wrong > the actual code is capitalized > > while(list($k, $v) = each($HTTP_SESSION_VARS))
In that case, $HTTP_SESSION_VARS is not an array because you have no session variables yet...
session_start(); session_register('foo'); $foo = 42; while (list($k, $v) = each($HTTP_SESSION_VARS)){ echo "$k ==> $v<BR>\n"; }
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Actually after an hours nap i found the problem. It is not something anyone could have helped me with since i didnt give complete enough code. the very simple solution was stupidly i used it in a function without declaring ir global. all is good now.
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 3:17 AM
Subject: [PHP] Re: HTTP_SESSION_VARS
> >while (list ($key, $val) = each ($HTTP_session_VARS)) {
> > echo "$key => $val<br>";
> >}
> >
> >i get the error -
> >
> >Warning: Variable passed to each() is not an array or object in
> /var/www/html/adult/func.php >on line 5
> >
> >and well it looks liek an array to me . . is there soemthing i can do to
> make this work?
>
> Spell it with SESSION, not session.
>
> $HTTP_session_VARS ain't nothing unless you set it.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> header ("Content-Disposition: attachment; filename=download.tar"); > > readfile($filename); > ===================end code snippet========= > > What I need to do, is specify the default directory for this file to be > saved to. Does anyone know how to do this?
WILD GUESS: Some browsers might let you use a full pathname in the "filename=" bit and prompt with that pathname, if the user even has such a pathname in the first place...
If not, there probably isn't any way to do that.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> > Errr... it from ASP (shoot) > > are you 100% sure?
I'm not 100% sure. How do you do it in ASP?
What headers does ASP send when you do it?
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> how do i check if user exist?
> I tried...
> $result = mysql_query("SELECT count(uname) FROM users WHERE
> uname=\'$username
$domain\'");
Get rid of the \ there. You are inside a ", not a ', and the \ is wrong.
Also, add some error checking like:
if (!$result){ echo "MySQL error ", mysql_error(), "<BR>\n"; }
Actually, don't write it to the screen for users to see on a production box, but log it somewhere you can get it.
> if(isSet($result)) > return("Username already exists.<br>\n"); > but still wont work.. :(
$result will always be set. You just set it.
You need to do something like:
if (mysql_result($result, 0, 0) == 1){ echo "Username already exists.<BR>\n"; }
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> $conn = db_connect("fplg");
... or die("Could not connect");
> > $bandquery = "SELECT linkid,title FROM links WHERE cat='band'"; > $sitequery = "SELECT linkid,title FROM links WHERE cat='site'"; > $miscquery = "SELECT linkid,title FROM links WHERE cat='misc'"; > > $bandresult = mysql_query($bandquery,$conn);
... or die(mysql_error());
> $siteresult = mysql_query($sitequery,$conn);
... or die(mysql_error());
> $miscresult = mysql_query($miscquery,$conn);
... or die(mysql_error());
>
> header_start("FPLG:Links");
> ?>
>
> <table width="692" cellspacing="0" cellpadding="0">
> <tr align="center">
> <td width="230" bgcolor="#ff6600" align="center">
> <font face="verdana,arial" size="2" color="#ffffff">Bands</font>
> </td>
> <td width="230" bgcolor="#ff6600" align="center">
> <font face="verdana,arial" size="2" color="#ffffff">Sites</font>
> </td>
> <td width="230" bgcolor="#ff6600" align="center">
> <font face="verdana,arial" size="2" color="#ffffff">Other</font>
> </td>
> </tr>
> <tr align="center">
> <td width="230" bgcolor="#a9a9a9" align="center">
> <?php
> while($band_data = mysql_fetch_array($bandresult));
> {
> ?>
> <a href="/jump.php?linkid=<?php echo $band_data["linkid"];?>"
> class="hov1" target="_new"><font size="2" face="verdana,arial"
> color="WHITE"><?php echo $band_data["title"];?></font></a>
> <br><br>
> <?php
> }
> ?>
> </td>
> <td width="230" bgcolor="#a9a9a9" align="center">
> <?php
> while($site_data = mysql_fetch_array($siteresult));
> {
> ?>
> <a href=/jump.php?linkid=<?php echo $site_data["linkid"];?>"
> class="hov1" target="_new"><font size="2" face="verdana,arial"
> color="WHITE"><?php echo $site_data["title"];?></font></a>
> <br><br>
> <?php
> }
> ?>
> </td>
> <td width="230" bgcolor="#a9a9a9" align="center">
> <?php
> while($misc_data = mysql_fetch_array($miscresult));
> {
> ?>
> <a href="/jump.php?linkid=<?php echo $misc_data["linkid"];?>"
> class="hov1" target="_new"><font size="2" face="verdana,arial"
> color="WHITE"><?php echo $misc_data["title"];?></font></a>
> <br><br>
> <?php
> }
> ?>
> </td>
> <td width="230" bgcolor="#a9a9a9" align="center">
> </tr>
> </table>
> </body>
> </html>
>
> this is supposed to display link information from my db in three columns,
> one for bands, one for sites, and one for misc. only problem is that it's
> not displaying correctly, as you can see: www.fplg.net/links.php
>
> any ideas on what the problem is?
>
> chris
>
> ----- Original Message -----
> From: Jon Haworth <jhaworth
witanjardine.co.uk>
> To: 'Chris Cocuzzo' <cuzo
mediaone.net>; <php-general
lists.php.net>
> Sent: Tuesday, July 31, 2001 11:57 AM
> Subject: RE: [PHP]REPOST: DB logic help...
>
>
> > What about something like:
> >
> > <?php
> >
> > $sql_bands = "SELECT Link FROM Table WHERE Category='band'";
> > $sql_sites = "SELECT Link FROM Table WHERE Category='site'";
> > $sql_other = "SELECT Link FROM Table WHERE Category='other'";
> >
> > $query_bands = mysql_query($sql_bands);
> > $query_sites = mysql_query($sql_sites);
> > $query_other = mysql_query($sql_other);
> >
> > echo "<table>";
> > echo "<tr><td>Bands</td><td>Sites</td><td>Other</td></tr>";
> >
> > do {
> > $data = false;
> > echo "<tr>";
> > if ($row_bands = mysql_fetch_array($query_bands)) {
> > echo "<td>". $row_bands["Link"]. "</td>";
> > $data = true;
> > } else {
> > echo "<td> </td>";
> > }
> > if ($row_sites = mysql_fetch_array($query_sites)) {
> > echo "<td>". $row_sites["Link"]. "</td>";
> > $data = true;
> > } else {
> > echo "<td> </td>";
> > }
> > if ($row_other = mysql_fetch_array($query_other)) {
> > echo "<td>". $row_other["Link"]. "</td>";
> > $data = true;
> > } else {
> > echo "<td> </td>";
> > }
> > echo "</tr>";
> > } while ($data == true);
> >
> > echo "</table>";
> >
> > ?>
> >
> > It's untested, and fairly inelegant in that you get an empty row at the
> > bottom, so you could count the rows for each set beforehand as part of
the
> > SQL instead of using $data as I have - but it may be a good starting
> point.
> >
> > HTH
> > Jon
> >
> >
> > -----Original Message-----
> > From: Chris Cocuzzo [mailto:cuzo
mediaone.net]
> > Sent: 31 July 2001 16:36
> > To: php-general
lists.php.net
> > Subject: [PHP]REPOST: DB logic help...
> >
> >
> > hey-
> >
> > I have a few pages on my website which need to be divided up into
> different
> > columns and rows based on a category in a table. for example, on a links
> > page, I have three different columns, one for bands, one for sites, and
> one
> > for other things. I'm storing those things in the table with a category
> > field, so that when I output the data, it goes to the right place.
However
> > I'm a little unsure of the actual code to do this...
> >
> > can someone lend me an example or give me some ideas?
> >
> > thanks
> > chris
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
attached mail follows:
> When a field is declared as an integer, not null and is the primary, > how would I address it's empty set? > > ex: if($value == ???) > { > bla > bla > bla > } > > > My condition wants there to be nothing in $value.
The entire point of NOT NULL is that there will never be nothing in $value...
You either need to remove the NOT NULL and allow there to be NULL values, or re-think your algorithm.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I'm going nuts trying to add a line of data in the beginning of a text > file.
Files are like cassette tapes.
You can't add something at the beginning without re-copying everything somewhere else first, and then back again.
You should either: 1. Add to the end, and just make your reader/display program work backwords. This only works for small files.
2. Use a database instead.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Function chat2file($filename, $str) { > $fp = fopen("chats/$filename", "a"); > fputs($fp, $str); > close($fp); > }
So long as $str is less than, errr, 8K?, this is good on Linux, as the append will be atomic.
You would want flock here if it's not Linux, or if it wasn't "a".
> Function file2chat($filename) { > if(file_exists("chats/$filename")) { > $fd = fopen("chats/$filename", "r"); > flock($fd, LOCK_UN);
You don't need to lock for reading at all. You really don't care if 2 people read at once.
Disclaimer: I *THINK* it's (Linux+append && <8K == atomic)...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> location.href='mail.php?message=' + message;
You need to URLEncode that message data.
Not sure how JavaScript does it...
probably message.urlencode()
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
You wrote: > > location.href='mail.php?message=' + message; > > You need to URLEncode that message data. > > Not sure how JavaScript does it... > > probably message.urlencode()
Actually, it's escape(message).
-- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
attached mail follows:
> well what if i want to set up the computer im using to be able to run php > acripts, but NOT be an internet server?
You mean just run PHP scripts from the command line?
Once you get to the point where you have C:\\php4\\php.exe, you're good to go.
Open an MS-DOS prompt and do c:\\php4\\php.exe -q c:\\whatever\\yourfile.php
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
path_info may be coming from IIS, or, rather *NOT* coming from IIS, so isn't set...
You may be able to find some other variable with what you need in <?php phpinfo();?>
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Dms <dms61969
hotmail.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 01, 2001 1:12 PM Subject: Re: path_info
> By fail I mean that the code does not return a value for the path_info > variable. > The register_globals setting is currently set On. With it set Off I > obviously would note return a value with $PATH_INFO. It is my understanding > that the track_vars is always On starting with version 4.0.3 > > > > "Richard Lynch" <ceo
l-i-e.com> wrote in message > news:03d601c11a62$88091ba0$6401a8c0
Lynchux100... > > > I am running win2k sp1. The following code works with php 4.0.3 > installed > > > however fails with versions php 4.0.5 and 4.0.6. > > > > > > Any assistance would be appreciated > > > > > > <?php > > > echo $PATH_INFO; > > > echo "<br>"; > > > echo $HTTP_SERVER_VARS["PATH_INFO"]; > > > ?> > > > > Define "fails"... > > > > What are your php.ini settings for register_globals and track_vars? > > > > -- > > WARNING richard
zend.com address is an endangered species -- Use > > ceo
l-i-e.com > > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > > Volunteer a little time: http://chatmusic.com/volunteer.htm > > > > > >
attached mail follows:
> Is there a method to test if Scripting has been disabled in the browser?
Sure.
Use JavaScript to forward to another page, or set a variable, or something, and check it on the next page.
Either JavaScript worked, or it didn't.
There is *NO* way, a priori, to tell for the first page though.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> does anybody know how to submit a feature request? I can't do it via the > bug reporting mechanism.
http://bugs.php.net is the usual way...
An email sent off to php-dev
lists.php.net would probably at least catch the
eye of the developers, but you risk their ire for not using
http://bugs.php.net
Oh, there is one other GREAT way: Write a patch and submit it, or ask for CVS access :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Hi people,
I am looking up for the software that can track all views and click though number of all advertising on my sites, has to fit in to my RAQ server though. Is there any advice? Don't mind paying of course.
Jack
jacky
activelifestyle.com
"Love your enemies, it will drive them nuts"
attached mail follows:
>I am looking up for the software that can track all views and click though number of all >advertising on my sites, has to fit in to my RAQ server though. Is there any advice? Don't >mind paying of course.
I'm betting there are a dozen free ones in the code archives such as http://zend.com http://devshed.com http://weberdev.com http://webmonkey.com etc.
http://php.net/links.php should list even more places to look.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
At 11:33 2-8-01 -0500, Jack wrote: >Hi people, >I am looking up for the software that can track all views and click though >number of all advertising on my sites, has to fit in to my RAQ server >though. Is there any advice? Don't mind paying of course.
On the risk of a new "attitude" thread..
Think I did mention freshmeat.net and sourceforge.net before.. also.. check your favorite scriptarchive.. do you know there's a link to PHP archive on cgi-resources.com?? use a searchengine.. you'll be amazed with the result..
Just did a quick search and saw several promising hits..
Most of this kind of SW is not very big so it should even fit into your RAQ. :-)
Bye,
B.
attached mail follows:
phpAds is a common, serach on google for that.
One more site to add to richards good list, http://www.hotscripts.com
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 6:09 AM
Subject: [PHP] Re: ad tracking system
> >I am looking up for the software that can track all views and click
though
> number of all >advertising on my sites, has to fit in to my RAQ server
> though. Is there any advice? Don't >mind paying of course.
>
> I'm betting there are a dozen free ones in the code archives such as
> http://zend.com http://devshed.com http://weberdev.com
http://webmonkey.com
> etc.
>
> http://php.net/links.php should list even more places to look.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
hey-
if I do this:
$query = "SELECT user FROM table WHERE cat='band'"; $result = mysql_query($query,$conn); $rows = mysql_num_rows($result);
will I get something back from the $rows variable, or am I using the mysql_num_rows() function incorrectly. What I'm trying to do is get the number of rows returned as a result of that specific sql statement and query.
thanks chris
attached mail follows:
On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote: > hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris
That should show the number of rows returned by the query, providing there is a successful result. Try it!
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAShotgun wedding: a case of wife or death.
attached mail follows:
Yes, if your $conn is valid in the first place, and your SQL is valid.
I think 'table' is a reserved word, so as-is, it won't work.
Add some error-checking code to see what MySQL is saying about your connection and SQL.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Chris Cocuzzo <cuzo
mediaone.net> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 02, 2001 12:27 AM Subject: [PHP]Getting rows in a db...
> hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris >
attached mail follows:
Bear in mind that you don't want to be doing queries like that generally.
Use count(*) to get the number of rows - using mysql_num_rows is slower.
eg $query="select count(*) from tablename where cat='band'"; $result = mysql_query($query,$conn);
etc.
-----Original Message-----
From: David Robley [mailto:huntsman
www.nisu.flinders.edu.au]
Sent: August 2, 2001 2:13 PM
To: Chris Cocuzzo; php-general
lists.php.net
Subject: Re: [PHP]Getting rows in a db...
On Thu, 2 Aug 2001 14:57, Chris Cocuzzo wrote: > hey- > > if I do this: > > $query = "SELECT user FROM table WHERE cat='band'"; > $result = mysql_query($query,$conn); > $rows = mysql_num_rows($result); > > will I get something back from the $rows variable, or am I using the > mysql_num_rows() function incorrectly. What I'm trying to do is get the > number of rows returned as a result of that specific sql statement and > query. > > thanks > chris
That should show the number of rows returned by the query, providing there is a successful result. Try it!
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAShotgun wedding: a case of wife or death.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
PHP-GTK version 0.1 "the void which binds" has been released. It can be downloaded from http://gtk.php.net/. The changes in this version include:
- added GDK keysyms constants. - fixed bug with GtkStyle::copy() that was not returning the result properly. - implemented support for struct based classes (GdkRectangle, GtkAllocation, GtkRequisition, etc). - finished drag-n-drop support. - ported Scribble example from C. - modified GdkWindow::get_pointer() to be simpler, without XInput support. - changed 'area' event property to be a GdkRectangle. - changed 'is_hint' event property to be boolean. - added ability to query the state and allocation of a widget. - added direct construction of pixmaps. - added GdkWindow::set_icon() method. - implemented GtkList methods insert_items() and prepend_items(). - implemented new PHP-like build system that supports adding extensions to PHP-GTK. - implemented GtkCTree methods node_get_pixtext(), node_get_pixmap(), and get_node_info(). - implemented GtkObject::emit(), thus allowing programmatical emission of signals. - added support for accessing GtkObject arguments via get_arg() and set_arg() methods.
-Andrei
attached mail follows:
> know how to implement functions to Insert/Update data registers. I am a
Not sure you're asking what I'm answering, but...
INSERT/UPDATE are queries, just like SELECT.
So do the same thing you would do for SELECT.
odbc_exec("select * from foo"); odbc_exec("insert into foo(a) values('$a')"); odbc_exec("update foo set a = '$a'");
A query is a query.
The only catch is that the USER you connect as must have insert/update/whatever permission.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Show source.
At a guess, I'd say that $PHPSESSID isn't getting passed around properly...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Thomas Deliduka <thomas
neweve.com> Newsgroups: php.general To: PHP List <php-general
lists.php.net> Sent: Wednesday, August 01, 2001 4:00 PM Subject: YA Session Problem
> I'm actually revisiting this after 8 months or more. I have never gotten > sessions to work on my server and here's the problem: > > Page 1: > > Create session register a variable. > SessionID created is say: 555 (for example) > On the drive in /tmp I get a file sess_555 and it contains my variable. > I submit a form to another page with additional variable info. > > Page 2 > Page two creates the session and recalls the first variable, it is > empty. I set the variable which I posted to the page. > If I echo $PHPSESSID to the screen I get 555. > But in /tmp I have another file sess_777 > Contained in sess_777 is my second variable. > > Is this too abstract? Do I need to give code? > > I even do session_name($PHPSESSID); before session_start() and get the same > results. > > 8 months ago, nobody had an answer for me. Does anyone now? > > -- > > Thomas Deliduka > IT Manager > ------------------------- > New Eve Media > The Solution To Your Internet Angst > http://www.neweve.com/ > >
attached mail follows:
On 8/2/2001 12:38 AM this was written:
> Show source. > > At a guess, I'd say that $PHPSESSID isn't getting passed around properly...
Here is my source this source is almost identical to what I dealt with earlier with the installation program that used sessions and didn't work:
--------- file 1 ----------- <?
session_start();
if (!isset($var1)) { session_register("var1"); session_register("var2"); header("location: index.php"); }
$var1 = "My var 1"; $var2 = "My var 2";
?><HTML> <HEAD> <TITLE>Session Page 1</TITLE> </HEAD>
<BODY BGCOLOR=#FFFFFF>
PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR>
<FORM ACTION="index2.php" METHOD="POST"> VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT TYPE=SUBMIT VALUE="go"><BR> </FORM>
</BODY> </HTML> --------- file 1 -----------
--------- file 2 ----------- <?
session_start(); // start session session_register("var3"); // register var 3 session variable
$var3 = $myvar3; ?><HTML> <HEAD> <TITLE>Session Page 2</TITLE> </HEAD>
<BODY BGCOLOR=#FFFFFF>
PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR> VAR3: <? echo $var3; ?><BR>
</BODY> </HTML> --------- file 2 -----------
Here is what happens for me:
1. On my mac (using IE 5) when I load this page, the first time it will continually reload because it's hitting the header() function at the top. It will then fail. If I try again, it will "stick" miraculously. On the PC it doesn't have this redirect problem initially.
2. When I submit the form, I got to the second page, the session ID is echoed back the same as the first one, but on my server in the /tmp directory there is a new session ID created with var3 contained therein. It is as if session_start() or session_register() is creating a new session ID automatically.
FYI, I tried the suggestion of using session_name(login) as the other gentleman said but that failed to start any session at all no session ID would be echoed back.
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
On 8/2/2001 12:38 AM this was written:
> Show source. > > At a guess, I'd say that $PHPSESSID isn't getting passed around properly...
I forgot to add in my last email one... This code can be executed at http://www.fromthduke.com/session/
Here is my source this source is almost identical to what I dealt with earlier with the installation program that used sessions and didn't work:
--------- file 1 ----------- <?
session_start();
if (!isset($var1)) { session_register("var1"); session_register("var2"); header("location: index.php"); }
$var1 = "My var 1"; $var2 = "My var 2";
?><HTML> <HEAD> <TITLE>Session Page 1</TITLE> </HEAD>
<BODY BGCOLOR=#FFFFFF>
PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR>
<FORM ACTION="index2.php" METHOD="POST"> VAR 3: <INPUT TYPE=TEXT VALUE="My Var 3" NAME="myvar3"> <INPUT TYPE=SUBMIT VALUE="go"><BR> </FORM>
</BODY> </HTML> --------- file 1 -----------
--------- file 2 ----------- <?
session_start(); // start session session_register("var3"); // register var 3 session variable
$var3 = $myvar3; ?><HTML> <HEAD> <TITLE>Session Page 2</TITLE> </HEAD>
<BODY BGCOLOR=#FFFFFF>
PHPSESSID: <? echo $PHPSESSID; ?><BR> Var1: <? echo $var1; ?><BR> Var2: <? echo $var2; ?><BR> VAR3: <? echo $var3; ?><BR>
</BODY> </HTML> --------- file 2 -----------
Here is what happens for me:
1. On my mac (using IE 5) when I load this page, the first time it will continually reload because it's hitting the header() function at the top. It will then fail. If I try again, it will "stick" miraculously. On the PC it doesn't have this redirect problem initially.
2. When I submit the form, I got to the second page, the session ID is echoed back the same as the first one, but on my server in the /tmp directory there is a new session ID created with var3 contained therein. It is as if session_start() or session_register() is creating a new session ID automatically.
FYI, I tried the suggestion of using session_name(login) as the other gentleman said but that failed to start any session at all no session ID would be echoed back.
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
>you have to name the fields pn[0],pn[1]... >(you can name them all pn[] but you might have problems with the >javascript)
With or without the indices inside [] makes no difference to JavaScript (viz).
>then to access them from javascript you go something like: >document.forms[0].elements['pn[0]']; > >---> using document.forms[0].pn[0] won't work.
Neither will work.
There is no combination of 'pn', '[]', and/or '0' that will work in JavaScript to use a human-readable name matching PHP's pn[] system. Guaranteed, cuz I spent days trying every damn one of 'em, as well as other things that never had a chance of working.
You'll just have to use: document.forms[0].elements[5] document.forms[0].elements[6] document.forms[0].elements[7] document.forms[0].elements[8] . . .
Start at whatever number the first 'pn' is, (presumably you know that) and end when you hit the name after the last 'pn'.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I have a page that clients are able to up load to their site. I want to > elimanate have? a bunch of upload buttons. How would I go about using only > one button for uploads without losing the browse button for each form > object? Better yet how would I have the client enter a number for the > number of uploads they want? Yes you can RTFM me :)
Each <INPUT TYPE=FILE turns into a Browse... button in a FORM, and you can have as many as you like**
You could ask how many uploads on one page, and give them that many <INPUT TYPE=FILE lines on the next...
You could force them to gzip the files into one package, and unzip them on the server. :-)
You could provide 10 upload buttons (or some obscenely large number) and only use the ones they send. Unused Browse... buttons will have 'none' for your $files[] variable.
** There probably *IS* some upper bound somewhere in each client OS as to how many Browse... buttons are legit. You'll probably never hit it...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> I'm building a PHP app for use on our intranet - all MS (Clients will be 95, > NT, or 2000). > > Is there a way to retrieve the clients username when they access app (i.e. > the username they used to access the network)?
Almost for sure, no.
Basically, if it's being made available to PHP, it will appear in <?php phpinfo();?>
If it's not in phpinfo(), that's because your server didn't provide it.
The Windows login username has absolutely no connection whatsoever to their Internet access AFAIK.
Thus, it's never even given to the browser, much less to the web-server, and thusly not to PHP.
There *MIGHT* be a DLL out there that you could use to call the Windows functions and take a login from the web-browser and validate against the Windows users... I vaguely recall a thread about this, but dunno what the upshot was.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
http://apache.org/ http://php.net/ http://mysql.com/ or http://mysql.org/ depending on which code-base you want :-(
Or, use any of the Apache/PHP/MySQL installers for Windows that do it as a Wizard in one easy install.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Kyle Smith <dbzno1fan
hotmail.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 02, 2001 12:32 AM Subject: Being a SERVER (you cant kill me, im.... DAMN!!)
Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509 MSN: dbzno1fan
hotmail.com AIM: legokiller666
attached mail follows:
Download a NuSphere release. Depending on which you release you choose, for the most part these include mySQL, PHP, Apache, and I think Perl. I've found the setup to be seamless and very simple even for beginners.
-----Original Message-----
From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
Sent: Wednesday, August 01, 2001 10:32 PM
To: php-general
lists.php.net
Subject: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? (apache or whatever)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
If you're running Windows system and you've got the windonws 98 SE original cdrom, you can just install from it PWS from: CDROMDRIVE:\addons\pws (...)
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE39GvnCjnZS08i7M4B00006a2e
hotmail.com...
Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
At 23:29 1-8-01 -0700, Ralph Guzman wrote: >Download a NuSphere release. Depending on which you release you choose, for >the most part these include mySQL, PHP, Apache, and I think Perl. I've found >the setup to be seamless and very simple even for beginners.
As far as i've seen NuSphere package is running on Linux only.. has been reported as being 40Megs.. while the seperate parts are 17Megs only. Manuals included..
If you're on Linux then rather download the parts and learn on www.devshed.com how to install.. It's easy.. and fun.. A direct link has been provided by another member of this list..
But I think the guy asking this does run on Windooz..
Bye,
B.
attached mail follows:
NuSphere is also available for Windows. I am running it on my Windows 2000 workstation, but it is also available for 98/ME, etc..
-----Original Message-----
From: B. van Ouwerkerk [mailto:bvo
atz.nl]
Sent: Thursday, August 02, 2001 12:20 AM
To: Ralph Guzman; Kyle Smith; php-general
lists.php.net
Subject: RE: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)
At 23:29 1-8-01 -0700, Ralph Guzman wrote: >Download a NuSphere release. Depending on which you release you choose, for >the most part these include mySQL, PHP, Apache, and I think Perl. I've found >the setup to be seamless and very simple even for beginners.
As far as i've seen NuSphere package is running on Linux only.. has been reported as being 40Megs.. while the seperate parts are 17Megs only. Manuals included..
If you're on Linux then rather download the parts and learn on www.devshed.com how to install.. It's easy.. and fun.. A direct link has been provided by another member of this list..
But I think the guy asking this does run on Windooz..
Bye,
B.
attached mail follows:
Hi,
Two things:
1. PWS from the CD has a bug, you need to get the patch from MS. The problem is with the MTS. 2. I use Badblue www.badblue.com for easy, fast development. I also recommend Apache above IIS or PWS.
Cheers BK
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE39GvnCjnZS08i7M4B00006a2e
hotmail.com...
Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
> Where do i download the best software (prefebly free) to set up my computer as a server so i can test my php scripts? > (apache or whatever)
You can download Xitami from www.xitami.com. Xitami is a small, fast and powerful web server and runs under Windows, Unix, OS/2 and several other systems.
-- Owen Rudge http://www.owenrudge.co.uk/ http://www.gamearchive.uk.tt/
attached mail follows:
> This always works for me... > > eval ("\$message = \"$message\";");
RED ALERT! SECURITY TO THE BRIDGE!
"Captain, there's Klingons off the starboard bow!"
Oh, sorry. Did I type that aloud? Sorry.
If $message is a free-form email typed in by a potentially malicious user this looks pretty dangerous to me...
Have you tried it with things like:
$message = '";exec("/usr/bin/cat /etc/passwd");';
Do *NOT* try this one, but if the above works, think what *THIS* would do! $message = '";exec("/usr/bin/rm -rf /");';
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
I haven't tried those, but should have mentioned in my post, the value of $message is always a value I create. The person asking the original question however, might have been accepting input from unknown users.
Thanks for the 'alert' though... Stand down Number One...
-----Original Message-----
From: Richard Lynch [mailto:ceo
l-i-e.com]
Sent: Wednesday, August 01, 2001 10:03 PM
To: php-general
lists.php.net
Subject: Re: [PHP] Replacing template variables with values?
> This always works for me... > > eval ("\$message = \"$message\";");
RED ALERT! SECURITY TO THE BRIDGE!
"Captain, there's Klingons off the starboard bow!"
Oh, sorry. Did I type that aloud? Sorry.
If $message is a free-form email typed in by a potentially malicious user this looks pretty dangerous to me...
Have you tried it with things like:
$message = '";exec("/usr/bin/cat /etc/passwd");';
Do *NOT* try this one, but if the above works, think what *THIS* would do! $message = '";exec("/usr/bin/rm -rf /");';
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
You wrote: > > This always works for me... > > > > eval ("\$message = \"$message\";"); > > RED ALERT! SECURITY TO THE BRIDGE! > > "Captain, there's Klingons off the starboard bow!" > > Oh, sorry. Did I type that aloud? Sorry. > > If $message is a free-form email typed in by a potentially malicious user > this looks pretty dangerous to me... > > Have you tried it with things like: > > $message = '";exec("/usr/bin/cat /etc/passwd");'; > > Do *NOT* try this one, but if the above works, think what *THIS* would do! > $message = '";exec("/usr/bin/rm -rf /");';
The e-mail script is for administration, so it's password protected. Do you still see a problem? Do you have any better ideas?
-- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
attached mail follows:
try using single quotes :
preg_replace("/\$(\w+)/e", '${$1}', $template);
> -----Original Message-----
> From: Ryan Fischer [mailto:ryan
gigabee.com]
> Sent: Wednesday, August 01, 2001 6:37 PM
> To: php-general
lists.php.net
> Subject: [PHP] Replacing template variables with values?
>
>
> Hello! :)
>
> I have a form with a textarea that contains a template e-mail with
> variables in it. I would like to be able to replace those variables
> with values. The variables named in the template are actual variables
> in my script. This doesn't seem to work:
>
> $newmail = preg_replace("/\$(\w+)/e", ${$1}, $template);
>
> ...and neither does anything I've tried to do as far as eval() goes. I
> either get a parse error like this:
>
> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> c:\path\file.php on line 16
>
> ...or some other sort of eval() error. Any ideas? TIA! :)
>
> --
> -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> HI FOLKS, > > Imagine you had a PC Laptop, PHP installed, and a Ricochet/Sierra > Wireless AirCard 400 - 128 kbps NIC card. > > What boom pow applications can you imagine setting up and running > in this environment? What else would you need, if anything?
I believe Thies (?) said last week that his reaches to the pub down the street, and that pretty much answers the "what else would you need" part for you... :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
cool. you and i were talking about two different things. you are using __sleep and __wakeup by issuing the serialize and unserialize commands yourself. i am using __sleep and __wakeup when php automatically issues them itself when using sessions.
it is my experience that if you have an object and you register that object as a session variable, and you do _not_ have a __sleep function, then everything works fine. this is different from having a __sleep function and not returning anything (or the wrong thing)
mike
on 8/1/01 9:32 AM, scott [gts] at scott
graphictype.com wrote:
> i added a (hopefully helpfull) addition to the > online notes regarding magic-functions: > http://www.php.net/manual/en/language.oop.magic-functions.php > > Here's what i posted, if anyone's interested: > > Here is a sample class and some test statements to > demonstrate how __sleep() is used. > > If you do not return anything from __sleep(), your > object will *not* be serialized. You must return > something from __sleep() to tell serialize what > to serialize. > > <? > // to test the class > $x = new Scott(); > print_r($x); > $y = serialize($x); > $z = unserialize($y); > print_r($z); > > // Simple class to test __sleep() > class Scott { > // class variables > var $error; > var $svar = array(); > > // constructor > function Scott() { > $this->svar['Hello'] = "World"; > } > > function __sleep() { > $this->svar['Hello'] = "Yawn"; > // return list of instance-variables to be serialized > return array('error', 'svar'); > } > > function __wakeup() { > $this->svar['test'] = "I'm here!"; > } > > }// end class > ?>
-- mike cullerton
attached mail follows:
> > PHP Hypertext Preprocessor. > > Which does not explain the php
Sure it does - look in the titlebar of your browser when you go to http://php.net
-Rasmus
attached mail follows:
Hi PHPers,
I've been having a problem of late that some of my forms which are set to method=post are not submitting by post by via get. $REQUEST_METHOD reads get $HTTP_POST_VARS is not set but $HTTP_GET_VARS is ..
What could be causing this ??
Thanx, Christian
attached mail follows:
> I've been having a problem of late that some of my forms > which are set to method=post are not submitting by post by via get.
I have seen browsers that only do post when it sees, method=POST ie. "POST" vs. "post"
-Rasmus
attached mail follows:
Thanx, tried capitals but it still submits via GET :-/
Rasmus Lerdorf wrote:
>>I've been having a problem of late that some of my forms >>which are set to method=post are not submitting by post by via get. >> > > I have seen browsers that only do post when it sees, method=POST > ie. "POST" vs. "post" > > -Rasmus > >
attached mail follows:
Then you have some silly mistake somewhere. Show us the URL.
-Rasmus
> Thanx, tried capitals but it still submits via GET :-/ > > Rasmus Lerdorf wrote: > > >>I've been having a problem of late that some of my forms > >>which are set to method=post are not submitting by post by via get. > >> > > > > I have seen browsers that only do post when it sees, method=POST > > ie. "POST" vs. "post" > > > > -Rasmus > > > > > > > >
attached mail follows:
In article <3B684647.4010403
smartchat.net.au>,
c_hope
smartchat.net.au (Christian) wrote:
Are you quoting the attribute in the real markup (method="POST"), or is like you show below? (It might help to throw the whole page at an html validator either way,'cuz even if that line is syntactically valid, there may be something else that's confusing the browser.)
> Thanx, tried capitals but it still submits via GET :-/ > > Rasmus Lerdorf wrote: > > >>I've been having a problem of late that some of my forms > >>which are set to method=post are not submitting by post by via get. > >> > > > > I have seen browsers that only do post when it sees, method=POST > > ie. "POST" vs. "post"
-- CC
attached mail follows:
<FORM method="POST" action="{ACTION}">
which translates to
<form method="POST" action="adminMembers_2.php">
Rasmus Lerdorf wrote:
> Then you have some silly mistake somewhere. Show us the URL. > > -Rasmus > > >>Thanx, tried capitals but it still submits via GET :-/ >> >>Rasmus Lerdorf wrote: >> >> >>>>I've been having a problem of late that some of my forms >>>>which are set to method=post are not submitting by post by via get. >>>> >>>> >>>I have seen browsers that only do post when it sees, method=POST >>>ie. "POST" vs. "post" >>> >>>-Rasmus >>> >>> >>> >> >> >> >
attached mail follows:
I am creating a search form for an application we're building and I'm curious how it should be handled. Some search options:
Category: Any Computer Programmer Computer Operator etc.
Experience can choose between 1 and 2: Any 1 2 3 etc
Location: Cities listed
Skills: added by resume holder
Now I can do one or two of these seperate but can anyone suggest a logic to take to allow someone to say: I'd like to search for Computer Programmers between 1 and 3 years experience in Kitchener and that have these keywords.
But the next person may come and say I want Computer Programmers with 2 years experience in any city and any keywords...
Jeff
attached mail follows:
same same... Thought there was a PHP function to do that...instead of looping,
"Tim Ward" <tim.ward
stivesdirect.com> wrote in message
news:D2AC2CC91E72D511BD5600500416D3C0068BFF
hunters-mail.itnetadmin.com...
> How about ...
>
> foreach ($keys as $key=>$value) $new_array[$value] = $vals[$key];
>
>
> Tim
> ----------
> From: elias [SMTP:elias_bachaalany
yahoo.com]
> Sent: 01 August 2001 15:16
> To: php-general
lists.php.net
> Subject: Make associative array from two arrays
>
> Hello!
>
> I have two arrays:
>
> $keys = array("a", "b", "c", "d");
> $vals = array(1, 2, 3, 4);
>
> I would like to get an associative array holding this:
> $aarray = array("a" =>1, "b"=>2, "c"=>3, "d"=>4);
>
> I know I can do it with a "while" loop...but I wonder if there is
> any
> builtin PHP function that can do that.
> Or a better method other than sort of this:
>
> $aarray = array();
> for ($i=0;$i<count($keys);$i++)
> {
> $aarray[$keys[$i]] = $vals[$i];
> }
>
> thanks!
>
>
attached mail follows:
Why you ppl. do this: if ($condition) { //action 1 //action 2 //action 3
}
instead of this: if ($condition) { //action 1 //action 2 //action 3 }
with the '}' you'll see directly the new code block that belongs to the IF statment.
anyway...it's just a style after all
"Fredrik Arild Takle" <ftakle
online.no> wrote in message
news:20010801165508.75622.qmail
pb1.pair.com...
> I think it's impossible to read/understand my own scripts if i don't do
it.
>
> Do:
>
> <?php
> if ($submit) {
> echo "Counting from 1-32<br>";
> for ($ii = '1'; $ii <= '32' $ii++) {
> echo $ii." ";
> }
> }
> echo "<br>All done!";
> ?>
>
> instead of:
>
> <?php
> if ($submit) {
> echo "Counting from 1-32<br>";
> for ($ii = '1'; $ii <= '32' $ii++) {
> echo $ii." ";
> }
> }
> echo "<br>All done!";
> ?>
>
> Best Regards
> Fredrik A. Takle
>
> "Keith Jeffery" <jeff2619
uidaho.edu> wrote in message
> news:20010801144019.40663.qmail
pb1.pair.com...
> > Simply indent formatting for readability. I personally don't indent
after
> > the <? tag, but to each his/her own.
> >
> >
> > "Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
> > news:OE67QR7Ia6XH4WdMCAR0000652e
hotmail.com...
> > Whenever i get a php script off a website why is it that most of the
main
> > parts in the script have a space from the left border. eg
> >
> > <?php
> > echo"spazzzzzzz";
> > ?>
> >
> > ????
> >
> > -lk6-
> > http://www.StupeedStudios.f2s.com
> > Home of the burning lego man!
> >
> > ICQ: 115852509
> > MSN: dbzno1fan
hotmail.com
> > AIM: legokiller666
> >
> >
> >
> >
> >
>
>
attached mail follows:
I'm working on a custom PHP extension in C were I work which is going well
but I can't seem to find any documentation about the subject
php.net.
Anyone know of such a manual? A PHP/Zend C API document of some sort - from
an extension developer's point-of-view?
I've tried searching news.php.net, but the search is down - sorry if this question has already been asked.
Rasmus r0x! (saw you
TLUG) Learned many PHP "secrets"... Thanx!
Darryl.
attached mail follows:
Actually there is no need for you to use exit(); If you choose to use this method cheking for empty fields one at a time rather than all at once; you can simplify your code a bit as follows:
If($HTTP_POST_VARS){ if(!$Age) { echo "Please enter your age"; } elseif(!$Email){ echo "Please enter your email"; } else
echo "Thanks for your submission";
// continue processing... ... ... } }
but in any case, I'm glad I was of help.
-----Original Message-----
From: Gerard Samuel [mailto:trini0
optonline.net]
Sent: Wednesday, August 01, 2001 12:50 PM
To: PHP
Subject: Re: [PHP] PHP_SELF
Ok, I would like to thank Ralph Guzman & Richard Lynch for your help. I combined your ideas into my own working example. Just posting here for archiving/discussion purposes... // Input some data // echo "<form action=\"$PHP_SELF\" method=\"POST\" enctype=\"multipart/form-data\">\n"; echo "1. Age:<br>\n"; echo "   <input type=\"text\" name=\"Age\" size=\"4\" maxlength=\"2\" value=\"$Age\"><p>\n"; echo "2. Email:<br>\n"; echo "   <input type=\"text\" name=\"Email\" size=\"25\" maxlength=\"30\" value=\"$Email\"><p>\n"; echo "   <input type=\"submit\" name=\"submit\" value=\"Submit\">\n"; // Start error correction // if (!$HTTP_POST_VARS) { exit(); } elseif (!$Age) { echo "Please enter your age.<br>\n"; } elseif (!$Email) { echo "Please enter your email.<br>\n"; } else { echo "Thanks for your submission.\n"; } // Do what you want with you sanitised strings // .......... :)
Thanks again guys...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
----- Original Message -----
From: "sarahana" <stellar
sarahana.com>
To: "Jon Yaggie" <dmsales
design-monster.com>
Sent: Thursday, August 02, 2001 6:26 PM
Subject: detecting mysql
> Does anybody here know how to detect with php whether mysql is installed or > not.. ? Thanks, I haven't been able to get anything from the other lists.. > sarahana >
attached mail follows:
On Thu, 2 Aug 2001 16:24, Jon Yaggie wrote:
> ----- Original Message -----
> From: "sarahana" <stellar
sarahana.com>
> To: "Jon Yaggie" <dmsales
design-monster.com>
> Sent: Thursday, August 02, 2001 6:26 PM
> Subject: detecting mysql
>
> > Does anybody here know how to detect with php whether mysql is
> > installed
>
> or
>
> > not.. ? Thanks, I haven't been able to get anything from the other
> > lists.. sarahana
Have you tried phpinfo() ?
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIACanadian DOS: "Yer sure, eh?" [y/n]
attached mail follows:
Thanks a lot, but I must precise that I'm running PHP (4.0.6) under NT2000 (client not server) platform. 'fr_FR.ISO_8859-1' does not work too.
So, it's not very important, but where can I find the entire list of countries with their ISO code?
Thanks.
----- Original Message -----
From: "Don Read" <dread
texas.net>
To: "Frédéric Mériot" <frederic
argyro.net>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 4:10 AM
Subject: RE: [PHP] SetLocal() problem
>
> On 01-Aug-2001 Frédéric Mériot wrote:
> > Hello, I've got a little problem with the setLocal function. In many
> > tutorials they give this syntax:
> > setlocale('LC_TIME','fr_FR'); // for france
> >
> > I tried this but the "fr_FR" keyword does not seem to work. If I try
> > "french" instead it works.
> > I've got the same problem with all other countries keywords (C for
finland,
> > pt_BR for portugal ...etc).
> > If i do not put the name of a country, it does not work.
> >
> > Please help!
>
> Use the full ISO lang.charset definition : 'fr_FR.ISO_8859-1'.
> (Linux allows aliases as defined in locale.alias, that's why "french"
works).
>
> Regards,
> --
> Don Read dread
texas.net
> -- It's always darkest before the dawn. So if you are going to
> steal the neighbor's newspaper, that's the time to do it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
How can I update only N fields from the database?
usually we do:
UPDATE table1 SET field='VALUE' WHERE condition1
now I want to update fields with a certain condition but only X fields out N total fields.
ie:
id value --- ------- 1 a 2 b 3 c 4 d 5 e
how can i update such like: UPDATE table1 SET {only 2 records} value='aa' so I have any two fields now have the 'aa' value
attached mail follows:
Sounds like a strange request, what are you trying to do?
I don't think you can do this directly in mysql, but you could build an array of results in php.
eg something like (crappy code below)
//Grab results $db = mysql_connect($db_domain, $db_user,$db_password); mysql_select_db($db_databasename,$db); $sqlquery="select ID from table1 where condition1"; $result = mysql_query ($sqlstring,$db); $count=0; while ($resultset = mysql_fetch_array ($result)) { $array[$count]=$resultset ["ID"]; $count++; }
for ($count=0;$count<2;$count++){ "update table1 set field='VALUE' WHERE ID=".$array[$count]"; $result = mysql_query ($sqlstring,$db) or die (mysql_error()); }
-----Original Message-----
From: elias [mailto:elias_bachaalany
yahoo.com]
Sent: August 2, 2001 4:30 PM
To: php-general
lists.php.net
Subject: [PHP] MySql help #1
How can I update only N fields from the database?
usually we do:
UPDATE table1 SET field='VALUE' WHERE condition1
now I want to update fields with a certain condition but only X fields out N total fields.
ie:
id value --- ------- 1 a 2 b 3 c 4 d 5 e
how can i update such like: UPDATE table1 SET {only 2 records} value='aa' so I have any two fields now have the 'aa' value
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Someone purchased items from my site let's say 3 items out of 5 total. All items are the same. I just want to update 3 items status to "Reserved". When he buy he just tell how many and not which ones.
"Lawrence Sheed" <Lawrence.Sheed
dfait-maeci.gc.ca> wrote in message
news:4B0FC61A2044D31180A60000F810DF207D3647
shngir01.shngi.dfait-maeci.gc.ca
...
> Sounds like a strange request, what are you trying to do?
>
> I don't think you can do this directly in mysql, but you could build an
> array of results in php.
>
> eg something like (crappy code below)
>
> //Grab results
> $db = mysql_connect($db_domain, $db_user,$db_password);
> mysql_select_db($db_databasename,$db);
> $sqlquery="select ID from table1 where condition1";
> $result = mysql_query ($sqlstring,$db);
> $count=0;
> while ($resultset = mysql_fetch_array ($result)) {
> $array[$count]=$resultset ["ID"];
> $count++;
> }
>
>
> for ($count=0;$count<2;$count++){
> "update table1 set field='VALUE' WHERE ID=".$array[$count]";
> $result = mysql_query ($sqlstring,$db) or die (mysql_error());
> }
>
> -----Original Message-----
> From: elias [mailto:elias_bachaalany
yahoo.com]
> Sent: August 2, 2001 4:30 PM
> To: php-general
lists.php.net
> Subject: [PHP] MySql help #1
>
>
> How can I update only N fields from the database?
>
> usually we do:
>
> UPDATE table1 SET field='VALUE' WHERE condition1
>
> now I want to update fields with a certain condition but only X fields out
N
> total fields.
>
> ie:
>
> id value
> --- -------
> 1 a
> 2 b
> 3 c
> 4 d
> 5 e
>
> how can i update such like:
> UPDATE table1 SET {only 2 records} value='aa'
> so I have any two fields now have the 'aa' value
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Have you thought about your database design carefully?
You might want to create a column for item count
eg
id, item name, items in stock 1, frog, 7
if, say a customer orders 3 frogs, decrement the items in stock by 3.
Just an idea...
Do you know about database normalization? How is the database designed?
-----Original Message-----
From: elias [mailto:elias_bachaalany
yahoo.com]
Sent: August 2, 2001 6:32 PM
To: php-general
lists.php.net
Subject: Re: [PHP] MySql help #1
Someone purchased items from my site let's say 3 items out of 5 total. All items are the same. I just want to update 3 items status to "Reserved". When he buy he just tell how many and not which ones.
"Lawrence Sheed" <Lawrence.Sheed
dfait-maeci.gc.ca> wrote in message
news:4B0FC61A2044D31180A60000F810DF207D3647
shngir01.shngi.dfait-maeci.gc.ca
...
> Sounds like a strange request, what are you trying to do?
>
> I don't think you can do this directly in mysql, but you could build an
> array of results in php.
>
> eg something like (crappy code below)
>
> //Grab results
> $db = mysql_connect($db_domain, $db_user,$db_password);
> mysql_select_db($db_databasename,$db);
> $sqlquery="select ID from table1 where condition1";
> $result = mysql_query ($sqlstring,$db);
> $count=0;
> while ($resultset = mysql_fetch_array ($result)) {
> $array[$count]=$resultset ["ID"];
> $count++;
> }
>
>
> for ($count=0;$count<2;$count++){
> "update table1 set field='VALUE' WHERE ID=".$array[$count]";
> $result = mysql_query ($sqlstring,$db) or die (mysql_error());
> }
>
> -----Original Message-----
> From: elias [mailto:elias_bachaalany
yahoo.com]
> Sent: August 2, 2001 4:30 PM
> To: php-general
lists.php.net
> Subject: [PHP] MySql help #1
>
>
> How can I update only N fields from the database?
>
> usually we do:
>
> UPDATE table1 SET field='VALUE' WHERE condition1
>
> now I want to update fields with a certain condition but only X fields out
N
> total fields.
>
> ie:
>
> id value
> --- -------
> 1 a
> 2 b
> 3 c
> 4 d
> 5 e
>
> how can i update such like:
> UPDATE table1 SET {only 2 records} value='aa'
> so I have any two fields now have the 'aa' value
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
the structur is like: id, item name, items in stock , frogserialnumber, status 1, frog, 7, 002121, Reserved 2, frog, 7, 101011, Free 1, frog, 7, 212001, Free
that's why I want to mark only N entries "Reserved",
"Lawrence Sheed" <Lawrence.Sheed
dfait-maeci.gc.ca> wrote in message
news:4B0FC61A2044D31180A60000F810DF207D364A
shngir01.shngi.dfait-maeci.gc.ca
...
> Have you thought about your database design carefully?
>
> You might want to create a column for item count
>
> eg
>
> id, item name, items in stock
> 1, frog, 7
>
> if, say a customer orders 3 frogs, decrement the items in stock by 3.
>
> Just an idea...
>
> Do you know about database normalization? How is the database designed?
>
>
>
> -----Original Message-----
> From: elias [mailto:elias_bachaalany
yahoo.com]
> Sent: August 2, 2001 6:32 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] MySql help #1
>
>
> Someone purchased items from my site let's say 3 items out of 5 total. All
> items are the same. I just want to update 3 items status to "Reserved".
> When he buy he just tell how many and not which ones.
>
> "Lawrence Sheed" <Lawrence.Sheed
dfait-maeci.gc.ca> wrote in message
>
news:4B0FC61A2044D31180A60000F810DF207D3647
shngir01.shngi.dfait-maeci.gc.ca
> ..
> > Sounds like a strange request, what are you trying to do?
> >
> > I don't think you can do this directly in mysql, but you could build an
> > array of results in php.
> >
> > eg something like (crappy code below)
> >
> > //Grab results
> > $db = mysql_connect($db_domain, $db_user,$db_password);
> > mysql_select_db($db_databasename,$db);
> > $sqlquery="select ID from table1 where condition1";
> > $result = mysql_query ($sqlstring,$db);
> > $count=0;
> > while ($resultset = mysql_fetch_array ($result)) {
> > $array[$count]=$resultset ["ID"];
> > $count++;
> > }
> >
> >
> > for ($count=0;$count<2;$count++){
> > "update table1 set field='VALUE' WHERE ID=".$array[$count]";
> > $result = mysql_query ($sqlstring,$db) or die (mysql_error());
> > }
> >
> > -----Original Message-----
> > From: elias [mailto:elias_bachaalany
yahoo.com]
> > Sent: August 2, 2001 4:30 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] MySql help #1
> >
> >
> > How can I update only N fields from the database?
> >
> > usually we do:
> >
> > UPDATE table1 SET field='VALUE' WHERE condition1
> >
> > now I want to update fields with a certain condition but only X fields
out
> N
> > total fields.
> >
> > ie:
> >
> > id value
> > --- -------
> > 1 a
> > 2 b
> > 3 c
> > 4 d
> > 5 e
> >
> > how can i update such like:
> > UPDATE table1 SET {only 2 records} value='aa'
> > so I have any two fields now have the 'aa' value
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Come on, you're pushing SQL in directions it's not supposed to go! It is set oriented after all. So it's experimentation time. I've never tried, but as LIMIT works on a SELECT, try it on an update. And let us know what happened. Miles
At 10:30 AM 8/2/01 +0200, elias wrote:
>How can I update only N fields from the database?
>
>usually we do:
>
>UPDATE table1 SET field='VALUE' WHERE condition1
>
>now I want to update fields with a certain condition but only X fields out N
>total fields.
>
>ie:
>
>id value
>--- -------
>1 a
>2 b
>3 c
>4 d
>5 e
>
>how can i update such like:
>UPDATE table1 SET {only 2 records} value='aa'
>so I have any two fields now have the 'aa' value
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi again.
$result = mysql_query("SELECT id FROM table"); $id_array = array();
while ($r = mysql_fetch_array($result)) $id_array[] = $r["id"];
// now $id_array[] is an array of IDs that was grabbed from the database.
Any faster and/or better approache to build the $id_array?
attached mail follows:
Depends what is to happen to the array afterwards, but in general no.
An interesting thing is to put timing method calls around a block of code in question, you will find something like this (depending upon size of db) takes somehting like 0.005 seconds. Timing things can be useful measures of a pages overhead (one page on a site I hvae currently takes almost 2 seconds on average to build...eek!)
"elias" <elias_bachaalany
yahoo.com> wrote in message
----- Original Message -----
From: "elias" <elias_bachaalany
yahoo.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 9:31 AM
Subject: [PHP] Mysql Help #2
> Hi again.
>
> $result = mysql_query("SELECT id FROM table");
> $id_array = array();
>
> while ($r = mysql_fetch_array($result))
> $id_array[] = $r["id"];
>
> // now $id_array[] is an array of IDs that was grabbed from the database.
>
> Any faster and/or better approache to build the $id_array?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Looks fine to me Miles
At 10:31 AM 8/2/01 +0200, elias wrote:
>Hi again.
>
>$result = mysql_query("SELECT id FROM table");
>$id_array = array();
>
>while ($r = mysql_fetch_array($result))
> $id_array[] = $r["id"];
>
>// now $id_array[] is an array of IDs that was grabbed from the database.
>
>Any faster and/or better approache to build the $id_array?
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
From your mail it seems to install properly. Find out where libphp4.so is and set the exact path. In my case /etc/httpd/modules. I had the same problem once I set the path it works.
Adrian
On Wed, 1 Aug 2001, Christopher Cheng wrote:
> I am new to using PHP with IMAP? > As I recompile PHP, I use > > rm config.cache > ./configure --enable-track-vars --enable-force-cgi-redirect --with-gettext - > -with-mysql --with-sybase=/opt/sybase --with-apxs --with-imap > make > make install > > After I restart Apache, it says that > Cannot load /www/libexec/libphp4.so into server: /www/libexec/libphp4.so: > undefined symbol: gss_mech_krb5 > > Does it mean that I miss the DIR option after "--with-imap"? I am using > Redhat 6.2, what should it always be? > > >
attached mail follows:
I'd always understood that mysql doesn't allow multiple statements to be submitted so this post obviously worried me. I did some tests and confirmed that this is not a problem in MySQL queries from PHP. If I'm wrong about this please let me know.
Tim
----------
From: scott [gts] [SMTP:scott
graphictype.com]
Sent: 01 August 2001 18:03
To: php
Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
wrong
no offense to you sam, but please dont ever simply place single quotes around values. you have to escape the values *themselves*.
what if someone submitted the form field title as: $title = "'; DELETE FROM seminar; "
if you didn't escape the single quotes in there, it would get interpreted as a valid DELETE statement and your seminar table would get wiped.
however, if you escaped $title, you'd end up setting title to "\'; DELETE FROM SEMINAR; " (rather than have the contents of $title interpreted as SQL commands)
> -----Original Message-----
> From: Sam Masiello [mailto:smasiello
synacor.com]
> Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
wrong
>
>
> You will need to put single quotes around your variables in your
SQL
> statement. Like this:
>
> $sql = "UPDATE TABLE seminar SET
>
title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
> ilding'
> ,rm='$room' WHERE id='$id'";
>
> Without the quotes, SQL doesn't know that Something Amazing is
supposed to
> go together in the same string.
>
> HTH
attached mail follows:
hmmm, i am seeing the same thing as tim here. are we doing something wrong? i created a test table, entered some dummy data and then using scott's example of "'; DELETE FROM seminar; " i tried executing
insert into test values (0,''; DELETE FROM test; ',1);
and got this error
ERROR 1064: You have an error in your SQL syntax near '' at line 1
trying other variations either caused similar errors or added rows to my table.
is it possible to sneak in a command in this manner?
mike
on 8/2/01 2:39 AM, Tim Ward at tim.ward
stivesdirect.com wrote:
> I'd always understood that mysql doesn't allow multiple statements to be
> submitted so this post obviously worried me. I did some tests and confirmed
> that this is not a problem in MySQL queries from PHP. If I'm wrong about
> this please let me know.
>
> Tim
>
> ----------
> From: scott [gts] [SMTP:scott
graphictype.com]
> Sent: 01 August 2001 18:03
> To: php
> Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
> wrong
>
> no offense to you sam, but please dont ever simply place
> single quotes around values. you have to escape the values
> *themselves*.
>
> what if someone submitted the form field title as:
> $title = "'; DELETE FROM seminar; "
>
> if you didn't escape the single quotes in there, it
> would get interpreted as a valid DELETE statement
> and your seminar table would get wiped.
>
> however, if you escaped $title, you'd end up setting
> title to "\'; DELETE FROM SEMINAR; "
> (rather than have the contents of $title interpreted
> as SQL commands)
>
>> -----Original Message-----
>> From: Sam Masiello [mailto:smasiello
synacor.com]
>> Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
> wrong
>>
>>
>> You will need to put single quotes around your variables in your
> SQL
>> statement. Like this:
>>
>> $sql = "UPDATE TABLE seminar SET
>>
> title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
>> ilding'
>> ,rm='$room' WHERE id='$id'";
>>
>> Without the quotes, SQL doesn't know that Something Amazing is
> supposed to
>> go together in the same string.
>>
>> HTH
>
-- mike cullerton
attached mail follows:
I have WindowsNT4 Serv & PHP 4.0.6/CGI
My php.ini includes: (...) session.save_handler = files session.save_path = /tmp session.use_cookies = 1 (...)
Problem: When I run PHP script which uses sessions (commands like session_start() etc.) the session file IS created in /tmp BUT cannot be received and added to my URL. My browser (IE5.5PL SP1) receives message:
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in I:\(...)\test.php on line 0
I checked. The session data was created! I CAN read them directly by another script also in PHP:
(...) <? $fd = fopen("$path/$filename", "r") or die("<h3>Cannot read $path/$filename</h3>"); print fread($fd, filesize("$path/$filename")); fclose($fd); ?>
It seams very strange. PHP do create session data but display error "Failed to write". What can be incorrect with session.save_path? I checked, the session data is created correctly. I can read that file. What is goin' on? Anybody can help?
-- Jarek
attached mail follows:
Hi,
I think the prlbem is that /tmp is not a valid path under WinNT
Try chaning session.save_path to c:\php\tmp or c:\temp or any other windows directory.
Best wishes,
Andras.
----- Original Message -----
From: "Jarek" <programisci
murator.com.pl>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 12:29 PM
Subject: [PHP] Very strange problem with session files
> I have WindowsNT4 Serv & PHP 4.0.6/CGI
>
> My php.ini includes:
> (...)
> session.save_handler = files
> session.save_path = /tmp
> session.use_cookies = 1
> (...)
>
> Problem: When I run PHP script which uses sessions (commands like
session_start()
> etc.) the session file IS created in /tmp BUT cannot be received and
> added to my URL. My browser (IE5.5PL SP1) receives message:
>
> Warning: Failed to write session data (files). Please verify that
> the current setting of session.save_path is correct (/tmp) in
> I:\(...)\test.php on line 0
>
> I checked. The session data was created! I CAN read them directly by
> another script also in PHP:
>
> (...)
> <?
> $fd = fopen("$path/$filename", "r") or die("<h3>Cannot read
$path/$filename</h3>");
> print fread($fd, filesize("$path/$filename"));
> fclose($fd);
> ?>
>
> It seams very strange. PHP do create session data but display error
> "Failed to write". What can be incorrect with session.save_path? I
> checked, the session data is created correctly. I can read that file.
> What is goin' on? Anybody can help?
> --
> Jarek
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Ok have installed PHPTriad, when i run apache (gulp) dos opens, all fine BUT when i run PHP.exe.... well look down (sorry if im not allowed to post pictures but, its small!)
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Kyle Smith wrote: > Ok have installed PHPTriad, when i run apache (gulp) dos opens, all fine > BUT when i run PHP.exe.... well look down (sorry if im not allowed to post > pictures but, its small!)
That attachment was apperantly chopped off.
If you want to post a file on this list, just upload it (your sure got some webspace, don't you) and post a link. Saves a lot of bandwidth.
regards Wagner
-- "Isn't it strange? The same people who laugh at gypsy fortune tellers take economists seriously." - Cincinnati Enquirer
attached mail follows:
(the damn thing took my attatchement off!!!)
Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine BUT when i run PHP.exe.... well look down
http://www.stupeedstudios.f2s.com/probs.gif
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Kyle,
Apache runs as a background program.
When you've installed apache, and php, you don't actually run them from the commmand line.
What you have to do is open up a browser window, and point it to your computer.
Open up Internet Explorer (you're running windows it looks like),
and type in http://127.0.0.1 or http://localhost
This should bring up a screen saying you've installed apache correctly.
If apache is installed in the default directories, then most likely you'll need to put some webpages into
c:\apache\htdocs
I would recommend making a file called test.php with the following lines in
<?php
phpinfo();
?>
Save it into c:\apache\htdocs
now go to your webbrowser, and go to http://localhost/test.php
If php shows the phpinfo screen then you've installed everything correctly. If it doesn't work, we'll need to look at your apache settings and php settings. Try the stuff above first, then tell me what happens.
Cheers,
Lawrence.
-----Original Message-----
From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
Sent: August 3, 2001 1:46 AM
To: php-general
lists.php.net
Subject: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
(the damn thing took my attatchement off!!!)
Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine BUT when i run PHP.exe.... well look down
http://www.stupeedstudios.f2s.com/probs.gif
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Oops, Correction - You'll need to run apache first, leave it running, and then try the below.
not enough coffee today...
-----Original Message-----
From: Sheed, Lawrence -SHNGI -AG
Sent: August 2, 2001 5:51 PM
To: 'Kyle Smith'; php-general
lists.php.net
Subject: RE: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
Kyle,
Apache runs as a background program.
When you've installed apache, and php, you don't actually run them from the commmand line.
What you have to do is open up a browser window, and point it to your computer.
Open up Internet Explorer (you're running windows it looks like),
and type in http://127.0.0.1 or http://localhost
This should bring up a screen saying you've installed apache correctly.
If apache is installed in the default directories, then most likely you'll need to put some webpages into
c:\apache\htdocs
I would recommend making a file called test.php with the following lines in
<?php
phpinfo();
?>
Save it into c:\apache\htdocs
now go to your webbrowser, and go to http://localhost/test.php
If php shows the phpinfo screen then you've installed everything correctly. If it doesn't work, we'll need to look at your apache settings and php settings. Try the stuff above first, then tell me what happens.
Cheers,
Lawrence.
-----Original Message-----
From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
Sent: August 3, 2001 1:46 AM
To: php-general
lists.php.net
Subject: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
(the damn thing took my attatchement off!!!)
Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine BUT when i run PHP.exe.... well look down
http://www.stupeedstudios.f2s.com/probs.gif
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
and since you're running Win32, i'd *highly* suggest running apache to a service... so that you dont have to spawn a console window everytime you want to use your webserver.
> -----Original Message-----
> From: Lawrence.Sheed
dfait-maeci.gc.ca
> [mailto:Lawrence.Sheed
dfait-maeci.gc.ca]
> Sent: Thursday, August 02, 2001 5:52 AM
> To: dbzno1fan
hotmail.com; php-general
lists.php.net
> Subject: RE: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
>
>
> Oops, Correction - You'll need to run apache first, leave it running, and
> then try the below.
>
> not enough coffee today...
>
> -----Original Message-----
> From: Sheed, Lawrence -SHNGI -AG
> Sent: August 2, 2001 5:51 PM
> To: 'Kyle Smith'; php-general
lists.php.net
> Subject: RE: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
>
>
> Kyle,
>
> Apache runs as a background program.
>
> When you've installed apache, and php, you don't actually run them from the
> commmand line.
>
> What you have to do is open up a browser window, and point it to your
> computer.
>
> Open up Internet Explorer (you're running windows it looks like),
>
> and type in http://127.0.0.1 or http://localhost
>
> This should bring up a screen saying you've installed apache correctly.
>
> If apache is installed in the default directories, then most likely you'll
> need to put some webpages into
>
> c:\apache\htdocs
>
> I would recommend making a file called test.php with the following lines in
>
> <?php
>
> phpinfo();
>
> ?>
>
> Save it into c:\apache\htdocs
>
> now go to your webbrowser, and go to http://localhost/test.php
>
> If php shows the phpinfo screen then you've installed everything correctly.
> If it doesn't work, we'll need to look at your apache settings and php
> settings. Try the stuff above first, then tell me what happens.
>
> Cheers,
>
> Lawrence.
>
> -----Original Message-----
> From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
> Sent: August 3, 2001 1:46 AM
> To: php-general
lists.php.net
> Subject: [PHP] <----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!
>
>
> (the damn thing took my attatchement off!!!)
>
> Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine
> BUT when i run PHP.exe.... well look down
>
> http://www.stupeedstudios.f2s.com/probs.gif
>
>
> -lk6-
> http://www.StupeedStudios.f2s.com
> Home of the burning lego man!
>
> ICQ: 115852509
> MSN: dbzno1fan
hotmail.com
> AIM: legokiller666
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi,
Use limit :
update mytable set status='Reserverd' where purch_id=1 limit 3;
This is mysql specific i think so it won't work with other db.
Best wishes,
Andras.
"elias" <elias_bachaalany
yahoo.com> wrote in message news:20010802093440.68853.qmail
pb1.pair.com...
> Someone purchased items from my site let's say 3 items out of 5 total. All
> items are the same. I just want to update 3 items status to "Reserved".
> When he buy he just tell how many and not which ones.
>
attached mail follows:
Thanks! That was exactly what I was looking for!
"Andras Balogh" <abalogh
grafx.ro> wrote in message
news:011f01c11b39$174c0b70$0d00a8c0
grafx.ro...
Hi,
Use limit :
update mytable set status='Reserverd' where purch_idlimit 3;
This is mysql specific i think so it won't work with other db.
Best wishes,
Andras.
"elias" <elias_bachaalany
yahoo.com> wrote in message
news:20010802093440.68853.qmail
pb1.pair.com...
> Someone purchased items from my site let's say 3 items out of 5 total. All
> items are the same. I just want to update 3 items status to "Reserved".
> When he buy he just tell how many and not which ones.
>
attached mail follows:
Hi !
Wich odbc (and how to set it) is bettet to use to connect to remote Sybase DB server from PHP on Linux?
attached mail follows:
Veniamin,
You can use OpenLink's Multi-Tier ODBC drivers for this.
Compile PHP --with-iodbc as per the HOWTO at www.iodbc.org. The presence of the iODBC Driver Manager will let you use any ODBC drivers, and then you can do compariative testing.
Our drivers download with a free non-expiring 2-user license, and free support is available at http://www.openlinksw.com/support/suppindx.htm.
Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers
> -----Original Message-----
> From: Veniamin Goldin [mailto:veniamin.goldin
labbis.lt]
> Sent: Thursday, August 02, 2001 6:14 AM
> To: php-general
lists.php.net
> Subject: [PHP] PHP-Linux >> Sybase-Windows
>
>
> Hi !
>
> Wich odbc (and how to set it) is bettet to use to connect to
> remote Sybase DB server from PHP on Linux?
>
attached mail follows:
In the past to hit a database on a windows box via PHP/Linux I've used the ODBCSocketServer. Nice little GPL project. Zero fees, pretty fast, supports multiple client types and includes sample client code. All told it's a rather nice product.
'da links: http://odbc.sourceforge.net/
- Erik
> -----Original Message-----
> From: Veniamin Goldin [mailto:veniamin.goldin
labbis.lt]
> Sent: Thursday, August 02, 2001 5:14 AM
> To: php-general
lists.php.net
> Subject: [PHP] PHP-Linux >> Sybase-Windows
>
>
> Hi !
>
> Wich odbc (and how to set it) is bettet to use to connect to remote
> Sybase DB server from PHP on Linux?
>
attached mail follows:
Could someone please help me sort out a database on this so i can find out if php works, OR could you people please send me any scripts you have cause i just got php working on my pc and i wanna know what its capable of.
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Look, for God's sake, go to webmonkey and read their absolutely first-rate tutorial on getting all this working.
http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html
Please?
Cheers Jon
-----Original Message-----
From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
Sent: 02 August 2001 19:21
To: php-general
lists.php.net
Subject: [PHP] PHPTriad users
Could someone please help me sort out a database on this so i can find out if php works, OR could you people please send me any scripts you have cause i just got php working on my pc and i wanna know what its capable of.
attached mail follows:
I have read the archives for this problem but I can't seam to fix it This is on a RedHat 7 I get this error when I try to start Apache Starting httpd: Syntax error on line 256 of /etc/httpd/conf /httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server: libmysqlclient.so.10: cannot open shared object file: No such file or directory
What I have read is to add the path to libmysqlclient.so.10 to the /etc/ld.so.conf file and then run "ldconfig". at root I did this but ldconfig does not run I keep getting No such file or directory
This is what my ld.so.conf file looks like /usr/X11R6/lib /usr/kerberos/lib /usr/lib /usr/local/mysql /usr/local/mysql/lib/mysql <--This is were libmysqlclient.so.10 is
I really need to get this working
Best regards,
Richard
mailto:rkurth
pacifier.com
attached mail follows:
> -----Original Message-----
> From: Richard Kurth [mailto:rkurth
pacifier.com]
> Sent: Thursday, August 02, 2001 5:36 AM
> To: php
> Subject: [PHP] URGENT!!! Can't start Apache with php4 and mysql
>
>
> I have read the archives for this problem but I can't seam
> to fix it. This is on a RedHat 7. I get this error when I
> try to start Apache
>
> Starting httpd: Syntax error on line 256 of /etc/httpd/conf
> /httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
> libmysqlclient.so.10: cannot open shared object file: No such file
> or directory
>
> What I have read is to add the path to libmysqlclient.so.10 to the
> /etc/ld.so.conf file and then run "ldconfig". at root
>
> I did this but ldconfig does not run. I keep getting No such
> file or directory
If it's not in your normal search path, you might nead to provide the full path to the ldconfig program. I'm not sure where it normally lives on a Redhat system, but on my FreeBSD box, it's in /sbin.
An alternative, of course, if you can't get things working the other way, is simply to copy libmysqlclient.so.10 to one of the locations that was already in your ld.so.conf (that is, somewhere that ld already knows about)...
--- Mark Roedel | "The most overlooked advantage to owning a Systems Programmer | computer is that if they foul up there's no LeTourneau University | law against whacking them around a little." Longview, Texas, USA | -- Owen Porterfield
attached mail follows:
What I did was this:
ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so.10 /usr/lib/libmysqlclient.so.10
(that should be only one line)
This fixed my problem.
On 8/2/2001 6:36 AM this was written:
> I have read the archives for this problem but I can't seam to fix it > This is on a RedHat 7 > I get this error when I try to start Apache > Starting httpd: Syntax error on line 256 of /etc/httpd/conf > /httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server: > libmysqlclient.so.10: cannot open shared object file: No such file > or directory > > What I have read is to add the path to libmysqlclient.so.10 to the > /etc/ld.so.conf file and then run "ldconfig". at root > I did this but ldconfig does not run > I keep getting No such file or directory > > > This is what my ld.so.conf file looks like > /usr/X11R6/lib > /usr/kerberos/lib > /usr/lib > /usr/local/mysql > /usr/local/mysql/lib/mysql <--This is were libmysqlclient.so.10 is > > > I really need to get this working
--Thomas Deliduka IT Manager ------------------------- New Eve Media The Solution To Your Internet Angst http://www.neweve.com/
attached mail follows:
Richard,
I've sometimes had to take a couple of swipes at this, trying both /usr/local/mysql/lib and /usr/local/mysql/lib/mysql
And does libmysqlclient.so.10 have a symlink to something like libmysqlclient.so.10.0.0
And because I just checked a second machine, where mysql is installed in a completely different location, have you done a "locate" to confirm that libmysqlclient is where you expect?
I know, it's like checking for gas in the tank, but sometimes ....
Cheers - Miles
At 03:36 AM 8/2/01 -0700, Richard Kurth wrote:
> I have read the archives for this problem but I can't seam to fix it
> This is on a RedHat 7
> I get this error when I try to start Apache
>Starting httpd: Syntax error on line 256 of /etc/httpd/conf
>/httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
> libmysqlclient.so.10: cannot open shared object file: No such file
> or directory
>
> What I have read is to add the path to libmysqlclient.so.10 to the
> /etc/ld.so.conf file and then run "ldconfig". at root
> I did this but ldconfig does not run
> I keep getting No such file or directory
>
>
> This is what my ld.so.conf file looks like
>/usr/X11R6/lib
>/usr/kerberos/lib
>/usr/lib
>/usr/local/mysql
>/usr/local/mysql/lib/mysql <--This is were libmysqlclient.so.10 is
>
>
> I really need to get this working
>
>
>
>
>
>Best regards,
> Richard
>mailto:rkurth
pacifier.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I am using the form below, and it works except for sending the message to the user, any ideas/clues ? Being so close to it working is driving me nuts !
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Feedback Form</title> </head> <body> <form action="simplefeedback.php" method="post"> <p>Please provide me your feedback!</p> <p>Enter your name: <input type="text" name="name" size="40"></p> <p>Enter you e-mail: <input type="text" name="email" size="40"></p> <p>Enter your feedback:<br> <textarea name="feedback" rows="3" cols="50"></textarea></p> <p><input type="submit" name="submit" value="Send Feedback"> </form> </body> </html>
<?
if(!$submit) {
header("Location: http://www.imsltd.com/feedback.html");
}
$to = "support
imsltd.com";
$subject = "Feedback";
$mail_body = "Feedback From Your Site\n";
$mail_body .= "Sender's Name: $name\n";
$mail_body .= "Sender's E-Mail: $email\n";
$mail_body .= "Feedback: $feedback\n\n";
$mail_headers = "From: My Web Site <> \n";
$mail_headers .= "Reply-To: $sender_email\n\n";
mail($mail_to, $mail_subject, $mail_body, $mail_headers);
?>
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Feedback Form</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080"
alink="#ff0000">
<p><b>Thank you for your feedback.<br>You have sent the following
feedback:</b></p>
<p>Your Feedback Message:<br>
<? echo "$feedback"; ?></p>
<p>Your Name: <? echo "$name"; ?></p>
<p>Your Email: <? echo "$email"; ?></p>
</body>
</html>
Many thanks
Denis Croombs
attached mail follows:
At 12:49 2-8-01 +0100, Denis Croombs wrote: >I am using the form below, and it works except for sending the message to >the user, any ideas/clues ? >Being so close to it working is driving me nuts !
Thats good.. the more you'll appreciate it as soon as it works :-)
You're using different $to and $mail_to .. looks like it should be both $to or $mail_to.. Might need to declare some things global.
Also.. checkout manual mail() example 4.
Bye,
B.
attached mail follows:
Dear folks,
Any body there with experience setting up Netscape Enterprise Web Server with PHP as CGI binary. I need to know how to configure Netscape Web Server.
TIA,
Herman Tolentino
attached mail follows:
Ok, im trying to cut down on the posts here but this time im really stuck, so could somebody guide me through the usage of mySQL and PHP and show me how to input data into a mySQL database and read it, or just redirect me to another page (which is what normally happens)
NOTE: i am using phpMyAdmin
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Kyle Smith schrieb am Donnerstag, 2. August 2001, 22:36:57:
> Ok, im trying to cut down on the posts here but this time im really stuck, so could somebody guide me through the usage of mySQL and PHP and show me how to input data into a mySQL database and read > it, or just redirect me to another page (which is what normally happens)
> NOTE: i am using phpMyAdmin
Fine. There is a readme. You have to insert your secret data into config.inc.php so that phpMyAdmin can connect. If it does, there are forms to put your stuff into and then: click the Go button. You can't go wrong with this.
-- Herzlich Werner Stuerenburg_________________________________________________ ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen Tel 0(049) 5224-997 407 ˇ Fax 0(049) 5224-997 409 http://pferdezeitung.de
attached mail follows:
At 01:36 PM 8/2/01 -0700, Kyle Smith wrote:
>could somebody guide me through the usage of mySQL and PHP and show me how >to input data into a mySQL database and read it
Kyle,
I wrote a script which does all that and it's open source. You can see the script in action if you go to the Stupid Web Tricks section of Cat 'n Moose at
http://catnmoose.com/stupid.shtml
Download the source code from devshed at
devshed.com/ClipScripts/results/453
hth,
Marty
Face 2 Interface Web Solutions Website Creation Made SIMPL(tm) http://face2interface.com/Demo
attached mail follows:
At 13:36 2-8-01 -0700, Kyle Smith wrote: >Ok, im trying to cut down on the posts here but this time im really stuck, >so could somebody guide me through the usage of mySQL and PHP and show me >how to input data into a mySQL database and read it, or just redirect me >to another page (which is what normally happens) > >NOTE: i am using phpMyAdmin
www.devshed.com php newbie php beginner phpbuilder
Just go through the tutorials.. you'll see.. much more fun then sending a zillion messages to this list.
Bye,
B.
attached mail follows:
i've also written soem very simple scripts (diary, message board etc.) which show (with explanations) how data gets put into mysql and gets retrieved. I believe they will help :
/sunny
-----Original Message-----
From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
Sent: 02 August 2001 21:37
To: php-general
lists.php.net
Subject: [PHP] Adopt A Newbie (ME)
Ok, im trying to cut down on the posts here but this time im really stuck, so could somebody guide me through the usage of mySQL and PHP and show me how to input data into a mySQL database and read it, or just redirect me to another page (which is what normally happens)
NOTE: i am using phpMyAdmin
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
zillion is actually a number? i just downloaded a program which reads out text for you cause it just gets really boring reading the text, so now its goinfg to be like having a techer in the room....... you got a gun?
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
----- Original Message -----
From: "B. van Ouwerkerk" <bvo
atz.nl>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 6:53 AM
Subject: Re: [PHP] Adopt A Newbie (ME)
> At 13:36 2-8-01 -0700, Kyle Smith wrote:
> >Ok, im trying to cut down on the posts here but this time im really
stuck,
> >so could somebody guide me through the usage of mySQL and PHP and show me
> >how to input data into a mySQL database and read it, or just redirect me
> >to another page (which is what normally happens)
> >
> >NOTE: i am using phpMyAdmin
>
> www.devshed.com
> php newbie php beginner phpbuilder
>
> Just go through the tutorials.. you'll see.. much more fun then sending a
> zillion messages to this list.
>
> Bye,
>
>
> B.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I hereby nominate Kyle as the official George W. Bush of the PHP General mailing list. Anyone second it?
- Tim
On 02 Aug 2001 15:07:49 -0700, Kyle Smith wrote:
> zillion is actually a number? i just downloaded a program which reads out
> text for you cause it just gets really boring reading the text, so now its
> goinfg to be like having a techer in the room....... you got a gun?
>
>
> -lk6-
> http://www.StupeedStudios.f2s.com
> Home of the burning lego man!
>
> ICQ: 115852509
> MSN: dbzno1fan
hotmail.com
> AIM: legokiller666
attached mail follows:
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE57hx27kBnccYTjr8c00006eb3
hotmail.com...
> zillion is actually a number?
Yes, a number performed by some old cartoon, anime style :-)
> i just downloaded a program which reads out > text for you cause it just gets really boring reading the text, so now its > goinfg to be like having a techer in the room....... you got a gun?
A Zillion gun? In fact I do!
Okay Kyle. I know the list is an amazing place to solve your doubts. By I highly recommend you read some tutorials first. Go to www.hotscripts.com/PHP , section 'Tips and Tutorials', and read, maybe on this order:
1) Introduction to PHP, Form Processing, Data and Time, Counters, Mailing Lists, Database-Related, Sessions.
If you go for it (reading), you can finish them in 3 or 4 days. In one week, almost all of your previous asked questions here will be answered. That's not only to save our bandwith, but, you sure need to develop other ways to find the information you need on the internet ;-)
>
>
> -lk6-
> http://www.StupeedStudios.f2s.com
> Home of the burning lego man!
>
> ICQ: 115852509
> MSN: dbzno1fan
hotmail.com
> AIM: legokiller666
>
>
> ----- Original Message -----
> From: "B. van Ouwerkerk" <bvo
atz.nl>
> To: <php-general
lists.php.net>
> Sent: Thursday, August 02, 2001 6:53 AM
> Subject: Re: [PHP] Adopt A Newbie (ME)
>
>
> > At 13:36 2-8-01 -0700, Kyle Smith wrote:
> > >Ok, im trying to cut down on the posts here but this time im really
> stuck,
> > >so could somebody guide me through the usage of mySQL and PHP and show
me
> > >how to input data into a mySQL database and read it, or just redirect
me
> > >to another page (which is what normally happens)
> > >
> > >NOTE: i am using phpMyAdmin
> >
> > www.devshed.com
> > php newbie php beginner phpbuilder
> >
> > Just go through the tutorials.. you'll see.. much more fun then sending
a
> > zillion messages to this list.
> >
> > Bye,
> >
> >
> > B.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
attached mail follows:
why am i the bush?
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
----- Original Message -----
From: "Tim" <infoz
earthlink.net>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 7:23 AM
Subject: Re: [PHP] Adopt A Newbie (ME)
> I hereby nominate Kyle as the official George W. Bush of the PHP General
> mailing list. Anyone second it?
>
> - Tim
>
> On 02 Aug 2001 15:07:49 -0700, Kyle Smith wrote:
> > zillion is actually a number? i just downloaded a program which reads
out
> > text for you cause it just gets really boring reading the text, so now
its
> > goinfg to be like having a techer in the room....... you got a gun?
> >
> >
> > -lk6-
> > http://www.StupeedStudios.f2s.com
> > Home of the burning lego man!
> >
> > ICQ: 115852509
> > MSN: dbzno1fan
hotmail.com
> > AIM: legokiller666
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
dude, aren't you being a little harsh?
> I hereby nominate Kyle as the official George W. Bush of the PHP General > mailing list. Anyone second it?
to dubya, that is :)
-- mike cullerton
attached mail follows:
This is just a little bit off-topic - sorry
I'm running Mandrake 8.0 and am pretty new to Linux. I want to download my entire website to my hard drive and put it in hte /var/www folder, but apache is the owner and the group for that directory. I'm just wondering, if I chown the directory so that I am the owner, would that cause problems somehow? Or is it possible to chmod it so that apache is still the owner but i am allowed to write to it?
TIA
Tom Malone
attached mail follows:
add yourself to the apache group in the groups file. This will allow you to do a chmod for the group on the apaceh dir so you are able to write to it.
chmod +775 I think you would want to do on the directory.
C
-----Original Message-----
From: tom
hurstlinks.com [mailto:tom
hurstlinks.com]
Sent: Thursday, August 02, 2001 8:16 AM
To: php-general
lists.php.net
Subject: [PHP] Apache
This is just a little bit off-topic - sorry
I'm running Mandrake 8.0 and am pretty new to Linux. I want to download my entire website to my hard drive and put it in hte /var/www folder, but apache is the owner and the group for that directory. I'm just wondering, if I chown the directory so that I am the owner, would that cause problems somehow? Or is it possible to chmod it so that apache is still the owner but i am allowed to write to it?
TIA
Tom Malone
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
hello
i make several virtualhost in my httpd.conf in each one, i put include_path, auto_preppend_file and auto_append_file directive. these directives are differents for each virtualhost.
My trouble, is that when i try to see an HTML page, PHP try to parse it and to add preppend and append_file which are made in PHP.
i'm using PHP-4.0.6 and Apache 1.3.20
please help me (urgent...)
i hope you understand my request...
Jean-Charles Preaux
attached mail follows:
We download data files from clients, when the date is empty the date defaults to 12/31/69 or something like that. I want to check for a blank date, and not display anything and if it is a valid date, display it so I tried many things, and was not able to find reference on the web, here is an example of something I tried. I have a date stored in mysql timestamp format. Can someone tell me how to properly compare the value returned from the db to see if it is blank ?
Thanks !
if ( ( mysql_result($db_result,$db_record,'order_date')=00000000000000) ) ) { $t_data_array[5]="N/A"); } else {
$t_data_array[5]=f_date_time(mysql_result($db_result,$db_record,'order_date'),"d");
}
___________________________________________________________ Jack Sasportas
attached mail follows:
> Can someone tell me how to properly compare the value > returned from the > db to see if it is blank ?
> if ( ( > mysql_result($db_result,$db_record,'order_date')=00000000000000) > ) ) {
Two things, Jack. Enclose 00000000000000 in quotes, since it is a string, but more importantly, use '==' instead of '=' for comparison. I hate it when I do that :)
Kirk
attached mail follows:
> if ( ( mysql_result($db_result,$db_record,'order_date')=00000000000000)
Uh, huh? Just try ==0 there. Not =00000000000
-Rasmus
attached mail follows:
or, if the field is a MySQL DATE field, try comparing to "0000-00-00", since that's what a blank date defaults to.
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus
php.net]
> Sent: Thursday, August 02, 2001 10:34 AM
> To: Jack Sasportas
> Cc: php
> Subject: Re: [PHP] How to Compare dates?
>
>
> > if ( ( mysql_result($db_result,$db_record,'order_date')=00000000000000)
>
> Uh, huh? Just try ==0 there. Not =00000000000
>
> -Rasmus
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
OK I actually tried several things prior to the post, here are some of them and the errors
if ( ( mysql_result($db_result,$db_record,'order_date')==0) ) ) { if ( ( mysql_result($db_result,$db_record,'order_date')=="0") ) ) { if ( ( mysql_result($db_result,$db_record,'order_date')=='0') ) ) { -or- if ( ( mysql_result($db_result,$db_record,'order_date')=="00000000000000") ) ) { if ( ( mysql_result($db_result,$db_record,'order_date')==00000000000000) ) ) { -or- if ( ( mysql_result($db_result,$db_record,'order_date')==strtotime("00000000000000")) ) ) {
Parse error is the result in all these attempts...with quotes, single or double, no quotes, zero or multiple zeros...by the way the timestamp returns all those zeros so I was being specific....
Any ideas ?
Thanks !
"Johnson, Kirk" wrote:
> > Can someone tell me how to properly compare the value
> > returned from the
> > db to see if it is blank ?
>
> > if ( (
> > mysql_result($db_result,$db_record,'order_date')=00000000000000)
> > ) ) {
>
> Two things, Jack. Enclose 00000000000000 in quotes, since it is a string,
> but more importantly, use '==' instead of '=' for comparison. I hate it when
> I do that :)
>
> Kirk
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- ___________________________________________________________ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net
attached mail follows:
To my eyeballs, it looks like you have too many closing parenthesis on all of those examples.
- Tim
On 02 Aug 2001 12:08:22 -0400, Jack Sasportas wrote:
> OK I actually tried several things prior to the post, here are some of them and
> the errors
>
> if ( ( mysql_result($db_result,$db_record,'order_date')==0) ) ) {
> if ( ( mysql_result($db_result,$db_record,'order_date')=="0") ) ) {
> if ( ( mysql_result($db_result,$db_record,'order_date')=='0') ) ) {
> -or-
> if ( ( mysql_result($db_result,$db_record,'order_date')=="00000000000000") ) )
> {
> if ( ( mysql_result($db_result,$db_record,'order_date')==00000000000000) ) ) {
> -or-
> if ( (
> mysql_result($db_result,$db_record,'order_date')==strtotime("00000000000000")) )
> ) {
>
> Parse error is the result in all these attempts...with quotes, single or double,
> no quotes, zero or multiple zeros...by the way the timestamp returns all those
> zeros so I was being specific....
>
> Any ideas ?
>
> Thanks !
>
>
>
>
>
> "Johnson, Kirk" wrote:
>
> > > Can someone tell me how to properly compare the value
> > > returned from the
> > > db to see if it is blank ?
> >
> > > if ( (
> > > mysql_result($db_result,$db_record,'order_date')=00000000000000)
> > > ) ) {
> >
> > Two things, Jack. Enclose 00000000000000 in quotes, since it is a string,
> > but more importantly, use '==' instead of '=' for comparison. I hate it when
> > I do that :)
> >
> > Kirk
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> ___________________________________________________________
> Jack Sasportas
> Innovative Internet Solutions
> Phone 305.665.2500
> Fax 305.665.2551
> www.innovativeinternet.com
> www.web56.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi all ---
I'm having some trouble getting basic authentication working. Either that or my privileges are screwed up, or something.
I am running Apache on Windows 2000 and PHP4. I've searched newsgroups, this mailing list, various FAQs and the manual, I think my eyes are crossing. I've got a feeling either its so simple I can't see it, or its not possible. I'm hoping someone has a quick idea about what's going on.
Here's my story:
My authentication script is from this example.
If I leave it as is, I can authenticate and I receive the error:
malformed = header from script. Bad header=3DHTTP/1.0 401 Unauthorized: =e:/php/php.exe
If I change the unauthorized header to this: header("Status: 401 Unauthorized"); I cannot authenticate, though the user id and password is correct.
Thanks in advance ! Shari
My script:
if (!isset($PHP_AUTH_USER)) {
// If empty, send header causing dialog box to appear header('WWW-Authenticate: Basic realm="securedf"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; }
// If not empty, display values for variables
else {
echo " <P>You have entered this username: $PHP_AUTH_USER<br> You have entered this password: $PHP_AUTH_PW<br> The authorization type is: $PHP_AUTH_TYPE</p> "; }
attached mail follows:
Shari, The following script works, although I'm authenticating against a database. The include files are not needed, I use them just so that I have only one place to store my database name, etc., and to display a standard header and footer.
You can put your stuff in after the "else". Thanks to Rasmus Lerdorf, this was pinched from one of his articles.
How many browsers have you tried this with? Do you have both http 1.0 and 1.01 protocols checked off in your browser settings?
One thing is critical, THERE MUST BE NO WHITE SPACE AT ALL between the beginning of the file and when the headers are issued. For example, one blank line at the top of the file reduces this to junk.
HTH - Miles
--------- top of the file ----------- <? require( "dbname.inc" ); function authenticate() { Header("WWW-authenticate: basic realm=\"Auction Maintenance\""); Header("HTTP/1.0 401 Unauthorized"); $title="Invalid Login"; include( 'header.inc' ); ?> In order to proceed you will need a valid username/password. <?include ("footer.inc"); exit; } if(!isset($PHP_AUTH_USER)) { authenticate(); } else { mysql_pconnect("localhost","root") or die("Unable to connect to SQL server"); mysql_select_db( "$auction" ) or die("Unable to select database"); $login_id=strtolower($PHP_AUTH_USER); $query = mysql_query("select * from admin where cAdminId='$login_id'". " and cPassword='$PHP_AUTH_PW'"); if(!mysql_num_rows($query)) { authenticate(); } else { include( 'header.inc' ); } } ?>
At 07:42 AM 8/2/01 -0700, Shari Fletcher wrote:
>Hi all ---
>
>I'm having some trouble getting basic authentication working. Either that
>or my privileges are screwed up, or something.
>
>I am running Apache on Windows 2000 and PHP4. I've searched newsgroups,
>this mailing list, various FAQs and the manual, I think my eyes are
>crossing. I've got a feeling either its so simple I can't see it, or its
>not possible. I'm hoping someone has a quick idea about what's going on.
>
>Here's my story:
>
>My authentication script is from this example.
>
>If I leave it as is, I can authenticate and I receive the error:
>
>malformed = header from script. Bad header=3DHTTP/1.0 401 Unauthorized:
>=e:/php/php.exe
>
>If I change the unauthorized header to this: header("Status: 401
>Unauthorized"); I cannot authenticate, though the user id and password is
>correct.
>
>
>Thanks in advance !
>Shari
>
>
>My script:
>
> if (!isset($PHP_AUTH_USER)) {
>
> // If empty, send header causing dialog box to appear
> header('WWW-Authenticate: Basic realm="securedf"');
> header('HTTP/1.0 401 Unauthorized');
> echo 'Authorization Required.';
> exit;
> }
>
> // If not empty, display values for variables
>
> else {
>
> echo "
> <P>You have entered this username: $PHP_AUTH_USER<br>
> You have entered this password: $PHP_AUTH_PW<br>
> The authorization type is: $PHP_AUTH_TYPE</p>
> ";
> }
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I would recommend using Layers. Check on google for Layers (and check for browser type, Netscape and IE had some slight differences).
Basically you can easily create some sort of (PLEASE INGORE THIS SYNTAX IS ONLY PSEUDO-CODE)
<LAYER NAME=1> <P>THIS IS MY <B> LAYER </B></P> </LAYER>
and then you can do a layer 1 show or layer 1. hide.
If you can't find it, I did it once and could connect to the webserver and check the sources...
Regards,
Martin Marconcini www.marconcini.com.ar
"Life must be lived looking forward and can be understood only looking backward." Soren Kierkegaard
> -----Original Message-----
> From: Inércia Sensorial [mailto:inerte
hotmail.com]
> Sent: Wednesday, August 01, 2001 3:11 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] Re: How can I make a Loading... screen?
>
> Something like:
>
> http://www.javascript-tricks.com/loading.html
>
> Found at Google, searched for 'page loading javascript'. There are
more
> complex options, like with a bar graph.
>
>
> "Michael Champagne" <mchampagne
capis.com> wrote in message
> news:Pine.WNT.4.33.0108011315370.251-100000
wkstn114.capis.com...
> > Thanks for the response. The only problem is that the page that I'm
> waiting
> > on is already a popped up window, so I'd hate to open up another
popup
> window
> > on top of that to say that the first one is loading. Is there a way
to
> do
> > this within the same window?
> >
> > Thanks!
> > Mike
> >
> > > I did this myself, for the exact same reason. First I define this
> > > javascript in my page:
> > >
> > > function itsThinkingOpen() {
> > >
> > >
>
imgWindow=window.open("thinking.htm","thinkingWindow","toolbar=no,scroll
ba
> rs
> > > =no,resizable=no,width=400,height=200");
> > > }
> > >
> > > function itsThinkingClose() {
> > > imgWindow.close();
> > > }
> > >
> > > and then at the beginning of the page, before the search begins,
in
> php
> I
> > > put
> > > echo "<script>itsThinkingOpen()</script>";
> > >
> > > and after the code to search the database I put
> > > echo "<script>itsThinkingClose()</script>";
> > >
> > > It works fine here.
> > >
> > > Keith Jeffery
> > > jeff2619
uidaho.edu
> > >
> > > "Michael Champagne" <mchampagne
capis.com> wrote in message
> > > news:Pine.WNT.4.33.0108011259380.251-100000
wkstn114.capis.com...
> > > > I have a popup window that populates a table with rows from a
> database
> and
> > > it
> > > > normally takes about 15 to 20 seconds to load. Does anyone know
how
> I
> can
> > > > display a 'Loading... Please Wait.' that will disappear once the
> data
> > > comes
> > > > up?
> > > >
> > > > Thanks in advance for any responses,
> > > > Mike
> > > >
> > > >
> > > >
> > > >
******************************************************************
> > > > This communication is for informational purposes only. It is
not
> > > > intended as an offer or solicitation for the purchase or sale of
> > > > any financial instrument or as an official confirmation of any
> > > > transaction, unless specifically agreed otherwise. All market
> > > > prices, data and other information are not warranted as to
> > > > completeness or accuracy and are subject to change without
> > > > notice. Any comments or statements made herein do not
> > > > necessarily reflect the views or opinions of Capital
Institutional
> > > > Services, Inc. Capital Institutional Services, Inc. accepts no
> > > > liability for any errors or omissions arising as a result of
> > > > transmission. Use of this communication by other than intended
> > > > recipients is prohibited.
> > > >
******************************************************************
> > >
> > >
> > >
> > >
> >
> > --
> > Michael Champagne, Software Engineer
> > Capital Institutional Services, Inc.
> > wk: mchampagne
capis.com
> > hm: mchamp
texas.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
attached mail follows:
Hi,
I'm having a problem using the global keyword and references. To the best of my logic and PHP's documentation, the following code: <? $a = 1; $b = 2;
function Sum() { global $a, $b; $b = &$a; // <- $b is for now 1 } Sum(); echo "a=$a b=$b"; ?> should output "a=1 b=1" since in the Sum() function I set $b to point to $a, and both of them refer to global variables $a and $b. Moreover, inside Sum() $b is 1 after the assignment. Getting out of the function, $b returns to the old value. If I use $GLOBALS["b"] = &$GLOBALS["a"]; echo "a=$a b=$b"; will output "a=1 b=1" as expected.
Please clear me out on this one, philip
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi All,
I'm currently just playing around with a few things and want to write a script that will listen on a UDP port and then log/process the information. The problem i have it that i don't know if php can do this. I know that you can connect to a UDP port but can you listen on one? And if you cant then does anybody know if this is planned in a future version?
Thanks, William.
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Charset: noconv
iQA/AwUBO2lqeq39EoU2VrU1EQL9sQCffH2muCquVf0z7RxZXMICeJrQ1LIAnAnr i/a5lvWWWHnwUozPHP+r8QP1 =Divy -----END PGP SIGNATURE-----
attached mail follows:
Hi,
I'm in a process of doing site with MySQL database, and most of the code I plased in index.php3 (in one file) but I've got some problems with statements:
I have: if (isset(...)) { ... } elseif (isset(...)) { ... } elseif (isset(...)) { ... } else { ... }
IT DOESNT WORK!
but when I do:
if (isset(...)): ... elseif (isset(...)): ... elseif (isset(...)): ... else: ... endif;
It works, please tell me what a difference? what do I do wrong that firs variant doesn't work?
Yury
attached mail follows:
I'm almost positive there's no reason the first should work while the second fails...can you post what you've done...it's probably a typo...
jack
-----Original Message-----
From: BRACK [mailto:brak
nettaxi.com]
Sent: Thursday, August 02, 2001 11:10 AM
To: php-general
lists.php.net
Subject: [PHP] Syntax
Hi,
I'm in a process of doing site with MySQL database, and most of the code I plased in index.php3 (in one file) but I've got some problems with statements:
I have: if (isset(...)) { ... } elseif (isset(...)) { ... } elseif (isset(...)) { ... } else { ... }
IT DOESNT WORK!
but when I do:
if (isset(...)): ... elseif (isset(...)): ... elseif (isset(...)): ... else: ... endif;
It works, please tell me what a difference? what do I do wrong that firs variant doesn't work?
Yury
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
You need to do:
if (isset(...)) { ... } else if (isset(...)) { ... } else if (isset(...)) { ... } ...
On 02 Aug 2001 17:10:26 +0200, BRACK wrote:
> Hi,
>
> I'm in a process of doing site with MySQL database, and most of
> the code I plased in index.php3 (in one file) but I've got some
> problems with statements:
>
> I have:
> if (isset(...)) {
> ...
> }
> elseif (isset(...)) {
> ...
> }
> elseif (isset(...)) {
> ...
> }
> else {
> ...
> }
>
> IT DOESNT WORK!
>
> but when I do:
>
> if (isset(...)):
> ...
> elseif (isset(...)):
> ...
> elseif (isset(...)):
> ...
> else:
> ...
> endif;
>
> It works, please tell me what a difference? what do I do wrong that
> firs variant doesn't work?
>
> Yury
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Which is the best language to use, php or shtml, I use only a couple of SSI commands in shtml to call in headers and footers, and run cgi scripts as below. I thought maybe as I am getting more into php that I should change the files from shtml to php, and use the equivalent commands to call in headers, footers and run external .cgi programs. But as below cant see how to load in an external .cgi program into php, as you can see below.
I am presently using an shtml file using <!--#include file="my.htm"--> which work fine and in php I can use the include('my.htm'); command.
in one of my shtml i use the <!--#exec cgi="my.cgi"--> command, but how do I run an external .cgi script from php, I have looked at many of the commands such as include(), system(), passthru() , but cant find away to do it. Can someone help ??
Is it best for me to leave it in shtml as I have also discovered that SSI will not parse inside an html section in php. Which of these shtml, or php uses more resources on the server ? Which is the best solution to my problem ??
Regards
Dave
attached mail follows:
> Which is the best language to use, php or shtml, I use only a couple of SSI > commands in shtml to call in headers and footers, and run cgi scripts as > below. I thought maybe as I am getting more into php that I should change > the files from shtml to php, and use the equivalent commands to call in > headers, footers and run external .cgi programs. But as below cant see how > to load in an external .cgi program into php, as you can see below.
-Rasmus
attached mail follows:
I have tried the virtual() command but keep receiving error - undefined function, can someone give an example in how to use this ?
----- Original Message -----
From: "Dave.O" <Dave.O
tinyonline.co.uk>
To: "php" <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 4:26 PM
Subject: [PHP] shtml or php ??
> Which is the best language to use, php or shtml, I use only a couple of
SSI
> commands in shtml to call in headers and footers, and run cgi scripts as
> below. I thought maybe as I am getting more into php that I should change
> the files from shtml to php, and use the equivalent commands to call in
> headers, footers and run external .cgi programs. But as below cant see
how
> to load in an external .cgi program into php, as you can see below.
>
> I am presently using an shtml file using <!--#include file="my.htm"-->
> which work fine and in php I can use the include('my.htm'); command.
>
> in one of my shtml i use the <!--#exec cgi="my.cgi"--> command, but how
do
> I run an external .cgi script from php, I have looked at many of the
> commands such as include(), system(), passthru() , but cant find away to
do
> it. Can someone help ??
>
> Is it best for me to leave it in shtml as I have also discovered that SSI
> will not parse inside an html section in php. Which of these shtml, or
php
> uses more resources on the server ? Which is the best solution to my
> problem ??
>
> Regards
>
>
> Dave
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> I have tried the virtual() command but keep receiving error - undefined > function, can someone give an example in how to use this ?
virtual() only works if you are running PHP as an Apache module.
-Rasmus
attached mail follows:
I'm using a query similar to:
select tableA.*, tableB.* from tableA, left join tableB ON tableA.keyfield = tableB.keyfield
When I then try to access the column "keyfield", after using mysql_fetch_object() e.g.
$resultObject->keyfield
I get no value returned. What is the correct way to reference a field/column that has the same name (as it's a primary and foreign key) on both tables? Is there some syntax like:
$resultObject->tableA.keyfield ?
I've tried specifically aliasing the field on tableA e.g.
select tableA.*, tableA.keyfield AS myKeyField, tableB.* from tableA, left join tableB ON tableA.keyfield = tableB.keyfield
and then using $resultObject->myKeyField but that doesn't seem to work either. I can't find any useful info/examples about this on the PHP site.
Also if I change the query to be:
select tableA.*, tableB.* from tableA, tableB left join tableB ON tableA.keyfield = tableB.keyfield
adding the joined table to the FROM clause I get an error. Surely this is the correct syntax and if anything my initial syntax should fail! Am I not understanding this correctly or is my mySQL manual out of sync?
Please help Thanks
attached mail follows:
Whats the difference between ASP and PHP cause ASP has gotta have something good about it cause microsoft uses it!
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
I think the response to this will probably be equally informative and hilarious.
- k
----- Original Message -----
From: "Kyle Smith" <dbzno1fan
hotmail.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 7:34 PM
Subject: [PHP] Spot the difference?
Whats the difference between ASP and PHP cause ASP has gotta have something good about it cause microsoft uses it!
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
isnt this fact a good enough reason to believe it worthless???
----- Original Message -----
From: "Kyle Smith" <dbzno1fan
hotmail.com>
To: <php-general
lists.php.net>
Sent: Friday, August 03, 2001 6:34 AM
Subject: [PHP] Spot the difference?
Whats the difference between ASP and PHP cause ASP has gotta have something good about it cause microsoft uses it!
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
FUD!
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE39niSnRMWuLn5U9T300006fc0
hotmail.com...
Whats the difference between ASP and PHP cause ASP has gotta have something
good about it cause microsoft uses it!
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
Yes, ASP is revenue generating to Misocroft. PHP is free, so it's no good for them.
At 04:34 PM 8/2/2001 -0700, Kyle Smith wrote:
>Whats the difference between ASP and PHP cause ASP has gotta have
>something good about it cause microsoft uses it!
>
>
>-lk6-
>http://www.StupeedStudios.f2s.com
>Home of the burning lego man!
>
>ICQ: 115852509
>MSN: dbzno1fan
hotmail.com
>AIM: legokiller666
Ezra Nugroho Web/Database Application Specialist Goshen College ITS Phone: (219) 535-7706
"Don't be humble, you're not that great." -- Golda Meir
attached mail follows:
ASP is basically like PHP, only it uses a VB-based language instead of perl/c-based one.
which means it sucks - vb is evil.
> -----Original Message-----
> From: Jon Yaggie [mailto:dmsales
design-monster.com]
> Subject: Re: [PHP] Spot the difference?
>
> isnt this fact a good enough reason to believe it worthless???
>
attached mail follows:
I think that this article has some bearing on the matter:
http://www.storyarts.org/library/aesops/stories/boy.html
- Tim
On 02 Aug 2001 16:34:52 -0700, Kyle Smith wrote: > Whats the difference between ASP and PHP cause ASP has gotta have something good about it cause microsoft uses it!
attached mail follows:
Hi!
I wanted to use the full SMTP-Protocol including "MAIL FROM:" and "RCPT TO:", and therefore I can't use mail(). I have written a perl-script, I call from PHP, that connects to the SMTP-server directly and this worked fine - until a server went down, and my ISP's-SMTP-Server told my perl-script, that the emailaddress is not routable. If the mail had been in a mailqueue, no problem - after a few hours it would be up again!
So is there a way to combine these 2 features? 1. give the mail not directly to the SMTP-Server, but to the mailqueue 2. use the full SMTP-Protocol: for example:
-- MAIL FROM: bouncemydomain.com RCPT TO: recipient
someotherdomain.com
From: Newsletter <webmaster
mydomain.com> To: Newsletter-List <newsletter-list
mydomain.com> Subject: blabla
BODY ... --
thanks Michi
-- Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a
attached mail follows:
On Tue, 31 Jul 2001, B. van Ouwerkerk wrote:
> There's nothing wrong with being a newbie.. the only newbie-problem I > see/have is the lazy one.. ask ask ask ask without taking the time to read > the manual or to do a search in the archive. Sure there are newbies who > read the manual.. get some tutorials.. thats good. They should get all the > support they need..
Unfortunately this kind of thing happens on all the mailing lists I've seen that are devoted to questions. The real problem here is that the list is simply too busy. I can do no more then skim the subject lines and then usually delete all of it unless something jumps out at me.
It might be helpful if some new mailing lists were created, it wouldn't be a perfect solution but it would help if there were some degree of self selecting behavior possible. Currenty all questions go to php-general. If there were, say, a php-newuser and a php-questions list then perhaps php-general could be used for slightly higher level discussions. Actually its probably too late to "save" php-general, hard to get people to change. Maybe a new list that caters to a higher level of discussion, say php-authoring or the like?
Just a thought. So much tends to get lost or over looked in high volume mailing lists.
________________________________________________________________________
Darren Henderson darren
bmv.state.me.us
darren.henderson
state.me.us
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]