php-windows Digest 5 Mar 2003 14:31:37 -0000 Issue 1619

Topics (messages 18847 through 18858):

compilation error using VC++ 5.0
        18847 by: Joe Wong

Re: ARRAY Question!
        18848 by: Aidal

$_Post doesn´t work
        18849 by: Oliver Steimer
        18850 by: Ryan Marrs
        18851 by: Ryan Marrs
        18852 by: Jill.Ramonsky.Aculab.com
        18856 by: Cam Dunstan

unique month-year (MySQL->php)
        18853 by: Bobo Wieland

mssql_connect error
        18854 by: Victor Kirk

Re: PHP install on Windows98 and PWS
        18855 by: Pavel Granèiè

custom extensions..
        18857 by: THOMAS BRADBURY

WIN 2000 ACCESS VIOLATION PROBLEMS
        18858 by: Daniel Masson

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 ---
Hello, I am using VC++ 5.0 to compile PHP 4.3.0 on a NT box, I got the
following error during compilation:

--------------------Configuration: Zend - Win32 Release--------------------
Compiling...
zend.c
zend_alloc.c
zend_API.c
zend_builtin_functions.c
zend_compile.c
zend_constants.c
zend_execute.c
G:\work\php-4.3.0\Zend\zend_execute.c(127) : warning C4013: '__assume'
undefined; assuming extern returning int
zend_execute_API.c
G:\work\php-4.3.0\Zend\zend_execute_API.c(362) : warning C4018: '==' :
signed/unsigned mismatch
zend_extensions.c
zend_hash.c
zend_highlight.c
zend_indent.c
zend_ini.c
zend_ini_parser.c
zend_ini_scanner.c
zend_language_parser.c
zend_language_scanner.c
G:\work\php-4.3.0\Zend\zend_language_scanner.c(5558) : warning C4273:
'isatty' : inconsistent dll linkage.  dllexport assumed.
zend_list.c
G:\work\php-4.3.0\Zend\zend_list.c(180) : warning C4013: '__assume'
undefined; assuming extern returning int
zend_llist.c
zend_multibyte.c
zend_opcode.c
zend_operators.c
zend_ptr_stack.c
zend_qsort.c
zend_sprintf.c
zend_stack.c
zend_variables.c
Generating Code...
Creating library...
--------------------Configuration: libmysql - Win32
Release--------------------
Compiling...
array.c
bchange.c
bmove.c
bmove_upp.c
charset.c
ctype.c
dbug.c
default.c
dll.c
errmsg.c
errors.c
get_password.c
int2str.c
is_prefix.c
libmysql.c
G:\work\php-4.3.0\ext\mysql\libmysql\libmysql.c(923) : warning C4018: '>' :
signed/unsigned mismatch
G:\work\php-4.3.0\ext\mysql\libmysql\libmysql.c(982) : warning C4018: '>' :
signed/unsigned mismatch
list.c
longlong2str.c
mf_casecnv.c
mf_dirname.c
mf_fn_ext.c
mf_format.c
mf_loadpath.c
mf_pack.c
mf_path.c
mf_unixpath.c
mf_wcomp.c
mulalloc.c
my_alloc.c
my_compress.c
my_create.c
my_delete.c
my_div.c
my_error.c
my_fopen.c
my_getwd.c
my_init.c
my_lib.c
my_malloc.c
my_messnc.c
my_net.c
my_once.c
my_open.c
my_pthread.c
my_read.c
my_realloc.c
my_static.c
my_tempnam.c
my_thr_init.c
my_wincond.c
my_winthread.c
my_write.c
net.c
password.c
safemalloc.c
str2int.c
strcend.c
strcont.c
strend.c
strfill.c
string.c
strinstr.c
strmake.c
strmov.c
strnmov.c
strtoll.c
strtoull.c
strxmov.c
thr_mutex.c
typelib.c
violite.c
Creating library...
--------------------Configuration: php4dll - Win32
Release--------------------
Compiling...
aggregation.c
css.c
cyr_convert.c
fopen_wrappers.c
main.c
mergesort.c
network.c
output.c
php_content_types.c
php_ini.c
php_logos.c
php_open_temporary_file.c
php_ticks.c
php_variables.c
quot_print.c
reentrancy.c
rfc1867.c
safe_mode.c
SAPI.c
snprintf.c
spprintf.c
streams.c
strlcat.c
strlcpy.c
user_streams.c
G:\work\php-4.3.0\main\user_streams.c(640) : warning C4244: '=' : conversion
from 'long ' to 'unsigned short ', possible loss of data
G:\work\php-4.3.0\main\user_streams.c(641) : warning C4244: '=' : conversion
from 'long ' to 'unsigned short ', possible loss of data
G:\work\php-4.3.0\main\user_streams.c(642) : warning C4244: '=' : conversion
from 'long ' to 'short ', possible loss of data
G:\work\php-4.3.0\main\user_streams.c(643) : warning C4244: '=' : conversion
from 'long ' to 'short ', possible loss of data
G:\work\php-4.3.0\main\user_streams.c(644) : warning C4244: '=' : conversion
from 'long ' to 'short ', possible loss of data
array.c
assert.c
base64.c
basic_functions.c
bcmath.c
browscap.c
crc32.c
credits.c
datetime.c
dir.c
dl.c
dns.c
exec.c
file.c
filestat.c
flock_compat.c
formatted_print.c
fsock.c
ftp_fopen_wrapper.c
head.c
html.c
http_fopen_wrapper.c
image.c
incomplete_class.c
info.c
iptc.c
lcg.c
levenshtein.c
link.c
mail.c
math.c
md5.c
metaphone.c
microtime.c
mod_files.c
mod_user.c
pack.c
pageinfo.c
parsedate.c
php_fopen_wrapper.c
php_mysql.c
G:\work\php-4.3.0\ext\mysql\php_mysql.c(359) : error C2065:
'CLIENT_INTERACTIVE' : undeclared identifier
G:\work\php-4.3.0\ext\mysql\php_mysql.c(1077) : warning C4013:
'mysql_character_set_name' undefined; assuming extern returning int
G:\work\php-4.3.0\ext\mysql\php_mysql.c(1671) : warning C4013:
'mysql_real_escape_string' undefined; assuming extern returning int
php_odbc.c
G:\work\php-4.3.0\ext\odbc\php_odbc.c(2134) : warning C4761: integral size
mismatch in argument; conversion supplied
php_pcre.c
rand.c
reg.c
G:\work\php-4.3.0\ext\standard\reg.c(350) : warning C4018: '<=' :
signed/unsigned mismatch
scanf.c
session.c
soundex.c
string.c
strnatcmp.c
syslog.c
type.c
uniqid.c
url.c
url_scanner.c
var.c
versioning.c
regcomp.c
regerror.c
regexec.c
regfree.c
chartables.c
get.c
G:\work\php-4.3.0\ext\pcre\pcrelib\internal.h(145) : fatal error C1189:
#error :  LINK_SIZE must be either 2, 3, or 4
maketables.c
G:\work\php-4.3.0\ext\pcre\pcrelib\internal.h(145) : fatal error C1189:
#error :  LINK_SIZE must be either 2, 3, or 4
pcre.c
G:\work\php-4.3.0\ext\pcre\pcrelib\internal.h(145) : fatal error C1189:
#error :  LINK_SIZE must be either 2, 3, or 4
study.c
G:\work\php-4.3.0\ext\pcre\pcrelib\internal.h(145) : fatal error C1189:
#error :  LINK_SIZE must be either 2, 3, or 4
ctype.c
overload.c
tokenizer.c
ftp.c
php_ftp.c
cal_unix.c
calendar.c
dow.c
easter.c
french.c
gregor.c
jewish.c
julian.c
COM.c
conversion.c
G:\work\php-4.3.0\ext\com\conversion.c(498) : warning C4013:
'SafeArrayGetVartype' undefined; assuming extern returning int
pwd.c
readdir.c
registry.c
sendmail.c
time.c
VARIANT.c
G:\work\php-4.3.0\ext\com\VARIANT.c(87) : fatal error C1189: #error :
"CP_SYMBOL undefined"
wfile.c
winsnmp.c
winutil.c
wsyslog.c
Error executing cl.exe.

php4nts.dll - 6 error(s), 16 warning(s)


What am I missing here??



--- End Message ---
--- Begin Message ---
Hmm.. When using arrays with loops a for structure comes in handy.

$count = sizeof($yourArray);

For ($i = 0; $i < $count; $i++) {
     ...do somthing...
     ... do some more...
}

Remember that index of arrays start at 0 and not at 1, so if you want to add
a value to the end of the array you can just add it like this:

$yourArray[$count] = "whatever value you want";

Since sizeof() returns the number of elements in your array and an array
starts at 0, the return value of sizeof($yourArray), if it contains 5
elements, would be 5.
But the index goes from 0 to 4 so adding an item to $yourArray[$count],
would be adding it to the end aka $yourArray[5].

/Aidal


"Matt Babineau" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's a numerical key so $myArray[] = "value"; will work perfectly!
>
> Thanks!
>
> --> -----Original Message-----
> --> From: Ben O'Neill [mailto:[EMAIL PROTECTED]
> --> Sent: Tuesday, March 04, 2003 5:06 PM
> --> To: [EMAIL PROTECTED]
> --> Subject: Re: [PHP-WIN] ARRAY Question!
> -->
> -->
> --> Using that it would be:
> -->
> --> $array_length = count($myArray);
> --> $myArray[$array_length] = $new_data;
> -->
> --> As arrays start at 0, and count() returns the number of elements.
> -->
> --> - Ben O'Neill
> -->
> --> "Chris Kranz" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Something like...
> >
> > $array_length = count( $myArray );
> > $myArray[$array_length + 1] = $new_data;
> >
> > This what your after? I think there might be a function for this tho,
> > but I'm a bit thick :p
> >
> > chris kranz
> > fatcuban.com
> >
> >
> >
> > -----Original Message-----
> > From: Matt Babineau [mailto:[EMAIL PROTECTED]
> > Sent: 04 March 2003 21:55
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] ARRAY Question!
> >
> >
> > Ok here goes!
> >
> > Lets say I have an array:
> >
> > $myArray = array();
> >
> > Now lets say I am looping over something
> >
> >
> > <LOOP>
> >
> > How do I simply add a new value to the array??
> >
> > I just want to start tacking on new key/value pairs to the array.
> >
> > I must be missing something really basic, but I'm not getting it LOL.
> >
> > <END LOOP>
> >
> >
> > Thanks,.
> >
> > <MAtt>
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



--- End Message ---
--- Begin Message ---
Hi there ,

I´m trying PHP and have a problem with with the superglobals.

I use Apache 1.3.27 and php 4.3.1

this is my script:


<html>
<body>
<?php

if ($_Post['submit'] {

echo (" Daten wurden eingetragen");

}

<form action="" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

but my script won´t do anything !!

Any one who can help ?

regards
Oliver



--- End Message ---
--- Begin Message ---
Try:

<html>
<body>
<? 
if ($_POST["submit"] {
        ?> Daten wurden eingetragen <?
}
?>
<form action="<? print($_SERVER["PHP_SELF"]); ?>" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

___________________________________
Ryan Marrs
Web Developer
Sandler & Travis Trade Advisory Services, Inc.
248.474.7200 x 183
248.474.8500 (fax)
www.strtrade.com


-----Original Message-----
From: Oliver Steimer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 5:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] $_Post doesn´t work

Hi there ,

I´m trying PHP and have a problem with with the superglobals.

I use Apache 1.3.27 and php 4.3.1

this is my script:


<html>
<body>
<?php

if ($_Post['submit'] {

echo (" Daten wurden eingetragen");

}

<form action="" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

but my script won´t do anything !!

Any one who can help ?

regards
Oliver



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Ack, missed a closing parenthesis, and for avoiding warnings, you should
probably use an empty check on the variable.  

<html>
<body>
<? 
if (!empty($_POST["submit"])) {
        ?> Daten wurden eingetragen <?
}
?>
<form action="<? print($_SERVER["PHP_SELF"]); ?>" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

___________________________________
Ryan Marrs
Web Developer
Sandler & Travis Trade Advisory Services, Inc.
248.474.7200 x 183
248.474.8500 (fax)
www.strtrade.com


-----Original Message-----
From: Ryan Marrs [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 3:12 AM
To: 'Oliver Steimer'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] $_Post doesn´t work

Try:

<html>
<body>
<? 
if ($_POST["submit"]) {
        ?> Daten wurden eingetragen <?
}
?>
<form action="<? print($_SERVER["PHP_SELF"]); ?>" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

___________________________________
Ryan Marrs
Web Developer
Sandler & Travis Trade Advisory Services, Inc.
248.474.7200 x 183
248.474.8500 (fax)
www.strtrade.com


-----Original Message-----
From: Oliver Steimer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 5:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] $_Post doesn´t work

Hi there ,

I´m trying PHP and have a problem with with the superglobals.

I use Apache 1.3.27 and php 4.3.1

this is my script:


<html>
<body>
<?php

if ($_Post['submit'] {

echo (" Daten wurden eingetragen");

}

<form action="" method="post">
<input type="submit" name="submit" value="Daten eintragen">
</form>

</body>
</html>

but my script won´t do anything !!

Any one who can help ?

regards
Oliver



-- 
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 ---
I believe it's called $_POST, not $_Post.
I could be wrong, but I was given to understand that variable names (as
opposed to function names) were case sensitive.

Jill


-----Original Message-----
From: Oliver Steimer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 10:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] $_Post doesn´t work

if ($_Post['submit'] {


--- End Message ---
--- Begin Message ---
Quite right - variable names are most definitely case sensitive.  Functions
are not.
CD


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 7:40 PM
Subject: RE: [PHP-WIN] $_Post doesn´t work


> I believe it's called $_POST, not $_Post.
> I could be wrong, but I was given to understand that variable names (as
> opposed to function names) were case sensitive.
>
> Jill
>
>
> -----Original Message-----
> From: Oliver Steimer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2003 10:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] $_Post doesn´t work
>
> if ($_Post['submit'] {
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Hi all!

I have a mysql table with a timestamp field. I need to get the information
on which month's and year's there are present in this table. How can I get
this info? It's important that I don't get any duplicates...

$q = "SELECT (?) AS year, (?) AS month FROM my_table ORDER BY year, month";


thanks in advance!


. bobo .



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

I've got a problem connecting to a mssql server.  mssql_connect seems to
ignore
the username I'm trying to contect as.

php seems correctly configured, extension directory set correctly,
php_mssql.dll
is set as an extension, ntwdblib.dll is in the system32 directory and
phpinfo
reports mssql correctly.

I'm using Metabase but I've added a line of debug prior to the call to
mssql_connect
i.e. :

  echo "<p><b>connecting to $this->host as $this->user wiht a password
'$this->password'</b></p>";
 
if(($connection=mssql_connect($this->host,$this->user,$this->password))==0)
     return($this->SetMSSQLError("Standalone query","Could not connect to
the Microsoft SQL server"));


This gives the following output:

 connecting to guardian as vkirk with password ''

 Warning: mssql_connect() [function.mssql-connect]: message: Login failed
for user 'GUARDIAN  \IUSR_EPOTEST'. (severity 14) in
c:\Inetpub\wwwroot\skills\pod\metabase_mssql.php on line 58

 Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: guardian in c:\Inetpub\wwwroot\skills\pod\metabase_mssql.php on line
58

 Could not install database: Could not connect to the Microsoft SQL server:
Login failed for user 'GUARDIAN\IUSR_EPOTEST'..


Any mssql or MS SQL experts know of anything.  I'm using php version 4.3.1
under
IIS as cgi.

Thanks,


Vic
--
Victor Kirk
Analyst
Serco Integrated Transport
--

This message, including attachments, is intended only for the use by the
person(s) to whom it is addressed. It may contain information which is
privileged and confidential. Copying or use by anybody else is not
authorised. If you are not the intended recipient, please contact the sender
as soon as possible. The views expressed in this communication may not
necessarily be the views held by Serco Integrated Transport.

--- End Message ---
--- Begin Message ---
phpinfo makes output itself...

> <? phpinfo() ?>
> This will probably not work since you do not tell the function what to do
> with the returned value.




--- End Message ---
--- Begin Message ---
Hi,
I'm using PHP 4.3.1 and Windows IIS-5 (on WinXP), and I'm wanting to set up a custom 
file extension to be processed by PHP...

instead of using "blah.com/image.php?...."
i'd like to use "blah.com/image?..." or "blah.com/.image?..."

Is this possible to set up (on such a setup as mine), and if so, how do I do it?
Thanks,
Tom Bradbury


--- End Message ---
--- Begin Message ---
RECENTLY I INSTALLED PHP ON A WIN 2000 AND WHEN THE WIN STARTS AND THE
IIS SERVICE STARTS AND PHP WORKS OK ... BUT AFTER SOME MINUTES OF BEING
UP , .. THE SCRIPT RESPONSES:

PHP has encountered an Access Violation at 0119295E

AND LATER THE PHP SCRIPTS ARE NOT ACCESIBLE ANY MORE THROUGH BROWSER,
AND FINALLY I GET FROM IE "THE PAGE CANNOT BE DISPLAYED"

THIS IS HAPPENING WITH 4.2.1 AND 4.3.0 INSTALLED AS IIS MODULE.

ANY IDEAS ABOUT HOW TO SOLVE THIS ???


Daniel E Massón.
Ingeniero de desarrollo
[EMAIL PROTECTED]
____________________________________
Imagine S.A. 
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 
____________________________________
- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico
____________________________________
 

-----Mensaje original-----
De: Cam Dunstan [mailto:[EMAIL PROTECTED] 
Enviado el: miércoles, 05 de marzo de 2003 8:05
Para: [EMAIL PROTECTED]
Asunto: Re: [PHP-WIN] $_Post doesn´t work

Quite right - variable names are most definitely case sensitive.
Functions
are not.
CD


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 7:40 PM
Subject: RE: [PHP-WIN] $_Post doesn´t work


> I believe it's called $_POST, not $_Post.
> I could be wrong, but I was given to understand that variable names
(as
> opposed to function names) were case sensitive.
>
> Jill
>
>
> -----Original Message-----
> From: Oliver Steimer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 04, 2003 10:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] $_Post doesn´t work
>
> if ($_Post['submit'] {
>
>
> --
> 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 ---

Reply via email to