php-windows Digest 17 Feb 2003 01:08:22 -0000 Issue 1591

Topics (messages 18553 through 18561):

Re: PHP Scripts can't write to files
        18553 by: Kyle Williamson
        18556 by: Greg
        18557 by: Paul Dymecki
        18561 by: Greg

fopen
        18554 by: Bobo Wieland
        18555 by: Kyle Williamson

Re: PHP - "No input file specified."
        18558 by: Craig Smith
        18559 by: Craig Smith
        18560 by: Craig Smith

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 ---
You need the files (or dirs) to have write/modify permissions for the
webserver user.


==

Kind Regards,

Kyle Williamson
Solent Educational Limited

Tel: (023) 80 843189 Fax: (023) 80 848715
http://www.solented.co.uk/

-----Original Message-----
From: Greg [mailto:[EMAIL PROTECTED]]
Sent: 16 February 2003 08:18
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP Scripts can't write to files


I'm using windows 2000 professional as my webserver, i have apache 2 and the
lastest version of php running....  now, when i access my webpage my
phpscripts are supposed to write to a couple files and create files when
needed, but they don't.  Are there any type of permissions i have to setup
in windows??

-Greg

pLANned Chaos

--- End Message ---
--- Begin Message ---
All of the files/folders had read/write permissions for Everyone, every user
on the system...  The scripts just won't write...


"Kyle Williamson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You need the files (or dirs) to have write/modify permissions for the
> webserver user.
>
>
> ==
>
> Kind Regards,
>
> Kyle Williamson
> Solent Educational Limited
>
> Tel: (023) 80 843189 Fax: (023) 80 848715
> http://www.solented.co.uk/
>
> -----Original Message-----
> From: Greg [mailto:[EMAIL PROTECTED]]
> Sent: 16 February 2003 08:18
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP Scripts can't write to files
>
>
> I'm using windows 2000 professional as my webserver, i have apache 2 and
the
> lastest version of php running....  now, when i access my webpage my
> phpscripts are supposed to write to a couple files and create files when
> needed, but they don't.  Are there any type of permissions i have to setup
> in windows??
>
> -Greg
>
> pLANned Chaos
>


--- End Message ---
--- Begin Message ---
How are you writing to the filesystem?
Paul


From: "Greg" <[EMAIL PROTECTED]>
Reply-To: "Greg" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP Scripts can't write to files
Date: Sun, 16 Feb 2003 10:58:33 -0600

All of the files/folders had read/write permissions for Everyone, every user
on the system... The scripts just won't write...


"Kyle Williamson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You need the files (or dirs) to have write/modify permissions for the
> webserver user.
>
>
> ==
>
> Kind Regards,
>
> Kyle Williamson
> Solent Educational Limited
>
> Tel: (023) 80 843189 Fax: (023) 80 848715
> http://www.solented.co.uk/
>
> -----Original Message-----
> From: Greg [mailto:[EMAIL PROTECTED]]
> Sent: 16 February 2003 08:18
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP Scripts can't write to files
>
>
> I'm using windows 2000 professional as my webserver, i have apache 2 and
the
> lastest version of php running.... now, when i access my webpage my
> phpscripts are supposed to write to a couple files and create files when
> needed, but they don't. Are there any type of permissions i have to setup
> in windows??
>
> -Greg
>
> pLANned Chaos
>



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

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

--- End Message ---
--- Begin Message ---
I'm using the fwrite function...


"Paul Dymecki" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How are you writing to the filesystem?
> Paul
>
>
> >From: "Greg" <[EMAIL PROTECTED]>
> >Reply-To: "Greg" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: [PHP-WIN] PHP Scripts can't write to files
> >Date: Sun, 16 Feb 2003 10:58:33 -0600
> >
> >All of the files/folders had read/write permissions for Everyone, every
> >user
> >on the system...  The scripts just won't write...
> >
> >
> >"Kyle Williamson" <[EMAIL PROTECTED]> wrote in message
> >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > You need the files (or dirs) to have write/modify permissions for the
> > > webserver user.
> > >
> > >
> > > ==
> > >
> > > Kind Regards,
> > >
> > > Kyle Williamson
> > > Solent Educational Limited
> > >
> > > Tel: (023) 80 843189 Fax: (023) 80 848715
> > > http://www.solented.co.uk/
> > >
> > > -----Original Message-----
> > > From: Greg [mailto:[EMAIL PROTECTED]]
> > > Sent: 16 February 2003 08:18
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] PHP Scripts can't write to files
> > >
> > >
> > > I'm using windows 2000 professional as my webserver, i have apache 2
and
> >the
> > > lastest version of php running....  now, when i access my webpage my
> > > phpscripts are supposed to write to a couple files and create files
when
> > > needed, but they don't.  Are there any type of permissions i have to
> >setup
> > > in windows??
> > >
> > > -Greg
> > >
> > > pLANned Chaos
> > >
> >
> >
> >
> >--
> >PHP Windows Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>


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

This fopen-command is working on my local machine from my local server, but
the same code at my web hosts server produces this:
-----------------------
Warning:
fopen("http://www.someplace.xx/showvers.jsp?visaverser=2+Mack+1%3A2";, "r") -
No such file or directory...
-----------------------

Anyone knows why? Could it be a sequrity issue or fopen looking in the
current directory or something?! I need to get this solved quick!

thanks!


.bobo



--- End Message ---
--- Begin Message ---
In php.ini:

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

==

Kind Regards,

Kyle Williamson
Solent Educational Limited

Tel: (023) 80 843189 Fax: (023) 80 848715
http://www.solented.co.uk/

-----Original Message-----
From: Bobo Wieland [mailto:[EMAIL PROTECTED]]
Sent: 16 February 2003 16:07
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] fopen


Hi...

This fopen-command is working on my local machine from my local server, but
the same code at my web hosts server produces this:
-----------------------
Warning:
fopen("http://www.someplace.xx/showvers.jsp?visaverser=2+Mack+1%3A2";, "r") -
No such file or directory...
-----------------------

Anyone knows why? Could it be a sequrity issue or fopen looking in the
current directory or something?! I need to get this solved quick!

thanks!


.bobo




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

--- End Message ---
--- Begin Message ---
Got this working.  Not sure as all I did was simplify the selection to pull
out all records which worked.  Then added back the original parts to for
selecting "horses". It works though I have not spotted the syntax error yet.




"Craig Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When trying to use php script to access records from mysql table getting
> following error
>
> "No input file specified."
>
> I am using example php scripts and datatables as defined in the PHP &
MySQL
> for Dummies Book.
>
> The installation is on a standalone PC and comprises the following
>
> Windows98
> Apache 1.3.23
> PHP 4.3.0
> MySQL 3.23
>
> I know PHP is working through apache as I have used a sample test page
which
> shows the configuration of PHP as installed.  I also believe MySQL is
> working as I have been able to apply the same selection SQL via MySQLadmin
> as contained in the PHP script I am using to extract records.  Below is
the
> php script I am using:
>
> *********************************************************************
>
> <html>
> <head><title>Pet Catalog</title></head>
> <body>
> <?php
>   $user="root";
>   $host="localhost";
>   $password="password";
>   $database = "PetCatalog";
>   $connection = mysql_connect($host,$user,$password)
>        or die ("couldn't connect to server");
>   $db = mysql_select_db($database,$connection)
>        or die ("Couldn't select database");
>   $pettype = "horse";  //horse was previously typed in a form by user
>   $query = "SELECT * FROM Pet WHERE petType='$pettype'";
>   $result = mysql_query($query)
>        or die ("Couldn't execute query.");
>   $nrows = mysql_num_rows($result);
>
>   /* Display results in a table */
>   echo "<h1>Horses</h1>";
>   echo "<table cellspacing='15'>";
>   echo "<tr><td colspan='4'><hr></td></tr>";
>   for ($i=0;$i<$nrows;$i++)
>   {
>      $n = $i + 1;    //add 1 so that numbers don't start with 0
>      $row = mysql_fetch_array($result);
>      extract($row);
>      $f_price = number_format($price,2);
>       echo "<tr>\n
>            <td>$n.</td>\n
>            <td>$petID</td>\n
>            <td>$petDescription</td>\n
>            <td align='right'>\$$f_price</td>\n
>            </tr>\n";
>      echo "<tr><td colspan='4'><hr></td></tr>\n";
>   }
>   echo "</table>\n";
> ?>
> </body>
> </html>
>
> ********************************************************************
>
> I think that perhaps the connections are not being made as a simple test I
> have deliberately changed the host, database and password to force an
error
> and this does not happen.
>
> Any help would be appreciated.
>
> Regards
>
> Craig
>
>


--- End Message ---
--- Begin Message ---
Think I have figured this out.  It is the size of the filename.  Originally
the file name was "petDescripFor.php". When I save the file as "ztest03.php"
it worked.  Weird but true.

"Craig Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Got this working.  Not sure as all I did was simplify the selection to
pull
> out all records which worked.  Then added back the original parts to for
> selecting "horses". It works though I have not spotted the syntax error
yet.
>
>
>
>
> "Craig Smith" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > When trying to use php script to access records from mysql table getting
> > following error
> >
> > "No input file specified."
> >
> > I am using example php scripts and datatables as defined in the PHP &
> MySQL
> > for Dummies Book.
> >
> > The installation is on a standalone PC and comprises the following
> >
> > Windows98
> > Apache 1.3.23
> > PHP 4.3.0
> > MySQL 3.23
> >
> > I know PHP is working through apache as I have used a sample test page
> which
> > shows the configuration of PHP as installed.  I also believe MySQL is
> > working as I have been able to apply the same selection SQL via
MySQLadmin
> > as contained in the PHP script I am using to extract records.  Below is
> the
> > php script I am using:
> >
> > *********************************************************************
> >
> > <html>
> > <head><title>Pet Catalog</title></head>
> > <body>
> > <?php
> >   $user="root";
> >   $host="localhost";
> >   $password="password";
> >   $database = "PetCatalog";
> >   $connection = mysql_connect($host,$user,$password)
> >        or die ("couldn't connect to server");
> >   $db = mysql_select_db($database,$connection)
> >        or die ("Couldn't select database");
> >   $pettype = "horse";  //horse was previously typed in a form by user
> >   $query = "SELECT * FROM Pet WHERE petType='$pettype'";
> >   $result = mysql_query($query)
> >        or die ("Couldn't execute query.");
> >   $nrows = mysql_num_rows($result);
> >
> >   /* Display results in a table */
> >   echo "<h1>Horses</h1>";
> >   echo "<table cellspacing='15'>";
> >   echo "<tr><td colspan='4'><hr></td></tr>";
> >   for ($i=0;$i<$nrows;$i++)
> >   {
> >      $n = $i + 1;    //add 1 so that numbers don't start with 0
> >      $row = mysql_fetch_array($result);
> >      extract($row);
> >      $f_price = number_format($price,2);
> >       echo "<tr>\n
> >            <td>$n.</td>\n
> >            <td>$petID</td>\n
> >            <td>$petDescription</td>\n
> >            <td align='right'>\$$f_price</td>\n
> >            </tr>\n";
> >      echo "<tr><td colspan='4'><hr></td></tr>\n";
> >   }
> >   echo "</table>\n";
> > ?>
> > </body>
> > </html>
> >
> > ********************************************************************
> >
> > I think that perhaps the connections are not being made as a simple test
I
> > have deliberately changed the host, database and password to force an
> error
> > and this does not happen.
> >
> > Any help would be appreciated.
> >
> > Regards
> >
> > Craig
> >
> >
>
>


--- End Message ---
--- Begin Message ---
If anybody reads this then they will think I am mad.  I was mis typing the
filename.

What a numpty


"Craig Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Got this working.  Not sure as all I did was simplify the selection to
pull
> out all records which worked.  Then added back the original parts to for
> selecting "horses". It works though I have not spotted the syntax error
yet.
>
>
>
>
> "Craig Smith" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > When trying to use php script to access records from mysql table getting
> > following error
> >
> > "No input file specified."
> >
> > I am using example php scripts and datatables as defined in the PHP &
> MySQL
> > for Dummies Book.
> >
> > The installation is on a standalone PC and comprises the following
> >
> > Windows98
> > Apache 1.3.23
> > PHP 4.3.0
> > MySQL 3.23
> >
> > I know PHP is working through apache as I have used a sample test page
> which
> > shows the configuration of PHP as installed.  I also believe MySQL is
> > working as I have been able to apply the same selection SQL via
MySQLadmin
> > as contained in the PHP script I am using to extract records.  Below is
> the
> > php script I am using:
> >
> > *********************************************************************
> >
> > <html>
> > <head><title>Pet Catalog</title></head>
> > <body>
> > <?php
> >   $user="root";
> >   $host="localhost";
> >   $password="password";
> >   $database = "PetCatalog";
> >   $connection = mysql_connect($host,$user,$password)
> >        or die ("couldn't connect to server");
> >   $db = mysql_select_db($database,$connection)
> >        or die ("Couldn't select database");
> >   $pettype = "horse";  //horse was previously typed in a form by user
> >   $query = "SELECT * FROM Pet WHERE petType='$pettype'";
> >   $result = mysql_query($query)
> >        or die ("Couldn't execute query.");
> >   $nrows = mysql_num_rows($result);
> >
> >   /* Display results in a table */
> >   echo "<h1>Horses</h1>";
> >   echo "<table cellspacing='15'>";
> >   echo "<tr><td colspan='4'><hr></td></tr>";
> >   for ($i=0;$i<$nrows;$i++)
> >   {
> >      $n = $i + 1;    //add 1 so that numbers don't start with 0
> >      $row = mysql_fetch_array($result);
> >      extract($row);
> >      $f_price = number_format($price,2);
> >       echo "<tr>\n
> >            <td>$n.</td>\n
> >            <td>$petID</td>\n
> >            <td>$petDescription</td>\n
> >            <td align='right'>\$$f_price</td>\n
> >            </tr>\n";
> >      echo "<tr><td colspan='4'><hr></td></tr>\n";
> >   }
> >   echo "</table>\n";
> > ?>
> > </body>
> > </html>
> >
> > ********************************************************************
> >
> > I think that perhaps the connections are not being made as a simple test
I
> > have deliberately changed the host, database and password to force an
> error
> > and this does not happen.
> >
> > Any help would be appreciated.
> >
> > Regards
> >
> > Craig
> >
> >
>
>


--- End Message ---

Reply via email to