php5

PHP Date function output in Italian

Hiya, Trying to output italian dates with date: <?php setlocale(LC_ALL, 'it_IT'); echo date("D d M Y", $row['eventtime']); ?> But it's still coming out in English, any ideas of what else i can do or what's wrong? it has to be script specific and not server wide... Thanks Shadi ...

PHP performance hampered by require()

I ran my code through xdebug profiler and saw more than 30 percent of the time is spent on the require() calls. What is the best way to improve on this? I saw some posts about using __autoload, but there were conflicting statements about it's affect on APC (which we use), and doubts about it's use to improve performance. ...

PHP cURL not returning XML

I'm trying to get character data from www.wowarmory.com using PHP and cURL. The code I have so far is: ... $browser = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3"; $url = "http://www.wowarmory.com/character-sheet.xml?r=Ner'zhul&amp;n=Visar"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_...

PHP function

Possible Duplicate: Convert PHP array string into an array Which function can be used to convert an array into a string ,maintaining your ability to return the string into an array ...

Why won't my cookie value change in PHP 5?

Hi, I have a website where the login info is optionally saved in a cookie (remember me checkbox at login) and when the user logs out, the value of the authentication cookie won't change to expire the cookie allowing logout. The system does work correctly in both the dev and staging servers but for some reason will not work on our produc...

Tools to highlight deprecated functions in PHP4 sources?

Is there any magic tools i can use to scan source code that was written for PHP4 to highlight deprecated functions in PHP5? I'm currently running the latest version of PHP on a server and need to port this code. Is there anything out there that can give me a hand? ...

Calculate Energy Used on Server

Can I use PHP to calculate the energy used on a server I don't have immediate access to? ...

Wordpress uses MySQL fulltext search?

Hello Stack Overflow. I have a PHP/MySQL installation. I'm working on a program that uses a MySQL Fulltext search. I want to reduce the min word length to three. I know I can do this by changing the ft_min_word_length global variable and restarting MySQL. My problem is that the MySQL server is running several other databases, including...

In PHP can you extend a class to the same name?

I'm trying to find out weather I can do this or not. I have a class called Template. and I want to extend that classes functionality in another file, but I don't want to change the name. Do I declare it as class template extends template { // code here function foo() { } } or do I just declare it like this? class ...

Php Imageresize Performance Question

I'm working on an image resize script for php, and had a few questions.. Currently I'm pulling an external URL as the image, and don't really want to store the new image that is going to be re-sized on my server. Here is what I'm trying to do: Have the script resize the image, than encode it the resized image in base64 on the fly. No...

Template system to create pdf in php

I am looking for an open source template engine in the style of smarty or dwoo (preferable dwoo due to its inheritance features) that can be used to create pdf files instead of html. I am not talking about just a pdf library that allows the creation of the function/method calls, but something that allows to create the page content in a s...

How to solve the problem with the use of deprecated function ereg() of PHP 5.3.0 in Drupal 6.13

Anyone knows how to solve the error below ? Deprecated: Function ereg() is deprecated in C:\wamp\www\includes\file.inc on line 895 It is happening after installing Drupal 6.13 on wamp server 2.0i with PHP 5.3.0 ...

Drupal 6.13 Installation - Database Error

I'm using Wampserver 2.0i with php 5.3.0 to install Drupal 6.13. During the installation I'm receiving the message below during the "Set up database" phase Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support. (Currently using Unicode library Standard PHP) ...

How to install latest lighttpd PHP (fastcgi) and MySQL on centOS 5.3

yum always install old version but i want to install latest versions. Thanks. ...

Move namespace from SOAP envelope root to xml payload

I've got a soap envelope that is returned from a encoded RPC PHP service that I wrote that declares a namespace in the root node of the SOAP envelope. However, I want that namespace to be in the root node of the xml payload in the SOAP body. Basically, I want this: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/...

How do I parse XML containing custom namespaces using SimpleXML?

I'm wondering how to parse values in XML that appear to have : in their name. I've been using: $response = file_get_contents($url); $data = simplexml_load_string($response); then doing a: foreach($data->item as $key => $current){ However, one of the latest feeds that I've been given has colons in the name of the feed as seen in ...

AMFPHP vs ZendAMF

Is one 'better' than the other? Doubt that since as I understand both are written by the same author, only Adobe 'officially' supports Zend. My application is composed of 3 parts 1-an image editing tool allowing users to upload images, edit them, then post them to a server. 2-a publicly viewable gallery 3-a private 'admin' tool allowing...

WCF client proxy mishandling returned SOAP envelope

I have a RPC encoded PHP webservice that returns a simple soap envelope with a boolean datatype. When doing the trace on the client side, the soap envelope looks like this right before it goes into the WCF proxy: <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoa...

SimpleXML more tags in 1 element

Hey guys, I want to parse some xml but I don't know how I can get the same tags out of 1 element. I want to parse this: <profile> <name>john</name> <lang>english</lang> <lang>dutch</lang> </profile> So I want to parse the languages that john speaks. how can I do that ? ...

Strange php5.3 problem with apache 2.2 on Windows? anyone?

I have many php script with several iterations on rows from a mysql database, every iteration opens another extra connection to get extra data not included in the original select. Suddenly, somewhere in the middle of theese scripts the Connection from Apache resets while is executing the script (and reading from the mysql database). In ...