I wanna give all my website authors a possiblity to post their articles on our facebook page without having go give them admin access to it. So i created a simple form, where the author types in: URL, URL to image, message On submit, this form will send a ajax request to facebook.php where the magic “sh…
How to modify woocommerce_before_cart action
I’m trying to make my woocommerce cart template display as a full 12 column layout. The existing layout is using bootstrap’s col-sm-8 column. I need to change it to col-sm-12. I checked out the relevant woo-templates shown here, and copied the cart.php template into my theme to override. However, …
Uploading videos to a specific PREDETERMINED account with YouTube API v3
I have a website on which clients will be uploading videos. The thing is – I want those videos to be uploaded to OUR channel, not users’ channels. I don’t see how I could make it work using YouTube API v3. Every time a person wants to upload something using the access token I provided he has…
ftp_put is corrupting my movies after transfer, is it wrong?
I have a bunch of movies that I’m trying to transfer from my CentOS server onto my Windows PC. But when I run them through this script they end up being corrupt. Is there something wrong with the …
nginx error connect to php5-fpm.sock failed (13: Permission denied)
I update nginx to 1.4.7 and php to 5.5.12, After that I got the 502 error. Before I update everything works fine. nginx-error.log 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/…
I can’t get preg_match to test if the entire string matches the regex
I’m using this regular expression to test if a username is valid: [A-Za-z0-9 _]{3,12} when I test it for matches in a text editor with the string test’ing, it highlights ‘test’ and ‘ing’, but when I use the following code in PHP: if(!preg_match(‘/[A-Za-z0-9 _]{3,12}/&…
cannot log-out from phpmyadmin in XAMPP
I have completely set up my xampp with username and password. Once I have logged in, I cannot seem to find a way to log-out. No button for log-out can be seen near the home button at the left sidebar. …
phpexcel freeze row and columns
I’m trying to freeze the top row and the first 3 columns in a worksheet, using PHPExcel. I can freeze the row without any problem: $objPHPExcel->getActiveSheet()->freezePane(‘A2’); Or I can …
How to change the database connection in YII
I have yii application,, and i want to change the database connection.. first, my app is connect to ‘trackstar’ database, and later i want to change to ‘taskmanagement’ database.. So i just simply change the dbname in my code : but when i run the app i got error : CDbCommand failed to …
PHP ignoring curl.cainfo setting in php.ini (apparently)
I’m trying to fix a php_curl call on a Windows server (running IIS) that is returning the familiar error “SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed”. As detailed in many related questions…