Jump to content

twidlar

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by twidlar

  1. Duh. I missed that completely. Thanks. I fixed it. Line 226 {$forumtitle = $forum['title'];} remains an error! Note that in the two functions above that mkposttoolbar() function, I got rid of the error by removing the single quotes in 183: $user = $forum[user]; 186: extract($forumbody[adm]); 204: $nums = $threadbody[posts][no]; I expect warnings when I try to execute tem. All this seemed to start after Firefox updated itself. last Thursday. XDebug ad trouble debugging page to page and showing variables. Eclipse became strange. Is Windows7 part of the problem?/ So maybe I should resinstall or upgrade to current versions. I need to see if this error shows up in my 3 different situations. 1. Debug with Eclipse and XDebug. 2. Run it under XAMPP. 3. Run it on the host under Linux.
  2. Thanks. As you suggested, here is some code. I went back further than 10 lines. function getperm($poster) { global $forum; global $forumbody; $user = $forum[user]; if ($poster == $user) return('O'); extract($forumbody[adm]); if (inlist($poster,$hosts)) return('H'); if (inlist($poster,$participants)) return('M'); if (inlist($poster,$moderated)) return('W'); if (inlist($poster,$readonly)) return('R'); return('G'); } // FIND no IN threadbody[no] function postindex($no) { global $threadbody; $nums = $threadbody[posts][no]; if (empty($nums)) return(FALSE); $i = array_search($no,$nums); // SHOULD BE IN ARRAY if ($i !== FALSE) return($i); for ($i=0,$n=count($nums),$k=FALSE; ($i < $n); $i++) if ($no >= $nums[$i]) // SHOULDN'T FIND EQUAL { $k = $i; break; } // FIND CLOSE return($k); } // TOOLBAR FOR POST PAGES function mkposttoolbar($where='B') // Top/Bottom ASSUME Bottom { global $forumid, $forum, $forumbody; global $threadid, $thread; global $reader; global $sub; global $yourforums; $forumtitle = $forum['title']; $threadtitle = $thread['title']; $readername = ['user']; @extract($forumbody['adm']); if (!$toolbarColor) $toolbarColor = '#EEEEEE'; $id = ($threadid) ? $threadid : $forumid; The 5th line {$user = $forum[user];} used to be {$user = $forum['user'];} producing the same error; Line 226 {$forumtitle = $forum['title'];} (6th from bottom) produces the error -- ( ! ) Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\xampp\htdocs\econcurrent.com\wx\webx\showposts.php on line 226 ==== What makes me think the problem is Eclipse and not PHP is that I had a incident a week ago with another module involving single quotes. I had record arrays like $wx = array('id' => $id, 'cd' => 'P', 'user' => $user, ....... ); One of these keys all of a sudden showed up as 'user not 'user'. I tried to add the ' and it wouldn't take it or any other character. Stuff before and after it could be changed. I discovered the module which was about 6K was now 168K. I cut and pasted the code to EditPad Lite and discovered big chunks of whitespace had been added. I got rid of that and cut and pasted that back to Eclipse and all was OK. I have developed some code that worked fine. A week ago it stopped working right after Firefox updated itself. Now XDebug doesn't go from page to page properly and variables don't show. And I have been having strange problems that look like PHP problems but I don't think are. I am going to have to tear the code apart into small test cases to isolate this nonsense.
  3. Thanks. I have retyped them a few different ways to no effect. I'm going to try some ideas tomorrow. I will let you know.
  4. This is absolutely stupid. I'm debugging PHP in Eclipse PDT with XDebug and XAMPP on Windows 7. A section of code has been working for weeks. Suddenly I'm told the following is a syntax error (line 226) $forumtitle = $forum['title']; $threadtitle = $thread['title']; Eclipse matches bracket and normally clipse would highlight [ when I put the cursor behind ]. Not here. On similar statements before this I changed ' (single quote) to (double quote)". The brackets [ and ] highlighted correctly but the " produced a louder syntax error.. Then I simply removed the single quotes. No syntax error. Brackets match. But I will probably get a syntax error. Usually stupidity like this indicates a quote problem somewhere before this code. After looking very hard, I see none. It feels like something is wrong with the Eclipse editor and something has to be reset. But what? I would appreciate any help.
  5. Makes sense. Here's php.ini for PHP5 on WinXP Eclipse PDT extension_dir = "./ext/" extension=php_curl.dll extension=php_dba.dll extension=php_ldap.dll extension=php_mbstring.dll extension=php_mcrypt.dll extension=php_msql.dll extension=php_mssql.dll extension=php_mysql.dll extension=php_mysqli.dll extension=php_openssl.dll extension=php_pdo.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll extension=php_pdo_sqlite.dll extension=php_soap.dll extension=php_sqlite.dll extension=php_tidy.dll extension=php_xmlrpc.dll extension=php_xsl.dll extension=php_zip.dll zend_extension_ts=.\ZendDebugger.dll I found this. -------- A typical configuration might look like: [mail function] SMTP = smtp.isp.net sendmail_from = me@isp.net --------- So I could do ini_set("SMTP","smtp.sbcglobal.yahoo.com"); // whatever ini_set("smtp_port","25"); ini_set("sendmail_from","a@b.c"); But I read "Authentication (sending mail password to smtp server) is not possible under PHP for windows". This includes Eclipse PDT?
  6. I'm new here, a long term programmer but new to PHP. I've gotten about 20 PHP scripts running on my website by brute force using browser error messages. I've installed Eclipse PDT on WinXP and do all right debugging. Problem: The mail() function returns false. How to I tell Eclipse what my default SMTP server is? Is this the right place to post this question? I also have questions on how to connect to remote debugging and the MySQL server on my website. Thank you.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.