Looking to squeeze as much out of my core scripts (not that they are
slow ;) ).
The thought arose that I can replace simple functions like
is_string(), is_array() with simpler php code.
For example -
?php
$foo = array('foo','foo','foo','foo','foo','foo','foo','foo','foo','foo',
Chris W. Parker wrote:
Of all these things can it connect to FTP locations?
I tried it out but could only manage to open files from my local
harddrive which is exactly where my php files are not.
Try HTMLKit: it can connect to an ftp-server.
http://www.html-kit.com
Erwin Kerk
Web Developer
--
I need to know how I can do a where clause in a select statement for mysql
where
one of the fields can have two solutions. In the example below
field3 needs to equal all with a and also all with b. Can this be done and
if so how.
I am stumped on this one.
select * from table where field1=
You should direct such queries to the MySQL mailing list as this is a PHP
list.
[EMAIL PROTECTED]
or try their website:
www.mysql.com
Your answer however is here:
http://www.mysql.com/doc/en/SELECT.html
- Original Message -
From: Richard Kurth [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Hi,
Tuesday, December 16, 2003, 6:30:22 PM, you wrote:
RK I need to know how I can do a where clause in a select statement for mysql
RK where
RK one of the fields can have two solutions. In the example below
RK field3 needs to equal all with a and also all with b. Can this be done and
RK if so
hi,
I amnovice to PHP development, please could anybody tell me what
reporting tools are used in PHP, as we use Crystal Reports in VB.
Is there any freeware reporting tools available?
Regards,
M
Jswalter schrieb:
...
- allow apostrophes, but only if preceded *and* followed by a Alpha/Extend
- allow hyphen/dash, but only if preceded *and* followed by a Alpha/Extend
...
hi walter,
how about something like this:
?php
$_alpha = 'a-zA-Z'; // standard latin letters
$_xascii =
hi,
Sven wrote:
take a look at http://www.php.net/manual/language.variables.php:
A valid variable name starts with a letter or underscore, followed
by any number of letters, numbers, or underscores.
so, a minus isn't allowed in varnames!
hth SVEN
I agree with you but let me say the
Chris W. Parker schrieb:
Hi everyone,
Last Friday I struggled for a long time with displaying some data that's
stored using the Modified Preorder Tree Traversal method. Without making
this email overly long and complicated (like my first draft was) I'd
like to simply ask if someone has any links
Hi,
I am Using PEAR DB and i got this error after I have upgraded php4 to php5.
Fatal error: Only variables or references can be returned by reference in
/var/www/php/lib/php/DB/common.php on line 766
Could anybody tell me what I can do to resolve that error.
Regards,
Marc.
It would be a good idea to create a database abstaction class. This means
that should you move your application to a different database you only have
to replace your database class, instead of recoding everything with the new
set of functions. It can also be neater than using the mysql functions
I found that the script accually breaks on this line :
[Mon Jul 14 12:17:26 2003] [error] PHP Notice: INSERT INTO tbl_news
(band_id, date, heading,heading_eng, ingress,ingress_eng, body,body_eng)
VALUES (-1,2003-07-14,TESTAMENT endelig til Norge!!!, Spiller p Rock
in - spesial treat for the
[snip]
I found that the script accually breaks on this line :
[Mon Jul 14 12:17:26 2003] [error] PHP Notice: INSERT INTO tbl_news
(band_id, date, heading,heading_eng, ingress,ingress_eng, body,body_eng)
VALUES (-1,2003-07-14,TESTAMENT endelig til Norge!!!, Spiller p
Rock
in - spesial treat for
[snip]
I am Using PEAR DB and i got this error after I have upgraded php4 to
php5.
Fatal error: Only variables or references can be returned by reference
in
/var/www/php/lib/php/DB/common.php on line 766
Could anybody tell me what I can do to resolve that error.
[/snip]
Go back to PHP4? We'd
[snip]
I am novice to PHP development, please could anybody tell me
what reporting tools are used in PHP, as we use Crystal Reports in VB.
Is there any freeware reporting tools available?
[/snip]
I am sure there are, have you Googled for PHP
Hello, im testing the php_admin_value disable_functions froma Vhost in my Apache, and
not works, is are set from Master (php.ini) works, but set via Apache vhost not works,
any are using from apache php_admin_value disable_functions bla,bla,bla ?
--
--
Alberto
Hi there. I've been looking at the behaviour of the round functionality in
PHP. We're currently still using v4.2.3, (but the documentation seems to
suggest it's the same for versions after this).
Doing the following rounds always rounds *up* to the nearest whole number.
i.e.
0.5 = 1
1.5 = 2
I found out that what the script accually does is choke on \n\n,
empty lines. I havnt found a way to solve this with the script,
What I do now is use TextPad and just replace all occurencies
of \n\n with \n-\n or something and it works all nice. But this
is a bad way of doing it, since the script
On Tue, Dec 16, 2003 at 11:13:25AM +, Scott McDaid wrote:
:
: Hi there. I've been looking at the behaviour of the round functionality in
: PHP. We're currently still using v4.2.3, (but the documentation seems to
: suggest it's the same for versions after this).
:
: Doing the following
[snip]
I found out that what the script accually does is choke on \n\n,
empty lines. I havnt found a way to solve this with the script,
What I do now is use TextPad and just replace all occurencies
of \n\n with \n-\n or something and it works all nice. But this
is a bad way of doing it, since the
Alfredo schrieb:
hi,
Sven wrote:
take a look at http://www.php.net/manual/language.variables.php:
A valid variable name starts with a letter or underscore, followed
by any number of letters, numbers, or underscores.
so, a minus isn't allowed in varnames!
hth SVEN
I agree with you but
On Tue, Dec 16, 2003 at 01:30:14PM +0100, Kim Steinhaug wrote:
:
: I found out that what the script accually does is choke on \n\n,
: empty lines. I havnt found a way to solve this with the script,
:
: What I do now is use TextPad and just replace all occurencies
: of \n\n with \n-\n or
On 16 December 2003 11:13, Scott McDaid wrote:
Hi there. I've been looking at the behaviour of the round
functionality in PHP. We're currently still using v4.2.3, (but the
documentation seems to
suggest it's the same for versions after this).
Doing the following rounds always rounds *up*
Chris W. Parker wrote:
I will be interfacing with a CVS server not hosted on a Windows machine
(it will be a bsd/*nix variant) and frankly I've never used it. What
client do all you Windows people use? Also, how does it wotk in
conjuction with your favorite editor? (Mine is HTML-Kit.) Is it
Hello,
Thanks for you reply. The first approach works, I succesfully
imported 1.903.541 entries into my mySQL database, phew!
Problem was that as mentioned I had to massage the data
beforehand, which with TextPad didnt take to much time but
again I love my scripts to be complete and be
Hi there!
Does anyone know which is the best way to import orders from MIVA Merchant
into a MySQL DB? Currently, I'm using a Perl script that parses a plain file
generated by a script, but I'm looking for something more professional
like XML, Web-services, etc.
Thanks!
--
PHP General Mailing
php-general Digest 16 Dec 2003 13:37:19 - Issue 2476
Topics (messages 172770 through 172802):
CVS on Windows
172770 by: Chris W. Parker
172776 by: Mike Migurski
172800 by: Adam i Agnieszka Gasiorowski FNORD
Re: 4 project questions - help appreciated
172771
Attached is a little textfile on 4 lines, it will choke afte 1 line
due to the \n\n problem.
I use this loop to parse it :
$file= error_log.txt;
if($fp=fopen($file, r+))
{
while($line=trim(fgets($fp)))
{
echo $line . br;
}
}
--
Kim Steinhaug
I'm currently using a script that uses the GD library to resize images:
http://kentung.f2o.org/scripts/thumbnail/
The problem is that I don't like the way it does bi-cubic sampling - makes
the thumbnail look pixelated. Does anyone know of a way to make thumbnails
with bi-linear sampling?
-eric
Eric Wood wrote:
I'm currently using a script that uses the GD library to resize
images: http://kentung.f2o.org/scripts/thumbnail/
The problem is that I don't like the way it does bi-cubic sampling -
makes the thumbnail look pixelated. Does anyone know of a way to
make thumbnails with
Hello !
This is my code :
?php
#GET PRIVATE KEY PREVIOUSLY GENERATED
$private_key = openssl_get_privatekey('file://path_to_private_key',
'mypassword');
$data =
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx
yzabcdefghijklmnopqrstuvwxyzabcdefghijlm
For correct benchmarking you should run the test also when $foo == 'string'
Gerard Samuel wrote:
Looking to squeeze as much out of my core scripts (not that they are
slow ;) ).
The thought arose that I can replace simple functions like
is_string(), is_array() with simpler php code.
For example
I am trying to senf a pdf (or any other file for that matter) to a network
printer. i would rather not do it with a system command, is there a bulildin
way of doing so. i am going in circuls an d could't find anyway to do it.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To
I currently use a .htaccess file for users to login, and now I need to
make some changes to how the site works.
I need to be able to have the users login, and once that is done the
login needs to be used to pass through the database. And to pull files
from a directory as nobody seems to listen
Hi All,
I'm looking for a PHP program like mnoGoSearch but without the need to recompile it
with PHP. Does such a PHP program exist?
Basically, I want the program to index file types of .doc, .txt, .html, .pdf, etc.
And also the contents of a database data table.
Thanks,
Kevin
Greetings all.
In an effort to understand more about mime mail with php, I'm writing a
little function to send a multipart/alternative encoded mime mail from a
browser interface. I know you guys have answered these types of questions
many times, but I've googled and research til I'm blue. I'm
My folding is setup to work based on a function to fold and unfold. I
have the function mapped to my spacebar, so pressing it while
in escape mode will either fold or unfold the code
Place this in your .vimrc and then you can use {{{ and }}} as your
start and end tags
Hi,
I am using ldap_bind to connect to an Active Directory server to
authenticate users on a website. Although the script is running,
occasionally, and at random, the process to authenticate the user will take
almost exactly 75 seconds (within 100ths of a second). Other times the
authentication
On Tuesday 16 December 2003 09:33 am, Marek Kilimajer wrote:
For correct benchmarking you should run the test also when $foo == 'string'
Actually, I did, showing similar results to my first example.
?php
$foo = 'string';
for($x=0; $x 100; $x++)
{
if ($foo === @(array)$foo)
//if
Greetings all. (hope this isn't a second post, first try seemed to fail)
In an effort to understand more about mime mail, I'm writing a
little function to send a multipart/alternative encoded mime mail from a
browser interface. I know you guys have answered these types of questions
many times,
There's no other way, only system command.
Shay wrote:
I am trying to senf a pdf (or any other file for that matter) to a network
printer. i would rather not do it with a system command, is there a bulildin
way of doing so. i am going in circuls an d could't find anyway to do it.
Thanks.
--
PHP
--- Robert Sossomon [EMAIL PROTECTED] wrote:
I currently use a .htaccess file for users to login, and now I need
to make some changes to how the site works.
I need to be able to have the users login, and once that is done the
login needs to be used to pass through the database.
Search PEAR
I see 3 problems with your final output (though there still could be more)
1) Each header has to end in \r\n, \n usually works but it's supposed to be
\r\n
2) This:
$headers .=Content-Type: multipart/alternative;
boundary=\--i0o9u8h7g65v\;
should be this:
$headers .=Content-Type:
You may want to try using PEAR's Mail_Mime class.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mike Migurski mailto:[EMAIL PROTECTED]
on Monday, December 15, 2003 10:03 PM said:
Tortoise is a popular CVS client for windows -- CVS commands are
added to the contextual menu in [[whatever windows calls its
Finder]]. All of your files are edited locally, using the editor of
your choice.
...and talking about mail, is there a class to parse an incoming mail?
Let me explain: I'm using the great POP3 pear class to receive mail, but
I'm having trouble separating the different parts in an
multipart/alternative type of msg. Is there a class to receive the
result from POP3 class and
Cesar Cordovez wrote:
...and talking about mail, is there a class to parse an incoming mail?
Let me explain: I'm using the great POP3 pear class to receive mail, but
I'm having trouble separating the different parts in an
multipart/alternative type of msg. Is there a class to receive the
Tortoise is a popular CVS client for windows -- CVS commands are added
to the contextual menu in [[whatever windows calls its Finder]]. All of
your files are edited locally, using the editor of your choice.
Does that mean you have to have Apache/PHP installed on your workstation?
No, it
To solve this problem you need a norwegian keyboard so I
might aswell type the whole question in norwegian, sorry gyez!
---
Jeg har støtt på noen problemer når det gjelder å konvertere
domenenavn mot Norids egen ACE konverter. Jeg har
W cool. I went there, but I thought this class only worked for
sending mails. Great!
Justin Patrin wrote:
Well, you could look for yourself. ;-)
Yes, there is. Mail_Mime does both encoding and decoding.
http://pear.php.net/package/Mail_Mime
--
PHP General Mailing List
On Tue, Dec 16, 2003 at 07:30:09PM +0100, Kim Steinhaug wrote:
To solve this problem you need a norwegian keyboard so I
Nah, you can just cut and paste (:
might aswell type the whole question in norwegian, sorry gyez!
---
Jeg
I am not trying to authenticate off of a database though. I have
scripts that automatically modify the .htaccess file as I change a user,
so I need to authenticate off the .htaccess file and store the users
information into a cookie. I think from the cookie I can do everything
else, just not
Robert Sossomon wrote:
I am not trying to authenticate off of a database though. I have
scripts that automatically modify the .htaccess file as I change a user,
so I need to authenticate off the .htaccess file and store the users
information into a cookie. I think from the cookie I can do
--- Robert Sossomon [EMAIL PROTECTED] wrote:
I am not trying to authenticate off of a database though. I have
scripts that automatically modify the .htaccess file as I change a
user, so I need to authenticate off the .htaccess file and store
the users information into a cookie. I think from
Duh, OK, Now I REALLY feel stupid. With the current setup using the
.htaccess files and everything I have in place all I needed to do was
get the information from: $_SERVER['PHP_AUTH_USER'] and
$_SERVER['PHP_AUTH_PW']. I kept thinking I had to use PHP to set those
values. Thanks guys!! Works
I am using Pdf-Php to create pdf docs. I have a long text line that wraps
automatically when outputted in the pdf. That is what it is suppose to do,
however, it also outputs the new lines of the text in the source of the php
file. That is not what I want. So I do a string replace for the \n and
On Tue, 2003-12-16 at 15:02, Christopher J. Crane wrote:
I am using Pdf-Php to create pdf docs. I have a long text line that wraps
automatically when outputted in the pdf. That is what it is suppose to do,
however, it also outputs the new lines of the text in the source of the php
file. That
That worked.
Thanks Robert.
Robert Cummings [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Tue, 2003-12-16 at 15:02, Christopher J. Crane wrote:
I am using Pdf-Php to create pdf docs. I have a long text line that
wraps
automatically when outputted in the pdf. That is what it is
Sven wrote:
hi alfredo,
maybe you can workaround with arrays? for keys you can use any string.
so $xml['REG-ORIG'] is valid in php.
I'm not so expert with XML parsing, I just took examples from PHP
manual..thanks
ciao
alfredo
hth SVEN
--
PHP General Mailing List (http://www.php.net/)
To
Daniel Pupius wrote:
It would be a good idea to create a database abstaction class. This means
that should you move your application to a different database you only have
to replace your database class, instead of recoding everything with the new
set of functions. It can also be neater than
Do you have long lines? If not try this:
$file = error_log.txt;
if (($fp = fopen($file,'r+') !== 0)
{
// Increment the 1024 sufficiently to read enough data, fgets
automatically stops at \n
while ($line = fgets($fp,1024))
{
if ($line != ) echo($line.br);
}
}
Alternatively, do
Hi All,
I'm looking for a PHP program like mnoGoSearch but without the need to recompile it
with PHP. Does such a PHP program exist?
Basically, I want the program to index file types of .doc, .txt, .html, .pdf, etc.
And also the contents of a database data table.
Thanks,
Kevin
Finally!
The answer was this :
$url =
utf8_encode('http://www.norid.no/domenenavnbaser/ace/?action=Convertname=bl
åbær.no');
And it all finally works, :)
--
Kim Steinhaug
---
There are 10 types of people when it comes to binary
Hi.
I am trying to implement a search feature for a corporate website, but
haven't found anything that is viable.
My main problem seems to be that there are fewer options out there for
PHP/Apache/Windows.
ht://dig is not available for Windows.
The Google Web API has several limitations which
Try mnogosearch or aspseek both these are open source. aspseek does not
have a PHP front but it's template based with C back end. However i do
belive the windows version may not be free.
Chris wrote:
Hi.
I am trying to implement a search feature for a corporate website, but
haven't found
Hello everyone,
I looked through the FAQs and documentation and I cannot find this
anywhere:
We have a new Redhat server with this kernal: 2.4.20-20.9smp #1 SMP
We used redhat itself to install apache and php (I used to always do it by
hand)
apache: Server version: Apache/2.0.40
PHP Version
See PHP site for register globals.
Cheers,
Rob.
On Tue, 2003-12-16 at 19:41, Tom Holton wrote:
Hello everyone,
I looked through the FAQs and documentation and I cannot find this
anywhere:
We have a new Redhat server with this kernal: 2.4.20-20.9smp #1 SMP
We used redhat itself to
Thanks for the response.
I can't seem to find ASPSeek available for Windows at all. Did you say they
had one?
The windows version of mnoGoSearch looks like it could be suitable. Do any
of you have any experience with it? This isn't a large website (maybe a few
hundred pages), but it needs to
I posted this on the PHP-DB list and then realized it was a more general
question about PHP than DB so I am posting it here also hoping someone can
help.
I have a fairly common problem that I have not been able to find the
solution for in the documentation and FAQs. I have to access a MSSQL box
Hi,
Wednesday, December 17, 2003, 12:15:24 PM, you wrote:
ML I posted this on the PHP-DB list and then realized it was a more general
ML question about PHP than DB so I am posting it here also hoping someone can
ML help.
ML I have a fairly common problem that I have not been able to find the
ML
Michael Lewis wrote:
How can I pass this variable and its contents so they are usable to the next
web page?
The short answer is that you can't pass resources back and forth between
pages. You could consider passing the current index, rerunning the
query, and seeking to the new index.
OR, you
Thanks for the info, Tom. That explains it. I can't really run the query
again because of time and the size of the database. There is currently over
200,000,000 records in some of the tables. The subsets I get are generally
small. What my current thinking is, is to grab the info I need into a
Thanks, Justin. I'll look into it.
Michael
- Original Message -
From: Justin Patrin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 16, 2003 9:28 PM
Subject: [PHP] Re: saving resource objects
Michael Lewis wrote:
How can I pass this variable and its contents so
Hi,
Wednesday, December 17, 2003, 12:32:25 PM, you wrote:
ML Thanks for the info, Tom. That explains it. I can't really run the query
ML again because of time and the size of the database. There is currently over
ML 200,000,000 records in some of the tables. The subsets I get are generally
ML
If you're doing a large JOIN (which slows things down) you might try
writing it all as multiple queries in PHP and having PHP join it
together. It *may* be faster, especially for many joins.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Question:
When you hit enter in a text box is that classified as a \n?
---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On the second page of the tutorial text, it says: From the
RecordStorePHPStart folder copy the database, called 'recordstorePHP' ...
I don't see any such file. Anyone know where I can find it, or whether the
name's different from what the tutorial calls it?
Thank you.
On Wednesday, December 17, 2003, at 03:10 PM, Philip J. Newman wrote:
Question:
When you hit enter in a text box is that classified as a \n?
generally, yes.
depending on the client platform, it might be an \r\n or \r (I've
heard)...
justin
--
PHP General Mailing List (http://www.php.net/)
Ok thats cool, guess i'll look for both, and only one in the data
- Original Message -
From: Justin French [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 5:35 PM
Subject: Re: [PHP] Line breaks in PHP.
On Wednesday, December 17, 2003,
I will run some benchmarks (even though they may be flaky), but what would
be the fastest execution?
$search = array(
!-- [$cmd] --,
!--[$cmd]--,
!-- {.$cmd.} --,
!--{.$cmd.}--,
{.$cmd.},
);
$replace = STARTPHP. $action .ENDPHP;
Shawn, et al --
...and then Shawn McKenzie said...
%
% I will run some benchmarks (even though they may be flaky), but what would
% be the fastest execution?
...
%
% Or, if I created one expression that handled all of the five $search items
% (since they are similar) and used preg_replace()?
Currently in my code, if a user is blocking cookies (for what ever reason that
may be), it keeps generating session ids for each page load.
Is there a way to ignore and/or work around these users??
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello,
I have a HTML form through which I upload a file from the user's PC to the server.
But my PHP script gives the error:
Warning: fopen(C:\local path to\filename): failed to open stream: No such file or
directory
Note: I cannot use the POST method in HTML is because my webhost supports
For clarification, I'm looking for execution speed.
In the example below, $cmd may be a 100 plus item array and I loop through
the code below for each $cmd. So maybe I execute the code below 100 or more
times.
Thanks!
-Shawn
Shawn McKenzie [EMAIL PROTECTED] wrote in message
news:[EMAIL
Gerard Samuel wrote:
Currently in my code, if a user is blocking cookies (for what ever reason that
may be), it keeps generating session ids for each page load.
Is there a way to ignore and/or work around these users??
Thanks
You can turn on URL rewriting for sessions. I'm not sure where it is
85 matches
Mail list logo