I just updated php to 5.3 and can no longer connect to my remote mysql server. I get the following errors:
mysqli_connect(): OK packet 6 bytes shorter than expected
mysqli_connect(): (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication
It seems this has to do with the new mysqlnd driver. Is there a way to force ...
Hi
Is it normal to get the error "Default value for parameters with a class type hint can only be NULL" for a method in an interface defined as
public function nullify(bool $force=FALSE);
?
I need it to be bool, not an object, and FALSE by default.
...
Hello,
I've been using PHP version 5.2 and now need to upgrade to version 5.3 (Windows/Apache). I have been using 5.2 for awhile now and have customized many things in php.ini and added some extra extensions.
How can I upgrade to version 5.3 without having to reconfigure everything? Or does upgrading require that I customize my PHP i...
I'm running a couple of sites and are thinking about moving over to using Nginx instead of Apache and as such I need to move to FCGI where the preferred choice right now seem to be PHP-FPM.
I'm simply wondering about what version of PHP to use. My current sites (using Apache and mod_php i.e. plain vanilla LAMP installation) is using 5.2...
PHP 5.3 has been released some time ago and the developers tried to keep the number of backwards compatibility breaks low. What issues did you find while testing/migrating your code with PHP 5.3?
...
Basically I have a single page on my site that I want any php erorrs, warnings, etc to be sent to me in an email every time the script is run.
Edit: this must be code that is placed on the page, not an edit to php_ini or anything like that.
Edit 2: this needs to catch ALL errors and send ALL errors in one email at the end of the script...
Starting with version 5.3, PHP supports late binding for static methods. While it's an undoubtedly useful feature, there are only several cases where its use is really necessary (e.g. the Active Record pattern).
Consider these examples:
1. Convenience constructors (::create())
class SimpleObject
{
public function __construct() {...
So far, I've seen many different naming conventions used for PHP namespaces. Some people use PascalCase\Just\Like\For\Classes, some use underscored\lower_case\names, some even use the Java convention for package names: com\domain\project\package.
The question is very simple -- can any of these (or other) conventions be called well-establ...
I get this error when I try to use autoload and namespaces:
Fatal error: Class 'Class1' not found in /usr/local/www/apache22/data/public/php5.3/test.php on line 10
Can anyone tell me what I am doing wrong?
Here is my code:
[root@data /usr/local/www/data/public/php5.3]# ls -l
total 8
-rw-r--r-- 1 root wheel 160 Dec 1 23:46 Class1....
Is it possible to change the compression level and/or method used by the ZipArchive class?
...
I'm maintaining library written for PHP 5.2 and I'd like to create PHP 5.3-namespaced version of it. However, I'd also keep non-namespaced version up to date until PHP 5.3 becomes so old, that even Debian stable ships it ;)
I've got rather clean code, about 80 classes following Project_Directory_Filename naming scheme (I'd change them t...
I would like to get started with PHP, and 5.3 release seems to bring many nice features (namespaces, lambda functions, and many others).
I have found some MVC frameworks, and some of them support only PHP 5:
PHP Frameworks
PHP MVC Frameworks
Model–view–controller on Wikipedia
but can anyone recommend one of those MVC frameworks that...
I recently created a Java frontend for a PHP web-service which uses PHPs SoapServer.
My application is performing a long-running data synchronization and from what I know from PHP I prepared myself to get closed connections because of the max_execution_time limit.
But I never get any kind of error, as if the SoapServer instance is runn...
Ok, here's the deal where I'm really stuck.
I use my cms with design patterns.
Where's the last final output(in design template's main file: 'design.php'):
<div>{CONTENT_HEADER}</div>
<div style='float:left;width:25%'>{CONTENT_LEFT}</div>
<div style='float:left;width:50%'>{CONTENT_CENTER}</div>
<div style='float:left;width:25%'>{CONTEN...
How to write this without goto:
ob_start();
$a = 0;
echo "START of LEFT<br />";
begin:
if($a > 0) {
echo "CONTENT LEFT: $a<BR />";
<VERY DIFFICULT ALGORHITM>
goto end;
}
<... ALL THE REST CODE OF LEFT ...>
echo "END of LEFT<br /><br />";
$output1 = ob_get_contents();
ob_end_clean();
ob_start();
echo "START ...
Ok, this is a weird problem, so please bear with me as I explain.
We upgraded our dev servers from PHP 5.2.5 to 5.3.1.
Loading up our code after the switch, we start getting errors like:
Warning: Parameter 2 to mysqli_stmt::bind_param() expected to be a reference, value given in /home/spot/trunk/system/core/Database.class.php on line ...
I had PHP 5.2.2 installed on a previous box (also WinXP Pro sp3) and had gotten the SSH2 extension from http://pecl4win.php.net/ext.php/php_ssh2.dll. Sadly that server seems to be out of commission for now ("The pecl4win build box is temporarily out of service. We're preparing a new build system."). The old DLL doesn't work with the ne...
Writing a PHP extension in C, I want to convert a userland object (IS_OBJECT) to a string through __toString() if it has one, and fail otherwise. What should I use?
I don't need another zval on output, just a char *.
zval *zo;
switch (Z_TYPE_P(zo)) {
case IS_STRING:
... Z_STRVAL_P(zo) ...
break;
case IS_OBJECT:
... ???(zo)...
Hey all.
I was hoping that if I were to define constants in a separate namespace, like:
<?php
namespace config\database\mysql;
const HOST = 'localhost';
const USER = 'testusr';
const PASSWORD = 'testpwd';
const NAME = 'testdb';
?>
That I would be able to use __autoload to automatically include them:
<?php
function __autoload($clas...
Hello,
I was wondering if there is a documentation solution available that supports PHP 5.3. We are having two problems with phpDocumentor. First, it lacks 5.3 support. Second, it requires too much memory when used on our codebase.
Could anyone suggest viable alternatives to phpDocumentor?
Thank you!
...