By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,347 Members | 1,389 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,347 IT Pros & Developers. It's quick & easy.

Problems with Website / PHP

P: n/a
I have rescently upgraded to Fedora Core 1 on my web server with the
following upgraded packages installed:

php-4.3.6-1.3
php-mysql-4.3.6-1.3
mysql-3.23.58-4
mod_auth_mysql-20030510-3
mysql-server-3.23.58-4
httpd-2.0.49-1.1

Now this snippet of code will not work on any of my websites:

<?php

include ("/opt/web/sys/include/functions.inc");
include ("/opt/web/sys/include/basic.inc");

dbconnect ($dbname="mysql", $user="user", $password="A_Public_Password",
$server="localhost");

$staffname = db_authenticate($table="mysql.user",$realm="A_Web_ Site",
$errmsg="Please enter a username and password",$user_field="",
$password_field="");

dbconnect ($dbname="auth_users", $user=$PHP_AUTH_USER, $password=
$PHP_AUTH_PW, $server="localhost");

?>

Can anybody tell me why? Thanks in advance.

BTW, I realize this isn't very secure. I just use to keep internal users
out of intranets they shouldn't be in.

-Penfold
---
Dangermouse: Penfold..?
Penfold: Yes...
Dangermouse: Shush!
Penfold: Oh Ick!

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Penfold wrote:
I have rescently upgraded to Fedora Core 1 on my web server with the
following upgraded packages installed: (snip) Can anybody tell me why? Thanks in advance.


Yesterday I changed my car's battery for a new, more powerful one.
Now it won't start. Can you tell me why? :-)





Maybe you'd like to know if the cables are securely connected???
What happens when I turn the key???
If the emergency lights works???
If there is fuel in the tank???

Same thing here.
We'd like to know what error messages you get.
We'd like to know what are those dbconnect() and db_authenticate().
We'd like to know whether you have register_globals off.
We'd like to know if a simple script (<?php echo "Hi"; ?>) works.
....

SCNR :-)

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #2

P: n/a
Penfold wrote:
<?php

include ("/opt/web/sys/include/functions.inc");
include ("/opt/web/sys/include/basic.inc");

dbconnect ($dbname="mysql", $user="user", $password="A_Public_Password",
$server="localhost");

$staffname = db_authenticate($table="mysql.user",$realm="A_Web_ Site",
$errmsg="Please enter a username and password",$user_field="",
$password_field="");

dbconnect ($dbname="auth_users", $user=$PHP_AUTH_USER, $password=
$PHP_AUTH_PW, $server="localhost");


My guess is register_globals used to be on and is now off (default in
the latest php releases). You can find the register_globals setting in
php.ini.

Regards,
Ruben.
Jul 17 '05 #3

P: n/a
Penfold wrote:
<?php

include ("/opt/web/sys/include/functions.inc");
include ("/opt/web/sys/include/basic.inc");

dbconnect ($dbname="mysql", $user="user", $password="A_Public_Password",
$server="localhost");

$staffname = db_authenticate($table="mysql.user",$realm="A_Web_ Site",
$errmsg="Please enter a username and password",$user_field="",
$password_field="");

dbconnect ($dbname="auth_users", $user=$PHP_AUTH_USER, $password=
$PHP_AUTH_PW, $server="localhost");


My guess is register_globals used to be on and is now off (default in
the latest php releases). You can find the register_globals setting in
php.ini.

Regards,
Ruben.

Jul 17 '05 #4

P: n/a
Ruben van Engelenburg <ru***@textinfo.nl> wrote in
news:40***********************@news.wanadoo.nl:
Penfold wrote:

<snip>

My guess is register_globals used to be on and is now off (default in
the latest php releases). You can find the register_globals setting in
php.ini.

Regards,
Ruben.


That worked. Thanks.

--
-Penfold
---
Dangermouse: Penfold..?
Penfold: Yes...
Dangermouse: Shush!
Penfold: Oh Ick!
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.