Class 'Yaf_Application' not found - php

Is anyone know the Yaf Framework ?
I tried to run their sample code from the site and I got the error
Fatal error: Class 'Yaf_Application' not found.
I used the version 2.2.9 , I downloaded the binaries php_yaf-2.2.9-x86-5.4.x-nts-nodebug.dll
as extension of my PHP 5.4.3 and activated the extension.
I put , as suggested, yaf.use_namespace = 0 without success.
Thank you for your help

I have also faced same problem, after some google, I am able to fix this issue.
If you ae using wamp and Win32 means, in php.ini add the following line after extension=php_yaf.dll
yaf.use_spl_autoload=1
yaf.use_namespace=1

I found that my dll does not run on 64bit operating system

Related

Class 'NumberFormatter' not found in Laravel 5.4

I'm trying to use PHP's intl extension to convert amount into words. For example,
1450 -> One Thousand Four Hundred and Fifty
I'm using Laravel 5.4 that runs on XAMPP 3.2.2 server with PHP 5.6.24.
As mentioned in similar questions, I've already enabled the intl PHP extension by uncommenting the line as extension=ext/php_intl.dll in PHP.ini file and restarted my server after.
$inWords = new \NumberFormatter('en', \NumberFormatter::SPELLOUT);
echo $inWords->format(1450);
yields the error:
FatalErrorException: Class 'NumberFormatter' not found
I'm guessing this doesn't have anything to do with Laravel but PHP. Anyone know the solution to the problem? Thanks for your time.
You have to enable the extension in your php.ini by uncommenting the line
;extension=php_intl.dll
You need to use
use \NumberFormatter;
At controller

FOSuserBundle and php 5.5

Ive searched the PHPuserBundle documentation and cannot find any reference to php version support issues.
Ive just upgraded my php version to 5.6 (using XAMPP) and I get the following error when sending to login_check.
Attempted to call function "mb_convert_case" from namespace "FOS\UserBundle\Util
Is it best to stick with 5.4 for now? I tried 5.5 and got the same error. My only reason for wanting to upgrade was to stay up to date, so its not life or death but Im curious.
thanks.
Try to uncomment/add this line in your php.ini:
extension=php_mbstring.dll
Latest version ("friendsofsymfony/user-bundle": "2.0.*#dev") of FOSUSerBundle works with PHP>=5.3.2.
You can check this in packagist.org - https://packagist.org/packages/friendsofsymfony/user-bundle
If you are working under Windows then you must uncomment php_mbstring.dll in php.ini file. Check this answer - mb_convert_case undefined function (Symfony2 FOS/UserBundle)

Class 'Memcache' not found & PHP

I installed memcached by reading this article on Windows7 but unfortunately i keep getting error Fatal error: Class 'Memcache' not found in D:\xampp\htdocs\test\memcache\test.php on line 2
Line 2: $memcache = new Memcache;
Win7 64, Xampp Installed. I am using net start "memcached Server" on command line but it says service is already started.
Some other info which may help;
On php.ini file:
extension=php_memcache.dll
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211
Update: phpinfo(); show dll is not loaded. Tried several different dll files so far, didn't work. Also dll is located correct. It is in the right folder as it seems.
(P.S. Some may think there are possible duplicates about this topic but there is only 1 person who followed the same instructions and had same error in SO. That question has no answer or solution since march.)
I found the working dll files for PHP 5.4.4
I don't knowhow stable they are but they work for sure. Credits goes to this link.
http://x32.elijst.nl/php_memcache-5.4-nts-vc9-x86.zip
http://x32.elijst.nl/php_memcache-5.4-vc9-x86.zip
It is the 2.2.5.0 version, I noticed after compiling it (for PHP
5.4.4).
Please note that it is not 2.2.6 but works. I also mirrored them in my own FTP.
Mirror links:
http://mustafabugra.com/resim/php_memcache-5.4-vc9-x86.zip
http://mustafabugra.com/resim/php_memcache-5.4-nts-vc9-x86.zip
Add this to your php.ini:
extension="php_memcache.dll"
and restart apache
Memcached just uses standard text interface so its possible to use it without the module.
// connect
$link = fsockopen($host,$port,$errno,$errst,$timeout);
// set
$data = sprintf("set %s 0 %s %s\r\n%s\r\n",
$key,$expire,strlen($value),$value);
fwrite($link,$data);
$result = trim(fgets($link));
if ($result == 'ERROR') {
// :(
}
// get
$data = sprintf("get %s\r\n",$key);
fwrite($link,$data);
$line = rtrim(fgets($link));
if ($line != 'END') {
return rtrim(fgets($link));
}
So i have looked now for a solution. Here you can download some compiled extensions.
http://downloads.php.net/pierre/
The problem is that at the moment there is no memcache extension for PHP 5.4. this is the problem why your extension could not be loaded. You need the extension for the correct PHP version and Tead Safe for Windows.
So the easiest way is to work with PHP 5.3 if you need the extension.
The newest version of memcache is the version 3.0.6 but its a beta version you can see it here.
http://pecl.php.net/package/memcache
You could try to take the beta version and compile it with your windows system. But its a lot of work.
Also problem can be in loading another version of php module somewhere in apache .conf files. Need to check duplicated "LoadModule php..." directives and if that module compiled to correct version of apache.
It seems sound simply, but not when you have several versions of php on one machine :)
Or it can be SElinux problem too.
xampp windows version is 32bit ,you must be use 32bit memcache.dll
I hole that would be useful for you!

zeromq php extension for windows

I am using Zend server configured with IIS 7.5. I searched for edit: zeromq php extension, I found these http://valokuva.org/builds/ and http://snapshot.zero.mq/
I have tried to add extension in php.ini and when I enable it form zend admin it shows an error
"The system could not load this extension" and in logs "PHP Startup: Unable to load dynamic library 'C:\Program Files\Zend\ZendServer\lib\phpext\php_zmq.dll' - The specified module could not be found. in Unknown on line 0".
I have tried to build extension (.dll) from source but it also didn't work. On http://www.zeromq.org/bindings:php its written
You will first need to install the ØMQ (2.1.x or higher recommended)
Do I have to install something first on my machine to use this extension as there is only source available or am I placing the file incorrectly?
Although I am running zeromq binding for python and is operating without problem.
Any help or guide is highly appreciated.
For anyone else looking for this, I found it at:
https://github.com/mkoppanen/php-zmq
Specifically:
https://github.com/mkoppanen/php-zmq/issues/62
http://178.79.157.189/~mikko/win32/php-zmq-win32.zip
Try this, it works, I just uploaded it: https://github.com/Polycademy/php_zmq_binaries
--EDIT--
All ZMQ extensions are now in: http://windows.php.net/downloads/pecl/releases/zmq/
I don't use ZMQ on Windows, but on Linux, it also requires the uuid extension.
There's also a problem with also having the ImageMagick extension installed, because the uuid clashes between them. Ensuring that you load zmq before imagik is an effective workaround to that however.
I had the same problem. Using dll from php-zmq_zeromq-{version}-zts folder fixed the problem for me.
I finaly found! Downloading from pear site
[http://pecl.php.net/package/zmq/1.1.1/windows]

why i cannot use php imap functions in my ubuntu and windows?

i need imap function to do a login test, so i can perform a single sign on/single log in like this stackoverflow do with email accounts. when i try the imap_open functions in windows, i got Fatal error:undefined function, but in ubuntu, i don't get anything. any codes bellow the function is not working, but there is no error. can anyone help me?
in ubuntu, i've installed php5-imap,
in windows. i've removed the ";" in front of the extension=imap.dll, i guess thats the thing..
thanks before,,
I've found my mistakes.
I restarted my apache in a wrong way after installing PHP IMAP in ubuntu and removing the ';' in Windows.
thanks for reading.

Categories