php-windows Digest 6 Aug 2001 07:34:46 -0000 Issue 687

Topics (messages 8665 through 8674):

Configuring php4 with ms sql support
        8665 by: Quintin Blane
        8669 by: Frank M. Kromann

Re: newbie question:  stripslashes vs. changing the php.ini file
        8666 by: CJD

Re: how to update the cookie?
        8667 by: CJD

Re: php/apache install
        8668 by: CJD

Client-side vs Server side
        8670 by: Ruvinda

Re: PHP3 vs PHP4
        8671 by: Warwick Chapman (Budgee)

Problem inserting form values into mysql
        8672 by: Marnix Ottens

Re: ORACLE
        8673 by: Philippe Saladin

Problem with coding?
        8674 by: OoCobra97.aol.com

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]


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


When I add php_mssql70.dll to the dll's I want loaded in the ini file I get
the message:
'Unable to load dynamic library 'c:\PHP4/php_sql70.dll' - The specified
procedure could not be found'
The dll is in the same directory as php_gd.dll, which loads successfully.
What is happening here?

Quintin A Blane





You need to have the client tools for MSSQL Server installed on the server running php 
before you can load the module.
You can also copy ntwdblib.dll from \winnt\system32 on the MSSQL server to the same 
location on your php-box. This will not allow you to configure the client tools though.

php_mssql70.dll is an old version of the extension. If you update to the latest 
version of php4 the extension will be named php_mssql.dll.

- Frank

> When I add php_mssql70.dll to the dll's I want loaded in the ini file I get
> the message:
> 'Unable to load dynamic library 'c:\PHP4/php_sql70.dll' - The specified
> procedure could not be found'
> The dll is in the same directory as php_gd.dll, which loads successfully.
> What is happening here?
> 
> Quintin A Blane
> 
> 
> -- 
> 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]
> 
> 
> 







I recently transfered a site from a server which WAS using
'magic_quotes_gpc' to one which wasn't. MAJOR pain to go through all of the
code and add the addslashes() command, so probably (for portability reasons)
bettert o use the addslashes() command by default.



"Matt Cahill" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
>   This is my first post to this mailing list, so I hope this is
> clear enough...
>
>   What are the consequences of turning off 'magic_quotes_gpc'
> (ignore quotes)in the php.ini file to avoid / marks in my comment
> form, vs. inserting the line 'stripslashes($var);' in the page itself?
>
>   Is this something that's going to haunt me later on if I continue to
> develop my site using PHP?
>
>   Cheers,
>
> Matt Cahill
>






Remember that the value of a cookie if updated is not available until the
next time it's loaded.  So, updated & set the cookie, then set a variable to
the new value and use the variable in the page.

e.g.
    setcookie("blah"......etc)
    $blah="xxx";



"Science" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>      Does anybody know how to update the value in the cookie?
> Thanks
>
> DP
>
>






Try using short names not long names for your paths

instead of c:\Program Files
use c:\progra~1

and so on.

"Clive Porter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi i just installed PHP4/Apache on W98
> when I call a .php file from PWS the line
>
> [04-Aug-2001 08:03:15] PHP Fatal error:  Unable to open C:\Program in
> Unknown on line 0
>
> is written to the php error log, and the process terminates
>
> this happens regardless of an php directives in httpd.conf
>
> any ideas cause i'm firmly stuck.
>
> clive porter
>
>
>
>






Hi

What is the difference between Client side programming compared to server
side programming.

What are the advantages of server side programming if any.

Thanks






Howdy

I would say, beside the extra features and modules, the main 
differences between PHP3 and PHP4 are speed and native session 
support.

With PHP3 you have to use something like PHPLIB to provide 
session handling, while with PHP4, these features are built in.

If you upload PHP4 (usually .php) scripts to the server, it may only 
look for .php3 - check with the admins about that, but if you only 
use PHP functions from PHP3 it should run fine.

Cheers
Budgee

On 5 Aug 2001, at 23:12, Ruvinda wrote:

> Hi I'm doing a University project using PHP as the server side technology.
> I want to publish this using my ISP's server.  They say they support PHP3.
> I'm currently learning PHP4.  Is there a large difference between PHP3 and
> PHP4.  That is if I upload my PHP4 files will their server recognise them
> and display them properly?  Thanks.
> 
> 
> 
> -- 
> 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]
> 



Warwick Chapman (Glenwood 1999)
http://www.boatrace.co.za
Assistant IT Manager
Glenwood High School, Durban, South Africa
031 2055241
083 7797094
http://www.glenwoodhighschool.co.za




Hi,

I've made a script where I want the results of an order form to be inserted
into a MySQL database. Connecting to the database goed fine (tested it) but
my check if the values are inserted into the database gives the error
message I created "Problem, the information cannot be recorded". I hope
someone can spot the error in the script.

Please see the script below, I faked server address and user/pass and stuff.
Here a customer enters his name and address, after already selecting to buy
a new car (BMW). This is just an example.

<html>
<head>
<title>Form input & processor</title>
</head>
<body>

<?
if(!IsSet($stage))
 {
?>

<p>Please fill in the form below</p>

<form method="post" action="<? print("$PHP_SELF"); ?>">
<table><tr>
<tr><td>Last name:</td> <td><input type="text" name="lname"
size="30"></td></tr>
<tr><td>First name: <td><input type="text" name="fname" size="20"></td></tr>
<tr><td>Street: <td><input type="text" name="street" size="50"></td></tr>
<tr><td>Number: <td><input type="int" name="number" size="4"></td></tr>
<tr><td>Car: <td><input type="text" name="car" size="20"
value="BMW"></td></tr>
<input type="hidden" name="stage" value="1">
<tr><td><input type="submit"></td></tr>
</form>

<?
 }
else
 {

/* connecting to database */
mysql_connect("address.myserver.com", "myusername", "mypassword") or
die("Problem, can't connect to database");
mysql_select_db("databasename");

/* insert values to database */
$query = "INSERT INTO tablename (lname, fname, street, number, car) VALUES
('$lname', '$fname' '$street', '$number', '$car')";
$result = mysql_query($query);
if($result == 0)
 print("Problem, the information cannot be recorded");

else
 print("You have succesfully placed an order for a car");
 }
?>

</body>
</html>





I also had trouble with ORA 12154, but using OCILogon. I resolved it by
using not the name of the server, but the definition of its localization
(what you find in the TNSNAMES.ORA file). Something like :
$oracletns = "(DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = 21.1.1.145)
          (Port = 1521)
        )
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = 21.1.1.145)
          (Port = 1526)
        )
    )
    (CONNECT_DATA = (SID = ORCL)
    )
  )";
$Conn=OCILogon($oracleusername, $oraclepassword,$oracletns);

Hope it will help you,
Best Regards,
Philippe


"C.Chassagneux" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> I have a simple script in php :
>
> putenv("ORACLE_HOME=D:\\ORANT");
> putenv("TNS_ADMIN=D:\\ORANT\\NETWORK\\ADMIN");
> putenv("ORACLE_SID=xxxxxxxxx");
>
> echo "Oracle : ". getenv("ORACLE_HOME")." \n";
> echo "TNS_ADMIN : ". getenv("TNS_ADMIN")." \n";
> echo "ORACLE_SID  : ". getenv("ORACLE_SID")." \n";
>
> $connect_oracle = ora_logon("xxxxx@xxxxxxx"   ,
>                             "xxxxxxxxx"        );
>
> But then i do :
>     e:\> php testoracle.php
> the prog reply : ORA-12154 : TNS name not resolved
>
> with apache server, I don't have this problem.
> Can u help me ?
> PHP4.0.6 - Win NT4W SP5
>
>
>
>
>
>
>






I'm not sure if this is the right forum for this, but I didnt see a mailing 
list for anything else similar, but Im trying to extract some info from 
another site using this code:  (code is partially displayed, if you need the 
whole thing, just e-mail me)

function get_result() { 
   $file=fopen($this->filename,"r");
   if(!$file) {  
     echo "<p>Impossible</p>.\n"; 
     exit;
   }
   while(!feof($file)) {
    $line=fgets($file,1024);

    if (eregi("<td>description</td><td>(.*)</td>", $line, $tab)) $this->
description =$tab[1];
    if (eregi("<td>web site</td><td>(.*)</td>", $line, $tab)) $this->website 
= $tab[1];
    if (eregi("<tr><td>members</td><td>(.*)</td>", $line, $tab)) $memb = 
$tab[1];
    if (eregi("<td>results received</td><td>(.*)</td>", $line, $tab)) $this->
results = $tab[1];
    if (eregi("<td>total cpu time</td><td>(.*)</td>", $line, $tab)) $this->
totalcputime = $tab[1];
       if (eregi("<td>founder</td><td>(.*)</td></tr>",$line, $tab)) $this->
founder = $tab[1];
    }

And this a sample of what Im trying to extract:

<tr><td>Description</td><td>Who ever said the aliens are trying to contact 
humans, maybe they recognize the canine as the superior species on this 
planet!</td></tr>
<tr><td>Web site</td><td> <a href=http://www.littlewhitedog.com>click here</a>
</td></tr>
<tr><td>Members</td><td> 198</td></tr>
<tr><td>Results received</td><td> 101729</td></tr>
<tr><td>Total CPU time</td><td>   138.611 years</td></tr>
<tr><td>Founder</td><td>


I have no problems with the description, website, results recieved or total 
CPU time, it just doesnt display the members part, or the founder name.  If 
anyone could help me out with this I would appreciate it.  If not could you 
point me in the right direction?  BTW Im running this on win2k with IIS5 and 
php 4.0.6 (I think)  Thanks in advance

~Jeff


Reply via email to