php-general Digest 2 Dec 2007 09:35:27 -0000 Issue 5159
Topics (messages 265372 through 265375):
include "config.php" does not work anymore after PHP 5.2
265372 by: wmac
265373 by: Casey
265374 by: wmac
265375 by: wmac
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 ---
Hello,
I have been working with PHP 5.0 and my "register_globals" has always been
Off since PHP 4.1
Today I upgraded to PHP 5.2 and now neither of my include "config.php" work.
Neither of the variables defined in include files are even included. Anyone
knows what has been changed and what can I do?
This is what I normally use
PHP Code:
include("config.php");
mysql_connect($host,$user,$password);
@mysql_select_db("$db") or die("Unable to open database");
I echoed those connection variables and all are empty.
Thank you,
Mac
--
View this message in context:
http://www.nabble.com/include-%22config.php%22-does-not-work-anymore-after-PHP-5.2-tf4930800.html#a14113233
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Okay... show us config.php.
On Dec 1, 2007 11:22 PM, wmac <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have been working with PHP 5.0 and my "register_globals" has always been
> Off since PHP 4.1
>
> Today I upgraded to PHP 5.2 and now neither of my include "config.php" work.
>
> Neither of the variables defined in include files are even included. Anyone
> knows what has been changed and what can I do?
>
> This is what I normally use
>
> PHP Code:
>
> include("config.php");
>
> mysql_connect($host,$user,$password);
> @mysql_select_db("$db") or die("Unable to open database");
>
> I echoed those connection variables and all are empty.
>
> Thank you,
> Mac
> --
> View this message in context:
> http://www.nabble.com/include-%22config.php%22-does-not-work-anymore-after-PHP-5.2-tf4930800.html#a14113233
> Sent from the PHP - General mailing list archive at Nabble.com.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
-Casey
--- End Message ---
--- Begin Message ---
Hello
This is the same thing I always use.
<?
$host="localhost";
$user="root";
$password="123";
$db="stud";
$activation=1;
$MAXATTACHSIZE = 1000000;
$ATTACHDIRPATH="e:/www/stud/lattach/";
?>
By the way, I installed php 4.4.7 and everything is fine with this
version though "register_globals" is again Off.
Regards,
Mac
--- End Message ---
--- Begin Message ---
Thank you People. Someone mentioned the problem.
It is the starting PHP tag.
I never never thought my config.php might have problem. I have used
this config.php for almost 6 years and never had problem (the first
time I have forgotten to add it 6 years ago because I had migrated
from ASP. I have copied this wrong config.php to some other projects.
Throughout the years I have upgraded PHP and Apache (on windows and
Linux) and I have never had this problem.
It's strange that how PHP has never had problem with it and finally
now it has found the problem! I am now doing J2EE for 3 years and this
bug caught me finally. (I think I need to update a few delivered
projects before they come up with the problem)
Thank you again.
Mac
--
View this message in context:
http://www.nabble.com/include-%22config.php%22-does-not-work-anymore-after-PHP-5.2-tf4930800.html#a14113764
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---