Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-06-26
10
Medium Priority
?
242 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 668 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 332 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 332 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 668 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 84

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 332 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 111

Assisted Solution

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

824 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