Welcome Guest, Not a member yet? Register   Sign In
500 Internal server error when clicking links
#11

[eluser]InsiteFX[/eluser]
Code:
// Your setting:
$data['total']=$this->Mc_home->getTotal();

But when you use $data in a view you just use $total CI handles this for you!

Instead of this in a view
$data['total']; <-- see total in $data. in your view you just add a $total

You only need to do this:
$total

Code:
$data = array();

$data['item'] = 'Me';

$this->load->view('your_view', $data);

InsiteFX
#12

[eluser]keld[/eluser]
That's great thank you I didn't know about that. Gonna update my views.
Anyway, hopefully I can find some help in those log files for my other issue...

Actually the reason I was doing that is because in my data array sometimes I have
Code:
$featured['name'];
but also
Code:
$favorite['name'];

Those are the results of 2 different queries in my model, one query that gets the featured recipe and one query that get the user's favorite recipe so if in my view I use $name, hos is CI going to know if I'm talking about the featured one or the favorite one, unless I renamed those variable in my model like $featname and $favname?
#13

[eluser]keld[/eluser]
So I just tried your method anyway and I get this on my page:

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: name
Filename: views/home.php
Line Number: 12
#14

[eluser]keld[/eluser]
Just a quick update, there's nothing wrong with my codeigniter, I transferred my site to a friend's server and it works perfectly. Now what the heck is wrong with godaddy, by default they don't have log files for subdomains so I sent them an email to see what's wrong.
#15

[eluser]InsiteFX[/eluser]
Try to use variables with meningful names will save you a lot trouble latter when you have to track down errors.
Code:
$featured['feat_name'];  // $feat_name
$favorite['fav_name'];   // $fav_name

Also if you have multiple views say in your main view or template you can also do this to pass variables
makes them global to all views see the CodeIgniter User Guide Loader Class.
Code:
$data = array();

$data['item'] = 'Me';

$this->load->vars($data);   // access to all views.
$this->load->view('your_view');

Get hold of your service provider and ask them whats going on!

InsiteFX
#16

[eluser]keld[/eluser]
Ok so I was able to get a error log file, this is what it contained:

[Mon Apr 04 21:58:32 2011] [error] [client XXX.XX.XXX.XXX] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I'm not sure where to put any of those commands...
#17

[eluser]InsiteFX[/eluser]
You need to get hold of your hosting provider and have them track that down for you, 10 to 1 you do not have access to make any type of those changes!

InsiteFX
#18

[eluser]louisl[/eluser]
What PHP versions are the two servers?

What version of CI are you using?

Just an idea - your host maybe PHP 4 and locally you're on PHP 5 or you could be using CI 2 (PHP5) and writing stuff following the book for CI 1.7 (PHP 4) which would cause conflicts.
#19

[eluser]keld[/eluser]
My version of Wamp and my web host are on php 5.3.4.
I'm also using CI 2.0.1
I made a google search about the error that I get, it seems like a lot of people are getting the same error.
Most of the time it comes from the htacess that makes the server go in an infinite loop but I'm using the same htaccess found here in the help file, and my homepage is working so why wouldn't the other ones?
I sent a ticket to my webhost, hopefully I'll get a response by tomorrow morning...
#20

[eluser]keld[/eluser]
So my host provider is checking what's wrong, in the meanwhile I've found an old post on CI forum
http://ellislab.com/forums/viewthread/98013/#523230

and I tried to use the htaccess in there but now it gives me a "no input file specified" error when trying to access a subpage... It's not even a server error, just a blank page with this written at the top.
I don't know why.




Theme © iAndrew 2016 - Forum software by © MyBB