Warning: Setcookie() Expects Parameter 3 To Be Long,
Anyway, until recently, as I stated, it was working well. Now I am getting the following error when trying to log in:
Warning: setcookie() expects parameter 3 to be long, string given in /path/to/files/helpdesk/includes/cookie.inc.php on line 8
The cookie.inc.php is actually quite a small file and I would not think that it would cause me much grief, but it is. Below is the actual code for the cookie generation script: Code:
I am moving a site (from a server running PHP4 to a server running PHP5) with a simple PHP login system that sets a cookie and sends an email that someone has logged in. It is returning an error and not setting the cookie. Here is the error:
PHP Warning: setcookie() expects parameter 3 to be long, string given in /home/taylor/public_html/login/login.php Here is the PHP code (the contents of the login.php page that the form calls): Code:
I am trying to set a cookie, whas wrong with this as I am getting an error. Warning: setcookie() expects parameter 3 to be long, string given in /home/admin/domains/domain.com.au/public_html/setcookie.php on line 6
I'm stumped on this one. New to sessions and cookies. When somebody logs out, the browser goes to logout.php. It logs them out, but the page shows this error:Warning: setcookie() expects parameter 3 to be long, string given in /data/21/2/40/160/2040975/user/2235577/htdocs/logout.php on line 23you are now logged out.
Ok here is the error I am getting... QuoteWarning: date() expects parameter 2 to be long, string given in /home/a8875754/public_html/admin/pages/edit_members.php on line 191 and this is line 191 of my code...
----------------------------------------------------------- Warning: domdocument() expects at least 1 parameter, 0 given in C:ProgrammiApache GroupApache2htdocsappaimlook.php on line 2 Fatal error: Call to undefined function: load() in C:ProgrammiApache GroupApache2htdocsappaimlook.php on line 3 -----------------------------------------------------------
My php version is 4.3.8 (with Apache 2.0 on windows 2000).
I'm a bit too green to figure this one out, been at it all day and still no further along...Yes, I need to upgrade that book.Anyway here's the error.Warning: mysql_real_escape_string() expects at least 1 parameter, 0 given in /home/mnet/public_html/db_insert.php on line 18There has been a system problem. Failed to add record to database.Here's the code
requireonce('connectDB.php'); $password = md5($_POST['password']); // hash the password before the array_map() array_map(mysql_real_escape_string(), $_POST ); // Since only one element won't need to be sanitized, run the entire $_POST array through mysql_real_escape_string. [code].....
I'm getting the following error(s) below and I'm at a bit of a loss as to how to correct it. When I give it a parameter it then complains it needs two parameters and the second one being an integer or something like that.
Warning: domdocument() expects at least 1 parameter, 0 given in orders.php on line 157
Warning: domdocument() expects at least 1 parameter, 0 given in orders.php on line 158
Fatal error: Call to undefined function: loadxml() in orders.php on line 159
The lines in question are: $xml = new DOMDocument; $xsl = new DOMDocument; $xml->loadXML($row['fetch_orders']); $xsl->load('fetch_orders.xsl'); $proc = new xsltprocessor;
domxml DOM/XML enabled DOM/XML API Version 20020815 libxml Version 20616 HTML Support enabled XPath Support enabled XPointer Support enabled DOM/XSLT enabled libxslt Version 1.1.12 libxslt compiled against libxml Version 2.6.16 DOM/EXSLT enabled libexslt Version 1.1.12
xml XML Support active XML Namespace Support active EXPAT Version expat_1.95.8
xslt XSLT support enabled Backend Sablotron Sablotron Version 1.0.1 Sablotron Information Cflags: -O -pipe Libs: -L/usr/local/lib -liconv -lexpat Prefix: /usr/local
This is some PHP search code with some mistake. $run gives nothing where $run = mysql_query($construct); It gives: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:xampphtdocsxamppsearchsearch2.php on line 39 No results found.
<?php //get data $button = $_GET['submit']; $search = $_GET['search']; if(!$button)
I recieve this errorWarning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/jeanie/public_html/inc/functions.php on line 10Now I never use to get this error,and suddenly it's only started to appear. So I'm wondering what the problem is, I do have checkboxes in my form, these are in an array. This could be part the problem. Although how do I fix it?<tr><td height="34">Interested In:</td>
<td><input type="checkbox" name="men" value="men" /> Men <input type="checkbox" name="checkbox" value="women" /> Women <input type="checkbox" name="checkbox" value="none" /> None <input type="checkbox" name="checkbox" value="other" /> Other</td></tr>They are the checkboxes, this is where the function to clean strings gets called (In the form validation) $_POST = clean($_POST,0,0); [code].....
I'm using the following code in my wordpress site to display the latest youtube video from my account using rss:
<?php include_once(ABSPATH.WPINC.'/rss.php'); // path to include script $feed = fetch_rss('http://gdata.youtube.com/feeds/api/users/UrbanGAME/uploads'); // specify feed url $items = array_slice($feed->items, 0, 1); // specify first and last item ?> <?php if (!empty($items)) : ?> <?php foreach ($items as $item) : ?> [Code]....
It works. However, some of the times I get this error when it does not work: " Warning: array_slice() expects parameter 1 to be array, null given in /wp-content/themes/theme1/header.php on line 173. "
Also I'm using the above code twice, for 2 spots on the site for 2 different accounts. One is in the my header.php file and the other in my footer.php file. When 1 works, the other does not, and of course I get an error/warning for the other one as well, just referring to that file and a different line. I have tried messing with the code and still nothing. Could the problem be with something in my code?
I want to display data in a table I have using the following code. It works using the table and field names in the code I have displayed but when I change it to another table name and attributes in another table i get the error.. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in H:xamppxampphtdocsdisplayCustomer.php on line 14
Code: Code: [Select]<?php // (1) Open the database connection – always use localhost $connection = mysql_connect("localhost", "root"); // (2) Select your database id mysql_select_db("animals", $connection);