php-windows Digest 8 Oct 2004 08:39:49 -0000 Issue 2423

Topics (messages 24711 through 24717):

Re: Convert Nominal Number into string spelling in PHP
        24711 by: graeme

Permissions on Windows
        24712 by: Tumurbaatar S.

short adress
        24713 by: ��������� �������
        24714 by: Felipe Gasper

Cookies!
        24715 by: James Nunnerley

Cookies & ini file
        24716 by: James Nunnerley

Re: php_mysql.dll - WON'T WORK!!
        24717 by: Marc Kia

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 don't know of a function that does what you want, although I'm sure that such a function has been written many times. If you want to write it yourself then you will need to grab each individual digit that can be done in a simple loop using the modulus and divide operators

The following snippet will put the individual digits into an array after that it's should be a case of working on the elements of the array. Element 0-2 hundreds, 3-5 thousands, 6-8 millions etc. Obviously some refining is required to cater for the numbers between ten and twenty.

<?php
$digit = array();
$number = 123654879;
$num = $number;
$n = 0;
while($num!= 0)
{
   $digit[$n] = $num%10;
   $num=(int)($num/10);
   $n++;
   echo "n = $n, num = $num<BR>";
} // while
echo $number;
echo "<PRE>";
var_dump($digit);
echo "</PRE>";
?>

graeme

susilo wrote:

Does everyone know how to convert Nominal Number into string spelling in
PHP ?.

Like this :

Nominal Number : 567.123.560

And the spelling string/word have to be like this :

"Five Hundred Sixty Seven Million One Hundred Twenty Three Thousand Five
Hundred and Sixty"

Please help me..







--- End Message ---
--- Begin Message ---
I'm going to install PHP5 on Win2k3 server and need to
know what permissions to grant to what users/groups.
There're 3 objects where I have to set permissions:
1. main php folder where CGI/ISAPI and extension modules
2. session files folder
3. php.log file (I'm planning to use log file instead system Event Log)

I think that IUSR_XXX user does not have any matter on these
objects. Yes?

--- End Message ---
--- Begin Message ---
Hello.

Do you know how to change adress such
"http://server.lg.ua/index.php?par1=temp1&par2=temp2..."; to
"http://server.lg.ua/"; without reloading page?
I saw it in phpmyadmin where long adresses change to short.

sorry my English

--
Alexander
ICQ: 244-030-537
Odigo: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- If I understand you correctly, you could create an intermediary HTML POST form with all the variables from the URL's query string that, via Javascript, submits automatically.

Like this:

----------------------------------
<?php
preg_match('/^([^?]*)\?.*/',$REQUEST_URI,$urlMatch);
$bareUrl = $urlMatch[1];

print "<html><head><title></title></head><body><form method="post" action=\"".htmlspecialchars($bareUrl)."\">";

foreach ($_GET as $key => $val) {
        $key = htmlspecialchars($key);
        $val = htmlspecialchars($val);
        print "<input type='hidden' name=\"$key\" value=\"$val\" />";
}
print "</form>";
print "<script type='text/javascript'>document.forms[0].submit();</script>";
print "</body></html>";
?>
---------------------------------

There may be a way to do it without Javascript. This does actually reload the page, I guess, but it's minimal traffic for doing so.

-Felipe Gasper

Quoth Александр Ильяшов on 10/7/2004 8:08 AM...
Hello.

Do you know how to change adress such
"http://server.lg.ua/index.php?par1=temp1&par2=temp2..."; to
"http://server.lg.ua/"; without reloading page?
I saw it in phpmyadmin where long adresses change to short.

sorry my English

--
Alexander
ICQ: 244-030-537
Odigo: [EMAIL PROTECTED]


-- Quidquid latine scriptum sit altum viditur. Si hoc legere scis, nimis eruditionis habes.

Easier web browsing: http://mozilla.org
--- End Message ---
--- Begin Message ---
I'm trying to create a simple login script for user to the web application I'm
writing.  I previously wrote it for using PHP4 & Apache, however I've recently
had to move to IIS5, and also upgraded to PHP5.
[script]
if (isset($_POST["username"]) AND isset($_POST["password"])) {
        $res=mysql_query('SELECT username, password, agent_id FROM user where
username="'.$_POST["username"].'"');
        if (mysql_num_rows($res)==0) {
                $message="Username does not exist.";
        } elseif (mysql_num_rows($res)==1) {
                while ($user=mysql_fetch_array($res)) {
                        if 
(strtolower($user["password"])!=strtolower($_POST["password"])) {
                                $message="Incorrect Password.";
                        } else {
                                
setcookie("username",$user["username"],time()+31449600,"/");
                                
setcookie("agent_ID",$user["agent_id"],time()+31449600,"/");
                                setcookie("logged_in",time(),time()+60*60*12,"/");
                                header("Location: http://".$_SERVER["HTTP_HOST"]."/";);
                                exit;
                        }
                }
        }
}
[/script]

The above works fine on Apache, but on IIS, it would seem no cookie is set. 
I've found something suggesting I change php.exe to nph-php.exe - is this true,
does it work - it seems a little drastic - is there another way around it?

Cheers as ever
Nunners

--- End Message ---
--- Begin Message ---
Further to my earlier email, someone suggested looking at the settings
within my php.ini file - I've done this, but I'm not quite sure what I'm
looking for.

 

I'm running IIS5 & PHP5. this is the cgi section of the ini file, which I
think is the relevant bit - can someone give me some guidance as to what
needs changing.

 

[script]

; The root of the PHP pages, used only if nonempty.

; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root

; if you are running php as a CGI under any web server (other than IIS)

; see documentation for security issues.  The alternate is to use the

; cgi.force_redirect configuration below

doc_root =

; The directory under which PHP opens the script using /~username used only

; if nonempty.

user_dir =

; Directory in which the loadable extensions (modules) reside.

extension_dir = "./"

; Whether or not to enable the dl() function.  The dl() function does NOT
work

; properly in multithreaded servers, such as IIS or Zeus, and is
automatically

; disabled on them.

enable_dl = On

; cgi.force_redirect is necessary to provide security running PHP as a CGI
under

; most web servers.  Left undefined, PHP turns this on by default.  You can

; turn it off here AT YOUR OWN RISK

; **You CAN safely turn this off for IIS, in fact, you MUST.**

;cgi.force_redirect = 1

cgi.force_redirect = 0

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with

; every request.

; cgi.nph = 1

; if cgi.force_redirect is turned on, and you are not running under Apache
or Netscape

; (iPlanet) web servers, you MAY need to set an environment variable name
that PHP

; will look for to know it is OK to continue execution.  Setting this
variable MAY

; cause security issues, KNOW WHAT YOU ARE DOING FIRST.

; cgi.redirect_status_env = ;

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate

; security tokens of the calling client.  This allows IIS to define the

; security context that the request runs under.  mod_fastcgi under Apache

; does not currently support this feature (03/17/2002)

; Set to 1 if running under IIS.  Default is zero.

; fastcgi.impersonate = 1;

; cgi.rfc2616_headers configuration option tells PHP what type of headers to

; use when sending HTTP response code. If it's set 0 PHP sends Status:
header that

; is supported by Apache. When this option is set to 1 PHP will send

; RFC2616 compliant header.

; Default is zero.

;cgi.rfc2616_headers = 0

[/script]

 

Cheers

Nunners


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

I have the same probleme if I undersoud well:
The last available MYSQL 4.0.21 is not supported by the php_mysql.dll
because of the suppression of the drop_database function in Libmysql.dll.
To seams like a bug in the php_mysql.dll I hope that I will find a fix prety
quickly. Because using php_mysqli.dll is not possible in many cases because
of backward compatibility.

I'll try to use an old crapy 3.xx it should work again.

bye


"Phpdiscuss - Php Newsgroups And Mailing Lists" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> I set my extension folder to 'D:\Service\PHP\ext' and the php_mysql.dll is
> in the ext folder. I was getting an error saying "The specified module
> could not be found." But after I copied the libmySQL.dll to the system32
> folder, I got this error, "The specified procedure could not be found."
> (Notice the difference of 'module' and 'procedure' in the two error
> messages.) Why isn't it working? *sighs*
>
> Thanks in advance.

--- End Message ---

Reply via email to