php-windows Digest 28 Feb 2003 01:16:27 -0000 Issue 1609

Topics (messages 18729 through 18747):

connecting to oracle on a win system
        18729 by: Arthur Radulescu

Re: newbie: installing php_gd
        18730 by: Uttam

encryption/decryption with RSA 1024 keys
        18731 by: Arthur Radulescu
        18733 by: Svensson, B.A.T. (HKG)

Re: Duplicate entry removal
        18732 by: Michael Power

Re: Send mail
        18734 by: Alejandro Trujillo J.

Having problems connection PHP to MSSQL2000
        18735 by: A. Mikkelsen
        18736 by: Michael Power

erealloc() bug?
        18737 by: Jan Reilink

Problem with extensions w2k/IIS PHP4.3.0
        18738 by: Joshua Groboski
        18739 by: Charles P. Killmer

newbie: Dynamic forms
        18740 by: Edward David
        18741 by: Edward David
        18742 by: Edward David

newbie: hidding form data
        18743 by: Edward David
        18745 by: Rich Gray

destroying COM objects
        18744 by: Sterling Anderson

different question
        18746 by: freeman

Re: file write issues...
        18747 by: Chris Kranz

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!

Can anyone tell me what should I do to connect to an oracle database on a
windows system (both PHP and Oracle are found on the same system).
Right now I am connecting trough ODBC and it works fine but I canot use some
of the native php functions for working with oracle.


Thankx,
Arthur


--- End Message ---
--- Begin Message ---
someone in this list earlier suggested that the '~' character has mysterious
behavious in php.ini, i.e. rest of file after any '~' character is ignored.
I see this character in your php.ini, just see if removing this helps.

another idea coming to me is to rename the 'extensions' directory to <8
character (DOS compliant) name like 'exten' & see if it works?

regds,
-----Original Message-----
From: Anthony Ritter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 23:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] newbie: installing php_gd


Rich,
On MS Win 98 / Apache / PHP 4

If somebody out there using Win can check my php.ini file and advise me
what
I'm doing wrong.

I have uncommented:
..............
extension=php_gd.dll
..................
and have included:
..................
extension_dir = C:\php4\extensions
....................
I run the php script:

<?
header("Content-type:image/png");
$image=imagecreate(200,200);
imagepng($image);
?>
....................

I receive:

X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3

Thank you.
TR
...........................................

// this is in my php.ini file:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path =                   ; UNIX: "/path1:/path2"  Windows:
"\path1;\path2"
doc_root  =     ; the root of the php pages, used only if nonempty
user_dir  =     ; the directory under which php opens the script using
/~username, used only if nonempty
;upload_tmp_dir =                 ; temporary directory for HTTP
uploaded
files (will use system default if not specified)
upload_max_filesize = 2097152       ; 2 Meg default limit on file
uploads
extension_dir = C:\php4\extensions    ; directory in which the loadable
extensions (modules) reside


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so
; Note that it should be the name of the module only, no directory
information
; needs to go here.  Specify the location of the extension with the
extension_dir directive above.


;Windows Extensions
;extension=php_mysql.dll
;extension=php_nsmail.dll
;extension=php_calendar.dll
;extension=php_dbase.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_dbm.dll
;extension=php_mssql.dll
;extension=php_zlib.dll
;extension=php_filepro.dll
;extension=php_imap4r2.dll
;extension=php_ldap.dll
;extension=php_crypt.dll
;extension=php_msql2.dll
;extension=php_odbc.dll
....................................

//this is the php script:

<?
header("Content-type:image/png");
$image=imagecreate(200,200);
imagepng($image);
?>
...............................

//this is what I get:

X-Powered-By: PHP/4.0.0 Content-type:image/png
Fatal error: Call to undefined function: imagecreate() in c:\program
files\apache group\apache\htdocs\image.php on line 3







--- End Message ---
--- Begin Message ---
Hello!

I need some help in using the encryption/decryption algorithm with RSA 1024
keys
I have some strings that I need to encrypt with the a public key that I
already have and also be able to decrypt them in the asme manner.

 Can any one help me on this matter? Please point me to any documentations
or
solutions that might exist!


 Thankx,
Arthur


--- End Message ---
--- Begin Message ---
> Hello!
> 
> I need some help in using the encryption/decryption algorithm with RSA 1024
> keys
> I have some strings that I need to encrypt with the a public key that I
> already have and also be able to decrypt them in the asme manner.
> 
>  Can any one help me on this matter? Please point me to any documentations
> or solutions that might exist!

If you can be a bit more specific without the application, you
might get some more useful reading references than Fermat's
Little Theorem and the Chines Reminder Theorem.

Otherwise the general algorithm for RSA encryption/decryption is
public knowledge, and could be found in any decent book on descret
math.

--- End Message ---
--- Begin Message ---
Depends if you want records with the same YYYY-MM-DD (my example) or YYYY
(your example).

After re-reading the original post it appears he only wants results as per
your query, oops :)

Cheers
Mike

> -----Original Message-----
> From: Uttam [mailto:[EMAIL PROTECTED]
>
> isn't it better to just:
>
> SELECT DISTINCT YEAR(<date>) FROM <table>;
>
>
>
> regds,
>
> -----Original Message-----
> From: Michael Power [mailto:[EMAIL PROTECTED]
>
> Better yet define the required dataset with SQL to speed the
> whole process
> up:
>
> "SELECT YEAR(your_date) FROM table_name GROUP BY your_date";
>
> Cheers
> Mike
>
> > "Matt Hillebrand"
> > array_unique()
> >
> > |-----Original Message-----
> > |From: Per Christian [mailto:[EMAIL PROTECTED]
> > |
> > |Hi
> > |
> > |I'm building a PHP project for fun, and are going to get
> some dates
> > |from my database (mysql). The problem is that I only want
> the year,
> > |but the date is in the format YYYY-MM-DD so I get the whole column
> > |and remove the -MM-DD part, but now I have a lot of the
> same year Is
> > |there a function or some code that removes duplicate
> entries from a
> > |array?
> > |
> > |Best Regards,
> > |Per Christian
>
>
>
>



--- End Message ---
--- Begin Message --- could be a small think.... but are you checked the php.ini config??

the code looks good, meabe is the mail server config in the php.ini


-- Alejandro Trujillo J. Cube Systems LTDA. web : csltda.com

Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--- End Message ---
--- Begin Message ---
Hi.

I'm just installed the last PHP version on a WIN2k server with MSSQL2000.
And i tried to connect to MSSQL with the following code:

    <?
    $dbhost = "localhost";
    $username = "sa";
    $password = "";
    $dbName = "license";
    MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO
RESPOND.");     mssql_select_db($dbName) or DIE("Table unavailable");
    ?>

But I keep getting the same error.

    Fatal error: Call to undefined function: mssql_connect() in
D:\Licens\php\main.php on line 6

Can anybody help me ????

//Anders



--- End Message ---
--- Begin Message ---
Did you enable the appropriate extension?

If so have to given the IUSR_XXX (PHP) user permission to access/execute?

Do phpinfo() to see if MSSQL is enabled...

Cheers
Mike

--
Michael Power
Software Developer
Concentrix Limited
_______________________________________

Helping you strengthen your customer relationships

To find out more about how we can help you visit our website
http://www.concentrix.co.uk

The Technology Centre, Epinal Way,
Loughborough, Leicestershire, LE11 3GE
T: +44 (0)1509 235000 F: +44 (0)1509 221740
_______________________________________

> "A. Mikkelsen"
>
> Hi.
>
> I'm just installed the last PHP version on a WIN2k server with MSSQL2000.
> And i tried to connect to MSSQL with the following code:
>
>     <?
>     $dbhost = "localhost";
>     $username = "sa";
>     $password = "";
>     $dbName = "license";
>     MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED
TO
> RESPOND.");     mssql_select_db($dbName) or DIE("Table unavailable");
>     ?>
>
> But I keep getting the same error.
>
>     Fatal error: Call to undefined function: mssql_connect() in
> D:\Licens\php\main.php on line 6
>
> Can anybody help me ????
>
> //Anders
>
>



--- End Message ---
--- Begin Message --- Hello group,

After spending over 2 hours of searching on Google and finding only "old" bugs (like http://bugs.php.net/bug.php?id=10238), I try my luck here :)
Please bear with me, this is my first posting here and I don't really know which information you require to answer my question(s).


One of my customers (we are a Win2k, IIS 5 hosting company) gets the following error on one of his YaPP <http://yapp.phpworld.net/index.php> pages:

        "CGI Error
        The specified CGI application misbehaved by not returning
        a complete set of HTTP headers. The headers it did return are:
        FATAL:  erealloc():  Unable to allocate 63 bytes"

The number of bytes is quite random. The problem started suddenly yesterday evening, the same page has always worked properly. You can view the page or error here:
http://www.sohbetyeri.com/index.php?board=38;action=display;threadid=570, if you get the error in stead of an timeout.


Server information:
Windows 2000, 5.00.2195, SP3
IIS 5
PHP 4.3.1
2.096.624 KB RAM
PIII 1,2 GHz processor
Plenty of SWAP and RAM available (the server normaly uses +/- 900 MB of its 2 GB RAM).


His domain is "isolated" on the server, which means the site gets its own parsers 'n stuff.

I've read (among alot of other things):
<http://www.php.net/manual/en/zend.layout.memory-management.php>, but I don't think this is relevant information at this moment.
<http://www.phpbuilder.com/mail/php-developer-list/2001041/0714.php> was quite interesting, but in this case it was caused by a file upload.
<http://www.phpbuilder.com/mail/php-general/2001062/1433.php> is about an Apache crash.


The script (only) tries to get data from the mySQL server.

If you need more information, just ask :)

Thanks in advance for any help/pointers

--
Met vriendelijke groet / Best regards,
Jan Reilink


--- End Message ---
--- Begin Message ---
I seem to be unable to track down my problem.  In my php.ini I have set
extension_dir = c:\php\extensions

I confirmed that the dll files are there and adequately permissioned
(everyone
has full control).

When I enable extension=php_mssql.dll my webserver hangs.

What am I missing.

Thanks in advance,
Joshua Groboski




--- End Message ---
--- Begin Message ---
Make sure ntwdblib.dll is in the windows directory.

Charles Killmer

-----Original Message-----
From: Joshua Groboski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 10:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Problem with extensions w2k/IIS PHP4.3.0

I seem to be unable to track down my problem.  In my php.ini I have set
extension_dir = c:\php\extensions

I confirmed that the dll files are there and adequately permissioned
(everyone
has full control).

When I enable extension=php_mssql.dll my webserver hangs.

What am I missing.

Thanks in advance,
Joshua Groboski




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


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

I am trying to create a form that has checkboxes displayed.
If the box is checked then show below the checkbox input items related to
the parent checkbox.
If the user has not entered his name then do not display the submit button.
Can this be done using PHP 4.3.1 under Windows and IIS.

Pls. help. Thanks.




--- End Message ---
--- Begin Message ---
"Edward David" <[EMAIL PROTECTED]> wrote in message news:...
> Hi,
>
> I am trying to create a form that has checkboxes displayed.
> If the box is checked then show below the checkbox input items related to
> the parent checkbox.
> If the user has not entered his name then do not display the submit
button.
> Can this be done using PHP 4.3.1 under Windows and IIS.
>
> Pls. help. Thanks.
>
>
>



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

I am trying to create a form that has checkboxes displayed.
If the box is checked then show below the checkbox input items related to
the parent checkbox.
If the user has not entered his name then do not display the submit button.
Can this be done using PHP 4.3.1 under Windows and IIS.

Pls. help. Thanks.
Edward David



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

I am trying to create a form that has checkboxes displayed.
If the box is checked then show below the checkbox input items related to
the parent checkbox.
If the user has not entered his name then do not display the submit button.
Can this be done using PHP 4.3.1 under Windows and IIS.

Pls. help. Thanks.



--- End Message ---
--- Begin Message ---
Edward
This is client-side stuff - i.e. JavaScript... PHP is server side.
Rich

> -----Original Message-----
> From: Edward David [mailto:[EMAIL PROTECTED]
> Sent: 26 February 2003 11:52
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] newbie: hidding form data
> 
> 
> Hi,
> 
> I am trying to create a form that has checkboxes displayed.
> If the box is checked then show below the checkbox input items related to
> the parent checkbox.
> If the user has not entered his name then do not display the 
> submit button.
> Can this be done using PHP 4.3.1 under Windows and IIS.
> 
> Pls. help. Thanks.


--- End Message ---
--- Begin Message ---
I've been using the COM functionality in PHP but I cannot set a way to
destroy the objects. If I were using ASP I'd just set OBJECT = nothing.
Is there some sort of equivalent in PHP?


--- End Message ---
--- Begin Message ---
anybody in here now of a good java list for java programs.
Thanks in addition.

--- End Message ---
--- Begin Message ---
Nevermind... Apparently I'm a total retard :p

The coding error was in my calling $argv[0] thinking it'd be what I
passed to my batch file, but infact it is the actual file being run. The
argument I wanted was $argv[1]. This meant that nothing was being read,
and so the script was attempting to write a null string, which
apparently gives an erro :)

Thanks for the help anyway ;)

chris kranz
fatcuban.com



-----Original Message-----
From: Sven Schnitzke [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2003 09:30
To: 'Chris Kranz'
Subject: AW: [PHP-WIN] file write issues...


Hi Chris,
code runs fine on my config (PHP 4.4-dev, WIN98SE). Where do you expect
the file to show up? It will be genereated in the folder of PHP.EXE when
in CGI or CLI modes and in the webserver's folder in SAPI mode.
-- 
Sven 


> -----Ursprüngliche Nachricht-----
> Von:  Chris Kranz [SMTP:[EMAIL PROTECTED]
> Gesendet am:  Dienstag, 25. Februar 2003 18:40
> An:   'PHP'
> Betreff:      [PHP-WIN] file write issues...
> 
> running this script command line...
>  
> $temp_file = "temp_file.txt";
> if( !file_exists( $temp_file ) )
> {
>  touch( $temp_file ) or die( "couldn't create new file" );
> }
> $fp = fopen( $temp_file, "wb" ) or die( "file opening failed" );
> fwrite( $fp, $cvs ) or die( "write file failed" ); fclose( $fp );
>  
> doesn't write to file. the $cvs is there, nice little comma delimited
> string waiting to be put into my file. if i run this off my web 
> server, it runs fine. but i need to run it command line, and it just 
> gives me the error "write file failes". dunno why. tried changing it 
> to fputs, and also added the touch line in there incase it was having 
> trouble creating the file... which it's not, coz the file gets created

> fine.
>  
> any help please? :)
> 
> chris kranz
>  <http://www.fatcuban.com/> fatcuban.com
> 
>  
> 
>  
> 




--- End Message ---

Reply via email to