Image uploading and manipulation using codeigniter - php

I'm trying to upload an image and have its thumbs immediately after uploading and get the link(path) when I click the thumbs. So I found this video in youtube that provided me exactly what I needed but I get these errors eventhough I was thorough in following the codes. Everyone in the comments seems to be not having any issues with the codes shown in the vid but me and my friends followed it individualy but we are having the same issues. I really wanted it to work.
Here is the video tutorial I was talking about:
https://www.youtube.com/watch?v=RG0NAVPNvoo
And these are the errors:
A PHP Error was encountered
Severity: Warning
Message: scandir(): Directory name cannot be empty
Filename: models/gallery_model.php
Line Number: 49
A PHP Error was encountered
Severity: Warning
Message: array_diff(): Argument #1 is not an array
Filename: models/gallery_model.php
Line Number: 50
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: models/gallery_model.php
Line Number: 52

Related

How can I correct a string array error message when it appears suddenly?

When accessing a page, I am now receiving the following error message:
Fatal error: Cannot use string offset as an array in
/home/content/01/5335601/html/wp-content/plugins/popup-by-supsystic/modules/popup/mod.php
on line 194
No changes were made to the page or popups. The fatal error just appeared.
Have not tried much since I have no earthly idea about code. I did follow the error message to at least locate line 194.
Line 194:
if(isset($p['params']['main']['hide_for_devices'])
Would like suggestions on how to correct this issue, especially those that I can understand enough to get the fatal error message removed and the content showing again.

html to pdf conversion using tcpdf

$html=$this->load->view('r2013ms/Long_term_agreement',$data);
$obj_pdf->writeHTML($html);
$obj_pdf->Output('Agree.pdf', 'I');
Severity: Notice
Message: Undefined offset: 0
Filename: tcpdf/tcpdf.php
Line Number: 17155
A PHP Error was encountered
Severity: Notice
Message: Undefined offset: 0
Filename: tcpdf/tcpdf.php
Line Number: 17522
TCPDF ERROR: Some data has already been output, can't send PDF file
When you have "TCPDF ERROR: Some data has already been output, can't send PDF file" it's because you have displayed something in screen. Maybe another warning.
Try to put an "#" before the function's call, that will supress the error message
source
if all works fine, you know where search the error

Message: Trying to get property of non-object

I have huge delays on my project... I try to understand what is wrong and I can not find a solution. I get on my page these messages
A PHP Error was encountered Severity: Notice Message: Trying to get
property of non-object Filename: controllers/help.php Line Number: 243
A PHP Error was encountered Severity: Notice Message: Trying to get
property of non-object Filename: controllers/help.php Line Number: 244
A PHP Error was encountered Severity: Notice Message: Trying to get
property of non-object Filename: controllers/help.php Line Number: 245
The lines 243, 244, 245 are as follows on my Controllers
I have created a space between the lines 243, 244, 245 for the image posted here
$this->template->write('meta_title',$school_details->title.'-'.$data['site_setting']['site_name'].' School-'.$meta['title'], TRUE);
$this->template->write('meta_description', $school_details->title.'-'.$data['site_setting']['site_name'].' School-'.$meta['meta_description'], TRUE);
$this->template->write('meta_keyword', $school_details->title.'-'.$data['site_setting']['site_name'].' School-'.$meta['meta_keyword'], TRUE);
on my URL further down I get
also another error which is
A PHP Error was encountered
Severity: Notice Message: Trying to get property of non-object
Filename: default/school_detail.php Line Number: 11
A PHP Error was encountered Severity: Notice Message: Trying to get
property of non-object Filename: default/school_detail.php Line
Number: 14
Now pages 11 to 18 are as follows on my views
<div class="faq_list_div">
<h3 class="faq_heading_title"><?php echo $school_details->title; ?></h3>
<div style="padding-top:13px;">
<?php $content=$school_details->description;
$content=str_replace('KSYDOU','"',$content);
$content=str_replace('KSYSING',"'",$content);
echo $content; ?>
</div>
What is happening? The parameters work well (in English) when i use Greek Language
is another story although is on UTF8
Are you sure $school_details is an object? If it is not set, or not an object, this error will occur.

Codeigniter Tank Auth activation and logout error [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I've started using Tank Auth in my CodeIgniter App, I have followed some tutorial steps to set it up, and as long as it works, it produces lots of error messages during account activation and logout. Here are the errors:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: session_id
Filename: libraries/Session.php
Line Number: 272
A PHP Error was encountered
Severity: Notice
Message: Undefined index: ip_address
Filename: libraries/Session.php
Line Number: 272
A PHP Error was encountered
Severity: Notice
Message: Undefined index: user_agent
Filename: libraries/Session.php
Line Number: 272
A PHP Error was encountered
Severity: Notice
Message: Undefined index: last_activity
Filename: libraries/Session.php
Line Number: 272
A PHP Error was encountered
Severity: Notice
Message: Undefined index: session_id
Filename: libraries/Session.php
Line Number: 288
A PHP Error was encountered
Severity: Notice
Message: Undefined index: last_activity
Filename: libraries/Session.php
Line Number: 289
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /projekt/system/core/Exceptions.php:185)
Filename: libraries/Session.php
Line Number: 675
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /projekt/system/core/Exceptions.php:185)
Filename: helpers/url_helper.php
Line Number: 542
Here's the code at the reference points:
foreach (array('session_id','ip_address','user_agent','last_activity') as $val)
{
unset($custom_userdata[$val]);
$cookie_userdata[$val] = $this->userdata[$val]; //272 line
}
$this->CI->db->where('session_id', $this->userdata['session_id']); //288 line
$this->CI->db->update($this->sess_table_name, array('last_activity' => //289 line $this->userdata['last_activity'], 'user_data' => $custom_userdata));
setcookie( // 675 line
$this->sess_cookie_name,
$cookie_data,
$expire,
$this->cookie_path,
$this->cookie_domain,
$this->cookie_secure
);
It does not look like these errors are serious ones as they are still only on the notice level of the error hierarchy. I would look at the source code of code-igniter and see what's up. The source is worth understanding how to edit and navigate, as it will save time later. Since I have not used Tank Auth I'm not sure what the exact problem is. I would advise setting up var_dump statements in your source to track what it going on. It does look like some either model or session variables do not exist in the context of your library or what ever other third party tool you are using. You might need to declare an instance of codeigniter in order to work with these third party tools as they exist outside the scope of codeigniter.
$_CI =& get_instance(); // creates a CI instance that can exist outside of the MVC setup
You can check out more at this tutorial under the section: Utilizing CodeIgniter Resources within Your Library
http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html

Argument passed to ivXml::setNodeTree()

I have this error:
A PHP Error was encountered
Severity: User Error
Message: Argument passed to ivXml::setNodeTree() must be an instance of ivXmlNode
Filename: /imagevue/include/ivXml.class.php
Line Number: 140
I read a lot of post about this problem, but nothing helped me. I tried to delete file folders.xml, tried to replace folderdata.xml with original one. But nothing helped.

Categories