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

Pass jquery variable to php

I have a question I tried to pass a jquery variable to php but when I look in console I got an error: SyntaxError: missing ) after argument list):.append('Edit') and I don't understand where is the problem var…
erhanelu ion
  • 71
  • 1
  • 4
  • 12
-3
votes
3 answers

PHP Variables for class wont work

I need help with php. I have a script that i need it to include a file. Here is what i want to do class example{ var $firstname = file_get_contents("myfirstname.txt"); var $lastname = file_get_contents("lastname.txt"); } ?>
user1394913
  • 1
  • 1
  • 3
-4
votes
1 answer

Modify the SQL result

I want to count the total row where parent id is equal to page id in a page table, SELECT parent_id COUNT(*) AS total FROM page AS p WHERE p.parent_id = p.page_id AND p.type = 'page' and I get this correct result, parent_id total 1 …
Run
  • 54,938
  • 169
  • 450
  • 748
-4
votes
1 answer

both IF and ELSE are executed -- needs some help to spot the mistakes

I made this question in this if then else to display 2 views on one function called thread and i have tried to fix it as what I was suggested but the problem remains. Hope someone could help me...It does both of what has inside the "if" and what has…
PartialDue
  • 11
  • 3
-4
votes
1 answer

Including child class requires parent class included first

I have asked a similar question to this one already but I think it was badly worded and confusing so hopefully I can make it a bit clearer. I am programming in a native Linux file system. I have a class of HelpTopic: class HelpTopic extends…
Sammaye
  • 43,242
  • 7
  • 104
  • 146
-4
votes
2 answers

how to sum the array time

I have an array like this. I need to add the total length of time in all the occurances of the array. so in the example below it will be 00:04:03 + 00:06:03 = 00:10:06 Array ( [4894] => Array ( [0] => Array ( [Informative] =>…
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
-4
votes
4 answers

php oop interface or abstract classes

Can anyone give me an example of the following desired OOP structure please. I want a main class (super class) (interface or abstract class?) where all the other classes that are extending from it can have their functions called from instances of…
dean jase
  • 1,161
  • 5
  • 23
  • 38
-4
votes
4 answers

Why php functions or classes cannot work like jquery plugins?

Why php functions or classes cannot work like jquery/ javascript plugins? For instance, a jquery plugin, (function($){ // Attach this new method to jQuery $.fn.extend({ // This is where you write your plugin's name popup:…
Run
  • 54,938
  • 169
  • 450
  • 748
-4
votes
1 answer

Can i use PHPMailer 5.0 version with PHP 7.0

Currently i am using PHPmailer 5.0 version and PHP Version 5.3 but now i am moving to PHP 7.0. Can i use phpmailer 5.0 with php 7.0 I need to upgrade to php 7.0 version
-4
votes
1 answer

Parsing definitions in json format from Wikipedia API in php

I was trying to build a script that could get me definitions of words from the wikipedia API in php. I tried several obtaining the definitions in an array and displaying the first definition but it didn't work. Can anyone please help me out. Any…
alvo
  • 27
  • 2
  • 6
-4
votes
1 answer

My made PHP Blocker not working

This code is working: https://www.skools.cu.ma/contents/posts/Comma.php: https://www.skools.cu.ma/blocks/block_function.php:
-4
votes
1 answer

PHP: How can this code be fixed to work correctly?

Consider the following code: $str1 = 'yahoo'; $str2 = 'google'; if (strpos($str1,$str2)) { echo "\"" . $str1 . "\" contains \"" . $str2 . "\""; } else { echo "\"" . $str1 . "\" does not contain \"" . $str2 . "\""; } The output will…
Ravi Ubana
  • 397
  • 5
  • 26
-4
votes
3 answers

Can't get code to work in PHP 5.5.9

This code works fine in PHP 5.3, but I can't figure out what to do to make it working in PHP 5.5.9 on a LAMP server. I have tried searching around, but haven't found any solution. Any ideas of to fix it? So; the users sees the from correctly,…
Adrian
  • 13
  • 1
  • 8
-4
votes
2 answers

Get the city by ip adrresse in php

I have a biig problem with get the city by ip addresse in php, the code work yersteday but now I got an error: Limit Exceed, my code: public function getCityAndCountryByIp($ip){ //get the city $tags =…
Menfis Menfis
  • 63
  • 1
  • 3
  • 11
-5
votes
1 answer

Get next five saturday date of the last month

I need next 5 saturday from the last month. eg. current date is 07-04-2018 so I need 5 saturday of the last month. output- 03-03-18, 10-03-18, 17-03-18, 24-03-18, 31-03-18. I can get it by using below but this is completely hardcoded. How can i…
1 2 3
86
87