Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Error Undefined Index


I keep getting the error: "Undefined index: page in ......." for this script:

<?
$page = $_Get["page"];
if (!$page){
$page = 1;
}

If the variable "page" isn't referenced in the url, I want it to be set to a default value of 1. This script works fine on one web server but not another. I'm assuming that it has to do with different php.ini files.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With Undefined Index Error
I am geteting an Undefined index error on the script below. what could be causing this ?any help is appreciated. PHP Code:

Undefined Index: Error
simple php website that displays a table from my mysql
database.

To prep for my MCSE I moved my home server to Windows 2003 Standard, I
installed mysql and php 5 to run some of my databases and websites.

Under Linux the site worked fine, under windows I keep getting Notice
Undefined Index error on line 67

I have went back to the basics just pull the data then display and
still get the same error.

60 $sql = "SELECT * from newschool ORDER BY State, CollNam";
61
62 $result = mysql_query($sql, $dbcnx) or die(mysql_error());
63 $number_of_rows = mysql_num_rows($result);
64
65 while ($newArray = mysql_fetch_array($result)) {
66
67 $id = $newArray['id'];
68 $testField = $newArray['testField'];
69
70 echo "The ID is $id and the text is $testField <br>";

Security Problem + Undefined Index Error
I am creating a simple message board for a project at school. Anyway, I have made the login page, so if the user is recognised, he/she enters the mainpage. The only problem I have is that, you can easily pass the variable user through the url and become a user if not already one, and ppl can pretend to be others.

So, I was wondering, how do I prevent ppl from, if they enter the mainpage url, how do I write a message saying "Hacking Attempt" or something like that, so that I basically stop this security flaw. My 2nd problem is I have 4 boards for the msgboard. Each has url: mainpage.php?board=whatever The links work fine and the user can go to these links, but I get an error at the top of the mainpage saying "warning - undefined index 'board' "
Here is the code:

Fatal Error: Call To Undefined Function: Mysql_connect() In /var/www/html/index.php
I get the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/index.php on line 3.

I have the following RPMS installed on RH7.2
MySQL-client-4.0.14-0 I would really appreciate it.
MySQL-shared-4.0.14-0
MySQL-server-4.0.14-0
MySQL-devel-4.0.14-0
php-imap-4.0.6-7
php-4.0.6-7
apache-1.3.20-16
apache-devel-1.3.20-16
apacheconf-0.8.1-1

The code i am trying to run is: I would really appreciate it.
<?php
printf("opening db.....");
$db = mysql_connect("localhost","user","password");
printf("closing db
");
mysql_close($db);
?>

The configure part of phpinfo() shows:
-----
'./configure'
'i386-redhat-linux' '--prefix=/usr' .<snip>
'--enable-wddx' '--without-mysql' '--without-unixODBC'
'--without-oracle' '--without-oci8' '--with-pspell' '--with-xml'
------

I believe the mysql is not installed to work along with PHP. I
installed php using rpm.
My question is how do i make it work. I have checked NG and tested all
the options. But to no avail.

I also tried by uncommenting the line extensin=mysql.so in
/etc/php.ini.

Undefined Index

Notice: Undefined index: name in F:uniSoftware
engineeringassignment4guestbook.php on line 6

the variable $name is declared as $name = _POST["name"];

What could be causing this?

I've recently installed php 5 on IIS with mysql 4. All running on windows XP

downloaded code straight from my uni's tute site.

went to run it and it sort of runs but I get these errors at the top of the
page.

Undefined Index
Reference the above thread: "Passing a HTML variable to a PHP file
using include". One thing I've learned over the years is that an error
doesn't always come from where the compiler/interperture says it does.
Case in point maybe.

I am getting this error:


Notice: Undefined index: var1 in
/var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 4

Warning: fwrite(): supplied argument is not a valid stream resource in
/var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in
/var/www/vhosts/texasflyfishers.org/httpdocs/form.php on line 6

in this function:

<?php
if($_GET["op"] == "ds") {
foreach ($_GET["name"] as $key=>$value) {
$fp=fopen($_GET["var1"],"a");
fwrite($fp,$_GET["name"][$key] ."&nbsp;". $_GET["email"][$key]
.."&nbsp;". $_GET["phone"][$key] ."&nbsp;". $_GET["id"][$key]);
fclose($fp);
}
}
?>

'var1' comes from this last line in this snippet in a previous function:

<html>
<body>
<?php include ($_GET["var2"]); ?// this works
<br clear="all">
<?php include ($_GET["var1"]); ?//this works
<form action="form.php?var1=>($_GET["var1"])" method="GET"// NOT

I have found that the text editor you are using will color out the
parts of code if they are correct. This code does not color out evenly.
In the 2 'include' statements '$_GET' is red. In the 'form action'
statement it is not.

At this point 'var1' is a name on a disk with zero length. Is it
possible that the error trapping of the 'include' function is taking
care of this and the error trapping of the 'fopen' alerts you that it is
going to crash fwrite because 'var1' is now corrupted?

Undefined Index
I have a simple search feature that searches 3 fields in 3 separate tables
in a MySQL db, and I'm getting an 'undefined index' error, but only in the
first section (first table)of the results. The undefined index is tied to
the docs.projID in the "if ($row_search['docs.projID'] == 1)". This if
statement is there to control to format of the link as pages are in
different depths of subfolders depending on security needs. Googling this
sort of error seems to reflect problems with the $_POST['keyword'] not
existing when the results are first listed, so I moved the PHP results code
from it's own page (search.php) to the main page, which didn't help. I have
tried several different things and can't seem to get it working right. Here
is what I have:

Form:
<form id="search" name="search" method="post" action="<?php echo
$currentPage?>">
SEARCH<br />
<input name="keyword" type="text" size="20" value=""/>
<input type="image" name="Submit"
src="images/team_icon_go_btn.gif" />
</form>

Results:

<?php if (isset($_POST['search']))
{
$keyword = $_POST['keyword'];

mysql_select_db($database_website, $website);
$query_search = "SELECT Distinct docURL, docTitle, docDesc, docs.projID,
groupCode, projCode, catName FROM docs
JOIN subcat on subcat.subcatID=docs.subcatID
JOIN cat on cat.catID = subcat.catID
JOIN groups on groups.groupID=proj.groupID
JOIN proj on proj.projID=docs.projID
WHERE proj.projID=docs.projID AND docURL LIKE '%$keyword%' OR docTitle LIKE
'%$keyword%' OR docDesc LIKE '%$keyword%'";
$search = mysql_query($query_search, $website) or die(mysql_error());
$row_search = mysql_fetch_assoc($search);
$totalRows_search = mysql_num_rows($search);
$proj = $row_search['projCode'];
?>
<?php if ($totalRows_search < 1)
{
echo "No internal documents matched your request.";
}

else {?>

<p><table width=95%>
<tr><td colspan="3"><font size="+1">Internal Documents:</font></td>
</tr>
<tr>
<td><strongLink </strong></td>
<td<strong>Description</strong></td>
<td<strong>Project </strong></td>
</tr>
<?php
do { ?>
<tr>
<td>
<a href="<?php if ($row_search['docs.projID'] == 1) {
echo $row_search['catName']."/".$row_search['docURL'];
}
else {
echo
$row_search['groupCode']."/".$row_search['projCode']."/".$row_search['catName']."/".$row_search['docURL'];
?>"><?php echo $row_search['docTitle'];
} ?></a></td>
<td><?php echo $row_search['docDesc']; ?></td><td><?php echo
$row_search['projCode']; ?></td>
</tr>
<?php } while ($row_search = mysql_fetch_assoc($search)); ?>

</table>
<?php }?>
</p>
<?php
mysql_select_db($database_website, $website);
$query_search = "SELECT Distinct toolURL, toolName, toolDesc, tools.projID,
projCode FROM tools
JOIN proj on proj.projID=tools.projID WHERE toolURL LIKE '%$keyword%' OR
toolName LIKE '%$keyword%' OR toolDesc LIKE '%$keyword%'";
$search = mysql_query($query_search, $website) or die(mysql_error());
$row_search = mysql_fetch_assoc($search);
$totalRows_search = mysql_num_rows($search);

?>
<?php if ($totalRows_search < 1)
{
echo "No tools matched your request.";
}

Undefined Index: Id
I have a website online which I have taken offline to work on it, but when I load the pages, I get the error

Notice: Undefined index: id in C:wwwwebconnectwebsitedata.php on line 5 Code:

Undefined Index ?
I have some code with a problem. The code is:

1. <?php
2. $initStartLimit = 0;
3. $limitPerPage = 10;
4. $startLimit = $_REQUEST['startLimit'];
5. $numberOfRows = $_REQUEST['rows'];
6. $sortBy = $_REQUEST['sortBy'];
7. $sortOrder = $_REQUEST['sortOrder'];

The errors starts with row 4:

Notice: Undefined index: startLimit in *** on line **
Notice: Undefined index: rows in ***  on line **
Notice: Undefined index: sortBy ***
Notice: Undefined index: sortOrder in ***

The code was created by "phpCodeGenie" and works fine on my webserver, which has
php version 4.4.4 and
mySql version 4.1.21

I just installed easyPHP on my home computer which has php version 4.3.10
mySql version 4.1.9 The errors only show up on easyPHP.  My guess is that phpCodeGenie defined these indexes. How can I define them in EasyPHP ? 

Undefined Index: Mode ...?
I was installing some "canned" php code and came across this error, and am not sure what it means.

Undefined index: mode in line xx.

here is the code snippet in case anyone can point me at something, or an ini setting. PHP Code:

Notice: Undefined Index:
I am getting the following errors:

Notice: Undefined index: sender_name in c:program filesapache
groupapachehtdocsallinone_form.php on line 12

Notice: Undefined index: sender_email in c:program filesapache
groupapachehtdocsallinone_form.php on line 14.....

PHP Notice: Undefined Index
I got this error message below. How can i fix it...

PHP Notice: Undefined index: REQUEST_URI in c:inetpubwwwrootguestbookguestbook.php on line 41 PHP Warning: Cannot add header information - headers already sent in c:inetpubwwwrootguestbookguestbook.php on line 41

any help is very much appreciated.

Undefined Index Notices
I'm getting this:

[client 192.168.5.50] PHP Notice: Undefined index: D1 in
/var/www/html.....

From this line of code:

$id_option = $_POST['D1'];

Which is posted by this:

<form target="_blank" method="POST" action="mailchart.php" name="mail_data">
<input type="hidden" name="D1" value="<? echo $id_option; ?>">
<input type="submit" value="View Chart"></p>
</form>

My question is why?

I *am* getting the correct value for $_POST['D1'] and at this point in
time am really quite confused because that notice is getting thrown.

[root@... ~]# php -v
PHP 4.3.11 (cgi) (built: Nov 8 2005 06:24:40)

[root@... /]# uname -a
Linux ... 2.6.12-2.3.legacy_FC3 #1 Sun Feb 19 10:47:10 EST 2006 i686
i686 i386 GNU/Linux

Undefined Index: Referral
When the cookie exists its fine, but when the cookie doesnt exist it gives the error.....

Undefined Index From Name Search.
I am developing a Abstract Submission system for a small medical association. What they want it to do is be able to search an exsiting members database and fill out the information automagically from the search.

The original database is in Access and I have successfully exported it into MySQL without any problems. When I do the search and all of the fields are in the database for the form that I want to have filled out it works perfectly. but... if one of the fields is empty. I get a error.

"Warning: Undefined index: MiddleName ... on line x"

for each of the fields that is empty. I know why this is doing it. But I don't know how to fix it. I was thinking of using if then statements and adding a space to the variable so that variable would not be empty but that would screw up my Error checking in the next step. Code:

Warning: Undefined Index: 2 In
wat does this error means?

Warning: Undefined index: 2 in C:Inetpubwwwroot emplateadmin.php on line 453

if i manually install php,(setting manually), this error wil not appear. but if i use the .exe to install, (means i dont' have to do the settings), this error will appear.

Undefined Index Problem????
i have a html form called connect.html where i enter my username and password. After i have done that i hit the submit button. If i am successful, a message sayingUser [ w1009048] successfully connected which is in my handler1.php . I then click on a link called table which redirects me to another page (table.php) and SHOULD display the customer id and name from my customer table(database).  When i click on the table link i get the following statmetents: Code:

PHP Notice: Undefined Index:
My question if more of a "good practice" type of thing.  Let say I have a session variable $_SESSION['username'].  And I want to display some text based upon the fact that this variable exists.  So if I do this:

<?php 
if ($_SESSION['username'] == 'bob@domain.com') {
     echo "Hello World";
}
?>

When I do this, I get PHP Notice:  Undefined index:  username in my log messages.  Now granted this is just a notice and not an error.

So, my question is, is there anything wrong with this?  Or is it really necessary to do checks like isset()??

Getting Undefined Index/variable Errors?
I have no idea why my variables are not being sent to the server. With php 4.3.1, Apache 2.0.44 and MySQL, the following script PHP Code:

Undefined Array Index Question
I am curious about how php deals with the following situation where I use an undefined index into an array. PHP seems to be behaving exactly how I want it to but I want to make sure that it is not a fluke. It seems like most programming languages would crash if you used an undefined index. Why does PHP work the way it does?

My example is below ....

$http_post_vars (Warning: Undefined Index: 23232)
I have a form with one text box and when I submit the form and try and call the value on the next php page like this echo $HTTP_POST_VARS["myIP"];

I get the following error:
Warning: Undefined index: 23232 in D:phpStatsdisplay_stats.php on line 6

however if I use the while loop to get the data from the form it works fine. Anyone know why this is happening?

Blank Page Caused By Undefined Index
I upgraded my php from 4.4.7 to 5.2.4 and now the entire website doesn't work.  So I am trying to learn PHP and go through the site one error at a time.  If you have a idea why the upgrade caused the site to fail that would be great.

But in the meantime this is the problem i am stuck on.

I get this error now when transferring to a page

Notice - PHP Notice: Undefined index: REMOTE_ADDR in c:locationSession.php on line 45.

That line has the following code.

$GLOBALS["$SessionName"]=md5 (microtime() . $GLOBALS[REMOTE_ADDR"]);

Like I said this code worked before the upgrade.  Any idea what I can do to fix this problem?

[error]Undefined Offset,Use Of Undefined Constant
I have written a program for a long. However, when I placed it in other server, there are many error messages formed. For example:

Notice: Use of undefined constant my_sort - assumed 'my_sort' on line 4
function my_sort( $row1, $row2 ) {
return ( intval($row1[1]) > intval($row2[1]) )?-1:1; }
usort( $str, my_sort);}

I can't find out what's the mistake did I make. Would you know what's wrong in above scripting?

Supress Errors At The Page Level? Undefined Index Errors.
I'm creating a simple reply form, and if a form item isn't answered I
get an error:
"Notice: Undefined index: rb_amntspent in
c:inetpubwwwrootmackinawsurvey.php on line 36"
even if in the code I allow for an unselected item. (Code at the
bottom here.)
It works fine otherwise.

Now in the past I've made a change to php.ini to repress errors, but
for this project I don't have access to the php.ini.
Is there a way to supress errors on that page for that session?

Or, is there a way to just not get that error at all?

Here's a sample of the code that gets the form response. If an item is
selected, no error for that question, but if an item is not selected I
get the error above even though I still get a successful echo for the
"else" or "default" option which occurs if nothing is selected:

$rb_visited = $_POST["rb_visited"]; //Have you ever visited Mackinaw
City, Michigan?
if ($rb_visited == "1") {
$rb_visited_reply = "Yes";
} elseif ($rb_visited == "0") {
$rb_visited_reply = "No";
} else {
$rb_visited_reply = "You did not answer this question";
};

$rb_lastvisit = $_POST["rb_lastvisit"]; //When was your last visit to
Mackinaw ity?
switch ($rb_lastvisit) {
case "1":
$rb_lastvisit_reply = "Earlier this year (2003)";
break;
case "2":
$rb_lastvisit_reply = "Last year (2002)";
break;
case "3":
$rb_lastvisit_reply = "2 years ago (2001)";
break;
case "4":
$rb_lastvisit_reply = "3 years ago (2000)";
break;
case "5":
$rb_lastvisit_reply = "4 or more years ago (1999)";
break;
default:
$rb_lastvisit_reply = "You did not answer this uestion";
}

Error Message - 0 Is Not A MySQL Result Index
Could anyone explain what this might mean?

Warning: 0 is not a MySQL result index

I have a simple form set up where a user types in a keyword and then a page is displayed based on the keyword. See below:

HTML page:
<html>
<head>
<title></title>
</head>
<body>
<form action="submitform.php3" method="GET">
<p><strong><font face="verdana, arial, ms sans serif" size="1">id#</font>:</strong> <input
type="text" name="keyword" size="15" maxlength="25"> <input type="submit" value="Go!"> </p>
</form>
</body>
</html>

submitform.php3 page:
<?php
mysql_connect ("localhost", "username", "password");
mysql_select_db (dbname);
$result=mysql_query("SELECT $url FROM table
WHERE keyword LIKE '%$keyword%'");
list($url)=mysql_fetch_row($result);
?>

The concept is really simple. A user types in an keyword and that page is displayed. There is a database set up with a table that has two columns. One is "keyword" and the other is "url" For example row 1 the keyword is abc, and the url is http://www.abc.com.

STRANGE "Fatal Error: Call To Undefined Function..." ERROR
why strange you ask? here goes:

I have been working with Php and Mysql for a week without any problems.
Today I tried executing a php page that connects to mysql and creates a
new database, I got this error:

"Fatal error: Call to undefined function mysql_connect() in C:Program
FilesApache GroupApache2 est\_debug_tmp.php on line 3".

I did some reading on the net and checked all my configuration, and it
looks o.k. (and it already worked well a whole week before today).

The strange thing is that I have another form that inserts data into
the same database in Mysql, and it works like a charm (needless to say
but both pages log in with the same username to the same database).

Undefined Function Error
I get a undefined function error when I use this function to calculate the number of days in a monthnmcal_days_in_month (int month, int leap year).

Undefined Offset Error
I don't know why this code says it has an error in it because I got it straight out of a book: I have 2 files - the first one is an include file: Code:

PHP 5 Undefined Variable Error
Well I just upgraded to PHP 5 but now no variables will pass page to page like I use to have them do and im getting error messages that say undefined variable bla bla bla. I think this is a quick fix by changeing something in php.ini. I just dont know what to change any ideas?

Undefined Method Mysqli::error()
cannot figure out why I am getting this error:

Fatal error: Call to undefined method mysqli::error() in /home/content/x/x/x/xxxxx/html/user_login/Account.class on line 122

This is a user login script, part of a package of five classes and a few other files in total. Not sure if the error is actually in another file but posted the whole account.class.

I still consider myself a newbie and am sure this is an easy problem to solve since it's just a matter of tracking the error back to its source, only problem is I can't figure it out myself! Code:

Single Quotes, Double Quotes And "undefined Index"
I am trying to write clean code but keep having trouble deciding
when to quote an array index and when not to.

sometimes when I quote an array index inside of double quotes I
get an error about enased whitespace (to my best memory)

AT other times I get an undefined index notice as below:

Notice: Undefined index: last_reminder_id in...

the 2nd line (which wraps to the 3rd in this posting
is the one listed in the error message:

$sql = "SELECT * from notes
where recall_date &#390;' and recall_date <= '$now' and id >
'$_SESSION[last_reminder_id]'";

what is the correct syntax and/or can anyone point me at a
reference that will explain this ?

Fatal Error: Call To Undefined Function :
I'm working in an environment that only uses windows!!! HELP!!! but because of this I must test and use everything on windows. So, I'm using PHP 4.06, Apache 1.3.2 and Windows 2000 pro. Everything works. But here is my problem. I tried setting up functionality with fdftk. What I tried doing is setting up my extension directory and the extension=php_fdf.dll in my php.ini file. When I try to run my script I get an error like this: Fatal Error: Call to undefined function : fdf_open().

Fatal Error: Undefined Function Mysql_connect():
Just tried my first mysql funcition: mysql_connect(). When I try it in my
browser I get "Fatal Error: undefined function mysql_connect(): I'm running
apache2, php5 and mysql 5.0.22 - all running on Ubuntu 6.06. I can execute
simple php scripts and phpinfo() works fine. What is my problem?

Compile Error Undefined Reference To Ifx_checkAPI
This bug is fixed according to

http://bugs.php.net/bug.php?id=33469

As I am using the rpm version of Suse with all the patches Suse
provides, I would like to exchange only those files of the sources,
that are related to that bug and would not use a possibly instable snapshot.
So can someone tell me, which files are related to that bug?

Fatal Error: Undefined Function: Getmxrr()
I dont know whats wrong with my script/server on my old webserver it works perfect. But when i try it on my own server (apachefriends) it dosent work PHP Code:

Fatal Error: Call To Undefined Function: ()
I am currently butting my head against a brick wall with a problem right now. I am trying to use two arrays to track an item and it's quantity. When ever the script runs it says I keep getting this error message:

Fatal error: Call to undefined function: () in /info/www/docs/cpcdb/search/addcart.php on line 109

This error occurs on the first time the session is initialized. The called function is get(). When I reload the page (reloading session) I get a new error

Fatal error: Call to undefined function: () in /info/www/docs/cpcdb/search/addcart.php on line 93

which occurs in a branch of an if statement that checks to see if my arrays are not empty. The function called on line 93 is upditem. Code:

Fatal Error: Call To Undefined Function
After an upgrade from PHP4.x to PHP5.2 with Apache 2.2 and an Oracle 10g database in the back i am not anymore able to do INSERTS, UPDATES to the database. DELETE and SELECTS are working fine. Code:

Login Page, Error Undefined Variable
i'm doing a webpage login with php5, mysql4 and apache2.2.4. I copy this code from a book and change some of the code a bit. When i try to run it gave me

"PHP Notice:  Undefined variable: message in C:Program FilesApache Software FoundationApache2.2htdocsWebpageLoginPage.Php on line 70"

Its the last line of the code "<?php echo $message; ?>"

Why is it undefined? Code:

Fatal Error: Call To Undefined Function:
I have an online photogallery nearly working. I get the error below and have no idea why its happening. The 'Still Here!' bit is what the code is echoing so i can see if that set of code works. I have followed a tutorial for this and Not really sure what to do. Code:

Fatal Error: Call To Undefined Function: Mail()
I'm having troubles with the PHP mail function on my server. I'm running redhat 8.0 with qmail.

When i try to send mail with php i get an error message said:
Fatal error: Call to undefined function: mail().

Fatal Error: Call To Undefined Function: Virtual()
I trying to install php on my local computer. Everything works OK, but virtual() function.

If it is on a page, it returns
"Fatal error: Call to undefined function: virtual()"

I guess it something should be corrected in httpd.conf ot php.ini, because the same pages work just fine if called through my server (with php and apache installed).

Both PC-s are under Windows.

I think this is a common error, because there are plenty pages in Internet with this error.

Fatal Error: Call To Undefined Function: Imap_open()
I have compiled php4.0.1pl2 with imap support and followed the instructions from the php website as well as followed the advice in the user notes under imap in the help section. I still can't get imap_open to work. I get:

Fatal error: Call to undefined function: imap_open() in /www/mail.php on line 9

I have the latest version of the UW imap installed and working properly. Is there anything else i need to do inorder to get imap working?

Fatal Error - Call To Undefined Function: Inserteditorjava()
As my name implies, I'm in trouble already.

Opened index.php in Dreamweaver to change some post codes (zip codes), then uploaded same back vif FTP.

Now when I open my site all I get is the following:

Fatal error: Call to undefined function: inserteditorjava() in /home/example/public_html/index.php on line 36

The code:

Fatal Error: Call To Undefined Function: Proc_open()
Hi *.

I get this error when trying to run proc_open() function:

"Fatal error: Call to undefined function: proc_open() in
/home/frantic/public_html/a/phpshell.pup on line 140"

Does anybody knows what setting I have to change to fix this?

Configuration:
Linux loci 2.4.25
PUP Version 4.1.2
Apache Version Apache/1.3.26
Apache Release 10326100
Apache API Version 19990320

Fatal Error: Call To Undefined Function Mysql_connect() ...
I can't seem to get PHP to recognize MySQL. I know you are probably sick of hearing about this problem, but I haven't been able to find a solution. I have read through the documentation on the web including that which pertains to this error in these forums. I will attempt to outline the problem as detailed as possible: PHP Code:

Fatal Error: Call To Undefined Function: Pregmatch()
Just wondering if anyone can something glaringly obvious with this function, as it throws up the following error message...

Fatal error: Call to undefined function: pregmatch() in D:Webindex.php on line 130
PHP Code:

Fatal Error: Call To Undefined Function Mssql_connect()
I have PHP Version 5.0.3 installed on Windows XP Pro with IIS as the
webserver. All is working well, except I get a -

Fatal error: Call to undefined function mssql_connect() in
C:InetpubwwwrootCertificateOccupancymain.php on line 33

line 33: $conn = mssql_connect(toshibo,sa,ladeda) or die ("Could Not
Connect to Database");

when trying to use mssql_connect. Info.php shows that the mssql module
is loading which tells me that where I uncommented

extension=php_mssql.dll

in the php.ini file is working. I have set up paths for both the
c:phpext and c:php directories.

I had PHP 4.3.10 installed on the same box a day earlier, and the
function worked. Also, I am using the ISAPI method for PHP instead of
the CGI if it matters.

Fatal Error: Call To Undefined Function: Gmp_random()
I want to create a random number, so I looked this up in the manual and it looked good. However, I can't get it to work. Tell me, why doesn't this work?

$number = gmp_random("9999999999");
echo "$number";

gives me this:

Fatal error: Call to undefined function: gmp_random() in /home/dpetersen/public_html/Site/newsletter.php on line 5

where line 5 is the line where the gmp_random() function is called. with or without quotes it doesn't work. And in the manual it says it will generate a random number between the number you specify and 0. but it doesn't give any examples and I just figured it would work like that.


Copyright © 2005-08 www.BigResource.com, All rights reserved