[PHP] User error handler must not modify error context

2005-09-19 Thread Noel

Error Message:
Fatal error: User error handler must not modify error context in 
[FILENAME] on line 58


This error seems to occur only when I use:
$old_error_handler = set_error_handler ('userErrorHandler');

The error number is pointing to this code:
LINE 57: global $mywebsite;
LINE 58: if ($_POST['title']) $title = $_POST['title'];
LINE 59: elseif ($_GET['title']) $title = $_GET['title'];

It's surprising how no one seem to have had this problem before. I've 
googled it already and all I've come up with are the zend source 
codes. I've also search the PHP mailing lists, several message 
boards, etc. Nothing.


One code I've seen gave me a clue that it might have only occurred 
since I'm using PHP 4.4.


My site has just been upgraded to this version. In the previous 
version (4.3.11), my site works just fine. Could this be a bug? If it 
is, how can I solve it at least until they've released a fixed for it?


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



[PHP] Re: User error handler must not modify error context

2005-09-19 Thread Noel
Actually, that's all of it aside from the function statement and the 
return statement.


function funcTitle ($title='') {
global $mywebsite;
if ($_POST['title']) $title = $_POST['title'];
elseif ($_GET['title']) $title = $_GET['title'];
elseif (!$title) $title = $mywebsite;
return ''.$title.'';
}

I don't see anything wrong with the code, do you? After all, the 
error does not occur if I try to comment out the user_error_handler() 
function. And also, this error didn't occur in the previous version. 
Nothing has been modified in the PHP codes when the PHP version has 
been upgraded to 4.4. Only after the upgrade did this error occurred.


08:50 AM 9/20/2005, Jasper Bryant-Greene...

It's hard to tell whether it's a bug in your code or a bug in PHP, 
with only 3 lines of your code to work on. Can you post the entire 
function of which that code is a part please?


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



[PHP] Re: User error handler must not modify error context (solved)

2005-09-20 Thread Noel
Why not top-post? It's much faster to read so I won't have to scroll 
down to read the message.


Michael Sims already solved my problem. But thanks for the help and 
to Robert also. :)


Jasper Bryant-Greene...

Please don't top-post. Sorry, I assumed that code was part of your 
error_handler. Can you please post your user_error_handler() function?


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



[PHP] fwrite() blank-line Quirk?

2002-12-21 Thread Noel Wade
Hi All,

Relatively new PHP coder (was in an MS / ASP shop before)...  I'm doing some
flat-file manipulation (please, spare me the database comments, I'm working
on it!), and I'm having to read strings out of one file and copy them into
another until a while() condition is satisfied.

The problem is, I seem to always end up with a blank line at the end of my
files (which then screws up later file-processing) - I'm assuming because of
the \n that fwrite() appends to the end of each string...

Is there a simple way to get rid of this blank line or somehow get fwrite()
to NOT put a newline on the end of a string?

Thanks in Advance,

--Noel Wade





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




[PHP] fgets() question?

2002-12-21 Thread Noel Wade
Okay, attacking my flat-file issues from the other end:

When you use $foo = fgets($fp_file);  it appears that a blank line ends up
looking exactly like a FALSE ("failed to read") return value...  Is there
any way to differentiate between an empty-string read (a blank line in a
flat-file) and a FALSE return from fgets() ??

Thanks a bunch,

--Noel




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




[PHP] Re: fgets() question?

2002-12-22 Thread Noel Wade
> A blank line should return the newline (\n or \r\n), according to
> http://www.php.net/manual/en/function.fgets.php. Also try using '===' (3 =
> signs) as the operator, which enforces type checking on a comparison).

Yes or no:

$foo == FALSE === 0;

???

Right now I'm just doing

if($foo)

And "\n" seems to equate to FALSE with this sort of conditional /
comparison...

Thanks, take care,

--Noel



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




[PHP] new to classes, need help

2002-12-24 Thread Noel Akins
I'm trying to get my head around php classes. I want to write a small php 
file (call it genericly uniquepagesomething.php) that will call the 
pagemaker.class.  For example Apples3.php that calls pagemaker.class. In 
pagemaker.class, it will look up page 3 of the topic apples from a table 
and get the text file. It will also look up the proper template to 
use.  pagemaker.class will then insert the text file into the template and 
print it out to the browser.

Here is what I have cobbled together so far from various things i've read.

- uniquepagesomething.php 

require("pagemaker.class");
$pagemaker = new pagemaker;
$pagemaker->find($findpage, $pagesomething);
$pagemaker->make("pagesomething");
?>


- pagemaker.class 

class pagemaker
 var $Host = ""; // Hostname of our MySQL server.
 var $Database = ""; // Logical database name on that server.
 var $User = ""; // User und Password for login.
 var $Password = "";

 var $Link_ID  = 0;  // Result of mysql_connect().
 var $Query_ID = 0;  // Result of most recent mysql_query().
 var $Record   = array();  // current mysql_fetch_array()-result.
 var $Row;   // current row number.

 var $Errno= 0;  // error state of query...
 var $Error= "";

 function find($findpage,$pagesomething) {
  $this->$findpage=$pagesomething;  //fix this to split the 
topic and page number
  $this->$Query_String="select tmplt, image, file, desc from 
pages where ";  //fix this too
  $this->connect();

  #   printf("Debug: query = %sn", $Query_String);

  $this->Query_ID = 
mysql_query($this->Query_String,$this->Link_ID);
  $this->Row   = 0;
  $this->Errno = mysql_errno();
  $this->Error = mysql_error();
  if (!$this->Query_ID) {
 $this->halt("Invalid SQL: ".$Query_String);
  }

  return $this->Query_ID;
 }
 function halt($msg) {
  printf("Database error: %s\n", $msg);
  printf("MySQL Error: %s (%s)\n",
  $this->Errno,
  $this->Error);
  die("Session halted.");
 }

 function connect() {
  if (0 == $this->Link_ID ) {
  $this->Link_ID=mysql_connect($this->Host, $this->User, 
$this->Password);
  if (!$this->Link_ID) {
 $this->halt("Link-ID == false, connect failed");
  }
  if (!mysql_query(sprintf("use 
%s",$this->Database),$this->Link_ID)) {
 $this->halt("cannot use database ".$this->Database);
  }
  }
 }
 find();
?>

Is this going anywhere in the right direction?
any comments are welcome
Thanks



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



[PHP] Passing Query_String or variables through multiple pages?

2003-01-05 Thread Noel Wade
Hi all,

I have an issue I'm hoping there's a simple answer for (I'm betting there
is):

I have a dynamic page where the user may click on a link - this link
processes their data and shows them a "result" page...

Then I want a variable (for a manual hypertext link) that contains the
original URL they were viewing.  The problem is, the original page / URL
needs a query string (i.e. "?key1=val1&key2=val2&key3=val3...").

So I have to somehow pass their original query string THROUGH the "result
page" via a GET, and without using a  (using a POST form I could do
it)...  I've looked at manually copying and "forwarding" each original
variable by including it in the URL for the "result page"; but I was hoping
for something more elegant and flexible...

Any thoughts or ideas?

Thanks a bunch in advance!  Take care,

--Noel




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




[PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Hi all,

So I have a page that processes information and then "echo"s out a redirect
that looks like this:



The thing is, there are some variables that I would love to pass in $_POST
or $HTTP_POST_VARS to the page referred to in "$url".

Is there any way to stuff this data into either of these globals so that the
"$url" page can access 'em?

Thanks a bunch!

--Noel




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




[PHP] Re: session not set, server configuration?

2003-01-09 Thread Noel Wade
James -

Don't know how you're working with Cookies and sessions for sure, but the
default / "easy" way to check for an established session is to put
"session_start();" at the top of every page that's going to access the
session variables.  That will check for an established/open session and make
the registered session variables accessible to the page.

Then a logical check is as simple as using "session_is_registered()" like
this:

if (session_is_registered("registered_variable_name"))
//do something here if the person has already registered their session
else
//session not registered!

Hope this helps!

Take care,

--Noel




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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Thanks - I understand that method; but I'm really looking for a way to pass
them without them being visible / mucking up the URL line with a buncha
stuff...

Take care,

--Noel



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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
This will work perfectly!  Actually, building a dynamic javascript function
and/or hidden form will allow me to collapse a couple of other redirect
systems on my site into one... Thanks a bunch!

--Noel

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can also build a form with hidden variables and use
>  to submit it. For javascript
> disabled browser put a
> "Continue" submit button






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




[PHP] Re: how to passing two dimension array

2003-01-10 Thread Noel Wade
You're missing string concatenation operators.  I use "echo" instead of
"print" - but here's how it should look with either:

echo "";

Explanation:  The \" makes the double-quote appear in the final HTML, then
you have to use a plain " to end the text string.  Then you use the .
concatenation operator, followed by your variable.  To add further text, use
another . operator, then " to open up the text string, then \" for the HTML
close-quote, then the > to close the HTML tag, then " to close out the echo
or print statement.  End with a ;

Let me know if that helps!

Take care,

--Noel


"Rizki Salamun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there..
>
> I have a problem when I want to passing two dimension varible. I made this
> variable from html form.
>
> like this:
>
>
> 
>  print "";
> ?>
>a
>b
>...
>...
> 
> 
>
> but when again I want to print the $vari[$i][$j, in the page2.php it
> seems doesnt recognize this variable.
>
>
> thanks
>
> -rizki-
>
>



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




[PHP] Re: how can I use an external 'template' file and still use PHP variables?

2003-01-10 Thread Noel Wade
I agree with Edwin on this one.

What's the <<< for??

Could it be you want to be doing this:

$templatestring = include("/pathto/email_template.php");

$message = "<<" tags
will be considered plain text.  Put another way: Even though the "include"
statement in the main document is ALREADY between PHP tags, the parser looks
for an opening PHP tag in the included file to find where to begin parsing -
anything before that opening tag is echo'ed out as plain text).

Hope this helps!

Take care,

--Noel


---
"Daevid Vincent" <[EMAIL PROTECTED]> wrote in message
006801c2b88d$69748a60$0801a8c0@telecom">news:006801c2b88d$69748a60$0801a8c0@telecom...
> I've posted this a few weeks ago with no response. I want to use an
> external
>
> $message = <<   include("/pathto/customer_email.php");
> HTMLMESSAGE;
>




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




[PHP] Session vars vs. POST/GET vars?

2003-01-11 Thread Noel Wade
Hi all,

So I have a session variable; but with register_globals active on the server
I'm hosted at (no way to turn it off), just checkng for "$varX" in my script
could retrieve the session variable, a GET variable with the same name, or a
POST variable with the same name - and as a security concern, someone could
use a GET request (http://somehost/mypage.php?varX=0) to spoof the script
into thinking that "varX" is the wrong value.

So, is there any way in a script to specify that I want to retrieve the
value stored in the registered session_variable("varX")??

Thanks,

--Noel




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




[PHP] Re: Session vars vs. POST/GET vars?

2003-01-11 Thread Noel Wade
Nevermind, just found the $HTTP_SESSION_VARS array...

Thanks anyways!  Take care,

--Noel

"Noel Wade" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> So I have a session variable; but with register_globals active on the
server
> I'm hosted at (no way to turn it off), just checkng for "$varX" in my
script
> could retrieve the session variable, a GET variable with the same name, or
a
> POST variable with the same name - and as a security concern, someone
could
> use a GET request (http://somehost/mypage.php?varX=0) to spoof the script
> into thinking that "varX" is the wrong value.
>
> So, is there any way in a script to specify that I want to retrieve the
> value stored in the registered session_variable("varX")??
>
> Thanks,
>
> --Noel
>
>
>



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




[PHP] sessions problem, need help

2003-02-19 Thread Noel Akins
Hello,
I'm new to sessions and I know a little php, but don't use it enough to 
remember it. I'm trying to use sessions for a couple of reasons. I will 
explain as i go along.

My index.html is this (www.loveobjects.com) <-not porn my host uses version 
4.0.6



<br>
<!--<br>
  var cWidth=0, cHeight=0; fsize=12;<br>
function clientSize() {<br>
  if( typeof( window.innerWidth ) == 'number' ) { //Non-IE<br>
cWidth = window.innerWidth;<br>
cHeight = window.innerHeight;<br>
  }<br>
  else {<br>
if( document.documentElement &&<br>
( document.documentElement.clientWidth || 
document.documentElement.clientHeight ) ) {//IE 6+ in 'standards 
compliant mode'<br>
  cWidth = document.documentElement.clientWidth;<br>
  cHeight = document.documentElement.clientHeight;<br>
}<br>
else {<br>
  if( document.body && ( document.body.clientWidth || 
document.body.clientHeight ) ) {   //IE 4 compatible<br>
 cWidth = document.body.clientWidth;<br>
 cHeight = document.body.clientHeight;<br>
  }<br>
}<br>
  }<br>
  location.replace('<a  href="http://www.loveobjects.com/test_1.php?w=">http://www.loveobjects.com/test_1.php?w=</a>'+cWidth+'&h='+cHeight+'&fSize='+fsize);<br>
}<br>
--><br>





You can see that it gets the client window size and sets a default font 
size, then redirects, sending along the vars in the url string.


The test_1.php looks like this.


session_start();
header("Cache-control: private");
$HTTP_SESSION_VARS['width'] =  $HTTP_GET_VARS['w'];
$HTTP_SESSION_VARS['height'] =  $HTTP_GET_VARS['h'];
$HTTP_SESSION_VARS['fontS'] =  $HTTP_GET_VARS['fSize'];
$HTTP_SESSION_VARS['fontC'] =  $HTTP_GET_VARS['cFont'];
$HTTP_SESSION_VARS['id'] =  session_id();
header("Location: 
http://www.loveobjects.com/test_2.php?id=".$HTTP_SESSION_VARS['id']);
?>

But, this gives me a 404.
I've tried to use a link instead of the header() such as:

print("this");

Which will create http://www.loveobjects.com/test_2.php?id=b5c93c1f165018cda39d0d751d27d368
but this gives me a 404 too. (The _ is there in test_2.php. in the above 
line. You just don't see it with the whole link underlined).

I don't want to pass along the client and font vars by means of the GET 
vars to test_2.php. I want them in the session vars. I want to be able to 
change the font size, or let the user change the font size. And I don't 
want a font size var hanging around in the url string. I also want to limit 
what info and be bookmarked. I also don't want to rely on cookies to send 
the session id and other stuff.

test_2.php looks like this:


session_start();
header("Cache-control: private");
require($_SERVER["DOCUMENT_ROOT"] . "Pagemaker.class");
$pagemaker = new Pagemaker;
$pagemaker->set_fontsize($HTTP_SESSION_VARS['fontC'],$HTTP_SESSION_VARS['FontC']);
$pagemaker->set_stdwidth($HTTP_SESSION_VARS['width']);
$pagemaker->set_stdheight($HTTP_SESSION_VARS['height']);
$pagemaker->find("test_1");
//print($pagemaker->Errno);
print($pagemaker->Error);
print($pagemaker->haltmsg);
print($pagemaker->contents);
?>

Pagemaker.class worked before I started wwith all this session stuff. (with 
different code ofcourse)

Please help. Any suggestions will be helpful.
Thanks
Noel




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



[PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Noel Wade
Hi all,

So I was under the impression that an HTML form "SELECT MULTIPLE" item would
return an array with all of the selected items.  This array can then be used
with any of the standard PHP array functions, yes?

I have 1 HTML page that seems to work fine...  However, another page that is
nearly identical is failing - giving me the following error:  "Wrong
datatype for second argument in call to in_array".  When I look at the
variable, it seems to ONLY contain a string - the first item the user
selected.

The only difference I can see is that the working SELECT MULTIPLE has
numerical values, and the dysfunctional one uses string values - but the
values ARE enclosed in quotation-marks... so I don't know why they're not
POSTing properly as an array.  Is this a known bug or issue?  Any thoughts
or solutions?

Thanks a bunch, take care,

--Noel



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



Re: [PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Noel Wade
Its the littlest things that kill ya  Thanks a ton!

As a side note, I definitely do NOT have the brackets on the working page -
so its an undefined "feature" (or bug) that numerical-value SELECT MULTIPLE
variables post as an array to PHP.

Take care, and thanks again!

--Noel

- Original Message -
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "Noel Wade" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 14, 2003 1:26 PM
Subject: Re: [PHP] SELECT MULTIPLE form variable?


> You need to name it formfield[], not formfield.
>
> Noel Wade wrote:
>
> >Hi all,
> >
> >So I was under the impression that an HTML form "SELECT MULTIPLE" item
would
> >return an array with all of the selected items.  This array can then be
used
> >with any of the standard PHP array functions, yes?
> >
> >I have 1 HTML page that seems to work fine...  However, another page that
is
> >nearly identical is failing - giving me the following error:  "Wrong
> >datatype for second argument in call to in_array".  When I look at the
> >variable, it seems to ONLY contain a string - the first item the user
> >selected.
> >
> >The only difference I can see is that the working SELECT MULTIPLE has
> >numerical values, and the dysfunctional one uses string values - but the
> >values ARE enclosed in quotation-marks... so I don't know why they're not
> >POSTing properly as an array.  Is this a known bug or issue?  Any
thoughts
> >or solutions?
> >
> >Thanks a bunch, take care,
> >
> >--Noel
> >
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>
>


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



Re: [PHP] Re: php editor?

2003-06-16 Thread Noel Wade
My favorite little gem is a shareware program called Code-Genie
(www.code-genie.com).  Its cheap, fast, a "slim" app, provides tons of
useful little features, and has TOTALLY user-configurable text-coloring.
You can specify a particular coloring scheme for each file extension, so it
automatically picks the scheme for the type of programming you're doing -
very handy!  Comes with schemes for all of the most common / simple
programming languages, plus plenty of user-made files for download, too!

It doesn't have any real debugging features, nor can it do fancy things like
track your custom object-functions and color them or present their
arguments - but for a quick, simple, helpful tool - its just perfect!

Take care,

--Noel



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



Re: [PHP] Re: PHP help/example for booking program

2003-06-16 Thread Noel Wade
Welcome, hope you enjoy PHP - its a great language!

My best suggestion is to check out the book "PHP and MySQL Web Development"
by Luke Welling and Laura Thomson - it provides you with all of the PHP &
MySQL fundamentals and good concepts for how to design something like that.
The book is aimed a little bit more at people who can already do some
programming; but you should pick it up to start with, and if it doesn't make
sense grab a smaller "beginner" book on programming and then come back to
"PHP & MySQL"

Good luck!  Take care,

--Noel


- Original Message -
From: "Giuliano" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 16, 2003 7:42 AM
Subject: [PHP] Re: PHP help/example for booking program


> Hi Other PHP Users,
>
> i am new PHP in the list; i am looking for some code example for a hotel
or
> residence booking program; can
> someone help me with good tips? some code?
>
> i thank you for every help, bye
>
> Giuliano
>
>
>
> --
> 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] Forms / Array Question...

2003-06-27 Thread Noel Wade
Hi All,

Quickie Question... Possibly a silly one; but it would make my life easier if it works!

I know that with a SELECT MULTIPLE, you have to use the convention: NAME="$varName[]" 
to get all of the responses into a nice neat array.  I'm wondering about the mechanism 
behind this - is it simply doing a behind-the-scenes "$varName[] = X;", "$varName[] = 
Y;", "$varName[] = Z;"  operation to dynamically generate the array?  (Note: this 
is not my main question - keep reading. :-P )

If so, then it would follow that it's also possible to do something like this:




...

And get a nice array with your text values.  Anyone know if this (A) works and (B) is 
not actually just some undefined behavior that's risky to use?  

Thanks!  Take care,

--Noel



[PHP] a text formating & cpu question

2001-01-18 Thread Noel Akins

Hello,
Question 1:
A long time ago, I started my first big project using php3 and MySQL that 
would return on a query a listing of info from the database that was 
displayed in the browser with nested tables. If a user really wanted to 
test the limits of the database, he/she could get back over 3000 
lines.  Being that html tables were being used to display the info, a large 
number of tables were being created, and would crash netscape.  I pretty 
much shelved this project for this reason.  I'm now working on a similar 
project that won't return so many lines, but I would like to be able to use 
something other than html tables to display the info in a neat manner.  Is 
there any php related things I could use to format a list in a 
browser  other than html tags? could someone point me in the right direction?

Question 2:
Is there a way for php to detect the cpu speed of a users computer?

Thank you


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




[PHP] where does database go at host

2001-01-23 Thread Noel Akins

I'm going to created a database with the use of a php/html page on my 
commercial host (forsite.net). I have yet to master the unix directory 
system so I don't want to play around looking for it. Does a database have 
to "live" in the MySQL directory, or can it be in my html web directory? 
How does it usually get set up? If it can be stored in my web directory, 
how do I get it there?
Thanks


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




[PHP] where is -> and <<< in the manual

2001-01-26 Thread Noel Akins

where is -> and <<< in the manual? I see -> used with vars and <<< with 
doc. I assume that they are operators of some kind, but didn't find them in 
the operators section of the manual. Are there any other items like these 
found in php4?
thanks


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




[PHP] Was I'm confused, figured it out

2001-01-26 Thread Noel Akins

parse lines right to left
thanks anyway


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




php-general@lists.php.net

2001-01-26 Thread Noel Akins

Ok, I'm reading the manual for the new php4 stuff. Now, I'm not new to php. 
I started with php/fi with a little script to add links to a database. I 
did a little work in php3. I just don't make enough php stuff to get a frim 
grip on everything. That is changing as I am building a second pc to serve 
as a dev box for php4. Here is my first question.

This was lifted from the Zend site from the php manual there.

To assign by reference, simply prepend an ampersand (&) to the beginning of 
the variable which is being assigned (the source variable). For instance, 
the following code snippet outputs 'My name is Bob' twice:


   What I don't see here is how this prints (echo) "My name is Bob". The 
way I see this is that $bar = &$foo; is a backwards assignment, so that 
when the script cycles through, it changes $foo from Bob to "My name is 
$bar", and, to my error prone thinking, it should print out "My name is My 
name is My name is...".

It would make sense to me if it were:

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




[PHP] sessions without cookies?

2001-01-26 Thread Noel Akins

Would there be any point in using php sessions if you aren't using cookies? 
You have to store login info anyway, why not just use a temp table to store 
transaction info and write to the database at the end of a session? From 
what I've read on sessions, you have to use cookies
thanks


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




[PHP] Your Internet Education!

2001-05-06 Thread Noel Hadfield

Learn about computers and the Internet and build a business while you are 
doing it.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Education

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] Your Internet Education!

2001-06-20 Thread Noel Hadfield

Take our course in computers and the Internet; and then we'll show you how 
to build a business with your new skills.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Education

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] Easy to copy MySQL table??

2001-06-25 Thread Ray Noel

Hi,

Is there any easy way to copy a "template" mysql table to enable data to 
processed in batches?
I would prefer to just copy a table rather than hard-code a table create 
query, if possible.

Regards
Ray



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




[PHP] Income on the Net!

2001-07-09 Thread Noel Hadfield

Here is an opportunity that you can take up FREE. If you join as an 
affiliate, we'll teach you how to build a profitable business on the 
Internet, using our system to create an income stream and earn income 
globally, 24 hours a day.

Don't let this opportunity slip past you - our organization is already well 
over 1 million strong and growing at around 6,000 each day! Join us and 
let's work together to get a share of all those members.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Opportunity

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] Income on the Net!

2001-07-16 Thread Noel Hadfield

Here is an opportunity that you can take up FREE. If you join as an 
affiliate, we'll teach you how to build a profitable business on the 
Internet, using our system to create an income stream and earn income 
globally, 24 hours a day.

Don't let this opportunity slip past you - our organization is already well 
over 1 million strong and growing at around 6,000 each day! Join us and 
let's work together to get a share of all those members.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Opportunity

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] Income on the Net!

2001-08-15 Thread Noel Hadfield

Here is an opportunity that you can take up FREE. If you join as an 
affiliate, we'll teach you how to build a profitable business on the 
Internet, using our system to create an income stream and earn income 
globally, 24 hours a day.

Don't let this opportunity slip past you - our organization is already well 
over 2 million strong and growing at around 6,000 each day! Join us and 
let's work together to get a share of all those members.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Opportunity

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] Income on the Net!

2001-09-17 Thread Noel Hadfield

Here is an opportunity that you can take up FREE. If you join as an 
affiliate, we'll teach you how to build a profitable business on the 
Internet, using our system to create an income stream and earn income 
globally, 24 hours a day.

Don't let this opportunity slip past you - our organization is now more 
than three million strong and growing at around 6,000 each day! Join us and 
let's work together to get a share of all those members.

Just hit:

mailto:[EMAIL PROTECTED]?Subject=Opportunity

To be removed from this list, hit:

mailto:[EMAIL PROTECTED]?Subject=Remove

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




[PHP] vote package

2009-08-27 Thread Noel Butler
Hi All,
Can someone suggest a reputable vote script in php that uses mysql,
doesnt need to be fancy, just have a decent reputation for not
being exloited :) also tracking of users via IP to prevent ghost
voting...WE are using php 5.3.0, the old one fails under that, adn it
had known issues so we dumped it...

TIA




RE: [PHP] vote package

2009-08-28 Thread Noel Butler
On Fri, 2009-08-28 at 08:33 -0400, Bob McConnell wrote:


> 
> Forging IP addresses is actually quite simple. VMs do it all the time
> when bridged to the real NIC. There are also some projects on Source
> Forge designed to load test HTTP servers that do similar things. I have
> an application I wrote for testing that can emulate an entire class B
> subnet full of computers. All it takes is a little digging around on
> Google, a FreeBSD system installed in a VM and a little knowledge of the
> local network topology. In my case I have several blocks of addresses
> allocated by the local administrator for this test bed.
> 
> Bob McConnell


sorry if this explodes your bubble, but you dont need freebsd to do
it :)



[PHP] confused about getenv arguements

2001-01-27 Thread Noel Akins

Hello,
I found this script at zend. Please note the getenv("HTTP_REFFERER").

http://www.odey.com.
Turn the refererring URL into a variable */
$from = getenv("HTTP_REFERER");

/* Check to see if the URL in the variable is a valid referrer. Add the 
page URL which you would like people to arrive from here. */
if ($from != "http://www.yoursite.com/validpage.htm")

/* If the URL is valid, page loads now */

/* If URL is invalid the following error message and proper link appears, 
enter your custom error message and a hyperlink to the valid URL you 
entered above here*/
{print(" Sorry you have tried to link to a page which does not accept 
visitors directly. 
http://www.yoursite.com/validpage.htm>CLICK HERE to enter");

/* Prevent the rest of the page from loading */
exit;}

?>

I went to check getenv in the php manual, and it said "You can see a list 
of all the environmental variables by using phpinfo(). You can find out 
what many of them mean by taking a look at the CGI specification, 
specifically the page on environmental variables.

I made a php script phpinfo(INFO_ALL) to return everything for my host and 
did not see HTTP_REFFERER, not did I see any of the other args that were in 
the comments on the getenv page.
I looked at the linked cgi pages and didn't find anything there either.

If by not seeing these HTTP_like variables in my phpinfo, does that mean 
they are unavailable to me to use? Do they have to be setup during the 
install of php/apache?
Where can I get more info on these getenv args/vars?

Thanks


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




[PHP] disabling page caching, yes or no

2001-01-30 Thread Noel Akins

Hello,
I'm trying to build the first page to a database driven website.  The first 
thing I'm trying to do is detect if cookies are enabled on the users 
browser, and then, via a header(location: mysite.php), redirect the user to 
either a cookie supported page, or cookie unsupported page.  I will use 
sessions, in some form or another on each.
My concern is that this first page, or any following page, not be cached. 
In the #php channel,  it was said, or I understood from what was said, that 
by default, php pages aren't cached.  It was also mentioned that I should 
make each url unique by using time() or uid of some kind.  In the php 
manual, under Header(), it listed four ways to disable caching. they are:

header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always 
modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0

Should I be concerned about page caching? If so, should I use one of the 
header() statements, a combination of header() statements? Can I use a 
combination of header() statements?  The first page can't have a unique 
url.  The following one would be unique by use of sessions I would think, 
but that may not keep them from being cached, would it?
Any direction would be of great help to me.
Thanks


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




[PHP] Income on the Net!

2001-02-18 Thread Noel Hadfield

I wanted to let you know about a new opportunity that you can take up FREE. 
If you join as an affiliate, we'll teach you how to build a profitable 
business on the Internet; how to use our system to create an income stream; 
and how to earn income globally, 24 hours a day. 

Don't let this opportunity slip past you - we expect our organization to be 
at least 1 million-strong within less than two years! Join us and let's 
work together to get a share of all those members.

Just hit Reply and send a blank message with "Opportunity" on the Subject 
line.

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




[PHP] WEALTH ON THE WEB!

2001-02-20 Thread Noel Hadfield

Get a FREE copy of the exciting 48-page booklet "Inside Secrets to Wealth 
on the Web".

Just hit Reply and send a blank message with "Inside Secrets" on the 
Subject line.

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




[PHP] $PATH_INFO not working

2004-04-23 Thread Noel da Costa
Hi,

Anyone know what might stop the $PATH_INFO variable from working?  I
developed a nav system using this which works on the test server, but not on
the live server. I'm guessing this is something to do with the way PHP
(4.2.2)  and Apache (2.0) were compiled on the live server (I've posted that
question on php.install), but what I'm wondering is...

Is there perhaps a code fix/work-around I could apply in my scripts to
replace the $PATH_INFO with something that achieves the same effect, without
having to redisign my entire nav system.

Thanks,
Noel

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



[PHP] Re: $PATH_INFO not working

2004-04-23 Thread Noel da Costa
Thanks for the thought...

I was using getenv('PATH_INFO'). I tried  $_SERVER['PATH_INFO'], but it
didn't help.

PATH_INFO is working, ie being filled, but Apache doesn't seem to know what
to do with it. So if my link has a URL: "index.php/section/login" it tries
to find a literal folder with that path, instead of simply passing the
"/section/login" bit to the PATHINFO variable within the index.php file.

This is the error msg: "
Object not found!
  The requested URL was not found on this server. The link on the referring
page seems to be wrong or outdated. Please inform the author of that page
about the error.
  If you think this is a server error, please contact the webmaster
Error 404
  192.9.200.182
  Fri Apr 23 12:35:45 2004
  Apache/2.0.40 (Red Hat Linux) "

I'm sure it's something to do with config, because we just re-compiled PHP
on the test server... and now my script won't run on the test server too!!

Noel



"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Noel Da Costa" <[EMAIL PROTECTED]>
>
> Hi Noel,
>
> try accesing it via $_SERVER['PATH_INFO'].
>
> Regards, Torsten

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