Solved

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

Posted on 2013-06-26
10
230 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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

777 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