php-windows Digest 28 Sep 2001 13:23:46 -0000 Issue 778

Topics (messages 9585 through 9596):

Re: Problems setting up a DSN
        9585 by: Mike

Re: current page
        9586 by: Mike

Re: PHP-> JavaScript
        9587 by: Mike

Re: php4 and interbase
        9588 by: Mike

Re: Using COM
        9589 by: David Broker

Re: Lines of txt
        9590 by: Chen Wei, Lian

problem with uploading
        9591 by: Oliver Robillo
        9593 by: Martin Lindhe

Questions about versions of PHP and Apache
        9592 by: Kenneth Lee
        9594 by: Martin Lindhe

inifiles & php
        9595 by: php ci

IIS & PHP Session
        9596 by: Ertan Tike

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 ---
Daniel,

If you are accessing an Access 2k database, I would use OLEDB rather than
ODBC. With this you would not require a DSN, and the speed is greater.

ex.

$conn = new COM("ADODB.Connection");
$connString = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=F:\someMDB.MDB;User     Id=Foo;Password=Bar';
$conn->Open($connString);
$rs = $conn->Execute("SomeSQL");
$conn->Close();




"Daniel Parsons" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm running PHP 4.0 on WinNT 4 with IIS and attempting to use an Access
> 2000 database. When I use this is a script:
>
>   $logdb = odbc_connect("uptime", "user", "password");
>
> it gives the following error :
>
>   Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name
>   not found and no default driver specified, SQL state IM002 in
>   SQLConnect in D:\Inetpub\wwwroot\daniel\showuptime.php on line 20
>
> I have set up a System DSN with the name 'uptime' in the ODBC
> connections on the server and just can't figure out why it isn't finding
> it. I haven't rebooted the server since adding the DSN but it is running
> some other stuff that means rebooting is really a last resort thing.
>
> Can anyone enlighten me to the really small obvious thing that I have
> probably overlooked?
>
> Cheers,
> Daniel
>


--- End Message ---
--- Begin Message ---
The easiest way to find out these kind of constant variables is to create
this page and view it:

<?php
phpinfo();
?>



"John Asendorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I believe you can call:
>
> $thisepage = $PHP_SELF;
>
> you'll need to look it up though
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Stanley Cheung [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 27, 2001 10:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] current page
> >
> >
> > Hi all,
> >
> > anyone can tell me the parameter for name of current page?
> > e.g:
> > www.abc.com/hello.php
> >
> > how can retrieve the value (hello.php)?
> >
> > pls advise. thx!
> >
> > Stanley
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >


--- End Message ---
--- Begin Message ---
I'm not sure which way you are trying to go, but here is a function I use
all the time:

<?php
function jAlert($foo){
?>
<script language="JavaScript" type="text/javascript">
<!--
alert('<?= $foo ?> ');
//-->
</script>
<?
}
/*Some Code or html.........................
.............................................
*/
jAlert("wow");
?>



"Sichta Daniel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi !!
>
> Is there any way to parse variable from JavaScript to PHP ? Something
like:
> function xxx (id) {
> <? $id = ?> id;
> }
>
> DAN
>


--- End Message ---
--- Begin Message ---
Yes, but do you have the php_interbase.dll in your extensions directory.

And I assume you have a line similar to this in your INI:

extension_dir = "f:\apache\php\extensions"


"SebastiáN" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> yes, interbase server is runing on my machine ... and the required dll's
> (dg32 or something) are present too ...
>
>
>
> "Chen Wei" <[EMAIL PROTECTED]> escribió en el mensaje
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi Sebastián,
> >
> > Do you have the Interbase drivers installed in the computer? I had that
> > problem before because I don't have the database drivers installed so
the
> > DLL can't be loaded.
> >
> >
> > --
> > regards,
> > chen wei (http://www.cw213.net)
> > ===================================
> > Solutions Developer of Earth9.com
> > ===================================
> >
> >
> > Wednesday, September 26, 2001, 5:02:56 AM, you wrote:
> >
> > S> When I edit php.ini file and try to use the Interbase extension,
> everytime I
> > S> try to open a php on my Browser it display the following warning
> >
> > S> "Unable to load dynamic library
'c:\php\extensions/php_interbase.dll' -
> in
> > S> Unknown on line 0"
> >
> >
> > S> Help me please !!!!
> >
>
>


--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
(Crawley) wrote:
>"David" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> $adsi = new COM(server.object)
>
>All you need is ...
>
>$adsi = new COM( "comobjectname" );
>$adsi->objectmethod();
>
>try that, the only problem you might have is passing variables by
>reference... to do that you can ONLY ( at present ) pass by refrence
>variables of type VARIANT *.  So check your interface.
>
>You also might have trouble passing arrays - but when 4.0.7 comes out that
>should be fixed.
>
>Rich
>
>

Thanks Rich,
However to access this IIS thing you need to do something like this:

$iis = COM("IIS://localhost/w3scv");

Which is apparently only supported in 4.0.7.

Thanks,
David
--- End Message ---
--- Begin Message ---
Hi Devon,

This is the way I do... but not using fopen:

if (is_file($file)) {
        $fileArray = file($file);
        foreach($fileArray as $line) {
                // just do whatever u want to the line...
                echo("$line");
        }
}


hope it helps~  :)

-- 
regards,
chen wei (http://www.cw213.net)
===================================
Solutions Developer of Earth9.com
===================================


Friday, September 28, 2001, 8:46:26 AM, you wrote:

D> Below is my source that sipply opens a file

D> <?php
D> $fp = fopen ("http://localhost/Install.txt";, "r");
D> if ($fp)
D> { print"The file exists!"; }
D> else
D> { print"The file does not exist"; }
?>>

D> I Need to be able to a. print the file out b. The file must be printed out
D> line by line c. Write each seperate line to a mysql data base in different
D> tables.

D> Any help would be awsome
D> Cheers

--- End Message ---
--- Begin Message ---
Hello!
 
I have a problem when trying to use ftp_put(). In the function I specified,
of course, the ftp stream, the destination file, the source file and the
mode. I get an error saying "Warning: error opening C:\...\file_name.jpg in
...".  Does anyone know where the problem could be?
 
Oliver.
 
--- End Message ---
--- Begin Message ---
> Hello!
>  
> I have a problem when trying to use ftp_put(). In the 
> function I specified,
> of course, the ftp stream, the destination file, the source 
> file and the
> mode. I get an error saying "Warning: error opening 
> C:\...\file_name.jpg in
> ...".  Does anyone know where the problem could be?
>  
> Oliver.
>  

Could you supply us with a little code snippet? "C:\...\file_name.jpg" is
not a valid path..

/Martin
--- End Message ---
--- Begin Message ---
Does anyone know the minimum version of Apache that PHP-4.0.5 can work with?
I have a 1.3.7, but it crashes quite often, and it seems it's the PHP module causes it 
so.
Any idea?

Kenneth


--- End Message ---
--- Begin Message ---
> Does anyone know the minimum version of Apache that PHP-4.0.5 
> can work with?
> I have a 1.3.7, but it crashes quite often, and it seems it's 
> the PHP module causes it so.
> Any idea?
> 
> Kenneth
> 

Are you having problems with running 1.3.20? This is what i use under
windows and it's
working very well.

/Martin
--- End Message ---
--- Begin Message ---
hi
I want to learn how to read and write ini files using
php scripts;.
Thz for your help.
Phpci.

__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
--- End Message ---
--- Begin Message ---
Hi,

I have installed php on IIS as ISAPI module (with zend optimizer) .. but
session stuffs. doesnt work.. giving this error message..
i have created /tmp folder in site and gived read , write etc.. rights but
doesnt fix the problem..
do you have any idea ?
thanx a lot..

Windows2000 / IIS 5 
Php 4.0.6 

Warning: open(/tmp\sess_99b4cf60616b1546a21acc6e0d9085d1, O_RDWR) failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0

Ertan

This is session info
session
Session Support enabled 

Directive       Local Value     Master Value    
session.auto_start      On      On      
session.cache_expire    180     180     
session.cache_limiter   nocache nocache 
session.cookie_domain   no value        no value        
session.cookie_lifetime         0       0       
session.cookie_path     /       /       
session.cookie_secure   Off     Off     
session.entropy_file    no value        no value        
session.entropy_length  0       0       
session.gc_maxlifetime  1440    1440    
session.gc_probability  1       1       
session.name    PHPSESSID       PHPSESSID       
session.referer_check   no value        no value        
session.save_handler    files   files   
session.save_path       /tmp    /tmp    
session.serialize_handler       php     php     
session.use_cookies     on      on      

--- End Message ---

Reply via email to