Welcome Guest, Not a member yet? Register   Sign In
  Free PHP Encription Software
Posted by: El Forum - 11-08-2008, 04:48 AM - Replies (2)

[eluser]Shahgeb[/eluser]
I need help. I want to encript my site using php encrption software. Anybody can guide me which is best encription software.?
I have already used POBS PHP encription software but after successful encription. Site is not ready to run successfully.


  I have lots of errors in my controller...
Posted by: El Forum - 11-08-2008, 02:33 AM - Replies (4)

[eluser]Udi[/eluser]
Hi.

I have some controller named User,

When I'm running the login() method (wwww.example.com/user/login/)
I get these strange errors:

Quote:Call to a member function isLogged() on a non-object in .... user.php on line 96
Code:
if($this->major->isLogged())

when I comment out this line I get more and more [one after another] errors like this but of other models and libraries..

I upgraded to 1.7, but this problem started even before the upgrade.


  Database error after upgrading to CI 1.7
Posted by: El Forum - 11-07-2008, 10:35 PM - Replies (4)

[eluser]KeyStroke[/eluser]
Hi,

I'm having a problem here after upgrading CodeIgniter from 1.6.3 to 1.7.0 . The application doesn't detect my databases anymore. I keep getting this error:

Quote:A Database Error Occurred

Error Number: 1146

Table 'database1.user' doesn't exist

What could be wrong? I've followed the instructions carefully, and all my database settings are correct.


Your help is much appreciated.


  Problem loading external view
Posted by: El Forum - 11-07-2008, 09:49 PM - Replies (8)

[eluser]xzela[/eluser]
Hi all,

I'm having an issue loading a view from within a view. I continue to get a "An Error Was Encountered" error message when viewing any of the pages.
Here is the source code to the view I'm trying to use:
main_view.php

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
    &lt;link rel="icon" href="&lt;?php echo base_url();?&gt;favicon.ico" type="image/x-icon" /&gt;
    &lt;link rel="shortcut icon" href="&lt;?php echo base_url();?&gt;favicon.ico" type="image/x-icon" /&gt;    
    &lt;?php echo snappy_style('styles.css'); //autoloaded ?&gt;    
    &lt;title&gt;Mango - Main&lt;/title&gt;    
&lt;/head&gt;
&lt;body&gt;
&lt;?php
    $this->load->view('_global\header');
    $this->load->view('_global\menu');
?&gt;
<h1>Welcome to Mango</h1>
<p>Mango is Awesome</p>
&lt;?php
    $this->load->view('_global\footer');
?&gt;
&lt;/body&gt;
&lt;/html&gt;

header.php
Code:
&lt;?php
?&gt;
&lt;!-- START HEADER_VIEW --&gt;
<div id="header">
        <h1>Mango &copy; version 1.428</h1>
        <div style="float: right; height: 25px;">
            Welcome &lt;?php echo $user_data['user_name']; ?&gt; - &lt;?php echo $user_data['ip_address']; ?&gt;
        </div>        
</div>
&lt;!-- END HEADER_VIEW --&gt;
&lt;?php
/* End of file header_view.php */
/* Location: ./system/application/views/header_view.php */
?&gt;
When I load the view within the browser I get the "An Error Was Encountered" and the page stops rendering.

Quote:An Error Was Encountered
Unable to load the requested file: _global\header.php
If i comment out the external views, everything seems to be working. And if i just view the header view by itself, it renders properly. Am I loading these view incorrectly? Is there a better (best practices) way to this?

Let me know what you guys think.

Thanks


  Trying to use MVC
Posted by: El Forum - 11-07-2008, 09:47 PM - Replies (7)

[eluser]d4v0[/eluser]
Hi everybody!
I've been trying to work with with the MVC using CI, but i have some problems! :red:
I'm just a beginner! ... But I want to learn more than CI! Tongue

Well, this is my model: 'mimodelo.php'

Code:
&lt;?PHP
class Mimodelo extends Model
{
    function Mimodelo()
    {
        parent::Model();
    }
    function obtenertodo()
    {
        $datos = array();
        $consulta = $this->db->get("ALL_M_RUB");
        $datos = $consulta->row_array();
        return $datos;
    }
}
?&gt;

As you see, my table's name is ALL_M_RUB.

This is my controller: 'micontrol.php' :cheese:

Code:
&lt;?PHP
class Micontrol extends Controller
{
    function Micontrol()
    {
        parent::Controller();
        $this->load->database();
    }
    
    function index()
    {
        $this->load->model('Mimodelo','',TRUE);
        $data['contenido'] = $this->Mimodelo->obtenertodo();
        $this->load->view('mivista',$data);
    }
}
?&gt;

And finally, this is my view ... but it's incomplete... 'mivista.php' :roll:

Code:
&lt;?PHP
foreach($contenido as $elemento)
{
    //here goes my results
}
?&gt;

That's my poblem..! :-S ... I don't know how to catch the results and show them all!

The fields of my table are 3: 'RUB_ORD' , 'RUB_DES' and 'RUB_STATUS'.

What is missing... or what am i doing bad??

Help! ... =(

Thanks!


  htaccess for PHP-CGI hosting (and use segments with query strings)
Posted by: El Forum - 11-07-2008, 08:11 PM - Replies (13)

[eluser]wiredesignz[/eluser]
This custom .htaccess setup allows you to use uri segments and query strings together and may fix the issue everyone seems to have running CI on PHP-CGI hosting.

The great thing is that CI allows us to use a custom defined uri protocol. (thanks Rick Ellis)

If you want to try this setup then read on.

Set your custom uri protocol in application/config.php

Code:
$config['uri_protocol'] = "APP_PATH";

//enable query strings if required.
$config['enable_query_strings'] = TRUE;

Create your .htaccess file like so
Code:
RewriteEngine On

RewriteBase /

RewriteCond %{ENV:REDIRECT_APP_PATH} !^$
RewriteRule ^(.*)$ - [E=APP_PATH:%{ENV:REDIRECT_APP_PATH}]

RewriteCond %{ENV:APP_PATH} ^$
RewriteRule ^(.*)$ - [E=APP_PATH:/$1]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]

You should be good to go. Good luck.

Credit goes to the folks @ TinyMVC forum for this solution.


  Running CI on Amazon Servers - Trouble with htaccess
Posted by: El Forum - 11-07-2008, 07:10 PM - Replies (6)

[eluser]Xeoncross[/eluser]
Ok, I can't believe that I am having trouble with this - but I can't get htaccess to work on amazons servers!

I have tried all of these and I can't access the page without the "index.php" file in the URL!

Code:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /dev4/
  #RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

Code:
# Deny OR Allow Folder Indexes.
# Since we disable access to PHP files you
# can leave this on without worries.
# OR better yet, create a .htaccess file in
# the dir you want to allow browsing and
# set it to +Indexes
Options -Indexes

Options +FollowSymLinks

# Set the default file for indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
    # mod_rewrite rules
    RewriteEngine on
    
    # The RewriteBase of the system (if you are using this sytem in a sub-folder).
    #RewriteBase /
    #RewriteBase /dev4
    
    # If the file is NOT the index.php file
    RewriteCond %{REQUEST_FILENAME} !index.php
    # Hide all PHP files so none can be accessed by HTTP
    RewriteRule (.*)\.php$ index.php/$1
    
    # If the file/dir is NOT real go to index
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
    
</IfModule>

# If Mod_ewrite is NOT installed go to index.php
<IfModule !mod_rewrite.c>
    ErrorDocument 404 index.php
</IfModule>

The address is something like http://sub.site.com/dev4/
Has anyone ever used the Amazon servers before and knows some trick I don't?


accessing http://sub.site.com/dev4/welcome/ gives me an apache not found error, and accessing http://sub.site.com/dev4/index.php/welcome/ gives me a CI 404 error.

I have removed the $config['index_page'] = ""; as well.


  How do use includes?
Posted by: El Forum - 11-07-2008, 06:03 PM - Replies (5)

[eluser]Nathan Payne[/eluser]
Hey,

I am new to code igniter and want to know how I use includes.

I have started building a web page but don't want to replicate every line of code so includes are the best answer, but how do I use them with code igniter?

Thanks


  General PHP load question!
Posted by: El Forum - 11-07-2008, 06:00 PM - Replies (1)

[eluser]Lazos[/eluser]
I have this LOOP in my script. I was wondering if that will make the website really slow or PHP/Apache will handle them without a problem. Let's say for example this loop it will execute 30 times every time I visit the particular page.

What do you think?

Code:
function deleteContent ($array) {
        if (array_key_exists('Remove Pages', $this->groupperms) && (array_key_exists('Modify Any Page', $this->groupperms)) && (!$this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
            return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
        } else
        {
            if (!array_key_exists('Remove Pages', $this->groupperms) && (!array_key_exists('Modify Any Page', $this->groupperms)) && (!$this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
            return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
            } else
            {
                if (!array_key_exists('Remove Pages', $this->groupperms) && (!array_key_exists('Modify Any Page', $this->groupperms)) && ($this->CI->contentmodel->hasChild($array['content_id'])) && (!$this->CI->contentmodel->getOwnership($array['content_id'], $this->userid))) {
                return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
                } else
                {
                    if (array_key_exists('Remove Pages', $this->groupperms) && (array_key_exists('Modify Any Page', $this->groupperms)) && ($this->CI->contentmodel->hasChild($array['content_id']))) {
            return '<a href="deletecontent.php?content_id='.$array['content_id'].'">'.$this->CI->admin_theme->displayImage('images/admin/icons/system/delete.gif', $this->CI->lang->line('delete'), '', '','systemicon').'</a>';
                    }
                }
            }
        }
    }


  Using javascript files
Posted by: El Forum - 11-07-2008, 03:32 PM - Replies (2)

[eluser]diego.greyrobot[/eluser]
I love the way codeigniter handles URLs so that they are portable when deploying an app to a production server, however, that functionality does not translate easily to javascript unless the js code is on a php page.

How can a base_url variable (or any other for that matter) be passed into an external javascript file? That way i can take all of my javascript out of the head tags of my views (which are there purposefully in order to echo base_url where needed in the js).

Any ideas?


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Asset Minification Packag...
by tarcisiodev1
3 minutes ago
Is it possible to go back...
by ejimenezo
1 hour ago
Error / Shield 1.0.3 + Ci...
by kcs
5 hours ago
SQL server connection not...
by davis.lasis
6 hours ago
Validation | trim causes ...
by Gary
8 hours ago
Problem with session hand...
by Julesb
9 hours ago
External script access to...
by PomaryLinea
9 hours ago
VIRUS reported after Chro...
by InsiteFX
Yesterday, 11:34 PM
Codeigniter4 version 4.5....
by kenjis
Yesterday, 04:10 PM
Cannot access protected p...
by xsPurX
Yesterday, 02:10 PM

Forum Statistics
» Members: 85,492
» Latest member: Cityboybiz
» Forum threads: 77,584
» Forum posts: 376,019

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB