connect to mysql database with php issue - php

I'm going to expand my local project (that used mysql database and php ) to web.
i upload all file and changed all addresses to my server.
but my app wont work and i get the error like this in server Error log:
[10-Feb-2014 04:06:38 America/New_York] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so: cannot open shared object file: No such file or directory in Unknown on line 0
my app is load some list of goods. then it can be shown detail and edit.
there is no image.
what is this problem and how I can solve it?

You don't have ImageMagick installed at your server.

In order to use the MagickWand For PHP module's functions, you need to install ImageMagick version 6.3.5, or greater, and the MagickWand for PHP extension source code / DLL. For more detail please see here http://www.magickwand.org/

Related

php_fdf.dll won't work in xampp

I have the most up to date version on Xampp (5.6.20). I have downloaded php_fdf.dll and fdftk.dll and placed them in
C:\xampp\php,
C:\xampp\ext\php,
C:\xampp\apache\bin,
C:\Windows\System32, and
C:\Windows\SysWOW64.
I have them each in all of these places because of advice from various other forum posts. In my php.ini file, I have extension=fdftk.dll, and
extension=php_fdf.dll with my extension directive as follows:
extension_dir="c:\xampp\php\ext".
I have even gone into my Paths on my computer's Environmental Variables and added
C:\xampp\php\ext as a path.
Still every time that I try to utilize a function, say $fdf = fdf_create();, I get
Fatal error: Call to undefined function fdf_create() in
C:\xampp\htdocs\processing.php on line 3
as well as this in the apache error log:
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library)
'fdftk.dll' in Unknown on line 0
PHP Warning: PHP Startup: Unable to
load dynamic library 'c:\xampp\php\ext\php_fdf.dll' - The
specified module could not be found.\r\n in Unknown on line 0
I'm somewhat new to programming, so it's entirely possible that there is something simple that I'm just not aware of, but I've looked through countless forum posts, youtube videos and Xampp, PHP and Apache documentation.
Please help! All I really need is to take HTML form data in my PHP script, then put it into a PDF. It seems like loading the HTML data as FDF with the same field names would be the easiest way to do this (as I had trouble getting PDF forms to communicate properly).
You say you placed the files in C:\xampp\ext\php but extension_dir is c:\xampp\php\ext. ie. ext and php are transposed. Is that a typo or did you really put the files in a different directory than specified by extension_dir?
Also, fdftk.dll is probably not an extension. It's probably used by php_fdf.dll but is not itself an extension. I'd comment that line out.

PHP to print to a server side printer

I am trying to use PHP to print to a server side printer. I have found similar example code that mostly all use the same API’s functions in order to do this task. When I ran it on my server to test the code it was saying “PHP Fatal error: Call to undefined function printer_open()”. So I found at least three different versions of the php_printer.DLL’s for this printer function and tried them all separately . I did some more research and looking into the apache server error log found this warning
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_printer.dll' - The specified module could not be found.\r\n in Unknown on line 0
From this found some Bing search results that said that the reason it is not loading when apache starts up is because it is depend on other libraries. If this is true I have not as yet been able to find which library DLL’s these are and where to get them. This is what I need help with first to basically know if it is not depended then why is the PHP warning being thrown or what library’s do I need.
Thanks for any help
zac
I am running a wampserver2.2
Apache 2.4.2
PHP 5.4.3
OS : windows 7 64 bit
Added to the php.ini file
extension=php_printer.dll
and no errors in the php log
also I did restarted the server each time I change the php.ini file or when I put a new DLL in the *ext* directory
I even put the path to the wamp DLL’s “...\ext\” in the environment variables for windows, as a shot in the dark .
Example code
<?php
/* get the sample text */
$lipsum = "test print";//file_get_contents('lipsum.txt');
phpinfo();
/* open a connection to the printer */
$printer = printer_open("Microsoft XPS Document Writer");
/* write the text to the print job */
printer_write($printer, $lipsum);
/* close the connection */
printer_close($printer);
?>
3/19/2015 edited
I found this site along with a slightly different error message from the php error log.
basically the below link said the error happened because the PHP_printer.dll is complied with a different visual studio c++ version and therefore need to be recompiled. it gives the steps for the most part I still am tring to get it to work
https://community.apachefriends.org/f/viewtopic.php?t=53348&p=204590
Php error:
[18-Mar-2015 22:55:56 UTC] PHP Warning: PHP Startup: printer: Unable
to initialize module Module compiled with module API=20121212 PHP
compiled with module API=20100525 These options need to match in
Unknown on line 0
In case you couldn't found a solution yet....
First of all check in phpinfo() that in the version of wmap server you are using thread safety is enabled or not. Just ctrl+F in the phpinfo() for "thread safety".
Probably thread safety is enabled in the version you are using. Then you have to download the ts(thread safe) version of the php_printer.dll which you can find here....
http://windows.php.net/downloads/pecl/snaps/printer/0.1.0-dev/
download specific file according to your system requirement (OS and others) and copy it in the extension directory of the wamp. Then just enable the extension in the php.ini file like
extension=php_printer.dll
just add this line in the ini file if already not there and there will be no ; at the beginning.
Hope it helps ...

php_printer.dll or some other way to print to network printer

What i'm trying to achieve is invoke a printer to print a file or something when it is generated. The printer is going to be on the same network.
I did some research and found php_printer.dll as a solution.
I'm currently running PHP Version 5.4.25 on my server. I tried to find the required file but the links are all not working. I found a php_printer.dll from an unofficial site and when i tried to install it i got
PHP Warning: PHP Startup: printer: Unable to initialize module\nModule compiled with module API=20060613\nPHP compiled with module API=20100525\nThese options need to match\n in Unknown on line 0
So either if someone has the file or a solution for this problem (i'm guessing the file is outdated that's why it's conflicting with some other extension).
I'm also open to other alternatives as to print directly to the printer without the user having to do something.
Found the correct file and installed it just fine.
Hope it might help someone else
LINK

Getting a warning "PHP Startup: Unable to load dynamic library"

I have setup memcache to work on windows and downloaded the php_memcache.dll file. But now whenever i start my wamp server it shown me a warning as:
PHP Startup: Unable to load dynamic library
"C:/wamp/bin/php/php5.4.12/ext/php_memcache.dll" - %1 is not a valid Win32 application.
What does this warning means.? How can i correct it.
I am working with Windows 7(64bit).
If you know the visual C (VC) version used for building your PHP, be sure to use the same version for the php_memcache.dll (its usually in the name of the archive you get from php.net - i.e. php_blah_blah_VC9_.zip)
No need to build it yourself, you can check the net for build with the same C and the same PHP version.
You may have an issue with your a copy of php_memcache.dll. Try utilizing this file: http://www.sendspace.com/file/uq6srb

Connecting to MSSQL-Server 2008 under Zend server

Hi I'm currently trying to connect to MSSQL-Server-2008 using php on a Zend (web) server.
I've tried out a few things now but always end up getting:
PHP Warning: PHP Startup: Unable to load dynamic library 'E:\Zend\ZendServer\lib\phpext\php_pdo_sqlsrv_53_ts_vc9.dll' - The required module was not found
(sry if the error message sounds a bit strange I translated it manually into english)
First step I did was to download:
Microsoft SQL Server 2008 R2 Native Client
2nd step was that I downloaded:
SQLSRV20.EXE and extracted the files into the phpext directory.
3rd step was that I tried to turn on:
pdo_sqlsrv_53_nts_vc9
and / or
pdo_sqlsrv_53_ts_vc9
And restarted php.
Regardless of what I did I received the above error message.
Thus every time I try to connect to the mssql server I get an error message:
*PHP Fatal error: Call to undefined function sqlsrv_connect()*
Are there any additional steps needed?
(PHP Version I use is: 5.3.9 with a very new version of the zend server).
thanks
In the Zend server itself there are SQL drivers install them along it with general installation.Once the installation is done turn on these extensions sqlsrv,pdo_sqlsrv in the php console.I don't know the exact reason but those extensions which come with SQLSRV20.EXE are not compatible and those cannot be loaded.
Regards,
Sri

Categories