php-general Digest 27 Feb 2007 17:18:51 - Issue 4649
Topics (messages 249476 through 249506):
Re: Array question
249476 by: Hap-Hang Yu
249483 by: Ford, Mike
249500 by: Gerry D
Array question - maybe UTF?
249477 by: Gerry D
$_SERVER[DOCUMENT_ROOT] IIS6
i have installed php in a IIS6 into a windows2003 i lost
$_SERVER[DOCUMENT_ROOT]
why ??
2007. 02. 26, hétfő keltezéssel 12.06-kor tedd ezt írta:
Hi:
Dumb error, please try again:
http://www.sperling.com/a/c
Plus, the point is to click the Speak CAPTCHA button and see if it speaks.
XP/IE7: the error message is gone, but button does nothing
Linux/Firefox: speak button
Marco Sottana wrote:
anyone knows a script that can get wikipedia content in .php ?
The easiest way would be to download the DB and then build some PHP to
access it.
http://en.wikipedia.org/wiki/Wikipedia:Database_download
Make sure you read everything on that page, and make sure you
On 27 February 2007 04:23, Gerry D wrote:
I have a question on how to retrieve the value that corresponds to a
key in an array.
$fruit = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry');
$key = array_search($c, $fruit);
if ( $key === FALSE )
Dotan Cohen wrote:
I need to populate an array with the contents of a directory. The
following code does not populate the $thumbnailFiles array like I
expect that it would:
?php
function listFiles ($directory) {
$files=array();
$dir = dir($directory);
while ($entry = $dir-read()) {
Brad Bonkoski wrote:
$files[] = $entry;
perhaps look into the array_push() function http://www.php.net/array_push
$files[] = $entry; is perfectly fine.
$thumbnailFiles=listFiles($thumbnailsDirectory);
printpre;
print_r($thumbnailsFiles);
print/pre;
The code is fine, spot the
On 27/02/07, Brad Bonkoski [EMAIL PROTECTED] wrote:
perhaps look into the array_push() function http://www.php.net/array_push
Thanks, but I cannot use array_push() as I don't know the name of the
array that I'll be pushing to. There are four calls to the listFiles
function, and each will
You have a typo in your code...
On 27/02/07, Jochem Maas [EMAIL PROTECTED] wrote:
Dotan Cohen wrote:
On 27/02/07, Brad Bonkoski [EMAIL PROTECTED] wrote:
perhaps look into the array_push() function http://www.php.net/array_push
Thanks, but I cannot use array_push() as I don't know the name of the
array that I'll be
On Tue, 2007-02-27 at 11:36 +0200, Robert Enyedi wrote:
In the PHP grammar I encountered the feature of casting to unset, e.g.
(unset)$a. I did not manage to find any specific documentation on this,
only people wandering what it might do
Hi
I have been using the shell_exec command to perform several server queries
quite succesfully i.e. analysing files systems by gettin ginformation returned
by df -kP (shell_exec('df -kP')). do any of you guts know if it is possible to
target a command like this on another server?
So
2007. 02. 27, kedd keltezéssel 13.17-kor h ezt írta:
Hi
I have been using the shell_exec command to perform several server queries
quite succesfully i.e. analysing files systems by gettin ginformation
returned by df -kP (shell_exec('df -kP')). do any of you guts know if it is
possible
Hi Ade,
Sure you can. You must develop 2 scripts. One that will act as
server and one as client.
So if you want to get details of server B from server A you should
have the server into B and client into A.
Be sure the communication between these 2 servers is securised
(using a
ssh2_exec would do it for you...
Best regards,
Peter Lauri
www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free
-Original Message-
From: h [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 27, 2007 3:18 PM
To:
I have a PHP clustering back end server, MCache.
It is available in source form at http://www.mohawksoft.org
It allows multiple PHP web servers to share session information without any
changes to PHP code and without NFS or a database. It is based on a backend
server mcached and a PHP extension.
A good php editor, with code completion, will help prevent this.
I like phpEdit. It even has a built-in syntax checker, which would have caught
your error immediately.
Dotan Cohen wrote:
On 27/02/07, Jochem Maas [EMAIL PROTECTED] wrote:
Dotan Cohen wrote:
On 27/02/07, Brad Bonkoski [EMAIL
On Tue, 2007-02-27 at 09:05 -0500, Al wrote:
A good php editor, with code completion, will help prevent this.
A decent brain with ample memory will suffice also. Upgrade packages not
available (yet) :)
Cheers,
Rob.
I like phpEdit. It even has a built-in syntax checker, which would have
Mike,
See entire function under topic Array question - maybe UTF?...
I am trying to change accented characters to their equivalent without accents.
And yes, the arrays look fine after var_dump()...
Gerry
On 2/27/07, Ford, Mike [EMAIL PROTECTED] wrote:
On 27 February 2007 04:23, Gerry D
Has anyone ever used php to access the DPV and AMS Postal cds from the
USPS? If so, can you share any basic examples on how to get started
with it?
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'll check into them frowning on that. Currently, I just want to see
if I can do it.
Trust me, I am in NO way a competitor to you. :) I'm just a bored geek. :D
On 2/27/07, Jason Pruim [EMAIL PROTECTED] wrote:
Hi Chris,
From my understanding wouldn't the postal service frown upon that?
h wrote:
I have been using the shell_exec command to perform several server queries
quite succesfully i.e. analysing files systems by gettin ginformation
returned by df -kP (shell_exec('df -kP')). do any of you guts know if it is
possible to target a command like this on another server?
Chris Ditty wrote:
Has anyone ever used php to access the DPV and AMS Postal cds
from the USPS? If so, can you share any basic examples on how
to get started with it?
Andrew and Randy (two previous AME leads) started a project a while ago
called phpZ4:
http://sf.net/projects/phpz4/
I'd
Thanks Chris. I was thinking that Randy did something like that. I
was planning on calling him for the project name.
On 2/27/07, Chris Shiflett [EMAIL PROTECTED] wrote:
Chris Ditty wrote:
Has anyone ever used php to access the DPV and AMS Postal cds
from the USPS? If so, can you share any
M5 wrote:
I am trying to write a regex function to extract the readable (visible,
screen-rendered) portion of any web page. Specifically, I only want the
text between the body tags, excluding any script or style tags
within the document, also excluding comments. Has anyone here seen such
a
I believe it is better to use strpos() in this case because it's faster.
?php
$start = strpos(strtolower($website_code), 'body');
// not necessary
$end = strpos(strtolower($website_code), '/body');
$code = substr($website_code, $start, $end-$start);
echo strip_tags($code); // clean text
?
I am trying to write a regex function to extract the readable
(visible, screen-rendered) portion of any web page. Specifically, I
only want the text between the body tags, excluding any script or
style tags within the document, also excluding comments. Has anyone
here seen such a regex? Is
- Original Message -
From: M5 [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tuesday, February 27, 2007 6:47 PM
Subject: [PHP] Extract printable text from web page using preg_match
I am trying to write a regex function to extract the readable
(visible, screen-rendered) portion
I always wondered if anyone had a perfect brain. Us ordinary mortals require
help.
Robert Cummings wrote:
On Tue, 2007-02-27 at 09:05 -0500, Al wrote:
A good php editor, with code completion, will help prevent this.
A decent brain with ample memory will suffice also. Upgrade packages not
I am running Apache HTTP 1.3 with PHP 4.2.2 and MySQL 3.23.
Do I need to apply any kind of patches to my PHP related to Daylight
Savings Time 2007 change?
___
Dzenan Causevic
Web Applications Developer
NaviSite, Inc.
315-453-2912 x5346 (Office)
On Tue, February 27, 2007 11:47 am, M5 wrote:
I am trying to write a regex function to extract the readable
(visible, screen-rendered) portion of any web page. Specifically, I
only want the text between the body tags, excluding any script or
style tags within the document, also excluding
The manual entry for shell_exec has a comment that notes to execute .bat
files with shell_exec, you need to pass the command through cmd.exe with
the /c argument. I was wondering if anyone could share some insight on
why that is.
I've pretty much verified that this is the case. I can't
On Tue, February 27, 2007 7:17 am, h wrote:
I have been using the shell_exec command to perform several server
queries quite succesfully i.e. analysing files systems by gettin
ginformation returned by df -kP (shell_exec('df -kP')). do any of you
guts know if it is possible to target a command
On Tue, February 27, 2007 3:36 am, Robert Enyedi wrote:
In the PHP grammar I encountered the feature of casting to unset, e.g.
(unset)$a. I did not manage to find any specific documentation on
this,
only people wandering what it might do
(http://blog.thinkphp.de/archives/33-Casted-fun..html).
Or just turning on E_NOTICE, which you should do anyway.
On Tue, February 27, 2007 8:05 am, Al wrote:
A good php editor, with code completion, will help prevent this.
I like phpEdit. It even has a built-in syntax checker, which would
have caught
your error immediately.
Dotan Cohen wrote:
On Tue, February 27, 2007 2:12 am, Marco Sottana wrote:
anyone knows a script that can get wikipedia content in .php ?
?php
file_get_contents(http://en.wikipedia.org/wiki/$foo;);
?
--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
The user that runs the php script under iis (IUSER_maschine name) should
have permissions to execute the cmd.exe file, the .bat file and all the
commands included in the .bat file.
- Frank
The manual entry for shell_exec has a comment that notes to execute .bat
files with shell_exec, you
hello,
for translating our web applications, we use to create an XML file with the
labels; one label for each entry; one file for each language.
This let us:
1. create one file (in french) and let someone do the translations
2. provide the 'key users' (admins) of the application a php page
- Original Message -
From: Vincent DUPONT [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tuesday, February 27, 2007 10:33 PM
Subject: [PHP] gettext online editor?
hello,
for translating our web applications, we use to create an XML file with
the labels; one label for each
hi,
maybe you can try this:
in the IIS properties, you can define the user running your IIS service.
Ususally this is IUSR_xxx, but you can set a administrator user (see directory
Security/ anonymous user)
try to put your win login (prefixed with your domain\ and give your password.
If you
On 27/02/07, Al [EMAIL PROTECTED] wrote:
A good php editor, with code completion, will help prevent this.
I like phpEdit. It even has a built-in syntax checker, which would have caught
your error immediately.
As soon as the Linux version comes out I'll be sure to give it a whirl. Thanks.
Once you submit the form, it's a done deal, and you're going to get a
response back...
Maybe you want some kind of AJAX-y thing somewhere?
On Mon, February 26, 2007 10:23 am, Dan Shirah wrote:
Hello all,
I have a page that has multiple submits on it. One submit is within
my
javascriptfor
On Mon, February 26, 2007 1:14 pm, David Giragosian wrote:
However, since I have a form within a form, it is giving me
problems.
You simply cannot nest one form inside another, if that's what you are
doing...
Don't do that.
--
Some people have a gift link here.
Know what I want?
I want you
On Mon, February 26, 2007 7:49 am, Martin Marques wrote:
Is it posible to run apache with PHP4 and PHP5 on different virtual
domains?
Search the list archives for Rasmus Lerdorf and ProxyPass and I
think you'll find a fairly easy way to do it.
--
Some people have a gift link here.
Know what I
I don't think it does know, nor care, nor should it...
Why would it need to know that?...
You may find the info you want in a backtrace function at
http://php.net/
On Mon, February 26, 2007 8:15 am, clive wrote:
Thanks Vincent,Stut and Olaf. Thats __file___ is exactly what I needed
:)
now
Just add another array for each with $artist as the key.
while ($artist, $vote, $email) = mysql_fetch_row($results)){
$votes[$artist] = $vote;
$emails[$artist] = $email;
}
Although, actually, there is probably some better ways to do what you
are doing, but with only the query to look at,
Richard Lynch wrote:
Just add another array for each with $artist as the key.
while ($artist, $vote, $email) = mysql_fetch_row($results)){
I think you ment
while ( list($artist, $vote, $email) = mysql_fetch_row($results) ){
$votes[$artist] = $vote;
$emails[$artist] = $email;
}
Although,
On Tue, February 27, 2007 3:47 pm, Dotan Cohen wrote:
On 27/02/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-02-27 at 09:05 -0500, Al wrote:
A good php editor, with code completion, will help prevent this.
A decent brain with ample memory will suffice also. Upgrade packages
not
On Tue, February 27, 2007 2:59 pm, Shu Chow wrote:
The manual entry for shell_exec has a comment that notes to execute
.bat
files with shell_exec, you need to pass the command through cmd.exe
with
the /c argument. I was wondering if anyone could share some insight
on
why that is.
I've
Didja see this one:
http://us3.php.net/manual/en/function.memcache-debug.php
Not, perhaps, the best answer, and maybe even not possible in your
environment, but it may be useful for development, if not production.
You could also check the getServerStats functions to see if their
stats provide
As another option, you could, in theory, use mime_magic or the new
fileinfo or I think there's a GD function to guess at the type...
Personally, I think your first mistake was putting the image into the
DB at all.
Unless you're the CIA doing pixel comparisons actually in SQL stored
procedures or
You are essentially re-inventing ht://dig which is probably a Bad Idea.
But if you want to fopen() a URL, you have to have 'http://' on the
front of it, so PHP knows it's a URL, and not a very oddly-named file.
On Sun, February 25, 2007 12:43 pm, Miguel Vaz wrote:
Hi,
I am
On Sun, February 25, 2007 8:27 pm, Kevin Waterson wrote:
This one time, at band camp, zerof [EMAIL PROTECTED] wrote:
It is not a good practice to store pictures in DataBases, use links,
instead of.
Rubbish, where are your benchmarks?
In the archives.
Unless your images are teeny-tiny and
On Sun, February 25, 2007 11:30 am, StainOnRug wrote:
Hello again.. I recently posted a question about include files.. I
appreciate
the responses I received but my question wasnât answered.. its my
fault I
didnât explain myself 100%.. I know how to use the include files..
What I am
On Sun, February 25, 2007 9:22 am, tedd wrote:
Hi gang:
I can combine two mp3 sound files together by simply:
// load first
$file = a.mp3;
$handle = fopen($file, rb);
$size = filesize($file);
$load = fread($handle, $size);
fclose($handle);
// load second
$file = b.mp3;
$handle =
Causevic, Dzenan wrote:
I am running Apache HTTP 1.3 with PHP 4.2.2 and MySQL 3.23.
Do I need to apply any kind of patches to my PHP related to Daylight
Savings Time 2007 change?
The -internals list might be a better place to search / ask.
--
Postgresql php tutorials
On Mon, February 26, 2007 11:16 am, Colin Guthrie wrote:
tedd wrote:
PS: What does this have to do with php? Well... a good deal of the
code
is php and a mix of a bunch of other stuff (we don't live in a
vacuum)
-- so please permit me this indulgence.
Personally, I think this would be
Restart Apache and see what it spits into the log when it tries to
load it.
Post that message here for interpretation, if it's not clear.
A message not unlike:
OCI: dll could not be loaded
often means that OCI was trying to load ANOTHER DLL that it couldn't
find, not that OCI itself was not
Are you making a single eshop for just one store, or are you planning
on your eshop being distributed to a zillion users?...
Cuz unless your store gets a MILLION hits, the generation of static
HTML instead of just using PHP will probably not save you very much at
all.
Write the application the
Your cart and all that has to open a DB connection anyway.
Unless you do something horribly wrong in DB design, running one more
simple query is CHEAP once you pay the price of making a connection.
Benchmark it on your hardware and find out.
On Sun, February 25, 2007 5:06 am, Martin Zvarík
Save us a lot of grief and just use PHP built-in sessions until you
can prove them to not meet your needs.
On Sat, February 24, 2007 7:48 pm, benifactor wrote:
i would like your input on session vs cookies regarding login data
like usernames/passwords ect...
--
Some people have a gift link
On Sat, February 24, 2007 8:44 pm, Chris wrote:
I haven't done it with FC6 but have with previous versions of redhat
as
far back as 6.2 (I'm sure someone else will say they've done it for
longer :P).
I still have my RedHat 4 CDs from cheapbytes in their original
cardboard shipping envelope,
I recall having a problem with PHP on Windows and IE where however
long the session timeout was, that's how long the session lasted, as
either the server or the browser was never sending/getting the new
cookies.
Well, actually, there was an additional 10-minute offset, as the web
server clock was
On Sat, February 24, 2007 1:50 pm, Larry Garfield wrote:
Yes, you can end up with both a GET and a POST. (I'm not sure if it's
technically legal in the HTTP standard, but it can happen in practice,
IIRC.)
Having GET data included with a POST request, where the GET is just
part of the URL, is
Use ?php phpinfo();? and see what *IS* there.
If what you want isn't there, then the web server didn't provide it.
If the web server didn't provide it, PHP can't be blamed for not
passing it on to you, which is *ALL* PHP does here.
So what you have is a web-server configuration issue in that
Re-authenticate and make them login again when they do something
particularly dangerous/serious/big-time.
Nothing you've listed matches the above, except maybe changing their
current password to a new one.
I suppose you could do it just to change any profile setting, but some
goofball out there
While it might not be specific to php, there are some people out there who
are both
systems admins and web developers. I do agree however that this is not the
most appropriate list.
Peter: If you want to take this offline, send me a private email. I've
configured what you are looking
for and
Hello
Can someone please help explain how the order of object destructors called
at shutdown is determined, especially with regards to objects composed
of other objects?
For example in the code below, the first example calls the destructors
exactly in the order I would expect. Since object B is
On 28/02/07, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, February 27, 2007 3:47 pm, Dotan Cohen wrote:
On 27/02/07, Robert Cummings [EMAIL PROTECTED] wrote:
On Tue, 2007-02-27 at 09:05 -0500, Al wrote:
A good php editor, with code completion, will help prevent this.
A decent brain with
On Tue, February 27, 2007 6:11 pm, james james wrote:
Can someone please help explain how the order of object destructors
called
at shutdown is determined, especially with regards to objects composed
of other objects?
I think that changed from version to version, so unless you are on a
On Wed, 2007-02-28 at 00:08 +0200, Peter Lauri wrote:
. ask to join a project you are working on?
I am working on a larger and longer project and we are looking for one more
developer. He should be strong in object oriented programming. A general
problem solver would be beneficial as there
[snip]
He would need to work in-house. And the location is somewhere in
Scandinavia. He could work as sub contractor or employed for my company.
[/snip]
I don't know too many list denizens who live in Scandinavia, so that
severely limits your choices.
--
PHP General Mailing List
Richard et al.,
You are right, the variable was not being provided for the apache
server. Essentially I found the answer here
http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#remote-user-var
The document has to be protected in order for apache create the
REMOTE_USER variable. This was an
On Tue, 2007-02-27 at 18:59 -0600, Jay Blanchard wrote:
Howdy cats and kittens!
I had an interesting thought after watching a demo of a POS system and
wondered if the same type of methodology could be applied in a PHP
application. I haven't thought this all the way through, but a
Without any more than a few minutes worth of work, you can make MySQL do
that with replication. Your in-store system could act as a slave to for
the central system databases (any central updates trickle down to the
slave automatically) and your in-store machine could be the master for
the
This one time, at band camp, Richard Lynch [EMAIL PROTECTED] wrote:
*ALL* of the arguments on this topic, and benchmarks, are in the PHP
General archives.
I am not concerned with past benchmarks done by others, I am asking what
current benchmarks this user has made to make his claim.
Kevin
--
The company I work for is currently doing this... using PHP in a retail
environment, with a Linux server in every store, talking to the POS
controller via a socket, storing data in a database (postgres), and
processing retail transactions in real-time. And, sending results of
those transactions
From my experience, database replication from the central server to each
of the stores won't scale...
We use a timed (every X minutes), home-brewed protocol that does
something similar to a synchronization. And, we don't synchronize the
entire database at central server (as there are parts of
Thanks, guys, for the responses. I'll check the events and IIS logs
tomorrow. This afternoon, I put the IIS user into the Administrators
group, but no luck - the same exact thing, or lack of thing, happened. I
told this to the IT head and he agrees that it's probably not a
permissions issue.
How do I encode it? And would the href tag work?
Casey Chu wrote:
^ So put that into a a href tag.
On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote:
Try using Javascript? Or use all entities? For example:
mailto:php-general@lists.php.net would turn into
I'm not sure with both of your questions. I'm too lazy to try.
Untested: But to encode it, you would use
preg_replace_callback('~([\d\w])~', create_function('$a', 'return
#.ord($a[0]).;;'), $theEmail);
Hopefully that works?
On 2/27/07, John Taylor-Johnston
[EMAIL PROTECTED] wrote:
How do I
[snap]
[snip]
He would need to work in-house. And the location is somewhere in
Scandinavia. He could work as sub contractor or employed for my company.
[/snip]
I don't know too many list denizens who live in Scandinavia, so that
severely limits your choices.
[/snap]
I live in Thailand but that
It works. =P I tested it.
Try it here! =P
http://themfund.com/snippets/test.php
On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote:
I'm not sure with both of your questions. I'm too lazy to try.
Untested: But to encode it, you would use
preg_replace_callback('~([\d\w])~', create_function('$a',
I need an anti-spam-spider measure for my site. Too many addresses are
getting raked. In once instance, I created a flash page:
http://erasethis.glquebec.org/English/contact.htm
But I just don't have the time to create a flash image for every single
instance, most of which come from dynamically
^ So put that into a a href tag.
On 2/27/07, Casey Chu [EMAIL PROTECTED] wrote:
Try using Javascript? Or use all entities? For example:
mailto:php-general@lists.php.net would turn into
Try using Javascript? Or use all entities? For example:
mailto:php-general@lists.php.net would turn into
#109;#97;#105;#108;#116;#111;#58;#112;#104;#112;#45;#103;#101;#110;#101;#114;#97;#108;#64;#108;#105;#115;#116;#115;#46;#112;#104;#112;#46;#110;#101;#116;
On 2/27/07, John Taylor-Johnston
Does anyone know where I could find PHP Documentation in XML or in an SQL dump?
I'm trying to write an IRC bot that can retrieve information on php functions,
and am realizing this would be the easiest way.
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To
Neat, and thnaks.
How spam-spider-proof is it? I will try this though.
But I will also try it with mailto:; in entities as well.
Thanks!
John
!-- HERE ARE THE ENTITIES --
a
On 27-Feb-07, at 1:44 PM, Richard Lynch wrote:
On Tue, February 27, 2007 11:47 am, M5 wrote:
I am trying to write a regex function to extract the readable
(visible, screen-rendered) portion of any web page. Specifically, I
only want the text between the body tags, excluding any script or
John Taylor-Johnston wrote:
Neat, and thnaks.
How spam-spider-proof is it? I will try this though.
But I will also try it with mailto:; in entities as well.
Thanks!
John
!-- HERE ARE THE ENTITIES --
a
Peter Lauri wrote:
[snap]
[snip]
He would need to work in-house. And the location is somewhere in
Scandinavia. He could work as sub contractor or employed for my company.
[/snip]
I don't know too many list denizens who live in Scandinavia, so that
severely limits your choices.
[/snap]
I live
Hello
My name is Lara Thynne and I am a PhD candidate at Deakin University
Australia.
I am currently running a survey at the following address.
https://dcarf.deakin.edu.au/surveys/oss/
The survey is completely confidential and looks at your views and
motivations to use Open Source software
92 matches
Mail list logo