We have a strange project that MUST interact with an MSAccess Database over a linux machine.
After reading different blogs, we have been able to make some readings over existing tables, but, if we try to make an insert or some special queries it fails with a connection has been restarted message.
I'll try to explain all what we have tried.
First of all, we have upgraded our system to the latest version of LAMP because it seems that there were some problems with odbc libraries.
After that, we added the PDO connection as described here.
https: //gist.github.com/amirkdv/9672857
sudo nano /etc/odbcinst.ini
[MDBTools]
Description = MDBTools Driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmdbodbc.so.1
Setup = /usr/lib/x86_64-linux-gnu/odbc/libmdbodbc.so.1
FileUsage = 1
UsageCount = 2
After that, we have restarted apache, and it seems that select queries work correctly.
We have use the following examples with some small modifications.
http://coursesweb.net/php-mysql/pdo-select-query-fetch
Our database have a table call test with the following information:
CREATE TABLE `test` (
`Id` INTEGER NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50),
`surname` VARCHAR(50),
`count` INTEGER
) ENGINE=myisam DEFAULT CHARSET=utf8;
SET autocommit=1;
INSERT INTO `test` () VALUES (1, 'john', 'smith', 100);
INSERT INTO `test` () VALUES (2, 'Mary', 'simmons', 200);
INSERT INTO `test` () VALUES (3, 'Jane', 'Black', 300);
If I launch the following php file
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Ejemplo de ODBC</title>
<body>
<?php
$mdb_file="/var/www/Temp/Example.mdb";
$uname = explode(" ",php_uname());
$os = $uname[0];
switch ($os){
case 'Windows':
$driver = '{Microsoft Access Driver (*.mdb)}';
break;
case 'Linux':
$driver = 'MDBTools';
break;
default:
exit("Don't know about this OS");
}
try{
$connect_string = "Driver={$driver};DBQ={$mdb_file};";
$dataSourceName = "odbc:" . $connect_string;
$connection = new PDO($dataSourceName);
$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$query = 'SELECT id, name, surname FROM test';
$result = $connection->query($query);
// If the SQL query is succesfully performed ($result not false)
if($result !== false) {
// Parse the result set
foreach($result as $row) {
print_r ("<br>");
print_r ($row);
}
}
$connection = null;
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
die();
} catch (Exception $e) {
echo "Exception: <br>".$e->getMessage();
die();
}
?>
</body>
</html>
As a result we get the following rows:
Array ( [id] => 1 [0] => 1 [count] => 100 [1] => 100 [name] => john [2] => john [surname] => smith [3] => smith )
Array ( [id] => 2 [0] => 2 [count] => 200 [1] => 200 [name] => Mary [2] => Mary [surname] => simmons [3] => simmons )
Array ( [id] => 3 [0] => 3 [count] => 300 [1] => 300 [name] => Jane [2] => Jane [surname] => Black [3] => Black )
So selects seems to work.
Now if I try an easy insert
$query = 'insert into test (id, count) values (4,400)';
$result = $connection->query($query);
I receive a message of reset connection:
La conexión al servidor fue reiniciada mientras la página se cargaba.
El sitio podría estar no disponible temporalmente o demasiado ocupado. Vuelva a intentarlo en unos momentos.
Si no puede cargar ninguna página, compruebe la conexión de red de su equipo.
Si su equipo o red están protegidos por un cortafuegos o proxy, asegúrese de que Firefox tiene permiso para acceder a la web.
So I have added debug over php
http: //jrs-s.net/2012/05/24/enabling-core-dumps-on-apache2-2-on-debian/
sudo apt-get install apache2-dbg libapr1-dbg libaprutil1-dbg
sudo nano /etc/apache2/apache2.conf
CoreDumpDirectory /tmp/apache2-dumps
mkdir /tmp/apache2-dumps ;
chmod 777 /tmp/apache2-dumps
sudo /etc/init.d/apache2 restart
And after launching my php file I see that on the dump folder I have a new core file.
So I exec sudo gdb apache2 /tmp/apache2-dumps/core
and when I get the (gdb) prompt I exec "bt" command getting the following info:
#0 0x00007ff38c49c3b1 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ff38c55a344 in __vsprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ff37cbf538f in mdb_sql_error () from /usr/lib/x86_64-linux-gnu/libmdbsql.so.2
#3 0x00007ff37cbf6cbb in ?? () from /usr/lib/x86_64-linux-gnu/libmdbsql.so.2
#4 0x00007ff37cbf6691 in mdb_sql_run_query () from /usr/lib/x86_64-linux-gnu/libmdbsql.so.2
#5 0x00007ff37d012640 in ?? () from /usr/lib/x86_64-linux-gnu/odbc/libmdbodbc.so.1
#6 0x00007ff37c4e3c4a in ?? () from /usr/lib/x86_64-linux-gnu/libodbccr.so.1
#7 0x00007ff37ecc3d70 in SQLExecute () from /usr/lib/x86_64-linux-gnu/libodbc.so.1
#8 0x00007ff37e69923c in odbc_stmt_execute (stmt=0x7ff38d203338) at /build/buildd/php5-5.5.12+dfsg/ext/pdo_odbc/odbc_stmt.c:173
#9 0x00007ff3861ff59c in zim_PDO_query (ht=1, return_value=0x7ff38d203280, return_value_ptr=0x0, this_ptr=0x7ff38d202dd0, return_value_used=1) at /build/buildd/php5-5.5.12+dfsg/ext/pdo/pdo_dbh.c:1134
#10 0x00007ff389201819 in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>, return_value_used=<optimized out>) at /build/buildd/php5-5.5.12+dfsg/Zend/zend_dtrace.c:97
#11 0x00007ff3892bc15e in zend_do_fcall_common_helper_SPEC (execute_data=0x7ff38d1cf0c0) at /build/buildd/php5-5.5.12+dfsg/Zend/zend_vm_execute.h:552
#12 0x00007ff3892809c8 in execute_ex (execute_data=0x7ff38d1cf0c0) at /build/buildd/php5-5.5.12+dfsg/Zend/zend_vm_execute.h:363
#13 0x00007ff389201706 in dtrace_execute_ex (execute_data=0x7ff38d1cf0c0) at /build/buildd/php5-5.5.12+dfsg/Zend/zend_dtrace.c:73
#14 0x00007ff389213243 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /build/buildd/php5-5.5.12+dfsg/Zend/zend.c:1316
#15 0x00007ff3891b0f1c in php_execute_script (primary_file=0x7fff3030a700) at /build/buildd/php5-5.5.12+dfsg/main/main.c:2506
#16 0x00007ff3892bf6dd in php_handler (r=0x7ff38d15d0a0) at /build/buildd/php5-5.5.12+dfsg/sapi/apache2handler/sapi_apache2.c:667
#17 0x00007ff38d341008 in ap_run_handler (r=0x7ff38d15d0a0) at config.c:170
#18 0x00007ff38d3415fe in ap_invoke_handler (r=0x7ff38d15d0a0) at config.c:439
#19 0x00007ff38d357e3a in ap_process_async_request (r=0x7ff38d15d0a0) at http_request.c:317
#20 0x00007ff38d357f9f in ap_process_request (r=0x7ff38d15d0a0) at http_request.c:363
#21 0x00007ff38d3544a5 in ap_process_http_sync_connection (c=0x7ff38d165290) at http_core.c:190
#22 ap_process_http_connection (c=0x7ff38d165290) at http_core.c:231
#23 0x00007ff38d34ac48 in ap_run_process_connection (c=0x7ff38d165290) at connection.c:41
#24 0x00007ff389b8a633 in child_main (child_num_arg=<optimized out>) at prefork.c:704
#25 0x00007ff389b8a88c in make_child (s=0x7ff38d2adde0, slot=9) at prefork.c:800
#26 0x00007ff389b8b867 in perform_idle_server_maintenance (p=<optimized out>) at prefork.c:902
#27 prefork_run (_pconf=<optimized out>, plog=<optimized out>, s=<optimized out>) at prefork.c:1090
#28 0x00007ff38d325ed6 in ap_run_mpm (pconf=0x7ff38d2db028, plog=0x7ff38d2a9028, s=0x7ff38d2adde0) at mpm_common.c:98
#29 0x00007ff38d31f448 in main (argc=3, argv=0x7fff3030ae18) at main.c:777
But I don't know how to continue.
Could you help me?
David, hi
It's been a while since I did Access DB import into mysql and unfortunately I do not have access to that system anymore. But as far as I remember most of our strange problems where solved by switching the language settings form utf-8 to iso-8859-1 in the server configuration.
Maybe this is a point into the right direction?
Related
I have been trying to develop an app which works with firebase and I am not a professional of coding.
Actually, my app is working well on the emulator but after 3-5 seconds I get an error message as you can see below:
W/DynamiteModule(11855): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(11855): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(11855): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
W/DynamiteModule(11855): Local module descriptor class for providerinstaller not found.
I/DynamiteModule(11855): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(11855): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
And you can see my dependencies below:
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.14.0+2
image: ^2.0.7
animator: 0.1.4
image_picker: ^0.6.7+7
google_sign_in: ^4.5.3
timeago: 2.0.17
cached_network_image:
firebase_auth: ^0.18.0+1
geolocator: 5.0.1
uuid: ^2.0.0
cupertino_icons: ^0.1.2
path_provider: ^1.6.16
firebase_messaging: ^7.0.0
firebase_storage: ^4.0.0
firebase_core: ^0.5.0
flutter_svg: ^0.19.0
In addition to providerinstaller issue above when I try to upload an image with camera, I get additional error below:
E/flutter (11855): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The getter 'path' was called on null.
E/flutter (11855): Receiver: null
E/flutter (11855): Tried calling: path
E/flutter (11855): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
E/flutter (11855): #1 _UploadPageState.pickImageFromGallery (package:buddiesgram/pages/UploadPage.dart:37:38)
E/flutter (11855): <asynchronous suspension>
E/flutter (11855): #2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19)
E/flutter (11855): #3 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1098:38)
E/flutter (11855): #4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24)
E/flutter (11855): #5 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11)
E/flutter (11855): #6 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5)
E/flutter (11855): #7 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7)
E/flutter (11855): #8 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9)
E/flutter (11855): #9 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12)
E/flutter (11855): #10 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:124:9)
E/flutter (11855): #11 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (11855): #12 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18)
E/flutter (11855): #13 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7)
E/flutter (11855): #14 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19)
E/flutter (11855): #15 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22)
E/flutter (11855): #16 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7)
E/flutter (11855): #17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7)
E/flutter (11855): #18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7)
E/flutter (11855): #19 _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (11855): #20 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (11855): #21 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (11855): #22 _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter (11855): #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
E/flutter (11855):
You can see my code of my upload page below:
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
class UploadPage extends StatefulWidget {
#override
_UploadPageState createState() => _UploadPageState();
}
class _UploadPageState extends State<UploadPage> {
PickedFile file;
captureImageWithCamera() async {
Navigator.pop(context);
final picker = ImagePicker();
PickedFile imageFile = await picker.getImage(
source: ImageSource.camera,
maxHeight: 680,
maxWidth: 970,
);
imageFile = PickedFile(imageFile.path);
setState(() {
this.file = imageFile;
});
}
pickImageFromGallery() async {
Navigator.pop(context);
final picker = ImagePicker();
PickedFile imageFile = await picker.getImage(
source: ImageSource.gallery,
maxHeight: 680,
maxWidth: 970,
);
imageFile = PickedFile(imageFile.path);
setState(() {
this.file = imageFile;
});
}
takeImage(mContext){
return showDialog(
context: mContext,
builder: (context){
return SimpleDialog(
title: Text("New Post", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),),
children: [
SimpleDialogOption(
child: Text("Capture image with camera", style: TextStyle(color: Colors.white),),
onPressed: captureImageWithCamera,
),
SimpleDialogOption(
child: Text("Select image from gallery", style: TextStyle(color: Colors.white),),
onPressed: pickImageFromGallery,
),
SimpleDialogOption(
child: Text("Cancel", style: TextStyle(color: Colors.white),),
onPressed: () => Navigator.pop(context),
),
],
);
}
);
}
displayUploadScreen(){
return Container(
color: Theme.of(context).accentColor.withOpacity(0.5),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.add_a_photo, color: Colors.grey,size: 200.0,),
Padding(
padding: EdgeInsets.only(top: 20.0),
child: RaisedButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(9.0),),
child: Text("Upload Image", style: TextStyle(color: Colors.white, fontSize: 20.0),),
color: Colors.green,
onPressed: () => takeImage(context),
),
),
],
),
);
}
#override
Widget build(BuildContext context) {
return displayUploadScreen();
}
}
If you would like to see my code or other files I would like to share with you. Can you please guide me?
Thank you in advance.
Regards,
Ekin.
Updated July 2021:
There are no defined answers to why these warnings are coming but can follow some steps.
make sure that <uses-permission android:name="android.permission.INTERNET"/> is defined in all the three AndroidManifest.xml files that i.e debug/main/profile.
for some, having <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> in main AndroidManifest file also helps.
Sometimes outdated google play services can also cause these warnings so update google play services this happens mostly in the case of an emulator.
if you are running your app on older device make user that multi-dex is enabled.
to enable multi-dex support add the following code in
app/build.gradle file
defaultConfig {
applicationId "com.example.flutter_test_firebase"
minSdkVersion 16
targetSdkVersion 30
multiDexEnabled true //<= add this line
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
and inside the same file add following dependencies
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation("com.android.support:multidex:1.0.3") // for multi-dex
}
Also make sure that you are using latest firebase plugins.
i don't know where you accessed the firestore package but in my case i was trying to update data but i was actually deleting and creating a new one which don't have the data i need to access in my code. So my only advice is gone be make sure you are not accidently deleting data or trying to access data you don't or will not have by some unknown reason go to your firestore database and make sure your data is as you want it. I have seen answers saying you need to update your google service in your emulator so maybe that might be your case but its not mine if you go to your google play service app in setting and see deactivate that means your emulator is already updated plus it will say update your google play service.
I got the same error when my app starts in emulator, also when I clicked add new data button. Actually my problem is exactly to add new data to Firebase Firestore in Flutter.
I updated the Google Play Services, and it worked for me.
To update the Google Play Services, following:
File > Settings > Appearance & Behavior > System Settings > Android SDK > SDK Tools, and select the Google Play Services and update.
Hope it works.
make sure that <uses-permission android:name="android.permission.INTERNET"/> is defined in all the three AndroidManifest.xml files that i.e debug/main/profile.
This is worked for me
I'm trying to compile a library from this repo. Running make test in the root folder produces an executable file tests that depends on libpcreposix and libpcre. The linking line looks like this:
gfortran -std=f2008 -fall-intrinsics -ffree-line-length-none -Wall -Wextra -Wpedantic -Wno-target-lifetime -Wno-compare-reals -Jbuild.gnu.debug -g -Og -fcheck=bounds,do,mem,pointer,recursion -Isrc -Itests -DUSE_PCRE tests/tests.F90 build.gnu.debug/*.o -lpcreposix -lpcre -o build.gnu.debug/tests
As you can see, the required libraries are linked via -lpcreposix -lpcre and this line executes successfully, producing executable tests, which, however, crashes at runtime. I strongly suspect that this crash has something to do with these libraries, so I ran ldd tests, which showed the following output:
$ ldd build.gnu.debug/tests
linux-vdso.so.1 (0x00007ffe5b481000)
libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007fd307a59000)
libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007fd30790a000)
libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd3078ef000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fd3078a5000)
libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007fd3076b3000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd307e24000)
As you can see, libpcreposix and libpcre and not even on this list. The libraries were installed via sudo apt install libpcre3 libpcre3-dev and I can see them in /usr/lib/x86_64-linux-gnu/libpcreposix.so.3.13 and /usr/lib/x86_64-linux-gnu/libpcre.so.3.13.3. I have added this path to LD_LIBRARY_PATH (which did not even exist before that), but it did not change anything.
$ echo $LD_LIBRARY_PATH
/usr/lib/x86_64-linux-gnu
The executable tests definitely depends on these libraries, but just in case I have also tried to add -Wl,--no-as-needed to the linking line, which also did not change anything. I have tried the exact same sequence of actions on another machine and it worked without issues (and I was able to see the required libraries in the output of ldd), so it has to be related with the setup of my machine. The machine where I have issues is a recently created virtual machine (Ubuntu 20), so I might have forgotten to install of set up something here.
Edit:
Output of linking with -Wl,--verbose:
$ gfortran -std=f2008 -fall-intrinsics -ffree-line-length-none -Wall -Wextra -Wpedantic -Wno-target-lifetime -Wno-compare-reals -Jbuild.gnu.debug -g -Og -fcheck=bounds,do,mem,pointer,recursion -Isrc -Itests -DUSE_PCRE tests/tests.F90 build.gnu.debug/*.o -lpcreposix -lpcre -o build.gnu.debug/tests -Wl,--verbose
GNU ld (GNU Binutils for Ubuntu) 2.34
Supported emulations:
elf_x86_64
elf32_x86_64
elf_i386
elf_iamcu
elf_l1om
elf_k1om
i386pep
i386pe
using internal linker script:
==================================================
/* Script for -pie -z combreloc -z separate-code -z relro -z now */
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
Copying and distribution of this script, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. */
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
"elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SEARCH_DIR("=/usr/local/lib/x86_64-linux-gnu"); SEARCH_DIR("=/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu"); SEARCH_DIR("=/usr/lib/x86_64-linux-gnu64"); SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("=/usr/x86_64-linux-gnu/lib");
SECTIONS
{
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0)); . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
.interp : { *(.interp) }
.note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rela.dyn :
{
*(.rela.init)
*(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
*(.rela.fini)
*(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
*(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
*(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
*(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
*(.rela.ctors)
*(.rela.dtors)
*(.rela.got)
*(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
*(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
*(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
*(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
*(.rela.ifunc)
}
.rela.plt :
{
*(.rela.plt)
*(.rela.iplt)
}
. = ALIGN(CONSTANT (MAXPAGESIZE));
.init :
{
KEEP (*(SORT_NONE(.init)))
}
.plt : { *(.plt) *(.iplt) }
.plt.got : { *(.plt.got) }
.plt.sec : { *(.plt.sec) }
.text :
{
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
*(.text.exit .text.exit.*)
*(.text.startup .text.startup.*)
*(.text.hot .text.hot.*)
*(SORT(.text.sorted.*))
*(.text .stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf.em. */
*(.gnu.warning)
}
.fini :
{
KEEP (*(SORT_NONE(.fini)))
}
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
. = ALIGN(CONSTANT (MAXPAGESIZE));
/* Adjust the address for the rodata segment. We want to adjust up to
the same address within the page on the next page up. */
. = SEGMENT_START("rodata-segment", ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)));
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
.rodata1 : { *(.rodata1) }
.eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
.eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
.gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
/* These sections are generated by the Sun/Oracle C++ compiler. */
.exception_ranges : ONLY_IF_RO { *(.exception_ranges*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
/* Exception handling */
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
.gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
.exception_ranges : ONLY_IF_RW { *(.exception_ranges*) }
/* Thread Local Storage sections */
.tdata :
{
PROVIDE_HIDDEN (__tdata_start = .);
*(.tdata .tdata.* .gnu.linkonce.td.*)
}
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
}
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
}
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
}
.ctors :
{
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin.o(.ctors))
KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
}
.dtors :
{
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
}
.jcr : { KEEP (*(.jcr)) }
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
.dynamic : { *(.dynamic) }
.got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
. = DATA_SEGMENT_RELRO_END (0, .);
.data :
{
*(.data .data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
}
.data1 : { *(.data1) }
_edata = .; PROVIDE (edata = .);
. = .;
__bss_start = .;
.bss :
{
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections.
FIXME: Why do we need it? When there is no .bss section, we do not
pad the .data section. */
. = ALIGN(. != 0 ? 64 / 8 : 1);
}
.lbss :
{
*(.dynlbss)
*(.lbss .lbss.* .gnu.linkonce.lb.*)
*(LARGE_COMMON)
}
. = ALIGN(64 / 8);
. = SEGMENT_START("ldata-segment", .);
.lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
{
*(.lrodata .lrodata.* .gnu.linkonce.lr.*)
}
.ldata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
{
*(.ldata .ldata.* .gnu.linkonce.l.*)
. = ALIGN(. != 0 ? 64 / 8 : 1);
}
. = ALIGN(64 / 8);
_end = .; PROVIDE (end = .);
. = DATA_SEGMENT_END (.);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* DWARF 3 */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF Extension. */
.debug_macro 0 : { *(.debug_macro) }
.debug_addr 0 : { *(.debug_addr) }
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
}
==================================================
/usr/bin/ld: mode elf_x86_64
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o
attempt to open /tmp/ccJNio1k.o succeeded
/tmp/ccJNio1k.o
attempt to open build.gnu.debug/Animals.o succeeded
build.gnu.debug/Animals.o
attempt to open build.gnu.debug/ftlAlgorithmsTests.o succeeded
build.gnu.debug/ftlAlgorithmsTests.o
attempt to open build.gnu.debug/ftlArrayIntAlgorithms.o succeeded
build.gnu.debug/ftlArrayIntAlgorithms.o
attempt to open build.gnu.debug/ftlArrayTests.o succeeded
build.gnu.debug/ftlArrayTests.o
attempt to open build.gnu.debug/ftlDynArrayIntAlgorithms.o succeeded
build.gnu.debug/ftlDynArrayIntAlgorithms.o
attempt to open build.gnu.debug/ftlDynArrayInt.o succeeded
build.gnu.debug/ftlDynArrayInt.o
attempt to open build.gnu.debug/ftlDynArrayLeaky.o succeeded
build.gnu.debug/ftlDynArrayLeaky.o
attempt to open build.gnu.debug/ftlDynArrayMovableLeaky.o succeeded
build.gnu.debug/ftlDynArrayMovableLeaky.o
attempt to open build.gnu.debug/ftlDynArrayPoint2DAlgorithms.o succeeded
build.gnu.debug/ftlDynArrayPoint2DAlgorithms.o
attempt to open build.gnu.debug/ftlDynArrayPoint2D.o succeeded
build.gnu.debug/ftlDynArrayPoint2D.o
attempt to open build.gnu.debug/ftlDynArrayString.o succeeded
build.gnu.debug/ftlDynArrayString.o
attempt to open build.gnu.debug/ftlDynArrayTests.o succeeded
build.gnu.debug/ftlDynArrayTests.o
attempt to open build.gnu.debug/ftlHashMapStringInt.o succeeded
build.gnu.debug/ftlHashMapStringInt.o
attempt to open build.gnu.debug/ftlHashMapStrInt.o succeeded
build.gnu.debug/ftlHashMapStrInt.o
attempt to open build.gnu.debug/ftlHashMapTests.o succeeded
build.gnu.debug/ftlHashMapTests.o
attempt to open build.gnu.debug/ftlHash.o succeeded
build.gnu.debug/ftlHash.o
attempt to open build.gnu.debug/ftlHashSetInt.o succeeded
build.gnu.debug/ftlHashSetInt.o
attempt to open build.gnu.debug/ftlHashSetString.o succeeded
build.gnu.debug/ftlHashSetString.o
attempt to open build.gnu.debug/ftlHashSetTests.o succeeded
build.gnu.debug/ftlHashSetTests.o
attempt to open build.gnu.debug/ftlKinds.o succeeded
build.gnu.debug/ftlKinds.o
attempt to open build.gnu.debug/ftlListIntAlgorithms.o succeeded
build.gnu.debug/ftlListIntAlgorithms.o
attempt to open build.gnu.debug/ftlListInt.o succeeded
build.gnu.debug/ftlListInt.o
attempt to open build.gnu.debug/ftlListLeaky.o succeeded
build.gnu.debug/ftlListLeaky.o
attempt to open build.gnu.debug/ftlListMovableLeaky.o succeeded
build.gnu.debug/ftlListMovableLeaky.o
attempt to open build.gnu.debug/ftlListTests.o succeeded
build.gnu.debug/ftlListTests.o
attempt to open build.gnu.debug/ftlRegex.o succeeded
build.gnu.debug/ftlRegex.o
attempt to open build.gnu.debug/ftlRegexTests.o succeeded
build.gnu.debug/ftlRegexTests.o
attempt to open build.gnu.debug/ftlSharedPtrInt.o succeeded
build.gnu.debug/ftlSharedPtrInt.o
attempt to open build.gnu.debug/ftlSharedPtrTests.o succeeded
build.gnu.debug/ftlSharedPtrTests.o
attempt to open build.gnu.debug/ftlStringAlgorithms.o succeeded
build.gnu.debug/ftlStringAlgorithms.o
attempt to open build.gnu.debug/ftlString.o succeeded
build.gnu.debug/ftlString.o
attempt to open build.gnu.debug/ftlStringTests.o succeeded
build.gnu.debug/ftlStringTests.o
attempt to open build.gnu.debug/ftlTestTools.o succeeded
build.gnu.debug/ftlTestTools.o
attempt to open build.gnu.debug/Leaky.o succeeded
build.gnu.debug/Leaky.o
attempt to open build.gnu.debug/Point2D.o succeeded
build.gnu.debug/Point2D.o
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libpcreposix.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libpcreposix.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libpcreposix.so succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libpcreposix.so
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libpcre.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libpcre.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libpcre.so succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libpcre.so
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libm.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libm.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
attempt to open /lib/x86_64-linux-gnu/libm.so.6 succeeded
/lib/x86_64-linux-gnu/libm.so.6
attempt to open /lib/x86_64-linux-gnu/libmvec.so.1 succeeded
/lib/x86_64-linux-gnu/libmvec.so.1
/lib/x86_64-linux-gnu/libmvec.so.1
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
attempt to open libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1 succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libquadmath.so succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libquadmath.so
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libm.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libm.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libm.so
attempt to open /lib/x86_64-linux-gnu/libm.so.6 succeeded
/lib/x86_64-linux-gnu/libm.so.6
attempt to open /lib/x86_64-linux-gnu/libmvec.so.1 succeeded
/lib/x86_64-linux-gnu/libmvec.so.1
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
attempt to open libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1 succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libc.a failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libc.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libc.so
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libc.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libc.so
attempt to open /lib/x86_64-linux-gnu/libc.so.6 succeeded
/lib/x86_64-linux-gnu/libc.so.6
attempt to open /usr/lib/x86_64-linux-gnu/libc_nonshared.a succeeded
/usr/lib/x86_64-linux-gnu/libc_nonshared.a
(/usr/lib/x86_64-linux-gnu/libc_nonshared.a)elf-init.oS
attempt to open /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 succeeded
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
/usr/lib/x86_64-linux-gnu/libc_nonshared.a
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so succeeded
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
opened script file /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so
attempt to open libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc_s.so.1 failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1 succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.so failed
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o
attempt to open /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o succeeded
/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
libquadmath.so.0 needed by /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so
found libquadmath.so at /usr/lib/gcc/x86_64-linux-gnu/9/libquadmath.so
libgcc_s.so.1 needed by /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so
found libgcc_s.so.1 at /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libgcc_s.so.1
ld-linux-x86-64.so.2 needed by /usr/lib/gcc/x86_64-linux-gnu/9/libgfortran.so
found ld-linux-x86-64.so.2 at /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
I am trying to integrate the Content API for Shopping in OpenCart into my PHP app and getting this error:
Fatal error: Uncaught exception 'GSC_ParseError' with message 'Not
Found' in
/home/public_html/admin/controller/module/GShoppingContent.php:2805
Stack trace: #0
/home/public_html/admin/controller/module/GShoppingContent.php(980):
_GSC_AtomParser::parse('Not Found') #1 /home/public_html/admin/controller/module/contentapi.php(76):
GSC_Client->insertProduct(Object(GSC_Product)) #2 [internal function]:
ControllerModuleContentApi->index(Array) #3
/home//public_html/vqmod/vqcache/vq2-system_modification_system_engine_action.php(71):
call_user_func(Array, Array) #4
/home//public_html/vqmod/vqcache/vq2-system_engine_front.php(89):
Action->execute(Object(Registry)) #5
/home//public_html/vqmod/vqcache/vq2-system_engine_front.php(63):
Front->execute(Object(Action)) #6
/home//public_html/admin/index.php(175):
Front->dispatch(Object(Action), Object(Action)) #7 {main} thrown in
/home//public_html/admin/controller/module/GShoppingContent.php on
line 2805
Here's my code:
require_once('GShoppingContent.php');
class ControllerModuleContentApi extends Controller {
private $error = array();
public function index() {
$this->load->language('module/contentapi');
$this->db->query("
CREATE TABLE IF NOT EXISTS `contentapi` (
`contentapiid` int(11) NOT NULL AUTO_INCREMENT,
`contentapimerchantid` varchar(256) NOT NULL,
`contentapiemail` varchar(256) NOT NULL,
`contentapipassword` varchar(256) NOT NULL,
PRIMARY KEY (`contentapiid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
");
$contentAPI11=$this->db->query("select * from contentapi");
$data['contentapidata'] = $contentAPI11->rows;
if (isset($this->request->post['merchantid']) && isset($this->request->post['GoogleMerchantEmail']) && isset($this->request->post['GoogleMerchantPassword'] )) {
$merchantid=$this->request->post['merchantid'];
$GoogleMerchantEmail=$this->request->post['GoogleMerchantEmail'];
$GoogleMerchantPassword=$this->request->post['GoogleMerchantPassword'];
$primaryid=$this->request->post['primaryid'];
$this->db->query("UPDATE contentapi SET contentapimerchantid='$merchantid',contentapiemail='$GoogleMerchantEmail',contentapipassword='$GoogleMerchantPassword' where contentapiid='$primaryid'");
}
$retrieveapidetails=$this->db->query("select * from contentapi");
if($retrieveapidetails->num_rows>0)
{
$retrieveapidetails1=$retrieveapidetails->rows;
foreach($retrieveapidetails1 as $retrieveapidetails2)
{
$contentapimerchantid=$retrieveapidetails2["contentapimerchantid"];
$contentapiemail=$retrieveapidetails2["contentapiemail"];
$contentapipassword=$retrieveapidetails2["contentapipassword"];
}
$retrieveproducts=$this->db->query("select oc_product.model,oc_product.sku,oc_product.price,oc_product.image,oc_product_description.name,oc_product_description.description from oc_product,oc_product_description where oc_product.product_id=oc_product_description.product_id");
$retrieveproducts1=$retrieveproducts->rows;
$client = new GSC_Client($contentapimerchantid);
$client->login($contentapiemail, $contentapipassword);
foreach($retrieveproducts1 as $retrieveproducts2)
{
$productid=$retrieveproducts2["product_id"];
$productname=$retrieveproducts2["name"];
$productmodel=$retrieveproducts2["model"];
$productprice=$retrieveproducts2["price"];
$productimage=$retrieveproducts2["image"];
$productsku=$retrieveproducts2["sku"];
$productdescription=$retrieveproducts2["description"];
$product = new GSC_Product();
$product->setTitle($productname);
$product->setDescription($productdescription);
$link = 'https://testingsite.com/index.php?route=product/product&product_id=' . $productid;
$product->setProductLink($link);
$product->setSKU($productsku);
$product->setImageLink('https://testingsite.com/'.$productimage);
$product->setBrand($productimage);
$product->setPrice($productprice, 'usd');
$entry = $client->insertProduct($product);
}
}
Part of the log I'm trying to use:
2014-06-27 14:47:48 Error: Fatal Error (4): syntax error, unexpected 'CakeLog' (T_STRING) in [/public_html/Config/log.php, line 5]
2014-06-27 14:47:48 Error: [FatalErrorException] syntax error, unexpected 'CakeLog' (T_STRING)
Stack Trace:
#0 lib/Cake/Error/ErrorHandler.php(204): ErrorHandler::handleFatalError(4, 'syntax error, u...', '/home/...', 5)
#1 [internal function]: ErrorHandler::handleError(4, 'syntax error, u...', '/home/do...', 5, Array)
#2 /home/shared_user/cakephp-git/lib/Cake/Core/App.php(929): call_user_func('ErrorHandler::h...', 4, 'syntax error, u...', '/home/...', 5, Array)
#3 /lib/Cake/Core/App.php(902): App::_checkFatalError()
#4 [internal function]: App::shutdown()
#5 {main}
My logstash 1.4.2 config (using alsmost exact same codec as described here http://logstash.net/docs/1.4.2/codecs/multiline):
input {
file {
type => "cake-error"
path => "/home/user/domains/example.com/public_html/tmp/logs/error.log"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601}"
negate => true
what => "previous"
}
}
}
Only the first error (the one without the PHP stack trace) is outputted. How can I get the other working?
Here is why it's not working: https://github.com/elasticsearch/logstash/issues/1482. The end of a multiline log message can only be determined when a new one comes in.
I installed HTML::TagFilter from CPAN on a Fedora machine
This snippet works just fine on the command line :
my $tf = new HTML::TagFilter;
$tf->deny_tags( { TABLE => {style => ["BORDER-BOTTOM"]} });
$tf->deny_tags( { TABLE => {prevstyle => ['any']} }); $str = $tf->filter($str);
But when the same code is run on Apache, I am getting this error:
[Fri Dec 14 16:11:48 2012] [error] Can't locate object method "new" via
package "HTML::TagFilter" at
/usr/local/lib/perl5/site_perl/5.10.0/HTML/TagFilter.pm line 320.
What could be the source of this error?