Solved

Is it possible to have variable or something with out $ symbol ?

Posted on 2013-06-26
10
231 Views
Last Modified: 2013-06-30
I have cakephp application working fine through browser etc., but when I run cron way calling some controller (cron) , I get the below error on this line,

error line -> DEBUG=3;
return $config['Cake.version'] = '2.0.0-dev';

2 ->PHP Parse error:  syntax error, unexpected '=' in /var/www/xxxx/core/cake/config/config.php on line 19

"DEBUG " is it constant or variable ?
0
Comment
Question by:Loganathan Natarajan
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 167 total points
ID: 39280377
Show the code. It does not look correct
In php you have VARs with $ but not FUNCTIONs with $
so
$somevar = config($someparm);
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 39280418
thanks, check the attachment.full code
0
 
LVL 15

Assisted Solution

by:Jagadishwor Dulal
Jagadishwor Dulal earned 83 total points
ID: 39280458
It may be the constant value written in the  config Like below:
Configure::write('debug', 3);

Open in new window

0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 83 total points
ID: 39280461
If that's in the 'configure.php' file, yours does not match what I just downloaded.  If this is a new installation, you should look at getting a newer version of CakePHP.  https://github.com/cakephp/cakephp/tags
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 167 total points
ID: 39280530
Here is an example of a core configuration file

https://github.com/cakephp/cakephp/blob/master/app/Config/core.php

There is no way your statement would work in PHP regardless of framework in my opinion
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39280583
I agree with @mplungjan, I don't see how it would ever work.
0
 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39280638
Better one to reinstall the cakephp framework
0
 
LVL 36

Author Comment

by:Loganathan Natarajan
ID: 39280742
Thanks to all, let me check & back.
0
 
LVL 82

Assisted Solution

by:hielo
hielo earned 83 total points
ID: 39280845
>>or something with out $ symbol ?
In PHP, variables have the '$' prefix, but constants do not.  So, to set DEBUG to 3 (without the '$') you would need to use define():

<?php
define('DEBUG',3);//After this line DEBUG is a constant - you cannot reassign a value to it
echo DEBUG; //should show 3
?>

Open in new window

0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 84 total points
ID: 39281697
Agree with Dave -- reinstall Cake!
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question