php-windows Digest 16 Apr 2007 21:43:22 -0000 Issue 3196
Topics (messages 27694 through 27700):
Re: Network programming with php
27694 by: Stut
27696 by: Aaron Kenney
27697 by: chandar
27698 by: Stut
Message ("Your message dated Mon, 16 Apr 2007 14:25:12...")
27695 by: LISTSERV.LISTSERV.AOL.COM
Problems when trying to use ibm_db2 extension
27699 by: Leo Jokinen
Re: [PHP] Problems when trying to use ibm_db2 extension
27700 by: Richard Lynch
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 ---
sam rumaizan wrote:
Thank you for the link. This application is using C programming. I’m
looking for some thing with PHP
Out of pure curiosity... why? You need a tool to do a job, why put
artificial constraints on it.
-Stut
*/Stut <[EMAIL PROTECTED]>/* wrote:
sam rumaizan wrote:
> I need to create an online system to monitors the ports for my
local network. For example:
> I have 50 ports and I need the system to give me an alarm
whenever the port is down for any reason. Pulse I want the system to
give me the manufacture name to be able to decide what kind of port
it is (printer, PC, access point,...etc)
This particular wheel already exists: http://www.nagios.org/. And
that's
just one example, there are several out there.
-Stut
> Aaron Kenney wrote:
> "Network programming" is a very broad term. What is it that you are
> trying to accomplish?
>
> On 4/15/07, sam rumaizan wrote:
>> Can you recommend any online tutorial OR Book for Network
programming with php?
>>
>>
>>
>>
>>
>>
>> ---------------------------------
>> Ahhh...imagining that irresistible "new car" smell?
>> Check outnew cars at Yahoo! Autos.
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------------------------------------------------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
--- End Message ---
--- Begin Message ---
I agree. Why? The other concern is that php was never really meant to
be a fully self-sufficient programming language. Its a hypertext
pre-processor designed for the web. Maybe you are looking to get a
network monitor onto a web site so you can access it from anywhere? I
would still think that you would be better off handling the port
sensing function with a non-web language. Maybe you can just have php
read from a file the results of what the other language does.
On 4/16/07, Stut <[EMAIL PROTECTED]> wrote:
sam rumaizan wrote:
> Thank you for the link. This application is using C programming. I'm
> looking for some thing with PHP
Out of pure curiosity... why? You need a tool to do a job, why put
artificial constraints on it.
-Stut
> */Stut <[EMAIL PROTECTED]>/* wrote:
>
> sam rumaizan wrote:
> > I need to create an online system to monitors the ports for my
> local network. For example:
> > I have 50 ports and I need the system to give me an alarm
> whenever the port is down for any reason. Pulse I want the system to
> give me the manufacture name to be able to decide what kind of port
> it is (printer, PC, access point,...etc)
>
> This particular wheel already exists: http://www.nagios.org/. And
> that's
> just one example, there are several out there.
>
> -Stut
>
> > Aaron Kenney wrote:
> > "Network programming" is a very broad term. What is it that you are
> > trying to accomplish?
> >
> > On 4/15/07, sam rumaizan wrote:
> >> Can you recommend any online tutorial OR Book for Network
> programming with php?
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------
> >> Ahhh...imagining that irresistible "new car" smell?
> >> Check outnew cars at Yahoo! Autos.
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You can use Zend calls to access some C or other langauage api's which
inturn can access the network related stuff.
Aaron Kenney wrote:
I agree. Why? The other concern is that php was never really meant to
be a fully self-sufficient programming language. Its a hypertext
pre-processor designed for the web. Maybe you are looking to get a
network monitor onto a web site so you can access it from anywhere? I
would still think that you would be better off handling the port
sensing function with a non-web language. Maybe you can just have php
read from a file the results of what the other language does.
On 4/16/07, Stut <[EMAIL PROTECTED]> wrote:
sam rumaizan wrote:
> Thank you for the link. This application is using C programming. I'm
> looking for some thing with PHP
Out of pure curiosity... why? You need a tool to do a job, why put
artificial constraints on it.
-Stut
> */Stut <[EMAIL PROTECTED]>/* wrote:
>
> sam rumaizan wrote:
> > I need to create an online system to monitors the ports for my
> local network. For example:
> > I have 50 ports and I need the system to give me an alarm
> whenever the port is down for any reason. Pulse I want the
system to
> give me the manufacture name to be able to decide what kind of
port
> it is (printer, PC, access point,...etc)
>
> This particular wheel already exists: http://www.nagios.org/. And
> that's
> just one example, there are several out there.
>
> -Stut
>
> > Aaron Kenney wrote:
> > "Network programming" is a very broad term. What is it that
you are
> > trying to accomplish?
> >
> > On 4/15/07, sam rumaizan wrote:
> >> Can you recommend any online tutorial OR Book for Network
> programming with php?
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------
> >> Ahhh...imagining that irresistible "new car" smell?
> >> Check outnew cars at Yahoo! Autos.
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
>
>
------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Aaron Kenney wrote:
I agree. Why? The other concern is that php was never really meant to
be a fully self-sufficient programming language. Its a hypertext
pre-processor designed for the web. Maybe you are looking to get a
network monitor onto a web site so you can access it from anywhere? I
would still think that you would be better off handling the port
sensing function with a non-web language. Maybe you can just have php
read from a file the results of what the other language does.
That would be another artificial constraint. PHP is more than up to the
job of small-scale server monitoring. I know this because I use it to do
just that. I have a set of PHP scripts that monitor a number of services
on 6 servers and it works quite nicely. Granted it wouldn't scale
without major work but it does the job.
-Stut
On 4/16/07, Stut <[EMAIL PROTECTED]> wrote:
sam rumaizan wrote:
> Thank you for the link. This application is using C programming. I'm
> looking for some thing with PHP
Out of pure curiosity... why? You need a tool to do a job, why put
artificial constraints on it.
-Stut
> */Stut <[EMAIL PROTECTED]>/* wrote:
>
> sam rumaizan wrote:
> > I need to create an online system to monitors the ports for my
> local network. For example:
> > I have 50 ports and I need the system to give me an alarm
> whenever the port is down for any reason. Pulse I want the
system to
> give me the manufacture name to be able to decide what kind of port
> it is (printer, PC, access point,...etc)
>
> This particular wheel already exists: http://www.nagios.org/. And
> that's
> just one example, there are several out there.
>
> -Stut
>
> > Aaron Kenney wrote:
> > "Network programming" is a very broad term. What is it that
you are
> > trying to accomplish?
> >
> > On 4/15/07, sam rumaizan wrote:
> >> Can you recommend any online tutorial OR Book for Network
> programming with php?
> >>
> >>
> >>
> >>
> >>
> >>
> >> ---------------------------------
> >> Ahhh...imagining that irresistible "new car" smell?
> >> Check outnew cars at Yahoo! Autos.
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
>
>
------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
>
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Your message dated Mon, 16 Apr 2007 14:25:12 +0300 with subject "Returned
mail: see transcript for details" has been submitted to the moderator of the
TOURBUS list: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi all,
I've been banging my head into the wall cause I can't get ibm_db2
extension working with Apache 2.0.59 and PHP 5.2.1 (as apache module).
(Operating system is winxp pro SP2)
For some reason, this code is working on command line but not when
placed to htdocs folder:
<?php
if(function_exists('db2_connect')) {
echo 'Function db2_connect() exists';
} else {
echo 'Unknown function db2_connect()';
exit;
}
echo "\nTrying to connect DB2 database..\n";
$database = 'services';
$user = 'db2admin';
$password = 'xxx';
$hostname = '127.0.0.1';
$port = 50000;
$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
if ($conn) {
echo "OK: Connection established\n";
db2_close($conn);
} else {
echo "ERROR: Connection failed\n";
}
?>
Command line output:
C:\>php c:\db2_test.php
Function db2_connect() exists
Trying to connect DB2 database..
OK: Connection established
Web output:
Unknown function db2_connect()
Some extra output:
Fatal error: Call to undefined function db2_connect() in
F:\www\services.itella.net\app\webroot\index.php on line 57
Also, phpinfo() won't say nothing that module ibm_db2 is in use
More info:
php_ibm_db2.dll file is in folder C:/php-5.2.1/ext
php.ini:
extension_dir = "C:/php-5.2.1/ext"
extension=php_ibm_db2.dll
httpd.conf:
AddType application/x-httpd-php .php
LoadModule php5_module "C:/php-5.2.1/php5apache2.dll"
PHPIniDir "C:/php-5.2.1/"
Can someone point out the right direction for me?
Regards
Leo Jokinen
--- End Message ---
--- Begin Message ---
On Mon, April 16, 2007 9:21 am, Leo Jokinen wrote:
> Also, phpinfo() won't say nothing that module ibm_db2 is in use
Did you re-start Apache?
Actually, Windows being Windows, just re-boot the dang thing...
You should be used to that. :-)
Is the php.ini file named in phpinfo() the one you are editing?
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
--- End Message ---