Hi there,
I am wondering if I am opening a potential security risk by
including files on remote servers. I am doing an include
('http:/www.server.com/file.html') inside a php script of mine
to seperate content from function. Content is produced by a friend of mine and
I do not want to grant acc
I want to execute polymorphism.
- Original Message -
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Pham Huu Le Quoc Phuc" <[EMAIL PROTECTED]>
Cc: "Peter Lauri" <[EMAIL PROTECTED]>; "PHP-General"
Sent: Friday, March 24, 2006 2:01 PM
Subject: Re: [PHP] Parents constructor
> On Fri, 200
On Fri, 2006-03-24 at 01:48, Pham Huu Le Quoc Phuc wrote:
> In PHP, I can do the flowing code:
What you mean to say is that in PHP5 and only in PHP5 can you use
interfaces... and that would only be true if the following code were
correct.
> interface A
> {
> function Get();
> }
>
> class B ex
In PHP, I can do the flowing code:
interface A
{
function Get();
}
class B extends A
{
function Get()
{
echo "class B";
}
}
class C extends A
{
echo "class C";
}
$a = new B();
$a->Get();
$a = new C();
$a->Get();
result:
Class B
Class C
- Original Message -
From: "R
On Fri, 2006-03-24 at 00:40, Peter Lauri wrote:
> Hi,
>
> I have a class B that extends class A. I want to call constructor of A
> correctly, how to do that. This is how I tried:
>
> Class B extends A {
> Function B($Bvariable) {
> Parent::A($Bvariable);
> }
>
> }
>
>
[snip]
>
> 'account'=>'theaccountnumber',
>
> 'role internalId="theinternalid"'=>''));
Does that work to set the attribute?
[/snip]
You are correct, that does NOT work. I found out to use soapval instead.
Thank you!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:
Hi,
I have a class B that extends class A. I want to call constructor of A
correctly, how to do that. This is how I tried:
Class B extends A {
Function B($Bvariable) {
Parent::A($Bvariable);
}
}
Class A {
Function A($Avariable) {
Dostuff..
Richard Lynch wrote:
I *think* both client and server have to agree/support keep-alive, and
both have to be ready for the other guy to close the connection even
though they agreed in advance to keep-alive.
So you can use keep-alive, and it can work nifty, but ya gotta be
ready for the server/cli
Chris skrev:
PHP Mailer wrote:
Jay Blanchard skrev:
[snip]
User i am running is locally granted all in permission.
Using reply =)
[/snip]
Use reply-all, that way if the person that was helping you is not there
any more others can help.
Echo the query statement out and see what it looks like.
PHP Mailer wrote:
Jay Blanchard skrev:
[snip]
User i am running is locally granted all in permission.
Using reply =)
[/snip]
Use reply-all, that way if the person that was helping you is not there
any more others can help.
Echo the query statement out and see what it looks like. Please post
th
PHP Mailer skrev:
Jay Blanchard skrev:
[snip]
User i am running is locally granted all in permission.
Using reply =)
[/snip]
Use reply-all, that way if the person that was helping you is not there
any more others can help.
Echo the query statement out and see what it looks like. Please post
tha
Jay Blanchard skrev:
[snip]
User i am running is locally granted all in permission.
Using reply =)
[/snip]
Use reply-all, that way if the person that was helping you is not there
any more others can help.
Echo the query statement out and see what it looks like. Please post
that to the list.
[snip]
User i am running is locally granted all in permission.
Using reply =)
[/snip]
Use reply-all, that way if the person that was helping you is not there
any more others can help.
Echo the query statement out and see what it looks like. Please post
that to the list.
--
PHP General Mailing L
[snip]
[snip]
$optimizeTableQuery = mysql_query("OPTIMIZE TABLE
'".$tableName."'");
[/snip]
Take the single quotes away from the table name.
http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html
Make sure they are the right kind of tables.
Trie
[snip]
> $optimizeTableQuery = mysql_query("OPTIMIZE TABLE
> '".$tableName."'");
[/snip]
Take the single quotes away from the table name.
http://dev.mysql.com/doc/refman/4.1/en/optimize-table.html
Make sure they are the right kind of tables.
--
PHP General Mailing List (http://www.php.net/
On Thu, March 23, 2006 5:51 pm, Todd Cary wrote:
> I have a field, Start_Time, in a MySQL DB. Since it is not a
> TimeStamp, I believe I cannot use date(), correct?
>
> I would like to format 09:00:00 to 9:00 AM.
>
> If I convert the 09:00:00 with the strtotime(), I get a couple of
> extra minutes
On Thu, March 23, 2006 7:02 pm, Chrome wrote:
> Another thought: What type of field are you using for this storage?
Another thought he'll have to face eventually, on this insane path of
JPEG in database storage:
What size buffer does PHP <-> MySQL have?
If your JPEG is too big, ka-boom.
Actuall
[snip]
#--> If submitted
if($_GET['method']=="optimize")
{
#--> Set to array
$allTables = mysql_query("SHOW TABLES");
if(!$query){ print mysql_error(); }
while($table = mysql_fetch_assoc($allTables))
#for($i = 0; $tableName = mysql_fetch_array($allTables);)
{
#--> Walk that array
foreach($table as
On Thu, March 23, 2006 6:42 pm, tedd wrote:
> Hi gang:
>
> Okay, another update:
>
> I tried all sorts of combinations of assorted functions as well as
> reading every source I could find. I won't bore you with the details
> -- but, this is as far as I've gotten.
>
> For storing an image into MySQL
On Thu, 2006-03-23 at 21:30, Richard Lynch wrote:
> Are you using http://php.net/fgetcsv
>
> Cuz if you're not, you're gonna go nuts trying to work out the CSV
> minutia
>
> I think CSV musta been invented by Microsoft. It's got that MS feel
> to it...
Taint anyways...
http://support.microsoft
Hello folks,
Trying to grab all tables available in a database and optimize them.
The following code , or rather query is being trouble-some and i am out
of ideas.
#--> If submitted
if($_GET['method']=="optimize")
{
#--> Set to array
$allTables = mysql_query("SHOW TABLES");
if(!$query){ print
On Wed, March 22, 2006 1:21 am, Mathijs wrote:
> I Want to know if it is possible to execute PHP(5) as the owner/group
> of
> the script it self.
>
> At the moment saved files get owner and group nobody.
> When i upload through ftp, it gets the normal owner and group nobody.
>
> Is there a way that
On Wed, March 22, 2006 1:41 am, Peter Lauri wrote:
> I am trying to use a Web Service on the following endpoint
> https://webservices.netsuite.com/wsdl/v1_3_1/netsuite.wsdl. As seen in
> the
> url, it is under HTTPS. I have compiled PHP with CURL and verified
> that CURL
> is working. In the docume
Are you using http://php.net/fgetcsv
Cuz if you're not, you're gonna go nuts trying to work out the CSV
minutia
I think CSV musta been invented by Microsoft. It's got that MS feel
to it...
On Tue, March 21, 2006 4:19 pm, Brian Anderson wrote:
> The only other thing that I can think to do is t
You don't.
You run PHP on the Windows box with the mdb file, and set up a way for
the two boxes to talk to each other.
Or you convince somebody somewhere just how bad MS-Access is and
abandon it entirely :-)
On Tue, March 21, 2006 4:05 pm, Brian Anderson wrote:
> Yeah, I thought of that, but h
There is, or used to be, an MS-Access MySQL synchronizer package "out
there"
Haven't seen it mentioned in years now, but maybe I just wasn't paying
attention.
Try searching for it:
info.com/MS-Access MySQL synchronize
On Tue, March 21, 2006 4:00 pm, Brady Mitchell wrote:
>> -Original Messag
On Tue, March 21, 2006 4:44 pm, mslemko wrote:
> this is what I am trying to do:
>
> On a web form I might have a select input with multiple selections
> enabled, however I want to have access to the list within PHP after
> submission.
>
>
For PHP, use name='myselect[]'
Then PHP turns it into an
I *think* both client and server have to agree/support keep-alive, and
both have to be ready for the other guy to close the connection even
though they agreed in advance to keep-alive.
So you can use keep-alive, and it can work nifty, but ya gotta be
ready for the server/client to claim to support
httpd.conf search for Keep-alive
Some old old old browsers will puke on it, though, I think...
We're talking like Netscape 2.0 though, as I recall...
I got swiss-cheese memory, so better double-check that. :-)
On Tue, March 21, 2006 5:16 pm, Jon Anderson wrote:
> I've been looking at a proble
On Wed, March 22, 2006 5:27 am, Michael Hulse wrote:
> I am just learning about classes.
>
> My server is running PHP 4.3.11
>
> Example code:
>
> class testing {
> var $what;
> }
>
> $linkGenClass = new testing();
> $linkGenClass->what = 'hi';
> echo $linkGenClass->what;
>
> Why does the con
On Wed, March 22, 2006 6:00 am, Lorca wrote:
> Hello friends,
> I've create a form containing a SELECT under JavaScript, where the
> user
> decide all list's elements.
>
> My problem is how can I get all list's elements on PHP. Using $-POST[]
> I
> only get the selected option.
>
> With my most sin
On Wed, March 22, 2006 1:23 pm, Todd Cary wrote:
> Is there a way to create a Window that is like the Help or Popup
> type windows one can create with JavaScript?
>
> I have an event calendar and I want the link for the event to go
> to a PHP page, but I want the page to be on top and have focus
>
On Wed, March 22, 2006 3:02 pm, blackwater dev wrote:
> I have a chunk of html data that I want to output for each iteration
> through
> a db result
>
> while($result){
>
>$list.=file_get_contents("my_template_file.php");
>
> }
> return $list;
>
> The template file looks like this:
>
>
>
Hi,
Friday, March 24, 2006, 9:51:48 AM, you wrote:
TC> I have a field, Start_Time, in a MySQL DB. Since it is not a
TC> TimeStamp, I believe I cannot use date(), correct?
TC> I would like to format 09:00:00 to 9:00 AM.
TC> If I convert the 09:00:00 with the strtotime(), I get a couple of
TC>
On Wed, March 22, 2006 9:18 pm, brian dichiara wrote:
> Is there a way to check to see if a JPEG or PDF is color or
> black/white?
> Like a function or something?
There does not appear to be a built-in function that does that...
However, this hack should work:
function image_is_color($image){
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__ NOD32 1.1456 (20060323) Information __
This message was checked by NOD32 antivirus system.
http://www.eset.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wed, March 22, 2006 10:29 pm, Mark wrote:
>
> How can i make this email from a database a hyperlink so it doesnt
> show the
> email address--i have tried many things but i keep getting errors. At
> the
> moment it just shows the email (no link)
> thanks
>
>
>
> //get comp_id
> $query = mysq
Save yourself a ton of grief and upgrade to PHP5 + SOAP... :-^
On Thu, March 23, 2006 1:23 am, Peter Lauri wrote:
> Hi,
>
> I have been trying to find a simple example of how to add attributes
> to the
> requests, but after two days search I can not find an example. The
> $param is
> easy to creat
Hi gang:
Okay, another update:
I tried all sorts of combinations of assorted functions as well as
reading every source I could find. I won't bore you with the details
-- but, this is as far as I've gotten.
For storing an image into MySQL I simply used:
$image_large = mysql_real_escape_strin
In incredibly ancient versions of PHP, you needed to have the:
function foo () { ... };
appear BEFORE you called it.
GOOD:
function foo () { return 'foo'};
foo();
BAD:
foo();
function foo() { return 'foo'};
It's remotely possible that you need to upgrade in a big way.
You can do a quick hack
Check the HEADERS your web-server is sending.
If they don't have Charset UTF-8 in there, it won't work on REAL
browsers (Mozilla based)
Then, for reasons known only to Microsoft, you have to use a META tag
to define the Charset for IE.
MS will *ignore* the headers in favor of a heuristic whereby
On Thu, March 23, 2006 11:28 am, ganu wrote:
> Hello all,
>
> I worked with one site and now is working fine with smarty.
> Now I want to implement the CMS in that,
> I went thru the link http://smarty.php.net/resources.php?category=2
>
> now I want a CMS so my existing site looks as it is and with
You're putting RAW data into MySQL, and not escaping it.
That's a really Bad Idea.
You should probably be using http://php.net/mysql_real_escape_string
on the JPEG before you try to cram it into MySQL.
If that still fails, you could http://php.net/base64 encode it or
something similar to get it
On Thu, March 23, 2006 2:58 pm, Warren Vail wrote:
> I think the key to your problem is finding a way that the two domains
> can
> share information, do these domains have access to the same physical
> disk
> space, or a common database? You can use the your own save handler
> routines to give the
On Thu, March 23, 2006 2:34 pm, [EMAIL PROTECTED] wrote:
> have two domains and each domain has it's own admin registered areas.
> Have
> to allow people who registered to change domains and areas without
> login
> again?
> On reg. areas, after login, create sess_id to check if visitor is
> logged
I have a field, Start_Time, in a MySQL DB. Since it is not a
TimeStamp, I believe I cannot use date(), correct?
I would like to format 09:00:00 to 9:00 AM.
If I convert the 09:00:00 with the strtotime(), I get a couple of
extra minutes added.
Suggestions are welcomed
Todd
--
PHP Gener
[EMAIL PROTECTED] wrote:
Hi to all,
have two domains and each domain has it's own admin registered areas. Have
to allow people who registered to change domains and areas without login
again?
On reg. areas, after login, create sess_id to check if visitor is logged
in, but sess_ids on domains are d
Andy wrote:
Hi to all,
We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough.
I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems.
If I make an echo 'möbel, Belgien' the brow
I think the key to your problem is finding a way that the two domains can
share information, do these domains have access to the same physical disk
space, or a common database? You can use the your own save handler
routines to give them both access to the same area (database may work the
best)
On Thu, March 23, 2006 2:19 pm, Clinton, Rochelle A wrote:
> Hi Richard,
>
> WOW! Thanks for such a quick response - this is just driving me
> crazy! Not to mention consuming my time.
>
> I actually had been using the $line = in front of my replace attempts.
>
> Here is the exact offending
Hi to all,
have two domains and each domain has it's own admin registered areas. Have
to allow people who registered to change domains and areas without login
again?
On reg. areas, after login, create sess_id to check if visitor is logged
in, but sess_ids on domains are different and can't compare
On Thu, March 23, 2006 1:50 pm, Clinton, Rochelle A wrote:
> I am fairly new to PHP and am having an (SILLY) issue that I cannot
> seem
> to resolve:
>
> I am pulling data from an html file and some of the lines of text that
> I
> need start with "".
Show us an actual line, copy/paste, to be sure
Clinton, Rochelle A wrote:
Hello,
I am fairly new to PHP and am having an (SILLY) issue that I cannot seem
to resolve:
I am pulling data from an html file and some of the lines of text that I
need start with "".
I cannot seem to get rid of that tag!!!
I have tried:
* str_re
Hello,
I am fairly new to PHP and am having an (SILLY) issue that I cannot seem
to resolve:
I am pulling data from an html file and some of the lines of text that I
need start with "".
I cannot seem to get rid of that tag!!!
I have tried:
* str_replace("<\a>", "", $line)
*
Hi Mark,
Actually you can access this variable within Javascript in the following
manner:
function chgablacted() {
box = regs['myselect[]'];
value = box.options[box.selectedIndex].value;
if (value == 'some value') {
...
} else {
...
}
}
The name of the variable will include the br
Hi gang:
Another update.
The detect magic_quotes_gpc ON and then either do, or don't do,
addslashes() thing (see below) provided kindly by Dave doesn't work.
function myslashes($data) {
return (get_magic_quotes_gpc() == 1) ? $data : addslashes($data);
}
On both of the servers, the magic_gp
As you can see in this article : http://www.weberdev.com/ViewArticle-3.html
$mysqlPicture = addslashes(fread(fopen($Picture, "r"), $PSize));
Then you insert $mysqlPicture.
If your settings prevent automatic slashes by PHP then this will
Give the problem you see..
berber
-Original Message-
Thanks Warren,
This works!
The side effect that is -somewhat- undesirable is that it becomes
incompatible accessing the field with Javascript. Perhaps there is a way
to get around that problem though.
-Mark
Warren Vail wrote:
Set the name of your field in html to be;
name="myselect[]"
th
Hi gang:
Update:
Both servers state: enable-magic_quotes
One sever states (this is the one that fails):
magic_quotes_gpc ON
magic_quotes_runtime ON
The other sever states (this is the one that works):
magic_quotes_gpc ON
magic_quotes_runtime OFF
However, I am using addslashes() -- should I
On 3/23/06, tedd <[EMAIL PROTECTED]> wrote:
> >Are you escaping the image string before you insert it?
>
> Aaahh, no ?? Why is it going to attack me?
>
> But seriously, it works on one server, why not the other?
>
> On the other hand, it appears to object to
> something within the string -- so that
Are you escaping the image string before you insert it?
berber
berber:
Aaahh, no ?? Why is it going to attack me?
But seriously, it works on one server, why not the other?
On the other hand, it appears to object to
something within the string -- so that might be
the problem. Please forgive
I'm far from an expert:
But maybe one Server has magic quotes on and the other does not. One
automatically escapes all the characters for you in the data string and the
other does not?
Bobby
-Original Message-
From: Weber Sites LTD [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 23, 20
Are you escaping the image string before you insert it?
berber
-Original Message-
From: tedd [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 23, 2006 7:48 PM
To: php-general@lists.php.net
Subject: [PHP] Why does this work on one server, but not another?
Hi gang:
I posted this question
Hi gang:
I posted this question to a MySQL list, but
apparently it stumped them. So, I'll ask here:
On one server, the following code works without any problems whatsoever:
--- quote ---
$sqlString = "INSERT INTO $dbtable (id,
image_type, image_large, image_small,
image_width, image_height
Hello all,
I worked with one site and now is working fine with smarty.
Now I want to implement the CMS in that,
I went thru the link http://smarty.php.net/resources.php?category=2
now I want a CMS so my existing site looks as it is and with some or lot of
changes
I can implement CMS in that.
som
Andy wrote:
Hi to all,
We are developing a multilanguage application, and slowly it seems that the Latin1(ISO 5589 1) encoding is not enough.
I tried simply to convert the database and the encoding of the php to UTF-8, but I'm getting some problems.
If I make an echo 'möbel, Belgien' the brow
Solved (see bottom of message) but surely there's a better solution?
Sorry for this looong explanation, but I've been tearing my hair out with
this problem...
I use php 4.3.4 and ADOdb 4.64, developing on Win2000.
I've got magic_quotes_gpc switched off explicitly in htaccess, and I checked
phpi
Hi to all,
We are developing a multilanguage application, and slowly it seems that the
Latin1(ISO 5589 1) encoding is not enough.
I tried simply to convert the database and the encoding of the php to UTF-8,
but I'm getting some problems.
If I make an echo 'möbel, Belgien' the browser does no
phpninja wrote:
Hello,
for($i=A;$i<=Z;$i++) {
if ($i == "ZZ") { break; }
echo "$i";
}
regards,
phpninja
While this may work (I didn't test it), it's a hack and might produce
unexpected results (assuming you meant to quote the strings). PHP will,
"Translate strings and resources to numbe
Ben Miller wrote:
In trying to make an alpha list, using the following:
for($i=A;$i<=Z;$i++) {
^ not a string technically! see what happens when
you turn up error reporting to full (E_ALL).
echo "$i";
}
rather than using a loop to generate (as others have shown
> -Original Message-
> From: Ben Miller [mailto:[EMAIL PROTECTED]
> Sent: 23 March 2006 15:08
> To: php-general@lists.php.net
> Subject: [PHP] Letters in Loops
>
>
> In trying to make an alpha list, using the following:
>
> for($i=A;$i<=Z;$i++) {
> echo "$i";
> }
>
> Produces:
>
On Mar 23, 2006, at 10:08 AM, Ben Miller wrote:
In trying to make an alpha list, using the following:
for($i=A;$i<=Z;$i++) {
echo "$i";
}
Produces:
A
B
C...
X
Y
Z
AA
AB
AC...
AX
AY
AZ... all the way to YZ.
What am I doing wrong that it's not stopping at just plain old "Z",
witho
Hello,
for($i=A;$i<=Z;$i++) {
if ($i == "ZZ") { break; }
echo "$i";
}
regards,
phpninja
-Original Message-
From: Ben Miller [*mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>]
Sent: Thursday, March 23, 2006 7:08 AM
To: php-general@lists.php.net
Subject: [PHP] Letters in Loops
In try
In trying to make an alpha list, using the following:
for($i=A;$i<=Z;$i++) {
echo "$i";
}
Produces:
A
B
C...
X
Y
Z
AA
AB
AC...
AX
AY
AZ... all the way to YZ.
What am I doing wrong that it's not stopping at just plain old "Z", without
moving on to "AA" and continuing?
--
PHP General Ma
Hi,
Is there a better/more efficient way to determine how many bits are
set in an integer than this?
substr_count(base_convert($myValue, 10, 2), '1');
I'm using PHP 4.
Thanks,
Jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 3/23/06, joseph <[EMAIL PROTECTED]> wrote:
> bonjour,
>
> why does my DB object always send INIT DB to mysql server?
>
> the problem caused by calls like the following -- very simple code,
> really may be caused by my PEAR/DB.php wrapper functions (see
> below) . evidence is my mysql quer
On 23/03/06, Mark <[EMAIL PROTECTED]> wrote:
> Can anyone see a problem with this at a glance. I think i have pushed my
> luck with this forum ( inc. Chris)of late but i paid a lot of money for this
> script and it has a few bugs.
>
> THis is what i get returned---
> Fatal error: Call to undefined
U, is your top.php code being printed AT ALL? Because in the code
you gave us, you're attempting to include "topo.php".
HTH,
John
On 3/21/06, João Cândido de Souza Neto <[EMAIL PROTECTED]> wrote:
> tedd wrote:
>
> > Hi:
> >
> > I hate this.
> >
> >>Ok guy, don't fight with me. hehehe
> >>
> >
bonjour,
why does my DB object always send INIT DB to mysql server? i am using
PHP 5.0.5 and
* @versionRelease: 1.7.5
* @link http://pear.php.net/package/DB
*/
the problem caused by calls like the following -- very simple code,
really may be caused by my PEAR/DB.php wrapper f
On 3/23/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have been trying to find a simple example of how to add attributes to the
> requests, but after two days search I can not find an example. The $param is
> easy to create if it does not contain any attributes. This is what I want to
> cr
Is there a way to check to see if a JPEG or PDF is color or black/white?
Like a function or something?
Thanks for any help!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you could create a div that floats on top of everything, but you'll
still need javascript to set its position and to hide/unhide it.
as far as I know, you need javascript to do it.
_Brian.
Todd Cary wrote:
Is there a way to create a Window that is like the Help or Popup type
windows one can c
This one time, at band camp, clive <[EMAIL PROTECTED]> wrote:
> You could also look at using a templating engine like Smarty for instance.
BHAHAHAHAHAHAHAAA
1000 lines of code for "hello world"
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed l
Mark wrote:
Can anyone see a problem with this at a glance. I think i have pushed my
luck with this forum ( inc. Chris)of late but i paid a lot of money for this
script and it has a few bugs.
THis is what i get returned---
Fatal error: Call to undefined function: recover_pw() in
/home/realt90
84 matches
Mail list logo