I've done some research on this and I'm a bit baffled as to why I can't get
zlib.output_compression
to work. I have two machines I've tried this on, and neither one wants to compress
anything. The
machines are RH 7.1 and 7.2, both running Apache 1.3.24 and PHP 4.2.0, though I
couldn't get it
I prefer to use isset(), not empty(). It's more accurate, in that it
knows the difference between a variable that just isn't set, and one
that has an empty value (which may be valid).
Matthew Walker
Senior Software Engineer
ePliant Marketing
-Original Message-
From: Philip Olson
Hello,
Is it possible to do the load data info mysql command via PHP
I get an access denied error from mysql when i try to do that.
Thanks
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Is it possible to do the load data info mysql command via PHP
I get an access denied error from mysql when i try to do that.
[/snip]
Are the permissions granted properly for the PHP user in the connection
statement?
Jay
--
PHP General Mailing List (http://www.php.net/)
To
I've a 2 D array and would like to search for vals. in the first dimension
only i.e.
myArray[0][0]
myArray[1][0]
myArray[2][0]
myArray[3][0]
.
.
.
and not in the elements myArray[0][1]
CODE:
for($l = 0; $l count($layer); $l++) {
$key = array_search($layer[$l], $layerDes); // $layerDes
Regarding my recent post, I am sorry $key is not undefined it is just 0
or FALSE.
I've a 2 D array and would like to search for vals. in the first dimension
only i.e.
myArray[0][0]
myArray[1][0]
myArray[2][0]
myArray[3][0]
.
.
.
and not in the elements myArray[0][1]
CODE:
for($l
Is there any way of using an array element in the same
line as it is filled? For instance, here's what I
have:
Say I want the image width of a pic, I have to:
$f = getimagesize(certainpic.jpg);
print($f[0]);
After this, I never use $f anymore. There's no reason
to have it hanging around.
Is
[snip]
That's exactly what you need :) Have some core functions that are remotely
accessed.
for example:
$result =
file(http://www.myserver.com/functions/square_root.php?input=4;);
Then at www.myserver.com the square_root.php file would contain:
?
echo sqrt($input);
?
Does anyone
On Tue, 14 May 2002, Kirk Babb wrote:
I have a listing of department alumni which calls up their email address
when one of the form buttons (letters of the alphabet) is clicked. The
emails are not hard-coded; the form sends the $letter to a php script which
handles all the usual stuff (the
Yo, Sebastian:
On Tue, May 14, 2002 at 07:26:30PM +0200, Sebastian A. wrote:
function startElement($parser, $name, $attrs='') {
global $tag, $Data, $p;
array_push( $tag, $name );
while ( list($Key,$Val) = each($attrs) ) {
$p-attr_data[$name:$Key] =
On Tue, 14 May 2002, Brad Melendy wrote:
I'm going to check out preg_match(). What if there are more than one
instance of a and /a in my string, but I know that I want the last two
occurances at the end. Can I tell it to check starting at the end of the
string and work forwards? Thanks
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
These are called variable variables, and can
be read about here:
http://uk.php.net/manual/en/language.variables.variable.php
Replace your [ ] with { } and you'll be good
to go.
Regards,
Philip Olson
On Tue, 14 May 2002, Steven Walker wrote:
Hi,
I couldn't find this in the
On Tue, 14 May 2002, Steven Walker wrote:
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
The cookie that stores the session id will live until the browser window is
closed. You can apply a different lifetime to the cookie by using
session_set_cookie_params() but I doubt that'll do what you want. Just use
the session_id() function to change the session id manually when you
register
On Tue, 14 May 2002, Jay Blanchard wrote:
CSS sheets have to be in the document root somewhere, don't they?
Nope. You just have to be able to refer to them in the LINK REL tag in the
sheet(s) to be styled.
But the browser can't follow that reference if it's not below the document
root of
At 12:49 14/05/2002 -0600, Matthew Walker wrote:
I prefer to use isset(), not empty(). It's more accurate, in that it
knows the difference between a variable that just isn't set, and one
that has an empty value (which may be valid).
hello,
You may want to do some tests.
last time i did that :
On Wed, 15 May 2002, Jason Wong wrote:
That's exactly what you need :) Have some core functions that are remotely
accessed.
for example:
$result = file(http://www.myserver.com/functions/square_root.php?input=4;);
Then at www.myserver.com the square_root.php file would contain:
?
At 21:57 14/05/2002 +0200, Luc Saint-Elie wrote:
4.1 = isset() returns false if the variable is not set OR if the
variable is empty
typo.. wanted to say :
4.1 isset() returns true if the variable is set ORT if the variable is empty
Luc
--
PHP General Mailing List (http://www.php.net/)
On Tue, 14 May 2002, Collins, Robert wrote:
$core_functions =
http://www.domain.com/path/to/file/core_functions.php;;
require_once($core_functions);
1) You'd have to eval() it rather than requiring it.
2) lynx -source -dump
Hi Folks,
after studying and searching manual/archives,
I didnĀ“t find the explanation to upload multiple files
from a single input.
What I want is to let the user select multiple files
from the files-box appearing in the browser and let him/her
upload this selection.
If I put a second 'input
- Original Message -
From: Miguel Cruz [EMAIL PROTECTED]
On Tue, 14 May 2002, Collins, Robert wrote:
$core_functions =
http://www.domain.com/path/to/file/core_functions.php;;
require_once($core_functions);
1) You'd have to eval() it rather than requiring it.
I
You can't do that. You have to provide a seperate box for each file.
---John Holmes...
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 14, 2002 4:20 PM
Subject: [PHP] Direction to file-upload ?
Hi Folks,
after studying and searching
On Tue, 14 May 2002, 1LT John W. Holmes wrote:
- Original Message -
From: Miguel Cruz [EMAIL PROTECTED]
On Tue, 14 May 2002, Collins, Robert wrote:
$core_functions =
http://www.domain.com/path/to/file/core_functions.php;;
require_once($core_functions);
1) You'd
On Tue, 14 May 2002 [EMAIL PROTECTED] wrote:
after studying and searching manual/archives,
I didn't find the explanation to upload multiple files
from a single input.
What I want is to let the user select multiple files
from the files-box appearing in the browser and let him/her
upload this
On Wednesday 15 May 2002 03:24, 1LT John W. Holmes wrote:
Does anyone see any flaws in this?
As long as you realize that any method like this is just going to be
retrieving a string, basically. You don't get any PHP code back, you just
get the results of the PHP code. So in your example,
Gabor, after some searching I discovered some wonderful user comments in the
session_destroy() page you might want to check out. You have to get dirty
with cookies but it may be possible after all. :)
http://www.php.net/manual/en/function.session-destroy.php
-Kevin
- Original Message
I didn't ask the question about this, but I have a related issue. I'm
trying to do a replace, and am using str_replace, but the outcome is not
what I expected.
Here's my code:
?
$fp = fopen(new_data.csv, r);
$text = fopen(text.txt, r);
$merged = fopen(merged_text.html, w);
$filecontents
On Wednesday 15 May 2002 05:20, Josh Valerie McCormack wrote:
I didn't ask the question about this, but I have a related issue. I'm
trying to do a replace, and am using str_replace, but the outcome is not
what I expected.
Here's my code:
?
$fp = fopen(new_data.csv, r);
$text =
Why do you think this is useful to you? I remember reading an article on
this and its conclusion was that zipping the output was only beneficial
for large data between fast computers over a slow pipe. You have to look
at who your clients are and if it's beneficial to have their machine use
up
We have a shopping cart product we're developing in PHP, and I've
recently come across I dilemma that I need to find a reliable solution
to.
Many of the people who will be shopping on our sites have cookies
disabled, which presents a problem when using sessions. Now, I am aware
of the fact that
Use standard HTTP authentication over SSL - that's the only other way.
On Tue, 14 May 2002, Matthew Walker wrote:
We have a shopping cart product we're developing in PHP, and I've
recently come across I dilemma that I need to find a reliable solution
to.
Many of the people who will be
On Tue, 14 May 2002, Matthew Walker wrote:
Many of the people who will be shopping on our sites have cookies
disabled, which presents a problem when using sessions. Now, I am aware
of the fact that we could append the SID constant to every URL, but this
will not work for us. None of our sites
The sites are not dynamic, but the shopping cart /is/. The problem is,
if people don't have cookies on, when they return to the site to order
more products, they loose the SID that has been appended to the links
inside the cart, and thus loose the contents of their shopping cart.
Matthew Walker
You're not understanding the problem. This is not an authentication
situation. We are using sessions to track information about what a
customer's OrderID is, and other related information.
Matthew Walker
Senior Software Engineer
ePliant Marketing
-Original Message-
From: Rasmus
I am understanding the problem perfectly. HTTP is stateless. You want to
maintain state accross requests. This is done in 3 different ways.
1. Cookies
2. URL Mangling
3. HTTP Authentication
You said you did not want to do 1 or 2. That only leaves you with HTTP
Authentication. HTTP
On Wed, 15 May 2002 04:02, Peter Atkins did align ASCII characters thusly:
All,
I really need help on this one... I have a class called Profile and I
want to store the properties of this class in the session after I give them
values shown below:
Step 1:
// set properties of class
On Tue, 14 May 2002, Matthew Walker wrote:
The sites are not dynamic, but the shopping cart /is/. The problem is,
if people don't have cookies on, when they return to the site to order
more products, they loose the SID that has been appended to the links
inside the cart, and thus loose the
All,
I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
stopped working. I know a lot with the globals has changed, but to be
honest, I am not sure how or why. Can anyone give me an initial lead as to
what I should look for first?
I know I use the following elements:
Hi,
I'm newbie in php and i would like to clearly understand how can i use:
LENGTH in string fgets ( int fp [, int length])
Returns a string of up to length - 1 bytes read from the file pointed to by
fp. Reading ends when length - 1 bytes have been read, on a newline (which
is included in
You're missing one method - using the user's IP address
It's not a guaranteed fool-proof method, but if you don't want to use
cookies or the URL, then this sorta works.
-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 10:04 AM
To: Matthew
Hi All:
Many of my pages has similar lines of code that I would like to group
and have it inserted when required:
if ($HTTP_SESSION_VARS[first_name]){
$header='...';
} else {
$header='...';
};
I placed the code in separate file and tried implode
Could you explain how this could be accomplished, because I'm not
understanding how to do it.
As I understand HTTP Authentication (correct me if I'm wrong), the
user's computer still has to send a 'username/password' pair to perform
the authentication. I can't see how this could be used to
No, it doesn't work at all. All sorts of people are behind proxies.
Every AOL user, for example. All these people end up showing up as the
same, or at least one of a pool of a few dozen ips. If you use this
methods millions of users will end up sharing the same shopping cart.
That's probably
Could you explain how this could be accomplished, because I'm not
understanding how to do it.
As I understand HTTP Authentication (correct me if I'm wrong), the
user's computer still has to send a 'username/password' pair to perform
the authentication. I can't see how this could be used to
Turn on register_globals in your php.ini file and things should start
working again.
On Tue, 14 May 2002, Weston Houghton wrote:
All,
I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
stopped working. I know a lot with the globals has changed, but to be
honest, I am
If it ain't foolproof then only a fool would use it ...
IP addresses are just about the worst way to identify anyone.
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 8:17 PM
To: 'Rasmus Lerdorf'; Matthew Walker
Cc: [EMAIL PROTECTED]
Subject:
You may want to check permissions within your database. The web server user
may not have permissions to perform this action.
/dkm
- Original Message -
From: [EMAIL PROTECTED]
To: Philip Hallstrom [EMAIL PROTECTED]
Cc: Peter J. Schoenster [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent:
Especially if they come through a gateway, or use internet connection
sharing, you can't tell them apart using IP Addresses.
Warren Vail
Tools, Metrics Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658
-Original Message-
From: Mark Charette [mailto:[EMAIL
In article 000c01c1fba6$12a4aed0$0101@pawel, [EMAIL PROTECTED] says...
Hi All:
Many of my pages has similar lines of code that I would like to group
and have it inserted when required:
if ($HTTP_SESSION_VARS[first_name]){
$header='...';
} else {
I retrieve text with accented characters from a textarea and prepare the
message headers using some user-defined functions and send it using the php
mail() function.
The accented characters are kept nicely
Here's the importants headers i'm receiving from this message
Content-Type: text/plain;
Blah. That's a really ugly choice, but I suppose we may end up having to
do that.
I'd give my kingdom for always-on cookies. Ah well. I'll look into this
some more once my current project is finished. Thanks for your advice.
(And thanks to everyone else too)
Matthew Walker
Senior Software
You're missing one method - using the user's IP address
It's not a guaranteed fool-proof method, but if you don't
want to use cookies or the URL, then this sorta works.
Unless there's a firewall using NAT or a proxy cache involved. I know
for a fact that our internal network only ever
Well if his normal page is 100k and he can cut the
size down to 50k with gzip then instead of having
a monthly transfer of 100 GB for example, he would
only be paying for 50 GB. Seems like it's useful
for extremely large sites.
-Original Message-
From: John Holmes
[mailto:[EMAIL
Actually, it is $PHP_SELF. Try $_SERVER['PHP_SELF']
Matthew Walker
Senior Software Engineer
ePliant Marketing
-Original Message-
From: Weston Houghton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP 4.2x changes
All,
I've
Anyone know a simple explanation of how to use forms using the post method on PHP for
Windows. I use PHP on Linux and I don't have any problems. I do the same thing on
Windows and I get an unregistered variable message on Windows. I assume I've missed
something. Global variables is on.
On Tue, 14 May 2002, Richard Archer wrote:
Aah, but by the same logic, if Apache 2.0 with PHP4 can provide the
users with a faster, more stable service, it's bad *not* to use it.
It's bad if the beasts are experimental.
Now, I guess this is for the devel list:
libmcrypt4-2.4.19-1mdk
Yes, it can be useful. I don't dispute that. All I'm saying is that it's
not the save-all or whatever. Look at how much traffic it's going to
save you, look at how much extra processing power you're taking from
your CPU, look at the connections and computers of your clients, etc.
Maybe it's not
Your error_reporting is probably set to different levels.
www.php.net/error_reporting
---John Holmes...
-Original Message-
From: Bob Strasser [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 9:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Using PHP on Windows for the first
unregistered variable message means that you're doing something like:
if($address == foo)
{
// something
}
if $address isn't set, then it's an unregistered var.
this *might* solve it:
if(isset($address))
{
if($address == foo)
{
// do something
}
}
the
My question will probably expose my woeful lack understanding of security
breaches, but perhaps someone can enlighten me.
On my site, registered members will be allowed to upload jpg/jpeg
pictures. I'm concerned about possible security problems. First, is there a
way to ensure that a picture
I've seen real-life examples of 100k pages going down to around 30k,
considering that decrease in size, when you remember that CPU time is
relatively cheap compared to bandwidth, it's worth the processing overhead
in my opinion.
Small (20k) pages probably aren't worth it,
for anything larger
Have a look at the getimagesize() function. This function looks at the
actual file data, not the mime type nor the file's extension but the data
itself and tells you what sort of image file it is.
And no, it wouldn't really be after the fact because because stores the
file with a temporary
On Tue, 14 May 2002, Rasmus Lerdorf wrote:
Turn on register_globals in your php.ini file and things should start
working again.
That reply was way too short and easy ;)
On Tue, 14 May 2002, Weston Houghton wrote:
All,
I've recently upgraded from 4.1.2 to 4.2.0. And of course my
Either put the following line at the top of your php script:
error_reporting(E_ALL ~(E_NOTICE | E_USER_NOTICE | E_WARNING |
E_COMPILE_WARNING | E_CORE_WARNING | E_USER_WARNING) );
Or change the error reporting in your php.ini file.
Steve
At 08:48 AM 5/14/2002, Bob Strasser wrote:
Anyone know
This is bothering the hell out of me. The first file is a simple form,
passing the information to the second file (send_request.php). For some
reason the variables are not passing through to the second page. I have
tried this on my desktop (Win2k, php4.latest, apache, etc.) and it will work
Turn on register_globals in your php.ini file.
On Tue, 14 May 2002, mail-list wrote:
This is bothering the hell out of me. The first file is a simple form,
passing the information to the second file (send_request.php). For some
reason the variables are not passing through to the second page.
Hi,
I am using php-4.1.2 and jpgraph-1.6.1 and I would like to
generate in my program one filenam.php that would contain
several not superimposed histograms(eg. jpgraph LinePlot).
I would like to draw on one page eg. 20 different histograms.
Can it be done?
Thank you,
Ok, makes sense based on previous threads I have gleaned over. Can you point
me to any reading material that fills in the details on all of this though?
Would like to know more about why I am doing this, and if I should change my
coding based on how PHP is progressing.
Thanks!
Wes
Turn on
http://www.php.net/manual/en/security.registerglobals.php
On Wed, 15 May 2002, Weston Houghton wrote:
Ok, makes sense based on previous threads I have gleaned over. Can you point
me to any reading material that fills in the details on all of this though?
Would like to know more about why I
Thanks for the link. Everything there makes sense, and I'm not sure if I
need to turn register_globals on to make this work. Is there a way to get
either:
$_SERVER[PATH_TRANSLATED]
Or
$HTTP_SERVER_VARS[SCRIPT_FILENAME] (perhaps??)
Without turning register_globals on? Oh, and I am doing this
Firstly I would like to say that this is NOT a request for help, but
rather the answer I found to the question I had asked more then a week
ago, but got no response. From the lack of response I would assume that
a) nobody cared that I had a problem, or b) that nobody knew the
answer... I hope
Try it. $_SERVER[...] will work fine inside your class.
-Rasmus
On Wed, 15 May 2002, Weston Houghton wrote:
Thanks for the link. Everything there makes sense, and I'm not sure if I
need to turn register_globals on to make this work. Is there a way to get
either:
Dear Folks,
I am trying to set up Suse Linux Server with sybase and PHP.
While configuring my computer with these software I am getting some problem.
Actually, I have done following steps:
- first of all I Installed the SuSE 7.0 Linux (then apache is installed by default)
- then
First of all, PHP 4.0.4 is over 2 years old now. Upgrade! Then let us
know if you have any problems.
-Rasmus
On Wed, 15 May 2002, Vivek Kumar Agrawal wrote:
Dear Folks,
I am trying to set up Suse Linux Server with sybase and PHP.
While configuring my computer with these software I am
Hi All
I have the following problem ..
A web page which has a flash swf file 100K with .html extenstion need less than 1 sec
to refresh if its cashed ''. The same web page with .php extention makes a delay 5-7''
?? Why ???
Thanks in advance for your help
simos
Hi John
You *can* control on a a page-by-page basis as i'm doing now. I have some
pages admin pages that are getting a lot of hits and i'm using the
compression to reduce them from 52K to 7K and 153K to 17K!
The majority of the users are accessing via 56K modem/ISDN so i'm willing to
trade a
101 - 177 of 177 matches
Mail list logo