php-5.2 Questions

4

Solved

I have a string value that I'm trying to extract list items for. I'd like to extract the text and any subnodes, however, DOMDocument is converting the entities to the character, instead of leaving ...
Dray asked 8/9, 2011 at 4:56

10

Solved

I've got an Abstract PHP superclass, which contains code that needs to know which subclass its running under. class Foo { static function _get_class_name() { return get_called_class(); //works ...
Henceforward asked 17/8, 2010 at 0:43

9

Solved

I have my site on the server http://www.example.uk.com. On this server I have two domains: one.example two.example I would like to get the current domain using PHP, but if I use $_SERVER['HTTP_HO...
Proteiform asked 23/5, 2012 at 9:36

8

Solved

I have a object having some protected property that I want to get and set. The object looks like Fields_Form_Element_Location Object ( [helper] => formText [_allowEmpty:protected] => 1 [_aut...
Calorimeter asked 2/12, 2013 at 17:33

4

Solved

I recently decided to start a project in Zend Framework 2 and was having trouble getting it to run on a HostGator shared server. By default, HostGator's shared servers run in PHP 5.2.2 and if you ...
Eudosia asked 14/12, 2012 at 23:27

3

Solved

I am not an expert of php, I developed a small service which query a mysql db. However I developed with php 5.4, and then discovered that my web hosting plan has 5.2.6, so I am having few pr...
Zincate asked 21/10, 2012 at 9:4

5

Solved

Since date_parse_from_format( ) is available only in PHP 5.3, I need to write a function that mimics its behaviour in PHP 5.2. Is it possible to write this function for PHP 5.2 and make it work ex...
Gloomy asked 12/7, 2011 at 17:13

10

Solved

I've just got an error. When I try to assign an object like this: $obj_md = new MDB2(); The error I get is "Assigning the return value of new by reference is deprecated". Actually I've b...
Donatello asked 6/7, 2009 at 11:35

10

Is there any function equivalent to DateTime::diff() in PHP 5.2? My local server is PHP 5.3 and using DateTime::diff(). then I found that my live site uses PHP 5.2 and gives an error. Fatal error...
Soloman asked 27/10, 2010 at 12:36

6

Solved

I have been developing on php 5.3. However our production server is 5.2.6. I have been using $schedule = '31/03/2011 01:22 pm'; // example input if (empty($schedule)) $schedule = date('Y-m-d H:...
Spaceport asked 22/3, 2011 at 23:20

5

Solved

I'm having a hard time understanding why I'm getting an Unexpected T_PAAMAYIM_NEKUDOTAYIM error in the following code, which seems perfecly valid to me... class xpto { public static $id = null; ...
Milore asked 14/2, 2011 at 17:57

4

I am trying reverse geocode using google api in php script(using xmlrpc).I wrote the following code in my local system its works fine,but when I try in our webserver it fails. function reverseGeoC...
Therron asked 5/8, 2011 at 9:30

4

Solved

I'm relatively new to PHP and slowly learning the idiosyncrasies specific to the language. One thing I get dinged by a lot is that I (so I'm told) use too many function calls and am generally asked...
Aleciaaleck asked 31/7, 2013 at 13:35

5

Solved

I've done little web using namespaces. I have it in my computer and i'm about to moving it to free hosting that uses php 5.2. Syntax highlighter for php 5.2 interprets them as errors. Are namespac...
Phebe asked 24/6, 2011 at 19:58

2

Solved

I was playing with the DateTime object in PHP 5.3 on my local machine and made something useful but my host (NFS) is only running 5.2 and doesn't plan to upgrade until 5.3.1 is out. So my question ...
Theophylline asked 2/9, 2009 at 17:58

4

Solved

for some reasons, our hosting company used PHP 5.2 and doesn't even have mysqli and PDO pre-installed. I have no choice but to rewrite some part of my code to make it 5.2 compatible. so, here is ...
Marek asked 29/8, 2012 at 13:52

2

Solved

I have this linecode $media = $dc->thumbnail->attributes()['url']; runs fine on my local (WAMP) php 5.4.3 but when i host it on my server cpanel then it gives this error Parse error...
Sandor asked 1/7, 2013 at 18:22

1

Solved

I know my file system is storing the file modification time in milliseconds but I don't know of a way to access that information via PHP. When I do an ls --full-time I see this: -rw-r--r-- 1 nobod...
Holcombe asked 29/6, 2012 at 23:28

2

Solved

My shared hosting package at 1and1 only includes PHP 5.2.17 -- so I can't use the DateTime object. Very annoying! I currently have this code $eventDate = new DateTime('2013-03-16'); // START DATE...
Imposition asked 29/3, 2012 at 14:19

4

How do you create a DateTime from timestamp in versions less than < 5.3? In 5.3 it would be: $date = DateTime::createFromFormat('U', $timeStamp); The DateTime constructor wants a string, but...
Cachou asked 1/12, 2010 at 22:38

2

First of all, if you read this, thank you in advance for your patience,- I'm fairly new at PHP and have an issue which I will try to explain/describe. //set default path ///var/www/vhosts/www.myd...
Purehearted asked 23/10, 2011 at 19:39

2

I have a code that runs perfectly with Doctrine_Core::HYDRATION_ARRAY, but crashes with Doctrine_Core::HYDRATION_RECORD. The page is loading for about two minutes and shows standard browser error m...
Provenience asked 15/8, 2011 at 13:32

3

I have Win XP SP3 and have installed IIS7.5 Express and want to run PHP on it. I am able to run simple HTML code on the server, I am able to start and stop the server by running iisservices.exe, b...
Crabb asked 16/8, 2011 at 15:2

2

Im on a host company that uses php 5.2 , some of the libraries i use are written in 5.3 and there are certain incompatibilities between the code. First of all what is the alternative to : use \f...
Mb asked 16/8, 2011 at 20:52

2

Solved

In PHP, if you try to instantiate a new SoapClient, and the WSDL is not accessible (server down or whatever), a PHP fatal error is thrown: Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load f...
Alger asked 7/7, 2011 at 8:55

© 2022 - 2024 — McMap. All rights reserved.