Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

learn more… | top users | synonyms

-2
votes
0answers
25 views

Best approach for data storage in custom web app

I'm designing a system with clients where I have following data structure: users table: user,pass,name,address,phone,email,creditcard,verificationcode,ispro,istrial,regdate,etc. session table: ...
1
vote
5answers
11k views

How to protect my php code running on a client server?

I'd like to ask how to protect my code that is running on a client server from being altered and/or copied. It's running on Ubuntu Server with the standard Apache Php Mysql stack. Any software needed ...
2
votes
2answers
71 views

PHP package management with/without Composer

I noticed that many (large) PHP applications use Composer for managing the dependencies. I'm currently trying to figure out if I should switch to Composer (at the moment I'm simply keeping my ...
3
votes
6answers
678 views

When to use a API/Library and when to write your own?

I am working on a large website and having been thinking a lot about when I should be using a 3rd party API/Library and when I should be writing my own implementation from scratch. There is no Library ...
-4
votes
0answers
29 views

Learning back-end development: Php vs NodeJS [on hold]

Hi i've already programmed in few languages: java, c++, objective-c Now i'd love to learn some web development, mainly back-end. ( i've already learned the basics of html,css,javascript and jquery ) ...
-3
votes
0answers
19 views

Php form validation with fwrite() and fopen() [on hold]

I want that php first validate the form and when the form is validated completely it runs fwrite script and when any field is empty, it returns an error and do not run frwite script. Am i doing right ...
0
votes
2answers
138 views

Ensuring non conflicting components in a modular system

So lets say we are creating a simple "modular system" framework. The bare bones might be the user management. But we want things like the Page Manager, the Blog, the Image Gallery to all be ...
-2
votes
0answers
43 views

Django vs Rails for SaaS Startup [on hold]

Several friends and I have a SaaS idea we want to flush out and build a prototype. We have already decided on AngularJS for the front-end, so we need to find a framework that plays well with ...
0
votes
1answer
981 views

Reporting Solution in PHP / CodeIgniter - Server side logic vs client side

I'm building a report for an end user. They would like to see a list of all widgets... but then also like to see widgets with missing attributes, like missing names, or missing size. So i was ...
-1
votes
0answers
455 views

Basic web architecture : Perl -> PHP [on hold]

This is an architecture question. If there is a better forum, please redirect me. Apologies in advance. Essentially every website is built around a relational database, right? When a user uploads ...
1
vote
0answers
20 views

Recommend an approach to decouple Product and Access code constructs, in order to simplify Product testing

I have some code that tightly couples Product specific code and Product-Access code. I am not sure how to untangle it. So for example, for testing Product, I have to mock up Access objects. And ...
-4
votes
0answers
31 views

Wordpress site prevent acces wp-admin of live [on hold]

I have a wordpress site on my production server now the point is i want to stop the user to access the admin panel of the production server www.live.com/wp-admin And to change or access the admin ...
3
votes
2answers
242 views

C# static practices coming from dynamic background

I have been dappling in C# after coming from several years in PHP. I don't find the language particularly difficult, although there are considerably more constructs for me to get used to. My question ...
0
votes
0answers
6 views

Insert Dynamic HTML content for Electronic Catalogue - Magazine [migrated]

I am making an electronic book(magazine). But i have 200 pages(in jpg format). So, in order to avoid writing the same line code for 200 pages i want to find out how to do it with javascript and php. ...
1
vote
1answer
81 views

Does phpDocumentor tags order matter?

When we document our class, method and/or function with phpDocumentor, is there any specific order I should follow according to the standards? I know it doesn't matter for output the document. Since ...
0
votes
1answer
39 views

How much available are HHVM hosting providers? [on hold]

I am new to php and I want to know that if I start development for HHVM, will I be able to host it on some shared server? For Example like php hosting providers. I have nowhere seen an HHVM provider ...
-1
votes
0answers
57 views

Should I use the at symbol (@) in my php code [migrated]

I have recently learned how to use the @ symbol in my php code and I have learned to love it. However I have also been told that @ is not efficient performance wise. Is the elegance it provides enough ...
0
votes
1answer
67 views

Continuous Integration for different languages [on hold]

So, I understand Continuous Integration in theory, and have used Beanstalk. However, I've been charged with creating the process at my current PHP shop. My hope was maybe PHPCI, since it looked ...
-1
votes
0answers
47 views

Daily task manager with locked hours after task is set [on hold]

I need to create a daily task manager for a shipyard in php and MySQL. I've some boats recorded inside a MySQL database. Each of them has an INT field that is filled with the time (expressed in ...
2
votes
1answer
214 views

Use and manage Front End Assets for Web

I am a beginner and am currently developing a kind of cms using PHP. The number of libraries that we can potentially use in the front end is large. I have a question about properly selecting, ...
0
votes
2answers
226 views

Database Handler and SQL injection prevention

I've written a database model class in PHP and have written a controller class that specifically validates the data before sending it to db. I'm getting criticism that I should handle the data in ...
-5
votes
0answers
44 views

which language is best to learn [closed]

i know c,c++,html&css and basic java-script , i want to know that for which next language i should go for? i am totally confuse in ruby,java,php,asp,python,.net which should i start learning?? I ...
0
votes
1answer
100 views

Should I use session or cache to keep the time it last polled when polling to server at intervals?

I'm building a web chat app using session to keep the time the app last polled so that the server can determine whether messages exist between the current polling time and last polling time. It works ...
0
votes
2answers
109 views

Storing and accessing settings from database query

I am trying to figure out the best way to accomplish this so feel free to criticize my thought process. My tool has different locales and each locale can have different settings for the tool. For ...
-2
votes
0answers
6 views

PHP/SQL Question [migrated]

There's my problem... I have the following variables: $days_a = $array_total['days']; // This one display days $hours_a = $array_total['hours']; // This one display hours $minutes_a = ...
0
votes
3answers
304 views

How do I handle 3rd party search result data (via cache)

I have a search function on my site and it is taking data from 6 different 3rd party resources. The problem is, it takes too long requesting the data over and over again on the results page. I've ...
0
votes
0answers
25 views

Managing customer-specific modules in a composer/PHP-based SaaS

I'm developing a business-to-business SaaS. I expect that most of my customers will be able to use my mainline product, and I intend to deploy it in an independent instance for each customer. Some ...
-1
votes
0answers
29 views

Where to place loops that are output data MVC [closed]

In ideal world view should only display html and echo php variables. Sometimes you would be required to do extra changes to the data while in the loop i.e reformat date or fetch extra information ...
3
votes
2answers
74 views

Using Prolog to implement authorization rules

I'm working on a user management "pseudoframework" in PHP, and I'm trying to implement fine-grained rule-based authorization. I'm using a combination of SQL and condition-checking functions written ...
0
votes
0answers
28 views

Querying all data vs required data [duplicate]

If I have a MySQL database that has a table that contains user data, would it be better to load all of the data from the table when loading a page that requires a users data (only one users data is ...
0
votes
1answer
140 views

More efficient management of assets(image, documents) in a large web project

I am beginning to refactor a large, very old, messy project. One of the biggest issues is the lack of a central location on the filesystem for simple things like images, icons, documents, csv, etc. ...
2
votes
1answer
927 views

codeigniter pagination - how to have multiple sets of pagination links on one view

Problem I don't know how to create two sets of pagination links one view. Background Information I have a situation where I have parent / child tables that I have to display on the same view - ...
1
vote
2answers
177 views

Good way to count unique anonymous visitors of articles

I'm building a website with articles, and I'd like to count unique-per-day visits for each article. The idea to use cookies suggests itself, but I simply can't set a cookie for each and every article ...
2
votes
3answers
371 views

Class design - should methods call other methods?

I'm writing a very basic custom class for coupons and I've come up with a basic layout for the class, which consists of a number of small methods as I generally understand is a best practice. What ...
2
votes
1answer
112 views

PHP MVC as backend for iOS app

So, essentially, the question is, to develop a PHP back-end to an iOS application, would you implement an MVC architecture on the PHP side? Or no, since the client side (iOS) already has an MVC ...
0
votes
1answer
119 views

Creating a voting platform for submissions during timeperiod

I have a site where stories are submitted at any time by users. The staff would like the ability to create a voting period at any time. For example, they can choose to open up voting from today until ...
3
votes
1answer
96 views

Features of a routing system

I have been tinkering with the idea of creating a routing system as a learning experience and not for some production purpose. I have trying to decide what features are a must have and what features ...
2
votes
2answers
102 views

Serving a Website as only Cached HTML Pages

Lets say that I want to develop a website where all pages will be dynamically generated and 'printed' into static HTML files. I will then serve these HTML files from a container (such as an Amazon ...
1
vote
2answers
225 views

Updating an Entity through a Service

I'm separating my software into three main layers (maybe tiers would be a better term): Presentation ('Views') Business logic ('Services' and 'Repositories') Data access ('Entities' (e.g. ...
0
votes
1answer
42 views

How to organize conversion logic for strategy pattern?

I have a Color class. It has a property model which is a class that implements ColorModel interface, this property could be a RGB, Hex or HSL classes which implementing ColorModel interface. // ...
1
vote
2answers
703 views

Search and Replace in MVC

What would be a good MVC/OOP/GRASP/SOLID structure for a search/replace functionality. Methods: search/searchNext/replace/replaceAll. I'm interested only in the PHP arhitecture and how a professional ...
1
vote
0answers
33 views

First programming job with few resources to learn from [duplicate]

I recently started my first programming job after working for a couple of years developing websites. This new company focuses on PHP and has had only one developer responsible for the code since the ...
1
vote
0answers
105 views

What is the best way to approach building search functionality for a large website using PHP, MySQL and JQuery [closed]

I've a question I'm hoping I can get some assistance on because It's causing me a lot of stress in work trying to get it sorted. I figured this was the best place to ask it as it's not a specific ...
2
votes
0answers
35 views

Directory access from PHP script

Introduction I'm creating an Android app for webpage that runs on Joomla 1.5. Yes I know that it's an old version etc. but it's not my site and I can't do anything about it. So basically I'm creating ...
0
votes
2answers
73 views

PHP conditional test func call against two values

I was wondering if there's a one liner for PHP that would allow me test multiple values against a function call. As example, say I want to test if foo() returns either 1 or 2, (in pseudo code) if( ...
2
votes
0answers
62 views

Sharing constructor code between classes that do not inherit from each other

There is a PHP library of classes (generated from a WSDL) that cannot be changed. These look like the below for simplicity. class System extends \SoapClient { public function __construct(array ...
2
votes
1answer
170 views

Interface hierarchy design for separate domains

There are businesses and people. People could be liked and businesses could be commented on: class Like class Comment class Person implements iLikeTarget class Business implements iCommentTarget ...
1
vote
2answers
369 views

Repository Pattern: Doctrine2 vs Microsoft Entity Framework?

I have been using Symfony2 with Doctrine2 for some years. I have recently started using Microsoft's Entity Framework with MVC5. From my Symfony2 experience I understand that a repository's job is only ...
-2
votes
1answer
57 views

PHP vs ROR for AJAX and responsive design [closed]

I'm in the planning phase of making a website for calculating various mathematical problems, as a school/sparetime project with a couple of friends. We're gonna start off with implementing a "right ...
-3
votes
0answers
8 views

Moving a user uploaded image on a shared server [migrated]

<?php $img1Name = $_FILES['img1']['name']; $target = 'uploads/'; move_uploaded_file($_FILES['img1']['tmp_name'], $target); ?> <img src="<?php echo 'uploads/' . $img1Name ?>"/> Why ...