php-windows Digest 10 Feb 2003 20:11:43 -0000 Issue 1581

Topics (messages 18424 through 18439):

Re: If statement inside of for statement
        18424 by: Stan McCowan

newbie:sql update
        18425 by: Apollo
        18430 by: Svensson, B.A.T. (HKG)

Re: how to make php4ts.dll act as a module of vb6 program?
        18426 by: cmkpl
        18427 by: Per Lundberg
        18431 by: Svensson, B.A.T. (HKG)

Re: dom
        18428 by: Per Lundberg

Re: site navigation with odbc mssql7
        18429 by: Per Lundberg

Problems with mail()
        18432 by: "Juan Ant. Martínez"
        18433 by: Vladimir Galkov

I get a "File Download" dialogue box
        18434 by: news
        18435 by: fran.thomas.barclays.co.uk
        18437 by: Chris Kranz
        18438 by: Chris Kranz

Re: [PHP-INST] I get a "File Download" dialogue box
        18436 by: Stephen Edmonds

php4-win32-STABLE-latest Installation Problems
        18439 by: Christian R. Ford

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 ---
Matt,
I'm pasting a couple of values from a form page.
I'm check against a flat file database.
After the for each statement display the string $line and $move.
the value are equal, but the if statement is not executed.

Stan
-----Original Message-----
From: Matt Hillebrand [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 09, 2003 7:59 PM
To: 'Stan McCowan'
Subject: RE: [PHP-WIN] If statement inside of for statement


You'll have to be more descriptive than that. There's nothing wrong with
your syntax... Although, I would add some <BR> tags in your output if I
were you.

Matt

|-----Original Message-----
|From: Stan McCowan [mailto:[EMAIL PROTECTED]] 
|Sent: Sunday, February 09, 2003 9:04 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] If statement inside of for statement
|
|
|I'm having a problem with the if statement not working inside 
|of a for statement.
|
|Is there something I'm missing.
|
|<?php
|
|$auth = 'NO';
|$user=$_POST['user'];
|$pass=$_POST['pass'];
|$move=($user.":".$pass);
|
|$filename = 'ADMIN/file.txt';
|$fp = fopen( $filename, 'r' );
|$file_contents = fread( $fp, filesize( $filename ) );
|fclose( $fp );
|$lines = explode ( "\n", $file_contents );
|
|    foreach ( $lines as $line ) {
|     echo $line;
|     echo " - ";
|     echo $move;
|
|     if ($move==$line)
|     {
|         echo "This is MOVE = ";
|         $auth = 'YES';
|         break;
|     }
|    }
|?>
|
|
|
|-- 
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|


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

I'm trying out some few things about updating a database...

 $connection = odbc_pconnect("OpusDB","","",SQL_CUR_USE_ODBC);
// define the rows that are going to be extracted
          odbc_exec($connection,"UPDATE DeptMaster SET Counter=Counter+1
WHERE DeptDesc='$mydepartment'");

here's the error:

Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must
use an updateable query., SQL state S1000 in SQLExecDirect in
c:\inetpub\wwwroot\TMPlvv9ya34u1.php on line 16

I am trying this out on an IIS in XP with the MSACCESS database...

Pls. help. Thanks.


--- End Message ---
--- Begin Message ---
There exists an know bug with ODBC that generates
SQL STATE S1000 (== General Error). I think a
workarounds can be found (somewhere) at www.MSDN.com.


> -----Original Message-----
> From: Apollo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 10, 2003 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] newbie:sql update
> 
> 
> Hi,
> 
> I'm trying out some few things about updating a database...
> 
>  $connection = odbc_pconnect("OpusDB","","",SQL_CUR_USE_ODBC);
> // define the rows that are going to be extracted
>           odbc_exec($connection,"UPDATE DeptMaster SET Counter=Counter+1
> WHERE DeptDesc='$mydepartment'");
> 
> here's the error:
> 
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must
> use an updateable query., SQL state S1000 in SQLExecDirect in
> c:\inetpub\wwwroot\TMPlvv9ya34u1.php on line 16
> 
> I am trying this out on an IIS in XP with the MSACCESS database...
> 
> Pls. help. Thanks.
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
no one can help?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/1/2003


--- End Message ---
--- Begin Message ---
cmkpl wrote:
i just want to use this dll to do input of php pages
and get the output
Look in the source code of the CGI or CLI sapi (in sapi/cli or sapi/cgi in the PHP source distribution) for an example of how to do it in C. I have no idea of how to call C libraries from within Visual Basic; it may or may not be a trivial task.

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com


--- End Message ---
--- Begin Message ---
> and i use vb to write a server

Why?

Implement it in a decent language like C/C++ instead.
Pascal or, good forbid, Java would had been a better
choice than VB.

--- End Message ---
--- Begin Message ---
parvez Soobhany wrote:

to cofingure my apache and php to use php dom...where do I type this command --with -dom
When you compile PHP. But you probably have it compiled already, as a module, if you're using the binary archive from php.net. Look in php.ini for the extension lines. There should be a line (commented out) listing php_domxml.dll.

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com


--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:

we need example for site navigation (for database, we use odbc and MSSQL
7),
Be more specific. What kind of site navigation? A javascript menu, a HTML site map or something else?

What kind of help are you looking for, a table design?

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com


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

I'm new to php. I have downloaded and installed PHP 4.3.0 on a Windows NT 4.0 server. I have tested the configuration and changed the parameters in php.ini to fit my environment.
The basic code works fine, but one of the things I'd like to do is to send mails. I have found the sample code and tested the following :

mail("[EMAIL PROTECTED]", "test", "This is a test!","From: [EMAIL PROTECTED]")

But when I run this code, I get the following error:

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in d:\www\mail.php on line 9

In fact, the sendmail_from is configured in the php.ini file (in the windows directory), and also forced in the line above (I have tried also without the "From:..." but it does neither work) . The smtp server is in a remote machine, and in fact, no connection is made from the php script (I have looked through the logs and there has been no attempt to connect)

Does anyone know where is the problem? Any suggestions will be welcomed.

Thanks in advance,

Juanan

--- End Message ---
--- Begin Message ---
I feel the qweston become offtopick soon ;-)))))))

1. Look into permissions of the user you set to run web service
2. Use simple <? print phpinfo(); ?> code to look at real values your php
enviroment varibles have.
3. Check
[mail function]
; For Win32 only.
SMTP = < smtp.somewhere.go >

; For Win32 only.
sendmail_from = < [EMAIL PROTECTED] >

4. Write code to send mail threw socets, then you'll see targeted server
ansver on every your request.




""juan ant. martínez"" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm new to php. I have downloaded and installed PHP 4.3.0 on a Windows
> NT 4.0 server. I have tested the configuration and changed the
> parameters in php.ini to fit my environment.
> The basic code works fine, but one of the things I'd like to do is to
> send mails. I have found the sample code and tested the following :
>
> mail("[EMAIL PROTECTED]", "test", "This is a test!","From:
> [EMAIL PROTECTED]")
>
> But when I run this code, I get the following error:
>
> Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or
> custom "From:" header missing in d:\www\mail.php on line 9
>
> In fact, the sendmail_from is configured in the php.ini file (in the
> windows directory), and also forced in the line above (I have tried also
> without the "From:..." but it does neither work) .  The smtp server is
> in a remote machine, and in fact, no connection is made from the php
> script (I have looked through the logs and there has been no attempt to
> connect)
>
> Does anyone know where is the problem? Any suggestions will be welcomed.
>
> Thanks in advance,
>
> Juanan
>


--- End Message ---
--- Begin Message ---
I am trying to configure run PHP4 on Apache on Windows XP.

When I type http://localhost/ all I get is a "File Download" dialogue box,
instead of the normal Apache server page.

Does anyone know whats is going on here?

Please tell me if you need any more information.

-Nelson




--- End Message ---
--- Begin Message ---
You need to do two things (assuming you are not using the SAPI) in your
httpd.conf;

-Defin a PHP doc
AddType application/x-httpd-php .php .phtml

-Define what you do with a PHP doc
Action application/x-httpd-php /php/php-cgi.exe

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED]]
Sent: 10 February 2003 16:49
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] I get a "File Download" dialogue box


I am trying to configure run PHP4 on Apache on Windows XP.

When I type http://localhost/ all I get is a "File Download" dialogue box,
instead of the normal Apache server page.

Does anyone know whats is going on here?

Please tell me if you need any more information.

-Nelson





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

Internet communications are not secure and therefore the Barclays Group
does not accept legal responsibility for the contents of this message.
Although the Barclays Group operates anti-virus programmes, it does not
accept responsibility for any damage whatsoever that is caused by
viruses being passed.  Any views or opinions presented are solely those
of the author and do not necessarily represent those of the Barclays
Group.  Replies to this email may be monitored by the Barclays Group
for operational or business reasons.

--- End Message ---
--- Begin Message ---
Need a bit more info to say for sure...

But check that PHP is setup properly on the web server, follow the
install instructions...

What server you running? Have you followed the config instructions
fully?

chris kranz
fatcuban.com


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED]] 
Sent: 10 February 2003 16:49
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] I get a "File Download" dialogue box

I am trying to configure run PHP4 on Apache on Windows XP.

When I type http://localhost/ all I get is a "File Download" dialogue
box,
instead of the normal Apache server page.

Does anyone know whats is going on here?

Please tell me if you need any more information.

-Nelson





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




--- End Message ---
--- Begin Message ---
Sorry...  I think I'm going blind :p

chris kranz
fatcuban.com


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED]] 
Sent: 10 February 2003 16:49
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] I get a "File Download" dialogue box

I am trying to configure run PHP4 on Apache on Windows XP.

When I type http://localhost/ all I get is a "File Download" dialogue
box,
instead of the normal Apache server page.

Does anyone know whats is going on here?

Please tell me if you need any more information.

-Nelson





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




--- End Message ---
--- Begin Message ---
Copy of message sent out last time someone had a similar problem:

Chances are you've not put the commands in the correct place, instead just
copy and pasted them into the config
file.

LoadModule php4_module C:\PHP\sapi\php4apache.dll
This has to be in the same place as all the other LoadModule commands. If
you look through your httpd.conf file for Apache, you will see a whole load
of LoadModules with #'s in front of them. You need to place the above line
at the end of that list.

If you then scroll down a bit the next section should be 'AddModule'. In
this section, you have to put the line
AddModule mod_php4.c
at the bottom of the list. Both commands are needed to properly load PHP.

Once that is done, you will need to run a search for
'# AddType allows you to tweak mime.types without actually editing it, or
to'
Below that line should be a series of AddType commands. Again, you need to
put
AddType application/x-httpd-php .php
at the end of the list.

AddType application/x-httpd-php-source .phps
is an optional feature, I personnally do not use it as I do not want people
to be able to view my source code. However it is up to you. If you do
include it, put it in the same section as the other file.

If that doesn't solve your problem, or you've done all that already, then
remember you need to restart Apache for it to take effect. Also check that
php is installed in the path you've set in httpd.conf (In this case
C:\PHP\). Also check that C:\PHP\sapi\php4apache.dll is present in the
correct folder, and that the following two files are in the SAME directory
as php4apache.dll :

php4ts.dll
php4ts.lib

Good Luck, let me know how it goes

Stephen

----- Original Message -----
From: "news" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 4:51 PM
Subject: [PHP-INST] I get a "File Download" dialogue box


> I am trying to configure run PHP4 on Apache on Windows XP.
>
> When I type http://localhost/ all I get is a "File Download" dialogue box,
> instead of the normal Apache server page.
>
> Does anyone know whats is going on here?
>
> Please tell me if you need any more information.
>
> -Nelson
>
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Oddly enough on the first build of this box 6 months or so ago, PHP
 installed perfectly onto the C: drive. I rebuilt the network, but
saved the C drive for later data retrieval and formatting, so
another drive was placed into the system and rebuilt under
the E: drive.

This installation of PHP has been a complete failure.
Win2k has been updated ONLY with all service packs from Microsoft.
So its a CLEAN OS. The server is the PDC running active directory and IIS.

My initial problems were similar to others on here, the php include files
would repeat over and over, and I would get an application error of
memory could not be read as defined in the current open issue that is still
waiting feedback for three days.

Your recommendation was to install the newer snapshot, and I did.
If I may say the installation instructions are a tad ''confusing'' but I
will define the steps I've followed upto now.

        Extracted all files to E:\PHP
        Copied php.ini-dist and renamed to php.ini
        modified extension_dir to extension_dir = e:\PHP
        Copied DLL's from the E:\PHP\DLLS to E:\WinNT\System32\
        TURNED NO EXTENTIONS ON (Want basic running first)
        modified cgi.force_redirect to cgi.force_redirect = 0


        In Internet Service Manager (ISM) made the following modifications
        to the master properties:
                Home > Configuration, added .php extension
                and utilized the e:\php\php.exe
                        Set All Verbs
                        Set Check for existence of file

                Set execute properties, as well as securities on
                the folder for the IUSR to have FULL control
                for the moment.



Current Behavior:
        PHP seems to return NO ERRORS...
        I'm not even noticing the PHP.exe in the processes.

        In the source of the outputted page, it SEEMS as if PHP is parsing out
        everything between the Tags '<??>' but not processing any of the code.
        All pages show up with HTML but no php execution
        not even a echo of 'THIS WORKS'.








Server Configuration:

        Win2k Advanced Server
        OS Installation: Second Drive installation Labeled E:\
        PHP Installation: E:\PHP
        Web server Installation: F:\


--- End Message ---

Reply via email to