php-general Digest 24 Jun 2011 12:57:37 -0000 Issue 7373
Topics (messages 313685 through 313692):
Call to undefined function
313685 by: admin.buskirkgraphics.com
313686 by: Shiplu Mokaddim
313688 by: admin.buskirkgraphics.com
Get all the keys from a hierarchical hash
313687 by: Scott Baker
313689 by: Fatih P.
Manipulate Request Headers after Redirect
313690 by: Louis Huppenbauer
Re: Create a hierarchical hash from flat source
313691 by: Paul M Foster
Re: this newsgroup and OE
313692 by: Jonesy
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
I am running a scheduled task for the first time since switching from linux
to Windows IIS
I am getting an error when the task runs.
Fatal error: Call to undefined function mysql_connect()
I ran php.exe -m to see that the MySQL Module is loaded.
I have no issues unless I am running a php file in the Scheduled task.
Any help would be appreciated
Richard L. Buskirk
--- End Message ---
--- Begin Message ---
Sent from a handheld device
On 24-Jun-2011, at 5:53 AM, <ad...@buskirkgraphics.com> wrote:
> I am running a scheduled task for the first time since switching from linux
> to Windows IIS
>
> I am getting an error when the task runs.
>
> Fatal error: Call to undefined function mysql_connect()
>
>
> I ran php.exe -m to see that the MySQL Module is loaded.
>
> I have no issues unless I am running a php file in the Scheduled task.
>
>
>
> Any help would be appreciated
>
Richard,
Create a sample scheduled task with a sample.php file. In that file call
phpinfo() and save that content. After finishing the task find the
configuration file (php.ini) location in your saved content. Just make sure
mysql is activated there.
Good luck
>
>
>
>
> Richard L. Buskirk
>
--- End Message ---
--- Begin Message ---
Okay,
I am just start apologizing for my own ignorance.
In the task scheduler I told the php.exe to use a older configuration file.
TOTALLY my fault, seems PHP.ini file I used for the web was not the one I
pointed the task manager at.
Resolved and I will crawl back under my rock and read more about the proper
Arguments for task manager next time before I post.
Thanks Shiplu, and Negin for all your help.
Richard L. Buskirk
-----Original Message-----
From: Shiplu Mokaddim [mailto:muquad...@gmail.com]
Sent: Thursday, June 23, 2011 9:42 PM
To: <ad...@buskirkgraphics.com>
Cc: <php-gene...@lists.php.net>
Subject: Re: [PHP] Call to undefined function
Sent from a handheld device
On 24-Jun-2011, at 5:53 AM, <ad...@buskirkgraphics.com> wrote:
> I am running a scheduled task for the first time since switching from
linux
> to Windows IIS
>
> I am getting an error when the task runs.
>
> Fatal error: Call to undefined function mysql_connect()
>
>
> I ran php.exe -m to see that the MySQL Module is loaded.
>
> I have no issues unless I am running a php file in the Scheduled task.
>
>
>
> Any help would be appreciated
>
Richard,
Create a sample scheduled task with a sample.php file. In that file call
phpinfo() and save that content. After finishing the task find the
configuration file (php.ini) location in your saved content. Just make sure
mysql is activated there.
Good luck
>
>
>
>
> Richard L. Buskirk
>
--- End Message ---
--- Begin Message ---
I have a multi-tier hash (see below) and I'd like to be "search" the
hash for a given $id, and return that section, regardless of how many
layers deep it is. Sort of like how xpath works?
Once I have that I'd like get ALL the children of a given node. So I
could ask for 86, and get 36, 38, 56, etc and all THEIR children.
Basically I want *all* the ID #s that are children.
Array
(
[88] => Array
(
[109] =>
)
[86] => Array
(
[36] => Array
(
[8] =>
[121] =>
[127] =>
[135] =>
[144] =>
[161] =>
[165] =>
)
[38] => Array
(
[18] =>
[39] =>
[156] =>
[158] =>
[182] =>
)
[56] =>
[97] =>
[107] => Array
(
[240] =>
)
[115] =>
[123] =>
[146] =>
[149] =>
[223] =>
)
[157] => Array
(
[3] => Array
(
[5] => Array
(
[11] =>
)
[13] => Array
(
[6] =>
[7] =>
[98] => Array
(
[81] =>
)
)
[111] => Array
(
[10] =>
[17] =>
[110] =>
)
)
[148] => Array
(
[9] =>
[87] =>
[102] =>
[104] =>
[114] =>
[130] =>
[133] =>
[160] =>
[201] =>
[237] =>
[238] =>
)
)
)
--- End Message ---
--- Begin Message ---
use recursive calls to fetch them all in one array and there will be memory
cost.
refer array_keys function: http://php.net/manual/en/function.array-keys.php
not sure but this should be working.
function *get_keys_recursive*($arr) {
while (list($k, $v) = each($arr)) {
if (is_array($v) === true) {
return array_keys(array_merge($v,* get_array_keys*($v)));
} else {
return array_keys($k);
}
}
}
On Thu, Jun 23, 2011 at 11:17 PM, Scott Baker <bak...@canbytel.com> wrote:
> I have a multi-tier hash (see below) and I'd like to be "search" the
> hash for a given $id, and return that section, regardless of how many
> layers deep it is. Sort of like how xpath works?
>
> Once I have that I'd like get ALL the children of a given node. So I
> could ask for 86, and get 36, 38, 56, etc and all THEIR children.
> Basically I want *all* the ID #s that are children.
>
> Array
> (
> [88] => Array
> (
> [109] =>
> )
>
> [86] => Array
> (
> [36] => Array
> (
> [8] =>
> [121] =>
> [127] =>
> [135] =>
> [144] =>
> [161] =>
> [165] =>
> )
>
> [38] => Array
> (
> [18] =>
> [39] =>
> [156] =>
> [158] =>
> [182] =>
> )
>
> [56] =>
> [97] =>
> [107] => Array
> (
> [240] =>
> )
>
> [115] =>
> [123] =>
> [146] =>
> [149] =>
> [223] =>
> )
>
> [157] => Array
> (
> [3] => Array
> (
> [5] => Array
> (
> [11] =>
> )
>
> [13] => Array
> (
> [6] =>
> [7] =>
> [98] => Array
> (
> [81] =>
> )
>
> )
>
> [111] => Array
> (
> [10] =>
> [17] =>
> [110] =>
> )
>
> )
>
> [148] => Array
> (
> [9] =>
> [87] =>
> [102] =>
> [104] =>
> [114] =>
> [130] =>
> [133] =>
> [160] =>
> [201] =>
> [237] =>
> [238] =>
> )
>
> )
>
> )
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi there!
I just have a small question concerning the http-protocol and php (and
in specific the header-function, i think).
Is it possible to manipulate the headers for the request which is sent
after a 302-header?
eg:
Response:
header('Referer: example.com');
header('Location: example.net');
Request (for the 302):
header('Referer: example.net');
header('Cache: max-age=0);
I think I need that for a login to a tomcat app from an external
php-form. As of now the Login works fine, I just have to reload the
page to actually be logged in (and that is quite a bother).
Sincerely yours
Louis
--- End Message ---
--- Begin Message ---
On Thu, Jun 23, 2011 at 01:57:24PM -0400, Robert Cummings wrote:
> On 11-06-23 12:54 PM, Tamara Temple wrote:
> >
> >On Jun 22, 2011, at 5:24 PM, Scott Baker wrote:
> >
> >>On 06/22/2011 03:17 PM, Simon J Welsh wrote:
> >>>You still need to pass the value by reference to assign_children(),
> >>>so:
> >>>$new =&$leaf[$pid];
> >>>assign_children($pid,$list,&$new);
> >>
> >>One last thing I fixed was that PHP was complaining that run-time pass
> >>by reference was deprecated. I changed assign_children to be
> >>
> >>function assign_children($id,$list,&$leaf)
> >>
> >>Which solved that also!
> >
> >Ah, pointers, how we love them. The bane of every CS undergrad.
>
> Bane? I thought they were elegant :)
The way you know they're *not* elegant is that hardly any language since
C has included them. We worship at the alter of languages with garbage
collection. ;-}
Paul
--
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com
--- End Message ---
--- Begin Message ---
On Wed, 22 Jun 2011 11:38:22 -0400, Jim Giner wrote:
>
> Well - it's a secret until one asks I guess. Thanks Shawn for the info.
> Since you say it's been happening for years, I guess there's no hope for
> resolution.
>
> Can you or someone else recommend a newsgroup client that functions better
> with this group?
slrn has worked for me with Gmane ng's for many years.
Currently using slrn 0.9.9p1 under FreeBSD.
HTH,
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm
--- End Message ---