php-windows Digest 28 Feb 2003 13:26:13 -0000 Issue 1610

Topics (messages 18748 through 18763):

=at wit's end with GD Libraries=
        18748 by: Anthony Ritter

does any one now about curl
        18749 by: freeman

Re: Include virtual?
        18750 by: Wayne
        18760 by: Jill.Ramonsky.Aculab.com
        18761 by: Charles P. Killmer

Re: copy() for file upload
        18751 by: Wayne

Re: Having problems connection PHP to MSSQL2000
        18752 by: A. Mikkelsen

Re: newbie: Dynamic forms
        18753 by: Michael Power
        18754 by: Michael Power

Re: destroying COM objects
        18755 by: Michael Power
        18758 by: Rich Gray
        18759 by: Michael Power

Problem with links....
        18756 by: A. Mikkelsen
        18757 by: Henrik Hornemann

Still having problems....
        18762 by: A. Mikkelsen

PHP 4.3.1 instalation and fine tunning
        18763 by: Afonso Marques dos Santos

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 want to thank those who tried to help with my questions about using the GD
libraries.

I still have not gotten them to function using PHP.

I've put two screenhots of the phpinfo() page at:

www.gonefishingguideservice.com/php_page.htm

If you care to take a look at those images, you'll see that I've got php and
Apache working with MS Win 98.  It also says that directories are enabled.

I've searced for the following files that I believe I need for GD Libraries
and PHP in Explorer and found:

php_gd.dll  ---------> C:\PHP\extensions

php.ini -----------------> C:\WINDOWS

php4ts.dll -------------> C:\WINDOWS\System

msvcrt.dll -------------> C:\WINDOWS\System

When I load the phpinfo() page, it comes up like you see in the screenshots.

However, when I _take out_ the semi-colon as in the line:
.......................
extension=php_gd.dll  //semi-colon taken out
......................

the page - or any page with a file extension.php will _not_load at all using
Apache.

However, when I _reinsert_ the semi-colon in the php.ini file, the .php page
then loads.

Any advice on how I can get the GD libaries to work will be greatly
appreciated.

At wit's end...

Thank you.
Tony Ritter
..................

;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
extension_dir="C:\PHP\extensions" ; directory in which the loadable
extensions (modules) reside
enable_dl=On    ; Whether or not to enable the dl() function.
; The dl() function does NOT properly work in multithreaded
; servers, such as IIS or Zeus, and is automatically disabled
; on them.


;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads=On    ; Whether to allow HTTP file uploads
;upload_tmp_dir=; temporary directory for HTTP uploaded files (will use
system default if not specified)
upload_max_filesize=2M      ; Maximum allowed size for uploaded files


;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;
allow_url_fopen=On                ; Wheter to allow trating URLs like
http:... or ftp:... like files


;;;;;;;;;;;;;;;;;;;;;;
; 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
;Note that MySQL and ODBC support is now built in, so no dll is needed for
it.
;
;extension=php_bz2.dll
;extension=php_ctype.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_cybercash.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_domxml.dll
;extension=php_dotnet.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mhash.dll
;extension=php_mssql65.dll
;extension=php_mssql70.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
;extension=php_snmp.dll
;extension=php_sybase_ct.dll
;extension=php_yaz.dll
;extension=php_zlib.dll







--- End Message ---
--- Begin Message ---
If anyone on here has used curl on thier server i would appreciate some help on 
installing or a good link to some install docs. Thanks

--- End Message ---
--- Begin Message ---
include("filedir/file.php");

this will work with full or virtual paths :)


"Charles P. Killmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
For those familiar with asp does php have something similar to the
include virtual?



I don't want to have to use the full system path to include a template
that is at the doc_root of the site.



Include_virtual("/template.php"); ??



This would include the template.php at the root of the site instead of
the root of the drive.



Thanks

Charles Killmer

Windows 2000 Server IIS 5.0 PHP 4.2.3




--- End Message ---
--- Begin Message ---
Not sure I understand this.

We all know you can do
include("path-relative-to-current-directory/filename");
We all also know you can do
include("/path-relative-to-root-of-server/filename");

The original question was, basically, can you do
include("path-relative-to-root-of-website/filename").
And if so, how?

Jill


-----Original Message-----
From: Wayne [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 6:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Include virtual?


include("filedir/file.php");

this will work with full or virtual paths :)


--- End Message ---
--- Begin Message ---
Exactly.  I made a function to do this just wondering if this will be
built into PHP.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 28, 2003 6:01 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: Include virtual?

Not sure I understand this.

We all know you can do
include("path-relative-to-current-directory/filename");
We all also know you can do
include("/path-relative-to-root-of-server/filename");

The original question was, basically, can you do
include("path-relative-to-root-of-website/filename").
And if so, how?

Jill


-----Original Message-----
From: Wayne [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 6:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Include virtual?


include("filedir/file.php");

this will work with full or virtual paths :)


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


--- End Message ---
--- Begin Message ---
the copy $FILE_name var needs to be

$NAME-OF-FIELD_name [that should return the proper thing] (i think)

this is a php script i use to upload some avatar (image) files etc
maybe it will help

--------------------

<form method="post" enctype="multipart/form-data" action="Avatar.php">
<input type="hidden" name="action" value="put">
<input type="file" name="avf" size=20> <input type="submit" value="Put
File">
</form>

<?php

error_reporting(E_ALL);

if($action == "put"){
 if(is_uploaded_file($avf)){
  if(is_file("modules/Chat/Avatars/".$avf_name)){
   unlink("modules/Chat/Avatars/".$avf_name);
  }
  copy($avf,"modules/Chat/Avatars/".$avf_name);
  chmod("modules/Chat/Avatars/".$avf_name,0777);
 }
}

?>

---------------------

<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi guys,
>
> I realize that this might be rather a question for the general list, but i
> will try it here anyway (still have to subscribe to general).
> I am using the copy() method to upload pictures to my site. However, i am
> experiencing all sorts of problems. The most common one is that it does
not
> find the 'on-the-fly' variable called $File_name. This var gets created
with the
> filename of the upload picture.
> Here are the two error messages i encounter:
>
> 1. Running Linux:
>
> Warning: Unable to open 'C:\\Documents and Settings\\Thomash\\My
> Documents\\My Pictures\\ieeelogo2.gif' for reading: No such file or
directory in
> /usr/www/users/thomasd/members/mypictures.php on line 37
>
> Warning: unlink() failed (No such file or directory) in
> /usr/www/users/thomasd/members/mypictures.php on line
> 38
>
> --------------------------------------------------------------------------
---------------------------------
>
> 2. Windows 2000:
>
> Notice: Undefined variable: File_name in
> c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37
>
> Warning: copy(../images/mypictures/_general/uploads/) [function.copy]:
> failed to create stream: Permission denied in
> c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 37
>
> Notice: Undefined variable: File_name in
> c:\inetpub\wwwroot\pdev\thomash.net\members\mypictures.php on line 43
>
> --------------
>
> Both times Apache is used.
>
> Thomas Hochstetter
>
> --
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
>



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

I got it to work after I copied the DLL file to c:\PHP4
And added the extensions til the php.ini file.


//Anders



"Michael Power" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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 ---
As already mentioned this is client side stuff (i.e. Javascript, or dare I
say it...  VBScript ;).

But as a pointer...

JAVASCRIPT:
function ShowHide(checkBox, txtBox) {
  if (checkBox.checked) {
    txtBox.disabled = true;
  }
  else {
    txtBox.disabled = false;
  }
}

HTML:
<input type="checkbox" name="selector" value="1" onclick="ShowHide(this,
txtName)">
<input type="text" name="txtName">

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
_______________________________________
"Edward David" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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 ---
You appear to have a twitch...

;)

Mike

> "Edward David"
>
> 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 ---
unset($com_object);

--
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
_______________________________________

> "Sterling Anderson"
>
> 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 ---
>> 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?> unset($com_object);
>>
> --
> Michael Power
> Software Developer
> Concentrix Limited

I may be talking out of my proverbial but I believe unset() will just remove
the reference to the object it won't destroy the object itself which is why
I suggested $obj = null in my earlier message... however I'm probably being
pedantic as the next gc cycle will clean up objects with a 0 reference count
anyway...

I suppose...

$obj = null;
unset($obj);

Would cover all bases...
Cheers
Rich


--- End Message ---
--- Begin Message ---
> "Rich Gray"
>
> I may be talking out of my proverbial but I believe unset() will just
remove
> the reference to the object it won't destroy the object itself which is
why
> I suggested $obj = null in my earlier message... however I'm probably
being
> pedantic as the next gc cycle will clean up objects with a 0 reference
count
> anyway...
>
> I suppose...
>
> $obj = null;
> unset($obj);
>
> Would cover all bases...
> Cheers
> Rich
>


Not too sure although your point sounds correct.  I must admit I don't use
COM much via PHP so have not had to learn too much for what I need.  Just
what I have used has always caused problems unless I use unset().

If all else fails maybe you could write a little command line app which
receives the COM reference and kills it...

Cheers
Mike



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

I'm using

    <A HREF="main.php?sw=SQL" TARGET="main">SQL Navigator</A><br>

to link to main.php. The link to the page works but not the ?sw=SQL path.
In main.php i use the following to check the ?sw=

    SWITCH ($sw)
     {
     CASE ("toad"):
          $Where_Text = "AND Software = 'Toad'";
          $Choosen_SW = "Toad";
     BREAK;
     CASE ("SQL"):
          $Where_Text = "AND Software = 'SQL Navigator'";
          $Choosen_SW = "SQL Navigator";
     BREAK;
     }


My problem is that is doesn't seem to send the sw info th the main.php page.
Does anybody have an ideer to what is wrong.

PHP is the latast version, and i added the php_mssql.dll extension.

//Anders



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

It is probably a register globals problem. If register globals is set to off
in your php.ini you have to access $sw as $_GET['sw']

hth Henrik Hornemann 


-----Original Message-----
From: A. Mikkelsen
To: [EMAIL PROTECTED]
Sent: 28-02-03 10:52
Subject: [PHP-WIN] Problem with links....

Hi

I'm using

    <A HREF="main.php?sw=SQL" TARGET="main">SQL Navigator</A><br>

to link to main.php. The link to the page works but not the ?sw=SQL
path.
In main.php i use the following to check the ?sw=

    SWITCH ($sw)
     {
     CASE ("toad"):
          $Where_Text = "AND Software = 'Toad'";
          $Choosen_SW = "Toad";
     BREAK;
     CASE ("SQL"):
          $Where_Text = "AND Software = 'SQL Navigator'";
          $Choosen_SW = "SQL Navigator";
     BREAK;
     }


My problem is that is doesn't seem to send the sw info th the main.php
page.
Does anybody have an ideer to what is wrong.

PHP is the latast version, and i added the php_mssql.dll extension.

//Anders



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

--- End Message ---
--- Begin Message ---
I'm still having problems :

My query :
$q = "SELECT id, computer_id, date, domain, ip, license_key, software, wm_id
FROM data WHERE id IN (SELECT MAX(ID) FROM data GROUP BY Computer_ID) " .
$Where_Text . " ORDER BY Domain, Date DESC";

The show part:
 <?
  $sw_list = get_list($q);

  For ($i=0; $i < sizeof($sw_list); $i++)
   {
   ECHO "<TR><TD>".$sw_list[$i]['Computer_ID']."</a></TD>";
   ECHO "<TD>".$sw_list[$i]['Domain']."</TD>";
   ECHO "<TD>".$sw_list[$i]['License_Key']."</FONT></TD>";
   ECHO "<TD>&nbsp;&nbsp;&nbsp;&nbsp;" .$sw_list[$i]['WM_ID']."</TD>";
   ECHO "<TD>" .$sw_list[$i]['Date']. "</TD></TR>";
   }
 ?>

My function :
function get_list($q)
   {
    $result = mssql_query($q) or die("ERROR in - get_sw_ids function");
    while ($rr[] = mssql_fetch_array($result))  $i++;
    return $rr;
   }

When i remove the show part, the code works.

I'm getting more and more fustrated....

//Anders



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

I heve PHP 4.2 running oon a Windows 2000 Advanced Server environment, using
MSSQL2000 and IIS.

I want to make a new instalation of PHP 4.3.1 and fine tune it.

Can anyone help me out how to do this?

Thanks in advance.


--- End Message ---

Reply via email to