PHP - What Does This Error Message Mean? Trying To Call Function Inside An Iframe!
I'm trying to call a function inside an iFrame inside Wordpress, and I'm getting this error message:
Code: [Select] Fatal error: Call to a member function get_results() on a non-object in What is this supposed to mean? By the way the function DOES work when it's NOT called inside the iFrame, but as soon as I call it inside the iFrame I get the error message. Why is that? Similar TutorialsThis topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=319682.0 Can anyone help me with this error? Fatal error: Call to a member function require_login() on a non-object in /home/wallls/public_html/index.php on line 27 Lines 26-33 below: <?php $smilek = $_GET['id']; $ppalout = $_GET['payout']; $healthy = array("%", "!", "=", "'", ",", "OR", "?", "<", "&", ";"); $yummy = array("", "", "", "", "" ,"", "", "", "", ""); $peee = str_replace($healthy, $yummy, $smilek); $chnpay = str_replace($healthy, $yummy, $ppalout); require_once 'appinclude.php'; require_once 'mystyle.php'; echo '<div align="center"><img src="'.$appcallbackurl.'main.png" width="300" height="150"></div>'; require_once 'ads/topads.php'; ?> <fb:tabs> <fb:tab-item href='<? echo $appCanvasUrl; ?>' title='Lottery' selected='true' /> <fb:tab-item href='<? echo $appCanvasUrl; ?>earn.php' title='Get Tickets' /> <fb:tab-item href='<? echo $appCanvasUrl; ?>payment.php' title='Payment Info' /> <fb:tab-item href='<? echo $appCanvasUrl; ?>history.php' title='Lottery History' /> <fb:tab-item href='<? echo $appCanvasUrl; ?>forum.php' title='Forum' /> <fb:tab-item href='<? echo $appCanvasUrl; ?>invite.php' title='Invite Friends' /> </fb:tabs> <div align="center"> <? $fbid = $facebook->require_login(); $theirip = $_SERVER['REMOTE_ADDR']; if ($fbid == "") { ?>
Hello everyone Hi everyone, I am getting this error: Parse error: syntax error, unexpected '[', expecting ')' in C:\xampp\htdocs\Work\Store\store.php on line 154 when I run the following code: Code: [Select] function categorySearch($sql) { $res = mysqli_query($this->conn,$sql); $this->results='<table>'; while($cRow = mysqli_fetch_array($res)) { function getCategoryName($cRow[0]) $this->results .= '<tr><td style="border: thin solid #000000;">' . $this->cat_str . '</td></tr>'; } $this->results.='</table>'; return $this->results; } Line 154 refers to this line: function getCategoryName($cRow[0]) Can anyone see what the problem is? I'd like to set my own error handler function to clear some session variables, but I do not want to completely replace php's internal error handler message reporting. Is there any way to mimic the internal error message reporting so I can define my own error handler function. function myErrorHandler(){ unset($_SESSION['var']); // HERE EXECUTE Normal PHP error message reporting } Thanks I am trying to create a class and I ran into a problem. The connect function is returning a fatal error on the line below and I can't figure out the issue. $result = $this->conn->query("SELECT unit FROM address");
class database { private $server = "localhost"; private $db_user = "my user"; private $db_pass = "my pass"; private $db_name = "my database"; private $conn; private $result = array(); function connect(){ // Create connection $this->conn = new mysqli($this->server, $this->db_user, $this->db_pass, $this->db_name); if ($this->conn->connect_error) { echo "Not connected, error: " . $mysqli_connection->connect_error; } else { //echo "Connected."; return $this->conn; } public function displayHeader(){ $result = $this->conn->query("SELECT unit FROM address"); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo '<li>' . $row["unit"] . '</li>'; } } else { echo "0 results"; } $conn->close(); } } }
Something strange is happning, line producing the error: if( ($this->subject == "") || ($this->message == "") ){ Any ideas guys? thanks lots!! Hi guys, I am trying to install a script and I am getting this error when loading for the first time kindly assist anyone.
Fatal error: Call to a member function qstr() on a non-object in C:\xampp\htdocs\ipod\functions.php on line 14 <?php require_once('config.php'); function checkwork() { header("location: underwork.php"); echo 'Sorry we are under going work :('; } function get_username ( $id ) { global $db; $query = "SELECT `login` FROM `" . DBPREFIX . "members` WHERE `member_id` = " . $db->qstr ( $id ); if ( $db->RecordCount ( $query ) == 1 ) { $row = $db->getRow ( $query ); return $row->login; } else { return FALSE; } } ?> this being line 14 $query = "SELECT `login` FROM `" . DBPREFIX . "members` WHERE `member_id` = " . $db->qstr ( $id ); Im taking my on-the-job. Code: [Select] <?php $zip = zip_open("zip.zip"); if ($zip) { while ($zip_entry = zip_read($zip)) { $fp = fopen("zip/".zip_entry_name($zip_entry), "w"); if (zip_entry_open($zip, $zip_entry, "r")) { $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)); fwrite($fp,"$buf"); zip_entry_close($zip_entry); fclose($fp); } } zip_close($zip); } ?> my supervisor said that i have a library to add.. im searching on it but i cant find anything.. help pls.. i run this on linux. Hello, i use MySQL with PHP. My php version is 5.2.0. After i connect to the db i use mysql_set_charset in order to change the system variables (character_set_client , character_set_results ,character_set_connection). i do: Code: [Select] if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); mysql_set_charset('utf8',$$link); } else { $$link = mysql_connect($server, $username, $password); mysql_set_charset('utf8',$$link); } I take the error: Fatal error: Call to undefined function mysql_set_charset(). In the manual page for mysql_set_character says: 1."(PHP 5 >= 5.2.3)" --> that means that i have an old php version?? 2."Note: This is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended. " What shall i do in order to solve my problem?? thanks, in advance! can anyone see the problem here i am running php 5.3 on my server and GD seems to be enabled. and my host said it was probably something to do with the captcha files or script. <?php session_start(); /* * File: CaptchaSecurityImages.php * Author: Simon Jarvis * Copyright: 2006 Simon Jarvis * Date: 03/08/06 * Updated: 2007-08-12 by Jenny Ferenc (minor visual changes only) * Requirements: PHP 4/5 with GD and FreeType libraries * Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * http://www.gnu.org/licenses/gpl.html * */ class CaptchaSecurityImages { var $font = 'VeraSe.ttf'; function generateCode($characters) { /* list all possible characters, similar looking characters and vowels have been removed */ $possible = '23456789bcdfghjkmnpqrstvwxyz'; $code = ''; $i = 0; while ($i < $characters) { $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1); $i++; } return $code; } function CaptchaSecurityImages($width=130, $height=40, $characters=6) { $code = $this->generateCode($characters); // font size will be 60% of the image height $font_size = $height * 0.6; $image = @imagecreate($width, $height) or die('Cannot initialize new GD image stream'); // set the colours $background_color = imagecolorallocate($image, 255, 255, 255); $text_color = imagecolorallocate($image, 20, 40, 100); $noise_color = imagecolorallocate($image, 100, 120, 180); // generate random dots in background for( $i=0; $i<($width*$height)/3; $i++ ) { imagefilledellipse($image, mt_rand(0,$width), mt_rand(0,$height), 1, 1, $noise_color); } // generate random lines in background for( $i=0; $i<($width*$height)/150; $i++ ) { imageline($image, mt_rand(0,$width), mt_rand(0,$height), mt_rand(0,$width), mt_rand(0,$height), $noise_color); } // create textbox and add text $textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function'); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function'); // output captcha image to browser header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); $_SESSION['security_code'] = $code; } } $captcha = new CaptchaSecurityImages(); ?> this seems to be the problem line he Code: [Select] $textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function'); [\code] Hi guys. I need some help, because i'm stuck I'm getting this error and cand figure out what im doin wrong. Fatal error: Call to a member function fetch_array() on a non-object in C:\xampp\htdocs\cms\webklex\theme\admin\edit_content.php on line 16. The Code around it: Code: [Select] include "../config/config.php"; $host = htmlspecialchars($_SERVER["HTTP_HOST"]); $uri = rtrim(dirname(htmlspecialchars($_SERVER["PHP_SELF"])), "/\\"); $extra = "show_content.php"; if (empty($_POST["titel"])) { $id = (isset($_GET["id"])) ? (int)$_GET["id"] : false; $result = $db->query("SELECT * FROM `content` WHERE `id` = ".$db->real_escape_string($id).""); $row = $result->fetch_array(MYSQLI_ASSOC); $db->free_result; unset($result); } $ide = (isset($_GET["id"])) ? (int)$_GET["id"] : false; $result = $db->query("SELECT `id_position` FROM `content` WHERE `id` = ".$db->real_escape_string($ide).""); $zeile = $result->fetch_array(MYSQLI_ASSOC); ---->This is line 16 $db->free_result; unset($result); $id_position_real = $zeile['id_position']; if ($id_position_real == 1) { $id_position_real = 1; }else{ $id_position_real= 0; } if ($id_position_real == 1) { $id_position_real_none = 0; }else{ $id_position_real_none = 1; } ?> thanks ThatMSG i've tried whit a lot of solutions from other posts but nothing seems to be working
this part is where im having trouble but i dont know how to get it to work
namespace App\Controllers;
class Home extends BaseController
//Set form validation
//Run form validation
//Get the form data
//Web master email
//Mail settings $this->email->initialize($config);
//Send mail with data
redirect('contact');
}
<div class="header">
<a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a>
<!-- BEGIN NAVIGATION --> I keep getting this error and can not figure out what is wrong: Fatal error: Call to undefined function showcart() in C:\xampp\htdocs\sas\shoppingcart\showcart.php on line 8 I have attached both the showcart.php and the functions.php files any help will be appreciated Thank you John
Hi everyone, Happy New Year in advance! I have the following error occurring :- while ($row = $query_result->fetch_assoc()) { $result[] = $row; } Which is in this query :- public function DbGetAll($queryString) { $query_result = $this->db->query($queryString); $result = array(); while ($row = $query_result->fetch_assoc()) { $result[] = $row; } return $result; }
I'm guessing it's a problem with the sql query but I'm not sure how to fix? The error log also references this file :- MySQL Client Version: 5.1.50-community PHP Version: 5.3.5 Apache Version: 2.2.17 Okay, I am trying to get MySQL to cooperate with PHP. All of my attempts have been unsuccessful. Before you post a reply, please note I have taken these steps before I posted this topic: 1. My libmySQL.dll is in both my php and C:\Windows folder 2a. (Mental note: my installation directory is C:\Program Files\Apache 2.2\php\ext) 2b. The extension_dir in my php.ini file is as follows: Code: [Select] extension_dir = "C:\Program Files\Apache 2.2\php\ext"3. The php.ini file is also in the C:\Windows folder. 4. The extensions that are enabled for php are as follows: Code: [Select] [PHP_MYSQL] extension=php_mysql.dll [PHP_MYSQLI] extension=php_mysqli.dll [PHP_PDO_MYSQL] extension=php_pdo_mysql.dll5. Any section referencing to MySQL in my php info is not showing up. 6. I have tried replacing my php_mysql.dll, didn't work either. Okay, so when I try to install my forums for my website, it returns with this error: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache 2.2\htdocs\forum\upload\includes\class_core.php on line 312 Please notify me of anything that has or will work(ed). I am using tidy_repair_string() function as part of a string filter, the except is below.
/* Tell Tidy to produce XHTML */ $xhtml = tidy_repair_string($html, array('output-xhtml' => true));I am getting a fatal error thrown up as below. I thought tidy_repair_string() is an inbuilt PHP function or is it not? Fatal error: Call to undefined function tidy_repair_string() in C:\wamp\www\APPLICATION-FOLDER\contituency-manager\filter.php on line 14 |