Re: [PHP] magical file writing truncation

2003-08-08 Thread skate
> [snip]
>   $newFile = "xml/".$type."/".$now.".xml";
>   while(file_exists($newFile))
>$newFile = "xml/".$type."/".$now++.".xml";
>   $text = $_POST['text'];
>   $text = urlencode(stripslashes(nl2br($text)));
> [/snip]
>
> At this point (for testing putposes) I would echo "$text"; and start
> looking for clues. If I were a betting man I would have to say that
> there is some problem with quotes within the text. I hope that this
> points you in the right direction.

been doing some more testing. $text seems to stay intact throughout, it is
exactly what it should be. if i do an fwrite( $fp, $text ) then it writes
perfectly all contents of the $text as i would expect. i shouldn't get any
problems with quotes or other characters as the whole lot is urlencode()'d

> Have a pleasant and fruitful day!

wow, everyone on this list should be THAT cheery :) thanks mate, you too!



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



Re: [PHP] Problem sortiing dyn query

2003-08-08 Thread John W. Holmes
Creative Solutions New Media wrote:
Just wanted to make sure we were on the same page as the line of code in
question wrapped in my original message.
You saying the solution is

$query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY %s
%s",$reSort_Recordset1,$direction_Recordset1);
Correct?
Yep. You needed to take out those single quotes. You were telling the 
query to ORDER BY 'string' 'string', which doesn't make sense. You want 
it to ORDER BY column direction...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


Re: [PHP] Piping and the CLI parser

2003-08-08 Thread Jason Wong
On Wednesday 06 August 2003 21:29, Nicolas Frisby wrote:

> Regardless of that, do you know anything of how the piping mechanism
> works?

Not really. I do know that what you're trying to do doesn't work for bash 
scripts either. IE you cannot use a pipe to pass command line arguments to a 
bash script, nor a php script.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
To do two things at once is to do neither.
-- Publilius Syrus
*/


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



Re: [PHP] WYSIWYG editor for PHP

2003-08-08 Thread Bix
I use dreamweaver in live data mode quite often, really works a treat!

Set up a a site and in the testing server, just set it as /beta or the like,
then edit your script, and run it in live data and you can feed it
post/get/cookie data on the fly.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I need a WYSIWYG editor for PHP. That is all.
Can any1 advice me one( or more :-) )?
[/snip]

Dreamweaver?



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



Re: [PHP] Still can't pass variable through url

2003-08-08 Thread andu
On Fri, 8 Aug 2003 14:30:22 +0800
"Jack" <[EMAIL PROTECTED]> wrote:

> Dear all
> I had set the "register_global=on" and "magic_quotes_runtime=off"
> already,

You don't need register_global=on" for this, use

$year = $_GET['year'];
$month = $_GET['month'];

...and  you want to try "page.php?year=$year&month=$month".

> but when i click my hyperlink "page.php?year=$year&?month=$month", it
> doesn't pass the variable for
> ?year and ?month to the destination page "page.php"
> I'm using php 5.0 above , if the same case apply to php4.04, then
> there is no problem at all!
> Can anyone please give me more help on this?
> 
> Thx alot
> Jack
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

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



Re: [PHP] preventing output dump of passthru()

2003-08-08 Thread daniel
the whole idea of passthru is to output the stdout

i'd use exec and the stdout is stored as an array
> Hello,
>
> Trying to prevent the output dumping of passthru() and instead store
> the output in a variable.
>
> I read an article that suggested this:
>
> ob_start();
>
> passthru("command");
>
> $output = ob_get_contents();
>
> ob_end_clean();
>
> But that didn't work. Is there *ANY* way to achieve what I want?
>
>
> Thanks,
> Chris.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




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



Re: [PHP] bug in code - can't find it!

2003-08-08 Thread Chris Sherwood
silly me

upon further looking

>

>
- Original Message -
From: "Amanda McComb" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 06, 2003 2:47 PM
Subject: [PHP] bug in code - can't find it!


> Ok, after all of the discussion on posting, I'm afraid to post.
> Unfortunately, no one I know is a programmer, and I am a beginner.  I can
> normally figure out what I've done wrong, but I'm missing something here.
>
> Ok, here is my query and the bit of code I can't figure out:
>
> $query = "SELECT * from apt_user_t a, apt_company_t b ";
> $query .= "WHERE a.user_cd = b.user_cd ";
> $query .= "ORDER BY a.username";
>
>  $search_results = mysql_query($query) or die("Select
> Failed!");
> while ($search_result2 = mysql_fetch_array($search_results))
> {
>  TYPE="checkbox"
> NAME=""
> SIZE="20"
> MAXLENGTH="50"
> VALUE="CHECKED"> 
> }
> Nothing shows up with the echo or the value.  I only included this
> checkbox, but all of the other values show up fine.  Can someone give me a
> hint?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



Re: [PHP] htmlspecialchars() and HTML code

2003-08-08 Thread Thaddeus J. Quintin
Thanks everybody!

Looks like I was just thinking about the problem too hard.

Thaddeus

John W. Holmes wrote:

Thaddeus J. Quintin wrote:

CPT John W. Holmes wrote:

 > Try this:
 >
 > This is  text
 >
 > If you submit that "text" and then print $_REQUEST['text'], you'll 
see that
 > you have
 >
 > This is  text

Ok, but that only makes me realize the further extent of the problem.

If the HTML file that they upload has '<' or '>' entities, then 
these characters will be displayed in the text area as '<' and '>' 
symbols.  So when  the text is submitted from the textarea, all of the 
user's HTML entities will have been destroyed.

Any thoughts on this problem?


Yep, of course. :)

If there is a < in the file, when you apply htmlentities(), it'll 
come out in the HTML source as < and appear as < in the 
rendered . So... it's not an issue.



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


RE: [PHP] FDF support in RedHat (make error)

2003-08-08 Thread Jay Blanchard
[snip]
For me this is a very intelligent question (and advanced too) because I 
have no idea of linux or compilers. (or as a metter of fact, what is a 
.h file).
[/snip]

You'll note that the library file began with "lib". The files are C or
C++ files witha .h being a header file for the compiler. It basically
boils down to long held naming conventions. Bottom line...did you get it
done or is it still throwing errors?

Incidentally you did do exactly what the manual told you to do with the
locations.

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



Re: [PHP] Building an XML Parser Class

2003-08-08 Thread Evan Nemerson
Try getting rid of the quotes around $this->startElement, or changing them to 
double quotes.

If you don't understand why, php.net/language.types.string should make for an 
exhilarating read :)



On Thursday 07 August 2003 12:40 pm, Donald Tyler wrote:
> Hi,
>
> I am trying to create a Class that will parse an XML document. It all works
> fine as individual functions but I cant get it to work as a class.
>
> For example, when I do the following in my class:
>
> xml_set_element_handler($this->xml_parser, '$this->startElement',
> "$this->endElement");
> xml_set_character_data_handler($this->xml_parser, "$this->valueHandler");
>
> I get an error message:
>
> Warning: xml_parse(): Unable to call handler $this->startElement() in
> c:\program files\apache group\php\My_includes\Class.xmlTranslator.php on
> line 90
>
> Now I presume this is because I am trying to call methods of my class.
>
> Does anyone know a good way around this?
>
>
> Thanks.

-- 
"Why be born again, when you can just grow up?"

-Unknown



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



Re: [PHP] Old version of PHP

2003-08-08 Thread Curt Zirzow
* Thus wrote Ford, Mike   [LSS] ([EMAIL PROTECTED]):
 
> (There are also words in English derived from Greek which have singular ending -on 
> and plural ending -a -- notably criterion/criteria.  Microsoft doesn't understand 
> this, and gets it tooth-jarringly wrong all over Excel and its help files.)

tooth-jarringly :)


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] bug in code - can't find it!

2003-08-08 Thread Marek Kilimajer
Is it realy so? I remember someone noting on this list it also work if 
short tags are off.
I have never tested it and I'm not going to restart our server now, but 
I will try it at home.

John W. Holmes wrote:

AciD wrote:

just a little point; u can replace

by 
which is better imho.


and you're entitled to it, but it's not better. Shorter isn't always 
better.

Your code will break if enable_short_open_tags is disabled in php.ini or 
an .htaccess file. Sure, it's on by default, but some people turn it 
off, especially when dealing with XML a lot.



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


[PHP] Reading excel files

2003-08-08 Thread Jackson Miller
Is there a way to read excel files for parsing with PHP?

I see there is a PEAR package for writing excel files, but I want to be able 
to parse .xls files.

(Please no comments about comma-delimited or tab-delimited exports, I am doing 
that too).

Thanks in advance,
-Jackson

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



Re: [PHP] Problem occurs when included file includes anther file.

2003-08-08 Thread Christophe Chisogne
nc01.php from demo.php: ok in root/./inc01.php
Indeed, the PHP doc should be updated on that point.
I do agree with you, after struggling a while for the
same kind of problem :-)
But I've got all explanations below.

Nicholas Robinson wrote:
The directory structure is as follows:
|-- demo.php
|-- inc/
   |-- inc1.php
   |-- inc2.php
=== file demo.php ==
require 'inc/inc1.php';
=== file inc/inc1.php ==
require 'inc2.php';
== file inc/inc2.php ==
this is a test
The above inc/inc1.php is ok for testing.And this would be ok too:

Problem occurs when the code is like this

Fatal error: main(): Failed opening required './inc2.php'
(include_path='.:/usr/local/lib/php')
Your code is not correct, in PHP before 4.1 at least.
The include path is always the one of the (initial) script.
It's "/" in your case. You must use "require inc/inc2.php"
even in inc1.php because the search path in inc1.php
(used by require inc/inc2.php) is '/' (initial script) and not
'/inc'.
NB this behaviour changed after 4.1. Now, the search path is
first the (initial) script, and _if_not_found_there, the path
of the including (parent, included) script.
So your code will somewhat works after PHP 4.1 (unless an included
file has the same name in the including script), but it can't
work before PHP4.1. The best option seems to always use the old
convention, to avoid confusion (and clash in file names, which
could be a difficult to find bug).
It seems that there's noxplanation about this in php manual.Could
someone give some?
Yes, but I think it's really well hidden (in doc users comments)

Look at the comment of "ivo at i7 dot nl" on "26-Nov-2002 08:56" in
http://www.php.net/manual/en/function.include.php
Btw,I am using redhat 7.2 / Apache 2.0.47 / PHP 4.3.3RC1 
I guess your code works on that particular server and
not on another one ?
I had the same surprise that you have, so I do always this now.

1. Use old convention (require './include/inc01.php')
even in included files
2. Use '.' in front of path as show above, just in case (bad php.ini)
In fact there is a more subtle pblm left. The old semantic means
the 'require' in an included file depend on the 'require' of the
including file! Here under an example to better understand.
It happens when you have a subdir (say admin) which contain php
libraries used in that subdir and in the parent dir (can be often)
I suppose an 'old' PHP (before 4.1) as some of the ones I use.
Path:
root/demo.php
root/inc/inc01.php
root/admin/demoadm.php
root/admin/inc/lib01.php
root/admin/inc/lib02.php
Includes:
lib01.php incl lib02.php : require './inc/lib02.php'
demoadm.php incl lib01.php: require './inc/lib01.php'
demo.php incl inc01.php: require './inc/inc01.php'
Ok until now for demo.php and demoadm.php, but add this include:
inc01.php incl lib01.php: require './admin/inc/lib01.php'
Code is broken in demo.php but not for demoadm.php

When calling demoadm.php, search path is root/admin,
includes:
./inc/lib01.php from demoadm.php: ok in root/admin/./inc/lib01.php
./inc/lib02.php from lib01.php: ok in root/admin/./inc/lib02.php
when calling demo.php, search path is root/
includes:
./inc01.php from demo.php: ok in root/./inc01.php
./admin/inc/lib01.php from inc01.php: ok in root/./admin/inc/lib01.php
./inc/lib02.php from lib01.php: KO in root/./inc/lib02.php
Pblm is in lib01.php:
- called from demoadm, we need './inc/lib02.php'
- called from demo, we need './admin/inc/lib02.php'
I guess that's the reason of the change in include/require semantics.
But it can be resolved simply. Here's my solution
1. create root/admin/inc/admconfig.php (all cfg vars for root/admin/)
2. in admconfig.php, set admindir var: " $admindir= './' "
3. create root/inc/config.php (all cfg vars for root/)
4. in config.php, set admindir var: " $admindir= './admin/' "
5. in 'lib01-type' files, use
require $admindir . './inc/lib02.php'
6. of course, include admconfig.php in all root/admin/ php files
   and config.php in all root/ php files
Another solutions left as exercice, as well as asking PHP guys
to update the doc for includes ;-)
--
Christophe Chisogne
Developper, Publicityweb sprl
http://www.publicityweb.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Still can't pass variable through url.. whoops

2003-08-08 Thread Joe Harman
YEPPERS.. You're right

> -Original Message-
> From: Martin Towell [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 2:59 AM
> To: 'Joe Harman'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Still can't pass variable through url
> 
> 
> This _might_ be causing you problems...
>   $month=march;
> strings should be quoted (unless you've define("march", 
> "march")'ed it...)
>   $month='march';
> 
> Martin
> 
> -Original Message-
> From: Joe Harman [mailto:[EMAIL PROTECTED]
> Sent: Friday, 8 August 2003 4:55 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Still can't pass variable through url
> 
> 
>  $year=1999;
> $month=march;
> 
> echo " href=\"http://www.thingamajigger.com/index.php?year=$year&mont
> h=$month\"
> >yeah this is the link";
>  
> ?>
> 
> > -Original Message-
> > From: John Manko [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 08, 2003 2:47 AM
> > To: Martin Towell
> > Cc: 'Jack'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Still can't pass variable through url
> > 
> > 
> > actually, you might want to urlencode it.
> > ok, so i doubt that you would need url encoding for $year 
> and $month,
> > but I'm sure you will playing with more of this in the 
> future, so you 
> > should properly prepare to do so.  Note: browsers will do 
> > formatting for 
> > you, but don't rely on it.
> > 
> > "page.php?year=" . urlencode($year) . "&month=" . urlencode($month)
> > 
> > 
> > Martin Towell wrote:
> > 
> > >See if changing it to
> > >   page.php?year=$year&month=$month
> > >works
> > >
> > >
> > >The separator between the page and the query string is "?" The 
> > >separator between each key/value pair is just "&"
> > >
> > >-Original Message-
> > >From: Jack [mailto:[EMAIL PROTECTED]
> > >Sent: Friday, 8 August 2003 4:30 PM
> > >To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > >Subject: [PHP] Still can't pass variable through url
> > >
> > >
> > >Dear all
> > >I had set the "register_global=on" and "magic_quotes_runtime=off"
> > >already, but when i click my hyperlink 
> > >"page.php?year=$year&?month=$month", it doesn't pass the 
> > variable for
> > >?year and ?month to the destination page "page.php" I'm
> > using php 5.0
> > >above , if the same case apply to php4.04, then there is no
> > problem at
> > >all! Can anyone please give me more help on this?
> > >
> > >Thx alot
> > >Jack
> > >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


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



[PHP] RE: [PHP-WIN] Still can't pass variable through url

2003-08-08 Thread Svensson, B.A.T. (HKG)
[...]
> when i click my hyperlink "page.php?year=$year&?month=$month", it
[...]
> if the same case apply to php4.04, then there is
> no problem at all!

It's rather a mysterium why it worked at all. How did you
manage to get this working on php4.04? (It should not work!) 

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



RE: [PHP] Problem occurs when included file includes anther file.

2003-08-08 Thread cyz
Well,if so,why  works?
I didn't change the default include_path.Sure that '/inc' isn't in the
include_path.But it just works.

You see,the include_path ".:/usr/local/lib/php" refers to the current
dirctory where the file locates and the PEAR directory.The focus is what
this current directory "." refers to when the demo.php includes another
file inc/inc1.php -- well,to demo.php, without question ,it refers to
where the demo.php locates,but to inc/inc1.php what this "."  refers to
?  '/' or '/inc'? It seems that both are ok except in the case we use
'./'.

-Original Message-
From: Nicholas Robinson [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 3:15 PM
To: CaiYongzhou; Php General
Subject: Re: [PHP] Problem occurs when included file includes anther
file.

ooops, sorry, ignore my last post, I must get larger text on my screen!
Missed 
the .: element of your path!

Can you confirm that this file is a replacement for demo.php?

"Problem occurs when the code is like this
"

If so, then it won't find it because you haven't include ./inc in your
include 
path.

Otherwise your example works fine on my machine.

HTH

Nick

On Friday 08 Aug 2003 6:38 am, CaiYongzhou wrote:
> The directory structure is as follows:
> /
>
> |-- demo.php
> |-- inc/
> |
> |-- inc1.php
> |-- inc2.php
>
> === file demo.php ==
>  require 'inc/inc1.php';
> ?>
>
> === file inc/inc1.php ==
>  require 'inc2.php';
> ?>
>
> == file inc/inc2.php ==
> this is a test
>
> The above inc/inc1.php is ok for testing.And this would be ok too:
>  //file inc/inc1.php
> require 'inc/inc2.php';
> ?>
>
> Problem occurs when the code is like this
>  //file inc/inc1.php
> require './inc2.php';
> ?>
> Fatal error: main(): Failed opening required './inc2.php'
> (include_path='.:/usr/local/lib/php')
>
> It seems that there's noxplanation about this in php manual.Could
> someone give some?
>
> Btw,I am using redhat 7.2 / Apache 2.0.47 / PHP 4.3.3RC1 as my testing
> server.
> Thank you for reading my post:)





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



RE: [PHP] Extracting Compressed Files

2003-08-08 Thread Matt Palermo
Do you happen to know where I can find some examples or sample code for
these?  The exec function on php.net didn't go into much detail about
extraction from compressed files.  Anyone know of any good references?

Thanks,

Matt

-Original Message-
From: Jason Sheets [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 04, 2003 11:46 PM
To: Matt Palermo
Subject: Re: [PHP] Extracting Compressed Files

Use exec to execute the command line programs that deal with these 
archives.  Namely tar and gz and bzip2 and zip/unzip.

For single files that are compressed you can use PHP to decompress bzip2

and .gz files if you have compiled PHP --with-zlib and --with-bz2, 
otherwise you must use the command line tools.

Jason

Matt Palermo wrote:

>Does anyone know of easy ways to be able to extract all
>files/folders/subfolders from different types of compressed files
(.zip,
>.tar.gz, etc.)?  If anyone could help me out with this, I would really
>appreciate it.  
> 
>Thanks,
> 
>Matt
>
>  
>




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



Re: [PHP] where are my errors?

2003-08-08 Thread David T-G
John, et al --

...and then David T-G said...
% 
...
% Does that show up in phpinfo() output?

Well, apparently so, and apparently it is.  I specifically called phpinfo()
from the require()d file to make sure I'd pick up the value at the time
rather than just what's in php.ini and it seems that's not what we've
tanked.


TIA & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Re: PHP Newbie needs assistance to highlight a specific item in a frame window

2003-08-08 Thread bill
Long description, so I'm not sure exactly what you're doing, so I'll restate my
understanding.

You have a frameset with multiple pages.  Pages are called via PHP.  Each page
may be the same but may need to highlight a different name.  You want to
highlight using CSS and IDs.

At heart, here's my recommendation.

Each page in the frame is called via php, let's call it get_page.php

Each page has a different highlight, somehow php must get to know that, maybe as
a result of a survey, etc.  For convenience, let's say your surveys want to
highlight 1234 on the first page, and 5678 on the second.

Don't know your survey mechanism, so we'll use a "Get" request as an example.
So, the first page will be get_page.php?id=1234 and the second page will be
get_page.php?id=5678

Then, in the get_page.php we have the normal css code and we'll add some php to
it:

At the top of get_page.php somewhere we have:



Then later,


//


Note the extra php code in the CSS.  Normal anchor tags () will have .3em
while the anchor tag with id from the GET request should have .5em.  If there is
no highlight the extra "a" line won't be printed in the CSS.

There's a lot of other ways to do it, but this should give you a start.

kind regards,

bill

"Mary D. Taffet" wrote:

> While I am technically capable, having worked with COBOL and perl
> extensively (but not at the same time !), I am a newbie to PHP.
>
> I have the basics for a survey application up and running, but need to
> be able to highlight one specific piece of text in each of the two main
> frame windows, and I'm not entirely sure how to accomplish this with
> PHP.
>
> Both frame windows are pulling in HTML documents from a pool of over
> 14,000 pre-prepared documents, all of which have specific ID values
> incorporated as part of the NAME anchor element, for example:
>
> Thomas Jefferson
>
> George Washington
>
> I have a mysql table that I am using to tell me, at any one point in
> time, which specific NAME value should be pointed to in each frame.
> They may or may not be within the same physical HTML document.
>
> If it were the case that I were pointing to Thomas Jefferson in the left
> frame and George Washington in the right frame, I would like to be able
> to highlight each name so that it is immediately visible within the
> surrounding document context.  I would like to minimally use a different
> color for the specific name in each frame that I am pointing to.
>
> Because each document is filled with multiple NAME values, each with
> it's own separate ID value, theoretically it should be possible to
> highlight only the one speicific NAME value I am interested in at a
> particular point -- leaving all the other NAME values the same color as
> the surrounding text.  Hopefully this is even possible when I am pulling
> in the same physical document twice, once in each frame (using separate
> PHP programs for the left and right frames).  If the two snippets of
> text above were found in the same sentence in the same physical HTML
> document, I would want one highlighted in the left frame and the other
> highlighted in the right frame.
>
> The mysql table will tell me at any one point which specific ID value
> should be highlighted in each frame, but only through a variable name (I
> am currently using $resource_nameid_left and $resource_nameid_right for
> these two values).  I am already incorporating these values in the URL
> pulled into each frame as each URL points to the specified NAME anchor
> specifically.
>
> But I also need to be able to use the ID Selector property of CSS
> through PHP, pointing to a variable name.  This is the part that I don't
> have any examples for.  Can I do this easily?  Will it require the use
> of Javascript?
>
> If anybody has some sample code that will do this, or can point me to
> sample code that does this, I would appreciate it very much.
>
> If I have not explained fully what I am seeking, please let me know and
> I can elaborate further.
>
> -- Thanks,
>Mary D. Taffet
>Syracuse University
>Ph.D. Student/School of Information Studies
>E-mail:  [EMAIL PROTECTED]
>Web: http://web.syr.edu/~mdtaffet/


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



Re: [PHP] Formatting an ascii characters in php?

2003-08-08 Thread Scott Fletcher
Thanks for the tips.  I did look into this webpage just the same one as you
provided in the link before I post a message in this newsgroup.  That
webpage said, "ascii2ebcdic() is an Apache-specific function which is
available only on EBCDIC based operating systems (OS/390, BS2000)."  Problem
is I don't have EDBCDIC based operating system.  But thanks...

Scott

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I use the cURL to send and receive data regardless of what data
format
is the data in.  There are certian ascii characters in the data, like
'LF'
for line feed, 'CR' for carriage return, etc.  This time I came upon a
problem where one of those ascii character caused PHP to get tripped up.
So, is there any PHP function or script that can translate the ascii
character into a text format where I can read each of those character to
see
which one is causing the problem so I can be able to fix the problem.
Any
know of any of such PHP feature that can do those conversion?
[/snip]

http://us2.php.net/manual/en/function.ascii2ebcdic.php may help.

Have a pleasant and productive day!



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



Re: [PHP] Max script size

2003-08-08 Thread Jeff Held
Thanks!

Yes. PHP versions differnt.  Ini's Diffiernt, don't want to to match those.
I assmue the reason is because of a differnt ini setting...I just can't find
it.

I looked for a setting that may set a limit but didn't find any.

Jeff


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
I have a 6MB PHP script that just won't exe on the live server. It works
on
the local one.  Any ideas on a setting that may limit the script.  It is
not
timing out, it only takes about 3 sec to exe.
[/snip]

I'll take a SWAG at itare the PHP versions the same? Do the ini
files have the same settings? Does it throw any errors?

Have a pleasant and productive day! [rant withheld]




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



Re: [PHP] Max script size

2003-08-08 Thread Jeff Held
Sorry, in terms of PHP error no.  I get a page cannot be displayed/DNS
error.
It happens instantly...in fact, not 1 line of script exe.

Jeff Held

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]




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



Re: [PHP] shell_exec

2003-08-08 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> 
> 
> 
> > Shell side:
> > - must be readable and executable by user (apache or perhaps everyone)
> > - suid bit work only for programs, not scripts I think
> > - shell can only execute cmds for which it's effective user has
> > sufficient permissions
> >
> > Try this (as root on webserver), if you can login as apache.
> > If you can't login as apache, log as a normal user (not root)
> > # su - apache
> > $ cd /path/to/script
> > $ ./myscript.sh
> > You will probably see errors here.
> 
> 
> As Juan suggested I checked /var/log/messages. The shell script I'm trying
> to run is a script that restarts our web content filter. In the script it
> removes the pid file so it will be recreated when the application is started
> again. The error I'm getting in the message log is "dansguardian: Error
> creating/opening pid file." Any ideas on what to do?
> 
> Thanks for your help,
> Rod
> 
> 
Check whether the user that the webserver runs as has appropriate  
permissions in the relevant directory?

-- 
Quod subigo farinam

$email =~ s/oz$/au/o;
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



Re: [PHP] AOL Email client

2003-08-08 Thread Miles Thompson
At 07:57 PM 8/7/2003 -0500, php list wrote:
I am using php mail and setting all my $headers info to show From:, To:,
etc.
It work perfectly on my computer. I use MS Outlook.
I am doing this for a client who received his email via his aol account.
When he receives the email, the email comes in with "Unknown Sender".
Is there issues with this? Do I need to so something different for AOL email
to receive this information properly?
Thanks.
Mark Roberts, Roberts Computing Systems
Webmaster Services $29.50/mo


Others know a lot more about email than me, and I don't know if this your 
system is Windows or *x, but quite likely the mail is sent with the 
identity of the web server.

We had this problem using the mail() function at Experthost, as we could 
not track the bounces, they went back to sendmail's "nobody" account, and 
the ones we originated could not be identified.

This isn't an answer, more a musing on what could be happening.

Cheers - Miles

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


Re: [PHP] Problem sortiing dyn query

2003-08-08 Thread John W. Holmes
Mark wrote:

$query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY %s
%s",$reSort_Recordset1,$direction_Recordset1);


I'm curious. Is there an advantage to using the above format, rather
than 

$query_Recordset1 = "SELECT * FROM sti_tracking ORDER BY
$reSort_Recordset1 $direction_Recordset1";
Is the result the same?
Same result. Personal preference.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


Re: [PHP] Re: Parse error not understood

2003-08-08 Thread Ivo Fokkema
"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Yes, I'm top posting, pls forgive.
>
> This is a situation where an editor which has built-in brace matching
> really helps - if in the midst of "looking" one remembers to use it.
>
> Another tip, although it probably wouldn't help here: Save the code with a
> .phps extension and look at it in the browser.
I always indent statements like this :

if (this) {
  do_this();
  if (that) {
do_that();
  }
}

It helps me 'see' the code and also it's easier to track missing braces. I
know people have their own coding style - I just find it easy for me.

--
Ivo



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



RE: [PHP] Re: Password storage system

2003-08-08 Thread Daevid Vincent
Thanks, but I guess I forgot to mention it should be web-interface...
 
http://passwordms.sourceforge.net/index.php
For anyone wanting to look.

> -Original Message-
> Try PMS: Password Management System. I believe it can be found on
> sourceforge.


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



[PHP] mcrypt Blowfish encryption and Chilcat

2003-08-08 Thread Stephen Holly
Hi all.

I was wondering anyone had heard any issues regarding mcrypt Blowfish
encryption and Chilcat??

I presently have a system with a server implemented in php using
mcrypt-2.4.x and clients who interact with it sending and receiving blowfish
encrypted data. I am unable to touch the clients but want to convert the
server to .NET. However I am not getting the same results and I am pretty
sure my .NET components are correct chilkat.

Any help would be greatly appreciated :o)

Cheers,
Steve.



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



RE: [PHP] Hitler and Recent Threads

2003-08-08 Thread Chris W. Parker
Jay Blanchard 
on Thursday, August 07, 2003 9:25 AM said:

> LOL Maybe we shoud start requiring tips!

ARRGGH!

NO!!

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



[PHP] Old version of PHP

2003-08-08 Thread Dan Phiffer
Hello,

I'm working on an ongoing project that depends on a shared webserver running
an old version of PHP (4.1.2 I believe). Is there any good reason to stick
with an older version of PHP, or might it be a valid suggestion to have it
upgraded to something a bit more recent? I have a notion that upgrade
attempts may have been snubbed out by the way things like register_globals
are now handled by default, the perception being that newer versions of PHP
are incompatible with older code.

Mainly I'm concerned that code I test on our in-house server running
version-current PHP will depend on function calls and language constructs
that the production server's vintage PHP interpreter lacks.

Some questions:
Is there a way to get one instance of Apache to use different versions of
PHP for various virtual hosts?
Is there a way to analyze code for PHP version compliance?
And finally, what is the earliest language version that can reliably handle
a PEAR object?

Thanks,
-Dan



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



Re: [PHP] Edit a page in PHP

2003-08-08 Thread John W. Holmes
Jeremy Darling wrote:
This is driving me nuts.  I know it can be done, cuz I've seen it done
before, but I can't figure it out.
I would like to have a php file that allows me to edit an HTML/PHP file thru
my browser.
Currently I have something that looks like:


print htmlentities($contents);

?>

This works fine unless the page that I'm editing has a TextArea tag in it,
witch throws everything off.  I know that this is more of an HTML question,
but I couldn't find the answer in my quick searches (too many pages to go
thru).
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


RE: [PHP] dev style guide

2003-08-08 Thread desa15

The Hungarian notation was developed by a Hungarian programmer from
microsoft.
I use hungarian notation in visual c++ but in php ???
If you have more information search in http://msdn.microsoft.com have
examples and the complete and protability list, to other langauages such vb


Un saludo, Danny


   
   
  "Jay Blanchard"  
   
  <[EMAIL PROTECTED]  Para: "Chris W. Parker" <[EMAIL 
PROTECTED]>, "Mike Migurski" <[EMAIL PROTECTED]>, 
  ations.com>"jsWalter" <[EMAIL 
PROTECTED]>  
  cc: <[EMAIL PROTECTED]>  
   
  06/08/2003 13:31Asunto:   RE: [PHP] dev style 
guide 
   
   
   
   




[snip]
I've found a few articles on Hungarian notation but none of them have
been all that great. Real wordy and without good examples. Do you have
any examples/articles to contribute?
[/snip]

There is a lot to go on out there
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=Hungarian+notatio
n

We have agreed on cetain types (strings are strFoo, integers are intFoo,
doubles are dblFoo, etc.) and allow for other descriptive notation where
standard terms do not work.

HTH

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







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



RE: [PHP] trying to match the front and end...

2003-08-08 Thread Ford, Mike [LSS]
On 08 August 2003 17:39, Dan Joseph wrote:

> Hi,
> 
> > > In a nutshell, what I want to do is chop off the front and the
> > > back. Example: 
> > > 
> > > I have: 1234567890
> > > I want: 456
> > > 
> > > I have a start num and an end num.  start = 123, end = 7890.
> > > 
> > > This is working fine as I have it above, however I'd like to
> > > combine it into one regular express, instead of two.  Can someone
> > > give me an example of matching the beginning and end at the same
> > > time? 
> 
> From Mike:
> 
> >$middlenum =
> > preg_replace("/^${this->start_num}(.*)${this->end_num}$/", '$1',
> > $this->ach_acct_num);
> 
> From John:
> 
> > $new_number =
> > preg_replace('/^'.$this->start_num.'([0-9]+)'.$this->end_num.'$/',
> '\\1',$old
> _number);
> 
>   The one that Mike gave didn't seem to do anything,

Oops!! Forgot to escape the final $ in the pattern -- should have read:

preg_replace("/^${this->start_num}(.*)${this->end_num}\$/", '$1',
$this->ach_acct_num);

> John's will work if it
> can match the beginning and the end successfully.  I should probably
> explain myself further.
> 
>   Sometimes there won't be anything to replace at the front, and
> sometimes nothing at the end.  So it'd still need to do the front
> and/or end wether or not they both exist.
> 
>   Is there a way to tweak these to do that?

If $this->start_num or $this->end_num contains the empty string (or even
NULL or FALSE), nothing will be interpolated into the string for those
values, so the above (corrected) pattern will still work.  If
nothing-to-replace is signalled by something else, you may have a bit more
work to do...

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Re: suggestion on php-editor?

2003-08-08 Thread Joe Pemberton
www.crimsoneditor.com

A great, free editor for windows with syntax highlighting for many
languages, php included.

-Original Message-
From: rush [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 12:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: suggestion on php-editor?

"Louie Miranda" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> But i was wondering if you guys have any other suggestions?

For the extensive list see Keith's listof editors:

http://linuxbackup.co.uk/

rush
--
http://www.templatetamer.com/




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



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



Re: [PHP] detecting referer

2003-08-08 Thread Robert Cummings
You can get referrer information from the following:

$_SERVER['HTTP_REFERER']

This isn't foolproof though since the user can usually set in their
browser whether to have this information sent.

Cheers,
Rob.

On Thu, 2003-08-07 at 11:59, Creative Solutions New Media wrote:
> Hello,
> 
> Bit of a newbie question I guess.
> 
> What is the best way, using php, to detect information about the referrer to
> a page.  Is this possible/difficult using PHP?
> 
> Thanks,
> 
> Tim Winters
> Manager, Creative Development
> Sampling Technologies Incorporated (STI)
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> W: 902 450 5500
> C:  902 430 8498
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



[PHP] Open Source Software Survey

2003-08-08 Thread Neil Hambleton
Dear PHP Contributors,

I am studying for a Master's degree with Henley Management College in
the UK, and in the past have used a variety of Open Source Software.

As part of my course I am conducting a survey in an attempt to identify
the critical success factors for Open Source projects. If you are a user
or developer for PHP, I would be very grateful if you could spare
2 or 3 minutes to fill in my questionnaire at the following URL:

http://surveys.ideoconcepts.com/surveyor/index.php?sid=4&projectid=PHP
This survey is completely confidential.

Please accept my apologies if this is regarded as an off-topic posting.

Thank you very much for your help,
Neil Hambleton
Email: [EMAIL PROTECTED]

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



[PHP] AOL Email client

2003-08-08 Thread php list
I am using php mail and setting all my $headers info to show From:, To:,
etc.
It work perfectly on my computer. I use MS Outlook.
I am doing this for a client who received his email via his aol account.
When he receives the email, the email comes in with "Unknown Sender".

Is there issues with this? Do I need to so something different for AOL email
to receive this information properly?

Thanks.
Mark Roberts, Roberts Computing Systems
Webmaster Services $29.50/mo



mailto:[EMAIL PROTECTED]



Re: [PHP] FDF support in RedHat

2003-08-08 Thread Cesar Cordovez
Did it.  Same error. =(

Jay Blanchard wrote:

[snip]
configure: error: Fdftk.h not found, please install it again.
[/snip]
I am proud of you! Now type "locate fdftk.h" When you locate it move it
to /usr/local and go again


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


Re: [PHP] OO function overloading?

2003-08-08 Thread Greg Beaver
Indeed it is a hack, but not for PHP 5, the extension has become part of 
the core, and does not require that odd little "overload()" call :)

Greg

Jean-Christian Imbeault wrote:

Greg Beaver wrote:


This statement isn't entirely correct, overloading is possible with the 
overload extension.


True. Nice work. But still a hack in my mind :) (though a *very* clean
hack).
Jean-Christian Imbeault



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


[PHP] preventing output dump of passthru()

2003-08-08 Thread Chris W. Parker
Hello,

Trying to prevent the output dumping of passthru() and instead store the
output in a variable.

I read an article that suggested this:

ob_start();

passthru("command");

$output = ob_get_contents();

ob_end_clean();

But that didn't work. Is there *ANY* way to achieve what I want?


Thanks,
Chris.

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



[PHP] Re: [PHP-DB] Sorting issue

2003-08-08 Thread CPT John W. Holmes
"Jeff" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Why would a mysql db think that 55 was greater than 14000.
>
> I have several headings that display sql data under them, when you click
on
> the heading, it sorts that section (descending/ascending), but it only
seems
> to be looking at the first two numbers in the one heading.   Is there a
> command that forces it to look at the entire record before sorting it?

Because "55" is greater than "14000"... i.e. you're sorting the values as
strings, not integers.

---John Holmes...


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



[PHP] RE: Downloding files once

2003-08-08 Thread Boaz Yahav
passwords can be kept encrypted with mod_auth with no problem.

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 8:04 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]; Igal Rubinstein; Matt Wade
Subject: Re: Downloding files once


Hello,

On 08/06/2003 03:56 PM, Boaz Yahav wrote:
> What about using mod_auth_mysql to add/remove usernames and passwords 
> from the download server in real time?

Never tried but it could work. The only problem is that for basic auth 
you need to keep passwords in plain text in the database.

-- 

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

 


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



RE: [PHP] PDF Thumbnail with PHP?

2003-08-08 Thread Jay Blanchard
[snip]
Does anyone know if there is a way to generate a thumbnail of the 1st
page
of a PDF document using PHP.  I have an application that archives PDF
files,
beeing able to generate small preview images of the documents would be
really cool :)
[/snip]

This may be just what you are looking for
http://us3.php.net/manual/en/function.pdf-add-thumbnail.php

Have a pleasant and creative day!

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



Re: [PHP] setting function variables

2003-08-08 Thread Micah Montoya
Ooops.  Can't believe I overlooked that.  Thanks everyone for your input.
Its up and running now.


- Original Message - 
From: "Mark" <[EMAIL PROTECTED]>
To: "Micah Montoy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, August 07, 2003 2:36 PM
Subject: Re: [PHP] setting function variables


>
> --- Micah Montoy <[EMAIL PROTECTED]> wrote:
> > Tried this and it returns errors of type:
> >
> > Warning: Wrong parameter count for mssql_result() in
> > c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> > on line 78
> >
> > Warning: mssql_result(): supplied argument is not a valid MS
> > SQL-result
> > resource in
> > c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> > on line 79
> >
> > Warning: Wrong parameter count for mssql_result() in
> > c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> > on line 78
> >
> > Warning: mssql_result(): supplied argument is not a valid MS
> > SQL-result
> > resource in
> > c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> > on line 79
> >
> > Lines 78 and 79 read like this:
> >
> > $img_numbers = $qryResults("SELECT COUNT(img_id) AS TotalImages
>
> This should be $runQuery(), not $qryResults()
>
> > FROM images
> > WHERE category_id = '$row[0]'");
> > $img_count = $qryResults($img_numbers,0,"TotalImages")
> >
> > The variables are specified as
> >
> > $runQuery = 'mssql_query';
> > $qryResults = 'mssql_result';
> >
> > Any ideas of why it would be doing this?  Everything works fine
> > when I don't
> > try to use the variables.
> >
> > thanks
> >
> > "Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > From: "Mark" <[EMAIL PROTECTED]>
> > > > --- Micah Montoy <[EMAIL PROTECTED]> wrote:
> > > > > I am trying to specify a single php file to contain all the
> > > > > variables and I
> > > > > just call this file where necessary.  What I am running into
> > is
> > > > > that I want
> > > > > to do this for all the built in functions (i.e. mssql_query)
> > as
> > > > > well.  I've
> > > > > tried numerous attempts but can't get it to operate without
> > wanting
> > > > > to run
> > > > > the functions or return an error.  Something like this:
> > > > >
> > > > > $runQuery = @mssql_query;
> > > > > $qryResults = @mssql_result;
> > > > > $getRow = @mssql_fetch_row;
> > > > > $getRowNums = @mssql_num_rows;
> > > >
> > > > Use a database abstraction class (ADODB, Pear, or something
> > from
> > > > phpclasses.org). You're trying to assign a variable to a
> > function's
> > > > actions, when you can only assign the variable to teh ooutput
> > of the
> > > > function.
> > >
> > > A good suggestion, since this is what your creating, basically.
> > >
> > > Anyhow, if you really want to do it your way, it'd be like this:
> > >
> > > $runQuery = 'mssql_query';
> > > $getRow = 'mssql_fetch_row';
> > >
> > > Then you'd use them like this:
> > >
> > > $result = $runQuery("select ... ");
> > > while($row = $getRow($result))
> > > {
> > >   ...
> > > }
> > >
> > > ---John Holmes...
> > >
> >
> >
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> =
> Mark Weinstock
> [EMAIL PROTECTED]
> ***
> You can't demand something as a "right" unless you are willing to fight to
death to defend everyone else's right to the same thing.
> ***
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>



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



[PHP] APACHE/PHP - buttons don't work

2003-08-08 Thread Miguel Ribeiro
Hi,

I've recently upgraded my webserver for apache 2.0.47 with php 4.3.2 on a
solaris 9 box

My problem is... the buttons on the php pages don't work and I can't figure
why this is happening...

Apache compiled like:

./configure --prefix=/opt/apache
--activate-module=/opt/php/distribution/php-4.3.2/libs/libphp4.a
--enable-module=so
--with-ssl=/usr/local/ssl
--enable-ssl

I've compiled the PHP like:

./configure --prefix=/opt/php
--with-config-file-path=/opt/php/conf
--with-apache2=/opt/apache
--with-apxs2=/opt/apache/bin/apxs
--with-openssl=/usr/local/ssl
--enable-force-cgi-redirect
--disable-debug
--enable-pic
--enable-inline-optimizations
--with-ftp
--with-zlib
--enable-magic-quotes
--enable-safe-mode
--enable-sockets
--enable-track-vars
--enable-trans-sid
--enable-memory-limit
--enable-calendar
--enable-mbstring

I don't know if it is a compilation issue... but I can't see other option
beside this one. Thanks

Regards,
Miguel



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



[PHP] Problem sortiing dyn query

2003-08-08 Thread Creative Solutions New Media
Hi

Can someone give me some indication why this might not be working?

$query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY '%s' '%s'",
$reSort_Recordset1,$direction_Recordset1);

the values for $reSort_Recordset1 and $direction_Recordset1 are passed
through from another page.  $reSort_Recordset1 is the files to sort on and
$direction_Recordset1 is the direction (ASC or DESC).

Thanks

Tim Winters
Manager, Creative Development
Sampling Technologies Incorporated (STI)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
W: 902 450 5500
C:  902 430 8498




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



Re: [PHP] shell_exec

2003-08-08 Thread Rodney Green



> Shell side:
> - must be readable and executable by user (apache or perhaps everyone)
> - suid bit work only for programs, not scripts I think
> - shell can only execute cmds for which it's effective user has
> sufficient permissions
>
> Try this (as root on webserver), if you can login as apache.
> If you can't login as apache, log as a normal user (not root)
> # su - apache
> $ cd /path/to/script
> $ ./myscript.sh
> You will probably see errors here.


As Juan suggested I checked /var/log/messages. The shell script I'm trying
to run is a script that restarts our web content filter. In the script it
removes the pid file so it will be recreated when the application is started
again. The error I'm getting in the message log is "dansguardian: Error
creating/opening pid file." Any ideas on what to do?

Thanks for your help,
Rod


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



RE: [PHP] postmaster@hanmir.com

2003-08-08 Thread Martin Towell
Yep - I did with me previous email
And I guess I'll get one with this email too :/

-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED]
Sent: Thursday, 7 August 2003 4:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [EMAIL PROTECTED]


Hey is every one getting a returned message from
[EMAIL PROTECTED]
 
Joe Harman


 
__ Information from NOD32 1.468 (20030725) __

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com




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



Re: [PHP] How to run PHP from a MySQL DB

2003-08-08 Thread David Nicholson
Hello,

This is a reply to an e-mail that you wrote on Wed, 6 Aug 2003 at
15:17, lines prefixed by '>' were originally written by you.

> I have a database of code pages and was wondering if their is a way
to
> actually run the code from the Database as if it was part of a
page.
> Thanks,
> Jeremy

http://uk2.php.net/eval will do the trick.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/

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



RE: [PHP] Still can't pass variable through url

2003-08-08 Thread Martin Towell
This _might_ be causing you problems...
$month=march;
strings should be quoted (unless you've define("march", "march")'ed it...)
$month='march';

Martin

-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED]
Sent: Friday, 8 August 2003 4:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Still can't pass variable through url


http://www.thingamajigger.com/index.php?year=$year&month=$month\";
>yeah this is the link";
 
?>

> -Original Message-
> From: John Manko [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 2:47 AM
> To: Martin Towell
> Cc: 'Jack'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Still can't pass variable through url
> 
> 
> actually, you might want to urlencode it.
> ok, so i doubt that you would need url encoding for $year and $month, 
> but I'm sure you will playing with more of this in the future, so you 
> should properly prepare to do so.  Note: browsers will do 
> formatting for 
> you, but don't rely on it.
> 
> "page.php?year=" . urlencode($year) . "&month=" . urlencode($month)
> 
> 
> Martin Towell wrote:
> 
> >See if changing it to
> > page.php?year=$year&month=$month
> >works
> >
> >
> >The separator between the page and the query string is "?"
> >The separator between each key/value pair is just "&"
> >
> >-Original Message-
> >From: Jack [mailto:[EMAIL PROTECTED]
> >Sent: Friday, 8 August 2003 4:30 PM
> >To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >Subject: [PHP] Still can't pass variable through url
> >
> >
> >Dear all
> >I had set the "register_global=on" and "magic_quotes_runtime=off" 
> >already, but when i click my hyperlink 
> >"page.php?year=$year&?month=$month", it doesn't pass the 
> variable for 
> >?year and ?month to the destination page "page.php" I'm 
> using php 5.0 
> >above , if the same case apply to php4.04, then there is no 
> problem at 
> >all! Can anyone please give me more help on this?
> >
> >Thx alot
> >Jack
> >

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



Re: [PHP] Flash Actionscript List or Forum

2003-08-08 Thread skate

> Hello all,
>
> I've been doing PHP for a little while now... I am starting learn Action
> Script now... and having trouble with global variables and functions...
> does anyone know where I find a good list or forum for action script?


flashkit.com is pretty good. i get a lot of resources from there. as for
lists, i actually don't know any good ones. if your on any newsgroups,
there's a couple in there, but they're not very high volume. nothing like
this for instance.

macromedia also have their forums which can be very useful at times.

if you want to email me your problems tho, i can take a look at them.
basically a variable/function will be global to a specific frame, so if you
want a global variable, i'd suggest sticking it on it's own layer, on the
_root movie. you should be able to access it from anywhere with
_root.variable.

i don't know if flash supports any truely global stuff... although i could
be wrong, coz i'm a flash 5 boy, and haven't done much mx'ing yet...

-skate-



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



Re: [PHP] Still can't pass variable through url

2003-08-08 Thread John Manko
and.

Joe Harman wrote:


echo "
href=\"http://www.thingamajigger.com/index.php?year=$year&month=$month\";
 

yeah this is the link";
   

?>

 

-Original Message-
From: John Manko [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 2:47 AM
To: Martin Towell
Cc: 'Jack'; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Still can't pass variable through url

actually, you might want to urlencode it.
ok, so i doubt that you would need url encoding for $year and $month, 
but I'm sure you will playing with more of this in the future, so you 
should properly prepare to do so.  Note: browsers will do 
formatting for 
you, but don't rely on it.

"page.php?year=" . urlencode($year) . "&month=" . urlencode($month)

Martin Towell wrote:

   

See if changing it to
page.php?year=$year&month=$month
works
The separator between the page and the query string is "?"
The separator between each key/value pair is just "&"
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, 8 August 2003 4:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Still can't pass variable through url
Dear all
I had set the "register_global=on" and "magic_quotes_runtime=off" 
already, but when i click my hyperlink 
"page.php?year=$year&?month=$month", it doesn't pass the 
 

variable for 
   

?year and ?month to the destination page "page.php" I'm 
 

using php 5.0 
   

above , if the same case apply to php4.04, then there is no 
 

problem at 
   

all! Can anyone please give me more help on this?

Thx alot
Jack




 

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


   



 



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


Re: VOT: [PHP] Hitler and Recent Threads

2003-08-08 Thread Mark

--- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote:
> From: "Mark" <[EMAIL PROTECTED]>
> >
> > And as they say, "Never argue with a fool. People will
> > not be able to tell the differnce."
> 
> I thought it was "Never argue with an idiot. They drag you down to
> their
> level and beat you with experience"
> 
> :)
> 

Now that's one I haven't heard! Gotta file it away for future use...


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [PHP] Downloding files once

2003-08-08 Thread Boaz Yahav
Can you fake a referrer by say, using fsockopen() and sending your
own headers?


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Downloding files once


* Thus wrote Boaz Yahav ([EMAIL PROTECTED]):
> 
> I thought of using a download function that uses headers and 
> readfile() or fread(). This way i can check who is the user and send /

> not send the file. However, this does not seem to work with
> such big files.

you most likely are running into the script timeout when people are
downloading the  file.  I would in this case, use fread so you can do
some checking in between sends and if bandwidth becomes a problem you
can do some bandwidth throttling:

set_timelimit(0);
while (! feof() {
  if (connection_aborted() ) {
break; // no need to send the data now.
  }
  fread();
  print $data;
}
  

> 
> Another idea is to use Apache Mod Rewrite and check that the user has 
> the referrer of the download server. I'm assuming that he will only 
> have this if he had access to a link to the
> file from the server it's self and such a link will only be provided
to
> members. As far as i can
> think, you can only fake a referrer by writing your own client.

I would discourage this for the fact that the referer can easily be
faked.  If you downloads are important to the general public and word
gets out that the referer is your security.. say good bye to your
bandwidth :)

> 
> If anyone has any ideas or comments I'll be very happy to get them.

HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

 


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



Re: [PHP] setting function variables

2003-08-08 Thread Mark
Use a database abstraction class (ADODB, Pear, or something from
phpclasses.org). You're trying to assign a variable to a function's
actions, when you can only assign the variable to teh ooutput of the
function.


--- Micah Montoy <[EMAIL PROTECTED]> wrote:
> I am trying to specify a single php file to contain all the
> variables and I
> just call this file where necessary.  What I am running into is
> that I want
> to do this for all the built in functions (i.e. mssql_query) as
> well.  I've
> tried numerous attempts but can't get it to operate without wanting
> to run
> the functions or return an error.  Something like this:
> 
> $runQuery = @mssql_query;
> $qryResults = @mssql_result;
> $getRow = @mssql_fetch_row;
> $getRowNums = @mssql_num_rows;
> 
> I've tried using the %, $, "",'', and the @ symbol without any
> luck.  Anyone
> know of way to do this, so I can use a generic name for all the
> functions
> and be able to distribute it to those using either SQL Server or
> MySQL
> without them having to go through the code and manually change it?
> 
> thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Stop neurotic posting

2003-08-08 Thread Curt Zirzow
* Thus wrote Lucas Lain ([EMAIL PROTECTED]):
> Please ... put in the Subject --> [OFF-TOPIC] ... i don't want to see this stupid 
> discussion ... 

Hardly OT IMO. It is a discussion on methodolgy of helping people,
and some good issued have been addressed, constructive and
destructive.

If the thread was read in whole... part of the issue that was
brought up is replies like yours. If the topic is that displeasing
just ignore it or dump them all to /dev/null

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] moderator: has anything on this list changed?

2003-08-08 Thread Curt Zirzow
* Thus wrote Justin French ([EMAIL PROTECTED]):
> Hi,
> 
> For over a year now, I've been subscribed to this list through my main 
> email account.  My ISP has anti-spam stuff on the server which prepends 
> the subject of anything it considers spam with 'SPAM: '.
> 
> As of 4am this morning (Melb, Australia), EVERY message to this list 
> has been flagged as spam.

hm.. intersting you brought this up. 'Ryan A' had mentioned that
the list is Black listed at spam cop.  I think the problem has to
do with that person from @hanmir.com. 

there is a person subscribe to the list (from hanmir.com), of whom
had spammed the list, who's mailbox is full. And every post that
gets sent to php-general is returned, to the user that posted the
message, from [EMAIL PROTECTED] saying the mailbox is full.

My theory is that the administrator of the domain/email/system has
no clue what he is doing and has reported everyone that has sent
mail as a spammer.

This is rather disturbing!

I, as well as others, have tried to get the attention of someone who
has control over this list about this '@hanmir.com' person that is
subscribed to the list to remove him.  This has been going on for
several weeks now.

I'm bcc'ing this to [EMAIL PROTECTED], hopefully someone over there
can help the list out with this issue.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] Stop neurotic posting

2003-08-08 Thread Jay Blanchard
[snip]
This is a very busy list, over 100 message in a quiet day and most
people 
are helpful and decent, don't mind reading and learning. Unfortunately 
there are some who mostly post stuff like 'read the manual' and other
shit 
like that. Stuffing e-mailboxes with such garbage day after day doesn't
do 
anybody any good even if the manual is  not being read as much as it
should 
be. Is it too difficult to not answer the post at all if you disagree
with 
the content?
[/snip]

I know that this has circulated, but RTFA (toungue-firmly-in-cheeck)
http://catb.org/~esr/faqs/smart-questions.html

My suggestion, quit posting "shit like this" when it has been covered
dozens of times. Talk about "noise". Look how many replies this thread
generated. Looks very much to me like you are
http://www.winternet.com/~mikelr/flame29.html I know I use RTFM, STFW,
and STFA a lot, but when the poster makes it apparent that they have
done no research it is an expected and acceptable answer. 

HTH!

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



RE: [PHP] Still can't pass variable through url

2003-08-08 Thread Joe Harman
Jack... Can you paste your code into an email and post it

> -Original Message-
> From: Jack [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 08, 2003 2:30 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Still can't pass variable through url
> 
> 
> Dear all
> I had set the "register_global=on" and 
> "magic_quotes_runtime=off" already, but when i click my 
> hyperlink "page.php?year=$year&?month=$month", it doesn't 
> pass the variable for ?year and ?month to the destination 
> page "page.php" I'm using php 5.0 above , if the same case 
> apply to php4.04, then there is no problem at all! Can anyone 
> please give me more help on this?
> 
> Thx alot
> Jack
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


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



Re: [PHP] Attention everyone 0-t

2003-08-08 Thread skate

>
> any ideas on what we can do about it?
>

set the server up to change the sent from email address to
[EMAIL PROTECTED]

this'll not only stop the spambots and spam blockers picking up on
individual email address', but also means that when people reply to all,
that you don't get 2 emails in response.

it does raise other problems tho... but that's my 2 cents...



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



Re: [PHP] Correct Coding

2003-08-08 Thread Jim Lucas
Could you explain a little better why this would make things better?

I don't understand how this would improve things.

Jim Lucas
- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 07, 2003 10:28 AM
Subject: Re: [PHP] Correct Coding


> * Thus wrote Christopher J. Crane ([EMAIL PROTECTED]):
> > Is this the best way to do this?
> > 
> > if(isset($Task) && $Task == "Add") { Do something }
> > 
> > I want to check if the variable is set and if so, if it is "Add".
> 
> Yes, that is good. Remember, though, it is case sensitive so "ADD"
> wont match. 
> 
> Concerning the $Task == "Add", I'd like to make a comment.  It can
> be a wise decision to compare your variables with strings like:
> 
> if ("Add" == $Task)
> 
> This can help preventing typo's  like:
> 
> if ($Task = "Add")
> 
> I've seen people tear their hair out wondering why the if statement
> is always true even if $Task is not "Add". I don't see this method
> used very often but it can prevent serious logic typos.
> 
> 
> HTH,
> 
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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



[PHP] Attention everyone 0-t

2003-08-08 Thread Ryan A
Hello everyone,
Leave "[PHP] Stop neurotic posting" alone for some time and listen up, for
some reason over 90% of all posters to this list has been blacklisted by
spamcop...

I am pretty sure that not everyone (if anyone is spamming) but i think that
some son of a stinking .. has used our email addresses to spam people

any ideas on what we can do about it?

-Ryan


We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



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