I followed this # script on my webhost's wiki to setup a custom install of PHP5, but now theyre telling me they need to move my account to a 64-bit server, and I have no idea how to set this up. APC needs the PHP5 installation to use cgi/fastcgi. I Dunno how that applies to 64-bit or what other considerations need to be made.
Does anyone have any…
The page: How to Install PHP 5.2 on IIS 7and Windows Vista (and a few others) reference a mysterious php5isapi.dll which is not in the Windows install, or the zip files:
php-5.3.2-Win32-VC9-x86.zip - VC9 x86 Thread Safe
php-5.3.2-nts-Win32-VC9-x86.zip - VC9 x86 Non Thread Safe
There was another post on stackoverflow that said it's obsolete and…
When I try to install libapache2-mod-php5, I get an error:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:…
so I'm trying to run for the first time the nginx web server with php5-fpm on a debian wheezy server
Hitting a php file display simply File not found
I have done my research (waste a lot of hours actually ;), there are a lot of people that have similar problems, yet I didn't succeed to correct it with what worked for them.
I still have the…
I wanted to install xdebug via MacPorts, trying the terminal command
sudo port install php5-xdebug
But after a while the installation breaks, giving me an error
---> Configuring php5
Error: org.macports.configure for port php5 returned: configure failure: command execution failed
Error: Failed to install php5
Please see the log file…
<b>Howtoforge:</b> "This tutorial shows how to harden PHP5 with Suhosin on a CentOS 5.4 server. From the Suhosin project page: "Suhosin is an advanced protection system for PHP installations that was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core."
<b>HowtoForge: </b>"This tutorial shows how you can install an Apache2 webserver on an Ubuntu 10.04 server with PHP5 support (mod_php) and MySQL support."
All,
I am using PHP 5.3.1 under Ubuntu and using the SOAP package. I am getting the following errors when I include SOAP/Client.php. Any one knows how to get this working?
Thanks
Deprecated: Assigning the return value of new by reference is deprecated in
/opt/lampp/lib/php/SOAP/WSDL.php on line 214
Deprecated: Assigning the…
Is it possible to package PHPUnit tests as a PHAR archive, and run them using phpunit?
I've created a .phar with the follow script:
$cPhar = new Phar('mytests-archive.phar', 0);
$cPhar->addFile('mytest.php');
$stub = <<<ENDSTUB
#! /usr/bin/php
<?php
Phar::mapPhar('mytest-archive.phar');
require…
I'm no stranger to __get(), and have used it to make some very convenient libraries in the past. However, I'm faced with a new challenge (PHP 5.3, abbreviated and simplified my code for this question):
<?php
namespace test;
class View {
function __construct($filename, $varArray) {
…
If I iterate through an array twice, once by reference and then by value, PHP will overwrite the last value in the array if I use the same variable name for each loop. This is best illustrated through an example:
$array = range(1,5);
foreach($array as &$element)
{
$element *= 2;
}…
I'm attempting to use the PHP DateTime class on a server with PHP 5.2.6, with a test server running PHP 5.3. Here is the code:
<?php
try {
$dt = new DateTime('2009-10-08');
$dt->setDate(2009,10,8);
print_r($dt);
}catch (Exception $e) {
echo $e->getMessage();
}
On the…
In PHP 5.2.3, "fdopen" was used to read/write to a file descriptor that's opened by another application.
fdopen(<fileDescriptorId>,"rw"); //It worked fine with PHP 5.2.3
After upgrading PHP to 5.3.2, it's throwing "undefined reference to 'fdopen' function".
Please suggest…
Take a look at this example, and notice the outputs indicated.
<?php
class Mommy
{
protected static $_data = "Mommy Data";
public static function init( $data )
{
static::$_data = $data;
}
public static function showData()
{
echo…
Well, not exactly that, but here is an example. Can anyone explain the difference between B and C? How can it be faster to use a magic function to dynamically set a value instead of simply setting the value in the attribute definition?
Here is some code:
…
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…
I'm wondering if this kind of thing will ever be possible in PHP (and whether it already is and I'm just missing something...)
<?php
function test() {
return array(
'id'=>10,
'name'=>'John'
);
}
echo 'Your name is:…
I have a list of values I have to check my input against it for existence.
What is the faster way?
This is really out of curiosity on how the internals work, not any stuff about premature optimization etc...
1.
…
I have a php code that works well in PHP 5.2 but throwing "Parse error: syntax error, unexpected '}'" after upgrading to PHP 5.3.
When I use echo/print or heredocs to print all the HTML part of the code, the error…
Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: undefined symbol: unixd_config
I spent the last hour or so googling, and it seems that I have to create a new PHP5…
I have two servers which is Ubuntu 12.04 and Ubuntu 14.04. When I use Ubuntu 14.04 in my new server and enabled the php-fpm log file found under /etc/php5/fpm/php-fpm.conf that reads as follows:
error_log =…