php-windows Digest 4 Dec 2002 20:04:13 -0000 Issue 1470

Topics (messages 17252 through 17269):

Session Variables
        17252 by: Jed R. Brubaker
        17253 by: Zaid Al-Hamdoon

Problems with ImageCreateFromPNG()
        17254 by: Hermann Otteneder

Re: data format..
        17255 by: Sandeep Murphy
        17257 by: Cam Dunstan
        17259 by: Sandeep Murphy

How to modify auto_prepend_file dynamically
        17256 by: Franco Pozzer

user system using sessions and cookies?
        17258 by: Kieran Hall
        17260 by: Stephen Edmonds
        17261 by: Alexander Kuznetsov

Re: checking if is FORM is POSTED
        17262 by: Omar
        17265 by: André Pasold

trouble with update from php 3 to php 4.2.3
        17263 by: Omar
        17264 by: Stephen Edmonds

ini function like ini_set and ini_alter
        17266 by: Franco Pozzer

Windows 2000, XP and ME difference
        17267 by: Ray, James A
        17268 by: DL Neil

Fast Web server
        17269 by: Radovan Radic

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 am having a problem with a simple script that uses session variables. It
is a user authentication script and none of my users have had any problems
with the exception of one individual. The session variables simply don't
carry over. I am half convinced that it is user error, but have any of you
run across a problem like this? He is running MSN8 on WXP.

Thanks!


--- End Message ---
--- Begin Message --- in the php.ini make sure the global register=on. PHP 4+ this is set to off by default.






From: "Jed R. Brubaker" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Variables
Date: Wed, 4 Dec 2002 00:15:19 -0700

I am having a problem with a simple script that uses session variables. It
is a user authentication script and none of my users have had any problems
with the exception of one individual. The session variables simply don't
carry over. I am half convinced that it is user error, but have any of you
run across a problem like this? He is running MSN8 on WXP.

Thanks!



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

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus

--- End Message ---
--- Begin Message ---
hi,
i try to use a simple counter-script wich is useing the
ImageCreateFromPNG() - function. this work with php4.2.3 as a module in
apache2 very fine. but if i try the same script on the website with the
configurations of my provider it is not working! my provider use the same
versions but with cgi-configuration. knows someone such strage problem?!

please help me if you can...

lg, hermann


--- End Message ---
--- Begin Message ---
hi guys,

thnx for the info.. As Leon pointed out, am wondering what would happen to the blobs 
?? How do i send/convert them to another db format??

Some of the clients r pretty stubborn and wud want to continue with whatever db they 
hv.. dbase, excel or whatever..

I personally hv never worked with dbase so dont hv much to say about it. will keep 
working on this and get bak to u guys if i run across more problems.. meanwhile, if 
anyone has more ideas/suggestions, pl do mail me..

thnx again,
sands

-----Original Message-----
From: Leon [mailto:[EMAIL PROTECTED]]
Sent: quarta-feira, 4 de Dezembro de 2002 7:02
To: Cam Dunstan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] data format..


Hi

I have only one major problem with the solution below and that is as follows:

MySQL does not follow SQL standards ie: You could have been using data types
that would not import to a PgSQL server and there is little to nothing you can
do about that!!!

Sorry to be the one to tell you this, but I fell in the same trap long ago

Cheers

Cam Dunstan wrote:

> sands,
> comma delimited text (or tab delimited) will do for all of them, unless the
> dbase app does not have import facility, in which case you could structure
> up the data into genereic dbase format yourself, its a fairly simple format,
> a header with info about fieldnames, sizes and types, followed by fixed
> length records thereafter.  Stick with an old format, such as dBase3 or 4
> formats with no index or mdx files associated with same.  dbase was the best
> thing since sliced bread for years, but it is a little dated these days,
> maybe you can charge em more by offering to upgrade them to MySQL / PHP
> intranet!!
>
> Cheers CD
>
> ----- Original Message -----
> From: "DL Neil" <[EMAIL PROTECTED]>
> To: "Sandeep Murphy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, December 04, 2002 3:36 AM
> Subject: Re: [PHP-WIN] data format..
>
> > Hi Sands,
> >
> > I have a PHP - MySQL site on one hand and various types of clients .. mean
> > to say, I hv clients who need the data in the MySQL db supplied to them in
> > MS Access, Excel, Dbase formats such that they can integrate the data
> > directly into their existing type of database.
> >
> > for Excel, I can probably create a csv file... any ideas for the other??
> >
> > any suggestions as to where I can start & how !!??
> >
> >
> > =start by searching the archives of this discussion list.
> > =dn
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
Leon Jansen van Nieuwenhuizen
Personal Computing Services
Information & Communication Technology Services
University of Cape Town
Email: [EMAIL PROTECTED]
__________________________
__________________________



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

--- End Message ---
--- Begin Message ---
Sands,
Whilst I take Leon`s point about running into conversion problems, data is
data! - you may not find exact equivalents to field types, autoincrement
presents its own head scratchers and so on.  But what can be ripped out of
one format can generally be stuffed into another.  Blobs certainly rule out
earlier dbase formats, but dBase 4 has them (up to certain size limits) or
they can be stored as separate files with just the file name in a cell or
text field (requiring your customers to change things at their end also
perhaps - this even works with spreadsheets).  The so called boolean or true
false field is just a byte at the end of the day, 0 or 1, datetime or
datastamp formats are easy to change from one to another.  I`m not saying
its easy, and I`m NOT volunteering to have a go, but I have done it many
times without hitting brick walls.  Sometimes a goodly amount of programming
effort is required, but unless you are trying to store a 5 megabyte blob in
a 1980 model dBase 3 file or a spreadsheet format or some such other
impossibility I cannot see exactly what else would stop you cold.  Tell me
about the blob fields for instance, how big are the blobs, what vintage of
dbase file are they to go in.  Are the blobs binary or text? (like a dbase
MEMO field) .  Will your client allow you to frig with his tables or
spreadsheets just a little bit, stubborn as some of them are?

The devil is in the detail.  But before you get too involved in this Sands,
we may be getting a bit "off topic" here,  this PHP-Windows list may not be
the right arena methinks.





----- Original Message -----
From: "Sandeep Murphy" <[EMAIL PROTECTED]>
To: "Leon" <[EMAIL PROTECTED]>; "Cam Dunstan" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 10:45 PM
Subject: RE: [PHP-WIN] data format..


> hi guys,
>
> thnx for the info.. As Leon pointed out, am wondering what would happen to
the blobs ?? How do i send/convert them to another db format??
>
> Some of the clients r pretty stubborn and wud want to continue with
whatever db they hv.. dbase, excel or whatever..
>
> I personally hv never worked with dbase so dont hv much to say about it.
will keep working on this and get bak to u guys if i run across more
problems.. meanwhile, if anyone has more ideas/suggestions, pl do mail me..
>
> thnx again,
> sands
>
> -----Original Message-----
> From: Leon [mailto:[EMAIL PROTECTED]]
> Sent: quarta-feira, 4 de Dezembro de 2002 7:02
> To: Cam Dunstan
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] data format..
>
>
> Hi
>
> I have only one major problem with the solution below and that is as
follows:
>
> MySQL does not follow SQL standards ie: You could have been using data
types
> that would not import to a PgSQL server and there is little to nothing you
can
> do about that!!!
>
> Sorry to be the one to tell you this, but I fell in the same trap long ago
>
> Cheers
>
> Cam Dunstan wrote:
>
> > sands,
> > comma delimited text (or tab delimited) will do for all of them, unless
the
> > dbase app does not have import facility, in which case you could
structure
> > up the data into genereic dbase format yourself, its a fairly simple
format,
> > a header with info about fieldnames, sizes and types, followed by fixed
> > length records thereafter.  Stick with an old format, such as dBase3 or
4
> > formats with no index or mdx files associated with same.  dbase was the
best
> > thing since sliced bread for years, but it is a little dated these days,
> > maybe you can charge em more by offering to upgrade them to MySQL / PHP
> > intranet!!
> >
> > Cheers CD
> >
> > ----- Original Message -----
> > From: "DL Neil" <[EMAIL PROTECTED]>
> > To: "Sandeep Murphy" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > Sent: Wednesday, December 04, 2002 3:36 AM
> > Subject: Re: [PHP-WIN] data format..
> >
> > > Hi Sands,
> > >
> > > I have a PHP - MySQL site on one hand and various types of clients ..
mean
> > > to say, I hv clients who need the data in the MySQL db supplied to
them in
> > > MS Access, Excel, Dbase formats such that they can integrate the data
> > > directly into their existing type of database.
> > >
> > > for Excel, I can probably create a csv file... any ideas for the
other??
> > >
> > > any suggestions as to where I can start & how !!??
> > >
> > >
> > > =start by searching the archives of this discussion list.
> > > =dn
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Leon Jansen van Nieuwenhuizen
> Personal Computing Services
> Information & Communication Technology Services
> University of Cape Town
> Email: [EMAIL PROTECTED]
> __________________________
> __________________________
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

I guess u r quite right about this stuff getting a bit "off topic"! :) this is my last 
mail regarding this topic..

if anyone has more ideas to share pl mail me off the list @ [EMAIL PROTECTED]

thnx a bunch,

cheers, sands

-----Original Message-----
From: Cam Dunstan [mailto:[EMAIL PROTECTED]]
Sent: quarta-feira, 4 de Dezembro de 2002 13:17
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] data format..


Sands,
Whilst I take Leon`s point about running into conversion problems, data is
data! - you may not find exact equivalents to field types, autoincrement
presents its own head scratchers and so on.  But what can be ripped out of
one format can generally be stuffed into another.  Blobs certainly rule out
earlier dbase formats, but dBase 4 has them (up to certain size limits) or
they can be stored as separate files with just the file name in a cell or
text field (requiring your customers to change things at their end also
perhaps - this even works with spreadsheets).  The so called boolean or true
false field is just a byte at the end of the day, 0 or 1, datetime or
datastamp formats are easy to change from one to another.  I`m not saying
its easy, and I`m NOT volunteering to have a go, but I have done it many
times without hitting brick walls.  Sometimes a goodly amount of programming
effort is required, but unless you are trying to store a 5 megabyte blob in
a 1980 model dBase 3 file or a spreadsheet format or some such other
impossibility I cannot see exactly what else would stop you cold.  Tell me
about the blob fields for instance, how big are the blobs, what vintage of
dbase file are they to go in.  Are the blobs binary or text? (like a dbase
MEMO field) .  Will your client allow you to frig with his tables or
spreadsheets just a little bit, stubborn as some of them are?

The devil is in the detail.  But before you get too involved in this Sands,
we may be getting a bit "off topic" here,  this PHP-Windows list may not be
the right arena methinks.





----- Original Message -----
From: "Sandeep Murphy" <[EMAIL PROTECTED]>
To: "Leon" <[EMAIL PROTECTED]>; "Cam Dunstan" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 10:45 PM
Subject: RE: [PHP-WIN] data format..


> hi guys,
>
> thnx for the info.. As Leon pointed out, am wondering what would happen to
the blobs ?? How do i send/convert them to another db format??
>
> Some of the clients r pretty stubborn and wud want to continue with
whatever db they hv.. dbase, excel or whatever..
>
> I personally hv never worked with dbase so dont hv much to say about it.
will keep working on this and get bak to u guys if i run across more
problems.. meanwhile, if anyone has more ideas/suggestions, pl do mail me..
>
> thnx again,
> sands
>
> -----Original Message-----
> From: Leon [mailto:[EMAIL PROTECTED]]
> Sent: quarta-feira, 4 de Dezembro de 2002 7:02
> To: Cam Dunstan
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] data format..
>
>
> Hi
>
> I have only one major problem with the solution below and that is as
follows:
>
> MySQL does not follow SQL standards ie: You could have been using data
types
> that would not import to a PgSQL server and there is little to nothing you
can
> do about that!!!
>
> Sorry to be the one to tell you this, but I fell in the same trap long ago
>
> Cheers
>
> Cam Dunstan wrote:
>
> > sands,
> > comma delimited text (or tab delimited) will do for all of them, unless
the
> > dbase app does not have import facility, in which case you could
structure
> > up the data into genereic dbase format yourself, its a fairly simple
format,
> > a header with info about fieldnames, sizes and types, followed by fixed
> > length records thereafter.  Stick with an old format, such as dBase3 or
4
> > formats with no index or mdx files associated with same.  dbase was the
best
> > thing since sliced bread for years, but it is a little dated these days,
> > maybe you can charge em more by offering to upgrade them to MySQL / PHP
> > intranet!!
> >
> > Cheers CD
> >
> > ----- Original Message -----
> > From: "DL Neil" <[EMAIL PROTECTED]>
> > To: "Sandeep Murphy" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
> > Sent: Wednesday, December 04, 2002 3:36 AM
> > Subject: Re: [PHP-WIN] data format..
> >
> > > Hi Sands,
> > >
> > > I have a PHP - MySQL site on one hand and various types of clients ..
mean
> > > to say, I hv clients who need the data in the MySQL db supplied to
them in
> > > MS Access, Excel, Dbase formats such that they can integrate the data
> > > directly into their existing type of database.
> > >
> > > for Excel, I can probably create a csv file... any ideas for the
other??
> > >
> > > any suggestions as to where I can start & how !!??
> > >
> > >
> > > =start by searching the archives of this discussion list.
> > > =dn
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Leon Jansen van Nieuwenhuizen
> Personal Computing Services
> Information & Communication Technology Services
> University of Cape Town
> Email: [EMAIL PROTECTED]
> __________________________
> __________________________
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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

--- End Message ---
--- Begin Message ---
Thanks for all for the response.

My application work in the Win32  system with Apache web_server and have
php.ini directives configurated like
auto_prepend_file=C:\OPENFEDRA\apache\htdocs\systemvariables.php

My PHP script do not have any include_once() function because the directives of
the PHP include the script systemVariables automatically in the code.

The question it is:

Instead  to have auto_prepend_file configurated and  to  use include_once() in
any script PHP,  It is possible to have any ather solutions????

Can anyone have same code sample for me to resolve my problems?

Thanks for all. ciao Franco.

--- End Message ---
--- Begin Message ---
Hi,
 
I am coding a community site and am, (once again) experimenting with a
user system.
 
Currently I have a user class that checks the user's username and
password with the database and returns them to a login script (with the
password md5 encoded).  The login script then registers these (password
and username) variables using session_register().
 
My aim is to keep the user logged in indefinitely, until they logout;
using the appropriate function.
 
During my experimentation, I have tried session_set_cookie_params() - to
no avail.  I then reverted to saving the username, password and session
id in a cookie and then checking for these, like so:
 
<?PHP
session_start();
//get all the extra files needed for every page.
include('dbinfo.inc');
include('database.class.php');
include('user.class.php');
//login check
if(IsSet($_COOKIE['cookie_username']) &&
IsSet($_COOKIE['cookie_password'])){
 
 $localuser = new userclass();
 $localuser->setup($dbserver,$dbuser,$dbpass,$dbname);
 $localuser->connect();
 $username = $_COOKIE['cookie_username'];
 $password = $_COOKIE['cookie_password'];
 $localuser->check_user($username, $password);// check function
 
 if($localuser->check){// returned true from the user class if username
and md5 hash match with those in the database
  $s_id = $_COOKIE['cookie_session'];
  session_id($s_id);
  session_register('username');
  session_register('password');
  $login = true;
 }
 else{
  $login = false;
 }
}
else{
 $login = false;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html>
<head>
          <title>test login</title>
</head>
 
<body>
<?PHP
$username = $_SESSION['username'];
$password = $_SESSION['password'];
echo"<b>Login</b> = $login <br>";
echo"<b>Username:</b> $username <br>";
echo"<b>Password:</b> $password <br>";
echo"<b>Session ID:</b>";
print(session_id());
?>
 
The above code gives the following:
 
Login = 1
Username: 
Password: 
Session ID:95a607dc349f91b2a08c8533538b8694
 
Clearly, the login returns true and the session id has been used, but
the password and username have not been registered.  I have been playing
around with this for a while now, and am a little stuck.
 
Any help would be brilliant.
 
Thanks in advance.
 
********************************************************************
Kieran Hall
 
 
--- End Message ---
--- Begin Message ---
My guess is that the session ID is changing. Try adding the session ID to
the end of the URL and see if the output matches. If not, you know where the
problem lies.

e.g. header( "Location: url/page.php?SessionIDViaQuery=".session_id() );

Okay, so its harder on your page as your login script is on the same page as
your output. In my system the form directs to the login page, which then
redirects the user onwards depending on the output.

login.php
Form Submits to
members/newuserlogin.php
IF Successful Login
    redirects to
    members/index.php
IF Unsuccessful Login
    redirects to
    login.php?error=X
                   where X is a pre-defined error number (e.g. 1 = bad
username/pass, 2 = suspended)

Good luck
Stephen

----- Original Message -----
From: "Kieran Hall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 3:12 PM
Subject: [PHP-WIN] user system using sessions and cookies?


> Hi,
>
> I am coding a community site and am, (once again) experimenting with a
> user system.
>
> Currently I have a user class that checks the user's username and
> password with the database and returns them to a login script (with the
> password md5 encoded).  The login script then registers these (password
> and username) variables using session_register().
>
> My aim is to keep the user logged in indefinitely, until they logout;
> using the appropriate function.
>
> During my experimentation, I have tried session_set_cookie_params() - to
> no avail.  I then reverted to saving the username, password and session
> id in a cookie and then checking for these, like so:
>
> <?PHP
> session_start();
> //get all the extra files needed for every page.
> include('dbinfo.inc');
> include('database.class.php');
> include('user.class.php');
> //login check
> if(IsSet($_COOKIE['cookie_username']) &&
> IsSet($_COOKIE['cookie_password'])){
>
>  $localuser = new userclass();
>  $localuser->setup($dbserver,$dbuser,$dbpass,$dbname);
>  $localuser->connect();
>  $username = $_COOKIE['cookie_username'];
>  $password = $_COOKIE['cookie_password'];
>  $localuser->check_user($username, $password);// check function
>
>  if($localuser->check){// returned true from the user class if username
> and md5 hash match with those in the database
>   $s_id = $_COOKIE['cookie_session'];
>   session_id($s_id);
>   session_register('username');
>   session_register('password');
>   $login = true;
>  }
>  else{
>   $login = false;
>  }
> }
> else{
>  $login = false;
> }
> ?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
> <html>
> <head>
>           <title>test login</title>
> </head>
>
> <body>
> <?PHP
> $username = $_SESSION['username'];
> $password = $_SESSION['password'];
> echo"<b>Login</b> = $login <br>";
> echo"<b>Username:</b> $username <br>";
> echo"<b>Password:</b> $password <br>";
> echo"<b>Session ID:</b>";
> print(session_id());
> ?>
>
> The above code gives the following:
>
> Login = 1
> Username:
> Password:
> Session ID:95a607dc349f91b2a08c8533538b8694
>
> Clearly, the login returns true and the session id has been used, but
> the password and username have not been registered.  I have been playing
> around with this for a while now, and am a little stuck.
>
> Any help would be brilliant.
>
> Thanks in advance.
>
> ********************************************************************
> Kieran Hall
>
>
>


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

Wednesday, December 04, 2002, 5:12:07 PM, you wrote:

KH> <?PHP
KH> session_start();

[...]

KH>   session_register('username');
KH>   session_register('password');

      header("Location: ".$_SERVER['PHP_SELF']);
      exit;

You forgot these lines ^^^^^^^^^^^^.
Now you can test it something like that

<?php

if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) {

    session_register('username');
    session_register('password');
    header("Location: ".$_SERVER['PHP_SELF']);
    exit;

} else {

    echo $_SESSION['password']." - ".$_SESSION['username'];

}


?>

-- 
Best regards,
Alexander Kuznetsov


--- End Message ---
--- Begin Message ---
You can do it by checking if the submit button was pressed:
if (isset($name_of_the_submit_button)) {
// the button was pressed
}
Maybe you can include checking a hidden field.

"Matt Babineau" <[EMAIL PROTECTED]> escribió en el mensaje
000d01c29af0$77e6d400$0210a8c0@webdevx">news:000d01c29af0$77e6d400$0210a8c0@webdevx...
> What  is the best way to check if a form is posted so  people can't post
> to my forms? I want to make sure that the post is coming from the right
> page and that it is indeed a post operation.
>
> Thx,
> Matt
>


--- End Message ---
--- Begin Message ---
The variable $HTTP_REFERER will tell you the origin of the request.

So you can check it with:

if (EREG('xxx.php$',$HTTP_REFERER)) { //only look for the name file
    //process data
}

------ or -------

if ($HTTP_REFERER=='www.yyy.com/path/xxx.php') { //look for the entire url
    //process data
}

*** where xxx.php is the url of the form source

Hope it can help you any way.


"Matt Babineau" <[EMAIL PROTECTED]> escreveu na mensagem
000d01c29af0$77e6d400$0210a8c0@webdevx">news:000d01c29af0$77e6d400$0210a8c0@webdevx...
> What  is the best way to check if a form is posted so  people can't post
> to my forms? I want to make sure that the post is coming from the right
> page and that it is indeed a post operation.
>
> Thx,
> Matt
>


--- End Message ---
--- Begin Message ---
I updated php from version 3 to 4.2.3 on a win NT 4 server (with iss 4).
Everything went ok, but the include() function.
I have problems when including files.
I tried to specify a directory in the php.ini file but it still didn't work.
This is how i have the include line:
include ('file.inc');

I copied the file to the folder where my php file is, to the directory where
originally was (x:\path\includes) and it doesn't work.
I really need some help.
Thanx.


--- End Message ---
--- Begin Message ---
include takes the base directory to be the same directory the script is in.

e.g.
Running the file c:\my_web\Stephen\index.php
include( "hello.php" )
this includes the file c:\my_web\Stephen\hello.php

Hope this helps

Stephen

----- Original Message -----
From: "Omar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 3:34 PM
Subject: [PHP-WIN] trouble with update from php 3 to php 4.2.3


> I updated php from version 3 to 4.2.3 on a win NT 4 server (with iss 4).
> Everything went ok, but the include() function.
> I have problems when including files.
> I tried to specify a directory in the php.ini file but it still didn't
work.
> This is how i have the include line:
> include ('file.inc');
>
> I copied the file to the folder where my php file is, to the directory
where
> originally was (x:\path\includes) and it doesn't work.
> I really need some help.
> Thanx.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Thanks for all.

My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0.

I have the php.ini auto_prepend_file  like this:
auto_prepend_file="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\" 

All work fine with this configuration of the php.ini.

For same reason I must to do not configure php.ini and the directives
auto_prepend_file must be null like auto_prepend_file =.

I have discovered ini_alter function but I do not be able to work in my
application.

My script it is like:
<?
$path="C:\\OPENFEDRA\\Apache\\htdocs\\fedra\\sv\\cfg\\";

echo"<br>$path<br>";

if(ini_alter('auto_prepend_file', $path.'systemVariables.php'))
 echo "<br>ini_alter success<br>";
else
 echo "<br>ini_alter failed<br>";

but do not work.

If I change the ini_alter with include() it work all fine but I do not
want to use include or require function.

have sameone an idea about this code do not work??

Thanks for all and if it is possible reply to me also to e-mail follow.

[EMAIL PROTECTED]
www.infocamere.it



--- End Message ---
--- Begin Message ---
I am running PHP and MySQL on the following platforms;Windows 2000, XP and
ME and I am finding that the same code does not work. Can some one please
explain this to me?
 
It fails on the connect string every time. Is there a reason for this?
 
Windows 2000 = No work
XP = No work
ME = Does work
 
<?
 
$connection = @mysql_connect("localhost", "myUserName", "MyPassword") 
 or die("Couldn't connect.");
 
if ($connection) {
 $msg = "success!";
} 
 
?>
 
 
Thank you
Jim Ray


 
--- End Message ---
--- Begin Message ---
Jim,

> I am running PHP and MySQL on the following platforms;Windows 2000, XP and
> ME and I am finding that the same code does not work. Can some one please
> explain this to me?
> It fails on the connect string every time. Is there a reason for this?
>
> Windows 2000 = No work
> XP = No work
> ME = Does work
>
> $connection = @mysql_connect("localhost", "myUserName", "MyPassword")
>  or die("Couldn't connect.");


If the other machines are to connect to MySQL on the ME box, then
"localhost" isn't going to work - but you don't mean that, you have three
separate but almost identical installations, don't you?

Have all three machines been set up with the same userId and pswd, so
there's no issue there?

On each machine, and using that/those ID/pswds, can you connect to a DB/tbl
by using the command line client or MySQLControlCenter?

Rather than using DIE, what happens if you ask for the error number and
text?

Please advise,
=dn

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

Can you tell me your experiences about web servers.
I need fast web server which runs on Win2000,  compatible with PHP (i mean
that php works without problems) and is not IIS

Thx
Radovan


--- End Message ---

Reply via email to