I ran into a strange problem this morning. Suddenly I am getting an
error that str_word_count is undefined, even though it has been working
for the past few months. Anyone know why this may be? Nothing in the my
code has changed at all.
I did phpinfo() to check the server and it is running 4.2.
I would recommend using your .htaccess file, or ini_set, or something
else to set your include_path variable
Thanks Joel, that worked nicely.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.
at matter. This is doing exactly what you are
asking it to do.
-Rasmus
On Fri, 6 Jun 2003, Steven Walker wrote:
Hello,
I have found troubling behavior using include() that looks like a bug.
When I specify an include file by a full path name versus a relative
path, PHP acts as though it has includ
Hello,
I have found troubling behavior using include() that looks like a bug.
When I specify an include file by a full path name versus a relative
path, PHP acts as though it has included the file, but variable and
constant definitions in the include file are not coming through. My
server is r
Can someone please explain to me when is a class useful over a set of
functions?
Almost always. Object oriented programming offers many many advantages
(that I cannot get into depth on here). There are a few exceptions
where you would not use classes, such as utility functions like max()
and mi
Hi,
I was wondering if there is a way in PHP to define namespaces (as in
C++ or some similar scope classification technique). I didn't find any
related documentation. Is it possible?
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.
I am experiencing some very odd behavior in my classes that I don't
know how to work around. Apparently, PHP is getting my variables
'confused' with each other and assigning/returning the wrong data.
My class design is as follows:
class TestClass
{
var $TestLog;
var $Data1;
quot;HTTP/1.1" for me and probably "HTTPS..." for https connections... also
> if
> you're using apache I think it sets some SSL_* variables that exist only
> when using https.
>
> On Fri, 17 May 2002, Steven Walker wrote:
>
>> Hi,
>>
>> I'm t
Hi,
I'm trying to find a way to determine whether a clients browser current
url is prefixed by http or https. However, I cannot seem to find the
right predefined variable to give me this information. Basically, I want
the same thing that HTTP_REFERER provides, but for the _current_ page.
Any
Hi,
I couldn't find this in the documentation or on marc... Is there a way
to access a variable by name using a string value? For example:
$myvariable = 10;
$stringdata = "myvariable";
$[$stringdata] == $myvariable;
Obviously the last line is invalid, but is there a way to do this? I
know abo
ot it working.
>
> miguel
>
> On Tue, 7 May 2002, Steven Walker wrote:
>
>> Miguel,
>>
>> That is very nice of you! I found the zip class on the Zend website:
>> http://www.zend.com/codex.php?id=696&single=1
>>
>> and here is an article p
Hi,
Does anyone know a way to download multiple files with a php script? I
have 26 software products that can be purchased individually and I want
to make the download process easier. I have looked into dynamically
creating zip files, but it is problematic for Mac users (which account
for a l
Hi,
I have PHP automated emails sent from my website. Does anybody know a
good way to filter returned mail? What I want to do is extract the bad
email addresses from returned mail and delete them from my database.
For now I have the return path sent to me, and I manually weed the bad
ones out
Is there a string length limitation to crypt()? It generates the same
result for different input strings. I'm using crypt to store access
codes that are generated using uniqid. For example, if I do the
following:
$encrypted = crypt("3c8d15c9cfe5a", "xx");
echo $encrytped;
Jeff,
I just had this problem!
Using $PHP_SELF did not work with Netscape 4.7 for some reason. I was
using it in form submissions and kept getting the error 'Method Not
Allowed'. My fix was simple, I just hard coded the action url since.
If you really need $PHP_SELF, I don't know what the fix
Hi,
I'm having trouble supporting Internet Explorer 5.5 and earlier versions
in a PHP download script. People are reporting that the file comes out
as 'download.htm'.
Here is the code in my download.php:
$len = filesize($file);
header("Content-type: application
Hello,
I'm having trouble getting the referring url. I have tried:
$HTTP_REFERER
getenv(HTTP_REFERER);
$_SERVER[HTTP_REFERER];
... but they are all blank.
The referring page has a meta http-equiv=Refresh header. If the user
waits for the page to automatically redirect, t
To whom it may concern,
I recently had an ordeal trying to get PHP generated email to work using
with qmail. After switching web servers, suddenly my automated emails
were not working, coming out blank or with mime attachments.
If anybody runs into the problem, the fix is quite simple (but obs
If you -could- use Javascript, it looks something like this:
document.formName.textfieldName.focus()
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Sunday, March 3, 2002, at 12:55 PM, Markas wrote:
> Hi, PHP will do NOTHING with cursor position in your page,
]
On Sunday, March 3, 2002, at 09:37 AM, Nick Wilson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Steven Walker declared
>> Nick,
>>
>> If I understand the problem correctly, the form reset button doesn't
>> work when th
Hello,
I've just moved my website to a new server and sendmail is not working
the same. My email messages (sent via mail()) are coming out blank or
with mime attachments. To verify my sanity, I tested this same script on
the old server and it came through fine. The new server seems to like
on
Nick,
If I understand the problem correctly, the form reset button doesn't
work when the form is prefilled with POST data.
To overcome this, I created reset button of type='submit' value='Reset'.
When loading the form page I test to see if submit=='Reset' or 'Submit'.
If it equals 'Reset', then
James,
Look into stripslashes():
http://www.php.net/manual/en/function.stripslashes.php
and htmlspecialchars():
http://www.php.net/manual/en/function.htmlspecialchars.php
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Wednesday, February 27, 2002, at
It may be able to store 8MB, but each line can only hold 1024
characters. I ran into this using a string variable to store the message
body of an HTML email. If I did not put a '\n' at the end of each line,
I would get random '!' placed through the sent email.
Steven J. Walker
Walker Effects
w
, Martin Towell wrote:
> it's to do with the length of a line - I think it's 1024 - if a lines
> longer
> than that, an ! is put there and a new line is made
>
> Martin
>
> -----Original Message-
> From: Steven Walker [mailto:[EMAIL PROTECTED]]
> Sent: Mond
Dear Batara,
There are global variables that serve this purpose. You must have
register_globals turned on:
http://www.php.net/manual/en/language.variables.predefined.php
$_POST
An associative array of variables passed to the current script via the
HTTP POST method. Automatically global in any
Try:
SITE CHMOD 666 filename
Also be sure that the file name in PHP matches the exact file name on
disk.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Monday, February 25, 2002, at 12:36 AM, Sven Jacobs wrote:
> Hey
>
> How can I create files with php, I've tried
Hi,
Has anybody every had problems with random characters showing up in HTML
email messages?
I've set up an auto-responding email system for product purchasing and
registration. The system sends multipart HTML and plain text messages
using mail(). However, exclamation points are showing up in
g the dates in -MM-DD format and
> strtotime is returning the proper timestamps. I'm curious how can you
> say it's a problem with the dates when the if statement comparing the
> same expression as the while loop works properly?
>
>
>
> On Sun, 2002-02-24 at 13:09,
time
trying to fix a problem that occurs 10% (or less) of the time ;)
Thanks for the Zend referral. I'll give it a try.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Sunday, February 24, 2002, at 11:31 AM, Michael Kimsal wrote:
> Steven Walker wrote:
>> Do
Does anybody know any good ways (or available code) for verifying email
addresses?
Checking syntax is not enough.. I'd like to actually be able to test
whether the email address exists.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http
Jeff,
The problem is most likely with incrementing $event_data. It's hard to
say without seeing the rest of the code.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
> I have a problem while loop that isn't terminating when it's supposed
> to. I can't figure out what t
I personally prefer voting mechanisms that display how many votes have
been cast. If you keep the thumbs_up separate from thumbs_down, you can
figure the total number of votes. Otherwise, you will not be able to
know whether the author is *really* average or just never voted for.
Steven J. Wal
Also, for adding items onto an array use array_push()
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Friday, February 22, 2002, at 07:41 PM, Jim Winstead wrote:
> Jtjohnston <[EMAIL PROTECTED]> wrote:
>> Where/How do I start in building a new array? ".=" doesn't wor
on the IP list)
> can view content... and I wanted to make sure that bots couldn't spoof
> their IP and look like one of the human IP's.
>
> make sense?
>
> thanks,
> Sean
>
> -Original Message-
> From: Steven Walker [mailto:[EMAIL PROTECTED]]
>
I don't know too much about this, but IP checking is not a reliable way
of identification anyway. Depending on how people connect to the
internet, some people will have different IPs every time. Since I use a
cable modem, my IP address rarely changes (if ever) so I use it as a
safety net to pr
Phillip,
I had the same problem. It's even worse in IE5 since no error was
displayed, just an empty form. To circumvent this, I put PHP controls
for navigating. To go back, a button called 'modify' resubmits the data
to the form page. On my site, if the user clicks the back button, they
get h
This may be a nl2br() problem. If you are setting \n as your newline
character, it probably needs to be if your just echoing it.
Depending on where it ultimately gets displayed, you'll want one or the
other. For example, sending an email message you want \n.
Steven J. Walker
Walker Effects
ww
How about wordwrap()?
http://www.php.net/manual/en/function.wordwrap.php
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Wednesday, February 20, 2002, at 06:02 PM, Michael P. Carel wrote:
> Hi there,
>
> I have here a problem regarding how to truncate the data that w
John,
You could create a function to do this. Just think of it in small steps.
You can use the string replace function to replace certain parts with
other characters, or nothing at all. For example:
$data = "Wilson; Hope,(i) Alec Derwent; King,(i) Bruce; James,(i)
Henry;";
$new_data = str_rep
Thanks for the replies.. one of these methods should work. I'm not
targeting the general public, so it's ok my site requires a modern
browser. Web development sure would a lot more fun without all the
compatibility issues!!! ;P
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTE
Is there a way to regular hyperlinked text to submit a form?
For example, rather than having a button that says [Login], I just want
underlined text: Login
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
What is the difference between $_SERVER and getenv()? Why should one be
more reliable/better than the other?
> Better: avoid globals and use $_SERVER['REMOTE_ADDR'].
Sorry, if I'm asking you to repeat yourself... the documentation doesn't
relate the two.
Steven J. Walker
Walker Effects
www.wa
Does anybody know why the predefined variable $REMOTE_ADDR would be
null, while getenv("REMOTE_ADDR") works fine?
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Brandon,
There are a few things about cookies that are not completely. I may be
wrong about this, but this is what I've found:
When a cookie is set, it must be passed before any other headers or
tags. But the cookie is not actually available to the page it was set
on. If the user reloads th
Does anybody have experience using gzdoc? I can't find much information
about it, and was just wondering if it is even worth the effort. For
anyone interested, here is the url I found it at:
http://php.weblogs.com/http_compression
Steven J. Walker
Walker Effects
www.walkereffects.com
[E
You can convert the time into seconds using mktime(), subtract one from
the other, and then reformat it using gmstrftime:
//int mktime ( int hour, int minute, int second, int month, int day, int
year [, int is_dst])
//string gmstrftime ( string format [, int timestamp])
";
echo "$time2"
com
[EMAIL PROTECTED]
On Tuesday, February 19, 2002, at 02:08 PM, Nick Wilson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Steven Walker declared
>> Can someone tell me where to find documentation on defining mail
>> headers
>> and
Can someone tell me where to find documentation on defining mail headers
and formatting? I've been to faqs.org, but was hoping to find something
a bit more friendly.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To u
ruary 19, 2002, at 11:07 AM, Nick Wilson wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Steven Walker declared
>> Does anyone know how line numbers are figured? I get errors like the
>> following:
>>
>> Parse error: parse error
Does anyone know how line numbers are figured? I get errors like the
following:
Parse error: parse error in
/home/sites/site104/users/walker/web/admin/_fileutils.php on line 74
Is PHP preprocessing the code to remove comments and white space? The
larger my code file, the more inaccurate the p
Here is a good explanation, in laymen's terms, of intellectual property
laws:
'An Intellectual Property Law Primer for Multimedia and Web Developers'
http://www.laderapress.com/lib/laderapress/primer.html
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
O
Thanks for the input. I just replaced time() with uniqid(""), and I
think that will work great.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Monday, February 18, 2002, at 01:38 PM, Lars Torben Wilson wrote:
> On Mon, 2002-02-18 at 13:14, Steven
Is it safe to use time() to generate a unique id number?
My thinking is that the call to the server will take enough time that no
two users will get the same time stamp (although they may be very
close). Even though the likelyhood of two users entering at the same
time is very slim, I don't
Here's what I found:
This does not work:
> header("Location: http://www.google.com/";, "5");
> That would redirect you to www.google.com in 5 seconds.
According to the documentation, the second param is bool replace, for
replacing header information.
This does work:
http://www.example.com/";>
Is there way to have a page automatically redirect the user to another
page, but with a timed delay?
I'm working on a purchasing system. After a successful purchase, a thank
you page is shown, and then I want to take the user to a download page a
few seconds afterward.
Thanks!
Steven J. Wal
Yeah, for buttons (radio/checkboxes) I had to put an if statement on
each one:
>
unformatted
>
You're right... it's not as easy.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To un
PROTECTED]
On Sunday, February 17, 2002, at 03:42 PM, Ken wrote:
>
>>> -Original Message-
>>> From: Steven Walker [mailto:[EMAIL PROTECTED]]
>>>
>>> I created one php page that both displays the form and validates the
>>> input. When the use
Jason,
I just finished one of my form pages, and I'm really happy with how it
turned out.
I created one php page that both displays the form and validates the
input. When the user hits the submit button, it submits the data to
itself. If anything is missing from the page, the form is reshown
Dear Kunal,
I don't know of any papers... I'd be interested in what you find.
In my experience, 'modular coding' is entirely a process of evolution.
It's impossible to sit down and design software on paper. Every piece of
code I write is under constant evaluation. Each time a weakness is
expo
Ben,
I've been dealing with this problem recently. The solution I found works
great in my case... the data processing page is the same as the form
page.
When the page is loaded it tests for post data. If no data is available
(ie !isset($name)), then the form will be displayed. When the user
How assured can I be that people will NOT be able to view my php code?
I'm creating an e-commerce site that will contain sensitive information
and algorithms. I want to to take every precaution possible to protect
that data and code.
One concern in particular is the ability to view the content
On Thursday, February 14, 2002, at 11:06 AM, Andrey Hristov wrote:
> Maybe you can put a small iframe in the HTML which will refresh on some
> basis (3secs for example), and in the HTML of this
> html you do the popup - window() or alert(). what you choose. the
> message which is sent(from th
I don't understand what you are trying to do...
If you need to verify whether the page has already been submitted to
itself, you can test any of the form variables using isset(). For
example:
";
echo "";
echo "";
}
?>
You can also pass the data back int
You can also use the strtr() function:
$new_data = strtr($data, "'", "`");// replaces ' with `
Also keep in mind that you can use the chr($number) to return special
ascii characters.
Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]
On Thursday, February 14, 2002,
EMAIL PROTECTED]
On Wednesday, February 13, 2002, at 02:05 PM, Christopher William
Wesley wrote:
> On Wed, 13 Feb 2002, Steven Walker wrote:
>
>>
>>
>> >
>>
>>
>> In the browser, the name field is only filled with "Steven", and drops
&
Hi,
I'm having trouble setting the value of form elements using variable
values. For example:
>
In the browser, the name field is only filled with "Steven", and drops
off everything after the space. If I echo $name outside of the form it
prints fine.
Any help would be really appr
Jason,
If I understand your question, you want to display the contents of a
variable to screen? Try this:
>
>
>
>
>
>$test_variable = "this is a test";
> echo "Here is what it says: $test_variable";
> ?>
>
>
Also note that you do not need to use the PHP tags twice:
Hi,
I'm having some problems with form data disappearing and wondered if
anyone has experience with this.
On a secure server I'm using PHP to handle form data to collect personal
information. If data is missing or incorrect, the user is alerted to 'go
back'... but upon going back in history,
69 matches
Mail list logo