Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 28th, 2004, 07:06 PM
Registered User
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with require_once...


Hi guys, I need help with the following problem please...
if((ereg("^[[:alnum:]]+$", $HTTP_POST_VARS[username]))AND(eregi
("^[[:alnum:]]{8,8}$", $HTTP_POST_VARS[password])))
$query="SELECT user_id, first_name, password FROM users WHERE username='$HTTP_POST_VARS[username]'";
$query_result=mysql_query($query, $db_connection)or die(mysql_error());
if((crypt($password, $result[password]))==$result[password]){
$message=urlencode("The username and password submitted do not match those on file. Please try again.");
$message=urlencode("Please enter your username and password to log in.");
header("Location:index.php?error_message=$message" );

...that's the code.
The problem is everytime I tried to open my code with http://localhost, it always gives me an error code saying:
FATAL error include path(';c:\php4\pear'), but I already change the php.ini.dist to my folder, which is d:\php\pear but apparently it still won't work. I also shut down the apache and mysql service before I changed the php.ini...but the result remain the same.

Please help...and thank you in advance...

Old March 1st, 2004, 01:57 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts

Sorry, I don't know the answer to your problem, but $HTTP_WHATEVER_VARS is depreciated and should be replaced with $_WHATEVER, for example $HTTP_POST_VARS is $_POST. This is all unless you are using an older version of PHP, and if so I would look into a newer version...

Hope you find a solution to your problem.

Old March 1st, 2004, 09:44 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts

Your include path looks screwy. Also, the error message you posted doesn't look complete. Please post the entire error message.

Take care,


Similar Threads
Thread Thread Starter Forum Replies Last Post
nusoap and require_once garbiner PHP How-To 1 May 29th, 2005 04:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.