PHP Async Web Services
How do I make an asynchronous call to a web service using the PHP SOAP Extension? ...
How do I make an asynchronous call to a web service using the PHP SOAP Extension? ...
When is it a good idea to use PHP_EOL? I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues? Most of the PHP I write is for generating HTML, and I use <br/> instead of actual newlines, so haven't used this constant before. ...
This is only happening on the live server. On multiply development servers the image is being created as expected. LIVE: Red Hat $ php --version PHP 5.2.6 (cli) (built: May 16 2008 21:56:34) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies GD Support => enabled GD Version => bundled...
Is there a catchall function somewhere that works well for sanitizing user input for sql injection and XSS attacks, while still allowing certain types of html tags? ...
Is there a library which allows PHP to decode application/fastinfoset binary XML? ...
Hello, I started using subversion for one of my projects and it would be absolutely amazing if I could just export the latest version from the repository on my production server by for example running a php or perl script. The production site is hosted with a shared hosting provider who doesn't allow shell access or for example the php...
I have a bunch a values I would like to add together which are entered into a form. Right now, the form has 11 lines but it could get larger in the future. I can easily add all the values together with something like: $total = $value1 + $value2 + ... + $value11; All the values I want to add together are coming from an HTML form. I want...
How can I know what encoding will be used by PHP when sending data to the browser? I.e. with the Cotent-Type header, for instance: iso-8859-1. ...
PLEASE NO FLAMING! I really would love a few objective opinions about the issue. I have a project that has been strongly developed in PHP but have clients that are concerned that Java would be a better solution. I know sites such as Flickr and Digg are run on PHP, but I am concerned that PHP's lack of a running environment may destroy ...
What is the benefit of using singleton instead of global for database connections in PHP? I feel using singleton instead of global makes the code unnecessarily complex. Code with Global $conn = new PDO(...); function getSomething() { global $conn; . . . } Code with Singleton class DB_Instance { private static $d...
I wrote a PHP web-application using SQLite and sessions stored on filesystem. This is functionally fine and attractively low maintenance. But, now it needs to run on a shared host. All web-applications on the shared host run as the same user, so my users' session data is vulnerable, as is the database, code, etc. Many recommend stori...
I'm stuck on a PHP 4 server, and I would like to start moving an old legacy project to modern Design Patterns, including Dependency Injection. Are there any dependency injection frameworks that will work with PHP 4? ...
Hi, Is there a simple way to write a common function for each of the CRUD (create, retreive, update, delete) operations in php WITHOUT using any framework. For example I wish to have a single create function that takes the table name and field names as parameters and inserts data into a mySQL database. Another requirement is that the f...
Hi, I am wondering what security concerns there are to implementing a PHP evaluator like this: <?php eval($_POST['codeInput']); %> This is in the context of making a PHP sandbox so sanitising against DB input etc. isn't a massive issue. Users destroying the server the file is hosted on is. I've seen Ruby simulators so I was curious...
There are a lot of MVC frameworks for PHP. Which one is the best in terms of scalability? Is there any framework that supports splitting applications on many front end and database servers? Sharding? Other enterprise features? Ideally the framework should support sites with thousands of concurrent users per server. I would greatly...
What is the best way to secure an intranet website developed using PHP from outside attacks? ...
I just figured out that I can actually store objects in the $_SESSION and I find it quite cool because when I jump to another page I still have my object. Now before I start using this approach I would like to find out if it is really such a good idea or if there are potential pitfalls involved. I know that if I had a single point of e...
Unfortunatly I have to work in a older web application on a PHP4 server; It now needs to parse a lot of XML for calling webservices (custom protocol, no SOAP/REST); Under PHP5 I would use SimpleXML but that isn't available; There is Dom XML in PHP4, but it isn't default any more in PHP5. What are the other options? I'm looking for a so...
What's the best way to test $_GET and $_POST inputs in PHPUnit? I have a class that sanitises input and want to check that it works correctly when processing bogus data. Is there an easy way to set up the form variables in PHPUnit or should I just pass off the validation to a secondary class/functions that are fed the form variables so...
I need to do some command lines through a browser. What I need to do in a command-line would be: $login <login name> <password> $passwd <old password> <new password> <retype new password> So, how can I do this using the proc_open function? Or should I use another function to do this? Thanks ...