Have you verified that the mail settings in your php.ini are correct?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview,
27;s an error in your query (and a
query can be error-free and still not return data).
For what you're doing, you'll probably want to take a look at
mssql_num_rows().
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never ce
> -Original Message-
> From: Neil Freeman [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 10:36 AM
> To: Mark Roedel
> Cc: PHP General
> Subject: Re: [PHP] How do I get htaccess files to take effect?
>
>
> Thanks for the reply Mark,
>
> I
hing that you'll need, though, is an appropriate
"AllowOverride" value in your httpd.conf for the server or directories
in question.
http://httpd.apache.org/docs/mod/core.html#allowoverride
---
Mark Roedel | "Blessed is he who has learned to laugh
Syste
install, I still end up with my previous version
of the PHP binary. A 'make clean' (and, sometimes, an 'rm
/usr/local/apache/libexec/libphp4.so') followed by another make/make
install is usually enough to set this straight.
---
Mark Roedel | "Blessed is he who has
ionality won't be
enabled on every server, often for security reasons.
I'm not sure how much of an issue it really needs to be, though. Are
you running into people who are surprised that your programs won't work
on their server? (Could this mean that you need to take a look at how
cl
ature-requests to the
> php-development team?
The bug-tracking database at http://bugs.php.net/ lets you specify a
report type of "Feature/Change Request"...
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he sha
out notice. Be warned
and use this function at your own risk."
It looks as if the function has, in fact, been renamed to
socket_strerror() for versions of PHP >= 4.1.0, although the same
warning apparently applies.
---
Mark Roedel | "You know, Hobbes, some days even
Systems
) a remote file, all the parser has access to is the
*results* of the remote file request.
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Tex
I vaguely remember there being something about this in the user notes at
http://php.net/eval
If I remember correctly, it was something along the lines of adding a ?>
to the beginning of your string, and a -Original Message-
> From: Sergio Mergen [mailto:[EMAIL PROTECTED]]
> Sent: Frida
ry($database, $sqlshow);
>
> >>> produce: 1 is not a valid MySQL-Link resource in
> /home/guestbook.php on line
> 112
Where is your $database variable getting its value?
---
Mark Roedel | "Nothing in life is so bad that it cannot be
Systems Programmer
thing wrong?
Yes.
The thing you have to remember is that your database link identifiers,
etc., follow the same rules of scope as any other variable (and thus,
need to either be passed into your function as parameters or declared as
global).
Specifically, in your case, the $db variable referenced in
//dig results pages.
For a more detailed writeup of integrating ht://dig and PHP, see the
"Search This!" article at
http://www.devshed.com/Server_Side/PHP/Search_This/ It's written for
PHP3, but as I recall everything worked pretty much the same when I
moved from PHP3 to PHP4.
---
> hope the others are more helpful for me...
What version of phpBB? I know there were a number of security fixes in
the last few releases (current looks to be 1.4.4)...
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for
age.variables.scope.php
for information on how to access global-scope variables from inside a
function.
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
on line 17
But your script is apparently running in
/home/d5051/public_html
And trying to open the file in that same directory.
Try changing the fopen line to
$fd = fopen("test/$file","r");
Or
$fd = fopen("/home/d5051/public_html/test/$file",&
(If so, what does it say?) Or just not the
results you were expecting? (In which case, what results were you
expecting, and how did the actual results differ?)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never ceas
http://www.mysql.com/doc/D/a/Date_and_time_functions.html
is in order? (Hint: the % characters mean something.)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be e
I have just
> installed Apache 1.3.22 but when I load php4.0.6 it won't run.
Does it give you any messages when it fails to run? Put anything useful
in your Apache error logs?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at
$im,int $x,int $y,int $x2,int $y2,int $color )
Try changing this to
function box ($im, $x, $y, $x2, $y2, $color)
(Also in your other function definition.)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall neve
'--with-dbase' was included in the
parameters when 'configure' was run.
If they're not there, I believe your copy of PHP will need to be rebuilt
to get them.
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himse
is supposed to automagically
insert a current timestamp? If so, you might double-check your
documentation to see under what circumstances it will do so...it might
only do it, for example, if you insert a NULL value (which is not the
same as an empty string). If not, you could try using the
is supposed to automagically
insert a current timestamp? If so, you might double-check your
documentation to see under what circumstances it will do so...it might
only do it, for example, if you insert a NULL value (which is not the
same as an empty string). If not, you could try using the
ry the database, the update doesn't happen.
> but when i echo the sql string and copy and paste it
> in my mysql client window, the update happens like it
> should!
After the update fails, does an 'echo mysql_error()' tell you anything
useful?
---
Mark Roedel
e: Incorrect syntax near 't'. (severity 15) in
> /var/www/html/process.php on line 14
>
> Problem Title : Doesn\'t work
If I'm remembering right, Sybase would prefer to see this as
Problem Title : Doesn''t work
(That is, a single-quote within a strin
> possible for it to run with out it?
Yep...PHP is built with a set of default values that get used if it
doesn't see a php.ini in the directory that it was expecting, or if a
particular option isn't specified in the file that's there.
---
Mark Roedel | "Ble
e, that'd mean that the comment doesn't include the " );
And since the ?> on that line ends the current code block...
> /*print( "" );*/
> ?>
...then these two lines would not be processed by PHP at all, but would
be passed to the browser as text.
So it appear
>
> i have in my code this:
> $errorMsg["error"] = "";
It means, in this case, that it doesn't think that $errorMsg is an
array.
And that, in turn, makes me think that you've probably already done
something with the $errorMsg variable...perhaps assigned it a str
on when it goes to line 110 as shown just
> below, it says that it is undefined:
>
> if(!submit) {
Try changing this to
if (!$submit) {
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he sh
ialchars($sql)."";
> > > $data = mysql_query($sql) or die ("Erro crypt
> > 2.");
> > > $row = mysql_fetch_row($data);
> > > return $row[0];
> > > }
Should you maybe be using $decode_str instead of $encode_str in the
first line of this
*100);
shuffle($a);
(That is, get all your values loaded first, then just randomly rearrange
the order.)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be
;>>>>>>>>>>>>>>>>>>>>>>>
>
> For me it is printing the blank value.
That's what I'd expect, if you're running that script directly. The
referrer variable generally only gets a value if you reached the sc
rver server, is not on-line
> now. Does anybody knoes if this will be fixed soon? Is
> there another source for the ODBCSocketServer server?
http://odbc.sourceforge.net/
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall neve
specific, you can
safely remove them. (They will, of course, be recreated if you publish
your site again using FrontPage.)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never cease
LeTourneau
t when I run the apxs that came
with Apache 1.3.20. Are you really *really* sure you're pointing to the
right copy of apxs?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never cease
LeTourneau University | to be e
www.php.net/manual/en/language.types.float.php
"The size of a float is platform-dependent, although a maximum of
~1.8e308 with a precision of roughly 14 decimal digits is a common
value...Never trust floating number results to the last digit, and never
compare floating point numbers for equali
on the infected server and attempts to
email some people who might be able to do something about it.)
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer| at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview,
> -Original Message-
> From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 08, 2001 3:14 PM
> To: Mark Roedel
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] 3rd include
>
>
> If a file is included from within a function, this would limit
> -Original Message-
> From: Drew P. Vogel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 08, 2001 2:19 PM
> To: Mark Roedel
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] 3rd include
>
>
> You're right. It is not discuessed there. My memory s
e
include files themselves, not in losing their contents.
If that's what you're referring to, see bug#11362 - per Zeev, the
current CVS (as well as PHP 4.0.7 when it's released), has changed to a
behavior that should be more likely to do WhatTheScriptProgrammerMeant
in most cases.
---
ust got way more results than I was interested in sifting through --
and didn't see anything that appeared to match what you're describing...
---
Mark Roedel | "This is the perversity of software. It
Systems Programmer| is *always* more complex than you
LeTourneau Univ
ectory gives the date of each release. The
first PHP4 Beta came out July 19th, 1999; the 4.0.0 release was May
22nd, 2000; and the current (4.0.6) release was June 23rd, 2001.
---
Mark Roedel ([EMAIL PROTECTED]) | "There cannot be a crisis next week.
Systems Programmer / WebMaster |
ion stored in your mysql database)?
I've used it on a few projects here with good results.
You can pick up a copy from the "contrib" downloads at mysql.com.
---
Mark Roedel ([EMAIL PROTECTED]) | "There cannot be a crisis next week.
Systems Programmer / WebM
.php3 (in one file) but I've got some
> problems with statements:
>
> I have:
>
> [stuff snipped]
>
> IT DOESNT WORK!
In what way doesn't it work? Do you get an error message (if so, what
does it say?) or just not the result you were expecting?
---
Mark Roed
lid construct. See
http://php.net/manual/en/control-structures.elseif.php
---
Mark Roedel | "The most overlooked advantage to owning a
Systems Programmer| computer is that if they foul up there's no
LeTourneau University | law against whacking
t.so.10 to one of the locations that
was already in your ld.so.conf (that is, somewhere that ld already knows
about)...
---
Mark Roedel | "The most overlooked advantage to owning a
Systems Programmer| computer is that if they foul up there's no
LeTourneau University |
pers list. Keep in
mind, though, that using bugs.php.net is a good thing, as it gives your
request a trackable identity that can be reviewed, assigned, followed up
on, etc. Simply posting a message to a mailing list doesn't do that
(unless the idea is so wonderful that somebody else is motiv
ated.
Actually, I'd expect that if you try your code again today, it works
just like you'd expect.
Mktime() uses the current (local date/time) value for any parameters
that you leave out. Since you were running this on July 31st, that
means your mktime call was trying to build timestam
hen you run configure. That'll enable a set of mssql functions for you
to use.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is already full."
LeTourneau University ||
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 25, 2001 10:42 AM
> To: Mark Roedel; Php-General
> Subject: Re: [PHP] Syntax Eyes
>
>
> I have a row in sql that is binary data (a jpeg)
> I need to echo that data to
ame file anyway...is that really what
you intended? (Remember, a web browser is basically going to be
expecting a single file in response to a single request...)
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My sche
your address) that you've already verified that the
latter isn't the case, I think your next step is probably to have a
little chat with your server admins.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule
), or from something Unix-y?
If it's the latter, probably your best bet is going to be to get a copy
of Sharity or Samba installed and mount the remote-machine resources so
that you can treat them as local resources.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
S
what you did wrong, since you really haven't
given us much information on what you did.
My first thought, though, would be to take a closer look at your query
to see if you're perhaps filtering out more than you expected. Perhaps
if you posted that, along with whatever parts of your
ace("/()(.*?)(<\/NEWS>)/i","\\1$news\\2",
> $templine));
Unless my counting skills have gone downhill lately, this line has more
)'s than ('s.
---
Mark Roedel ([EMAIL PROTECTED]) | "There cannot be a crisis next week.
Systems
n you meant == at some point in your script?
Is there someplace that we might be able to look over your code and see
the results of running it?
---
Mark Roedel | "The most overlooked advantage to owning a
Systems Programmer| computer is that if they foul up there's no
Le
> -Original Message-
> From: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 1:36 PM
> To: Mark Roedel; php-general
> Subject: Re: [PHP] sql query successful
>
>
> What about when DELETING from a table??? It always returns true.
>
tually, you can. (See
http://www.php.net/manual/en/language.operators.assignment.php)
An assignment operation will return the value that was assigned.
Thus, if we have
if ($sql = mysql_query($query_string))
and the mysql_query call returns a non-false value, the entire
expression will evaluate to true.
---
Mark R
this work?
The above code should tell you that the query was properly formed and
error-free, and was cheerfully accepted and processed by the database
server. (You don't get much more successful than that...)
If what you're really looking for is whether there were any rows
returned
age, you'll want to start by reading
README.EXT_SKEL in the directory where PHP is installed. That should, I
think, give you most of the information you need to get started.
---
Mark Roedel ([EMAIL PROTECTED]) | "There cannot be a crisis next week.
Systems Programmer / WebM
lays textarea (blank, or with old contents)
$submit is set, so *now* we write the new data out to the file
3rd request:
script displays textarea with updated contents
So...I'd expect the answer is to make sure you're updating the file
*before* you look at its
sing php4 and POP3.
There are a few classes for POP3 interaction using PHP's socket
functions at
http://px.sklar.com/section.html?section_id=10
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is
D the web server runs as (commonly 'nobody'), not as your
own userID. Make sure file and directory permissions are set
accordingly.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is already full."
a great big
HTML tag that it doesn't recognize.
Difficult to offer much in the way of troubleshooting advice without
knowing at least what web server software you're using, but I'd
certainly start by double-checking your configuration to make sure that
you have, in fact, set it up to h
> -Original Message-
> From: Sandeep Hundal [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 14, 2001 9:13 AM
> To: Mark Roedel; Sandeep Hundal; [EMAIL PROTECTED]
> Subject: RE: [PHP] my query results won't clear!! :(
>
>
> damn, yeah thats my problem. how
o hold
pieces of the returned data.
That is, given the following code:
$result = mysql_query('select * from table');
$mydata = mysql_fetch_array($mydata);
mysql_free_result($result);
$result should be cleared out. $mydata, however, should be retained.
Does that m
en't ever seen file() work that way. Are you sure this isn't a
simple case of the web browser collapsing whitespace when displaying an
HTML page? (Hint: "view source" is your friend when you're wanting to
see exactly what the output of your script was.)
---
Mark R
use some combination of the commands presented at
http://www.php.net/manual/en/ref.filesystem.php
If you're just wanting something quick and simple, you might find the
file() function particularly useful.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next
> -Original Message-
> From: John Monfort [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 30, 2001 5:08 PM
> To: Mark Roedel
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Best Practice-HTML In Database
>
>
> Yes, I will need to provide searching capabi
gt;
> 1) Insert the HTML page (...HTML code) in the database ?
>
>or
>
> 2) Insert a URL in the database field, that points to the
> HTML page?
>
> why?
Will you ever want to do database-ish things with the contents of the
page? (Allow somebody to search for words o
owscap.ini file.
I'd start by making sure that you actually have a browscap.ini, and that
your copy of PHP is configured properly to be able to locate it.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is a
lace... :/
I've found that my web server's error logs usually say interesting and
useful things when i get an "Internal Server Error" message. Any clues
there?
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaste
get my head around it.
>
> I have two arrays which I wish to merge, but I want to
> EXCLUDE duplicate values.
>
> Any suggestions, as my numerous attempts have proved
> unsuccessful.
I expect my approach would probably be to merge the two arrays together,
then call array_unique
e means for you to "rewind" that pointer to the
any specified row, including the first, of the result set.
See
http://php.net/manual/en/function.mysql-data-seek.php
for more information, including sample code.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a cr
gt;
> equivalent of asp's <%= strTest %>
>
> But not echo ""
If you've got asp-style tags enabled in your PHP configuration (see
http://www.php.net/manual/en/configuration.php#ini.asp-tags for more
info) then the syntax turns out to be just the same (see
http://www.php.n
line 1
That looks suspiciously like the error code I get when I haven't
properly set my INFORMIXDIR and INFORMIXSERVER environment variables.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is already full.&
o.)
However
$str = "a";
$str++;
results in $str storing the value "b".
It's
$str = "z";
$str++;
that results in "aa" being stored in $str.
(This behavior was, in fact, what started the thread you replied into.)
---
hese will probably be the same as the
"Master" values. However, they can be overridden by configuration
settings made in location-specific sections of your web server config
(for a particular virtual server or group of directories) or (if
allowed) in .htaccess files throughout your di
-Original Message-
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 11:12 AM
To: Mark Roedel
Subject: RE: [PHP] Why does it work this way?
>> Because "z"+1 turns out to be "aa" (which, if you ask me,
>> makes about as much
would work under Linux just as well) by installing the
FreeTDS libraries (available from freetds.org), and then configuring PHP
"--with-sybase"
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Programmer / WebMaster || My schedule is already f
.
However
You can also control the PHP settings for each copy of the site by using
php configuration directives in the relevant sections of your
httpd.conf.
---
Mark Roedel | "I know the answer! The answer lies within the
Systems Programmer| heart of all mankind! The answe
s failed.
How about just
foreach ($arrayname as $arrayval) {
do stuff with $arrayval
}
Or, if it's also important for you to know that you're dealing with the
value of "var1"...
foreach ($arrayname as $arraykey=>$arrayval) {
;
$str .= "blabla\n";
$str .= "\n";
Is there something i'm missing here? I'm sure this is an oversimplified
example, but what is it you're actually trying to accomplish?
---
Mark Roedel | "I know the answer! The answer lies within
using.
MySQL, for example, has a date_format() function that you can use in
your query to specify what information you'd like displayed from a
date/time field, and how you'd like it presented.
---
Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week.
Systems Pro
> the websites for my company use odbc_connect. Because we sometime
> move the website from unix to windows and back. So, it is more
> reliable that way.
If you're using the odbc functions, then what's the purpose of FreeTDS?
---
Mark Roedel| "A wise man once tol
a and
> remove it if it does have one?
One way would be
$variablewithnocommas=str_replace(",","",$variable);
---
Mark Roedel| "A wise man once told me that everything in
Systems Programmer | life is either a lesson or a joke. Our task
86 matches
Mail list logo