php-windows Digest 22 Feb 2002 02:27:21 -0000 Issue 1012

Topics (messages 12182 through 12214):

javascript protected page?
        12182 by: Spychala, Wojciech

opener header
        12183 by: Spychala, Wojciech

fopen()
        12184 by: Olga Tonkonog
        12185 by: Svensson, B.A.T. (HKG)

Re: Running Windows full binary distribution
        12186 by: Nicole Amashta
        12189 by: Scott
        12205 by: Tom Belich
        12210 by: Christoph Grottolo

Problems connecting to MySQL from a vhost
        12187 by: Gerard Earley

Re: inserting date into oracle!!!
        12188 by: Nicole Amashta
        12199 by: John Lim

PHP Authentication
        12190 by: jmt2que001.sneakemail.com
        12191 by: Collins, Robert
        12204 by: Rasmus Lerdorf
        12211 by: Christoph Grottolo

Extensions and php and dll problem on win2k whit php 4.1.1
        12192 by: Mike Schmid
        12193 by: Scott
        12194 by: Mike Schmid
        12195 by: Hunter, Ray
        12196 by: Mike Schmid
        12197 by: Hunter, Ray
        12198 by: Mike Schmid

local drive
        12200 by: Sandeep Murphy
        12201 by: Svensson, B.A.T. (HKG)
        12202 by: Nicole Amashta
        12203 by: Olivier Hubert
        12206 by: Sandeep Murphy
        12207 by: Olivier Hubert
        12208 by: Sandeep Murphy
        12209 by: Svensson, B.A.T. (HKG)

Re: calling PHP code on a different website
        12212 by: \[ p i x e l p e t e r \]

Re: Passing and array in a query string
        12213 by: Piotr Pluciennik

Form
        12214 by: Internerds Canada

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 ---
I know this not right discussion group but if u use PHP I'm sure U use
Javascript

i want to fulfill form on internet page by javascript automaticaly i a get
the error "Access denied"
is it possible to protect html page so no one can fulfil form by
javascript??? if yes is it some way to jump over it?

thanks

Wojtek
--- End Message ---
--- Begin Message ---
Hi 

Some scripts recognize what was previos page on your browser befor u get to
this script (opener)
and if address isn't correct script may not allow to do anything

is it possible send by php header in information that we for example running
script from different location than this is realy??

Sorry for my horrible english

Thanks very much

Wojtek
--- End Message ---
--- Begin Message ---

Hello,

I have problem with function fopen() - if file not exists, fopen() don't
return false, it return
nothing.
Is it only Windows problem or help is false?
Who can help?
Olga

--- End Message ---
--- Begin Message ---
>I have problem with function fopen() - if file not exists, fopen() don't
>return false, it returnnothing.

It is impossible for a function in a typed language to return different data
types dependent on the evaluation of the function. According to the manual
pages of php's fiopen() it should return an integer value.

The php manual says about fopen:

Description

 int fopen ( string filename, string mode [, int use_include_path])


I assume php calls fopen() from the C-library (with some preparing of the
arguments). C's fopen() returns a handler (e.g. an int, a.k.a. integer) to a
file. If the file could not be open the "handler" returned will be zero (0)
- according to the ANSI C std lib spec. I assume that php's fopen() just
forwards this handler, and in case a of failure to open a file, the value
returned by fopen() will be, most likely be, zero.
--- End Message ---
--- Begin Message ---
Also make sure you web server is running.


"Tom Belich" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've installed the windows installer version of php on a NT server.  I've
> also installed the windows binary on my Windows 2000 pro workstation.
> Everything works fine on the CGI-Windows installer version on the server,
> but I can't get the same applications to run from my Win2KPro workstation
(I
> get blank pages or empty pages).  Does this have something to do the way
the
> php.ini file is set up, or is it something else?


--- End Message ---
--- Begin Message ---
> > I've installed the windows installer version of php on a NT server.  I've
> > also installed the windows binary on my Windows 2000 pro workstation.
> > Everything works fine on the CGI-Windows installer version on the server,
> > but I can't get the same applications to run from my Win2KPro workstation
> > (I get blank pages or empty pages).  Does this have something to do the way
> > the php.ini file is set up, or is it something else?

How about a little more information.  Do you get an error when you try to 
view the pages?  Did you make a page like this and try to load it:
<? echo phpinfo(); ?>
A couple of possible things to check:
1)If you are using IE turn OFF Show friendly HTTP Error Messages
2)Make sure the Apache conf file has the proper information for PHP, 
either CGI or Module.  

-Scott


--- End Message ---
--- Begin Message ---
More information:
Both installations work.  The php test file, <?php phpinfo(); ?>, works on
both the workstation running IIS and Win2K Pro and the server running WinNT.
To get up and running quickly, I used the Windows installer version on the
server (which I understand runs under CGI).  However, I also understand this
version is not secure and is not recommended for a production environment.
So, I installed the full Windows binary on my workstation to test that
version.

I learn best by testing and modifying existing programs so I downloaded two
applications from the web:  "The Perfect Job" from DevShed and AssetMan from
bctree.com.  Both applications work fine on the server running WinNT, IIS
and the Windows installer version of PHP.  However, when I copy the same
folders and try to run the applications from my workstation using
//localhost/assetman/login.php, I get a blank white page.  When I try to run
"The Perfect Job", I get an error message stating: "There was an error
accessing the page you requested."

I know I have database connectivity, because I'm running phpMyAdmin from my
workstation.

I've even tried running both .ini files supplied with the binary thinking
there might be a problem with the isapi module.  No luck.
-----Original Message-----
From: Christoph Grottolo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 2:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Running Windows full binary distribution


| I've installed the windows installer version of php on a NT server.  I've
| also installed the windows binary on my Windows 2000 pro workstation.
| Everything works fine on the CGI-Windows installer version on the server,
| but I can't get the same applications to run from my Win2KPro workstation
(I
| get blank pages or empty pages).  Does this have something to do the way
the
| php.ini file is set up, or is it something else?


1. make a test script with the following content: <?php phpinfo(); ?>

2. save it as test.php in your web root directory (where your web pages
reside).

3. Check if php works by running the script from the command line:
c:\php\php.exe c:\mywebroot\test.php.
If you get a long output which looks like HTML php works. If not, something
went wrong with your php installation. Read the corresponding chapter in the
manual.

4. Call the test script from your browser (http://myhostname/test.php)
If you get a page with info about your php installation, your webserver and
PHP work together. If not, read the chapter about configuring PHP with your
webserver software in the PHP manual.

5. The output of the test script should reflect your php.ini settings.

Christoph




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
So maybe you try to modify php.ini

- to display php error messages set display_errors = on;
- to register globals by default (if you use 4.10 or 4.11) set
register_globals=on;
register_globals has been turned off by default since 4.10 for important
security reasons but however many existing apps still rely on
register_globals=on - at least you can try.
In a production environment with IIS it's still recommended to use CGI,
however ISAPI seems to work seamlessly under certain circumstances.

Double check with your phpinfo()-script if the correct ini-file gets parsed!

Christoph

"Tom Belich" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| More information:
| Both installations work.  The php test file, <?php phpinfo(); ?>, works on
| both the workstation running IIS and Win2K Pro and the server running
WinNT.
| To get up and running quickly, I used the Windows installer version on the
| server (which I understand runs under CGI).  However, I also understand
this
| version is not secure and is not recommended for a production environment.
| So, I installed the full Windows binary on my workstation to test that
| version.
|
| I learn best by testing and modifying existing programs so I downloaded
two
| applications from the web:  "The Perfect Job" from DevShed and AssetMan
from
| bctree.com.  Both applications work fine on the server running WinNT, IIS
| and the Windows installer version of PHP.  However, when I copy the same
| folders and try to run the applications from my workstation using
| //localhost/assetman/login.php, I get a blank white page.  When I try to
run
| "The Perfect Job", I get an error message stating: "There was an error
| accessing the page you requested."
|
| I know I have database connectivity, because I'm running phpMyAdmin from
my
| workstation.
|
| I've even tried running both .ini files supplied with the binary thinking
| there might be a problem with the isapi module.  No luck.
| -----Original Message-----
| From: Christoph Grottolo [mailto:[EMAIL PROTECTED]]
| Sent: Thursday, February 21, 2002 2:38 AM
| To: [EMAIL PROTECTED]
| Subject: [PHP-WIN] Re: Running Windows full binary distribution
|
|
| | I've installed the windows installer version of php on a NT server.
I've
| | also installed the windows binary on my Windows 2000 pro workstation.
| | Everything works fine on the CGI-Windows installer version on the
server,
| | but I can't get the same applications to run from my Win2KPro
workstation
| (I
| | get blank pages or empty pages).  Does this have something to do the way
| the
| | php.ini file is set up, or is it something else?
|
|
| 1. make a test script with the following content: <?php phpinfo(); ?>
|
| 2. save it as test.php in your web root directory (where your web pages
| reside).
|
| 3. Check if php works by running the script from the command line:
| c:\php\php.exe c:\mywebroot\test.php.
| If you get a long output which looks like HTML php works. If not,
something
| went wrong with your php installation. Read the corresponding chapter in
the
| manual.
|
| 4. Call the test script from your browser (http://myhostname/test.php)
| If you get a page with info about your php installation, your webserver
and
| PHP work together. If not, read the chapter about configuring PHP with
your
| webserver software in the PHP manual.
|
| 5. The output of the test script should reflect your php.ini settings.
|
| Christoph
|
|
|
|
| --
| PHP Windows Mailing List (http://www.php.net/)
| To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
I'm developing php from a win2k box and recently added vhosts to the
httpd.conf file, as shown below

#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

NameVirtualHost *

<VirtualHost *>
    ServerAdmin webmaster@localhost
    DocumentRoot "D:/Internet/crestar/web/"
    ServerName localhost
    ErrorLog logs/crestar-error_log
    CustomLog logs/localhost-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@crestar
    DocumentRoot "D:/Internet/crestar/web/"
    ServerName crestar
    ErrorLog logs/crestar-error_log
    CustomLog logs/crestar-access_log common
</VirtualHost>


<VirtualHost *>
    ServerAdmin webmaster@dev
    DocumentRoot "D:/Internet/Dev/Web"
    ServerName dev
    ErrorLog logs/dev-error_log
    CustomLog logs/dev-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@agent
    DocumentRoot "D:/Internet/Agent/Web"
    ServerName agent
    ErrorLog logs/agent-error_log
    CustomLog logs/agent-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@new
    DocumentRoot "D:/Internet/New/Web"
    ServerName new
    ErrorLog logs/new-error_log
    CustomLog logs/new-access_log common
</VirtualHost>
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


but as soon as i add a vhost to apache I cannot connect to mysql. can anyone
help?????


--- End Message ---
--- Begin Message ---
OK, it has been a long while since I've used Oracle, but from what I
remember, the format of the date is *not* the one you are using. I believe
it should look like this: yyyy-mm-dd or mm-dd-yyyy

I may be wrong about the format, but I remember originally having trouble
with the dates when I used oracle for the first time.

Anyone have more insight?

-Nicole
www.aeontrek.com

"Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have been trying to insert the current date into ORACLE in vain...
>
> my query reads like this..
>
> java.text.SimpleDateFormat formatter = new
> java.text.SimpleDateFormat("dd/MM/yyyy");
> java.util.Date currentTime_1 = new java.util.Date();
> String dateString = formatter.format(currentTime_1);
>
> // Have to use Java.util.date....
>
> out.println( "<br>" );
> out.println( dateString ); // shows current date Fine..
>
> sql = "INSERT into
> RESERV_DOC_UPD(CODE,DOC_COD,COLAB_COD,RESERVED,DATE_RESERV)";
>
> sql +=
>
"VALUES("+temp+","+code+","+COLAB_COD+","+RESERVED+","+(to_date(dateString,
> dd/mm/yyyy))+")";
>
> Can anyone Please tell me whats wrong with this query and the remedy for
> it!!???
>
> Thnx a lot in adv,
>
> gaucho


--- End Message ---
--- Begin Message ---
INSERT into table (datecol) VALUES (TO_DATE('2002-02-30','YYYY-MM-DD'))

or

INSERT into table (datecol) VALUES (SYSDATE)

Bye, John

Nicole Amashta <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK, it has been a long while since I've used Oracle, but from what I
> remember, the format of the date is *not* the one you are using. I believe
> it should look like this: yyyy-mm-dd or mm-dd-yyyy
>
> I may be wrong about the format, but I remember originally having trouble
> with the dates when I used oracle for the first time.
>
> Anyone have more insight?
>
> -Nicole
> www.aeontrek.com
>
> "Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I have been trying to insert the current date into ORACLE in vain...
> >
> > my query reads like this..
> >
> > java.text.SimpleDateFormat formatter = new
> > java.text.SimpleDateFormat("dd/MM/yyyy");
> > java.util.Date currentTime_1 = new java.util.Date();
> > String dateString = formatter.format(currentTime_1);
> >
> > // Have to use Java.util.date....
> >
> > out.println( "<br>" );
> > out.println( dateString ); // shows current date Fine..
> >
> > sql = "INSERT into
> > RESERV_DOC_UPD(CODE,DOC_COD,COLAB_COD,RESERVED,DATE_RESERV)";
> >
> > sql +=
> >
>
"VALUES("+temp+","+code+","+COLAB_COD+","+RESERVED+","+(to_date(dateString,
> > dd/mm/yyyy))+")";
> >
> > Can anyone Please tell me whats wrong with this query and the remedy for
> > it!!???
> >
> > Thnx a lot in adv,
> >
> > gaucho
>
>


--- End Message ---
--- Begin Message ---
We just switched servers from Unix to Windows NT and all our authentication stopped 
working. It brings up an internal server error. We installed the newest PHP and the 
newest Apache software. Pretty much everything else works, except the authentication 
won't work. I've tried many different versions of the code. Here is the last version 
that I tried. Any ideas on what might be causing this
server error? 

<?php
if (!isset($PHP_AUTH_USER)){
    header( 'WWW-Authenticate: Basic realm="Private"' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;
} else {
    echo 'Success!';
}
?>


--- End Message ---
--- Begin Message ---
It took some digging on the PHP-Win Archive but I found the answer a long
time ago... First you have to be running PHP as an Apache module (not a
CGI), and there was an extra .dll to load. Sorry I'm not more specific, but
I just can't seem to remember the details. Hope this points you in the right
direction.

Robert W. Collins II
Webmaster
New Orleans Regional Transit Authority
Phone : (504) 248-3826
Email : [EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP Authentication


We just switched servers from Unix to Windows NT and all our authentication
stopped working. It brings up an internal server error. We installed the
newest PHP and the newest Apache software. Pretty much everything else
works, except the authentication won't work. I've tried many different
versions of the code. Here is the last version that I tried. Any ideas on
what might be causing this
server error? 

<?php
if (!isset($PHP_AUTH_USER)){
    header( 'WWW-Authenticate: Basic realm="Private"' );
    header( 'HTTP/1.0 401 Unauthorized' );
    echo 'Authorization Required.';
    exit;
} else {
    echo 'Success!';
}
?>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
HTTP Auth does not work with the CGI version of PHP which is what I
presume you are using on Windows.  Switch back to UNIX.

On 21 Feb 2002 [EMAIL PROTECTED] wrote:

> We just switched servers from Unix to Windows NT and all our authentication stopped 
>working. It brings up an internal server error. We installed the newest PHP and the 
>newest Apache software. Pretty much everything else works, except the authentication 
>won't work. I've tried many different versions of the code. Here is the last version 
>that I tried. Any ideas on what might be causing this
> server error?
>
> <?php
> if (!isset($PHP_AUTH_USER)){
>     header( 'WWW-Authenticate: Basic realm="Private"' );
>     header( 'HTTP/1.0 401 Unauthorized' );
>     echo 'Authorization Required.';
>     exit;
> } else {
>     echo 'Success!';
> }
> ?>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---

"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| HTTP Auth does not work with the CGI version of PHP which is what I
| presume you are using on Windows.  Switch back to UNIX.

oh, please, dear sysadmin, set up a real good unix server for me - that's
all you have to do?

rasmus - not everybody has full choice.

Christoph


--- End Message ---
--- Begin Message ---
Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
If i run info.php whitout the php.ini file in winnt it works fine but i dont
have any extensions...

The output of the command promt if i run php.exe -i is, the dynamik link
libary isqlt09a.dll could not be found in the specified path c:\blahblah,
blah....

where i can get the dlls... of somone can help me whit this problem

thanks Mike


--- End Message ---
--- Begin Message ---
I have to check, but I thought the only real support you got with the 
installer was MySQL and you had to download the CGI version to get all the 
addtional DLL's, like MS-Sql, etc.




On Thu, 21 Feb 2002, Mike Schmid wrote:

> Hi NG
> 
> Help needed, i have make a new istallation of php 4.1.1 (with the
> installer). I configured everyhing like iis php.ini. registry and permission
> on th ntfs partition. I coppy all the dll`s from php (not the extensions
> dll´s) to system32. I downloded to the win32 package with the extensions
> pack and copy the stuff to php.
> 
> The problem now is if i run info.php i got some errors like "unable to load
> dynamic link libary
> ´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
> If i run info.php whitout the php.ini file in winnt it works fine but i dont
> have any extensions...
> 
> The output of the command promt if i run php.exe -i is, the dynamik link
> libary isqlt09a.dll could not be found in the specified path c:\blahblah,
> blah....
> 
> where i can get the dlls... of somone can help me whit this problem
> 
> thanks Mike
> 
> 
> 
> 

-- 


--- End Message ---
--- Begin Message ---
Hi Scott,
 yes your are right, after i istall the php 4.1.1 whit the installer , i
download the cgi package , and configure it....like you
can read in my first post...

"Scott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have to check, but I thought the only real support you got with the
> installer was MySQL and you had to download the CGI version to get all the
> addtional DLL's, like MS-Sql, etc.
>
>
>
>
> On Thu, 21 Feb 2002, Mike Schmid wrote:
>
> > Hi NG
> >
> > Help needed, i have make a new istallation of php 4.1.1 (with the
> > installer). I configured everyhing like iis php.ini. registry and
permission
> > on th ntfs partition. I coppy all the dll`s from php (not the extensions
> > dll´s) to system32. I downloded to the win32 package with the extensions
> > pack and copy the stuff to php.
> >
> > The problem now is if i run info.php i got some errors like "unable to
load
> > dynamic link libary
> > ´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
> > If i run info.php whitout the php.ini file in winnt it works fine but i
dont
> > have any extensions...
> >
> > The output of the command promt if i run php.exe -i is, the dynamik link
> > libary isqlt09a.dll could not be found in the specified path
c:\blahblah,
> > blah....
> >
> > where i can get the dlls... of somone can help me whit this problem
> >
> > thanks Mike
> >
> >
> >
> >
>
> --
>
>


--- End Message ---
--- Begin Message ---

--- End Message ---
--- Begin Message ---
Roy sorry but it dosetn work i try it the same error output...

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I do is add all the dlls to the same directory as your php.exe file.  I
then edit the php.ini file to load the extension_dir from that directory...

Example:
extension_dir = ./

Then this allows php to look in the same directory as php.exe for the dll's.
I used the installer to set up the directory.  Then add all the extra stuff
to that directory.

This should work for you.




Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll=B


--- End Message ---
--- Begin Message ---
Did you copy over the php.ini file from the chi package.  The php.ini file
from the installer has nothing really in it...

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Mike Schmid [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 9:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Roy sorry but it dosetn work i try it the same error output...

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I do is add all the dlls to the same directory as your php.exe file.  I
then edit the php.ini file to load the extension_dir from that directory...

Example:
extension_dir = ./

Then this allows php to look in the same directory as php.exe for the dll's.
I used the installer to set up the directory.  Then add all the extra stuff
to that directory.

This should work for you.




Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll=B



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I copy the php.ini file from cgi package original php.ini-dist

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Did you copy over the php.ini file from the chi package.  The php.ini file
from the installer has nothing really in it...

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 9:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Roy sorry but it dosetn work i try it the same error output...

"Ray Hunter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I do is add all the dlls to the same directory as your php.exe file.  I
then edit the php.ini file to load the extension_dir from that directory...

Example:
extension_dir = ./

Then this allows php to look in the same directory as php.exe for the dll's.
I used the installer to set up the directory.  Then add all the extra stuff
to that directory.

This should work for you.




Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-----Original Message-----
From: Mike Schmid [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Extensions and php and dll problem on win2k whit php
4.1.1


Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like "unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll=B



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



--- End Message ---
--- Begin Message ---
hi,

I have a document (BLOB type) in a database which I hv retrieved thru an sql
query...

I need to allow the user to save this document to his local hard drive upon
clicking a button... 

any ideas as to how I can achieve this???

TIA,

sands
--- End Message ---
--- Begin Message ---
Before sending the file, send the typical HTTP header information:
Content-Disposition: attachment; filename=Fubar.txt. And the content type
info: text/plain or whatever format that is suitable.....

You can check www.w3.org for more details on exactly what you need in the
header.

Doing that should bring up an file download dialog box for the end user.

>-----Original Message-----
>From: Sandeep Murphy [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 21, 2002 6:22 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] local drive
>
>
>hi,
>
>I have a document (BLOB type) in a database which I hv 
>retrieved thru an sql
>query...
>
>I need to allow the user to save this document to his local 
>hard drive upon
>clicking a button... 
>
>any ideas as to how I can achieve this???
>
>TIA,
>
>sands
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
hrm,

let the user click a "save" button and then:


if ( $save ) {

 ## generate a file from the blob contents and save with a temp name
 ## then, go to the location of the file so it will start the download:
http://yourdomain.com/thefilename.doc
## the user can then name the file as they want or keep the temp name
## and save it to their local drive.

}

"Sandeep Murphy" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> I have a document (BLOB type) in a database which I hv retrieved thru an
sql
> query...
>
> I need to allow the user to save this document to his local hard drive
upon
> clicking a button...
>
> any ideas as to how I can achieve this???
>
> TIA,
>
> sands




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

         Do you know the mime type of the document? If so, you could simply 
send the file through HTTP e.g. when the user presses the button, instead 
of accessing a web he/she accesses a script that will send the information 
contained in the database field. If you like I could send you sample code 
to do this.

HTH

Olivier

At 17:21 2002-02-21 +0000, Sandeep Murphy wrote:
>hi,
>
>I have a document (BLOB type) in a database which I hv retrieved thru an sql
>query...
>
>I need to allow the user to save this document to his local hard drive upon
>clicking a button...
>
>any ideas as to how I can achieve this???
>
>TIA,
>
>sands

--- End Message ---
--- Begin Message ---

please, wud be grateful..:)

sands
-----Original Message-----
From: Olivier Hubert [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 21 de Fevereiro de 2002 17:39
To: Sandeep Murphy; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] local drive


Hi,

         Do you know the mime type of the document? If so, you could simply 
send the file through HTTP e.g. when the user presses the button, instead 
of accessing a web he/she accesses a script that will send the information 
contained in the database field. If you like I could send you sample code 
to do this.

HTH

Olivier

At 17:21 2002-02-21 +0000, Sandeep Murphy wrote:
>hi,
>
>I have a document (BLOB type) in a database which I hv retrieved thru an
sql
>query...
>
>I need to allow the user to save this document to his local hard drive upon
>clicking a button...
>
>any ideas as to how I can achieve this???
>
>TIA,
>
>sands
--- End Message ---
--- Begin Message ---
Ok,

         I'll assume the file that you want to send is an image and that 
the image is in a variable named $Image. As Svensson mentionned, you need 
to send out the headers first:

header ("Content-Disposition: attachment; filename=Fubar.txt");
header ("Content-Type: image/jpeg");

if you have the size of the image/file, you can always send it with the 
Content-Length header (e.g. header ("Content-Length: 12345");)

After sending the headers you simply send the data with an echo:

echo $Image;

and you're done. Let's say you put all this code in a file called 
LoadImage.php; when the user calls the script (through a form or link) the 
file is sent automatically.

HTH

Olivier

At 18:12 2002-02-21 +0000, Sandeep Murphy wrote:

>please, wud be grateful..:)
>
>sands
>-----Original Message-----
>From: Olivier Hubert [mailto:[EMAIL PROTECTED]]
>Sent: quinta-feira, 21 de Fevereiro de 2002 17:39
>To: Sandeep Murphy; [EMAIL PROTECTED]
>Subject: Re: [PHP-WIN] local drive
>
>
>Hi,
>
>          Do you know the mime type of the document? If so, you could simply
>send the file through HTTP e.g. when the user presses the button, instead
>of accessing a web he/she accesses a script that will send the information
>contained in the database field. If you like I could send you sample code
>to do this.
>
>HTH
>
>Olivier
>
>At 17:21 2002-02-21 +0000, Sandeep Murphy wrote:
> >hi,
> >
> >I have a document (BLOB type) in a database which I hv retrieved thru an
>sql
> >query...
> >
> >I need to allow the user to save this document to his local hard drive upon
> >clicking a button...
> >
> >any ideas as to how I can achieve this???
> >
> >TIA,
> >
> >sands

Olivier Hubert
Chef d'équipe informatique/IT Team leader
Groupe Constructo
(514) 856-6646
[EMAIL PROTECTED]
<http://www.constructo.ca/>www.constructo.ca
--- End Message ---
--- Begin Message ---
hi..
 
thnx a bunch... yet to try it out ..but hv 1 more question... the content
type is gonna vary...PDF/image/excel file etc..
 
I can send the the content type dyanmically right?? as i hv a field in my db
with content types..
 
thnx...
 
sands

-----Original Message-----
From: Olivier Hubert [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 21 de Fevereiro de 2002 18:48
To: Sandeep Murphy; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] local drive


Ok,

        I'll assume the file that you want to send is an image and that the
image is in a variable named $Image. As Svensson mentionned, you need to
send out the headers first:

header ("Content-Disposition: attachment; filename=Fubar.txt");
header ("Content-Type: image/jpeg");

if you have the size of the image/file, you can always send it with the
Content-Length header (e.g. header ("Content-Length: 12345");)

After sending the headers you simply send the data with an echo:

echo $Image;

and you're done. Let's say you put all this code in a file called
LoadImage.php; when the user calls the script (through a form or link) the
file is sent automatically.

HTH

Olivier

At 18:12 2002-02-21 +0000, Sandeep Murphy wrote:



please, wud be grateful..:)

sands
-----Original Message-----
From: Olivier Hubert [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
]
Sent: quinta-feira, 21 de Fevereiro de 2002 17:39
To: Sandeep Murphy; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] local drive


Hi,

         Do you know the mime type of the document? If so, you could simply 
send the file through HTTP e.g. when the user presses the button, instead 
of accessing a web he/she accesses a script that will send the information 
contained in the database field. If you like I could send you sample code 
to do this.

HTH

Olivier

At 17:21 2002-02-21 +0000, Sandeep Murphy wrote:
>hi,
>
>I have a document (BLOB type) in a database which I hv retrieved thru an
sql
>query...
>
>I need to allow the user to save this document to his local hard drive upon
>clicking a button...
>
>any ideas as to how I can achieve this???
>
>TIA,
>
>sands 

Olivier Hubert
Chef d'équipe informatique/IT Team leader
Groupe Constructo
(514) 856-6646
[EMAIL PROTECTED]
www.constructo.ca <http://www.constructo.ca/>  

--- End Message ---
--- Begin Message ---
As I said check out www.w3.org, and the HTTP documentation for this. I think
you can send content-type unknown, or binary or something. But I wont look
it up for you. ;) There should though be a generic format so send binary
data with.

And of course if you uses a script, nothing prevent you from varying the
content type to fit/match the type of file you intend to send to the client
side.

        /Anders

>-----Original Message-----
>From: Sandeep Murphy [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 21, 2002 8:15 PM
>To: 'Olivier Hubert'; Sandeep Murphy; [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] local drive
>
>
>hi..
> 
>thnx a bunch... yet to try it out ..but hv 1 more question... 
>the contenttype is gonna vary...PDF/image/excel file etc..
> 
>I can send the the content type dyanmically right?? as i hv a 
>field in my db with content types..
> 
>thnx...
> 
>sands
>
>-----Original Message-----
>From: Olivier Hubert [mailto:[EMAIL PROTECTED]]
>Sent: quinta-feira, 21 de Fevereiro de 2002 18:48
>To: Sandeep Murphy; [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] local drive
>
>
>Ok,
>
>        I'll assume the file that you want to send is an image 
>and that the
>image is in a variable named $Image. As Svensson mentionned, 
>you need to
>send out the headers first:
>
>header ("Content-Disposition: attachment; filename=Fubar.txt");
>header ("Content-Type: image/jpeg");
>
>if you have the size of the image/file, you can always send it with the
>Content-Length header (e.g. header ("Content-Length: 12345");)
>
>After sending the headers you simply send the data with an echo:
>
>echo $Image;
>
>and you're done. Let's say you put all this code in a file called
>LoadImage.php; when the user calls the script (through a form 
>or link) the
>file is sent automatically.
>
>HTH
>
>Olivier
>
>At 18:12 2002-02-21 +0000, Sandeep Murphy wrote:
>
>
>
>please, wud be grateful..:)
>
>sands
>-----Original Message-----
>From: Olivier Hubert [ mailto:[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>
]
Sent: quinta-feira, 21 de Fevereiro de 2002 17:39
To: Sandeep Murphy; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] local drive


Hi,

         Do you know the mime type of the document? If so, you could simply 
send the file through HTTP e.g. when the user presses the button, instead 
of accessing a web he/she accesses a script that will send the information 
contained in the database field. If you like I could send you sample code 
to do this.

HTH

Olivier

At 17:21 2002-02-21 +0000, Sandeep Murphy wrote:
>hi,
>
>I have a document (BLOB type) in a database which I hv retrieved thru an
sql
>query...
>
>I need to allow the user to save this document to his local hard drive upon
>clicking a button...
>
>any ideas as to how I can achieve this???
>
>TIA,
>
>sands 

Olivier Hubert
Chef d'équipe informatique/IT Team leader
Groupe Constructo
(514) 856-6646
[EMAIL PROTECTED]
www.constructo.ca <http://www.constructo.ca/>  

--- End Message ---
--- Begin Message ---
If you want to use XML try WDDX.
There are allready parsers available for ColdFusion, ASP, JavaScript and
php.
Very useful if you want to preserve data structures.

"Alek Andreev" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000401c1ba2f$6c8e9f40$f568fea9@juno">news:000401c1ba2f$6c8e9f40$f568fea9@juno...
> You may want to do some XML export and import. That will give you a
> widely compatible data exchange method.
>
> Later, you can use that XML feed to provide syndication contents, etc.
> (Think about the future!)
>
> -----Original Message-----
> From: Ridai Govinda Pombo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 19, 2002 6:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: calling PHP code on a different website
>
> The most simple way is by QueryString :-)
>
> Ridai
>
> Steen Rabol wrote:
>
> > Hi
> >
> > Plot: how can I share data/info from a PHP based site on a ASP based
> site ?
> >
> > Site A, running PHP
> > Site B , running ASP
> >
> > Now on site B I would like to publish some information from site A's
> > database, is that possible ?
> >
> > Thanks i advance
> >
> > Steen
> >
> >
> >
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>


--- End Message ---
--- Begin Message ---
Try tu use

$joinedstring = join(separator, $yourarray) to "pack" array into string and
then
$yourarray = split(separator, $joinedstring) to "unpack" array from string.

HTH

Piotr

quincy wrote:

> I want to find out if it is possible to pass an entire array via a query
> string using php?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--- End Message ---
--- Begin Message ---
I need to make this script send a file with it, can anyone help? thanks.
dont worry about the bottom part, i havent finished it

<?PHP

function convertGMT()

$t = time();
$gmtOffset = 2;
$h = $gmtOffset * 3600;
$t = $t - $h;
$time_signed = date("F d, Y h:i a", $t);
return $time_signed;
}

if (!isset($submit)){
echo "<font face=\"Verdana\" size=\"2\"><strong>Submit
Script</strong></font><p>";
echo "<form action=\"$PHP_SELF\" method=\"post\">";
echo "<p><table cellpadding=\"4\"><tr><td>";
echo "<font face=\"Verdana\" size=\"2\">Name:</td><td> <input type=\"text\"
name=\"name\" size=\"25\" maxlength=\"50\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Email:</td><td> <input
type=\"text\" name=\"email\" size=\"25\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Language:</td><td> <input
type=\"text\" name=\"language\" size=\"25\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Subject:</td><td> <input
type=\"text\" name=\"subject\" size=\"25\"></td></tr>";
echo "<tr><td valign=\"top\"><font face=\"Verdana\"
size=\"2\">Comments:</td><td> <textarea name=\"comments\" rows=\"12\"
cols=\"40\"></textarea></td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\"
name=\"submit\" value=\" Send Script \"></td></tr><tr><td><font size=\"1\"
color=\"red\">IP: $REMOTE_ADDR</font></td></tr></table>";

echo "</form>";
}else{
file://take out bad words
$name = eregi_replace("(fuck|shit|bitch|dick|pussy|suck|mama|mofo|ass)",
"####", $name);
$suggestion =
eregi_replace("(fuck|shit|bitch|dick|pussy|suck|mama|mofo|ass)", "####",
$suggestion);
$email = eregi_replace("(fuck|shit|bitch|dick|pussy|suck|mama|mofo|ass)",
"####", $email);
file://thank user
$cleanname=HTMLSpecialChars($name);
$clean_suggestion=HTMLSpecialChars($suggestion);
$clean_email=HTMLSpecialChars($email);

if (!preg_match("/^[\.A-Za-z0-9_-]+@[\.A-Za-z0-9_-]+\.[A-Za-z]{2,6}$/",
$email)) {
 echo "<font face=\"Verdana\" size=\"2\">Email was invalid.  Please resend
your suggestion.<br>";
 echo "<font face=\"Verdana\" size=\"2\"><strong>Suggestion
Form</strong></font><p>";
echo "<form action=\"$PHP_SELF\" method=\"post\">";
echo "<p><table cellpadding=\"4\"><tr><td>";
echo "<font face=\"Verdana\" size=\"2\">Name:</td><td> <input type=\"text\"
name=\"name\" size=\"25\" maxlength=\"50\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Email:</td><td> <input
type=\"text\" name=\"email\" size=\"25\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Language:</td><td> <input
type=\"text\" name=\"language\" size=\"25\"></td></tr>";
echo "<tr><td><font face=\"Verdana\" size=\"2\">Subject:</td><td> <input
type=\"text\" name=\"subject\" size=\"25\"></td></tr>";
echo "<tr><td valign=\"top\"><font face=\"Verdana\"
size=\"2\">Comments:</td><td> <textarea name=\"comments\" rows=\"12\"
cols=\"40\"></textarea></td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\"
name=\"submit\" value=\" Send Script \"></td></tr><tr><td><font size=\"1\"
color=\"red\">IP: $REMOTE_ADDR</font></td></tr></table>";
echo "</form>";
}
else {

echo "<div align=\"center\">";
echo "Thank you $cleanname for your suggestion. <br><br>";
echo "</div><div align=\"left\">";
echo "<b><font face=\"Verdana\" size=\"2\"> Name: </b><i> $cleanname
</i><br>";
echo "<b><font face=\"Verdana\" size=\"2\"> E-Mail: </b><i> $clean_email
</i><br>";
echo "<b><font face=\"Verdana\" size=\"2\"> Suggestion: </b><br>";
echo "<font face=\"Verdana\" size=\"2\"><i> $clean_suggestion </i>";
echo "</div>";
file://email suggestion

file://$unique_id=Substr(md5(uniqid(time())),1,7);
$unique_id=time();
file://$time_signed=date("l dS of F Y @h:i:s A");
$time_signed=convertGMT();
$email_body="The following suggestion was submitted by ";
$email_body=$email_body . "$cleanname\n\n";
$email_body=$email_body . "$clean_suggestion\n\n";
$email_body=$email_body . "Time: $time_signed\n\n";
$email_body=$email_body . "IP: $REMOTE_ADDR\n\n";
mail("[EMAIL PROTECTED]","Suggestion
($unique_id)",$email_body,"From: $email");
}
}

?>


--- End Message ---

Reply via email to