Questions tagged [php-5.3]

PHP 5.3 (now past End of Life) is the successor to PHP 5.2. It was released on June 30, 2009. Use this tag for version-specific issues relating to specifically to PHP 5.3.

The last version of PHP 5.3 was 5.3.29, which was released on 14-Aug-2014. This version has reached its end of life and will no longer receive any updates.

PHP 5.3 caused many headaches for legacy software as a number of mechanisms PHP had relied on were deprecated (most notably register_globals and safe_mode). Many string search related functions were deprecated too, such as split() and ereg(). Much code written before PHP 5 (and some during) makes use of both these, and therefore a lot of older code base needed updating.

See https://php.net/manual/en/migration53.deprecated.php for a full list.

Information

  • If you want to talk about PHP or if you have a question, you can come to Chat Room 11: PHP.
  • For global question on PHP, please use the generic tag:
1291 questions
2
votes
2 answers

Lead backslash at the beginning of dynamic class name

The code: $className = '\MyNamespace\MyClass'; $object = new $className(); throws error 'Class not found' But this code: $object = new \MyNamespace\MyClass(); is not. First code fragment works at staging but not at my local. Do I need to enable…
sneas
  • 924
  • 6
  • 23
2
votes
1 answer

Good way of modifying a class and dumping it ? - Reflection?

I am trying to create a method that can modify a class in a file and dump the class to the same file. What is the best practice to do this ? What I am trying to do is: Say i have the class: Test.php: namespace test; class Test{ } ... and i want…
Lars
  • 21
  • 1
2
votes
1 answer

Lithium Connections (MongoDb, CouchDb, and Mysql) in one Application

I was on my way for the Development of an Ecommerce app. Is it possible to write a lithium application that works on different connections basically MongoDb or CouchDb and MySQL? How can we do it and what are your tips on achieving it?
John Laniba
  • 435
  • 3
  • 12
2
votes
1 answer

PHP 5.3 SimpleXML to array type casting issue

I am trying to perform count on SimpleXML Element. It si giving me different results on PHP 5.3 and PHP 5.2. My code looks like follows : $xml = new SimpleXMLElement(''); print_r(count((array)$xml->children()));` On PHP 5.2…
PHP_dude
  • 23
  • 2
2
votes
2 answers

Is it a Active Record Class where(), like() limitation?

I got a question on Active Record Class usage, my code snippet below. $this->db->select('year, distance, gender, rank, name, chiptime, racenumber'); $this->db->order_by("year", "desc"); $this->db->order_by("distance, gender, rank", "asc"); $year =…
Nano HE
  • 1,879
  • 7
  • 28
  • 39
2
votes
2 answers

Call a function before the page is timeout in PHP

I have a PHP script that will run for a long time. I have set the execution time limit to 5 minutes by using set_time_limit() function. I would like to ask whether I can set the script to call a function when timeout limit is reached? like the page…
Raptor
  • 53,206
  • 45
  • 230
  • 366
2
votes
3 answers

How the ftp uploads works in PHP?

I am using the http://phpseclib.sourceforge.net/ library for file uploading using ftp.Now I cant able to understand the concept behind this "how the ftp handling the file data while uploading". what happend is: I created the form for file upload…
svk
  • 4,513
  • 18
  • 63
  • 100
2
votes
2 answers

Break a string into parts, returning all characters

I want to break a string according to the following rules: all consecutive alpha-numeric chars, plus the dot (.) must be treated as one part all other consecutive chars must be treated as one part consecutive combinations of 1 and 2 must be treated…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
2
votes
1 answer

Facebook SDK works on PHP 5.2, not on 5.3

I'm having a terrible time of it trying to implement the Facebook PHP SDK on a new server. I'm running the following code: require('facebook.php'); $facebook = new Facebook(array( 'appId' => "###", 'secret' => "###", )); $signed_request =…
Wyatt
  • 21
  • 2
2
votes
1 answer

Problems with circular includes in PHP 5.3

We're testing out a migration to php 5.3, and are seeing some odd issues. Trying to track down exactly what happens. Here's a simplified scenario. File a.php include_once(b.php); class A {.... File b.php include_once(a.php); class B extends A…
Neil
  • 135
  • 1
  • 11
2
votes
1 answer

How to Post on Linkedin Company page via Linkedin API v2 in PHP

I created a personal account on LinkedIn and later i created a company page with the same personal ID. What i am trying to achieve is. I want to create auto scheduler in php so that i can post some content on the company page. I have created the app…
PHP Developer
  • 87
  • 2
  • 9
2
votes
3 answers

PHP Slow to process soap request via browser but fine on the command line

I am trying to connect to an external SOAP service using PHP and have written a small php test script that just connects to the service and performs a simple request to check everything is working. This all works correctly but when I run via a…
Addsy
  • 3,944
  • 2
  • 32
  • 35
2
votes
2 answers

PHP wrapper module (for working with many social networks) design

I am not good at OOD yet so it would nice to receive some advices. I am going to write wrapper class for working with many social networks and services through it's APIs. I want my wrapper could hide specifics for every service/social network behind…
VitalyP
  • 1,867
  • 6
  • 22
  • 31
2
votes
2 answers

PHP: weird behaviour when calling a protected method via a static proxy

I find this really strange..could someone give an explanation? abstract class UIController{ public static function exec($context,$vdo){ return call_user_func(array($context, $vdo)); } } class UIControllerSettings extends…
dimi
  • 1,496
  • 2
  • 15
  • 27
2
votes
0 answers

Is there a way to search for ArgumentCountError in PHP?

Is there a way to search for ArgumentCountErrors (to few arguments passed into a function from a function call) in a project? I had no luck with PhpStorm, it only displays an error if there are too many passed arguments. We are migrating to PHP 7…