Egroupware Syntax Error Unexpected T_new
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn syntax error, unexpected 'new' (t_new) php7 more about Stack Overflow the company Business Learn more about hiring developers or syntax error unexpected 'new' (t_new) php 7 posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow
Php 7 Parse Error: Syntax Error, Unexpected 'new' (t_new)
Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why am I getting an unexpected T_NEW error in
Call To Undefined Function Set_magic_quotes_runtime
PHP? up vote 1 down vote favorite I created a user model in Code Igniter. class User extends CI_Model { function __construct() { parent::__construct(); } public function new($username, $email, $password, $studentID="") { $this->db->query("INSERT INTO user VALUES (0, '$username', '$email', '$password', '$studentID')"); } } However, I am getting this PHP error. Parse error: syntax error, unexpected T_NEW, expecting T_STRING in /home/davidfaux/testApp/application/models/user.php on line 12 Line 12, by the way, cacti php 7 is this line. public function new($username, $email, $password, $studentID="") { What is a T_NEW? Why am I getting the error? php codeigniter share|improve this question asked Mar 5 '12 at 23:16 David Faux 7,1451366132 2 public function new should be public function newUser. New is for creating instances of classes. And the keyword cannot be used as a function name. BTW Isn´t your code highlighting already telling you this? –PeeHaa Mar 5 '12 at 23:17 add a comment| 2 Answers 2 active oldest votes up vote 10 down vote accepted new is a reserved word for creating new objects, like new Person('Joe'). You should rename your function. See http://php.net/manual/en/reserved.keywords.php for reference. These words have special meaning in PHP. Some of them represent things which look like functions, some look like constants, and so on--but they're not, really: they are language constructs. You cannot use any of the following words as constants, class names, function or method names. Using them as variable names is generally OK, but could lead to confusion. share|improve this answer answered Mar 5 '12 at 23:18 biziclop 11k12750 1 php.net/manual/en/reserved.keywords.php –Matt H. Mar 5 '12 at 23:20 add a comment| up vote 2 down vote Th
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible
Php Pear
with some types of ads) More information about our ad policies X your php installation appears to be missing the mysql extension which is required by wordpress. You seem to have CSS turned off. Please don't fill out this field. You seem to have xampp CSS turned off. Please don't fill out this field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ http://stackoverflow.com/questions/9575590/why-am-i-getting-an-unexpected-t-new-error-in-php ✘ Please provide the ad click URL, if possible: Home Browse EGroupware Enterprise Collaboration Mailing Lists EGroupware Enterprise Collaboration Brought to you by: hnategh, leithoff, ralfbecker Summary Files Reviews Support Wiki Mailing Lists News egroupware-announcement egroupware-core egroupware-cvs egroupware-developers egroupware-docs egroupware-french egroupware-german egroupware-italian egroupware-portuguese egroupware-russian egroupware-spanish egroupware-tracker egroupware-translation egroupware-users [eGroupWare-tracker] Bugs #3237: PHP 5.3 Dependency problem on SLES 11 https://sourceforge.net/p/egroupware/mailman/message/31961885/ SP2 [eGroupWare-tracker] Bugs #3237: PHP 5.3 Dependency problem on SLES 11 SP2 From:
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy https://sourceforge.net/p/egroupware/mailman/message/26675361/ Link", then paste here → (This may not be http://egroupware-german.narkive.com/2Qc91Tvn/parse-error-syntax-error possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. syntax error Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse EGroupware Enterprise Collaboration Mailing Lists EGroupware Enterprise Collaboration Brought to you by: hnategh, leithoff, ralfbecker Summary Files unexpected 'new' (t_new) Reviews Support Wiki Mailing Lists News egroupware-announcement egroupware-core egroupware-cvs egroupware-developers egroupware-docs egroupware-french egroupware-german egroupware-italian egroupware-portuguese egroupware-russian egroupware-spanish egroupware-tracker egroupware-translation egroupware-users [eGroupWare-french] Installation de EGW 1.8 chez OVH mutualisé : erreur PHP [eGroupWare-french] Installation de EGW 1.8 chez OVH mutualisé : erreur PHP From: Cddek
icalsrv und mydms) auf denServer geschobenich habe das in einen Unterordner "egroupware" gesteckt.soweit so gut, wenn ich jetzt aber die installation starten will, kommt derfehler:Parse error: syntax error, unexpected T_STRING, expecting ')' in/var/kunden/webs/******.org/egroupware/phpgwapi/inc/common_functions.inc.phpon line 1393was mache ich denn falsch oder was ist da los?grüße--View this message in context: http://www.nabble.com/Parse-error%3A-syntax-error%2C-tp19982496s3741p19982496.htmlSent from the egroupware-german mailing list archive at Nabble.com. Ralf Becker 2008-10-15 07:37:42 UTC PermalinkRaw Message Ich würde mal sagen, Du hast irgendwie übersehen, dass Dein Server nochPHP4 verwendet, was seit 1.6 nicht mehr unterstützt wird: PHP5.1+RalfPost by hawellhey irgenwie scheitere ich schon am Anfang.ich habe mir eben die egw1.6 (mit pear, gallery, icalsrv und mydms) auf denServer geschobenich habe das in einen Unterordner "egroupware" gesteckt.soweit so gut, wenn ich jetzt aber die installation starten will, kommt derParse error: syntax error, unexpected T_STRING, expecting ')' in/var/kunden/webs/******.org/egroupware/phpgwapi/inc/common_functions.inc.phpon line 1393was mache ich denn falsch oder was ist da los?grüße--Ralf BeckerDirector Software DevelopmentStylite GmbH[open style of IT]Morschheimer Strasse 1567292 Kirchheimbolandenfon +49 (0) 6352 70629-0fax +49 (0) 6352 70629-30cell +49 (0) 170 7815917mailto: ***@stylite.dewww.stylite.dewww.egroupware.org________________________________________________Geschäftsführer Andre Keller, Nigel John Vickers,Gudrun K. Müller und Ralf BeckerRegistergericht Kaiserslautern HRB 12087 ganimed2 2009-02-11 13:37:16 UTC PermalinkRaw Message Guten Tag,nach dem ich mich auch nun schon ein paar Tage mit der Instalationrumschlage stehe ich vor dem gleichen Problem.Aber!Mein Webhoster bietet eine mysql5.0 bzw. nach genauerem hinsehen wohl aucheine 5.1er Datenbank an. Die ich auch nutze.Wo liegt also der Hund noch begraben?mfggmed2Post by Ralf BeckerIch würde mal sagen, Du hast irgendwie übersehen, dass Dein Server nochPHP4 verwendet, was seit 1.6 nicht mehr unterstützt wird: