I’m generating a huge amount of data fixtures using the awesome Faker Library, also using lorempixel.com to have some random images in my Symfony2 project. This takes some time (currently ~ 10 Minutes), so I was wondering if it is possible to access the Command OutputInterface somehow through the contai…
Tag: php
Rename URL in Codeigniter
I want to remove /public/index.php from my Codeigniter and Bonfire project URLs.. My current URL: http://localhost/public/index.php/page Desired URL: http://localhost/page but I want the paths for …
Installing Composer OpenSSL Issue
I am trying to install composer however when I go to install it I get this error: I currently have php 5.4.31 and I am running WAMP2.2 I’ve checked my php.ini file in the bin/php/php5.4.31/ and ensured that the following line is uncommented: The error still resolves and I’m at a loss as to how I c…
Zend redirect to controller if action not exist
For example I have action example.com/books/list But I made mistake and write example.com/books/lists, action lists not exist, how to redirect to controller/index if action not exist. To check before go to action I can use preDispatch(), but how to check do this action exist ? Answer Here is a function to che…
Zend framework ‘Method “init” does not exist
When I submit POST I get Fatal error: I try to disable layout with: But also get same Fatal error. I get an error in this line : Where can be problem in my aplication ? Answer I think the error comes from the adapter you’re using. If you’re athenticating the user via a database table, I suggest yo…
MySQL automatically updating field when inserting data
I’m making a web application to make customers order items for anything. For that I’ve made a MySQL database which has the following tables: customers orders orders-items products In the customers table is all the information about the person such as: The customer ID, for the primary key and auto …
Check if Facebook user is logged in to app with PHP SDK
I have an app using the Facebook Login API. I take the details of the user and store it in my own database and create my own user id for the user (I also store the facebook id). Next time the user visits my site, I want to automatically set the session, without having them reconnecting again. So I want
How to give custom field name in laravel form validation error message
I was trying form validation in laravel. I have a input text field in my form called ‘Category’ and i’m given the field name as ‘cat’ as short. And i defined the validation rules like this. When the validation fails i’m getting error message like this But i want to display …
mysql update sequence into one table depending on another table
Below are the 2 tables: classes Here standard is not INT student What i want to do: when teacher selects standard -> 10 and press a button “Assign Roll No” i want all student of 10th standard to be given roll no sequentially order by name and which are approved by teacher that is teacher_approv…
Laravel Simple Month Selection
y tried retrieve month from date field “fechas” (datetime type) where testing with SQL clause MONTH not works… thanks for replies Answer You could use the hide gem whereMonth: I highly recommend to you read the Builder.php source to search for another gems. 🙂 https://github.com/laravel/frame…