[PHP] if/elseif/else v. switch

2004-06-04 Thread Dennis Seavers
Is there any noticeable difference (on the part of the client) between identical conditionals, one written as a switch, the other written as an if, elseif ... else conditional? I realize that one programmer coming in behind another might prefer the gentler layout of a switch; but would there be

RE: [PHP] table formatting

2004-06-04 Thread Dennis Seavers
Change the design of the HTML table. > [Original Message] > From: BigMark <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Date: 06/04/2004 8:07:51 PM > Subject: [PHP] table formatting > > This script by Rob Sossomon works great --Thanks! > however could anyone tell me if its possible to make it r

[PHP] table formatting

2004-06-04 Thread BigMark
This script by Rob Sossomon works great --Thanks! however could anyone tell me if its possible to make it run horizontally. at the moment the output is like this--- -- Round Game Winning team Wins 1 1 Collingwood 1 2 Melbourne 4 1

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread raditha dissanayake
Aaron Gould wrote: Has anyone here had recent success compiling PHP with mnoGoSearch? Consider ASPSeek. It's a spin off from mnogo. It does have a lot of other benefits including faster speeds. -- Raditha Dissanayake. - http://www.raditha.com/megaupload

Re: [PHP] Error Downloading files using FOpen

2004-06-04 Thread John W. Holmes
Winkler, Gerald wrote: That gives me the same junk data problems. Define "junk data"? How is it corrupting the file? try downloading a simple text file with a basic sentence in it. What does it look like after it's corrupted? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC8

RE: [PHP] Error Downloading files using FOpen

2004-06-04 Thread Winkler, Gerald
That gives me the same junk data problems. -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 2:29 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Error Downloading files using FOpen [snip] When you go to download a file off a pa

Re: [PHP] Error Downloading files using FOpen

2004-06-04 Thread Matt Matijevich
[snip] When you go to download a file off a page it corrupts the download. [/snip] not sure what the exact problem is, but have you tried other functions, like readfile http://www.php.net/manual/en/function.readfile.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

[PHP] Error Downloading files using FOpen

2004-06-04 Thread Gerald Winkler
I have a weird problem, maybe one of you can help me figure it out. I have a server (that is a test box..but that's a different issue) running PHP 4.3.1 RC (I believe. I didn't install it and they laid off the guy who did..) and it's giving me a weird error. When you go to download a file off a p

Re: [PHP] PHP and Apache Authentication

2004-06-04 Thread Matt Matijevich
[snip] Is there a way to configure apache to include something in every response? [/snip] I think you could use a autoprepend in your php.ini file http://www.php.net/reserved.variables there is a mention of it on the user comments on this page -- PHP General Mailing List (http://www.php.net/

[PHP] PHP and Apache Authentication

2004-06-04 Thread Glenn MacGregor
Hi All, I am trying to protect portions of my website. I am using pache 2.x and php4.X. I don't want to use apache authentication within the Directory directive because I can't utilize sessions if I do that. So I want to use PHP to authenticate from a postgresql database. This works fine on the

Re: [PHP] HTTP_REFERER

2004-06-04 Thread Steve Douville
lmao -- uh huh Problem was that I was using a javascript redirect and of course, that doesn't send any value. Found that out just a minute ago. New the stupid variable existed... Think I'll grab the info in js and then redirect it to the php page as part of the query string. Thanks, Steve -

[PHP] Re: HTTP_REFERER

2004-06-04 Thread Stephen Lake
No...it shows up in the auto global varaible $_SERVER['HTTP_REFERER'] "Steve Douville" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I think I'm having a major brain fart here. Is there a $HTTP_REFERER > anymore? It doesn't show up as a server variable or anything at all in > phpin

Re: [PHP] HTTP_REFERER

2004-06-04 Thread John Nichel
Steve Douville wrote: I think I'm having a major brain fart here. Is there a $HTTP_REFERER anymore? It doesn't show up as a server variable or anything at all in phpinfo()... using php 4.3.4 Ideas? TIA, Steve It has to be set to show up. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED]

[PHP] HTTP_REFERER

2004-06-04 Thread Steve Douville
I think I'm having a major brain fart here. Is there a $HTTP_REFERER anymore? It doesn't show up as a server variable or anything at all in phpinfo()... using php 4.3.4 Ideas? TIA, Steve

Re: [PHP] script location

2004-06-04 Thread Daniel Clark
I use of realpath() > Does anyone know of a simple/efficient way to determine the path to a > script on the URL? > > For instance: > > http://www.nowhere.com/test/whatever/testing.php > > All I want out of that URL is this: > > /test/whatever/ > > I didn't see an element in one of the super global

Re: [PHP] Asuming query without the ?

2004-06-04 Thread Robert Winter
I can't make it work. Because I'm new to .htaccess I tried some examples from apache.org: 1) Contents of .htaccess in http://mysite.com/path RewriteEngine On RewriteRule ^oldstuff\.html$ newstuff.html THIS EXAMPLE WORK, but the next one doesn't, nor the rule you told me: 2) RewriteEngine On

[PHP] Mapping solutions

2004-06-04 Thread René Fournier
I'm looking for a good mapping solution for a PHP project I'm working on, and wondered if any of you would be able to recommend one. Basically, I would like to be able to pass this "Map Module" several values: Latitude, longitude, map scale (e.g., 5KM x 5KM), and map resolution (500 pixels x 50

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread Aaron Gould
John Nichel wrote: Aaron Gould wrote: Curt Zirzow wrote: * Thus wrote Aaron Gould ([EMAIL PROTECTED]): "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's make, I get all sorts of errors at the end of the compilation: /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multi

Re: [PHP] script location

2004-06-04 Thread Ben Ramsey
Well, then... let me win the whole battle for you: $path = $_SERVER['REQUEST_URI']; $path = dirname($path); echo $path; You can use REQUEST_URI, SCRIPT_NAME, or PHP_SELF. Now you know, and knowing is . . . ;-) John W. Holmes wrote: From: "Gabe" <[EMAIL PROTECTED]> Knowing the functions is half th

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread John Nichel
Aaron Gould wrote: Curt Zirzow wrote: * Thus wrote Aaron Gould ([EMAIL PROTECTED]): "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's make, I get all sorts of errors at the end of the compilation: /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Curt, et al -- ...and then Curt Zirzow said... % % * Thus wrote David T-G ([EMAIL PROTECTED]): % > % > bash-2.05a$ /usr/local/bin/php -v % > PHP 4.3.4 (cli) (built: Jan 6 2004 15:27:52) % % that cli should be cgi. % % I'm assuming you compiled php with something like: %configure --wit

Re: [PHP] script location

2004-06-04 Thread John W. Holmes
From: "Gabe" <[EMAIL PROTECTED]> > Knowing the functions is half the battle. :-) GI JOE!!! ---John Holmes http://www.ebaumsworld.com/gijoe.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): > Peter -- > > ...and then Peter Risdon said... > % > % David T-G wrote: > % > % > bash-2.05a$ /usr/local/bin/php -v > % > PHP 4.3.4 (cli) (built: Jan 6 2004 15:27:52) > % > % You probably need the cgi version - not the command line one you > % actu

Re: [PHP] script location

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): > Gabe -- > > ...and then Gabe said... > % > % Does anyone know of a simple/efficient way to determine the path to a > % script on the URL? > > Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on > the right track :-) Or dirname(

Re: [PHP] Best way to sort?

2004-06-04 Thread Raúl Castro
yes, Is the column number on select statement. You could use alias too: SELECT person_name, count(*) count FROM table_name GROUP BY person_name ORDER BY count DESC - Original Message - From: "Angelo Zanetti" <[EMAIL PROTECTED]> To: "Raúl Castro" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread Aaron Gould
Curt Zirzow wrote: * Thus wrote Aaron Gould ([EMAIL PROTECTED]): "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's make, I get all sorts of errors at the end of the compilation: /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of `mysql_port' Just

Re: [PHP] script location

2004-06-04 Thread Gabe
Knowing the functions is half the battle. :-) David T-G wrote: Gabe -- ...and then Gabe said... % % Does anyone know of a simple/efficient way to determine the path to a % script on the URL? Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on the right track :-) HTH & HAND

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Peter -- ...and then Peter Risdon said... % % David T-G wrote: % % > bash-2.05a$ /usr/local/bin/php -v % > PHP 4.3.4 (cli) (built: Jan 6 2004 15:27:52) % % You probably need the cgi version - not the command line one you % actually have. Ooohhh... Ouch. So there are *three* possibl

Re: [PHP] script location

2004-06-04 Thread Gabe
Thanks Matt and James... very helpful! James Harrell wrote: See the parse_url() function. -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 9:57 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] script location [snip] http://www.now

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): > Curt, et al -- > > ...and then Curt Zirzow said... > % > % * Thus wrote David T-G ([EMAIL PROTECTED]): > % > > % > My code is as simple as > % > > % > #!/usr/local/bin/php > % > % What does '/usr/local/bin/php -v' show? > > Doesn't seem to scary

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Peter Risdon
David T-G wrote: Curt, et al -- ...and then Curt Zirzow said... % % * Thus wrote David T-G ([EMAIL PROTECTED]): % > % > My code is as simple as % > % > #!/usr/local/bin/php % % What does '/usr/local/bin/php -v' show? Doesn't seem to scary to me: bash-2.05a$ /usr/local/bin/php -v PHP 4.3.4

RE: [PHP] Current URL

2004-06-04 Thread Stephen Craton
Also, on a Windows machiene, it returns something like c:\htdocs\subsite. Already tried it, but thanks. :-) I'll be going with your GLOBAL variable suggestion, it seems so obvious now. Thanks for the help! :-) Thanks, Stephen Craton http://www.melchior.us -Original Message- From: Rober

Re: [PHP] script location

2004-06-04 Thread David T-G
Gabe -- ...and then Gabe said... % % Does anyone know of a simple/efficient way to determine the path to a % script on the URL? Gee, it sounds like you want the dirname() of the SCRIPT_URL. You're on the right track :-) HTH & HAND :-D -- David T-G [EMAIL PROTECTED] http://justpickone.org/d

RE: [PHP] script location

2004-06-04 Thread James Harrell
See the parse_url() function. >-Original Message- >From: Matt Matijevich [mailto:[EMAIL PROTECTED] >Sent: Friday, June 04, 2004 9:57 AM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Re: [PHP] script location > > >[snip] >http://www.nowhere.com/test/whatever/testing.php > >All I want

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Curt, et al -- ...and then Curt Zirzow said... % % * Thus wrote David T-G ([EMAIL PROTECTED]): % > % > My code is as simple as % > % > #!/usr/local/bin/php % % What does '/usr/local/bin/php -v' show? Doesn't seem to scary to me: bash-2.05a$ /usr/local/bin/php -v PHP 4.3.4 (cli) (built:

Re: [PHP] script location

2004-06-04 Thread Matt Matijevich
[snip] http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ [/snip] http://php.net/dirname I think that will do it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread Aaron Gould
Curt Zirzow wrote: * Thus wrote Aaron Gould ([EMAIL PROTECTED]): "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's make, I get all sorts of errors at the end of the compilation: /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple definition of `mysql_port' Just

[PHP] script location

2004-06-04 Thread Gabe
Does anyone know of a simple/efficient way to determine the path to a script on the URL? For instance: http://www.nowhere.com/test/whatever/testing.php All I want out of that URL is this: /test/whatever/ I didn't see an element in one of the super global variables that would provide me this info

Re: [PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread Curt Zirzow
* Thus wrote Aaron Gould ([EMAIL PROTECTED]): > "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's > make, I get all sorts of errors at the end of the compilation: > > /usr/lib/mysql/libmysqlclient.a(libmysql.o)(.data+0x4): multiple > definition of `mysql_port' Just a guess b

Re: [PHP] php as CGI and $_POST

2004-06-04 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]): > > and know that it works as intended, but now I seem completely unable to > get any $_POST (or even $_GET) data into the script. I suspect, from > reading the manual and noting the warnings, that any GET data will be > ignored, and that's fine, but I

[PHP] Compiling PHP with mnoGoSearch fails

2004-06-04 Thread Aaron Gould
Has anyone here had recent success compiling PHP with mnoGoSearch? I'm trying to get PHP 4.3.7 and mnoGoSearch 3.1.21 to work together, but it's just not working. mnoGoSearch configures and installs fine (in "/usr/local/mnogosearch"), and PHP configures fine. But during PHP's make, I get all s

[PHP] php as CGI and $_POST

2004-06-04 Thread David T-G
Hi, all -- I am working up a CGI script to take advantage of Apache's suEXEC so that the web server can manipulate files as the site owner. I have already managed a simple $f = fopen("/path/to/docroot/testfile",'w') ; fwrite($f,"hi!\n") ; fclose($f) ; and know that it works as intended, b

Re: [PHP] PHP Debugger 4 Linux?

2004-06-04 Thread Yann Larrivee
Xdebug, is free and works on unix and windows and it is a PHP extension. www.xdebug.org Yann On Fri, 2004-06-04 at 09:51, Marco Schuler wrote: > Am Fr, 2004-06-04 um 00.14 schrieb Nick Wilson: > > Hi everyone, > > > > Can anyone recommend a good debugger for *nix? > > Zend Studio > > > Many

Re: [PHP] PHP Debugger 4 Linux?

2004-06-04 Thread Marco Schuler
Am Fr, 2004-06-04 um 00.14 schrieb Nick Wilson: > Hi everyone, > > Can anyone recommend a good debugger for *nix? Zend Studio > Many thx! > -- > Nick W -- Regards Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySQL & PHP

2004-06-04 Thread Robert Sossomon
Run: rpm -q php-mysql >From the command line as root and see if it is there, if not go out and download the fedora rpm with that in the title, since that would be the missing piece. HTH, Robert -Original Message- From: Nunners [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 8:07 A

Re: [PHP] sessions

2004-06-04 Thread Daniel Clark
Did you have session_start() on this page before accessing the session variables? Could also do: $name = "$_SESSION['first_name'] , $_SESSION['last_name']" ; >>why is this not working. I am using instead of a form ($name = >>$_POST[name];) >>and linking to it from a users logged in page. >> >>$F

RE: [PHP] MySQL & PHP

2004-06-04 Thread Thijs Lensselink
Looks like the mysql module for php is not loaded. Is extension=mysql.so included in the php.ini. Nunners wrote on vrijdag 4 juni 2004 14:07: > I've just installed Fedora Core 2, including I believe both PHP & > MySQL.. However whenever I try and run something that connects to > MySQL, it comes u

RE: [PHP] Best way to sort?

2004-06-04 Thread Daniel Clark
Order by the 2nd column >>what is the 2? in the order by statement mean? >>thanks >> >>-Original Message- >>From: Raúl Castro [mailto:[EMAIL PROTECTED] >>Sent: Thursday, June 03, 2004 6:20 PM >>To: [EMAIL PROTECTED] >>Subject: Re: [PHP] Best way to sort? >> >> >>The best way is: >> >>SELEC

RE: [PHP] help needed with tiger tree hashes

2004-06-04 Thread Thijs Lensselink
check: http://www.cs.technion.ac.il/~biham/Reports/Tiger/testresults.html The results you posted seem to be right. Carl S. in 't Veld wrote on vrijdag 4 juni 2004 0:52: > I am trying to generate tiger tree hashes the same way as > directconnect does, but I am failing. > > I checked the output fr

[PHP] MySQL & PHP

2004-06-04 Thread Nunners
I've just installed Fedora Core 2, including I believe both PHP & MySQL.. However whenever I try and run something that connects to MySQL, it comes up with the following: "cannot load MySQL extension, please check PHP Configuration." Does this mean anything to anyone? I've checked load

[PHP] error when running commands via exec() in CLI-mode

2004-06-04 Thread Alberto Mucignat
I do this: when an rsync error occure, if I run this script by a web server I get no output (errors go correctly into $log and $ret), while running the script in a console environment I get errors in the standard output even if I suppress them with "@". anyone knows a workaround? is this a bug

[PHP] ## Getting into Netscape.com Inbox

2004-06-04 Thread jack bauer
Hi, i'm trying to access my netscape.com inbox with php, so i started to decode the ssl session and got all sent packets in plaintext, not really hard. but know i have to deal with encrypted cookies and i have no clue what i have to do. i found no help while i crawled the web for hours. an exampl

[PHP] php-cgi+suexec and fastcgi

2004-06-04 Thread Adrian Teasdale
Hi there we need to run php under another user account as we are setting up a link with it to Qmail. Our plan is to use: php-cgi+suexec for this. fastcgi may be an alternative and we are just php-cgi+wondering if there is anything bad about using fastcgi for this? Any help appreciated Thanks

[PHP] php-cgi+suexec and fastcgi

2004-06-04 Thread Adrian Teasdale
Hi there we need to run php under another user account as we are setting up a link with it to Qmail. Our plan is to use: php-cgi+suexec for this. fastcgi may be an alternative and we are just wondering if there is anything bad about using fastcgi for this? Any help appreciated Thanks Ade --

Re: [PHP] Bulk table updates

2004-06-04 Thread Marek Kilimajer
Robert Sossomon wrote: I use a separate page to do the addition of information to my DB currently, the whole set of information is being re-written as I type this, but where I am stuck is getting the whole thing to be parsed through then just one line. The code I currently use is as follows: $get

Re: [PHP] sessions

2004-06-04 Thread James Kaufman
On Fri, Jun 04, 2004 at 04:22:57PM -0800, BigMark wrote: > why is this not working. I am using instead of a form ($name = > $_POST[name];) > and linking to it from a users logged in page. > > $FirstName = $_SESSION['first_name']; > $LastName = $_SESSION['last_name']; > $name = "$FirstName , $LastN

Re: [PHP] sessions

2004-06-04 Thread Enda Nagle - Lists
Mark, You need to do this: $name = " . $FirstName . " , " . $LastName . "; Regards Enda -- On 05/06/2004 01:22, "BigMark" <[EMAIL PROTECTED]> wrote: > why is this not working. I am using instead of a form ($name = > $_POST[name];) > and linking to it from a users logged in page. > > $First

[PHP] sessions

2004-06-04 Thread BigMark
why is this not working. I am using instead of a form ($name = $_POST[name];) and linking to it from a users logged in page. $FirstName = $_SESSION['first_name']; $LastName = $_SESSION['last_name']; $name = "$FirstName , $LastName"; Mark -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] Class Syntax Help or Globals issue

2004-06-04 Thread Bob Pillford
Thanks very much! Marek Kilimajer wrote: bob pilly wrote: Hi All I am new to classes and are trying to work out whether they will make my coding experience easier. I have written the following test class which is trying to take three variables from a mssql query and add them as variables in a new c

Re: [PHP] Bulk table updates

2004-06-04 Thread Dennis Seavers
Maybe I don't understand what you're trying to accomplish -- and I'm not sure what you meant by "parsed through then just one line" -- but the application you have at the link would work if you set the default values of the form elements to the data currently in your table. Even if you have a sepa

RE: [PHP] Best way to sort?

2004-06-04 Thread Angelo Zanetti
what is the 2? in the order by statement mean? thanks -Original Message- From: Raúl Castro [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 6:20 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Best way to sort? The best way is: SELECT person_name, count(*) FROM table_name GROUP BY pe

Re: [PHP] select from db

2004-06-04 Thread Dennis Seavers
I think I misread your script. I took the line print ""; to be part of the while loop, meaning there would be two statements. I'm not accustomed to seeing scripts that use functions without brackets, even when their not required. Sorry for the confusion. > [Original Message] > From: Dennis S

Re: [PHP] select from db

2004-06-04 Thread Dennis Seavers
When you run this script, or one like it, does it work? You seem to be missing a number of brackets. For example, you have: while ($row = MYSQL_FETCH_ROW($result)) instead of while ($row = MYSQL_FETCH_ROW($result)) { or while ($row = MYSQL_FETCH_ROW($result)) { > [Original Message] > From: