Rory Browne wrote:
snipdeleting an index(a good index that
is) would slow the db down in certain cases. Deleting a bad index
would speed certain operations up.
snip
If the index in question happens to be a unique index or a primary key
(really just a special case of index) - you could be
Graham Anderson wrote:
Is this good enough encryption for daily use ?
FYI, I need to keep the first part of the file unencrypted so the file
will progressively load
hi Graham, could you explain this progressive load wotsit?
Functions were taken from the mycrypt php page :)
$chunkSize =
Hi.
I've tried some different kinds of setups to do this. And my
recommendation for you would be Ghostscript, maybe together with
ImageMagick. Have a look at:
http://www.imagemagick.org/script/index.php
http://www.cs.wisc.edu/~ghost/
regards,
frank
2005-09-26 kl. 07.42 skrev [EMAIL
respected sir,
i have a query about how to open a audio file and upload as well as
download in a website using php.
plz send me a tutorial help related to it.
thanks
Suresh.P
-
Yahoo! India Matrimony: Find your partner now.
i have the code below
**
*if ($dir = @opendir(dir2open))
{
while($file = readdir($dir)) {
//if (($file!='.') ($file!='..') ($file!='.htaccess') ($file!='
index.php')) {
// if (is_dir($file)) { // print just . ..
// if (is_file($file)) { // works fine
if
Suresh Pandian wrote:
respected sir,
i have a query about how to open a audio file and upload as well as
download in a website using php.
plz send me a tutorial help related to it.
I always find these 2 sites very helpful when I need
information on uploading and opening audio files:
Rory Browne wrote:
snip
If the index in question happens to be a unique index or a primary key
(really just a special case of index) - you could be breaking the logic
of the table (allowing duplicates where there should be none).
Couldn't that only happen if you dropped a UNIQUE or PRIMARY
On 9/26/05, Suresh Pandian [EMAIL PROTECTED] wrote:
respected sir,
Respect is a two way process. You are more likely to get a response
if we respect you. We are more likely to respect you if you make some
effort to solve your own problem, and outline the steps you took, and
how they didn't
Hello.
For your information: It seems to me that the misbehaviour of Explorer
is neither related to the PHP script itself, nor it is related to the
PDF file created by the script. The basic problem is that Apache is
actually sending a header with a 404 - file not found status code
message.
Hello
I am having trouble with is_dir
I am trying to check whether /lists/admin/temp exists (which it does).
However, I cannot get the function to work by specifying the path as above -
it only works if I do it relative to the current working directory. So:
var_dump (is_dir(getcwd()));
Mark Rees wrote:
Hello
I am having trouble with is_dir
I am trying to check whether /lists/admin/temp exists (which it does).
However, I cannot get the function to work by specifying the path as above -
it only works if I do it relative to the current working directory. So:
var_dump
maybe the following helps you (a little):
vlad georgescu wrote:
i have the code below
**
*if ($dir = @opendir(dir2open))
$path = dir2open; // make this into a proper path!
if ($dir = @opendir($path))
{
while($file = readdir($dir)) {
//if (($file!='.') ($file!='..') ($file!='.htaccess')
John Nichel wrote:
Mikey wrote:
snip
http://uk.php.net/manual/en/function.get-browser.php
How about that. I've been using php since late '98, early '99. Messing
around on this list since '99, and _did not_ know about that function.
)#$ [EMAIL PROTECTED])(@!*% #%( [EMAIL PROTECTED](@#*%
Jochem Maas wrote:
what does the following output:
var_dump (getcwd());
I have better question:
what does the following output:
var_dump (realpath(getcwd()));
var_dump (realpath('temp'));
var_dump (realpath(/lists/admin/temp));
--
Ondrej Ivanic
([EMAIL PROTECTED])
--
PHP General Mailing
Hello
I am having trouble with is_dir
I am trying to check whether /lists/admin/temp exists (which it does).
However, I cannot get the function to work by specifying the path as above -
it only works if I do it relative to the current working directory. So:
--
www.itsagoodprice.com -
[snip]
When I do a 'view source' in the web browser I can see the source code of my
PHP script. I presume that this means that the web server did not send the
script to PHP for interpretation. Something is wrong with the server
configuration .
[/snip]
Did you read
[snip]
The following article describes cross tabulation within MySQL and ends with
a Perl application that automates the process, does anyone know of a PHP
version?
http://dev.mysql.com/tech-resources/articles/wizard/index.html
[/snip]
There is an article on evolt.org that shows how to do
[snip]
[snip]
Okie dokie, I am losing it I am surebut that's not important now.
I finally configured the IIS Virtual SMTP server as my MTA. No errors are
being thrown, but no mail is being sent either. Well, it may being sent, but
it is not arriving at its destination. Can someone clue me
I need a php script to trigger another script to run as root on a
machine. Currently, the scripts run as the www-data user, but that
means I can't modify any files on the system that aren't owned by
www-data or world writable. I somehow need to trigger a php script to
run as the root user. I
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 1:43 AM
To: php-general@lists.php.net
Subject: [PHP] PDF Thumbnails
I give my users an option to upload pdf files to my site and
would like them
to see a thumbnail view of the
what does the following output:
var_dump (getcwd());
This outputs a fully qualified path to the current working directory
(/lists/admin)
Not sure about the permissions. I'm using windows 2000, and the 'temp'
directory has the same user permissions as the rest of the htdocs foler
I have
what does the following output:
var_dump (getcwd());
Sorry, this wasn't clear. I mean it outputs c:\...\htdocs\lists\admin
Not sure about the permissions. I'm using windows 2000, and the 'temp'
directory has the same user permissions as the rest of the htdocs folder
what does the
Jeffrey Sambells wrote:
I need a php script to trigger another script to run as root on a
machine. Currently, the scripts run as the www-data user, but that
means I can't modify any files on the system that aren't owned by
www-data or world writable. I somehow need to trigger a php script to
Mark Rees wrote:
That outputs (paths trimmed)
string(56) C:\...\htdocs\lists\admin
string(61) C:\...\htdocs\lists\admin\temp
bool(false)
var_dump (realpath(../../lists/admin/temp));
this outputs the same as
var_dump (realpath('temp'));
I am trying to check whether /lists/admin/temp
murray...
it may have been helpful to the guy to also give him an idea of your tbl
structure. i think you're talking about something like:
tbl schema
EvalTBL
-id
-UserID
-ScoreTypeID
ScoreTBL
-id
-ScoreType
table ScoreType could/would have as many different categorites as
var_dump (realpath('temp'));
I am trying to check whether /lists/admin/temp exists (which it does).
This dir doesn't exists. The '/' at the beginning of path means: path is
from root (unix) or from e.g. c:\ (windows)
Outputs from
var_dump(realpath(../../lists/admin/temp))
I recently encountered a strange behaviour, could someone please
countercheck it, to either tell me there is an error in my pattern?
I have a test string: 7005-N/52
I have two match patterns: a) /([0-9]*)\/(.*)/i
b) /([0-9]*)\-(.*)/i
I check the test string
When using /([0-9]*)(.*)/i it matches
substring 1: 7005
substring 2: -N/52
When using /([0-9]*)\/(.*)/i it matches
substring 1:
substring 2: 52
It looks to me as though its trying to match either or subgroup in order.
On 9/26/05, Jens Schulze [EMAIL PROTECTED] wrote:
I recently encountered a
Mark Rees wrote:
var_dump (realpath('temp'));
I am trying to check whether /lists/admin/temp exists (which it does).
This dir doesn't exists. The '/' at the beginning of path means: path is
from root (unix) or from e.g. c:\ (windows)
Outputs from
var_dump(realpath(../../lists/admin/temp))
make sure to set www-data's login script to nologin if you are going to do that.
On 9/26/05, Michael Sims [EMAIL PROTECTED] wrote:
Jeffrey Sambells wrote:
I need a php script to trigger another script to run as root on a
machine. Currently, the scripts run as the www-data user, but that
Jake was fast ;-) and he is on the right track too
(although I don't think that the substrings he guessed are
the exact ones that are found).
you might want to check preg_match_all to see the matches
that PCRE comes up with for each regexp...
also take a look at:
$test = 7005-N/52;
var_dump(
murray...
it may have been helpful to the guy to also give him an idea of your tbl
structure. i think you're talking about something like:
tbl schema
EvalTBL
-id
-UserID
-ScoreTypeID
ScoreTBL
-id
-ScoreType
table ScoreType could/would have as many different
I recently encountered a strange behaviour, could someone please
countercheck it, to either tell me there is an error in my pattern?
I have a test string: 7005-N/52
I have two match patterns:a) /([0-9]*)\/(.*)/i
b) /([0-9]*)\-(.*)/i
I check the test string
Sent this to [EMAIL PROTECTED] but forgot to copy php-general...
heh. Here it is again.
I would use a table such as
Table
|_UserData
Then use objects per user to store the data.
class User {
var TestScore;
var ScoreType;
...
var Vars;
function
Murray: I could kick myself for not seeing that one (* = 0 or more,
well it sure found 0)
On 9/26/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote:
I recently encountered a strange behaviour, could someone please
countercheck it, to either tell me there is an error in my pattern?
I
hi...
can anybody point me to a good/basic tutorial (tested) for php/mysql date
functions... basically, i want to store a date/time in a column, and be able
to read it, manipulate it, and update the table. i've seen various
articles/sample code, but i'm looking for something that i cna pretty
Sent this to [EMAIL PROTECTED] but forgot to copy php-general...
heh. Here it is again.
I would use a table such as
Table
|_UserData
Then use objects per user to store the data.
class User {
var TestScore;
var ScoreType;
...
var Vars;
function
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:12 AM
To: php-general@lists.php.net
Subject: [PHP] mysql/php date functions..
hi...
can anybody point me to a good/basic tutorial (tested) for
php/mysql date
functions... basically,
echo 'pre', var_dump( $_SERVER ), '/pre';
for instance I cut/paste the following from an application of my,
the code lives in a centrally included file:
/* define a webroot basepath for the datasyncer module */
define('DS_WEBROOT', realpath(dirname(__FILE__).'/..'));
dirname! That's the
Jim Moseby wrote:
Hi Bruce!
MySQL and PHP both have extensive built-in date functions that are clearly
documented and extraordinarily easy to use. For the vast majority of
situations, there is no need to manually write any custom date-handling
code. The decision to use MySQL or PHP to
Murray @ PlanetThoughtful wrote:
Changing the * to a + (at least one or more occurrences) could 'fix'
that pattern (ie so that it doesn't match your string), depending on any
other values being tested by it.
*keyboardbiting* I see... thanks to all of you who helped so fast.
Jens
--
PHP
Hello,
From php manual:
$a $b Shift leftShift the bits of $a $b steps to the left (each step
means multiply by two)
$a $b Shift rightShift the bits of $a $b steps to the right (each step
means divide by two)
So i ask what this output?
$a = 4;
$b = 3;
echo $a $b;
echo $a $b;
Angelo
Gustav Wiberg mailto:[EMAIL PROTECTED]
on Saturday, September 24, 2005 9:48 PM said:
Thanx!
Ok so I had to look up and down that message 3 or 4 times before I found
this insignificant one line response. TRIM YOUR POSTS!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 9:18 AM said:
So i ask what this output?
$a = 4;
$b = 3;
echo $a $b;
echo $a $b;
You just spent 3-5 minutes writing an email and now almost 10 minutes
waiting for a reply to something that would have taken
On 9/26/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
From php manual:
$a $b Shift leftShift the bits of $a $b steps to the left (each step
means multiply by two)
$a $b Shift rightShift the bits of $a $b steps to the right (each step
means divide by two)
So i ask what this output?
$a
I tested; I don't want to waste peoples time. Rewriting the question:
$a = 4;
$b = 3;
$c = $a $b;
$d = $a $b;
echo c = . $c . br;
echo d = . $d . br;
this outputs:
c = 32
d = 0
The question is why?
Angelo
- Original Message -
From: Chris W. Parker
I tested; I don't want to waste peoples time. Rewriting the question:
this outputs:
c = 32
d = 0
The question is why?
First row is the bit's number and the second row is the bit's value:
#8 | #7 | #6 | #5 | #4 | #3 | #2 | #1
---
128 | 64 | 32 | 16 | 8 |
The second value is the number of spaces to shift, dint realize that.
Thanks for your time Chris.
Angelo
- Original Message -
From: Chris Boget [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, September 26, 2005 2:02 PM
Subject: Re: [PHP] Bitwise
Hello List,
I'm having some issues with PHP's FTPS support. I'm using ftp_ssl_connect()
to establish a connection (which is successful), however I am unable to
retrieve a directory listing or upload files. Does anyone have advice for
getting this to work? The uploaded file is created with a
Jason Petersen wrote:
Hello List,
I'm having some issues with PHP's FTPS support. I'm using ftp_ssl_connect()
to establish a connection (which is successful), however I am unable to
retrieve a directory listing or upload files. Does anyone have advice for
getting this to work? The uploaded file
-Original Message-
From: Jason Petersen [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 1:15 PM
To: php-general@lists.php.net
Subject: [PHP] FTPS transfers
Hello List,
I'm having some issues with PHP's FTPS support. I'm using
ftp_ssl_connect()
to establish a
how can i create a mysql sql statement to insert a php 'time()' into mysql?
i've got the mysql var 't1, timestamp' but i can't figure out how to do an
insert
$q = time();
$sql = sprintf(insert into foo (id, ctime) values(%d, %???), $id, $q);
can't figure out how to get this to work...
if i
bruce wrote:
how can i create a mysql sql statement to insert a php 'time()' into mysql?
i've got the mysql var 't1, timestamp' but i can't figure out how to do an
insert
$q = time();
$sql = sprintf(insert into foo (id, ctime) values(%d, %???), $id, $q);
can't figure out how to get this to
thanks...
but that's not it john... i'm not worried about creating the sql_statement
in the php...
i'm concerned that i can't seem to craft/create a basic sql cmd within mysql
to get a value (other than NOW()) to work...
if i do (from mysql)
-- insert into foo (id, time) values (2, 33), it
along the same way...
why can't i see the timestamp designation (ie the double/int) instead of the
date-time format when i look at the timestmp var when i do a 'select * from
t1' within mysql??
arrgghh!
-bruce
-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent:
bruce mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 11:13 AM said:
i'm concerned that i can't seem to craft/create a basic sql cmd
within mysql to get a value (other than NOW()) to work...
[snip]
my question is why???
MySQL timestamps are different from UNIX timestamps.
Chris.
bruce wrote:
thanks...
but that's not it john... i'm not worried about creating the sql_statement
in the php...
i'm concerned that i can't seem to craft/create a basic sql cmd within mysql
to get a value (other than NOW()) to work...
if i do (from mysql)
-- insert into foo (id, time) values
but that still doesn't explain why i can't slam some value directly into the
timestamp var within the mysql tbl...
-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 11:15 AM
To: php-general@lists.php.net
Subject: RE: [PHP] mysql/php date
john...
that appears to be it!! although i would have assumes it would have done a
most significant bit fill with 0's...
so my question also comes down to .. do i use the php date functions for
date/time manipulation.. or do i use the mysql functions
any thoughts/suggestions...
-bruce
bruce wrote:
john...
that appears to be it!! although i would have assumes it would have done a
most significant bit fill with 0's...
so my question also comes down to .. do i use the php date functions for
date/time manipulation.. or do i use the mysql functions
any
You would haven't happen to have an example? I am new to imagemagick. Any
help would be greatly appreciated.
On 9/26/05, Jim Moseby [EMAIL PROTECTED] wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 1:43 AM
To:
I need to catch all instances of a coordinate in a give string. So far I
have this, which only works if the coordinate is in a certain format.
$string = (334,-53.44),(111,222);
$expression = '([(][-]?[0-9]*[.0-9]*?,[-]?[0-9]*[.0-9]*?[)])';
preg_match_all($expression, $string, $matches);
This
On 2005-09-26, Rory McKinley [EMAIL PROTECTED] wrote:
If the index in question happens to be a unique index or a primary key
(really just a special case of index)
I thought a primary key is something defined at the logical, where an
index is defined at the implementation level.. Therefore, a
I need to catch all instances of a coordinate in a give string. So far I
have this, which only works if the coordinate is in a certain format.
$string = (334,-53.44),(111,222);
$expression = '([(][-]?[0-9]*[.0-9]*?,[-]?[0-9]*[.0-9]*?[)])';
preg_match_all($expression, $string, $matches);
-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Monday, September 26, 2005 2:46 PM
To: 'John Nichel'; php-general@lists.php.net
Subject: RE: [PHP] mysql/php date functions..
john...
that appears to be it!! although i would have assumes it
would have done a
On 9/26/05, Jim Moseby [EMAIL PROTECTED] wrote:
Try adding
ftp_pasv ( $conn, true );
JM
Jim,
That did the trick! Many thanks..
Jason
You would haven't happen to have an example? I am new to imagemagick.
Any help would be greatly appreciated.
Sure!
'convert -size 85x110 -raise 10x10 rebate.pdf -resize 85x110 rebate.jpg'
Assuming you have ImageMagick loaded, the above will take rebate.pdf and
create an 85x110
Wow, that definitely works. I would sort of like to know how to tweak the
regex, but maybe this is the best way of doing it. Is [0-9]*[.0-9]*? the
best way of looking for a number with decimals?
On 9/26/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote:
I need to catch all instances of a
so you play with the time/date vars on the php side, and then simply store
them in the mysql tbl as a int(10)... or do you actually store the vars in
the mysql timestamp...
and then use the mysql date/time functions...
ie. how would you do the following...
get a date (date1)
get a date
David Pollack wrote:
I need to catch all instances of a coordinate in a give string. So far I
have this, which only works if the coordinate is in a certain format.
$string = (334,-53.44),(111,222);
$expression = '([(][-]?[0-9]*[.0-9]*?,[-]?[0-9]*[.0-9]*?[)])';
here's a horrid little bit of
Graham Anderson wrote:
Progressive Load is for a .mov file
I need to keep the movie headers of the file intact...and just compress
the actual audio/video data :)
That way, Quicktime will not try to load the the whole thing before
knowing what to do with the file
I'll put the $key in my
or.. better yet.
if i do a php - time(), i get a unix_timestamp var. how do you guys store
this in mysql. you can't simply do an insert into a mysql/timestamp var. so
how do you convert it?
also, once you have the mysql tbl, how do you go from the mysql timestamp
var - the php var?
thanks
bruce wrote:
or.. better yet.
if i do a php - time(), i get a unix_timestamp var. how do you guys store
this in mysql. you can't simply do an insert into a mysql/timestamp var. so
how do you convert it?
I don't convert it. I store the UNIX timestamp in an INT(11) column.
also, once you
John Nichel mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 12:43 PM said:
I don't convert it. I store the UNIX timestamp in an INT(11) column.
This is going to be a basic question I'm sure but why INT and not
VARCHAR? Is it simply because a timestamp is a number?
Chris.
--
PHP
Read up on mysql date types and functions. You can convert a unix
timestamp to a mysql date with the FROM_UNIXTIME() function. If you
want to store as unix timestamp, store it in an int field. To use mysql
date functions on it, use the FROM_UNIXTIME() function. If you want to
store dates
Chris W. Parker wrote:
John Nichel mailto:[EMAIL PROTECTED]
on Monday, September 26, 2005 12:43 PM said:
I don't convert it. I store the UNIX timestamp in an INT(11) column.
This is going to be a basic question I'm sure but why INT and not
VARCHAR? Is it simply because a timestamp is
Hi
The PHP time() function returns the number of seconds since the Unix epoch
(Jan 1 1970 midnight) whereas MySQL uses a readable datestamp
See here:
http://dev.mysql.com/doc/mysql/en/datetime.html
for the MySQL date, time and date/time types
and here
Hello Bruce,
While the date functions are well documented - http://php.net/date - here is a
little example to manipulate the date with php, rather than mysql:
// set the new expiry date
// DATE FUNCTIONS FOR THE EXPIRY MODULE
// first perform date arithmetic
$listingExpiry = mktime
Wow, that definitely works. I would sort of like to know how to tweak the
regex, but maybe this is the best way of doing it. Is [0-9]*[.0-9]*? the
best way of looking for a number with decimals?
Hi David,
Just to answer this question, I would probably use something like the
following pattern
keep it on the list please.
and you still didn't answer the question :-)
snip
preg_match_all($expression, $string, $matches);
^-- why ? ...
are you wrapping the variable in double quotes?
/snip
...and also from your code:
$string =
Hi All,
My php5 web application needs to parse/marshall a bunch of large xml files into
php5 objects at the beginning of handling each request. These xml files are
static across all the requests and it is really time consuming to
parse/marshall them into php5 objects.
I am wondering if there is
Kevin Wang wrote:
My php5 web application needs to parse/marshall a bunch of large xml files into
php5 objects at the beginning of handling each request. These xml files are
static across all the requests and it is really time consuming to
parse/marshall them into php5 objects.
I am wondering
Ok, so this is the actual code that I'm using.
?
$string = ( 334, -53.44) ( 111 , 222 );
$testStr = $string;
// $string = str_replace( , , $string);
preg_match_all(-?([\d]+)?(\.[\d]+)?,$string, $matches);
var_dump($matches);
?
and the output is this...
*Warning*: No ending delimiter '-'
David Pollack wrote:
Ok, so this is the actual code that I'm using.
?
$string = ( 334, -53.44) ( 111 , 222 );
$testStr = $string;
// $string = str_replace( , , $string);
preg_match_all(-?([\d]+)?(\.[\d]+)?,$string, $matches);
preg_match_all(/-?([\d]+)?(\.[\d]+)?/, $string, $matches);
--
Kevin Wang wrote:
Hi All,
My php5 web application needs to parse/marshall a bunch of large xml files into
php5 objects at the beginning of handling each request. These xml files are
static across all the requests and it is really time consuming to
parse/marshall them into php5 objects.
I am
Hello List,
We are working on a PHP project that implements mass mailing to a large
number of its subscribers (expected 100,000-200,000 users; not spam mailing
BTW). So I am wondering if it is possible to use PHP CLI binary for this
purpose and if there are any problems with PHP in this case.
In tracking down a bug that I am seeing on a site I am working on, I
came accross bug #30153 (http://bugs.php.net/bug.php?id=30153). I must
say I am shocked that this bug was closed as 'bogus' Not only is
this a bug, it is a security issue! How can gzinflate not be responsible
for
87 matches
Mail list logo