Cronjob execute problem - doesn't execute the controller/method - codeigniter

I'm trying to create a cron job and execute the cron job through the terminal, but when I execute - php index.php hello(controller) greet(method) Glen(parameter) , prints home page. Any idea what can cause problem like this?
<meta charset="utf-8">
<title>Page Not Found</title>
<meta name="description" content="Please find what you're looking for by using the main menu">

Related

laravel Barryvdh dompdf error layout_line()

Im using Laravel 8, codes works perfectly before in both dev and prod server before. but when i move to PHP8, it still works in Dev server, but got an error in my production environment with this message
TypeError
Dompdf\FrameReflower\Text::layout_line(): Argument #1 ($block) must be of type Dompdf\FrameDecorator\Block, null given, called in /home/aliseafo/ali/vendor/dompdf/dompdf/src/FrameReflower/Text.php on line 399
below is the sample code, even with this simple codes, it still got the error
<!doctype html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<html lang="en">
<head>
<title>Invoice - 1</title>
</head>
<body>
<main>
<div>
<h1 align="center">COMMERCIAL INVOICE</h1>
</div>
</main>
</body>
</html>
latest config:
Development PHP 8.1.6, Laravel 8.83, Laravel dompdf 2.0
Production PHP 8.1.8, Laravel 8.83, Laravel dompdf 2.0
but still got that error.
anyone experiencing this before, or any clue why and how?
thanks for any ideas
Did this attempt, but still got error:
already tried
php artisan cache:clear; php artisan config:cache
reinstall laravel dompdf both in dev or prod composer update
recopy all files from dev to prod directly
php-mbstring enabled already
charset=utf-8 already added in the templates
Update 1.
when im switched it back to PHP7.4, nothing changed with the code, and it can print the pdf file successfully. so i think there is something problem with between my php8.1 installation or the compatibility of laravel-dompdf with php8.1

Laravel Vuejs Uncaught SyntaxError: expected expression, got '<'

I am new to vuejs, I am developing a new laravel-vuejs project. When I run npm run dev, it gives this error Uncaught SyntaxError: expected expression, got '<'. I am running the application using http://127.0.0.1:8000/
index.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ env('APP_NAME') }}</title>
<link href="/css/app.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="/js/app.js"></script>
</body>
</html>
I was running npm run dev and npm run watch and there was no error on compilation but when i was running the application using the http://127.0.0.1:8000/.
I was getting an error:
Uncaught SyntaxError: expected expression, got '<'
I kept googling to find the solution for it, then I came to know that I have to run:
php -S localhost:8000 -t public/
and then run the following:
http://localhost:8000/
Cheers!

setup module url : no go-import meta tags

Please consider this question:
Based on https://golang.org/doc/tutorial/call-module-code, I've:
$ cat hello.go
package main
import (
"fmt"
"example.com/greetings"
)
func main() {
// Get a greeting message and print it.
message := greetings.Hello("Gladys")
fmt.Println(message)
}
and,
$ cat go.mod
module hello
go 1.14
replace example.com/greetings => ../greetings
require example.com/greetings v0.0.0-00010101000000-000000000000
It loads the greetings module from my local folder, and goes its way.
In real life, greetings is a module I use a lot, so I lug that folder around a lot so I can use my it.
To avoid this, how can I setup my own URL of this folder, and use it? That is, I can copy that folder to say, https://mywebsite.com/myGoThings/greeting - just a plain apache server which is open for GETs. (I do not want to use github, I'd prefer my own https endpoint.)
When I try this, go get mywebsite.com/myGoThings/greeting complains : no go-import meta tags () and quits.
If this is possible, could you please show me how to accomplish this?
update 1
This is my greetings folder as in mywebsite.com/myGoThings/greeting:
$ ls greetings/
go.mod greetings.go import.html
import.html:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Go Imports -->
<meta name="go-import" content="GOIMPORT">
<meta name="go-source" content="GOSOURCE">
<meta http-equiv="refresh" content="0; REDIRECT">
</head>
<body>
</body>
</html>
When you have any custom domain else github.com, gitlab.com, etc. The first step is to add a ssh-key to your system, then set the GOPRIVATE environment variable. after a logoff you can use your own private repository.
The official golang documentation describes how to that.

Magento 2 blank page but not empty

I am developing a Magento 2.3 site which was working but has stopped. When I try to get a page up, I get a blank screen. Although it looks empty, it actually contains a little content:
<!doctype html>
<html lang="en">
<head >
<meta charset="utf-8"/>
<meta name="description" content="Blah Blah"/>
<meta name="keywords" content="More blah blah"/>
<meta name="robots" content="INDEX,FOLLOW"/>
<title></title>
<link rel="icon" type="image/x-icon" href="http://www.magento2.domain/pub/media/favicon/stores/1/3-ladies-bg.jpg" />
<link rel="shortcut icon" type="image/x-icon" href="http://www.magento2.domain/pub/media/favicon/stores/1/3-ladies-bg.jpg" />
<link href='https://fonts.googleapis.com/css?family=Prosto+One' rel='stylesheet' type='text/css' />
<!--xxxabb2c66c7681e8f658-->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-131267613-1');
</script> </head>
<body data-container="body" data-mage-init='{"loaderAjax": {}, "loader": { "icon": "http://www.magento2.domain/pub/static/version1551796553/frontend/_view/en_GB/images/loader-2.gif"}}' class="cms-index-index page-layout-1column">
</body>
</html>
If I look in the system log, I see the following errors:
[2019-04-30 21:24:48] main.INFO: Broken reference: the 'theme.active.editor' element cannot be added as child to 'after.body.start', because the latter doesn't exist [] []
[2019-04-30 21:24:48] main.INFO: Broken reference: the 'logger' element cannot be added as child to 'after.body.start', because the latter doesn't exist [] []
I've enabled error logging but I get nothing. Can anyone help?
Alternatively, can somebody point me to a good map (or similar) of how magento 2 builds a page so I can try and track down the error.
I have tracked down the issue to a problem with pub/generated/metadata/global.php. Even regenerating it causes the same problem. If I delete the file everything seems to work ok. I confess to not understanding why!
I now avoid this by not running bin/magento setup:di:compile. I simply run php bin/magento setup:static-content:deploy.
I think this error is due to a broken reference in some XML file. You have not mentioned in which page you are getting this error. But you can trace it as below:
First of all, rename your default.xml from below path:
app/design/frontend/Vendor/Theme_name/Magento_Theme/layout/default.xml
Flush all the cache and check(php bin/magento cache:flush)
If you don't find anything then rename your page(homepage, listing, detail page, etc) related file.
For example, if you are getting this error on the homepage then rename cms_index_index.xml.It can reside in your theme or any custom extension.
Hopefully, this information can help you with the issue.
remove everything under generated folder except .htaccess file
I am using Magento 2.3.2 version. In production mode generating generated directory using setup:di:compile is working fine. However, in developer mode doing same is making all pages on frontend blank but not empty (content inside body tag is empty) so I deleted the generated folder and let it be created automatically as I access the site pages. Doing this resolved the issue for me.
Just go to Magento directory and then delete file generated by di:compile is path :-
magento\generated\metadata\global.php delete this file then after refersh your page.
This is temporary solution for this error in local server.

how to avoid .odc file to be edited

I have a .odc file from which i am connecting with oracle data in excel everything is working fine annd i want to give this access to my colleague but the file which i am giving to him is editable in notepad from which he can easily able to see password so i want to protect this file to be edited and i want to encrypt this file please help
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/x-ms-odc; charset=utf-8">
<meta name=ProgId content=ODC.Database>
<meta name=SourceType content=OLEDB>
<title>(Default)</title>
<xml id=docprops><o:DocumentProperties
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns="http://www.w3.org/TR/REC-html40">
<o:Name>(Default)</o:Name>
</o:DocumentProperties>
</xml><xml id=msodc><odc:OfficeDataConnection
xmlns:odc="urn:schemas-microsoft-com:office:odc"
xmlns="http://www.w3.org/TR/REC-html40">
<odc:Connection odc:Type="OLEDB">
<odc:ConnectionString>Provider=MSDASQL.1;Persist Security Info=True;Extended Properties="**DSN=ALPHA;UID=ALXLIE;PWD=BAC123;**DBQ=ALXORCL;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BNF=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=F;CSR=F;FWC=F;FBS=64000;TLO=O;MLD=0;ODA=F;STE=F;TSZ=8192;AST=FLOAT;";Initial Catalog=(Default)</odc:ConnectionString>
<odc:CommandType>Table</odc:CommandType>
<odc:SSOApplicationID>786</odc:SSOApplicationID>
<odc:CredentialsMethod>Stored</odc:CredentialsMethod>

Resources