I have a very simple DOM test set up which is failing. Environment is
apacie 1.3.x, WIN xp, PHP 5.1.2 ; DOM seetings outlined in phpinfo()
indicate various DOM/XML support is enabled.
Failing php is:
?php
$dom = new DOMDocument('1.0', 'iso-8859-1');
echo $dom-saveXML();
?
which results in:
The
I need to check that user input text is less than 300 characters
long. How?
if (strlen($_POST['input']) 300) { ...
You may want to also apply trim() to the input text to get rid of
extraneous white space at the beginning and end of the input.
Larry
--
PHP General Mailing List (http
available mods.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
simple. All the built in widgets and wizards help and the form
validation tools are really nice.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sort of
order, you should add another column or table that manages that. But
leave the primary key alone.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
almost positive about that.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
not use Sites in the URL, as
the Mac is already setup to redirect ~myname to the user's Sites
directory.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and only if the
array's index is a string.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
probable replies...
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
php.ini file (the one indicated when you run phpinfo())?
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
set your browser to prompt you when a cookie is
sent and, if so, what happens?
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
which you may not have run across before.
Hope that helps,
larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and the class will be available
again. It is a credit-earning course. The URL is http://
explore.berkeley.edu/UCExt/courseview.asp?
secid=426value=relatedaction=Internet
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yes, tested and verified. It was the accelerator. They have multiple
binaries, one for each version of PHP. Matching the new binary to the
new version of PHP solved this problem.
Thanks again.
Larry
On Tue, 2005-08-23 at 20:35, Larry Brown wrote:
Sorry, that last one went out without
On Tue, 2005-08-23 at 05:30, Ford, Mike wrote:
-Original Message-
From: Larry Brown
To: php
Sent: 23/08/05 02:28
Subject: [PHP] foreach loop changed after 4.3 - 4.4 upgrade
I had a foreach loop working on an array as such:
$multiarray = array(array('person','person'),array
Sorry, that last one went out without a comment. I think this is most
likely the cause. I haven't dug back into it yet to verify, but it
makes the most sense.
Thanks everyone...
Larry
On Tue, 2005-08-23 at 05:30, Ford, Mike wrote:
-Original Message-
From: Larry Brown
To: php
Sent
I had a foreach loop working on an array as such:
$multiarray = array(array('person','person'),array('another','another'))
the array was put through
foreach($multiarray as $subArray){
do something with array
}
on each loop I would see $subArray= array([0] = 'person',[1] = 'person')
and then
I found that the only way to get the function to behave is to add the
key...
foreach($multiarray as $key=$subArray)
Now it displays as it previously did where $subArray is concerned. Is
there something I'm missing here? Was I the only person not using
keys?
On Mon, 2005-08-22 at 21:28, Larry
).
Thanks,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I might have asked this already but I am still ignorent ;-)
How to check if a same name file already exists in a upload directory
when
uploading new file?
Use the appropriately named file_exists() function.
L.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
it shows that both of these bugs were fixed in the 4.3.10 release.
But still the tests fail?
Are the bugs fixed and the test case hasn't been updated?
My PHP app relies heavily on round().
Any insight into this issue is much appreciated.
Thanks,
Larry
Please can someone tell me how you pass arrays between PHP pages.
$var = serialize($testArray);
echo INPUT NAME = \kcompany[]\ TYPE = \hidden\ VALUE=\$var\;
Then unserialize the variable on the receiving page.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
% threshold, use
the IN BOOLEAN MODE feature. Keep in mind, though, that in your case
any search will return either 0 or 700 results.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
MODE was added in version 4.0.1 not 4.1, for what it's worth.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/^-/
give me a hit? Could someone throw me a bone here?
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
,
DW probably has the ability to open and edit remote files. You know
what would be a good way to find out for certain? Check out a DW
reference or open the application.
Ninth, there's is no number nine.
Tenth, again, this isn't really a PHP question.
Larry
--
PHP General Mailing List (http
Hi,
who can give me a solution or at least a hint for the following problem:
I have to get an URL parameter with an fsockopen connection.
I can connect with fsockopen an given link and get back this link with
an URL parameter cnr=xx
Who can I do this?
And who can I read this URL parameter?
Hi,
who can give me a solution or at least a hint for the following problem:
I have to get an URL parameter via fsockopen connection.
I shall connect with fsockopen to a given link and get back this link
with an URL parameter cnr=xx
Who can I do this?
And who can I read this URL parameter?
that a question was phrased properly, wouldn't it be better for
everyone if you just didn't respond? It'd certainly be easier.
Oy vay!
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Guys, this is trivial. It takes the same effort to provide the answer
to
whoever this guy was, than to lecture him on how to think.
Teach a person to fish ...
That's a good and true adage and certainly a philosophy to be put forth
by this list. But, the question is, does an answer of Yes teach a
if i have for example this variable
$name = John;
how can i echo the first letter only so the result on the browser will
be J
echo $name[0];
You could also use the substr() function.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm sure this is easy and I'll feel silly when I see how it's done,
but, my mnd is a blank,
this structure prints out a table with a new row for each item
table
?
While ( $results = mysql_fetch_array($pointer)) {
print trtd $results[1] /td/tr ;
}
?
Is there any way of getting the clients screenheight in PHP? (or do I
have
to do it in Javascript)
You have to do it with JavaScript.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
).
You'll need to run separate INSERT queries, I suspect. If one query
relies upon a primary key created by the other, make use of the
mysql_insert_id() function.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of this is in the MySQL manual, of course.
Larry
PS Technically speaking, this question would have been more appropriate
on a MySQL list (or the PHP-DB list).
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a better choice,
though (IMHO).
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
could be wrong on that.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
corrections.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is there a function that gets the screen resolution of the user?
you can also reply directly to me... [EMAIL PROTECTED]
No, you cannot get the screen resolution using PHP. You must use
JavaScript.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
that helps anyone.
Using PHP you can neither find the screen resolution nor resize the
browser window. Both must be accomplished using JavaScript.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
that it
recognizes function names and such.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What is the best way to determine if a variable is empty?
I have a feeling there is a better way than the way I'm doing it now...
if ($variable == )
You could try the empty() or isset() functions, depending upon exactly
what you're wanting to test. See the manual for descriptions of both.
Larry
How do I get an xml tag to work with a php script?
?xml version=1.0?
php is trying to parse that.
Either turn off the Short Tags setting in your php.ini file or have PHP
echo out that line.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
globals and addresses new additions
in PHP 5 (as well as those things in PHP 4.3.x). It still doesn't have
quizzes or exercises, though.
Best wishes,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
();?
ob_end_clean()
For future reference, you should normally reply to the entire PHP list,
not just to the person replying to your message. That way you're not
imposing upon a person trying to help and you're not waiting for that
one person to respond.
Larry
--
PHP General Mailing List (http://www.php.net
directly as example.com/file.pdf.
I've seen cases where extra buffer content gets added to the downloaded
file. The problem was fixed by deleting any existing buffer before
sending the file to the client. Not sure that will solve the problem
but it's worth a shot.
Larry
--
PHP General Mailing List
to you.
Thanks Larry, but how do i save my php files to http://localhost? I
don't understand if this is a
subdirectory in apache or not.
You don't mention your OS but I assume it's Windows. I forget the
details and it depends upon your installation of Apache but you'll want
to save your files
is a different thing). Also, constants must be set as
scalar values. PHP doesn't support function-like macros as you might
have seen in the C preprocessor.
This is all in the PHP manual, under define() and constants.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
possible you have an error which is causing the blank screen.
- If all else fails, run a simple phpinfo() script:
?php
phpinfo();
?
to test your PHP installation.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of a suitable search term
I think pagination might be the term you're looking for. I'm pretty
sure there's a PEAR class which will help with this or you can check
PHPBuilder.com or Zend.com for articles on the subject.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
how can i retrieve the last day of the month?
like 31 - Jul, 30 - Jun , 28 - Feb
?php
$month = 8;
$year = 2003;
$lastdayofmonth = mktime(12,0,0,$month+1,0,$year);
?
You could also use the date() function with the t parameter. Of course,
that also requires a timestamp...
Larry
--
PHP General
the query result when you should be printing
the fetched information like so
echo $row['UserFirstName'];
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I wonder why my website runs smooth in PHP 4.1.1 but it does not in
4.3.7.
Without knowing any relevant details at all, I would suggest that the
settings are different between the two servers, particularly
register_globals and magic_quotes.
Larry
--
PHP General Mailing List (http://www.php.net
restart the Web server
after changing the php.ini file (as another responder already pointed
out).
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I would highly recommend pdf. I use it for different reports. I use
pdflib which my employer has gratiously afforded; however, I believe
there is an open source version. I don't know how well it works, but
pdflib creates some really attractive results.
Larry.
On Sun, 2004-06-20 at 19:33
im posting a form to itself... and im wondering if there is any
way to clear the post data from the page after if have dealt with it?
$_POST = array();
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on or about line 2 of ListClientInfo.php is sending data to
the Web browser. This could be HTML, plain text, or blank spaces. Get
rid of that and you'll get rid of the warnings.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can anyone point me to an existing script or tutorial to learn this?
I'm fairly sure there's a tutorial at PHPBuilder.com or Zend.com. Or
you can check the PEAR modules for code (I know there are database to
Excel classes).
If all else fails, Google's always helpful.
Larry
--
PHP General
Thanks all makes sense, but, if I add this:
?php
echo($_SERVER['HTTP_REFERRER']);
?
I don't get anything back when the page is called?
Yes, that can happen, which is why I said it wasn't perfect. I think
using some sort of form to go through is the better option.
Larry
--
PHP General Mailing
.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
settings of
the server. However, if you use isset() you won't see notices
regardless.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sounds like a problem for the maintainers of the spam blocking software?
You can't correct the problem with the headers if you don't know what the
spam software is objecting to. It may be objecting to the fact that the
source is 127.0.0.1?
-Original Message-
From: Rick [mailto:[EMAIL
That works for me...
$testVal = this is the ./command;
if(preg_match(/\.\//i, $testVal))
{
echo hello;
}
This printed hello, then I removed the slash and it did not match and did
not print hello. Sounds like it is a logic problem, or the variable is not
arriving as you expected.
I have an unusual situation where I have to communicate with an MS based
soap server. They have named one of their variables with a name leading
with a 1 such as 1variable. Nusoap loads the variable descriptions from the
wsdl document and compares the variable names I am trying to send with the
to PHP using cookies, forms, etc.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In the last pair of examples where it fails, you know you are first
assigning the value of $Data['ID'] to the $_SESSION['CategoryID'] and the
over-writing that value with the value of intval($Data['ID'])? Why are you
assigning $Data['ID'] to it if you are going to overwrite it? If those
other
the standard
and then start to charge. I'm guessing that is why a lot of the older links
no longer exist.
http://wavendon.dsdata.co.uk/axis/services/WhoisData?wsdl
responded to generate the schema. I don't know if they search all of the
domain names or not either.
Larry
-Original Message-
From
Does Any One Knows How To Set And Get Cookies?
The PHP manual is really good for stuff like this. Check out the
setcookie() function.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
it. If it
does not show the change, post the test code so we might be able to tell why
it fails.
Provided you can change the variable, you should be able to create a loop
that sets all the variables to or some base values etc.
Larry
-Original Message-
From: Andy B [mailto:[EMAIL PROTECTED]
Sent
When someone pulls up a form and fills it out, they subsequently submit that
form. When submitting a form your browser creates a one on one connection
with the server where the server inputs the data from your form before or
after the next person without mixing the two. (no matter if the two
['language'];
and you shouldn't have to change anything else.
See the manual for $_GET and $_POST for more information.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
==
TIA,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Does anyone know what --enable-debug gives you when building php? Does this
hinder normal operation of php or just take a small hit in performance to be
able to render more debug information when needed?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
validating
form input with regex, I suspect.
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what do you guys think of using a tag for discussion messages? This way
people that don't want to weed out lengthy discussions and attachments etc
can filter them out of list messages. A tag such as discussion in the
subject line? Just my two cents.
Larry
-Original Message-
From: Marc
I don't see how it could be to anyone's disadvantage. As a matter of fact,
I think that it would be great to also have it available as a soap service
as well. If people well versed in different open source projects were able
to be listed on each projects' sites and provide soap service as well,
,
that the value wouldn't print on each cycle of the loop.
TIA
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
List
Subject: Re: [PHP] scope problem
Hello Larry,
Friday, March 5, 2004, 4:01:39 PM, you wrote:
LB This gives values something to the tune of...
LB 200
LB 400
LB 700
LB 100
Hard to say with so little code, but...
Your first where loop is probably running twice, i.e. resetting
variable back
expensive and more advanced in focus, but very thorough and
well written.
Hope that helps,
Larry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is the html code you have listed below the file register_new_member.php?
Is it in the same directory as the previously successful script?
-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Michael T. Peterson
Sent: Tuesday, February 10, 2004 9:48 PM
To: [EMAIL PROTECTED]
that
you are restricting your selection to values of 'Yes' works as anticipated.
As long as there is a one to one relationship on user id I believe the left
join works for this.
Larry
-Original Message-
From: Marc Greenstock [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 9:53 PM
or not. If not,
you could read the directory, match the SIDs from your list and go from
there. There is no way of knowing if the person is still actively using the
SID this way though.
Larry.
-Original Message-
From: Christian Calloway [mailto:[EMAIL PROTECTED]
Sent: Monday, February 09, 2004 9:28 AM
I know I may be displaying severe ignorance, but I have to ask... What do
you mean by this page also uses paging? What is paging?
Larry
-Original Message-
From: DL [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 4:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session troubles
you need one of the to if's to be either $Balance =1 elseif($Balance
1000) or $Balance 1 elseif($Balance = 1). Yours has the first
saying everything equal to or greater than 10001 which 1 is not else
everything less than or equal to which 1 is not. =)
Larry
It is most likely globals. Access the variables by...
echo $_GET['fname'];
or $_POST['fname']; if you are using post which it doesn't appear you do.
Larry
PS it is adviseable to leave globals alone in php.ini since it is set that
way for security concerns.
-Original Message-
From
Toby's solution still holds in this scenario. Actually exactly has you have
rem'ed out. You get back two components to the array, first array[0] holds
the concatenated string you made with the while loop and the second array[1]
holds the total number of result rows from your query.
Larry
try adding showpicture.php?pid=111384img=x.jpg to the end even though you
aren't using that variable, IE may see that the type is jpg here. I have
this same problem/workaround in place right now for a script that wouldn't
work with IE without it for downloading pdf. (pdf was generated on the fly)
.
Thanks
Larry
-Original Message-
From: Toby Irmer [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 5:12 PM
To: Larry Brown; Bob Eldred; PHP List
Subject: Re: [PHP] Image Header Issues
I have the same problem. Strange: I have a session_start(); before the
header... if I take that out
benefits.
Larry.
-Original Message-
From: Bob Eldred [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 11:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Image Header Issues
OK, that's it. The session_start() is the issue. Unfortunately, the
img=x.jpg didn't help.
Now I've got
in particular where you just came from when it dropped).
Larry
PS if you have a dev site to work on, and the session checks are in a
header, try changing the header to display the session ID and watch it for a
change while you surf it.
-Original Message-
From: Matthew Weier O'Phinney [mailto:[EMAIL
be...
if($executeRand == 1){ makeArrays(); }
You'll need a second form around your other submit along with a variable for
it to send etc.
Hope that helps
Larry
-Original Message-
From: wknit [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 8:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP
to be platform independant. .net, java etc. can be used as the
client. Of course that is only a added benefit since you are making both
ends.
I use nusoap which is all php and isn't too hard to figure out.
Larry.
-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]
Sent
performance.
Larry
-Original Message-
From: mastershay [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 7:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Accelerator Support?
Hello, I have spent hours searching the web for any kind of support
regarding Ioncube's PHP Accelerator. We
I use sessions with IE all the time without such a problem. Are there any
points in the program that redirect the user off site and back or something
with that affect that IE might be handling in a wierd way? Do you have
pages that detect the browser and feed alternate content based on the
shouldn't $row[member_id] be $row['member_id']. In case anyone can profit
from this, when I find a function doesn't work right and I am using
variables in its execution I run an echo/die combination immediately before
the function to verify the data being fed to it is as it should be. In this
session_register(user);
session_register(authLevel);
session_register(sessionExpire);
$user=$userDataFromForm;
$authLevel = $authLevelFromDB;
$sessionExpire = time() + 3600;
etc...
-Original Message-
From: Cesar Aracena [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 2:11 AM
Sorry, my bad. This is the Register Globals on version...
with RegisterGlobals off you would simply use..
$_SESSION['user'] = $userDataFromForm;
$_SESSION['authLevel']
-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 11:33 AM
How about this one? Add it to an include for the site and use it whenever
you have an error check.
function goBack($newSite,$errMsg)
{
$send = ;
foreach($_GET as $key=$value)
{
$send = $send..$key.=.$value;
}
$goTo = urlencode($newSite.?errMsg=.$errMsg.$send);
locking on the db to avoid this.
Larry
-Original Message-
From: ike strong [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 01, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Setting a 'life-time' clock to a displayed information
Hi all,
I'm interested in finding out a way to set
501 - 600 of 809 matches
Mail list logo