Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

  • Index
  •  » ClickCartPro 6
  •  » Weird Error Message - Not Sure What To Do With This/How To Fix It...

#1 12-29-2010 10:05:51

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Weird Error Message - Not Sure What To Do With This/How To Fix It...

Within this code block from ...

Code:

// +--
// | Set up the base URL based on the server port we're running
// | on.  This determines whether the base URL will be SSL or not.
// +--

$current_port = $_SERVER['SERVER_PORT'];

$ssl_port     = $this->globals('khxc.port_ssl');

if ($current_port == $ssl_port) {

     $this->base_url = $this->globals('khxc.url_ssl') . '/';

} else {

     $this->base_url = $this->globals('khxc.url_nonssl') . '/';

} // End of if statement.

$this->globals('khxc_display.base_url',$this->base_url);

// +--
// | Set our default URL argument separator.
// +--

$this->globals('khxc_display.arg_sep','&');

// +--
// | Start buffering output.
// +--

$result = $this->buffer('START');

if ($this->IsError($result)) {$this->cerror = $result; return;}

// +--
// | Return $this.
// +--

return;

} // End of function.

...something is generating the following error:


Code:

KHXC_Error::error: Non-fatal error encountered: Undefined variable: no_text File: /core/KHXC_Display/KHXC_Display.php(482) : eval()'d code Line: 100

...and the error line given is a blank line within the block of code shown above.

The file is a clean, unmodified, version of the original file and, yes, I know that the error is non-fatal ...but, dare I say it, it is bugging me smile ...and I would like to fix it but am not sure what I am looking for (apart from an undeclared variable, which has not helped me isolate the problem so far).

Can anyone help with this, please?

Last edited by Design_Wholesale (12-29-2010 10:06:38)

Offline

 

#2 12-29-2010 10:27:20

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

The eval is done on an included file so you need to determine what is being included and that is where the problem/error is. The included file will have a variable no_text in it as shown in the error message. The included file may be from the includes directory or from code contained in the database.

Offline

 

#3 12-29-2010 10:53:40

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Found it! - Database error with . - Thanks again, Dave.

Are there any plans to implement other databases into CCP? - Not being able to run complete database checks on MySQL is a real headache and a total pain when I am having to run table by table health checks to eliminate problems. - Yes, I know that PHPMyAdmin can do some of these things, but what about MySQL on its own without having to resort to third party software?

Last edited by Design_Wholesale (12-29-2010 11:14:42)

Offline

 

#4 12-29-2010 13:50:03

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Design_Wholesale wrote:

Are there any plans to implement other databases into CCP?

I seriously doubt it. V7 dropped MSSQL because of its limitations and problems.

Design_Wholesale wrote:

Not being able to run complete database checks on MySQL is a real headache and a total pain when I am having to run table by table health checks to eliminate problems

If you need to run table checks on a regular basis I'd be concerned about your installation and/or version of MySQL. I have never had a MySQL installation have a problem that required a check or repair to be run. Sounds like you may be interested in the myisamchk tool which is provided with MySQL. It can do checks and repairs against multiple tables with a single command from the command line.

Offline

 

#5 12-30-2010 10:46:02

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Thanks for the update on the database options and thanks, too, for the info on  ( http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html ), - it looks as though, yes, it can do what I am wanting to do.

I realise, too, that I should be able to do something with a PHP script, but I am not sure how reliable that would be or whether it would be able to correctly pick up on the values being returned by MySQL. - I have added it to our projects list smile .

Anyway, hopefully all is okay for now. - I am not entirely sure what was causing all the problems, but I do know it is important to give group ownership to the HTTPD server with a minimum of  file permissions.

Last edited by Design_Wholesale (12-30-2010 10:47:26)

Offline

 

#6 12-30-2010 11:47:45

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Design_Wholesale wrote:

I realise, too, that I should be able to do something with a PHP script, but I am not sure how reliable that would be or whether it would be able to correctly pick up on the values being returned by MySQL. - I have added it to our projects list smile .

It's extremely reliable. You have to have permission to execute things on the server though and virtually any shared plan will not let that happen. If you can execute things simply add a cron job to call your PHP program to run the checks on a regular basis if that is what it takes in your situation. I still maintain that you should never have to do that with a properly installed MySQL.

Design_Wholesale wrote:

Anyway, hopefully all is okay for now. - I am not entirely sure what was causing all the problems, but I do know it is important to give group ownership to the HTTPD server with a minimum of  file permissions.

Group ownership of what? There is no direct correlation between the Apache server and the MySQL server and the MySQL data directory is almost never anywhere close to where your web files are served from nor near where Apache is.

Offline

 

#7 12-30-2010 16:50:39

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

I have root access to our box, - so no problems in creating a cron job (thank-you). - I agree that regular checks/repairs should not be necessary, so the purpose of the script would be to save me some shell time if I start seeing those locked table error messages in debug, again, after, of course, checking to try and determine why such messages are there in the first place.

I also agree that it should not be necessary to make the database part of the HTTPD server group (should just be mysql:mysql 660), but the cart software simply did not want to know until I made that change. - Maybe because of the damaged tables, maybe not, - I will test further and see if I can make it behave with the default permissions.

Last edited by Design_Wholesale (12-30-2010 16:51:45)

Offline

 

#8 12-30-2010 18:32:50

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Design_Wholesale wrote:

I also agree that it should not be necessary to make the database part of the HTTPD server group (should just be mysql:mysql 660), but the cart software simply did not want to know until I made that change. - Maybe because of the damaged tables, maybe not, - I will test further and see if I can make it behave with the default permissions.

This isn't related to CCP at all, it has to be something with your installation or permissions. CCP itself has no knowledge of Apache or MySQL other than knowing that its, CCP (actually PHP), output will be headed toward some sort of browser and that a call to MySQL functions will result in something happening.

Offline

 

#9 12-31-2010 08:59:00

Design_Wholesale
Member
From: England!
Registered: 11-21-2008
Posts: 1104
Website

Re: Weird Error Message - Not Sure What To Do With This/How To Fix It...

Yes, I realise that, but it still comes down to the fact that the webstore software was not working without the HTTPD group membership being set on the database files.  As it is I have now tested switching the ownership back to the default (mysql:mysql), as I said I would, and can confirm that all appears to be working as expected, with a test transaction passed okay. - Thank-you ...and I have now another horrible problem for you, but I am going to try again to resolve it myself, first smile .

Offline

 
  • Index
  •  » ClickCartPro 6
  •  » Weird Error Message - Not Sure What To Do With This/How To Fix It...

Board footer