Jump to content

Recommended Posts

I am using the win32_scheduler module for php. On my pc I get no error but when I put it on my web server I get this error:

Warning: Invalid argument supplied for foreach() in

My PC Specs:
Windows XP SP2
IIS 5.1
PHP 5.1.2

Web server Specs
Windows 2003 Server
IIS 6.0
PHP 5.1.2

Script:
[code]<?
$priv1 = win32_scheduler_get_task_info('cmdtest');
foreach ($priv1 as $key => $value){
echo "$key: $value<br />\n";
}
?>[/code]

Any ideas???

Thanks
Ray
Link to comment
https://forums.phpfreaks.com/topic/3699-works-on-windows-xp-iis-50/
Share on other sites

OK I know why I am getting the error the question is why??

here is my new code

[code]<?
$priv1 = win32_scheduler_get_task_info("start_TE_CSS_Priv1");
print ''.gettype($priv1).'';
foreach ($priv1 as $key => $value){
echo "$key: $value<br />\n";
}?>[/code]

On my server it returns gettype of array, on the web server it return gettype of boolean!

Why!?!?!

:)

Ray
I guess I am on my own when it comes to windows stuff. If anyone ever has this problem it is a permissions thing.
I got so pissed off I gave the internet guest account read/execute access to the windows folder, because I am not wure what files it needs to run.

But thanks anyway.

Ray
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.