you close the input file in while loop ( fclose($fp); )
Bryan Koschmann - Gkt [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Can someone give me a hand here? I am really lost as to what is
going on.
I have a file that looks like this
user1,Store 1 - ABC street
user2,Store 2 -
hi all,
?php
echo 'pre' .
'CRYPT_STD_DES ' . CRYPT_STD_DES . \n .
'CRYPT_EXT_DES ' . CRYPT_EXT_DES . \n .
'CRYPT_MD5 ' . CRYPT_MD5 . \n .
'CRYPT_BLOWFISH ' . CRYPT_BLOWFISH . '/pre';
echo crypt('clear_pass', '$1$salt1234$');
?
// outputs
CRYPT_STD_DES 1
CRYPT_EXT_DES 0
At http://www.php.net/ChangeLog-4.php#4.2.0 there is a note (Note: Apache2
support is EXPERIMENTAL.)
Is this note still justified for PHP/4.2.2? Is it about security?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
There is a note at http://www.php.net/ChangeLog-4.php for Version 4.2.0
(Note: Apache2 support is EXPERIMENTAL.)
Is it still justified?
adu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
All you have to do is to call
session_name(EmailSess);
session_start();
in rest of pages.
BTW: You don't really need to call session_name()
Manisha [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am facing so many problems - first file lock and now for
No validating user input is needed if you are using OCIBindByName.
See also the Avertisment at www.php.net/OCIBindByName
[EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi the M.L.
I have to validate forms user inputs before the construction of my query
to
my
You can use the 'magic constants' __FILE__ and __LINE__
For example, if you have an editor that can replace the newline \n
character, you can replace all \n with
\nerror_log(__FILE__ . '[' . __LINE__ . ']');
Nico Van Der Dussen [EMAIL PROTECTED] wrote in message
I get the PHP Fatal error: Allowed memory size of N bytes exhausted and I
want to check free memory at some point in a script. How can I do that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?php
$file_name = 'test.txt';
$line_no_to_delete = 2;
$f = fopen($file_name, 'rw+');
$s = explode(\n, fread($f, filesize($file_name)));
unset($s[$line_no_to_delete - 1]);
fseek($f, 0);
fputs($f, implode(\n, $s));
fclose($f);
?
Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL
?php
$file_name = 'test.txt';
$new_value = rand(1000, 100);
$f = fopen($file_name, 'rw+');
$s = explode(\n, fread($f, filesize($file_name)));
$s[1] = substr($s[1], 0, 11) . $new_value;
fseek($f, 0);
fputs($f, implode(\n, $s));
fclose($f);
?
Craig Westerman [EMAIL PROTECTED] wrote in message
{ header(Location: http://www.XXX.edu/index.php?variable=$variable;);
exit;}
Joe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am using header function to redirect browser.
{ header(Location: http://www.XXX.edu/index.php;);
exit;}
Although it can
http://php.net/ereg
Ron [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
How would I compare to variables where I would want one variable to equal
only part or some of the other variable?
Here is the code
?
if ($HTTP_USER_AGENT !== %MSIE 5.5%) {
print You
you have GD 2.0.1 and PHP 4.0.6 or later for creating true-color
PNGs, per the manual:
http://php.net/manual/en/function.imagecreatetruecolor.php
-Andy
-Original Message-
From: Adrian Ciutureanu [mailto:[EMAIL PROTECTED]]
Is there any way to tell ImagePNG() to create PNG24
Is there any way to tell ImagePNG() to create PNG24 images instead of PNG8
images? Seems that ImageCreateFromPNG() can read PNG24, but ImagePNG()
writes only PNG8.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
All messages in this thread reffers to applications for edit PHP/HTML. The
question was about a WSIWYG Editor for HTML files that runs in browser, not
an application that you install and edit local files! Did anybody click on
the link to EZEdit?
Bob Clingan [EMAIL PROTECTED] wrote in message
EZEdit editor works 99% on client (JavaScript) and it works only in a IE5+
browser. You'll need ColdFusion only for remote file acces (commands like
insert picture).
Bob Clingan [EMAIL PROTECTED] wrote
Does anyone know of any WSIWYG editors that you can plug into a site using
PHP. I recently
Note that using strings without quotes generates a warning that is not
displayed in the default configuration of PHP. The message looks like
Warning: Use of undefined constant anyString - assumed 'anyString' in
test.php on line 3
(line 3: echo anyString;)
If you want to see these warnings, set
http://php.net/manual/en/language.variables.predefined.php
$REMOTE_HOST = gethostbyaddr($REMOTE_ADDR);
Dominic [EMAIL PROTECTED] wrote
It's there anyway to find out the client machine name by using php?
Thanks!
Dominic
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
--- example.php ---
?=$myText?
form method=post action=./example.php
input type=text name=myText value=?=$myText?br
input type=submit
/form
Denis Croombs [EMAIL PROTECTED] wrote in message
004701c11426$b94b7f10$[EMAIL
?
$recordsarray = file (../auto/records);
$remove = schopf.net ;
while(list($i, $line) = each($recordsarray)) {
if(ereg($remove, $line)) {
unset($recordsarray[$i]);
}
}
$newFileContent = implode('',
http://php.net/require_once
-Original Message-
From: ROsen [mailto:[EMAIL PROTECTED]]
Sent: 23 iulie 2001 14:17
To: [EMAIL PROTECTED]
Subject: [PHP] Check for exist function
Hi,
How can I check, thath some function is declared and to do
not declare it
second time ( with
?
$c = 12.3456;
echo number_format($c, 2);
?
http://php.net/number_format
-Original Message-
From: Tim Olsen [mailto:[EMAIL PROTECTED]]
Sent: 18 iulie 2001 10:52
To: [EMAIL PROTECTED]
Subject: [PHP] formating numbers to two decimal points - money - best
ways
How do you know it worked? :)
-Original Message-
From: Morten Winkler Jørgensen [mailto:[EMAIL PROTECTED]]
Sent: 17 iulie 2001 12:54
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Output (Urgent!)
How you want to get a value from client side to php on the
same page?
Well.
$MyArray['BUYVAL'] = 1.23;
-Original Message-
From: Sharat Hegde [mailto:[EMAIL PROTECTED]]
Sent: 17 iulie 2001 13:11
To: [EMAIL PROTECTED]
Subject: [PHP] Adding elements to an array
Hello,
I have a requirement to add elements to an associate array
dynamically based
on
?
$s = 'somthing opentag1 .any content in between
.. closetag1 somthing else';
$opentag = 'opentag1';
$closetag = 'closetag1';
$other_content = 'the other content';
$content = ereg_replace(.*$opentag, '',
ereg_replace($closetag.*, '',
$printerFriendlyContent = eregi_replace('img[^]*', '', $htmlContent);
You can also use
$printerFriendlyContent = eregi_replace('src=[^]*',
'src=images/spacer.gif', $htmlContent);
to preserve formatting (spacer.gif = 1x1 px transparent)
-Original Message-
From: [EMAIL PROTECTED]
http://php.net/rename
-Original Message-
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: 13 iulie 2001 20:53
To: Randy Johnson; Chris Lambert - WhiteCrown Networks;
[EMAIL PROTECTED]
Subject: [PHP] Rename a File?
How do I rename a file on Linux in PHP?
Thanks
Randy
http://www.w3.org/TR/WD-html40-970708/charset.html
-Original Message-
From: Mark Lo [mailto:[EMAIL PROTECTED]]
Sent: 12 iulie 2001 08:46
To: [EMAIL PROTECTED]
Subject: [PHP] charset
Hi,
What will the problem if i don't specific what charset to
use in the
metal tag. And
$result = mysql_db_query(database,select item1, item2 from table);
while ($row = mysql_fetch_array($result)) {
$myArray[$row['item1']] = $row['item2'];
}
-Original Message-
From: Martin Lucas [mailto:[EMAIL PROTECTED]]
Sent: 12 iulie 2001 16:25
To: '[EMAIL PROTECTED]'
foreach($oldArray as $a)) {
list($key, $value) = each($a);
$newArray[$key] = $value;
}
-Original Message-
From: Michael Champagne [mailto:[EMAIL PROTECTED]]
Sent: 12 iulie 2001 17:37
To: PHP General Mailing List
Subject: [PHP] Array problem in PHP. Please help.
That's IMPOSIBLE!
-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 05:27
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variables
I have tried that also...it still does not want to work...
- Original Message -
From: Dallas K.
?
$f = fopen($fileName, 'r');
$s = fread($f, 1024);
fclose($f);
$pageTitle = eregi_replace('.*title', '',
eregi_replace('/title.*', '', $s));
?
-Original Message-
From: Heiko Wilms [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 13:32
To: [EMAIL
int setcookie (string name [, string value [, int expire [, string path
[, string domain [, int secure])
expire = time() + 3600*24*30;
Note that 'expire' is the client relative to GMT time. So, if the client
has the local time set to 01/01/1985, your cookie will be born dead ;)
you probably mean
$cookie_expire = time() + 86400 * 365;
-Original Message-
From: James Holloway [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 16:02
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Cookie Expiry Dates?
Hi Jeff,
Yes, use time()
Example 86400 seconds in a
Use $HTTP_REFERER
http://php.net/manual/en/language.variables.predefined.php
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 01:23
To: [EMAIL PROTECTED]
Subject: [PHP] http header
Dear all folks,
I want to get the url of the previous page that my
http://php.net/array_unique
-Original Message-
From: Aaron Bennett [mailto:[EMAIL PROTECTED]]
Sent: 8 iulie 2001 08:52
To: [EMAIL PROTECTED]
Subject: [PHP] Getting any possible value inside an array
Hi everyone...
Does someone have a quick and dirty way of returning _any_
http://php.net/isset
-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: 9 iulie 2001 14:44
To: [EMAIL PROTECTED]
Subject: [PHP] Help with a variable
Hi,
Is there some way that I can check to see if a variable is present?
e.g.
if (variable is not
http://www.PostgreSQL.org
-Original Message-
From: kachaloo [mailto:[EMAIL PROTECTED]]
Sent: 9 iulie 2001 16:58
To: [EMAIL PROTECTED]
Subject: [PHP] mysql, interbase, etc
Hi,
Which db supports trigers and stored procedures and is
also free ? I
thought mysql supports
You probably want to make statistics for web pages. The most common way
to do that is to use a PHP script that outputs an image and writes to a
database some data. The code may look like this:
/** stat.php /
?
$query = INSERT INTO stats
(id,
$allowed_path = '/www/sites/mysite/teaching';
$file = realpath($file);
if(ereg(^$allowed_path, $file)) {
// it's OK
} else {
// possible attack!
}
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 4 iulie 2001 15:29
To: [EMAIL PROTECTED]
?=a1 = '$a1'bra2 = '$a2'?
:)
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: 5 iulie 2001 10:20
To: [EMAIL PROTECTED]
Subject: [PHP] Parse URL parameters
How can I parse parameters sent with the URL of an pgp site?
Example: I call the site with
http://php.net/realpath
$allowed_path = '/www/sites/mysite/teaching';
$file = realpath($file);
if(ereg(^$allowed_path, $file)) {
// it's OK
} else {
// possible attack!
}
-Original Message-
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: 5 iulie 2001 02:22
To:
select size=1 name=month
option value=0 selectedSelect month
option value=1January
. . .
/select
. . .
if(!$month) {
// please select month
} else {
// month selected
}
-Original Message-
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: 5
Is any of the versions below more effective?
/** Version 1 **/
?
if($condition) {
// some big code
} else {
// other big code
}
?
/** Version 2 **/
?
if($condition) {
include 'file_with_some _big_code.php';
} else {
include
This is a good code. Read http://php.net/realpath
-Original Message-
From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
Sent: 5 iulie 2001 19:57
To: Adrian Ciutureanu
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Security of PHP code
Adrian Ciutureanu pressed the little lettered
An observation: I presume (in my code) that $allowed_path is a root of
an allowed path. So, files in subfolders of allowed_path are also
allowed.
-Original Message-
From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
Sent: 5 iulie 2001 19:57
To: Adrian Ciutureanu
Cc: [EMAIL PROTECTED
?
$textFileName = 'filename.txt';
$strToDel = the_string;
$s = implode('', file($textFileName));
$p = strpos($s, $strToDel);
$len = strlen($strToDel);
if($p) {
$s = substr($s, 0, $p) . substr($s, $p+$len);
Variables that are not checked are not send by default.
Try the code below and see what variables are posted.
form method=get action=chkbox.html
?for($i = 0; $i 10; $i++):?
input type=checkbox name=p?=$i? value=1p?=$i?br
?endfor?
input type=submit
/form
To process variables you may use
Hi all,
This is only a test. Sorry for any inconvenience.
adu
--
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]
http://php.net/manual/en/function.ucwords.php
-Original Message-
From: Jamie Saunders [mailto:[EMAIL PROTECTED]]
Sent: 4 iulie 2001 14:57
To: [EMAIL PROTECTED]
Subject: [PHP] capatalising letters
Hi,
I've got a list of strings in the following format:
item one
item two
try
ereg('^([a-z,A-Z,0-9]|_|-|\.)+@([a-z,A-Z,0-9]|_|-|\.)+\.([a-z,A-Z,0-9]|_
|-|\.){2,3}$', $email)
-Original Message-
From: Daniel Reichenbach [mailto:[EMAIL PROTECTED]]
Sent: 4 iulie 2001 15:05
To: Php-General
Subject: [PHP] preg_match
Hy,
i've got a string which looks
Here is something that happend to me: I forgot to tell Apache that .inc
files must be parsed by PHP. All works fine if you include a .inc file,
but if somebody guess .inc file name, he can see the content of that
file!
-Original Message-
From: David A Dickson [mailto:[EMAIL PROTECTED]]
window.location = 'http://url?yourVar=' + yourVar;
-Original Message-
From: Romeo Manzur [mailto:[EMAIL PROTECTED]]
Sent: 5 iulie 2001 07:56
To: [EMAIL PROTECTED]
Subject: [PHP] javascript var on a php var...
hi, I want to know how could I save a javascript variable on a php
Hi,
I have a problem: if I use session_start(), the page will not cache. Is
that normal?
Adrian CIUTUREANU
Software Developer
--
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
Thanks a lot! It works.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 2 iulie 2001 16:43
To: [EMAIL PROTECTED]
Subject: Re: [PHP] sessions and cache
Hi Adrian!
On Mon, 02 Jul 2001, Adrian Ciutureanu wrote:
Hi,
I have a problem: if I use
Try this:
--upload.php--
?php
if (is_uploaded_file($userfile)) {
move_uploaded_file($userfile, $new_location/$userfile_name);
} else {
echo Possible file upload attack: filename '$userfile'.;
}
?
-Original Message-
From: Wilbert Enserink [mailto:[EMAIL
56 matches
Mail list logo