I’m trying to build app based on REST api ang AngularJS. I’ve been following this tutorial http://npmasters.com/2012/11/25/Symfony2-Rest-FOSRestBundle.html but have to change some details ( depreciated methods ) and right now when I post to create new entity I get ‘This form should not conta…
get word document count and number of slides count in PPT
Is it possible to get the number of pages in word document or number of slides in a ppt? I have done a lot of research on it and I am desperately looking for solution. I saw that it is very difficult to get it done in PHP on linux server. I would be ok with Java also, but is
Counting special characters with PHP
I want to count the number of characters in a textfield on my website. The textfield accepts any type of input from a user, including ascii art and other special characters. If the user types in …
foreach slider only shows one db entry
I’ve got an array which gets all the testimonials from the database table and displays them via a foreach array. I want some kind of a slider which fades-in and fades-out the results. This is my query: My PHP foreach code: My piece of Javascript code It’s currently only showing ONE (the latest in …
Mockery no matching handler for closure
I can’t figure out why I’m getting this error during this test. My test appears to be matching the rest of the code exactly. What am I overlooking? In my test I have: $passwordBroker = m::mock(…
INSERT INTO two different tables, but have the same ID?
I have a database of Users and another table for Teachers. Teachers have all the properties as a user but also an e-mail address. When inserting into the DB how can I insert the info, ensuring that the ID is the same for both? the ID currently is on automatic incrament. this is what I have at the moment: than…
Overwrite subarrays in one multidimensional array if different from another multidimensional array
I stuck on this and really don’t know how to solve it. I have two multi-dimensional arrays and need to match every “entry_id” from second array with first one. Then need to check if every “file_no” from second array is in database (first array) and “status” are matche…
WooCommerce – change order status with php code
I am trying to change order status in WooCommerce, but I encountered no luck so far. $order instance is created successfully (I know it because echo $order->status; works fine, $order_id is also …
How can I access Unique ID in apache?
How can I access the unique_id that apache tracks for each request? I’d like to track it in any php scripts it calls as well as have it logged for each request. I remove comment on the following line from http.conf file: and I am trying to reference the ID in this simple php script: Yet this script retu…
SMTP connect() failed PHPmailer – PHP
I am new to PHP. I was trying to send myself a sample e-mail through PHPmailer. I am using gmail’s smtp server. I am trying to send a sample mail from my gmail account to my yahoo account. But I am getting the error : Mailer Error: SMTP connect() failed. Here is the code : I am using WAMP server