php-windows Digest 15 Mar 2003 21:03:38 -0000 Issue 1636

Topics (messages 19019 through 19026):

Re: IDE's
        19019 by: Uttam

Registers global variables
        19020 by: Sun Yong

Re: Global Variable Issues
        19021 by: Thomas Smart

Re: ODBC Query max()
        19022 by: Thomas Smart

Re: cgi error when instantiating a com application
        19023 by: Rowan Hick

Re: link error on compile php4ts.dsw -cannot open input file "zlib.lib"
        19024 by: John M. Calvert
        19025 by: Frank M. Kromann

fopen("http://...";) shows error when there is none
        19026 by: Lukas

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 ---
This is good & free:

Maguma Studio for PHP at http://www.maguma.com/en/lightdownload.html

regds,
-----Original Message-----
From: Beach, Jim [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 15, 2003 03:25
To: [EMAIL PROTECTED]
Subject: IDE's


Does anyone have experience with PHP integrated development
environments?

 

I have experience with Dreamweaver 4 and am considering upgrading to
Dreamweaver MX although I'm not sure it has as much PHP support as I'd
like. I'm also interested in Zend Studio v2.6 which is just released.
I'd appreciate any comments or suggestions. Thank you.



--- End Message ---
--- Begin Message --- There are a functions posted on this page that can help to make it seem that register_globals is turned on.

/**
* Registers global variables
*
* This function takes global namespace $_* variables from input and if they exist,
* register them as a global variable so that scripts can use them. The argument
* signifies where to pull the variable names from, and should be of:
* GET, POST, COOKIE, ENV, or SERVER.
*
*/


function global_register()
{
$num_args = func_num_args();
if ($num_args > 0)
{
for ($i = 0; $i < $num_args; $i++)
{
$method = strtoupper(func_get_arg($i));
if (($method != 'SESSION') && ($method != 'GET') && ($method != 'POST') && ($method != 'SERVER') && ($method != 'COOKIE') && ($method != 'ENV'))
{
die("The \"$method\" is invalid argument, The argument of global_register must be the following: GET, POST, SESSION, SERVER, COOKIE, or ENV");
}
$varname = "_{$method}";
global ${$varname};
foreach (${$varname} as $key => $val)
{
global ${$key};
${$key} = $val;
}
}


        }else{
                die('You must specifya at least one arguments');
        }
}

You can then register your global variables for use like this:
// register a GET var
global_register('GET');
// register GET POST var
global_register('GET','POST');
// register GET POST SESSION var
global_register('GET','POST','SESSION);





_________________________________________________________________



--- End Message ---
--- Begin Message ---
you could use a database or you could write the information to a textfile on
the server, i have used that sometimes to transfer large lumps of info from
1 page to another if i didnt want to use a database.


"Cam" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>     Through past releases of PHP, I've developed with global variables on.
> These days it's becoming the trend, for security & asthetics purposes, to
> turn global variables off...  Let's say I have a $status variable that
> changes depending upon the user's actions on the previous page and
displays
> a message...
>
> Is there a way to propagate this variable through pages without 1)
declaring
> it as a global, 2) writing it to a cookie, 3) passing it through the URL
or
> 4) passing it through a form w/ POST?
>
> 1-globals are now off
> 2-cookie writing is impracical & no desire to store 1 time information
> client side
> 3-displaying the status message in the URL (or a status id) would look
> unprofessional and allow for user manipulation of the message they see by
> editing the URL string
> 4-not all my site's page transitions occur through forms, so I see no way
to
> use $_POST every time
>
> I appreciate any suggestions & hearing your thoughts,
>
> Cam
>
>



--- End Message ---
--- Begin Message ---
this is a mysql query for heighest id, maybe it helps

// get highest ID from database
 include 'includes/connect.php';
 $query1=MYSQL_QUERY("SELECT max(id) as max_id FROM $ctableuk");
 $getvar=MYSQL_FETCH_ARRAY($query1);
 $id=$getvar["max_id"];
 mysql_close();

 if (!isset($id)){$id="1";}




"Generalx" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm trying to extract one record that has largest sequence ID number for
an
> employee, so I've tried below but doesn't work.  Help.
>
> $mQuery = "EmployeeID = '$user'";
> $mCur = odbc_exec( $mCnx, "select ID=max(ID),Date,TimeIn,TimeOut,StationIP
> from Clocks where $mQuery" );
>
>
>



--- End Message ---
--- Begin Message ---
Fix (sortof) - If I run PHP as an ISAPI module then instantiating a COM
object works fine and as intended, the minute I try it using under CGI
binary it gives the error. Alas alak my production environment will have to
wait a while for COM object use until it's bulletproof...

It had little bearing on the COM object as I tried many different COM
objects, from ADODB.recordset to IXSSO.QUERY and ole faithful
WORD.APPLICATION.. none of which worked under CGI.


Regards
Rowan

----- Original Message -----
From: "Sven Schnitzke"
To: "'Rowan Hick'" <[EMAIL PROTECTED]>
Sent: Saturday, March 08, 2003 10:05 PM
Subject: AW: [PHP-WIN] cgi error when instantiating a com application


Please be more descriptive! At least you might wish to  reveal the upcoming
windows error message. Most likely the center of the problem  lies in the
usage of the COM object. Is the web server user IUSR_[machinename] allowed
to open this kind of query?
--
Sven

> -----Ursprüngliche Nachricht-----
> Von: Rowan Hick [SMTP:[EMAIL PROTECTED]
> Gesendet am: Freitag, 7. März 2003 22:55
> An: [EMAIL PROTECTED]
> Betreff: [PHP-WIN] cgi error when instantiating a com application
>
> Hi All,
>
> If anyone could shed light on this I would be well appreciative.
>
> Under IIS 5.1, XP Pro, PHP 4.3.0 and PHP 4.3.1 whenever I instantiate a
com
> object ie:
>
> $myobj = new com ("ixsso.query") or die ("blah..")
>
> I get a windows error message, although the script does execute up until
the
> com object call. If I call an invalid object ie ("muppet.fraggle") then
I'll
> get my correct die message and no error. If I don't have any script before
> the new com call then I'll get a CGI error "The specified CGI application
> misbehaved by not returning a complete set of HTTP headers. The headers it
> did return are:"
>
> AppName: php.exe AppVer: 4.3.1.1 ModName: php4ts.dll  ModVer: 4.3.1.1
> Offset: 00030727
>
> I've tried installing Apache 2 and retesting, I get the same result.
Anyone
> else struck this problem ? Resolutions ?
>
> Kind Regards,
>
>
> Rowan
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I'm not familiar enough with the architecture of PHP to fully understand
your comment. When you say module, to me that means *.dll. However, my error
occurs when the linker is trying to link a library, zlib.lib. The relevant
details are in the /win32/php4dllts.dsp project which is part of the
/win32/php4ts.dsw workspace. I'm trying to build php4ts.dsw as per
/manual/en/install.windows.php#install.windows.build.

Given the linker error I get, I'm looking for zlib.lib which I don't see
anywhere. Mind you, is there a search function for cvs.php.net? I had to
look by randomly rooting around. The zlib project (/ext/zlib/zlib.dsp)
builds php_zlib.dll so that is not it.

Some external libraries are included in /extra/win32build.zip, and the above
instructions even have us build an additional resolv.lib, but there is no
sign of zlib.lib.

I've tried this with both the PHP 4.3.1 (tar.gz) [4,395Kb] - 17 February
2003 and a PHP snapshot Latest CVS (4.5.x-dev). Same problem with both. But
I'm not sure if the problem is my machine configuration, or an error in the
MS VC++ workspace / project details.

John

----- Original Message -----
From: "Frank M. Kromann" <[EMAIL PROTECTED]>
To: "John M. Calvert" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 15, 2003 3:22 AM
Subject: Re: [PHP-WIN] link error on compile php4ts.dsw -cannot open input
file "zlib.lib"


the zlib extension is compiled in and you need to get the zlib module from
cvs.php.net.

- Frank

> Hi, I trying for the first time ever to compile PHP on my Windows 2000
> machine using MS VC++ 6. I have been following the instructions in
> /manual/en/install.windows.php. Everything goes fine until the linker
kicks
> in:
>
> Linking...
> LINK : fatal error LNK1181: cannot open input file "zlib.lib"
> Error executing link.exe.
>
> php.exe - 1 error(s), 21 warning(s)
>
> I've spent a few hours poking at it but there is too much new to me to
> figure my way out. The best I can figure is that zlib.lib should be in
> win32build/lib but it isn't.
>
> Can anyone help?
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi John,

I have never used the pre build version of the source code (I allways
build from the cvs version). From version 4.3.0 of php we decided to have
the zlib extension compiled in so there is no need for php_zlib.dll. In
order to compile php you need to get a copy of the zlib sources. I guess
we need to update the build instructions and include this code in the
distribution.

You can get zlib from the cvs server (cvs.php.net). This will give you a
zlib directory next to php4 and bindlib_w32. You will find zlib.dsp and
dsw files in this directory. These files can be used to build the
zlib.lib

- Frank

> I'm not familiar enough with the architecture of PHP to fully
understand
> your comment. When you say module, to me that means *.dll. However, my
error
> occurs when the linker is trying to link a library, zlib.lib. The
relevant
> details are in the /win32/php4dllts.dsp project which is part of the
> /win32/php4ts.dsw workspace. I'm trying to build php4ts.dsw as per
> /manual/en/install.windows.php#install.windows.build.
> 
> Given the linker error I get, I'm looking for zlib.lib which I don't
see
> anywhere. Mind you, is there a search function for cvs.php.net? I had
to
> look by randomly rooting around. The zlib project (/ext/zlib/zlib.dsp)
> builds php_zlib.dll so that is not it.
> 
> Some external libraries are included in /extra/win32build.zip, and the
above
> instructions even have us build an additional resolv.lib, but there is
no
> sign of zlib.lib.
> 
> I've tried this with both the PHP 4.3.1 (tar.gz) [4,395Kb] - 17
February
> 2003 and a PHP snapshot Latest CVS (4.5.x-dev). Same problem with both.
But
> I'm not sure if the problem is my machine configuration, or an error in
the
> MS VC++ workspace / project details.
> 
> John
> 
> ----- Original Message -----
> From: "Frank M. Kromann" <[EMAIL PROTECTED]>
> To: "John M. Calvert" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, March 15, 2003 3:22 AM
> Subject: Re: [PHP-WIN] link error on compile php4ts.dsw -cannot open
input
> file "zlib.lib"
> 
> 
> the zlib extension is compiled in and you need to get the zlib module
from
> cvs.php.net.
> 
> - Frank
> 
> > Hi, I trying for the first time ever to compile PHP on my Windows
2000
> > machine using MS VC++ 6. I have been following the instructions in
> > /manual/en/install.windows.php. Everything goes fine until the linker
> kicks
> > in:
> >
> > Linking...
> > LINK : fatal error LNK1181: cannot open input file "zlib.lib"
> > Error executing link.exe.
> >
> > php.exe - 1 error(s), 21 warning(s)
> >
> > I've spent a few hours poking at it but there is too much new to me
to
> > figure my way out. The best I can figure is that zlib.lib should be
in
> > win32build/lib but it isn't.
> >
> > Can anyone help?
> >
> > _________________________________________________________________
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 




--- End Message ---
--- Begin Message ---
Hi!
I've installed 4.3.1 under Windows 2002 and whenever I try to call my SMS
gateway with a php function (which was no problem with the provider I had
before) the script gives me the following output:

Warning: fopen() [function.fopen]: HTTP request failed! HTTP/1.1 404 Object
Not Found in E:\Webseiten\test.php on line 3
Warning: fopen( here comes my sms provider url for the script)
[function.fopen]: failed to create stream: Bad file descriptor in
E:\Webseiten\test.php on line 3
Warning: fgets(): supplied argument is not a valid stream resource in
E:\Webseiten\\test.php on line 4
Warning: fclose(): supplied argument is not a valid stream resource in
E:\Webseiten\\test.php on line 5

But ... the SMS arrives on my mobile phone without any problems!
Do you have an idea what I could do?

Lukas L. Rosenstock



--- End Message ---

Reply via email to