I don't understand this script . How is the working ? 0_o
Notice: Undefined variable: errors in C:\xampp\htdocs\xampp\abrasive\register.view.php on line 12
Fatal error: Call to undefined function recaptcha_get_html() in C:\xampp\htdocs\xampp\abrasive\register.view.php on line 31
It looks like you are going to register.view.php instead of register.php. register.view.php is just the display portion, register.php contains all of the logic and includes register.view.php at the end to display the output.Quote:
Hey, trying to get this script working for my server at the moment, and I am getting two annoying errors.
I've put the php files in my htdocs under the folder "abrasive" (so that to access register page I would use "http://127.0.0.1/xampp/abrasive/register.view.php" etc) and when I access this register page, it appears, but at the top I get the error:
And lower down I get the error:Code:Notice: Undefined variable: errors in C:\xampp\htdocs\xampp\abrasive\register.view.php on line 12
I don't know PHP, but it seems as if the library isn't defining the functions properly.Code:Fatal error: Call to undefined function recaptcha_get_html() in C:\xampp\htdocs\xampp\abrasive\register.view.php on line 31
And yes, before you ask, I have put my recaptcha key in the config for recaptcha, all of the php files are setup, everything should work. I haven't seen anybody ask about these errors and I am wondering if I am misplacing the library for recaptcha?
Here's a picture of what I am seeing, for clarification:
[Only registered and activated users can see links. Click Here To Register...]
Many thanks if you can help me out here, sorry for my lack of experience.
-Churp
The thing is, if I go to register.php, I get:Quote:
It looks like you are going to register.view.php instead of register.php. register.view.php is just the display portion, register.php contains all of the logic and includes register.view.php at the end to display the output.
You must have the php_mssql library for Apache installed and enabled to connect to an MSSQL database. Uncomment the line that says extension=php_mssql.dll in your php.ini (XAMPP/WAMP only). This requires a restart of the Apache service to take effect.
That's an error message I added in because it was a very common dolution to this problem. If you look at the code it is checking if the mssql_connect() function exists, and if not it displays that message. I do not know why but PHP is telling the script that it does not know what the mssql_connect() function is.Quote:
The thing is, if I go to register.php, I get:I've double and triple checked that I have the necessary line uncommented in my php.ini file, and whatever I do, I get this message. It just completely baffles me. :confused:Code:You must have the php_mssql library for Apache installed and enabled to connect to an MSSQL database. Uncomment the line that says extension=php_mssql.dll in your php.ini (XAMPP/WAMP only). This requires a restart of the Apache service to take effect.
I haven't used WAMP/XAMPP in a year or two, but as for PHP, I've read that in V5.3, the "mssql" functions are given up, in favor of "odbc" functions.Quote:
I believe in newer versions of WAMP/XAMPP they deprecated that function in favor of a different method. You may want to look for a version prior to PHP version 5.3. But again this is just me guessing as I have rarely used WAMP/XAMPP. Maybe someone else can shed some light on this?
Very useful information, from what I remember correctly "WAMP" is the older version of "XAMPP" so I will probably just get that later on when I have time. Glad to know I was hardly at fault for once! ;)Quote:
I haven't used WAMP/XAMPP in a year or two, but as for PHP, I've read that in V5.3, the "mssql" functions are given up, in favor of "odbc" functions.
There's a link for XAMPP for downloading older versions as well. I have no idea where to check the PHP version but I guess I will go try and find out, then start downloading different versions of XAMPP until I get one that contains PHP pre-5.3.x.Quote:
eh, they're nearly the same I believe, just packed differently. See if either gives you information of what PHP version is contained.
WAMP (Windows, Apache, MySQL, PHP)
XAMPP (Cross Platform, Apache, MySQL, PHP, PERL)
I tried searching a bit, both contain PHP 5.3.x, but WAMP you could download older versions from Sourceforge, maybe you'll find more over it, I'm not very knowledgeable with either program, so I'll leave you to it.
<?php
//Config for testing
$host = '127.0.0.1';
$user = 'Shaiya';
$pass = 'Shaiya123';
echo "<center>";
echo "<h3>MSSQL Function Tests</h3>";
//testing for MSSQL function
if(function_exists('mssql_connect')){
echo "MSSQL functions existing...";
$mcon = mssql_connect($host,$user,$pass);
if($mcon){echo "and connections are possible!";}
}else{echo "MSSQL functions non existant!";}
echo "<br>";
//testing for ODBC function
if(function_exists('odbc_connect')){
echo "ODBC functions existing...";
$ocon = odbc_connect("Driver={SQL Server};Server=$host;", $user, $pass);
if($ocon){echo "and connections are possible!";}
}else{echo "MSSQL functions non existant!";}
echo "<br>";
//Printing PHP Version
echo "PHP version: ".phpversion();
echo "<center>";
?>
MSSQL Function Tests MSSQL functions existing...and connections are possible! ODBC functions existing...and connections are possible! PHP version: 5.2.17
MSSQL Function TestsQuote:
Just out of curiosity, if you're having troubles with the "php_mssql library", copy this into a php file, and navigate to it.
That should print out something like this, if both work:PHP Code:<?php
//Config for testing
$host = '127.0.0.1';
$user = 'Shaiya';
$pass = 'Shaiya123';
echo "<center>";
echo "<h3>MSSQL Function Tests</h3>";
//testing for MSSQL function
if(function_exists('mssql_connect')){
echo "MSSQL functions existing...";
$mcon = mssql_connect($host,$user,$pass);
if($mcon){echo "and connections are possible!";}
}else{echo "MSSQL functions non existant!";}
echo "<br>";
//testing for ODBC function
if(function_exists('odbc_connect')){
echo "ODBC functions existing...";
$ocon = odbc_connect("Driver={SQL Server};Server=$host;", $user, $pass);
if($ocon){echo "and connections are possible!";}
}else{echo "MSSQL functions non existant!";}
echo "<br>";
//Printing PHP Version
echo "PHP version: ".phpversion();
echo "<center>";
?>
Yours will be different obviously, as it's likely we'll have different versions, or one/both of those functions will not work.Code:MSSQL Function Tests MSSQL functions existing...and connections are possible! ODBC functions existing...and connections are possible! PHP version: 5.2.17
*Edit* Guess I should have added onto why I wanted people to test this. As most of the PHP packages now are V5.3, I was curious as to how many actually have odbc on by default. If people do have odbc on by default, either I'll release Abrasive's registration, or I'll give to him to release, which I modified to run off of odbc functions, instead of mssql functions. (Technically can be the same thing, just mssql is now "deprecated" in 5.3)
Basically, I'm just polling for how many people have:
- Both MSSQL/ODBC functions
- Just MSSQL Functions
- Just ODBC Functions
- Neither
and their PHP version, so I can get a better idea of how useful the release of the ODBC registration would be.