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
4
votes
2 answers

Best solution for "Array chaining"

For my project I wrote a small config class that loads its data from a .ini file. It overwrites the magic __get() method in order to provide simplified access to the (read only) config values. Example config.ini.php: ; [General] auth…
halfdan
  • 33,545
  • 8
  • 78
  • 87
4
votes
1 answer

sql help getting data from all the followers ? ( like twitter if we follow )

example if i have follow table company one ( cid = 1 ) following two ( cid = 2 ) company one ( cid = 1 ) following three( cid = 3 ) feeds table company one ( cid = 1 ) type 'product' description 'hello ive updated a product'; company two ( cid =…
Adam Ramadhan
  • 22,712
  • 28
  • 84
  • 124
4
votes
1 answer

dpkg: error processing /var/cache/apt/archives/apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb

I'm getting this error while updating my php version. PHP 5.3.10 OS Ubuntu 12.04.1 LTS while running command sudo apt-get install php5, get following error: Unpacking apache2-bin (from .../apache2-bin_2.4.16-4+deb.sury.org~precise+4_i386.deb)…
yogesh suhagiya
  • 498
  • 2
  • 6
  • 19
4
votes
1 answer

Getting 404 error when accessing php page in apache in a simple php application?

I have created a simple php file sample.php under /var/www/project/dummy/test/sample.php Here is the httpd.conf Listen 8080 ServerName example.com DocumentRoot "/var/www/projects/dummy/test" …
brain storm
  • 30,124
  • 69
  • 225
  • 393
4
votes
3 answers

CodeIgniter pagination library does not load on a particular controller

CodeIgniter's pagination library is not loading in a particular controller of my project, the same piece of code works fine in other controllers of the same project. Here is the code that loads correctly: (controller name : Purchases) // load…
Packiya Rajan
  • 59
  • 1
  • 6
4
votes
1 answer

Retrieve data from a form with GET method using symfony2

I can't retrieve data from my form, I tried differents ways but no result. My repository : public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('min_price', 'text', array('mapped' => false, 'label' => 'De la…
TanGio
  • 766
  • 2
  • 12
  • 34
4
votes
2 answers

how to pass value from controller to view in code igniter?

Code in controller public function store_service_provider() { $get = file_get_contents('php://input'); $json_decode = json_decode($get,true); foreach ($json_decode as $key => $value) { …
Aruna Angadi
  • 263
  • 2
  • 12
4
votes
1 answer

PHP: Error with bigint number

I've got a strange error. See the code $val1 = pow(2, 64); $val2 = $val1 - 1; echo number_format($val1, 0, '', '') . "
"; echo number_format($val2, 0, '', '') . "
"; and it`s…
dex07
  • 137
  • 5
4
votes
4 answers

PHP MySQL Error Setting

I have developed some php/mysql code on linux machine, and it runs fine. On client's machine running wamp server on windows, same operation gives a mysql error - which Php is displaying neatly in a tabular format. The error is in a mysql query with…
workwise
  • 1,003
  • 16
  • 33
4
votes
3 answers

How to push a key value pair in multi dimensional array php

Using following foreach loop $category_ids = array_of_ids; foreach($category_ids as $category_id) { $queryAllProducts['products'][] = $this->api->queryAllProducts(array('params' => array('categoryCode' => $category_id, 'usertoken' =>…
Prabhakaran
  • 3,900
  • 15
  • 46
  • 113
4
votes
1 answer

PHP Create Timeslots with break timing using DatePeriod

I want to create time slots with start,end time & also break timing. public function getServiceScheduleSlots($duration,$break, $stTime,$enTime) { $start = new DateTime($stTime); $end = new DateTime($enTime); $interval = new…
ArivuAjay
  • 135
  • 3
  • 11
4
votes
1 answer

Why is PHP CodeSniffer Freezing?

I'm a Junior Programmer where I work. Our website was written using PHP 4. We're migrating from PHP 4 to PHP 5.3. There are roughly 5000 PHP files in around 595 directories. So, as you can imagine, the scope of this project is pretty huge. We use…
dqfan2012
  • 117
  • 10
4
votes
1 answer

How to prevent a particular method from overriding?

I have a parent class: class parent{ var $a = 'param1'; var $b = 'param2'; public summary(){ if($this->a<0 || $this->b<0) return FALSE; return $this->a+$this->b; } public set_null(){ $this->a = null; …
kreamik
  • 609
  • 2
  • 11
  • 24
4
votes
1 answer

file_get_contents to get file in your own local machine

I am currently testing my code on my local machine and I wanted it to be able to read and write to a text file I have so I have the following code: Warning: file_get_contents(~/Desktop/insta_user.txt): failed to open stream: No such file or…
adit
  • 32,574
  • 72
  • 229
  • 373
4
votes
3 answers

Upload fails: "This file is too large to upload" - php.ini settings made

We are trying to upload files to a joomla instance which are aproximately are 10 MB. Strangely the upload fails with: This file is too large to upload. We have full access for custom php.ini settings (SuPHP) and also full access to the root server,…
Nikel Weis
  • 724
  • 10
  • 27