php-windows Digest 16 Oct 2001 12:59:28 -0000 Issue 807

Topics (messages 9852 through 9869):

Re: Multidimensial Array !!!!!
        9852 by: _lallous

redundant smtp server in php.ini under [mail function]
        9853 by: Nick Allen

Re: authorization system
        9854 by: Ross Fleming

Re: Excuse the dumb question about page stats...
        9855 by: Ross Fleming

Re: installing on Unix....
        9856 by: Martin.Andrew

Inserting symbols into a mysql database from PHP
        9857 by: Ross Fleming
        9858 by: Svensson, B.A.T.
        9859 by: Svensson, B.A.T.
        9860 by: Ross Fleming
        9861 by: Svensson, B.A.T.
        9863 by: Corn Vollney-R7019C
        9864 by: Egil Helland
        9865 by: Ross Fleming
        9869 by: Svensson, B.A.T.

Problem using exec() in Win2K
        9862 by: Robert Trembath

Re: Php on Windows not running!!!  Any help ???
        9866 by: Pierre-Alain MILLET

About Content-Type
        9867 by: Costin Cosoiu

Re: php array
        9868 by: SIR d

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 ---
<?
$characters = array (
            array("name"=> "bob",
                  "oupation"=> "superhero","age"=> 30),
            array("name"=> "sir",
                  "oupation"=>"sup","age"=> 66),
            array("name"=> "sir",
                  "oupation"=>"sup","age"=> 76));
$first=array("name"=> "Desire",
                  "oupation"=> "skolere","age"=> 876);

array_push($characters, $first);
var_dump($characters);
?>

check array functions too
"Serkan" <[EMAIL PROTECTED]> wrote in message
016f01c15573$07921a20$44542ed5@asdfap3n13edh8">news:016f01c15573$07921a20$44542ed5@asdfap3n13edh8...
Hi all,

Say I have a multid. array $characters(see below). My question is how I =
can add the array $first to array $characters. At the end I gotta have 4 =
arrays in my multid. array $characters. Is this possible ???????

$characters = array (
            array(name= "bob",
                  oupation= "superhero",age= 30),
            array(name= "sir",
                  oupation="sup",age= 66),
            array(name= "sir",
                  oupation="sup",age= 76));

Array $first must be put in multidimensial array $characters .

$first=array(name= "Desire",
                  oupation= "skolere",age= 876);

Thanxx in advance

Serkan

[EMAIL PROTECTED]




--- End Message ---
--- Begin Message ---
Is there a way to specify more than one smtp server for resilience in the
PHP.INI file?
Or will I just have to use ini_set() in code?

Alternatively - is there any way to specify your mail domain as a host and
have it lookup a host via the mx record - thereby enabling it to use
fallback servers specified with different priorities in the mx config? Or
would this have too big an impact on performance?

Thanks,

Nick.



--- End Message ---
--- Begin Message ---
>>I am having troubles connecting and a couple of errors also.
>>Could somebody please point me in the right direction?
>>Thanks in advance

<snip>

// login to the database
  mysql_host = www.site.net;
  mysql_user = username;
  mysql_pass = password;
  $mylink = mysql_connect('mysql_host', 'mysql_user',
'mysql_pass')
    or die ("could not connect");

<snip>

You need to define mysql_host as a variable by putting the $ sign in front.
You won't need the quotes inside the mysql_connect, but you will need them
around the variable values:

// Should be
// login to the database
  $mysql_host = 'www.site.net';
  $mysql_user = 'username';
  $mysql_pass = 'password';
  $mylink = mysql_connect($mysql_host, $mysql_user, $mysql_pass)
    or die ("could not connect");

Haven't looked at much else in the code though.  Are you getting any other
errors other than the ones that these should fix?  Let us know

Regards

Ross

--- End Message ---
--- Begin Message ---
You could use Perl or PHP to read the Apache log file to generate stats from
that.  It's not too difficult.  You just need to parse the log file and
count how many times a certain page appears in it.  Haven't looked but I'm
sure there will be loads of scripts out there that will do it for you

Have fun!

Ross

-----Original Message-----
From: Nick Allen [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2001 10:19
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Excuse the dumb question about page stats...


We've a need to provide page stats so we can see what pages people are
visiting.

It is the case that every page in our web will need to be a PHP page then?
I'm not keen to do this just for page stats as it will mean additional
processing overhead but is that my only option?

I'm running PHP4.0.6 on Apache 1.3.20 for Win32.

Also - would you suggest that I simply make every page a PHP page and then
include the counter code as an include at the beginning of every page?

Thanks in advance,

Nick.




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



--- End Message ---
--- Begin Message ---
I have found the following in the MySQl web site

Error: "Fatal error: Call to unsupported or undefined function
mysql_connect() in .." This means that your PHP version isn't compiled with
MySQL support. You can either compile a dynamic MySQL module and load it
into PHP or recompile PHP with built-in MySQL support. This is described in
detail in the PHP manual. 

Does anyone know where in the PHP manual this can be found?

I'm using PHP4 with MySql on a debian linux server




-----Original Message-----
From: Martin.Andrew [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2001 15:18
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] installing on Unix....


I have successfully installed php4 on windows all works fine. 
I have been using this version and uploading the results to a (pre
installed) unix server with php3 installed.

But the time has come to upgrade the server with the PHP4 etc....

So for testing purposes a test server was installed with the same set up as
the current server (php3, mysql etc), from this I want to update the php
version
What I have noticed is that while PHP4 is working fine without problems
my_sql isn't!!

I keep getting the error:
Fatal error: Call to undefined function: mysql_pconnect() in
../include/db_mysql.inc on line 73


I have noticed that in the php3.ini the extension directory and mysql.so is
set (as shown below)

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
extension_dir   =       /usr/lib/php3/cgi               ;directory in which
the loadable extensions (modules) reside

;unix extension
extension=mysql.so


So I try using the same directory but still no luck!

Anybody know how to enable the My_sql function for php4 on a UNix system?

Thanks.

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

My problem is that that I have a form that takes user data and inserts it
into a database.  How can I allow quote marks to be inserted into the
database?  ie if someone puts a " mark in the form field then php/mysql
recognises that as the end of the data I'm trying to insert.  I tried
urlencode-ing the data before inserting it and urldecode-ing it when reading
it, but it didn't help.

Any suggestions? Surely this must be possible?

Thanks in advance

Ross

--- End Message ---
--- Begin Message ---
Why doesn't the URL encoding work?

>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 7:14 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Hi all,
>
>My problem is that that I have a form that takes user data and 
>inserts it
>into a database.  How can I allow quote marks to be inserted into the
>database?  ie if someone puts a " mark in the form field then php/mysql
>recognises that as the end of the data I'm trying to insert.  I tried
>urlencode-ing the data before inserting it and urldecode-ing 
>it when reading
>it, but it didn't help.
>
>Any suggestions? Surely this must be possible?
>
>Thanks in advance
>
>Ross
>
>
>-- 
>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]
>
--- End Message ---
--- Begin Message ---
Why did God create some people without brains? (See below)

-----Original Message-----
From:   System Administrator 
Sent:   Monday, October 15, 2001 7:44 PM
To:     Ron Woods
Subject:        Undeliverable: RE: [PHP-WIN] Inserting symbols into a mysql
database from PHP

Your message did not reach some or all of the intended recipients.

      Subject:  RE: [PHP-WIN] Inserting symbols into a mysql database from
PHP
      Sent:     10/15/01 7:44 PM

The following recipient(s) could not be reached:

      Ron Woods on 10/15/01 7:44 PM
            The recipient name is not recognized
        The MTS-ID of the original message is: c=NL;a=
;p=LUMC;l=MAIL1-011015174407Z-2031
            MSEXCH:IMS:LUMC:LUMC:BRIDGEHEAD 3550 (000B09AA) 550
<[EMAIL PROTECTED]>... User unknown

-----Original Message-----
From: Svensson, B.A.T. 
Sent: Monday, October 15, 2001 7:44 PM
To: 'Ron Woods'
Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP


IMHO I would like to recommend you to check the recipient list... ;)

>-----Original Message-----
>From: Ron Woods [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 7:40 PM
>To: Svensson, B.A.T. 
>Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Have you looked at the addslashes/stripslashes commands?
>
>Ron Woods/GAI
>Sr. Software Engineer
>303 Clarence Tinker Dr
>Suite 100
>San Antonio, TX 78226
>Tel: 210-927-0544 x104
>Fax: 210-224-2277
>http://www.gai-inc.com
> 
>
>
>-----Original Message-----
>From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 12:25 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Why doesn't the URL encoding work?
>
>>-----Original Message-----
>>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 15, 2001 7:14 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>>
>>
>>Hi all,
>>
>>My problem is that that I have a form that takes user data and 
>>inserts it
>>into a database.  How can I allow quote marks to be inserted into the
>>database?  ie if someone puts a " mark in the form field then 
>php/mysql
>>recognises that as the end of the data I'm trying to insert.  I tried
>>urlencode-ing the data before inserting it and urldecode-ing 
>>it when reading
>>it, but it didn't help.
>>
>>Any suggestions? Surely this must be possible?
>>
>>Thanks in advance
>>
>>Ross
>>
>>
>>-- 
>>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]
>>
>
>-- 
>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]
>
--- End Message ---
--- Begin Message ---
Right, after a bit of experimentation I believe the problem is that I'm
putting it through a form more than once.  Basically I have an html form
which which posts to a php file for verification which will then post the
same data (through invisible fields) to another php file that inserts the
data into database.  Any better ways to do this then?

Cheers

Ross

-----Original Message-----
From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2001 18:25
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP


Why doesn't the URL encoding work?

>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 7:14 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Hi all,
>
>My problem is that that I have a form that takes user data and
>inserts it
>into a database.  How can I allow quote marks to be inserted into the
>database?  ie if someone puts a " mark in the form field then php/mysql
>recognises that as the end of the data I'm trying to insert.  I tried
>urlencode-ing the data before inserting it and urldecode-ing
>it when reading
>it, but it didn't help.
>
>Any suggestions? Surely this must be possible?
>
>Thanks in advance
>
>Ross
>
>
>--
>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]
>

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



--- End Message ---
--- Begin Message ---
It's hard to judge on a better way based only on this information - it
depends on! Basically your design seams to be sound.

However a good design is left to be defined by the developer him self, and
it is controlled by the requirements specification for the intended system.
To answer that question one has first to know the answer to the question
about the goal of the system.

For example lets assume you main goal is to have it up and running as fast
as possible - no matter what. Then any Q&D programming could be said to be a
better ay to do things. 


By this I am not saying that you in fact have done Q&D programming, but
rather I saying: "I have no f__king idea". :)

But to be a little bit more constructive: why don't you also let the script
that validates the data, also take responsibility to submit the data to the
database? This way you wont need to utilize any extra IPC, but could stay
within the scope of the very same script, as an extra bonus this might
reduce coupling and increasing cohesion for you.

But then again.. this does of course depends on your goals and what you done
so far.

Regards,

        Anders


>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 9:02 PM
>To: Svensson, B.A.T. ; [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Right, after a bit of experimentation I believe the problem is that I'm
>putting it through a form more than once.  Basically I have an html form
>which which posts to a php file for verification which will then post the
>same data (through invisible fields) to another php file that inserts the
>data into database.  Any better ways to do this then?
>
>Cheers
>
>Ross
>
>-----Original Message-----
>From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
>Sent: 15 October 2001 18:25
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Why doesn't the URL encoding work?
>
>>-----Original Message-----
>>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, October 15, 2001 7:14 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>>
>>
>>Hi all,
>>
>>My problem is that that I have a form that takes user data and
>>inserts it
>>into a database.  How can I allow quote marks to be inserted into the
>>database?  ie if someone puts a " mark in the form field then 
>php/mysql
>>recognises that as the end of the data I'm trying to insert.  I tried
>>urlencode-ing the data before inserting it and urldecode-ing
>>it when reading
>>it, but it didn't help.
>>
>>Any suggestions? Surely this must be possible?
>>
>>Thanks in advance
>>
>>Ross
>>
>>
>>--
>>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]
>>
>
>--
>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]
>
>
>
>
>-- 
>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]
>
--- End Message ---
--- Begin Message ---
Ross,

A better way to validate your form is to use javascript on the client side, once the 
form is validated (using the clients computer power) you can then send the data to a 
php script via get or post, and have it processed further.

V

-----Original Message-----
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP


Hi all,

My problem is that that I have a form that takes user data and inserts it
into a database.  How can I allow quote marks to be inserted into the
database?  ie if someone puts a " mark in the form field then php/mysql
recognises that as the end of the data I'm trying to insert.  I tried
urlencode-ing the data before inserting it and urldecode-ing it when reading
it, but it didn't help.

Any suggestions? Surely this must be possible?

Thanks in advance

Ross


-- 
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]
--- End Message ---
--- Begin Message ---
function quote($var)
{
        if (is_string($var))
        {
                if (strlen($var)>0)
                {
                        $var="'" . str_replace("\'","\\'",$var) . "'";
                }
                else
                {
                        $var="NULL";
                }
        }
        return $var;
}

$sql=" Select blablabla from whatever where something=" .
quote($variable) . " and so forth";


Regards,



Egil

On Mon, 15 Oct 2001 12:46:31 -0700, Corn Vollney-R7019C wrote:
>Ross,
>
>A better way to validate your form is to use javascript on the
>client side, once the form is validated (using the clients computer
>power) you can then send the data to a php script via get or post,
>and have it processed further.
>
>V
>
>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 6:14 PM To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Hi all,
>
>My problem is that that I have a form that takes user data and
>inserts it into a database.  How can I allow quote marks to be
>inserted into the database?  ie if someone puts a " mark in the form
>field then php/mysql recognises that as the end of the data I'm
>trying to insert.  I tried urlencode-ing the data before inserting
>it and urldecode-ing it when reading it, but it didn't help.
>
>Any suggestions? Surely this must be possible?
>
>Thanks in advance
>
>Ross
>
>
>--
>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: php-list-
>[EMAIL PROTECTED]



-=//
   Egil Helland / IKON AS - MCSE, Internet, Intranet
      mailto:[EMAIL PROTECTED]      http://egil.net
                            //=-


--- End Message ---
--- Begin Message ---
Thanks everyone.  I've just finished a looooooot of playing and I managed to
do it eventually.  I did a very long-winded way using both the stripslashes
and urlencode functions and stored the data in the table as a url encoded
piece of text and decode them whenever the need to be read now.  The problem
was that each time it went through the script it was getting a \ added at
the front.

As for the javascript idea, I thought about that, but I haven't learnt any
javascript yet, but will use that when I get around to learning it.

Cheers for all the input

Ross

-----Original Message-----
From: Egil Helland [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2001 20:59
To: [EMAIL PROTECTED]; '[EMAIL PROTECTED]';
[EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP


function quote($var)
{
        if (is_string($var))
        {
                if (strlen($var)>0)
                {
                        $var="'" . str_replace("\'","\\'",$var) . "'";
                }
                else
                {
                        $var="NULL";
                }
        }
        return $var;
}

$sql=" Select blablabla from whatever where something=" .
quote($variable) . " and so forth";


Regards,



Egil

On Mon, 15 Oct 2001 12:46:31 -0700, Corn Vollney-R7019C wrote:
>Ross,
>
>A better way to validate your form is to use javascript on the
>client side, once the form is validated (using the clients computer
>power) you can then send the data to a php script via get or post,
>and have it processed further.
>
>V
>
>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 6:14 PM To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Hi all,
>
>My problem is that that I have a form that takes user data and
>inserts it into a database.  How can I allow quote marks to be
>inserted into the database?  ie if someone puts a " mark in the form
>field then php/mysql recognises that as the end of the data I'm
>trying to insert.  I tried urlencode-ing the data before inserting
>it and urldecode-ing it when reading it, but it didn't help.
>
>Any suggestions? Surely this must be possible?
>
>Thanks in advance
>
>Ross
>
>
>--
>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: php-list-
>[EMAIL PROTECTED]



-=//
   Egil Helland / IKON AS - MCSE, Internet, Intranet
      mailto:[EMAIL PROTECTED]      http://egil.net
                            //=-



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



--- End Message ---
--- Begin Message ---
Assume the Java code get manipulated, by some reason, at the client side,
what happens then?

>-----Original Message-----
>From: Corn Vollney-R7019C [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 9:47 PM
>To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
>Subject: RE: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Ross,
>
>A better way to validate your form is to use javascript on the 
>client side, once the form is validated (using the clients 
>computer power) you can then send the data to a php script via 
>get or post, and have it processed further.
>
>V
>
>-----Original Message-----
>From: Ross Fleming [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 15, 2001 6:14 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] Inserting symbols into a mysql database from PHP
>
>
>Hi all,
>
>My problem is that that I have a form that takes user data and 
>inserts it
>into a database.  How can I allow quote marks to be inserted into the
>database?  ie if someone puts a " mark in the form field then php/mysql
>recognises that as the end of the data I'm trying to insert.  I tried
>urlencode-ing the data before inserting it and urldecode-ing 
>it when reading
>it, but it didn't help.
>
>Any suggestions? Surely this must be possible?
>
>Thanks in advance
>
>Ross
>
>
>-- 
>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]
>
>-- 
>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]
>
--- End Message ---
--- Begin Message ---
Good Afternoon,

        This is the first time I've had to use exec() in a site I've
written in PHP and I'm having a little trouble getting the syntax right
to do what I need. This is on a W2K Server box with PHP 4.04, IIS 5.0
and MySQL 3.23.

I need to execute a command as if I was in a cmd.exe window. The line I
need to execute looks like this:
#
Splus /Batch c:\Statman\Sscripts\batch$cartid.ssc
#
This is a batch file that invokes Splus 6 runs the script and closes
itself. We've tested it from a command prompt and it works. It does not
return any output. The script performs a comparison in Splus and
generates a gif image of the results in a specified folder which I then
use later in another page. Below is what I used to call it from PHP but
it dies everytime.
#
exec("c:\\cmd.exe>Splus /Batch c:\\Statman\\Sscripts\\batch$cartid.ssc")
      or die("<p>Couldn't execute Splus Script");
print "<p>Running SPlus Scripts to create report.";
#
I believe my syntax is wrong and need a little advise as to how to fix
it.

Any help is appeciated. Thanks. 

--------------------------
Robert Trembath
Internet Technology Manager
e|[EMAIL PROTECTED] 


--- End Message ---
--- Begin Message ---
If you have more details...
I have the same pb, and check php.ini for the line doc_root.. which is
empty..
and i have still the http error 500
...

thanks for any new idea... !

pam



<[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> It happened to me as well.
>
> I fixed it leaving empty the following item on the php.ini file:
>
> ; The root of the PHP pages, used only if nonempty.
> doc_root =
>
> Regards....
> Gabriel Belforti
>
> "Dennis Butler" <[EMAIL PROTECTED]> wrote in message
> 1103_999974443@dennisb">news:1103_999974443@dennisb...
> > Hi,
> > Did you rename php.ini-dist to php.ini and put a copy of it in your
> windows directory?  Also, with Xitami I had to set a new filter to point
the
> web server to php.exe
> > ASP is different because the ASP engine runs as a separate app.  PHP
runs
> from the web server, so you will have to look at PWS to see how to add new
> file
> > extensions.
> >
> > Dennis
> >
> > On Fri, 10 Aug 2001 09:03:39 GMT, [EMAIL PROTECTED] wrote:
> > > Hello Everyone
> > >
> > > I have installed php on my windows computer running with PWS.
> > > PHP files are in c:\php folder.
> > > I have placed test.php file in c:\inetpub\wwwroot folder on which I
hav=
> > > e
> > > given execute permission.
> > > When I call it in internet explorer as http://localhost/test.php  it
gi=
> > > ves
> > > an error as File not found --- Error 500 ?Internal Server Error.
Howeve=
> > > r,
> > > my ASP files are running perfectly well.
> > > What does it mean?
> > > However, when run c:\php\php.exe ?i   it shows some html codes which I
> > > presume it is in order.
> > >
> > > What should I do to run my PHP files.
> > >
> > >
> > > Ajay K. Ratra
> > > Ludhiana (INDIA)
> > > [EMAIL PROTECTED]=
> > >
> > >
> >
> >
>
>


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

My name is Costin. I don not know ifi this is teh right place for my
question, but hope there's someone there to help me, even so.

I want to click on a file, be it a GIF or an EXE or whatever, and want the
browser to ask me to Open it or Save it to disk, like it says to unknown
extensions, it cannot handle. A friend of mine told me this is about Content
Type I am sending to the browser. The browser receives an extension it
cannot represent itself and ask for saving or opening with the registred
program. But how can I do this ?

Thanks
Costin


--- End Message ---
--- Begin Message ---
i got the answer:
Here's the code

<?php

$array[$linkname] = $linkurl;
#$myarray["this is some link text"] = "http://www.this-is-some-page.com/";;
$myarray = array ("Link 1" => "link1url", "Link 2" => "link2url", "Link 3"
=> "link3url");
foreach ($myarray as $linkname => $linkurl)
        {
            #echo "<br>linkname = $linkname<br>linkurl = $linkurl\n";
            echo "<a href=\"$linkurl\">[ $linkname ]</a>";
        }
?>
"Sir D" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi
> I'd like to build a multidimensional array that is loaded with Link_URLs
and
> LinkNames.  I wanna be able to output a list of links using the Link_Names
> and they should all be hyperlinks using Link_URLs as the reference.
>
> Can anyone help with some src..
> Thanx
>
>


--- End Message ---

Reply via email to