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

learn more… | top users | synonyms

0
votes
1answer
140 views

How can I deal with a slow API in PHP?

I'm writing a public web app to get stock data from a magento store. I've accessed the data, but it turns out that i have to query each product individually for stock data. With thousands of items ...
-8
votes
0answers
72 views

I want to move PHP to JAVA ,How will i do it? [on hold]

I am working on PHP Framework now.I am 23 old . I will have 2 years of experience by 2016.And Company Bond will be over ,and i will be able to leave the company. I worked on ...
-2
votes
1answer
96 views

Advantages and Disadvantages of C CGI over PHP? [on hold]

I've developed a lot of websites with PHP but sometime after learning C programming I found out that it's possible to do the same thing using C CGI. But I still don't know if it will be worth ...
-2
votes
0answers
29 views

Capturing client request headers (complete) along with IP address information? [on hold]

I want to write client request to a file with two things/information headers ip address The code I'm testing on free hosting service.Code is <? $headers= apache_request_headers(); foreach ...
-1
votes
0answers
8 views

php export data to cvs [migrated]

I need a help exporting search query by clicking on export button. I am able to get data from database to the browser. However, when I click on export button, it refreshes the page, and doesnt do ...
-3
votes
0answers
27 views

how to select a specific word in specific column php mysql [on hold]

I have table with only one column that contains a text (200 char) and I want to select a specific word that comes after my keyword to use is in autocomplete for my textbox field. suppose that: row ...
-4
votes
0answers
25 views

Would you recommend APF 'Adventure PHP Framework' over another MVC Framework [on hold]

It was suggested to me to use APF, the Adventure PHP Framework, on an upcoming project. I was leaning towards Laravel or Symfony2 with a MongoDB and PostgresQL Database. I doesn't have a conventional ...
-4
votes
0answers
75 views

Ajax File Upload Progress bar [on hold]

I have jqurey for Single file upload code with showing percentage, It's code is I'm recoding the for multiple file upload in the one time. But isn't upload the files. please help for resold the ...
-3
votes
0answers
41 views

How to create a Cloud Storage Server ( with PHP ) [on hold]

How can i build my own "Cloud Storage Server" with PHP like Google Drive / SkyDrive / DropBox / Box / Filaty so users can upload their files into this website Thanks a lot.
-4
votes
0answers
34 views

Pass array of data from JavaScript to php [on hold]

I develop web application , I use JavaScript to add array of data in table . i want to pass this table to PHP to use it in other methods . How to handle this problem ? help please .
-3
votes
1answer
85 views

PHP or Python for a webservice? [on hold]

I did a REST webservice with Python. As I need to expand it, I'm wondering if Python is really the best choice. My team is working on both PHP and Python. Is one better than the other in terms of ...
0
votes
0answers
94 views

Implementing a strategy pattern with dependency injection

Okay, so the goal here is to implement a strategy pattern that can be tested using any sort of automated testing tool. I've been struggling with this problem conceptually for a few weeks now and I ...
1
vote
1answer
103 views

DDD - Business rule that depends on a service

I got confused about if a domain is required to access an external service in some state of it's life cycle. The business rule is this : If an Employee is accepting a JobSeeker's JobApplication, ...
0
votes
0answers
74 views

Use a global variable, a singleton, or something else

Preface: I am working in PHP (Abandon hope all ye who enter here). Background: There exists a large set of global functions in PHP, a number of which are miscellaneous system calls, like sleep (and ...
0
votes
1answer
67 views

New User Registration Logic [closed]

I am writing up a user registration application in PHP as part of my learning process. I have written up the general rules my code should follow. Please let me know what you guys think of it. Have ...
1
vote
1answer
96 views

Naming convention for subclasses which extend/inherit baseclasses [on hold]

Zend provide a naming convention for Abstract/Interface classes which states you end these classes with the class type respectively. I am curios how to name my sub-classes which extend/implement ...
-1
votes
0answers
46 views

How Do I build a Custom Web Browser Using Webkit? [closed]

This is my first post, so please bear with me. First, though, let me introduce myself: My name is Jessica and I am 30 years old. :-) I want to build a custom Independent webkit based tabbed web ...
-3
votes
0answers
51 views

Create a master login web page? [closed]

I want to create a master login page for owncloud,roundcube and phpfox. It means I want to create a simultaneously login page(single) for all softwares at once. That means when you log on with that ...
0
votes
0answers
84 views

API Client Design

I'm designing a client to the Tomtom WEBFLEET.connect API in PHP. (You can read more about the API through the full documentation here: ...
0
votes
2answers
187 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 ...
9
votes
3answers
862 views

Automating Unit Test Creation

What are some strategies that could be used to automate the creation of unit test cases? What aspects would you need to look at in each class to be able to generate at least a decent test case ...
-4
votes
3answers
96 views

How to inherit from two parent classes

I have many classes with many relationship I draw Uml that relation between them: Is this relation true and how to implement this?
9
votes
1answer
2k views

With PHP frameworks, why is the “route” concept used?

The reason I ask this is because isn't a PHP script a route? For example, if you have an article.php then your route is simply http://mysite.com/article.php. Why further abstract away the concept of ...
53
votes
12answers
2k views

How do you control code quality on your team? [closed]

Here is my situation. After almost 2 years I was able to convince my boss to use TDD, version control, coding standards for the entire team and a MVC framework for our web projects. I was finally ...
1
vote
1answer
53 views

Loosely compare user input with database record [closed]

I have a database table with 3 columns; id, question and answer. On the front-end, I have a PHP application that shows questions to the user. The application would then compare the user input with the ...
-3
votes
0answers
70 views

Chat Application website like facebook and gmail WITHOUT using any third party class or api [closed]

Hello guys, It has been long research and searching over the web i have come across the 1 to 1 user chat at a time but now, I have been searching a chat application website like facebook and gmail. ...
0
votes
1answer
36 views

Automating form error handling

I'm not sure if I'm being clever or making things more difficult. I'm working within a custom MVC framework, and within some of my "views" which contain forms I'm preserving input and styling errors ...
2
votes
2answers
465 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 ...
0
votes
1answer
67 views

Best practice for storing information from a php script for future use

My employer uses forms to help people search for products. The product lists can change from time to time and the forms need to be updated again. The product information can be accessed through a ...
1
vote
1answer
87 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
200 views

PHP class data implementation

I'm studying OOP PHP and have watched two tutorials that implement user login\registration system as an example. But implementation varies. Which way will be more correct one to work with data such as ...
3
votes
1answer
112 views

Should a stored proc try to do more, in the attempt to avoid php mysql back and forth overhead

I have a REST architecture, running PHP on the server side which store and query a Mysql database. I am re-evaluating one architecture design decision: DECISION to re-evaluate: In an attempt to ...
1
vote
3answers
285 views

PHP Code base design: Single “queries.php” file, or spread queries across different php files/classes?

When I create PHP projects, is it better to put all database (e.g. MySql) queries in a single file (i.e. "queries.php")? Or is it better to place the respective queries in any "model" classes (i.e. ...
2
votes
2answers
6k views

Localization in php, best practice or approach?

I am Localizing my php application. I have a dilemma on choosing best method to accomplish the same. Method 1: Currently am storing words to be localized in an array in a php file <?php $values ...
9
votes
8answers
2k views

How should one debug a PHP web application securely without exposing secrets to competitors?

Recently I made a program. I forget to delete 2 line of codes. That mistake cost me $800 per day every day. I was programming with PHP. If a visitor uses proxy it redirect somewhere else. Using ...
1
vote
2answers
93 views

Separating php and html code [closed]

What is the industrial practice on how to separate html and php code in a web project? Using echos to generate html is considered bad but what is the standard way to achieve the sought separation? ...
0
votes
1answer
93 views

Is a PHP array an example of a dynamic data structure?

I did my homework, and it says that dynamic data structures are "data structures that change in size as a program needs it to by allocating and de-allocating memory from the heap". So I was ...
1
vote
1answer
183 views

MVC Separation of concerns

I'm using a MVC php framework named Laravel for creating a new website that will scrape data on a daily basis. The directory structure is looking like this: app/ config/ (config files) database/ ...
10
votes
6answers
2k views

Web Developer and Math [duplicate]

I have just learned HTML/CSS and I practice everything I read to make it more understandable to me and I really enjoy it. My goal is to be a Modern Web Developer both front and back-end, so I won't ...
-2
votes
2answers
163 views

Securing PHP source code from illegal copy [closed]

my IT boss asks what is the best way to secure the PHP source code against illegal copy of the code once it is deployed to clients. Is there a PHP compiler that will make the final codes unreadable? ...
1
vote
3answers
218 views

PHP coding practice [closed]

I'm a self taught PHP programmer. Because I have no formal training in PHP, I often find my coding style to be considerably different than example code I find on the Internet. I've slowly started ...
0
votes
1answer
147 views

How should dependencies be managed across a modular application?

Let's say that we have a structure like this: Application -- Modules --Module1 -- Controller -- PublicHelper --Module2 -- Controller ...
1
vote
3answers
209 views

Authentication with If/Else

For keeping the "Administration Panel" secure to those who are logged in, for my web application, is the best practice to use an If/Else Statement? if($_SESSION['logged_in'] == true) { include ...
0
votes
1answer
59 views

testing: which code layers should I aim to test?

Say I have this code: Design { public function load() { $this->loadProduct(); $this->loadService(); ... } public function loadProduct() { ...
0
votes
4answers
137 views

Is Object Oriented Design necessary when building Symfony web apps?

I am primarily a software developer, and as such, I do a lot of reading on the subject of Object Oriented Design; the 5 SOLID principles, design patterns, composition over inheritance etc. I ...
27
votes
10answers
3k views

How do I pitch ASP.NET over PHP to a potential client? [closed]

I work at a Microsoft shop doing mainly web development. We had a client who asked us to review (improve) the data model for his web app, but said that he wants to develop his app in PHP (he knows "a ...
0
votes
3answers
500 views

Is it safe to just use MySQLi?

I have developed an open source PHP application and currently it uses both the MySQLi or MySQL extension for backwards compatibility. I'm wondering about switching it over to only be compatible with ...
0
votes
4answers
683 views

Should I keep using the normal mysql_query or switch to PDO interface in php?

I'm building a big website, and using the normal old mysql_query method for transactions and communications with the database, and everything i going fine, including security. I'm a little bit ...
0
votes
1answer
138 views

Is there a Pattern or a Refactoring Method to pull data-loading out of existing Class

I am refactoring legacy codebase. Part of it is a loadProduct() function inside a larger "everything" class. loadProduct() loads data from a database. I want to move this loading-data part out of ...
0
votes
1answer
109 views

Handling array passed to object at creation

When creating my object I pass it an array of a row from my database. (everything in the array we will need, disregarding unnecessary elements at sql query level) When I need to access certain array ...