Zend php.ini throws error on command line - command-line

I try to run a zend framework script on the command line.
This works well but every time I execute a php script it gives me
a lot of warnings and errors back, What is the problem? and how can I resolve this?
I put the zend php.ini in /etc/ because this dir is used default by my command line, when I try to use 'php -c /usr/local/zend/etc/ script.php' It gaves me the same errors.
errors from command line;
leny-pc:scripts nickyklaasse$ php -i | grep php.ini
Failed loading /usr/local/zend/lib/ZendExtensionManager.so: dlopen(/usr/local/zend/lib/ZendExtensionManager.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/ZendExtensionManager.so: mach-o, but wrong architecture
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/bcmath.so' - dlopen(/usr/local/zend/lib/php_extensions/bcmath.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/bcmath.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/calendar.so' - dlopen(/usr/local/zend/lib/php_extensions/calendar.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/calendar.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/curl.so' - dlopen(/usr/local/zend/lib/php_extensions/curl.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/curl.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/exif.so' - dlopen(/usr/local/zend/lib/php_extensions/exif.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/exif.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/ftp.so' - dlopen(/usr/local/zend/lib/php_extensions/ftp.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/ftp.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/gettext.so' - dlopen(/usr/local/zend/lib/php_extensions/gettext.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/gettext.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/posix.so' - dlopen(/usr/local/zend/lib/php_extensions/posix.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/posix.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/soap.so' - dlopen(/usr/local/zend/lib/php_extensions/soap.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/soap.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/sqlite.so' - dlopen(/usr/local/zend/lib/php_extensions/sqlite.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/sqlite.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/tokenizer.so' - dlopen(/usr/local/zend/lib/php_extensions/tokenizer.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/tokenizer.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/xmlreader.so' - dlopen(/usr/local/zend/lib/php_extensions/xmlreader.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/xmlreader.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/xsl.so' - dlopen(/usr/local/zend/lib/php_extensions/xsl.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/xsl.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/zip.so' - dlopen(/usr/local/zend/lib/php_extensions/zip.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/zip.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/imap.so' - dlopen(/usr/local/zend/lib/php_extensions/imap.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/imap.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/ldap.so' - dlopen(/usr/local/zend/lib/php_extensions/ldap.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/ldap.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/mysql.so' - dlopen(/usr/local/zend/lib/php_extensions/mysql.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/mysql.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/mysqli.so' - dlopen(/usr/local/zend/lib/php_extensions/mysqli.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/mysqli.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/json.so' - dlopen(/usr/local/zend/lib/php_extensions/json.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/json.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/tidy.so' - dlopen(/usr/local/zend/lib/php_extensions/tidy.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/tidy.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/pgsql.so' - dlopen(/usr/local/zend/lib/php_extensions/pgsql.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/pgsql.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/gd.so' - dlopen(/usr/local/zend/lib/php_extensions/gd.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/gd.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/mcrypt.so' - dlopen(/usr/local/zend/lib/php_extensions/mcrypt.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/mcrypt.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/ctype.so' - dlopen(/usr/local/zend/lib/php_extensions/ctype.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/ctype.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/sockets.so' - dlopen(/usr/local/zend/lib/php_extensions/sockets.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/sockets.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/bz2.so' - dlopen(/usr/local/zend/lib/php_extensions/bz2.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/bz2.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/mbstring.so' - dlopen(/usr/local/zend/lib/php_extensions/mbstring.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/mbstring.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/intl.so' - dlopen(/usr/local/zend/lib/php_extensions/intl.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/intl.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/fileinfo.so' - dlopen(/usr/local/zend/lib/php_extensions/fileinfo.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/fileinfo.so: mach-o, but wrong architecture in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/phar.so' - dlopen(/usr/local/zend/lib/php_extensions/phar.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/phar.so: mach-o, but wrong architecture in Unknown on line 0
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /private/etc/php.ini
Thanks in advice,
Nicky

I assume you use mac os x!?
When using php on command line this is the location where php is called from: /usr/bin. To make sure you use the php version that comes with zend server you have to replace the native php that is located in /usr/bin.
First backup your native php files:
sudo mv /usr/bin/php /usr/bin/php.bak
sudo mv /usr/bin/php-cli /usr/bin/php-cli.bak
sudo mv /usr/bin/php-config /usr/bin/php-config.bak
sudo mv /usr/bin/phpize /usr/bin/phpize.bak
Either you copy the above files from /usr/local/zend/bin to /usr/bin OR you create a symbolic link to this files (prefered method!):
sudo ln -s /usr/local/zend/bin/php-config ./php-config and so on ...
At the end /usr/bin should look similar to this:
lrwxr-xr-x 1 root wheel 23 6 Feb 17:40 php -> /usr/local/zend/bin/php
lrwxr-xr-x 1 root wheel 27 25 Dez 23:43 php-cli -> /usr/local/zend/bin/php-cli
-rwxr-xr-x 1 root wheel 23 25 Dez 23:43 php-cli.bak
lrwxr-xr-x 1 root wheel 30 6 Feb 17:42 php-config -> /usr/local/zend/bin/php-config
-rwxr-xr-x 1 root wheel 3776 6 Feb 15:09 php-config.bak
-rwxr-xr-x 1 root wheel 21488656 6 Feb 15:09 php.bak
lrwxr-xr-x 1 root wheel 26 25 Dez 23:44 phpize -> /usr/local/zend/bin/phpize
-rwxr-xr-x 1 root wheel 26 25 Dez 23:44 phpize.bak

Related

MYSQL Workbench cannot find command line client

I'm trying to execute a very simple command from MySQL Workbench in Linux Mint.
Connection to the server seems OK and the server is running.
However, when I try to run a code I get:
"mysql command line client not found. Please fix its path in Preferences -> Administration"
But when I try to select the path /usr/bin/mysql from Administration I cannot even access the /usr path, I get 'permission denied'.
I tried playing around with apparmor, stopping the service to see if that was the case, but no results so far.
UPDATE:
Maybe a bit more Linux Mint related. I tried opening from the command line using the command:
sudo mysql-workbench-community
and I get the following output:
mkdir: cannot create directory '/run/user/0': Permission denied
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Using /snap/mysql-workbench-community/10/usr/lib/x86_64-linux-gnu/libproj.so.
No protocol specified

PHP startup error using CodeIgniter 3

I am getting tbe following error intermittently on my website
A PHP Error was encountered
Severity: Core Warning
Message: PHP Startup: Invalid library (appears to be a Zend Extension, try loading using zend_extension=opcache.so from php.ini)
Filename: Unknown
Line Number: 0
Backtrace:
I am using LAMP with PHP7 and the CodeIgniter installation is standard. The error has no file nor line to investigate, but my host ensures me that the server is correctly configured.
What could be causing this? I cannot even find a reference to opcache in the CodeIgniter 3 source code. (application files are very basic MVC brochureware stuff, so it's nothing the app has added)

Which function to use instead of pci_find_bus in esxi

I am trying to compile a driver for esxi that originally run under linux.
When i try to load it vmkload i get the following error/warning
WARNING: Elf: 1508: Relocation of symbol <pci_find_bus> failed: Unresolved symbol
Because It is not defined in the vmklinux9 - Which one should i use instead?
I just saw it is under ifdef at:
vmkdrivers/src_9/include/linux/pci.h
vmkdrivers/src_9/vmklinux_9/linux/pci/search.c
I get the interface by
pci_get_device_all
got the physical address with
pci_resource_start
And finnaly got the virual adderss with ioreamp

Zend_Form doesn't load on deployment

Can't figure this one out. It worked in my local environment. Everything is at the right place but the server still can't find it:
**Warning: include_once(Zend/Form/Element/TextArea.php) [function.include-once]: failed to open stream: No such file or directory in /is/htdocs/xxxx/www/mensenenjij/library/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Zend/Form/Element/TextArea.php' for inclusion (include_path='/is/htdocs/xxxx/www/mensenenjij/application/../library:/is/htdocs/xxxx/www/mensenenjij/library:.:/usr/share/pear/php5') in /is/htdocs/xxxx/www/mensenenjij/library/Zend/Loader.php on line 146
Fatal error: Class 'Zend_Form_Element_TextArea' not found in /is/htdocs/xxxx/www/mensenenjij/library/Mensenenjij/Form/Contact.php on line 52**
Thanks
I'm assuming by the class it's trying to load, you're using Windows on your local env, and a Linux distro on your deployment server?
If you are, Linux is case sensitive. Try using Zend_Form_Element_Textarea instead.

Debugging on iOS 4.0.1 Device crashing

Trying to fix a bug on iOS 4 but when I debug it crashes with these errors:
SDK is installed in seperate directory as I need to deug 3.1.3 as well
Developer_Xcode3_2_3_iOS_SDK_4_0_1
Device is running 4.0.1
Any ideas? Cheers
[Session started at 2010-07-27 14:26:45 +0100.]
Undefined command: "Developer". Try "help".
Undefined command: "Developer". Try "help".
Undefined command: "Developer". Try "help".
Undefined command: "Developer". Try "help".
GNU gdb 6.3.50-20050815 (Apple version gdb-1470) (Thu May 27 05:54:06 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".Developer_Xcode3_2_3_iOS_SDK_4_0_1/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/usr" /System "/Developer_Xcode3_2_3_iOS_SDK_4_0_1
Developer_Xcode3_2_3_iOS_SDK_4_0_1/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/System" /private/var/mobile/Applications/50A5673A-2D68-4EA2-B033-2CA40C8DFC79 /Users/clearbrian/Documents/Development/IPhoneDevelopment/029.LondonBusMaps/021.Bus.v2a.RedesignWithRoutes_iOs4Recompile/Bus/build/Debug-iphoneos /var/mobile/Applications/50A5673A-2D68-4EA2-B033-2CA40C8DFC79 /Users/clearbrian/Documents/Development/IPhoneDevelopment/029.LondonBusMaps/021.Bus.v2a.RedesignWithRoutes_iOs4Recompile/Bus/build/Debug-iphoneos /Developer "/Developer_Xcode3_2_3_iOS_SDK_4_0_1
Loading program into debugger…
Undefined command: "Developer". Try "help".
Undefined command: "Developer". Try "help".
Developer_Xcode3_2_3_iOS_SDK_4_0_1/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/Developer"
Undefined command: "Developer". Try "help".
Undefined command: "Developer". Try "help".
Developer_Xcode3_2_3_iOS_SDK_4_0_1/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin
Developer_Xcode3_2_3_iOS_SDK_4_0_1/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/Xcode SSHPassKey
tty /dev/ttys001
warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory).
warning: Unable to read symbols from "libxml2.2.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "Foundation" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CFNetwork.framework/CFNetwork" (file not found).
warning: Unable to read symbols from "CFNetwork" (not yet mapped into memory).
warning: Unable to read symbols from "CoreLocation" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/MapKit.framework/MapKit" (file not found).
warning: Unable to read symbols from "MapKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/MessageUI.framework/MessageUI" (file not found).
warning: Unable to read symbols from "MessageUI" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices" (file not found).
warning: Unable to read symbols from "MobileCoreServices" (not yet mapped into memory).
warning: Unable to read symbols from "QuartzCore" (not yet mapped into memory).
warning: Unable to read symbols from "SystemConfiguration" (not yet mapped into memory).
warning: Unable to read symbols from "libsqlite3.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libz.1.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libgcc_s.1.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libSystem.B.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "libobjc.A.dylib" (not yet mapped into memory).
warning: Unable to read symbols from "CoreFoundation" (not yet mapped into memory).
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-407-23
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
(gdb) run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
gdb stack crawl at point of internal error:
0 gdb-arm-apple-darwin 0x0013117d internal_vproblem + 316
1 gdb-arm-apple-darwin 0x001313c1 internal_verror + 43
2 gdb-arm-apple-darwin 0x001313f6 align_down + 0
3 gdb-arm-apple-darwin 0x001825b1 macosx_solib_add + 959
4 gdb-arm-apple-darwin 0x00196394 remote_macosx_complete_create_or_attach + 225
5 gdb-arm-apple-darwin 0x00196a0c remote_macosx_create_inferior + 1083
6 gdb-arm-apple-darwin 0x0006f9ad run_command_1 + 660
7 gdb-arm-apple-darwin 0x0012f132 execute_command + 713
8 gdb-arm-apple-darwin 0x0001bf67 mi_execute_async_cli_command + 226
9 gdb-arm-apple-darwin 0x0001b584 captured_mi_execute_command + 371
10 gdb-arm-apple-darwin 0x0008546f catch_exception + 65
11 gdb-arm-apple-darwin 0x000188e2 mi_execute_command + 163
12 gdb-arm-apple-darwin 0x00018a87 mi_execute_command_wrapper + 50
13 gdb-arm-apple-darwin 0x0008ae51 handle_file_event + 349
14 gdb-arm-apple-darwin 0x0008a818 process_event + 131
/SourceCache/gdb/gdb-1470/src/gdb/macosx/macosx-nat-dyld.c:1547: internal-error: unrecognized shared library breakpoint
A problem internal to GDB has been detected,
further debugging may prove unreliable.
The Debugger has exited with status 1.The Debugger has exited with status 1.
Someone asked had I created symlinks
A few months ago when 3.0.1 came out I had problems getting it to work with XCode and found this help:
Topic : iPhone OS 3.0.1 does not work with xCode
http://discussions.apple.com/thread.jspa?threadID=2103502&tstart=0
So I ran this and it seemed to work.
ln -s /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0\ \(7A341\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.0.1
The symbolic link no longer works so just wondering should I delete it.
Some notes on my installation layout
I have these installation directories:
Developer: 3.1.3 - works - app in AppStore
Developer3_2_Final:
Developer_4_0_Final_Xcode3_2_3:
Developer_Xcode3_2_3_iOS_SDK_4_0_1: This is the version that crashes
The only symbolic link I created was under /Developer
yet crash caused when I use Xcode in /Developer_Xcode3_2_3_iOS_SDK_4_0_1
My app was built in 3.1.3 using /Developer so am loath to remove it.
not a unix guru though am willing to dive in so any pointers gratefully received.
The /Developer_Xcode3_2_3_iOS_SDK_4_0_1 was installed yesterday and I ran the 3.1.3 against it and then debugger when running on device crashed.
So I have done nothing with any of these SDKs except create that symlink months ago and install SDKs above 3.1.3 in seperate directories till I was sure I could build against them.