Amazon Machine Image(AMI) for PHP5
Hi, I would like to move my application on EC2. I would like to know the AMI Image which has Linux(Preferably Ubuntu),PHP 5,MemCached, eAccelerator or XCache. Please advise. Regards, Mugil. ...
Hi, I would like to move my application on EC2. I would like to know the AMI Image which has Linux(Preferably Ubuntu),PHP 5,MemCached, eAccelerator or XCache. Please advise. Regards, Mugil. ...
I have a table of data that is generated dynamically based on the contents stored in a mysql database. This is how my code looks: <table border="1"> <tr> <th>Name</th> <th>Description</th> <th>URL</th> </tr> <?php $query = mysql_query("SELECT * FROM categories"); while ($row = mysql_f...
When I am grabbing data from my table that require permissions, should all the permission be done there? Such as checking for an admin or if they can view the data (in MySQL)? Or should I grab it if they have a record at all, then check the specific actions (such as view, add, edit, delete) on the PHP side? ...
I have an unknown object in php page. How can I print/echo it, so I can see what properties/values do it have? What about functions? Is there any way to know what functions an object have? ...
When I try to validate a certain page I get the below error: Sorry, I am unable to validate this document because on line 136 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the charac...
OK so this is my hook form alter function.It is causing all the registration forms on site to be over written which I do not want as I just want it on this page. function special_registration_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'user_register') { drupal_set_title(t('Custom registration')); $form['fir...
I'd like to inherit PDOStatement class and use it in my website scripts. But I am frustrated how to get required object. PDO::query returns only direct PDOStatement object and looks like there are no other method to create PDOStatement object or inherited class. Initially i thought to move PDOStatement object to constructor of inherit ...
Hi, First of all Thank You for looking. whats the best method for make an advance click counter (eg. order by views [today] | [yesterday] [this week] [last week] [this month] [last month] [all time] ). Is it better to use a flat file or mysql?. This is the MYSQL Structure i came up with. id (type: int(11)) link_id (type: int(11)) da...
I'm developing a twitter app, and when I submit a new tweet from php with abrahams twitteroauth and with any special character it submits it to twitter as the HTML identity. I've tried all the html_entity_decode() and the htmlspecialchars_decode() but nothings working. Thank you :) edit: heres some code as by request (after logging in w...
I'm in the process of writing a small php-cli script that will loop over my personal inbox and then send me an SMS via a gateway. The question I have is: As will have the script launch via cron every 10 minutes, if there is an email sitting in my inbox that is not read before the next script launch then I will receive 2 sms. Does any...
I am getting this error when I click on the facebook connect button: API Error Code: 100 API Error Description: Invalid parameter Error Message: next is not owned by the application. I am not too sure how to do this, but I've read all the documentation for facebook connect and came up with this: <?php date_default_timezone_set("Ameri...
Hi, Hoping someone can assist but I am currently teaching myself WordPress and working on my own CMS site. My site will consist of approx 5 pages where the header/sidebar menu/footer will be seen on all these 5 pages. Newbie here and questions are as follows: All these 5 pages will consist of different content, for example, every p...
From my understanding, Compass only works with Ruby. Is there a PHP equivalent to Compass? ...
I'm making a script, in which the user needs to enter a valid IP address. How can I check that it's a valid IP address? (Doesn't need to resolve) Basically $_POST['ip'] just needs to be between 0.0.0.0 and 255.255.255.255 ...
What is the best way to queue background processes in PHP... Zend's job queue seems very nice but I am not able to switch to zend server what are the alternatives for doing this? ...
Hi guys, I'm converting over a web-app to use the MVC structure of Zend Framework. I have a root.php include file that contains most of the database info, and some static variables that are used in the program. I'm not sure if some of this should be in the application.ini of in a model that is called by the init() function in a control...
Im using this code here: http://www.digiways.com/articles/php/httpredirects/ public function ReadHttpFile($strUrl, $iHttpRedirectMaxRecursiveCalls = 5) { // parsing the url getting web server name/IP, path and port. $url = parse_url($strUrl); // setting path to '/' if not present in $strUrl if (is...
How to show progress bar in PHP where i have to upload the file size of of 100MB? I cannot have APC installed. I am allowed to do so.. Help me out to get it done... P.S > I DO NOT HAVE DEDICATED SERVER HENCE CANNOT USE APC We have PHP 5.2+ ...
I have a simple jquery script as follows: $('a').click(function() { //get the id of the song we want to play var song_id = $(this).attr("id"); //do a get request to get the information about the song $.get("http://www.site.com/v4/ajax/get_song_info.php", { id: song_id, }, function(data) { ...
hello i use php on windows , how can i backup mysql to a compressed file so restore from it using php code thanks? ...