in
the system anywhere, and his userload at any one time on any of those
systems is higher than what you expect by far. The biggest concern is to
get the systems set up properly, like configuring Apache and PHP. Those two
will suck of RAM if you aren't careful, not to mention CPU resources.
Mike Frazer
Win2k is the same as NT and does, indeed, have permissions. Very different
from *nix permissions but they do exist.
Mike Frazer
Nick Wilson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and the
How quickly can you get other data from that same remote host? Sounds to me
like it's a network bottleneck someplace. If you are downloading static
data from that system at the same speed its the network.
Mike Frazer
Stefan Rusterholz [EMAIL PROTECTED] wrote in message
news:009601c1a428
Write the whole thing as a function, and then do a check like
if (is_dir(/path/to/directory)) {
listDirs(/path/to/directory);
}
PHP will allow you to recursively call a function from with that same
function.
Mike Frazer
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">new
There's a rather easy way to process arrays with while loops (I saw it used
loosely in some of the other replies).
while ($i sizeof($array)) {
... actions ...
$i++;
}
Hopefully you can tailor that to suit your needs.
Mike Frazer
Joe Rice [EMAIL PROTECTED] wrote in message
news
a while() loop that gets a
line or a certain length of text from a source and write it until you reach
the end of the source. Just remember to add the \n and you'll get each
line read from the source written to its own line on the destination file.
Mike Frazer
Mëòv î?çîÎ òsyïn [EMAIL PROTECTED
Although they are experimental, I find the socket() and connect() functions
in PHP4 to be much easier to use and manage. May want to try them, perhaps?
They seem to be a little less tempramental.
Mike Frazer
Bhavin Modi [EMAIL PROTECTED] wrote in message
news:01d901c1a419$deea9de0$0664a8c0
Did you remove the AddType server-parsed entry for .shtml that is usually
there by default? You may be better served asking this on an Apache
newsgroup.
Mike Frazer
Christian Cresante [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
i want to
Line 4 5 combined:
$text = substr($text, 0, $limit) . ... your additional text here;
Mike Frazer
Justin French [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
Really simple, but can't see which funtion to use in the manual.
I want to tak
a
PHP programmer needs to make some aesthetic changes to the document, they
can skip over the PHP input and just change HTML. Dropping the print
statement means the server does less work, too.
Mike Frazer
Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
On Thursday 24
it
elsewhere.
Mike Frazer
Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I think the real answer here is to treat these as read-only arrays. ie.
never use them on the left side of the '=' and you will never run into
problems. Or i
to make
this an afterthought for all of us, but it looks like they still left C's
functionality intact.
Mike Frazer
Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
it's treating a string as a character array - it's documented somewhere in
th
can email me, as I don't yet have my script site up (gotta get the
server over to my co-loc provider first).
Mike Frazer
Erik Price [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hmm... I'm not familiar with the directory functions yet.
But perhaps you
Just got a job as a PHP Programmer, actually. Kinda rare in this area, I
guess it was a matter of being in the right place at the right time with the
right skills. I've been hired twice in the past based at least in part on
my PHP skills, as well.
Mike
Vincent Stoessel [EMAIL PROTECTED]
Remember, You *can* make certain values in a function optional. Place them
on the right side of the arg list and give them a default value, like:
function myFunction(arg1, arg2, arg3 = foo, arg4 = bar) {
... function guts ...
}
Hope that helps.
Mike Frazer
Mike Eheler [EMAIL PROTECTED
Try Javascript. I dont recall offhand but there are some properties you can
use in Javascript to detect this sort of thing. PHP is all done server-side
and can't collect system properties from the user.
Mike Frazer
Philip J. Newman [EMAIL PROTECTED] wrote in message
00b201c1a549$39daf0d0
.
Finding a LAMP job (or something including any of those components) will
become easier as the positions become more plentiful. Come March you'll see
a noticeable change. Please mark my words :)
Mike Frazer
Michael Kimsal [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL P
like to see the code you
are using for this condition.
Mike Frazer
Rodrigo Peres [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
List,
I'm using the following code to retrieve image from Mysql. My problem is
how
can I output another image if the
getting and not getting certain jobs, but for the ones you can get it's also
the difference between $25,000/yr and $75,000/yr unless you really *are*
God's gift to programming.
Take care,
Mike Frazer
Chris Lott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL P
Try changing the permissions of the parent directory. I've had that problem
in the past and that was the only thing that seemed to fix it.
Mike
Sundogcurt [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm not sure if this is a problem I can overcome with PHP
-end
servers, too, so it wasn't the system slowing it down. I have my personal
site with him and it seems to load stuff from MySQL about 2-5 times as fast
as the ASP-based sites load from SQL Server.
My two cents.
Mike Frazer
Jon Farmer [EMAIL PROTECTED] wrote in message
025001c1a810$587b6730
is that if the user clicks OK then the link passed to
the javascript function verifyClick() is executed.
Hope that helps.
Mike Frazer
Ivan Carey [EMAIL PROTECTED] wrote in message
006301c1a7f4$a195ea60$0201a8c0@icarey">news:006301c1a7f4$a195ea60$0201a8c0@icarey...
Hello,
Thankyou for yo
yesterday but it seemed as if there was a problem with the
archive. Recieved unexpected EOF in archive file. I didn't get a chance to
re-download it, I'll do that today and report if there are any problems
still.
Mike Frazer
Cary Mathews [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]"
. Just
open it in a text editor and do a search for DirectoryIndex.
NOTE: Remember that changing these files manually will void your Cobalt
warranty!
Mike Frazer
Beeman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am using a Cobalt RAQ4 server and need to
of
DirectoryIndex index.htm index.html index.shtml index.php index.php3
index.cgi
Mike Frazer
Beeman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
The config file currently doesn't have any occurance of DirectoryIndex,
can
I just add it within the
of
handling.
Mike Frazer
Zach Curtis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Is there a limit to the number of key=value pairs that can be stored in an
array? Or is this more a function of RAM limits?
Thanks.
Zach Curtis
POPULUS
--
PHP
= fwrite($fp, $val); // Change the part with $val to whatever
you need to write
}
$status = fclose($fp);
There are other ways, as there always are with PHP. However, these should
get you by in just about any circumstance.
Mike Frazer
Greg Schnippel [EMAIL PROTECTED] wrote in message
[EMAIL
how to implement sockets in PHP.
If you mean C sockets, well, I'm currently learning them myself. Let me
know which you need and I can try to get you some resources for them.
Mike Frazer
Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message
03dd01c1a8f9$eb909a10$0301a8c0@CONFUSED"
What server are you running on? In Apache, if you add any filename to the
DirectoryIndex line, it will display that page from any directory without
specifying the filename. It comes default with pages like index.htm,
index.html and index.shtml. If you add, for instance, index.php (some
distros
the default site and got a
busted file, so I recommend downloading it from a mirror). Look through the
Installation part of the manual for a complete list of config commands so
you can install everything you may need.
Mike Frazer
Uma Shankari T. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED
...
}
If the value has been set, that image was clicked. The x and y values
correspond to the precise pixel that was clicked which allows these to be
used as pseudo-imagemaps which you can code for.
Mike Frazer
Ergin Aytac [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
that
checks for the hosts on your domain (like www.domain.com,
subdomain.domain.com, etc). That locks out all other domains, at least.
Don't use this as your sole method of verification, but you can certainly
include it.
Mike Frazer
Jerry Verhoef [EMAIL PROTECTED] wrote in message
Looks to me like you're dealing with Apache rewrite rules, which goes beyond
the scope of PHP.
Mike Frazer
Dr.Bob [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have Apache on WinXP.
That sounds great what you write here, but does this also w
Page not found (error 404) or Page cannot be displayed (a DNS error, as
stated at the bottom of the screen)? I've seen the latter of the two
countless times, only in IE.
Mike Frazer
Bryan Gintz [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
S
ROTECTED]...
Sorry,
The page cannot be displayed
DNS Error
Mike Frazer wrote:
Page not found (error 404) or Page cannot be displayed (a DNS error, as
stated at the bottom of the screen)? I've seen the latter of the two
countless times, only in IE.
Mike Frazer
Bryan Gintz [EMAIL P
, $offset, 1);
Hope that helps.
Mike Frazer
Hugh Danaher [EMAIL PROTECTED] wrote in message
000801c1a9c5$26007460$017f@localhost">news:000801c1a9c5$26007460$017f@localhost...
What I am trying to do is have a line of text break at a space after
reading 19 words. Having read the
NOTE: That was done very quickly and only works on single character
searches! I'm working on one that will find multi-character strings. Gimme
a few mins and email me off-list if you want it.
Mike
Mike Frazer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL P
10-13, the function returns 10, just like the built-in functions
strpos() and strrpos(). $string is the string to be searched; $search is
what you are searcing for; $nth is the number of the occurrance you are
looking for.
Hope you all can make use of this!
Mike Frazer
--
PHP General Mailing
the
following query:
GRANT ALL PRIVILEGES ON 'database' TO 'username@localhost' IDENTIFIED BY
'password';
Obviously, substitute database, username and password with your specific
values. That query will allow the particular user/pass combo to access
MySQL from the local machine.
Mike Frazer
Greg Conway
showing the wrong version.
I copied the binary to where the old binary was and checked the version, and
it's showing up correctly as 4.1.1.
Any ideas?
Mike Frazer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Just a thought...does Redhat 7 install httpd initially with the static
module?
Mike
Mike Frazer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Okay, I finally decided to upgrade to 4.1.1. I did a double compile, one
for the binary and one for the
Okay figured it out. I'm an idiot, that was the problem.
I did /usr/sbin/httpd stop /usr/sbin/httpd start
I should have done /etc/rc.d/init.d/httpd stop /etc/rc.d/init.d/httpd
start
Realized my error when it worked after a reboot.
Mike
Mike Frazer [EMAIL PROTECTED] wrote in message
Just a quick question: the v2.4.x function declaration for several mcrypt
functions requires a path to the library (at least thats what I have
gathered), whereas previous versions didn't require this. Are they looking
for a specific file path, or a general path to the library files?
Mike Frazer
$today = date(d/m/Y);
That will get the current date and dump it in the format you asked for
(DD/MM/, complete with leading zeros).
Mike Frazer
Rick Emery [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
list($y,$m,$d) = explode(,,$phpdate);
$newdate
Give us the exact error message, that probably will hold the answer.
Mike Frazer
Uma Shankari T. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
I am trying to connect php and mysql with the following syntax
mysql_connect(localhost,
|| $num_pipes 4) {
return false;
}
}
return true;
}
Same result, probably absolutely no measurable (and we're talking fractions
of microseconds here) difference in speed, but much easier to read.
Mike Frazer
Lars Torben Wilson [EMAIL PROTECTED] wrote in message
++) {
$num_pipes = substr_count($lines[$i], '|');
if ($num_pipes 2 || $num_pipes 4) {
return false;
}
}
return true;
}
I performed the test purely out of curiosity, not pride :) Thanks for the
idea though, it was interesting to see the results.
Mike Frazer
PS
nl2br() would serve that purpose as well. See the Strings section of the
Functions Reference in the manual.
Mike Frazer
Martin Towell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
$lines = file(filename_here.blah); // read in file as an array
alone and then do the dynamic module, there are also fewer steps in doing
so.
Mike Frazer
Ed Lazor [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I found this on a web site...
When using PHP as an Apache module, you can also change the
configuration
is the chunk size, you can
adjust it
}
I *think* EOF on a socket deonotes a remote socket close but I could be
horribly wrong.
Mike Frazer
Evan Nemerson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am aware of cURL, but I want to just use the standard P
useless on later versions of PHP.
The Network functions, as classified in the manual, are very solid and
widely supported. If it works the way you want it to with one method, why
recreate your own wheel?
Mike Frazer
Evan Nemerson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">new
or whatever is being sent.
Try changing your $CFG-dirroot to a values based on your server root or a
vhost root (for whichever site the script below is for).
Mike Frazer
Morten Nielsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi,
I have a link on
, so it's not the most
practical thig in the world.
Mike Frazer
Jeff Sheltren [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi, I would use a regular expression to check it. This is a pretty
general
one, but I think it should do the trick. It search
If the remote system has the finger service activated, that would work.
However, most servers have stopped running this and also the user generally
has a say in whether they want to be listed.
Out of curiosity, why do you want to do this?
Mike Frazer
Bvr [EMAIL PROTECTED] wrote in message
the existence of text in a
variable.
Mike Frazer
Toke Herkild [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I've made a script which ought to validate if there is data in the fields
or
not... but it doesn't seem to work...
the validation is f
Or shorten your code:
put the Javascript into a separate file, then use
if ($err) {
include(/javascript/file/path/here);
}
Use it over and over again via this method.
Fatih Ustundag [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
But you can write
You're better off using Perl or something else for this if possible.
Learning a new language for one thing is like taking three years of Spanish
to order a taco and some refried beans.
Besides, C/C++ aren't the easiest languages to learn and get good at quick.
Mike Frazer
Nicolas Costes
I believe it's an automatic thing, just like when the secure cert is expired
it will tell you that, although the site is secure, its cert is dead.
Mike
Adam Whitehead [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi All-
I recently went to a website which
tag in your file).
Mike Frazer
Sridhar Moparthy [EMAIL PROTECTED] wrote in message
news:001301c15cbc$f38018b0$[EMAIL PROTECTED]...
Hi All,
Is there any command in PHP that redirects to a php file from another php
file?
If not does any one know how to implement this functionality?
Thank you
are enhanced HTML files, which means the browser will
parse them exactly the same as a standard HTML file.
Mike Frazer
Richard S. Crawford [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Unfortunately, since PHP lives on the server and JavaScri
Don't forget: if a function has multiple arguments the optional ones must be
to the RIGHT of the required ones:
function testing123($one, $two=2, $three=3)// Good
function testing123($one=1, $two, $three=3)// Bad
function testing123($one=1, $two=2, $three)// Bad
Mike
A small addition:
the code below would make a string, but it would be a single word (no spaces
or other word boundaries). Use this instead:
$ignored .= . $words[$i];
That inserts a space before each additional word. Unfortunately it also
adds a space at the beginning but you can get rid of
Try the following:
$body = join('', file(somefile.html));
That one line of code will help you avoid the idea of a buffer; it reads
clear through to the newline and splits it there, dumping each line into an
element of an array. join() just puts it all into one single variable for
output.
Mike
is that you were telling PHP to print a
variable that was, technically, not even initialized.
Mike Frazer
Olexandr Vynnychenko [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello php-general,
I have such code:
class A
{
variable $yourvar:
function yourFunction() {
global $yourvar;
...
}
Mike Frazer
--
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]
Two ways:
#1 - If you have server admin access, just add to the default page list
index.php in your server config.
#2 - Use a meta refresh:
html
head
meta http-equiv=refresh
content=0;URL=http://www.yourdomain.tld/path/to/your/script.php;
/head
/html
Mike Frazer
René fournier [EMAIL
It can also use procmail, or any other SMTP-capable application you have
installed. It is called from the php.ini file.
Mike Frazer
Nathan Cassano [EMAIL PROTECTED] wrote in message
392201c15e37$535ab3f0$2925ae3f@amos">news:392201c15e37$535ab3f0$2925ae3f@amos...
Not a whole lot.
easier on your system.
Mike Frazer
Daniel Harik [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello guys
Thank You very much for your previous replies, could u help me with 1
more thing?
You see i have huge(for me) 100 000 record access table,
languages, I'm ready to suggest we make one universal one :)
Mike Frazer
Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Jtjohnston) wrote:
RTM http://www.php.net/manual/en/language.varia
other things :)
Mike Frazer
Richard Hollis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
form passes to your php file
your php file checks the variables with the same name of that of the form
fields.
you can then test htey have all been set acc
Remember, those functions have return values. Gotta assign the return to a
variable!
$variable = [replacement_function]($args ... );
They don't change the value of the variable in the argument list, they take
that value and put a new value in a new memory space. Unfortunately, they
don't
the following code again to send the
message:
$contents = join(, file(letter.txt));
$contents = str_replace(%%variable%%, $variable, $contents);
Hope that helps.
Mike Frazer
Reggie White [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi. I'm ne
If the other site is on the same server, you can use the same method to log
in (same username and password). If it's on a separate computer you need to
either create a new user or change the existing user to have remote access.
To create a user with remote access:
GRANT [privileges] ON
I may be a little backward here but wasn't mysql_db_*() deprecated?
Keep in mind it was a long day at work and I'm tired. I could be on fire
right now and probably just want to open a window to cool off. :)
Mike
Sc [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL
PHP is a server-parsed language. You need to add the right directives to
your httpd.conf file in the global config section. They should be something
*like* the following:
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
You may also need
Try something like this (you'll need to populate it afterward):
$this-array = array();
Then populate it with the data.
Mike Frazer
Andrzej Roszkowski [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!
I have to create array of classes.
W
Apache has a high learning curve. PHP isn't terribly hard to pick up on if
you already know the basics of programming.
Also, you may want to check out the newsgroup
comp.infosystems.www.servers.unix for help with Apache if you continue to
have problems. It appears from all the info you gave us
I believe you would be getting a number echoed to the screen or dumpfile,
but you want the values, correct?
$telefono is declared as an array. Calling an echo statement on an array
won't give you the values of the array elements. In order to have them all
printed to screen, try:
foreach
Probably a permissions problem. Can't open a file if you don't have
permission to do so.
Mike
Marek Wysmulek [EMAIL PROTECTED] wrote in message
03b201c16308$6b6d54e0$0201a8c0@dom">news:03b201c16308$6b6d54e0$0201a8c0@dom...
Hi all.
I have searched almost everything on the net regarding php
Try checking the PHP section of www.wdvl.com. There should be a list of
software.
Mike
Chris Bailey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Also, Visual SlickEdit works on Windows (in addition to Linux as
mentioned),
and FreeBSD, OS/390, and a slew
PHP is probably the best language around for in-house documentation. The
online manual reads less like a technical manual and more like a tutorial.
Learned PHP 2 years ago. The only resource I've ever used was the manual.
Mike
Jack Dempsey [EMAIL PROTECTED] wrote in message
[EMAIL
I believe it's just the opposite, for the sake of safety. Besides, good
coding practices in ANY language generally means you include all possible
information, required or not (it's like HTML; you don't have to use quotes
around attributes but to be forward compatible it's recommended).
Mike
82 matches
Mail list logo