Category Archives: php

Google Adsence ads are blocked if utm_hash query parameter is added to url

Questions: if I i load my page without any parameter then google ads are shown. Even with utm_source and utm_medium query parameters ads are shoing up but when i add utm_hash to the prameter ads are blocked. example.com/?utm_source=fb&utm_medium=social ads are showing up. example.com/?utm_source=fb&utm_medium=social&utm_hash=abcde ads are not showing up. I am using google analytics and adsense… Read More »

Why my data in my database automatically change

Questions: Question: Why my data in database of centos 7 always changing the data automatically Ex. the status is active then turning to Inactive. Controller: this controller to get all datas in page of Home only public function update_home() { $get_data = DB::table(‘content_structure’) ->select(DB::raw(‘content_structure.status as cs_status’), DB::raw(‘content_upload_assets.status as ca_status’), DB::raw(‘content_structure.*’), DB::raw(‘content_upload_assets.*’)) ->leftJoin(‘content_upload_assets’,’content_structure.content_id’,’=’,’content_upload_assets.cid’) ->where(‘content_pages’,’Home’) ->where(‘content_structure.status’,’Active’) ->orWhere(‘content_structure.status’,’NULL’)… Read More »

update batch (multiple update) codeigniter not working

Questions: why my update_batch in codeigniter doesn’t work ? i tried copy-paste result query from codeigniter to phpmyadmin also doesn’t work here is last_query result UPDATE resquest SET request_status = CASE WHEN request_part_id = ’72’ THEN ‘accepted’ WHEN request_part_id = ’73’ THEN ‘accepted’ ELSE request_status END WHERE request_part_id IN(’72’,’73’) and here is my update batch… Read More »

Laravel api call does fails

Questions: So I asked this question in larachat and searched in google. I know that similar questions have been asked before but none of them worked for me. I’m trying to load the comment’s of a post but the request doesn’t even get to the api.php here is the request I do: axios.get(`/api/posts/${this.post.id}/comments`) and than… Read More »

Debugging Laravel application on VSCode

Questions: Has anyone successfully configured VSCode to debug Laravel-based website? After having followed numerous articles and tutorials, I have made it to the point where I can ask VSCode to “Listen to XDEBUG”, but I haven’t been able to do normal VS-style debugging where I could just hit F5 to launch current the website in… Read More »

php artisan migrate stuck at the beginning of the command

Questions: [MacOS 10.14.0] When I create a new project (Laravel new blog) Then create a table in MySQL (create database blog) And then update my .env file with the correct userame, password and database. After creating a project, I will run php artisan migrate But my terminal stays empty, I can type in my terminal.… Read More »

check for a JSON string inside of a larger string in PHP

Questions: Here is an example of a log file entry: [22-Aug-2017 16:19:58 America/New_York] WP_Community_Events::maybe_log_events_response: Valid response received. Details: {“api_url”:”https:\/\/api.wordpress.org\/events\/1.0\/”,”request_args”:{“body”:{“number”:5,”ip”:”192.168.99.0″,”locale”:”en_GB”,”timezone”:”America\/New_York”}},”response_code”:200,”response_body”:{“location”:{“ip”:”47.197.97.47″},”events”:”5 events trimmed.”}} The {“api_url”:”https:\/\/api.wordpress…. portion is valid JSON, but obviously the entire string itself (the log entry line) isn’t. I’m hitting a wall with a way to essentially pull out that JSON without messing up any… Read More »