Advertisement
Guest User

MySQL Error in Elgg

a guest
Feb 28th, 2012
54
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= -2
  2. AND .owner_guid IN (
  3. SELECT guid_one FROM elgg_entity_relationships
  4. ' at line 1
  5.  
  6. QUERY: SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = v.id JOIN elgg_metastrings n on m.name_id = n.id where m.entity_guid=2 and m.name_id='2' and ( (.access_id = -2
  7. AND .owner_guid IN (
  8. SELECT guid_one FROM elgg_entity_relationships
  9. WHERE relationship='friend' AND guid_two=2
  10. )) OR (.access_id IN (2)
  11. OR (.owner_guid = 2)
  12. OR (
  13. .access_id = 0
  14. AND .owner_guid = 2
  15. )
  16. ) and .enabled='yes') and ( (.access_id = -2
  17. AND .owner_guid IN (
  18. SELECT guid_one FROM elgg_entity_relationships
  19. WHERE relationship='friend' AND guid_two=2
  20. )) OR (.access_id IN (2)
  21. OR (.owner_guid = 2)
  22. OR (
  23. .access_id = 0
  24. AND .owner_guid = 2
  25. )
  26. ) and .enabled='yes') ORDER BY m.id ASC
  27.  
  28. DatabaseException Object
  29. (
  30. [message:protected] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= -2
  31. AND .owner_guid IN (
  32. SELECT guid_one FROM elgg_entity_relationships
  33. ' at line 1
  34.  
  35. QUERY: SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = v.id JOIN elgg_metastrings n on m.name_id = n.id where m.entity_guid=2 and m.name_id='2' and ( (.access_id = -2
  36. AND .owner_guid IN (
  37. SELECT guid_one FROM elgg_entity_relationships
  38. WHERE relationship='friend' AND guid_two=2
  39. )) OR (.access_id IN (2)
  40. OR (.owner_guid = 2)
  41. OR (
  42. .access_id = 0
  43. AND .owner_guid = 2
  44. )
  45. ) and .enabled='yes') and ( (.access_id = -2
  46. AND .owner_guid IN (
  47. SELECT guid_one FROM elgg_entity_relationships
  48. WHERE relationship='friend' AND guid_two=2
  49. )) OR (.access_id IN (2)
  50. OR (.owner_guid = 2)
  51. OR (
  52. .access_id = 0
  53. AND .owner_guid = 2
  54. )
  55. ) and .enabled='yes') ORDER BY m.id ASC
  56. [string:Exception:private] => exception 'DatabaseException' with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= -2
  57. AND .owner_guid IN (
  58. SELECT guid_one FROM elgg_entity_relationships
  59. ' at line 1
  60.  
  61. QUERY: SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = v.id JOIN elgg_metastrings n on m.name_id = n.id where m.entity_guid=2 and m.name_id='2' and ( (.access_id = -2
  62. AND .owner_guid IN (
  63. SELECT guid_one FROM elgg_entity_relationships
  64. WHERE relationship='friend' AND guid_two=2
  65. )) OR (.access_id IN (2)
  66. OR (.owner_guid = 2)
  67. OR (
  68. .access_id = 0
  69. AND .owner_guid = 2
  70. )
  71. ) and .enabled='yes') and ( (.access_id = -2
  72. AND .owner_guid IN (
  73. SELECT guid_one FROM elgg_entity_relationships
  74. WHERE relationship='friend' AND guid_two=2
  75. )) OR (.access_id IN (2)
  76. OR (.owner_guid = 2)
  77. OR (
  78. .access_id = 0
  79. AND .owner_guid = 2
  80. )
  81. ) and .enabled='yes') ORDER BY m.id ASC' in C:\xampp\htdocs\elgg\engine\lib\database.php:187
  82. Stack trace:
  83. #0 C:\xampp\htdocs\elgg\engine\lib\database.php(269): execute_query('SELECT m.*, n.s...', Resource id #43)
  84. #1 C:\xampp\htdocs\elgg\engine\lib\metadata.php(431): get_data('SELECT m.*, n.s...', 'row_to_elggmeta...')
  85. #2 C:\xampp\htdocs\elgg\engine\lib\entities.php(241): get_metadata_byname('2', 'disable_reason')
  86. #3 C:\xampp\htdocs\elgg\engine\lib\entities.php(192): ElggEntity->getMetaData('disable_reason')
  87. #4 C:\xampp\htdocs\elgg\engine\lib\entities.php(264): ElggEntity->get('disable_reason')
  88. #5 C:\xampp\htdocs\elgg\engine\lib\users.php(429): ElggEntity->__get('disable_reason')
  89. #6 C:\xampp\htdocs\elgg\engine\lib\users.php(1706): ElggUser->__get('disable_reason')
  90. #7 C:\xampp\htdocs\elgg\engine\lib\elgglib.php(923): new_user_enable_permissions_check('permissions_che...', 'user', true, Array)
  91. #8 C:\xampp\htdocs\elgg\engine\lib\entities.php(2880): trigger_plugin_hook('permissions_che...', 'user', Array, true)
  92. #9 C:\xampp\htdocs\elgg\engine\lib\entities.php(598): can_edit_entity('2', 2)
  93. #10 C:\xampp\htdocs\elgg\engine\lib\entities.php(1549): ElggEntity->canEdit(2)
  94. #11 C:\xampp\htdocs\elgg\engine\lib\entities.php(1595): can_write_to_container('2', 2, false)
  95. #12 C:\xampp\htdocs\elgg\engine\lib\entities.php(779): create_entity('object', 'plugin', '2', 2, 0, '2')
  96. #13 C:\xampp\htdocs\elgg\engine\lib\objects.php(121): ElggEntity->save()
  97. #14 C:\xampp\htdocs\elgg\engine\lib\plugins.php(531): ElggObject->save()
  98. #15 C:\xampp\htdocs\elgg\mod\access_plus\start.php(31): set_plugin_setting('firstrun', 1, 'access_plus')
  99. #16 C:\xampp\htdocs\elgg\engine\lib\elgglib.php(728): access_plus_init('init', 'system', NULL)
  100. #17 C:\xampp\htdocs\elgg\engine\lib\elgglib.php(804): events('init', 'system', '', NULL, true, NULL)
  101. #18 C:\xampp\htdocs\elgg\engine\start.php(120): trigger_elgg_event('init', 'system')
  102. #19 C:\xampp\htdocs\elgg\engine\handlers\pagehandler.php(13): require_once('C:\xampp\htdocs...')
  103. #20 {main}
  104. [code:protected] => 0
  105. [file:protected] => C:\xampp\htdocs\elgg\engine\lib\database.php
  106. [line:protected] => 187
  107. [trace:Exception:private] => Array
  108. (
  109. [0] => Array
  110. (
  111. [file] => C:\xampp\htdocs\elgg\engine\lib\database.php
  112. [line] => 269
  113. [function] => execute_query
  114. [args] => Array
  115. (
  116. [0] => SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = v.id JOIN elgg_metastrings n on m.name_id = n.id where m.entity_guid=2 and m.name_id='2' and ( (.access_id = -2
  117. AND .owner_guid IN (
  118. SELECT guid_one FROM elgg_entity_relationships
  119. WHERE relationship='friend' AND guid_two=2
  120. )) OR (.access_id IN (2)
  121. OR (.owner_guid = 2)
  122. OR (
  123. .access_id = 0
  124. AND .owner_guid = 2
  125. )
  126. ) and .enabled='yes') and ( (.access_id = -2
  127. AND .owner_guid IN (
  128. SELECT guid_one FROM elgg_entity_relationships
  129. WHERE relationship='friend' AND guid_two=2
  130. )) OR (.access_id IN (2)
  131. OR (.owner_guid = 2)
  132. OR (
  133. .access_id = 0
  134. AND .owner_guid = 2
  135. )
  136. ) and .enabled='yes') ORDER BY m.id ASC
  137. [1] => Resource id #43
  138. )
  139.  
  140. )
  141.  
  142. [1] => Array
  143. (
  144. [file] => C:\xampp\htdocs\elgg\engine\lib\metadata.php
  145. [line] => 431
  146. [function] => get_data
  147. [args] => Array
  148. (
  149. [0] => SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = v.id JOIN elgg_metastrings n on m.name_id = n.id where m.entity_guid=2 and m.name_id='2' and ( (.access_id = -2
  150. AND .owner_guid IN (
  151. SELECT guid_one FROM elgg_entity_relationships
  152. WHERE relationship='friend' AND guid_two=2
  153. )) OR (.access_id IN (2)
  154. OR (.owner_guid = 2)
  155. OR (
  156. .access_id = 0
  157. AND .owner_guid = 2
  158. )
  159. ) and .enabled='yes') and ( (.access_id = -2
  160. AND .owner_guid IN (
  161. SELECT guid_one FROM elgg_entity_relationships
  162. WHERE relationship='friend' AND guid_two=2
  163. )) OR (.access_id IN (2)
  164. OR (.owner_guid = 2)
  165. OR (
  166. .access_id = 0
  167. AND .owner_guid = 2
  168. )
  169. ) and .enabled='yes') ORDER BY m.id ASC
  170. [1] => row_to_elggmetadata
  171. )
  172.  
  173. )
  174.  
  175. [2] => Array
  176. (
  177. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  178. [line] => 241
  179. [function] => get_metadata_byname
  180. [args] => Array
  181. (
  182. [0] => 2
  183. [1] => disable_reason
  184. )
  185.  
  186. )
  187.  
  188. [3] => Array
  189. (
  190. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  191. [line] => 192
  192. [function] => getMetaData
  193. [class] => ElggEntity
  194. [type] => ->
  195. [args] => Array
  196. (
  197. [0] => disable_reason
  198. )
  199.  
  200. )
  201.  
  202. [4] => Array
  203. (
  204. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  205. [line] => 264
  206. [function] => get
  207. [class] => ElggEntity
  208. [type] => ->
  209. [args] => Array
  210. (
  211. [0] => disable_reason
  212. )
  213.  
  214. )
  215.  
  216. [5] => Array
  217. (
  218. [file] => C:\xampp\htdocs\elgg\engine\lib\users.php
  219. [line] => 429
  220. [function] => __get
  221. [class] => ElggEntity
  222. [type] => ->
  223. [args] => Array
  224. (
  225. [0] => disable_reason
  226. )
  227.  
  228. )
  229.  
  230. [6] => Array
  231. (
  232. [file] => C:\xampp\htdocs\elgg\engine\lib\users.php
  233. [line] => 1706
  234. [function] => __get
  235. [class] => ElggUser
  236. [type] => ->
  237. [args] => Array
  238. (
  239. [0] => disable_reason
  240. )
  241.  
  242. )
  243.  
  244. [7] => Array
  245. (
  246. [file] => C:\xampp\htdocs\elgg\engine\lib\elgglib.php
  247. [line] => 923
  248. [function] => new_user_enable_permissions_check
  249. [args] => Array
  250. (
  251. [0] => permissions_check
  252. [1] => user
  253. [2] => 1
  254. [3] => Array
  255. (
  256. [entity] => ElggUser Object
  257. (
  258. [attributes:protected] => Array
  259. (
  260. [guid] => 2
  261. [type] => user
  262. [subtype] => 0
  263. [owner_guid] => 0
  264. [container_guid] => 0
  265. [site_guid] => 1
  266. [access_id] => 2
  267. [time_created] => 1312873815
  268. [time_updated] => 1330424813
  269. [last_action] => 1330424870
  270. [enabled] => yes
  271. [tables_split] => 2
  272. [tables_loaded] => 2
  273. [name] => rob
  274. [username] => *************
  275. [password] => *************
  276. [salt] => 953f2ab6
  277. [email] => *************
  278. [language] => de
  279. [code] => c169a5606902a71cd80a325aeeda9198
  280. [banned] => no
  281. [admin] => yes
  282. [prev_last_action] => 1330424869
  283. [last_login] => 1330424813
  284. [prev_last_login] => 1330338687
  285. )
  286.  
  287. [url_override:protected] =>
  288. [icon_override:protected] =>
  289. [temp_metadata:protected] => Array
  290. (
  291. )
  292.  
  293. [temp_annotations:protected] => Array
  294. (
  295. )
  296.  
  297. [volatile:protected] => Array
  298. (
  299. )
  300.  
  301. [valid:ElggEntity:private] =>
  302. )
  303.  
  304. [user] => ElggUser Object
  305. (
  306. [attributes:protected] => Array
  307. (
  308. [guid] => 2
  309. [type] => user
  310. [subtype] => 0
  311. [owner_guid] => 0
  312. [container_guid] => 0
  313. [site_guid] => 1
  314. [access_id] => 2
  315. [time_created] => 1312873815
  316. [time_updated] => 1330424813
  317. [last_action] => 1330424870
  318. [enabled] => yes
  319. [tables_split] => 2
  320. [tables_loaded] => 2
  321. [name] => rob
  322. [username] => *************
  323. [password] => *************
  324. [salt] => 953f2ab6
  325. [email] => *************
  326. [language] => de
  327. [code] => c169a5606902a71cd80a325aeeda9198
  328. [banned] => no
  329. [admin] => yes
  330. [prev_last_action] => 1330424869
  331. [last_login] => 1330424813
  332. [prev_last_login] => 1330338687
  333. )
  334.  
  335. [url_override:protected] =>
  336. [icon_override:protected] =>
  337. [temp_metadata:protected] => Array
  338. (
  339. )
  340.  
  341. [temp_annotations:protected] => Array
  342. (
  343. )
  344.  
  345. [volatile:protected] => Array
  346. (
  347. )
  348.  
  349. [valid:ElggEntity:private] =>
  350. )
  351.  
  352. )
  353.  
  354. )
  355.  
  356. )
  357.  
  358. [8] => Array
  359. (
  360. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  361. [line] => 2880
  362. [function] => trigger_plugin_hook
  363. [args] => Array
  364. (
  365. [0] => permissions_check
  366. [1] => user
  367. [2] => Array
  368. (
  369. [entity] => ElggUser Object
  370. (
  371. [attributes:protected] => Array
  372. (
  373. [guid] => 2
  374. [type] => user
  375. [subtype] => 0
  376. [owner_guid] => 0
  377. [container_guid] => 0
  378. [site_guid] => 1
  379. [access_id] => 2
  380. [time_created] => 1312873815
  381. [time_updated] => 1330424813
  382. [last_action] => 1330424870
  383. [enabled] => yes
  384. [tables_split] => 2
  385. [tables_loaded] => 2
  386. [name] => rob
  387. [username] => *************
  388. [password] => *************
  389. [salt] => 953f2ab6
  390. [email] => *************
  391. [language] => de
  392. [code] => c169a5606902a71cd80a325aeeda9198
  393. [banned] => no
  394. [admin] => yes
  395. [prev_last_action] => 1330424869
  396. [last_login] => 1330424813
  397. [prev_last_login] => 1330338687
  398. )
  399.  
  400. [url_override:protected] =>
  401. [icon_override:protected] =>
  402. [temp_metadata:protected] => Array
  403. (
  404. )
  405.  
  406. [temp_annotations:protected] => Array
  407. (
  408. )
  409.  
  410. [volatile:protected] => Array
  411. (
  412. )
  413.  
  414. [valid:ElggEntity:private] =>
  415. )
  416.  
  417. [user] => ElggUser Object
  418. (
  419. [attributes:protected] => Array
  420. (
  421. [guid] => 2
  422. [type] => user
  423. [subtype] => 0
  424. [owner_guid] => 0
  425. [container_guid] => 0
  426. [site_guid] => 1
  427. [access_id] => 2
  428. [time_created] => 1312873815
  429. [time_updated] => 1330424813
  430. [last_action] => 1330424870
  431. [enabled] => yes
  432. [tables_split] => 2
  433. [tables_loaded] => 2
  434. [name] => rob
  435. [username] => *************
  436. [password] => *************
  437. [salt] => 953f2ab6
  438. [email] => *************
  439. [language] => de
  440. [code] => c169a5606902a71cd80a325aeeda9198
  441. [banned] => no
  442. [admin] => yes
  443. [prev_last_action] => 1330424869
  444. [last_login] => 1330424813
  445. [prev_last_login] => 1330338687
  446. )
  447.  
  448. [url_override:protected] =>
  449. [icon_override:protected] =>
  450. [temp_metadata:protected] => Array
  451. (
  452. )
  453.  
  454. [temp_annotations:protected] => Array
  455. (
  456. )
  457.  
  458. [volatile:protected] => Array
  459. (
  460. )
  461.  
  462. [valid:ElggEntity:private] =>
  463. )
  464.  
  465. )
  466.  
  467. [3] => 1
  468. )
  469.  
  470. )
  471.  
  472. [9] => Array
  473. (
  474. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  475. [line] => 598
  476. [function] => can_edit_entity
  477. [args] => Array
  478. (
  479. [0] => 2
  480. [1] => 2
  481. )
  482.  
  483. )
  484.  
  485. [10] => Array
  486. (
  487. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  488. [line] => 1549
  489. [function] => canEdit
  490. [class] => ElggEntity
  491. [type] => ->
  492. [args] => Array
  493. (
  494. [0] => 2
  495. )
  496.  
  497. )
  498.  
  499. [11] => Array
  500. (
  501. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  502. [line] => 1595
  503. [function] => can_write_to_container
  504. [args] => Array
  505. (
  506. [0] => 2
  507. [1] => 2
  508. [2] =>
  509. )
  510.  
  511. )
  512.  
  513. [12] => Array
  514. (
  515. [file] => C:\xampp\htdocs\elgg\engine\lib\entities.php
  516. [line] => 779
  517. [function] => create_entity
  518. [args] => Array
  519. (
  520. [0] => object
  521. [1] => plugin
  522. [2] => 2
  523. [3] => 2
  524. [4] => 0
  525. [5] => 2
  526. )
  527.  
  528. )
  529.  
  530. [13] => Array
  531. (
  532. [file] => C:\xampp\htdocs\elgg\engine\lib\objects.php
  533. [line] => 121
  534. [function] => save
  535. [class] => ElggEntity
  536. [type] => ->
  537. [args] => Array
  538. (
  539. )
  540.  
  541. )
  542.  
  543. [14] => Array
  544. (
  545. [file] => C:\xampp\htdocs\elgg\engine\lib\plugins.php
  546. [line] => 531
  547. [function] => save
  548. [class] => ElggObject
  549. [type] => ->
  550. [args] => Array
  551. (
  552. )
  553.  
  554. )
  555.  
  556. [15] => Array
  557. (
  558. [file] => C:\xampp\htdocs\elgg\mod\access_plus\start.php
  559. [line] => 31
  560. [function] => set_plugin_setting
  561. [args] => Array
  562. (
  563. [0] => firstrun
  564. [1] => 1
  565. [2] => access_plus
  566. )
  567.  
  568. )
  569.  
  570. [16] => Array
  571. (
  572. [file] => C:\xampp\htdocs\elgg\engine\lib\elgglib.php
  573. [line] => 728
  574. [function] => access_plus_init
  575. [args] => Array
  576. (
  577. [0] => init
  578. [1] => system
  579. [2] =>
  580. )
  581.  
  582. )
  583.  
  584. [17] => Array
  585. (
  586. [file] => C:\xampp\htdocs\elgg\engine\lib\elgglib.php
  587. [line] => 804
  588. [function] => events
  589. [args] => Array
  590. (
  591. [0] => init
  592. [1] => system
  593. [2] =>
  594. [3] =>
  595. [4] => 1
  596. [5] =>
  597. )
  598.  
  599. )
  600.  
  601. [18] => Array
  602. (
  603. [file] => C:\xampp\htdocs\elgg\engine\start.php
  604. [line] => 120
  605. [function] => trigger_elgg_event
  606. [args] => Array
  607. (
  608. [0] => init
  609. [1] => system
  610. )
  611.  
  612. )
  613.  
  614. [19] => Array
  615. (
  616. [file] => C:\xampp\htdocs\elgg\engine\handlers\pagehandler.php
  617. [line] => 13
  618. [args] => Array
  619. (
  620. [0] => C:\xampp\htdocs\elgg\engine\start.php
  621. )
  622.  
  623. [function] => require_once
  624. )
  625.  
  626. )
  627.  
  628. [previous:Exception:private] =>
  629. )
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement