Solved

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

Posted on 2013-06-26
10
227 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
Comment Utility
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
Comment Utility
thanks, check the attachment.full code
0
 
LVL 15

Assisted Solution

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

Open in new window

0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 83 total points
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 82

Expert Comment

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

Expert Comment

by:Jagadishwor Dulal
Comment Utility
Better one to reinstall the cakephp framework
0
 
LVL 36

Author Comment

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

Assisted Solution

by:hielo
hielo earned 83 total points
Comment Utility
>>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 108

Assisted Solution

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now