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

what does & do in php

I have this code $myNewClass->cars =& Orders_Car::GetRecords($myNewClass->searchString); ^ what is & doing there. thanks
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
3
votes
3 answers

Is there a simple way to emulate friendship in php 5.3

I need some classes to befriend other classes in my system. Lack of this feature made me publicize some methods which shouldn't be public. The consequences of that are that members of my team implement code in a bad and ugly way which causes a mess.…
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
3
votes
1 answer

PHP-CGI.exe crash on IIS

I'm running multiple SugarCRM sites on IIS 6.1 on a Windows 2008 environment. Databases are housed on a SQL 2008 R2 Server. We are running PHP 5.3.26 with Fast-CGI enabled. Wincache 1.3.4.0 is also enabled. It appears that php-cgi.exe is crashing…
danstan
  • 95
  • 3
  • 11
3
votes
2 answers

Form action in Laravel

I have a problem with my form in laravel, So my project structure is: controllers/ administration/ NewsController.php in NewsController I have a method call : postCreate(): public function postCreate(){ $validator =…
Harea Costea
  • 275
  • 5
  • 19
3
votes
2 answers

If condition for PHP Version ignore new code

So I've got a script that needs to run on several sites. I've got one version of the script that is optimised with some new PHP 5.3 functions, however some sites are 5.2 etc. This code: if (version_compare(PHP_VERSION, '5.3.0') >= 0) { Do the…
Alexander Wigmore
  • 3,157
  • 4
  • 38
  • 60
3
votes
2 answers

Calling a static method from another static method: PHP Fatal error: Call to undefined function

In a simple PHP script (a WordPress module) I have defined a class with several static methods: class WP_City_Gender { public static function valid($str) { return (isset($str) && strlen($str) > 0); } public…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
3
votes
1 answer

Using solarium in Magento CE

Hi i want to use solarium third party library in magento CE 1.8 . knowing that the solarium library do not conform the naming conventions of magento and zend I want to know how can i integrate solarium or add it features into the autoloader? is that…
Mohamed23gharbi
  • 1,710
  • 23
  • 28
3
votes
1 answer

Array Dereferencing using php 5.3 and Laravel 4

I wrote a code like @section('title',Lang::get('lang.nav'['homepage'][1]) code in my laravel blade file. but since my customer payed web hosting for a year and those idiots do not upgrade php version to 5.4 I have to assimilate that code to php…
Anar Bayramov
  • 11,158
  • 5
  • 44
  • 64
3
votes
1 answer

cakephp find query conditions on associated model

I have a model User and a model Role in a CakePHP application. The association between the two models is the following: User $belongsTo Role Role $hasMany User I want to make a query on the User model to find all users with a specific role (let's…
user765368
  • 19,590
  • 27
  • 96
  • 167
3
votes
1 answer

Get data After successfull worker execution gearman

iam a newbie to php-gearman and with the help of some usefull tutorials, i tried out some examples. Like the above basic code. Client Side
PRASANTH
  • 695
  • 3
  • 15
  • 33
3
votes
1 answer

Match a regular expression for a Unicode string with at least one space

I'm trying to validate a string that must conform to the following rules: Allowed characters are: All Unicode letters [a-z][A-Z] and other letters such as (á, é, í, ó, ú, ü, ñ, etc...) All numbers [0-9] These special characters only (white…
Songo
  • 5,618
  • 8
  • 58
  • 96
3
votes
1 answer

How to save a image filecontent into the SQL database using eloquent?

I'm getting confused about how to save an image content inside of a database table. Please see the fourth line of code. I'm sure that this restful method (using POST) is working because getSize() returns the true value. Also, if I debug what returns…
Darf Zon
  • 6,268
  • 20
  • 90
  • 149
3
votes
1 answer

is_writable($dir) not working

when I was working with thix thix ix all fine it ix showing all the subfolder and than subfolders of the subfolders '; foreach($folders as $subFolders){ …
Rummy Khan
  • 69
  • 9
3
votes
3 answers

Array remove duplicates based on index / preserve first occurance

I have wrote a simple algorithm to only store the first occurrence of a name in my array of artists. I am not concerned with the artist ID. The algorithm works fine but I am worried about performance. Does anybody see a simpler way to write this…
Sixthpoint
  • 1,161
  • 3
  • 11
  • 34
3
votes
2 answers

scope of server variables in php

As we know that session variable $_SESSION is different for each user. I want to know the scope of Server variable like $_SERVER. I am doing http authentication in my RestFul API. If I set the $_SERVER['PHP_AUTH_USER'], will that be set for 1 user…
user1765876