Martin van den Berg <[EMAIL PROTECTED]> writes:
> I have this piece of php-code which inserts data into a database.
> Before inserting it must verify if the data is unique. The php code
> looks something like:
>
> $query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";
> $rows = execute( $quer
Richard Davey wrote:
Hello Joe,
Tuesday, August 9, 2005, 12:57:17 AM, you wrote:
JS> // call the include header file for that host
JS> if (file_exists("$includepath/$Header")) {// include valid?
JS> include stripslashes("$includepath/$Header"); // yup, include
JS> } else {
Hello RPG,
Tuesday, August 9, 2005, 12:52:48 AM, you wrote:
RG> Thanks. How do I override PHP settings using .htaccess?
php_value include_path ".:/usr/local/lib/php"
php_admin_flag safe_mode on
etc
Look at the manual section titled "How to change configuration
settings" for more details (it's
Hello Joe,
Tuesday, August 9, 2005, 12:57:17 AM, you wrote:
JS> // call the include header file for that host
JS> if (file_exists("$includepath/$Header")) {// include valid?
JS> include stripslashes("$includepath/$Header"); // yup, include
JS> } else {
JS> echo "FAILU
Thanks. How do I override PHP settings using .htaccess?
Hello RPG,
You cannot catch Fatal run-time errors with that method of error
handling. The error has occurred before the script settings have had a
chance to be picked up.
Check to see if your host allows you to use .htaccess settings to
o
Hi!
On 8/8/05, Richard Davey <[EMAIL PROTECTED]> wrote:
> Why are you creating lots of arrays and then using in_array to check
> them? Just seems a little pointless in this instance as it gives you
> no real benefit - comparing a one element array against a variable is
> just... well.. comparing
It seems to be that last line of your code which is causing the error. I've
no idea why though.
-James
- Original Message -
From: "Ivonne Trejo Silva" <[EMAIL PROTECTED]>
To:
Sent: Monday, August 08, 2005 2:46 PM
Subject: [PHP] oci8 recursive call in log
Hi! Please excuse my poor
Jochem Maas wrote:
Chris wrote:
In further looking at the SPL classes, I'm thinking I want to use the
RecursiveFilterIterator class to filter my nodes.
But I ran into another problem: the class RecursiveFilterIterator
does not exist.
Am I missing something here?
your out on the bleedin
Hi,
Tuesday, August 9, 2005, 3:04:41 AM, you wrote:
MP> Using --
MP> #!/usr/bin/perl
MP> ##
MP> ## printenv -- demo CGI program which just prints its environment
MP> ##
MP> print "Content-type: text/plain\n\n";
MP> foreach $var (sort(keys(%ENV))) {
MP> $val = $ENV{$var};
MP> $val =~ s|
Martin McGinn wrote:
> I installed MySQL 4.23 using SuSE provided rpms so it loads
> to /usr/lib64
>
>
> How do I configure the php 5.0 configure script so that it
> finds the mysql
> client in here while finding other objects in the /urs/local/.
>
> Currently the link fails as it does
I'm interested in extracting a series of web pages from a Yahoo forum
and storing them in a MySQL database so I can generate things like most
number of posts etc. I've searched on Google but most of the links seem
to be for email harversters!
Anyone have any tips for where to look?
Alan
--
Hello Eric,
Monday, August 8, 2005, 9:37:12 PM, you wrote:
EG> I have another file (doesexist.php) with the contents:
EG> header("HTTP/1.0 404 Not Found");
?>>
EG> If I enter into my browser:
EG> http://mydomain.com/doesexist.php
EG> I get a blank page. Apparently, this does not trigger th
Eric Gorr wrote:
I've got an ErrorDocument directive defined in my htaccess file.
If I, for example, enter into my browser:
http://mydomain.com/doesnotexist.html
the 404 directive is triggered and 404 document correctly comes up.
I have another file (doesexist.php) with the contents:
If
Hello RPG,
Monday, August 8, 2005, 9:34:52 PM, you wrote:
RG> I set my error report to 0 just like the ones at
RG> http://www.php.net/manual/en/ref.errorfunc.php: error_reporting
RG> (0);
RG> ... so that I can use the custom error handler function at
RG> http://www.php.net/manual/en/ref.errorfun
Martin,
Make a symlink from /usr/lib64 to /usr/lib and it should work just fine.
Joe
Martin McGinn ([EMAIL PROTECTED]) wrote:
>
> I installed MySQL 4.23 using SuSE provided rpms so it loads to /usr/lib64
>
>
> How do I configure the php 5.0 configure script so that it finds the mysql
> clie
I installed MySQL 4.23 using SuSE provided rpms so it loads to /usr/lib64
How do I configure the php 5.0 configure script so that it finds the mysql
client in here while finding other objects in the /urs/local/.
Currently the link fails as it does not find the mysql client so files.
T
I've got an ErrorDocument directive defined in my htaccess file.
If I, for example, enter into my browser:
http://mydomain.com/doesnotexist.html
the 404 directive is triggered and 404 document correctly comes up.
I have another file (doesexist.php) with the contents:
If I enter into my br
I set my error report to 0 just like the ones at
http://www.php.net/manual/en/ref.errorfunc.php:
error_reporting (0);
... so that I can use the custom error handler function at
http://www.php.net/manual/en/ref.errorfunc.php.
I'm on a shared server, by the way.
Hello RPG,
Where did you add
Jimmie wrote:
Warning: get_meta_tags(): php_network_getaddresses: gethostbyname
failed in d:\apache\htdocs\meta_tag.php on line 3
Looks like your DNS is failing or that host does not have a DNS record.
Have you tried going to that URL in a browser on the same machine the
PHP script is running
I need to make a report engine using a couple of mySQL tables.
What I'm working on is a "add/remove" select-option list with the
column names so the user can customize their own report. They can
add/remove the columns in the order that they want, then order by a
column asc/desc. The report page wil
wayne wrote:
On Mon, 2005-08-08 at 13:48 +0200, Jochem Maas wrote:
wayne wrote:
On Sun, 2005-08-07 at 23:14 +0200, Jochem Maas wrote:
Hi Jochem,
Hi Jochem,
Would you mine if I send you the beginning part of the
php script,about 20 lines of code, to see if I'm missing
something?
I would
Chris wrote:
In further looking at the SPL classes, I'm thinking I want to use the
RecursiveFilterIterator class to filter my nodes.
But I ran into another problem: the class RecursiveFilterIterator does
not exist.
Am I missing something here?
your out on the bleeding edge so to speak - no
my guess is that he is just trying to avoid errors in case the variable
is not an actual array.
arrays can easily be tested for by using: is_array( $myarray );
another way to manage arrays is to initialize them before you do
anything with them. i.e.: $myarray = array();
this way if you need
Jon,
i'm not for sure if this has it, but check out PEAR::I18N_V2
FYI, one should be included in PHP 5.2, whenever it arrives.
l0t3k
"Jon Hill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> Does anyone know of a simple PHP Currency Class that is similar to the one
>
In further looking at the SPL classes, I'm thinking I want to use the
RecursiveFilterIterator class to filter my nodes.
But I ran into another problem: the class RecursiveFilterIterator does
not exist.
Am I missing something here?
Confused,
Chris
--
PHP General Mailing List (http://www.php.
Hi! Please excuse my poor English.
I have this error in PHP 4.2.3 with oracle 8.1.7:
[14-Jul-2005 16:25:36] PHP Warning: OCI8 Recursive call!
in /ariadna/cgi-bin/dara/pucmatico/config/conecta_bd.php on line 50
[14-Jul-2005 16:25:36] PHP Warning: OCI8 Recursive call!
in /ariadna/cgi-bin/dara/pu
I'm trying to extend the RecursiveIteratorIterator class, to limit which
children it recurses through.
The documentation here:
http://www.php.net/~helly/php/ext/spl/classRecursiveIteratorIterator.html
says that there is a ahapublic method callHasChildren(), which I figured
was a good place to
Hello Sabine,
Monday, August 8, 2005, 7:17:51 PM, you wrote:
S> When I call the script for the first time the output is:
S> if, test: test
S> if, sesstest: test
S> test: test
S> sesstest: test
S> if, test2: test2
S> test2: test2
S> on all servers.
S> Additionaly I get a warning for the session_r
Hello to all,
I think, I have a basic problem of understanding sessions and the
storing of variables in sessions.
I have a simple script I tested on 3 Apache-servers, one with PHP 5.0,
one with 4.3.10 and one with 4.0.6.
I have to develop for the 4.0.6 !!! server.
The output is different for
Have you ever considered using the Java class within PHP using something
like the PHP-Java bridge? Here is a link for the bridge, PHP can call
the Java objects natively. It's pretty cool.
http://php-java-bridge.sourceforge.net/
I would use the bridge in a few situations:
1. The Java c
Hello Joe,
Monday, August 8, 2005, 6:40:37 PM, you wrote:
JS> Is this potentially bad, security wise, to do something like this?
JS> Can you guys recommend any way to tighten this up a bit or do this
JS> sort of thing better/more eloquently?
$_SERVER is, thankfully, _mostly_ populated by the web
Hello RPG,
Monday, August 8, 2005, 6:05:47 PM, you wrote:
RG> I use the error handler function found at
RG> http://www.php.net/manual/en/ref.errorfunc.php . Whenever a fatal
RG> error has occurred, it does not log the error. I tried adding
RG> E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_WARNING, E_CO
Is this potentially bad, security wise, to do something like this? Can
you guys recommend any way to tighten this up a bit or do this sort of
thing better/more eloquently?
The idea is to use this in the global header of a site that may be
invoked through up to 20-30 different third level
Hello Brian,
Monday, August 8, 2005, 6:38:54 PM, you wrote:
BD> $x = file_get_contents('http://www.mydomain.com/log.js');
BD> // also tried urlencode() but that did not help
?>>
BD> The result:
BD> Warning: main(http://www.mydomain.com/log.js) [function.main]: failed
BD> to open stream: HTTP r
I have an external JavaScript that I use on several of my sites. It
returns a web counter and does some other logging. It's accessed like
this:
I use the error handler function found at
http://www.php.net/manual/en/ref.errorfunc.php . Whenever a fatal
error has occurred, it does not log the error. I tried adding
E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_WARNING, E_COMPILE_ERROR and
so that whenever they occur, it will log itself to a log
Thanks Rick, it helped.
also I'll do some reading about AJAX (as soon as I can..)
Regards
Mauricio
On Sat, 2005-08-06 at 11:58, Rick Emery wrote:
> Quoting Mauricio Pellegrini <[EMAIL PROTECTED]>:
>
> > Hi ,
> > I wonder if it's possible to retrieve the value from a php session
> > variable fro
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:replies-lists-
> [EMAIL PROTECTED]
> Sent: Monday, August 08, 2005 11:49 AM
> To: Marc Powell
> Subject: Re: [PHP] Environment Variable contamination between vhosts -
> 1.3.33
>
>
>
>
> > Date: Monday, August 08, 2005 09:34:50 AM
Thanks for your advice.
I've heard of this technique before but wanted to know if there was
another way to do it from Javascript.
Regards
Mauricio
On Sat, 2005-08-06 at 11:05, Burhan Khalid wrote:
> Mauricio Pellegrini wrote:
> > Hi ,
> > I wonder if it's possible to retrieve the value from a
Check if you're using MySQL 4.1. If Yes use the subquery functionality.
So you could have your query as following:
"Insert into sometable where not id=NULL and id=Select id from mytable where
bla like 'some pattern';"
Not really sure if it would work thogh. Havent tried it yet.
HTH.
On 8/8/05,
Marc Powell wrote:
> Hi all,
>
> First time poster here so I apologize in advance for any gaffs. I've
> Googled, searched the archives and the FAQ but can't find anything close
> to what I'm experiencing.
>
> I have apache-1.3.33, mod_ssl-2.8.22 (with patches), php-4.3.2 (with
> patches, 4.4.0 te
Hi all,
First time poster here so I apologize in advance for any gaffs. I've
Googled, searched the archives and the FAQ but can't find anything close
to what I'm experiencing.
I have apache-1.3.33, mod_ssl-2.8.22 (with patches), php-4.3.2 (with
patches, 4.4.0 tested as well), mod_perl-1.29-5 (wit
Martin van den Berg wrote:
> I have this piece of php-code which inserts data into a database.
> Before inserting it must verify if the data is unique. The php code
> looks something like:
>
> $query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";
> $rows = execute( $query )
> if ( $rows == 0 )
Hi
Does anyone know of a simple PHP Currency Class that is similar to the one in
Java (java.util.currency)?
I just need something that will provide methods such as
getSymbol() and getDefaultFractionDigits()
regards
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Hello Martin,
Monday, August 8, 2005, 4:07:47 PM, you wrote:
MvdB> Now here is the problem: when the user enters the page, and
MvdB> directly refreshes the record is inserted twice Is is
MvdB> possible that both requests are processed simulatiounsly by the
MvdB> server (apache on linux)? And
Martin van den Berg wrote:
I have this piece of php-code which inserts data into a database.
Before inserting it must verify if the data is unique. The php code
looks something like:
$query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";
$rows = execute( $query )
if ( $rows == 0 )
{
/* so
I have this piece of php-code which inserts data into a database.
Before inserting it must verify if the data is unique. The php code
looks something like:
$query = "SELECT id FROM mytable WHERE bla LIKE " . $x .";
$rows = execute( $query )
if ( $rows == 0 )
{
/* some more processing */
$quer
*parent* keyword does not belong to PHP5 !!! It's there in PHP4 as well!
On 8/8/05, Edwin Barrios <[EMAIL PROTECTED]> wrote:
>
> Hi !
>
> you have to defined protected $var.
>
> This is a example where php5 OO model has a little ambiguities.
> Thing a few in your problem !, on de child class s
Hi !
you have to defined protected $var.
This is a example where php5 OO model has a little ambiguities.
Thing a few in your problem !, on de child class scope $var it's
private then when yo execute printVar(), you aren't executed on parent
scope you are calling a copie on child scope, then yo
Norbert Wenzel wrote:
Jochem Maas wrote:
Norbert Wenzel wrote:
private $var;
get rid of the 'private' here and replace it with 'protected'
too stupid. I'm sorry for my question.
the only stupid people are those that don't make an effort - you don't
seem to fall into that ca
Jochem Maas wrote:
Norbert Wenzel wrote:
private $var;
get rid of the 'private' here and replace it with 'protected'
too stupid. I'm sorry for my question.
thank you for opening my eyes.
norbert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www
Yes i'm using a lot of nested loops with __call(), because of dom
did'nt support parse not well formated html, i decided to develop my
html templates class iTemp, and i used a combinatios of foreach (
iterator implementention ) and __call +__get to create a inherity
tree like dom.
But i don't u
Norbert Wenzel wrote:
Is it possible to run inherited methods in the scope of the child class?
In my case I have an abstract class called 'Company' and some child
classes. There is a non abstract function in 'Company' which prints
'$this->phoneList'. That function should be the same to all chi
stop posting multiples times.
and try the code.
you write:
"Can I write like this?
"
what on godes earth stops you from sticking that in a text file
and running it? takes just as long as sticking it in an email.
YOU ARE REQUIRED TO CODE/TRY STUFF YOURSELF!.
Wong HoWang wrote:
That is somethi
Is it possible to run inherited methods in the scope of the child class?
In my case I have an abstract class called 'Company' and some child
classes. There is a non abstract function in 'Company' which prints
'$this->phoneList'. That function should be the same to all child
classes, without re
Fer chrissakes - just try it.
Twill either work or not.
Miles
At 06:20 AM 8/8/2005, Wong HoWang wrote:
but, I mean I haven't start the global variable BEFORE the function is
called...
"Jasper Bryant-Greene" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> $someGlobalVariable = 'foo';
>
> functi
[snip]
Guess what? I've googled for it and nothing
[/snip]
Sorry, I have to call you out on this one. I provided the very google
link that you needed and asked a couple of other key questions.
[quote]
How much time spent creating a page?
How much time spent viewing a page?
How much time the
hmm, there is an intresting way that AFAIK only exists in PHP which is the
variable variable and variable function.
That is you could have a string to be a function name and then make the call
with it in the following manner:
$step=1;
$func_const_name="step";
$dyn_func=$func_const_name.$step;
an
simply,
$GLOBALS['varname']=some_value;
M Saleh EG
+971-50-4779817
On 8/8/05, Wong HoWang <[EMAIL PROTECTED]> wrote:
>
> as title, how to do that?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
M.Saleh.E.G
97150-477981
On Mon, Aug 08, 2005 at 05:10:27PM -0700, Jimmie wrote:
> But an errors occurred when the page run. Some information liked this:
>
> Warning: get_meta_tags(): php_network_getaddresses: gethostbyname failed
> in d:\apache\htdocs\meta_tag.php on line 3
>
> Warning: get_meta_tags(http://www.pconli
Hi, All,
Sorry to trouble you, but I really can not handle this problem now. I
want to call get_meta_tags() function to get meta-tags which site I want to
know. I searched usage and I did like this:
http://www.example.com/";);
//Echo meta content
print $tags['keywords'];
?>
Thomas wrote:
Thanks Burhan. Is there much overhead?
Norbert: that's what I am doing now, just wanted to save some code. :-)
Thomas
-Original Message-
From: Norbert Wenzel [mailto:[EMAIL PROTECTED]
Sent: 08 August 2005 11:18 AM
To: php-general@lists.php.net
Subject: [PHP] Re: dynamic
Thanks Burhan. Is there much overhead?
Norbert: that's what I am doing now, just wanted to save some code. :-)
Thomas
-Original Message-
From: Norbert Wenzel [mailto:[EMAIL PROTECTED]
Sent: 08 August 2005 11:18 AM
To: php-general@lists.php.net
Subject: [PHP] Re: dynamically selecting a
That is something like:
Can I write like this?
"Jasper Bryant-Greene" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> $someGlobalVariable = 'foo';
>
> function myFunction() {
> global $someGlobalVariable;
>
> // do stuff with $someGlobalVariable
> }
> ?>
>
> Jasper
>
> Wong HoWang wrote:
>> as
Thomas wrote:
Hi there,
How can I do something like this:
[snip - theoretical code] if( isset($step) ) echo step.$step() ) [/snip]
$step would be an int (I would check that before) and then I would have all
sorts of functions like step1(), step2() . etc.
Use call_user_func(). Si
but, I mean I haven't start the global variable BEFORE the function is
called...
"Jasper Bryant-Greene" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> $someGlobalVariable = 'foo';
>
> function myFunction() {
> global $someGlobalVariable;
>
> // do stuff with $someGlobalVariable
> }
> ?>
>
> Jasper
but, I mean I haven't start the global variable BEFORE the function is
called...
"Jasper Bryant-Greene" <[EMAIL PROTECTED]>
wrote:[EMAIL PROTECTED]
> $someGlobalVariable = 'foo';
>
> function myFunction() {
> global $someGlobalVariable;
>
> // do stuff with $someGlobalVariable
> }
> ?>
>
> Jaspe
Thomas wrote:
Hi there,
How can I do something like this:
[snip - theoretical code] if( isset($step) ) echo step.$step() ) [/snip]
$step would be an int (I would check that before) and then I would have all
sorts of functions like step1(), step2() . etc.
Any ideas?
Thomas
Hi there,
How can I do something like this:
[snip - theoretical code] if( isset($step) ) echo step.$step() ) [/snip]
$step would be an int (I would check that before) and then I would have all
sorts of functions like step1(), step2() . etc.
Any ideas?
Thomas
as title, how to do that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
as title, how to do that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jasper
Wong HoWang wrote:
as title, how to start a global variable within a function?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Brian Dunning wrote:
Hey all -
...
is there a preferred one-stop-shop installer CD or anything (easy -
knock on wood)?
the really easy way is to use xampp [1]. I know it is easy, because even
I got that thing working within a few minutes. but mind the security of
the box, xampp is configu
as title, how to start a global variable within a function?
Thanks, I thought that might have been it - but It's not... I wrote a
support ticket and - now - I'm able to use mkdir as long as the Directories
are
chmoded to 755+ :)
thanks to all who helped!
In a message dated 8/8/2005 2:16:12 A.M. Central Standard Time,
[EMAIL PROTECTED] write
Brian Dunning wrote:
Hey all -
I have an unused Pentium box here, recent, well loaded with RAM and HD.
I want to turn it into a LAMP box. Never done that before; is there a
preferred one-stop-shop installer CD or anything (easy - knock on
wood)? It would be nice to end up with some kind of
More than likely, your host has safe mode on. Safe mode is a pain in the
ass if you need to create directories or write to files, but seems to be
the defacto standard for shared hosts using php.
[EMAIL PROTECTED] wrote:
Thanks, but I've tried that when I first got the Error message, it still
Sam Smith wrote:
shell_exec("zip -r ddd ddd"); // don't work
safe_mode off, works from command line php. What could it be?
You need to give the full path to zip.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
78 matches
Mail list logo