php-windows Digest 30 Jul 2003 10:34:38 -0000 Issue 1844
Topics (messages 20926 through 20930):
Fonts in report
20926 by: Dick Davis
Installation problem with php_imap.dll
20927 by: Robert Croson, Jr
Please Help!!!
20928 by: Wx
20929 by: Sek-Mun Wong
PWS + PHP
20930 by: Nadim Attari
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 ---
Hi all,
I am developing an Intranet application that needs output to one or more
printers on the network.
I do have the following questions pertaining fonts and other graphic
capabilities.
Assume the value of $row["CompanyName"] needs to be printed on line 10,
column 4.
The font is Times New Roman (Western), size = 12, face = bold.
What are the settings for:
$font = printer_create_font("Times New Roman
(Western)",72,48,PRINTER_FW_BOLD,false,false, false,0);
What values need to be changed and what is the meaning of each component.
PRINTER_FW_BOLD is obvious but the other ones are a mystery to me.
Here is some code:
$handle = printer_open("EPSON");
printer_start_doc($handle, "Header Document");
printer_start_page($handle);
$font = printer_create_font
("Times New Roman (Western)",72,48,PRINTER_FW_BOLD,
false, false, false,0);
printer_select_font($handle, $font);
printer_draw_text($handle, $row["CompanyName"], 2, 2);
printer_delete_font($font);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
This prints out correct? Anyway the value of $row["CompanyName"] is printed.
When I try to print out ASCII value 205, a double line I get the value of
ASCII 143.
Wrong ASCII chart, or is this an OS (Win 98) issue? If so where or how can I
get a "correct" chart?
Thanks,
Dick Davis
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I am installing Apache/2.0.47 (Win32) PHP/4.3.2 under Win98 using
php4apache2.dll.
When starting Apache, I get the following error:
Unknown(): Unable to load dynamic library
'c:\php\extensions\php_imap.dll' - A device attached to the system is
not functioning.
The extension_dir is specified as follows:
extension_dir = C:/php/extensions/
If I change the extension directory to the wrong path on purpose, I get
the error that the module can't be found.
Other extensions such as php_gettext.dll, php_ldap.dll, etc., load
properly. PHP is finding the module, it just can't run it.
If I comment out php_imap.dll, Apache loads with no errors and
functions properly.
I would appreciate any information anyone has.
Rob
--
ARCOM Inc. 440.639.9500 http://www.arcm.com
---Excellence In Technical Communications---
--- End Message ---
--- Begin Message ---
Please help me out
Wx
The following sql statements work when called from command line i.e in the php path
<?php
$link = @mysql_connect()
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
// mysql_close($link);
$db = @mysql_select_db(my_database) or die(" Database Not Found:" .mysql_error());
print ("using my_database");
mysql_query("insert into table1 (std_id, std_name, stdmaj, std_new,
studentSSN, Date)
values( null, 'Kioshoere Merhi', 'International Studies', 'Junior', '26577922',
20003-07-25)");
mysql_query("insert into table2( std_id, optA, optB, optC,optD,
optE, optF, optG, optH, optJ, optL, optM)
values(0000, 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'N', 'Y', 'N', 'Y')");
mysql_query("insert into table3(std_ID, text_opt1, text_opt2, Ins_ID)
values(0000, 'Y', 'Y', 2)");
mysql_query("insert into table4(std_id, in_id, in_name, act_text, Date)
values(0000, 1, 'text', 'text string', null)");
?>
but when called from the following form:
<html>
<title>Form</title>
<body bgcolor="#CCCCC">
<head1><font type="Courier" color="brick" size="5">Form 1</font></head>
<p><font size="4" color="beige"><marquee>Today's Date:
<?php
echo(date('l, F dS Y. '));
?>
</marquee></font></p>
<form action="ears_script.php" method="POST">
<p>
<font size="5">Student ID</font></p>
<p>
<table border="1">
<tr bgcolor="green">
<p>
<td width="80">
<font color="black" style="bold" size="4">Name: </td>
<td align="center"><input type="text" size="20" maxlenght="60" name="$std_name"
/></td></font></p>
<p>
<td width="80">
<font color="black" style="bold" size="4">Major: </td><td align="center"><input
type="text" size="20"maxlenght="60" name="$std_major" /></td></font></p>
<p>
<td width="120">
<font color="black" style="bold" size="4">SS#: </td><td align="center"><input
type="text" size="10" maxlenght="9" name="$std_ssn"/></td></font></p>
<p>
<td width="80">
<font color="black" style="bold" size="4">Class/Section: </td><td
align="center"><input type="text" size="20" maxlenght="60" name
="$std_class"/></td></font></p>
<p>
<td width="10">
<font color="black" style="bold" size="4">Date: </td><td align="center"><input
type="text" size="6" maxlenght="10" name="datestamp"/></td></font></p>
</tr>
</table>
<font color="redgreen" size="5"><td align="center"> New Heading</td></font><p>
<input type="checkbox" name="o$pt1" size="15" />Option1
<p><input type="checkbox" name="$opt2" size="15" />Option2</p>
<p><input type="checkbox" name="$opt3" size="15" />Option2</P>
<p><input type="checkbox" name="$opt4" size="15" />Option4 <input type="text"
size="15" maxlenght="3" name="number" /> Assignments</P>
<p><input type="checkbox" name="$opt5" size="15" />Option5</P>
<p><input type="checkbox" name="$opt6" size="15" />Option6</P>
<p><input type="checkbox" name="$opt7" size="15" />Option7</P>
<p><input type="checkbox" name="$opt8" size="15" />Option8</P>
<p><input type="checkbox" name="$opt9" size="15" />Option9</P>
<p><input type="checkbox" name="$optA" size="15" />OptionA</P>
<p><input type="checkbox" name="$optB" size="15" />OptionB <input type="text"
name="pproblem" size="15" /></P>
<p><input type="checkbox" name="$optC" size="15" />OptionC <input type="text"
name="other" size="28" /></P>
<p><input type="checkbox" name="$optD" size="15" />OptionD</P>
<p><input type="checkbox" name="$optE" size="15" />OptE</P>
<p><head><font size="5" color="orangegreen">Text Options</font></head></p>
<p><input type="checkbox" name="$optI" size="15" />I Text Option1.</p>
<p><input type="checkbox" name="$optII size="15" />I Text Option2.</p>
<p>
<p>
<p><font size="5" position="center" color="orange">Test1</font></p><p><input
type="text" name="action_taken" size="50" maxlenght="255" />
<p>
<head2><font color="red" size="5">Content2: <input type="text"
name="$inst_name"size="40" maxlenght="60" /></head2></p>
<p>
<input type="submit" value="Upload" size="15" />
<input type="reset" name="r" value="reset" size="15" /></p>
</form>
</body>
</html>
I get this Error: Parse error: parse error, unexpected '@' in
c:\inetpub\wwwroot\DIR\my_script.php on line 18
--- End Message ---
--- Begin Message ---
Umm,
you have an "@" before the mysql_connect and mysql_select_db statements?
remove these.
"Wx" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Please help me out
Wx
The following sql statements work when called from command line i.e in the
php path
<?php
$link = @mysql_connect()
or die("Could not connect: " . mysql_error());
print ("Connected successfully");
// mysql_close($link);
$db = @mysql_select_db(my_database) or die(" Database Not Found:"
.mysql_error());
print ("using my_database");
mysql_query("insert into table1 (std_id, std_name, stdmaj, std_new,
studentSSN, Date)
values( null, 'Kioshoere Merhi', 'International Studies', 'Junior',
'26577922', 20003-07-25)");
mysql_query("insert into table2( std_id, optA, optB, optC,optD,
optE, optF, optG, optH, optJ, optL, optM)
values(0000, 'Y', 'Y', 'Y', 'Y', 'N', 'Y', 'Y', 'N', 'Y', 'N', 'Y')");
mysql_query("insert into table3(std_ID, text_opt1, text_opt2, Ins_ID)
values(0000, 'Y', 'Y', 2)");
mysql_query("insert into table4(std_id, in_id, in_name, act_text, Date)
values(0000, 1, 'text', 'text string', null)");
?>
but when called from the following form:
<html>
<title>Form</title>
<body bgcolor="#CCCCC">
<head1><font type="Courier" color="brick" size="5">Form 1</font></head>
<p><font size="4" color="beige"><marquee>Today's Date:
<?php
echo(date('l, F dS Y. '));
?>
</marquee></font></p>
<form action="ears_script.php" method="POST">
<p>
<font size="5">Student ID</font></p>
<p>
<table border="1">
<tr bgcolor="green">
<p>
<td width="80">
<font color="black" style="bold" size="4">Name: </td>
<td align="center"><input type="text" size="20" maxlenght="60"
name="$std_name" /></td></font></p>
<p>
<td width="80">
<font color="black" style="bold" size="4">Major: </td><td
align="center"><input type="text" size="20"maxlenght="60" name="$std_major"
/></td></font></p>
<p>
<td width="120">
<font color="black" style="bold" size="4">SS#: </td><td
align="center"><input type="text" size="10" maxlenght="9"
name="$std_ssn"/></td></font></p>
<p>
<td width="80">
<font color="black" style="bold" size="4">Class/Section: </td><td
align="center"><input type="text" size="20" maxlenght="60" name
="$std_class"/></td></font></p>
<p>
<td width="10">
<font color="black" style="bold" size="4">Date: </td><td
align="center"><input type="text" size="6" maxlenght="10"
name="datestamp"/></td></font></p>
</tr>
</table>
<font color="redgreen" size="5"><td align="center"> New
Heading</td></font><p>
<input type="checkbox" name="o$pt1" size="15" />Option1
<p><input type="checkbox" name="$opt2" size="15" />Option2</p>
<p><input type="checkbox" name="$opt3" size="15" />Option2</P>
<p><input type="checkbox" name="$opt4" size="15" />Option4 <input
type="text" size="15" maxlenght="3" name="number" /> Assignments</P>
<p><input type="checkbox" name="$opt5" size="15" />Option5</P>
<p><input type="checkbox" name="$opt6" size="15" />Option6</P>
<p><input type="checkbox" name="$opt7" size="15" />Option7</P>
<p><input type="checkbox" name="$opt8" size="15" />Option8</P>
<p><input type="checkbox" name="$opt9" size="15" />Option9</P>
<p><input type="checkbox" name="$optA" size="15" />OptionA</P>
<p><input type="checkbox" name="$optB" size="15" />OptionB <input
type="text" name="pproblem" size="15" /></P>
<p><input type="checkbox" name="$optC" size="15" />OptionC <input
type="text" name="other" size="28" /></P>
<p><input type="checkbox" name="$optD" size="15" />OptionD</P>
<p><input type="checkbox" name="$optE" size="15" />OptE</P>
<p><head><font size="5" color="orangegreen">Text Options</font></head></p>
<p><input type="checkbox" name="$optI" size="15" />I Text Option1.</p>
<p><input type="checkbox" name="$optII size="15" />I Text Option2.</p>
<p>
<p>
<p><font size="5" position="center" color="orange">Test1</font></p><p><input
type="text" name="action_taken" size="50" maxlenght="255" />
<p>
<head2><font color="red" size="5">Content2: <input type="text"
name="$inst_name"size="40" maxlenght="60" /></head2></p>
<p>
<input type="submit" value="Upload" size="15" />
<input type="reset" name="r" value="reset" size="15" /></p>
</form>
</body>
</html>
I get this Error: Parse error: parse error, unexpected '@' in
c:\inetpub\wwwroot\DIR\my_script.php on line 18
--- End Message ---
--- Begin Message ---
Hi PHPals,
Dunno whether it's really a PHP question; anyway your help is appreciated.
I have a machine (Win98 SE) running PWS. Also installed is PHP.
I want PHP to parse files with the .html / .htm (or any other) extension;
i.e. when i try to view a file (index.htm for example) through a browser,
PHP must parse that file.
You may have guess, i have PHP codes in "index.htm" ...
http://localhost/index.htm for example; where index.htm is in fact a file
containing PHP codes.
Where and how to I specify this?
- In "pws.ini" ? Or somewhere else...? Registry ?
- what should i put in the ini file / registry?
Well i did it on IIS (Win2k) and it works ... but i need it on Win98SE
Any help greatly appreciated.
Thanks,
Nadim Attari
--- End Message ---