php-general Digest 15 Apr 2009 16:09:29 -0000 Issue 6069
Topics (messages 291517 through 291526):
Re: https and Credit Cards
291517 by: Richard Heyes
alt() - unknown function?
291518 by: Tom Calpin
291519 by: Thodoris
291520 by: George Larson
291521 by: Bastien Koert
291522 by: Thodoris
291523 by: Richard Heyes
Re: PDO fetch_obj - question
291524 by: Thodoris
cURL - Error 400
291525 by: David
header() and passing sessions
291526 by: Adam Williams
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
> To add to what others have said: CC processors with which I have worked will
> audit your site *before* certifying your site to accept CC information. In
> other words, if you don't do SSL, you won't be *allowed* to process cards.
FWIW, companies exist that will host your "buy" page(s), so you don't
end up with the hassle of buying and installing your own SSL
certificate.
--
Richard Heyes
HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated April 11th)
--- End Message ---
--- Begin Message ---
Hi all,
I've just started looking at the code of an e-commerce site we are taking
over the development of, that another company has previously developed .
Coupled with the difficulty of taking over development of someone else's
code (also poorly commented), I've been stumped by a fatal error on a
function call alt() which is dotted everywhere in the main templating script
(sample below):
// Get/Set a specific property of a page
function getPageProp($prop,$id="") { return
$this->PAGES[alt($id,$this->getPageID())][$prop]; }
function setPageProp($prop,$val,$id="") {
$this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
It looks to be defining properties for a list of pages, with each page
providing its own PageID.
I've never seen this function before, nor can I find any definition of it in
the site code, I was wondering if anyone recognises this, is it from a
thirdparty templating tool at all?
Thanks
-Tom
--- End Message ---
--- Begin Message ---
Hi all,
I've just started looking at the code of an e-commerce site we are taking
over the development of, that another company has previously developed .
Coupled with the difficulty of taking over development of someone else's
code (also poorly commented), I've been stumped by a fatal error on a
function call alt() which is dotted everywhere in the main templating script
(sample below):
// Get/Set a specific property of a page
function getPageProp($prop,$id="") { return
$this->PAGES[alt($id,$this->getPageID())][$prop]; }
function setPageProp($prop,$val,$id="") {
$this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
It looks to be defining properties for a list of pages, with each page
providing its own PageID.
I've never seen this function before, nor can I find any definition of it in
the site code, I was wondering if anyone recognises this, is it from a
thirdparty templating tool at all?
Thanks
-Tom
I think that you should check the included files (require, require_once,
include, include_once) in case it is defined somewhere in there. Another
possibility I can think of is to be defined in a framework that you use.
You can check the user and internal functions using the
get_defined_fumctions():
http://us.php.net/manual/en/function.get-defined-functions.php
--
Thodoris
--- End Message ---
--- Begin Message ---
This is someplace where NetBeans really benefits me. You can hit CTRL-B, or
right-click, to take you to a definition. Holding CTRL turns darned-near
everything into a hyperlink, doing the same thing.
Lastly, CTRL-SHIFT-F lets you search through every file in the project for
your string.
Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
coffee. :)
On Wed, Apr 15, 2009 at 10:39 AM, Thodoris <[email protected]> wrote:
>
> Hi all,
>>
>> I've just started looking at the code of an e-commerce site we are taking
>> over the development of, that another company has previously developed .
>> Coupled with the difficulty of taking over development of someone else's
>> code (also poorly commented), I've been stumped by a fatal error on a
>> function call alt() which is dotted everywhere in the main templating
>> script
>> (sample below):
>>
>> // Get/Set a specific property of a page
>> function getPageProp($prop,$id="") { return
>> $this->PAGES[alt($id,$this->getPageID())][$prop]; }
>> function setPageProp($prop,$val,$id="") {
>> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
>>
>> It looks to be defining properties for a list of pages, with each page
>> providing its own PageID.
>> I've never seen this function before, nor can I find any definition of it
>> in
>> the site code, I was wondering if anyone recognises this, is it from a
>> thirdparty templating tool at all?
>>
>> Thanks
>>
>> -Tom
>>
>>
>>
>>
>
>
> I think that you should check the included files (require, require_once,
> include, include_once) in case it is defined somewhere in there. Another
> possibility I can think of is to be defined in a framework that you use.
>
> You can check the user and internal functions using the
> get_defined_fumctions():
>
> http://us.php.net/manual/en/function.get-defined-functions.php
>
> --
> Thodoris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Wed, Apr 15, 2009 at 10:58 AM, George Larson
<[email protected]>wrote:
> This is someplace where NetBeans really benefits me. You can hit CTRL-B,
> or
> right-click, to take you to a definition. Holding CTRL turns darned-near
> everything into a hyperlink, doing the same thing.
>
> Lastly, CTRL-SHIFT-F lets you search through every file in the project for
> your string.
>
> Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
> coffee. :)
>
> On Wed, Apr 15, 2009 at 10:39 AM, Thodoris <[email protected]> wrote:
>
> >
> > Hi all,
> >>
> >> I've just started looking at the code of an e-commerce site we are
> taking
> >> over the development of, that another company has previously developed .
> >> Coupled with the difficulty of taking over development of someone else's
> >> code (also poorly commented), I've been stumped by a fatal error on a
> >> function call alt() which is dotted everywhere in the main templating
> >> script
> >> (sample below):
> >>
> >> // Get/Set a specific property of a page
> >> function getPageProp($prop,$id="") { return
> >> $this->PAGES[alt($id,$this->getPageID())][$prop]; }
> >> function setPageProp($prop,$val,$id="") {
> >> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
> >>
> >> It looks to be defining properties for a list of pages, with each page
> >> providing its own PageID.
> >> I've never seen this function before, nor can I find any definition of
> it
> >> in
> >> the site code, I was wondering if anyone recognises this, is it from a
> >> thirdparty templating tool at all?
> >>
> >> Thanks
> >>
> >> -Tom
> >>
> >>
> >>
> >>
> >
> >
> > I think that you should check the included files (require, require_once,
> > include, include_once) in case it is defined somewhere in there. Another
> > possibility I can think of is to be defined in a framework that you use.
> >
> > You can check the user and internal functions using the
> > get_defined_fumctions():
> >
> > http://us.php.net/manual/en/function.get-defined-functions.php
> >
> > --
> > Thodoris
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
grep gets my vote, since i don't use netbeans
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
This is someplace where NetBeans really benefits me. You can hit CTRL-B, or
right-click, to take you to a definition. Holding CTRL turns darned-near
everything into a hyperlink, doing the same thing.
Lastly, CTRL-SHIFT-F lets you search through every file in the project for
your string.
Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
coffee. :)
On Wed, Apr 15, 2009 at 10:39 AM, Thodoris <[email protected]> wrote:
Hi all,
I've just started looking at the code of an e-commerce site we are taking
over the development of, that another company has previously developed .
Coupled with the difficulty of taking over development of someone else's
code (also poorly commented), I've been stumped by a fatal error on a
function call alt() which is dotted everywhere in the main templating
script
(sample below):
// Get/Set a specific property of a page
function getPageProp($prop,$id="") { return
$this->PAGES[alt($id,$this->getPageID())][$prop]; }
function setPageProp($prop,$val,$id="") {
$this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
It looks to be defining properties for a list of pages, with each page
providing its own PageID.
I've never seen this function before, nor can I find any definition of it
in
the site code, I was wondering if anyone recognises this, is it from a
thirdparty templating tool at all?
Thanks
-Tom
I think that you should check the included files (require, require_once,
include, include_once) in case it is defined somewhere in there. Another
possibility I can think of is to be defined in a framework that you use.
You can check the user and internal functions using the
get_defined_fumctions():
http://us.php.net/manual/en/function.get-defined-functions.php
--
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What if it is not defined in your project but somewhere in your include
path? You could I suppose grep the whole drive if you have time to waste :)
--
Thodoris
--- End Message ---
--- Begin Message ---
> grep gets my vote, since i don't use netbeans
I'd go for grep too (unix or Win32):
grep -rin "function alt" *
What's the exact error?
--
Richard Heyes
HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated April 11th)
--- End Message ---
--- Begin Message ---
Hi there,
I’ve made a fetch_obj and, as stated on some sites, it returns a anonymous
object where the properties will have the name of our columns database.
However, when I do this, I notice that instead of giving me the column names
as they are typed on the DB I get them uppercase. So, when my database field
is “id_dog” to retrieve the property properly I have to search for “ID_DOG”
Why is this? Is this a normal behavior?
Thanks a lot,
Márcio
I have just dumped an object using var_dump retrieved with pdo fetch
object method:
object(stdClass)#3 (4) {
["id"]=>
string(1) "1"
["cat"]=>
string(1) "1"
["cod_sin"]=>
string(6) "120014"
["cod_uis"]=>
string(2) "26"
}
and it seems quite normal to me. Try to see your table info using:
describe `tablename`;
To see what are your table's fields .
Try to include more info about your system, php version etc in case you
reply. It will help us to help you.
--
Thodoris
--- End Message ---
--- Begin Message ---
Hi
I was wondering if anyone could please help me with this cURL script since I
keep getting error 400 from the web server:
http://pastebin.ca/1392840
It worked until around a month ago which is when they presumably made
changes to the site. Except I can't figure out what configuration option in
the cURL PHP script needs to be changed. I can visit the site perfectly in
Lynx, Firefox and IE.
Thanks
--- End Message ---
--- Begin Message ---
I need some help passing a session variable with a header() function.
According to www.php.net/header, the documentation states:
*Note*: Session ID is not passed with Location header even if
session.use_trans_sid
<session.configuration.php#ini.session.use-trans-sid> is enabled. It
must by passed manually using *SID* constant.
so, I'm trying to manually pass the SID, but not having any luck. Here
is a snippet of my code:
There is a file login.php which has session_start(); and sets
$_SESSION["username"] with the username you logged in with from
index.php and has a form to click View Pending Requests which has the
action of option.php.
-- option.php --
<?php
session_start();
if ($_POST["option"] == "View Pending Requests")
{
header('Location:
http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID='.session_id());
}
?>
--viewpending.php --
<?php
session_start();
if (!$_SESSION["username"])
{
echo "You have not logged in";
exit;
}
?>
so you click on View Pending Requests, and the URL in your browser is:
http://intra.mdah.state.ms.us/helpdesk/viewpending.php?PHPSESSID=du75p41hel9k1vpuah799l2ce7
but viewpending.php says "You have not logged in". Why is that?
--- End Message ---