Is it ok to disable php function like exec, system, phpinfo for laravel?

|
Neophyte_01 2022-09-16 18:37:42
Matthew Tunde 2022-09-16 18:24:53
You can’t decrypt hash

ok

Neophyte_01 2022-09-16 18:38:26
Lucky 2022-09-16 18:26:41
Just use hash is class

i have used Hash::make to encrypt need to decrypt it

DesolatorMagno 2022-09-16 18:42:39
Neophyte_01 2022-09-16 18:38:26
i have used Hash::make to encrypt need to decrypt it

https://laravel.com/docs/9.x/encryption#using-the-encrypter
Encrypt don’t hash.

Laravel – The PHP Framework For Web ArtisansLaravel
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
JeevaniSM 2022-09-16 19:43:17
>> How to write/create a file in the /tmp folder instead of /storage folder in Laravel ?

Hi All,
I use this code to store my value of a variable, that I need to use in another page – This particular value is coming as part of an incoming Request JSON block (URL 1) – The original requirement is that I need this value rcee_code in another page (URL 2). In general, I would use the session but the session way did not work how many times I tried. When the URL 2 page loaded, it doesnt have the SESSION variable I set in the URL1. In order to work around, I tried to create a file in the storage folder in URL 1 and read it again from URL 2 Page.
However this worked for my dev machine, when it comes to Production server, my laravel application has no permission to write inside the Storage folder. ( some infra settings ) so I was advised to write this file holding value into /tmp folder but I dont know how to write file outside of storage folder.

below is the code, I use to write inside the storage folder
Storage::put(‘rcee_code_right.txt’, ‘somevalue’);

what should I change in code, if I need to write inside /tmp folder ?

## Note – if any one can tell me what the SESSION settings did not work, that would be great help too

thanks

Hisham 2022-09-16 19:50:18
how can i create CustomBroadcastCahnnel for notification ??
Hisham 2022-09-16 19:50:58
there is a customDbChannel and customSmsChannel
Hisham 2022-09-16 19:51:31
Hisham 2022-09-16 19:50:18
how can i create CustomBroadcastCahnnel for notification ??

but no body is talking about this 🙁

DesolatorMagno 2022-09-16 20:14:03
JeevaniSM 2022-09-16 19:43:17
>> How to write/create a file in the /tmp folder instead of /storage folder in Laravel ?

Hi All,
I use this code to store my value of a variable, that I need to use in another page – This particular value is coming as part of an incoming Request JSON block (URL 1) – The original requirement is that I need this value rcee_code in another page (URL 2). In general, I would use the session but the session way did not work how many times I tried. When the URL 2 page loaded, it doesnt have the SESSION variable I set in the URL1. In order to work around, I tried to create a file in the storage folder in URL 1 and read it again from URL 2 Page.
However this worked for my dev machine, when it comes to Production server, my laravel application has no permission to write inside the Storage folder. ( some infra settings ) so I was advised to write this file holding value into /tmp folder but I dont know how to write file outside of storage folder.

below is the code, I use to write inside the storage folder
Storage::put(‘rcee_code_right.txt’, ‘somevalue’);

what should I change in code, if I need to write inside /tmp folder ?

## Note – if any one can tell me what the SESSION settings did not work, that would be great help too

thanks

Both page are different domain?

You can’t/shouldn’t use storage to store outside storage, you can check inside the storage class to see how it store files, I usually make a folder inside storage where I can store certain data, never had problem with it before.

JeevaniSM 2022-09-16 20:14:26
DesolatorMagno 2022-09-16 20:14:03
Both page are different domain?

You can’t/shouldn’t use storage to store outside storage, you can check inside the storage class to see how it store files, I usually make a folder inside storage where I can store certain data, never had problem with it before.

same domain but different URL path

JeevaniSM 2022-09-16 20:15:43
DesolatorMagno 2022-09-16 20:14:03
Both page are different domain?

You can’t/shouldn’t use storage to store outside storage, you can check inside the storage class to see how it store files, I usually make a folder inside storage where I can store certain data, never had problem with it before.

I understand about the storage thing but unfortunately, I am asked to write in the /tmp folder,
I checked in the php manual and found this
>>
$temp = tmpfile();
fwrite($temp, “writing to tempfile”);
fseek($temp, 0);
echo fread($temp, 1024);
but laravel throws some error

DesolatorMagno 2022-09-16 20:15:52
There is not reason for it to no work, the value can be access from the url 1 after refreshing?
JeevaniSM 2022-09-16 20:17:55
exactly –
my Laravel app is not in the server side, it actually taking incoming requests from another service
so the value I mentioned, I get in a JSON pack when the url is URL1
but that particular value I need to use for another purpose in URL2
in general a session should work but it did not, session is not statying, hence I have to use the file write method
DesolatorMagno 2022-09-16 20:22:00
If I get what you say session don’t have much sense in that case, you could use cache.
JeevaniSM 2022-09-16 20:22:39
DesolatorMagno 2022-09-16 20:22:00
If I get what you say session don’t have much sense in that case, you could use cache.

thank you any documentation pls ?>

JeevaniSM 2022-09-16 20:26:11
DesolatorMagno 2022-09-16 20:22:00
If I get what you say session don’t have much sense in that case, you could use cache.

found this – https://laravel.com/docs/9.x/cache#main-content
thanks for the idea

Laravel – The PHP Framework For Web ArtisansLaravel
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
JeevaniSM 2022-09-16 20:47:47
DesolatorMagno 2022-09-16 20:22:00
If I get what you say session don’t have much sense in that case, you could use cache.

this done the job, thanks a lot for the help

DesolatorMagno 2022-09-16 20:56:22
Good to hear 👍
Ajmal243 2022-09-16 21:31:58
i write mail sending and crm integration in an seperate php script file.how to run this php script in background when i submit a contact form in local and server. i found a command shell_excec.how to use
trm 2022-09-16 21:34:38
Any good resource to learn laracel authentication for absolute beginners??
JS 2022-09-16 22:07:48
https://youtube.com/playlist?list=PLrgiAnplULyaqrQNxcIfKKBkSWFz9Vusx

Web Development using Laravel – YouTubeYouTube
JS 2022-09-16 22:08:22
JS 2022-09-16 22:07:48
https://youtube.com/playlist?list=PLrgiAnplULyaqrQNxcIfKKBkSWFz9Vusx

Laravel Tutorial for beginners

ABBAS_ALSBIHAWI 2022-09-16 22:09:37
trm 2022-09-16 21:34:38
Any good resource to learn laracel authentication for absolute beginners??

Laravel API Server Full Course – Beginner to IntermediateYouTube
Visit https://acadea.io/learn for more lessons and content!
Join my newsletter here to get the BEST updates: https://sendfox.com/acadea
Support me: https://www.paypal.com/donate/?hosted_button_id=HPD9HHN3HBPDC
Support me: https://www.buymeacoffee.com/acadea
Series playlist: https://www.youtube.com/playlist?list=PLSfH3ojgWsQosqpQUc28yP9jJZXrEylJY&index=1

This is a compilation of the series Laravel API Server Ep1-53.

Resources:
Installing Laravel:
https://laravel.com/docs/8.x

Get started on Composer, the PHP dependency manager:
https://getcomposer.org/doc/00-intro.md

MVC explained: https://youtu.be/Gi4fI3jGo74

Installing Laravel:
https://laravel.com/docs/8.x

Get started on Composer, the PHP dependency manager:
https://getcomposer.org/doc/00-intro.md

MVC explained: https://youtu.be/Gi4fI3jGo74

————

Source code for this lesson:
https://github.com/acadea/course_laravel_api_server_livepost

Subscribe for more: https://www.youtube.com/channel/UCU5RsUGkVcPM9QvFHyKm1OQ?sub_confirmation=1

Follow me on Medium: https://sam-ngu.medium.com/

Read unlimited Medium articles. Become a Medium member today: https://sam-ngu.medium.com/membership

** Affiliated links
Email marketing is made simple! Affordable and powerful! Build your audience starting today!
Mailercloud: https://app.mailercloud.com/register?ref=samngu1

Earn passive income from crypto while you sleep! Get started on Nexo today! Up to 12% annual interest. Get $10 USD reward if you use my referral link below.
https://nexo.io/ref/2a2hror0bf?src=web-link

Use the legendary Git GUI for FREE! You are seriously missing out if you are not using it.
Gitkraken: https://www.gitkraken.com/invite/f2ZuAnFM

Beautiful designs created instantly to wow your social networks!
Stencil: https://getstencil.com?tap_a=9103-1801f8&tap_s=595482-2f5817

A simple and scalable cloud hosting platform for all developer needs.
Digital Ocean: https://m.do.co/c/6ffbb89a5a8c

Get started on Crypto today. Gets 10% off of all crypto trading fees if you use my referral link below.
Binance: https://www.binance.com/en/register?ref=NYGT7E2B

Outro Music:
Wayr — Between Our Universes https://www.youtube.com/watch?v=UzynxRh6fx4
Songs Used:
Meet & Fun! by Ofshane: https://www.youtube.com/watch?v=Qja6PWMsDg0

Timestamps:
00:02 Ep01 – Laravel’s Architecture: A quick Overview | Directory and App Structure
10:04 Ep02 – Middleware and Http Kernel
19:17 Ep03 – Service Container and Service Provider
29:18 Ep04 – Facade
33:12 Ep05 – App overview
36:11 Ep06 – Database Design and Migration | Laravel API Server
50:24 Ep07 – Seed and Factories | Laravel API Server
1:04:03 Ep08 – All about models and relationships
1:17:19 Ep09 – Seeding relationships
1:26:14 Ep10 – RESTful API Route Design and Laravel Routes
1:39:35 Ep11 – Controllers
1:47:22 Ep12 – Laravel API Routes Best Practices
1:59:56 Ep13 – Recursively load PHP files in a directory
2:05:36 Ep14 – Essential Eloquent Methods & Properties
2:16:18 Ep15 – DB Transaction
2:20:00 Ep16 – Laravel Resource Class | API Resource
2:24:49 Ep17 – Pagination
2:30:34 Ep18 – Repository pattern
2:37:32 Ep19 – Exception
2:47:23 Ep20 – Event & event listener & subscriber
2:55:46 Ep21 – Sending email
3:06:29 Ep22 – Unit Test vs Feature Test vs E2E Test
3:12:29 Ep23 – Unit Testing Essentials
3:25:44 Ep24 – Testing API routes | Feature Testing
3:42:14 Ep25 – Phpunit with Live Reload?! Productivity Hacks
3:46:36 Ep26 – Composer Script | Productivity Hacks
3:50:22 Ep27 – Test Driven Development (TDD) Basics | Laravel API Server
3:58:31 Ep28 – Opinion on Testing: how much is enough?
4:03:48 Ep29 – Validating Request
4:13:53 Ep30 – Custom Validation with Validator
4:21:32 Ep31 – Laravel IDE helper
4:25:19 Ep32 – Config and Env Var
4:29:49 Ep33 – Documenting API with API Generator
4:41:58 Ep34 – Throttle Middleware and Rate limiting
4:47:39 Ep35 – Authentication with Laravel Fortify: An Overview
4:55:16 Ep36 – Laravel Fortify: Auth, Registration and Password Reset
5:07:44 Ep37 – Laravel Fortify: Email Verification and Updating User Profile
5:17:44 Ep38 …

rlawjddn00 2022-09-16 22:11:29
Is it ok to disable php function like exec, system, phpinfo for laravel???
rlawjddn00 2022-09-16 22:12:36
I’m gonna deploy
Ajmal243 2022-09-16 22:30:39
Ajmal243 2022-09-16 21:31:58
i write mail sending and crm integration in an seperate php script file.how to run this php script in background when i submit a contact form in local and server. i found a command shell_excec.how to use

Anyone know?

Severusxyz 2022-09-16 23:00:28
Ajmal243 2022-09-16 21:31:58
i write mail sending and crm integration in an seperate php script file.how to run this php script in background when i submit a contact form in local and server. i found a command shell_excec.how to use

You could use command. Php artisan command:process

h_a_r_s_a_l 2022-09-16 23:02:58
laravel_discuss-138640.jpg
When i try to send mail that time i received this how to solve this please tell me
Laksida 2022-09-16 23:12:57
laravel_discuss-138641.jpg

Laksida 2022-09-16 23:13:12
somebody know how i can fix this
XaiMeS 2022-09-16 23:22:19
In new laravel version with vite just use npm run dev
Severusxyz 2022-09-16 23:26:49
h_a_r_s_a_l 2022-09-16 23:02:58
laravel_discuss-138640.jpg
When i try to send mail that time i received this how to solve this please tell me

How many mails are you sending?

Severusxyz 2022-09-16 23:27:22
You can’t use the post request to send mails. Using commands you should do it.
h_a_r_s_a_l 2022-09-16 23:28:34
Severusxyz 2022-09-16 23:26:49
laravel_discuss-138640.jpg
How many mails are you sending?

Only one bro 🤦‍♂️

Severusxyz 2022-09-16 23:28:41
Laksida 2022-09-16 23:13:12
laravel_discuss-138640.jpg
somebody know how i can fix this

Package json doesn’t have “watch” Command. Check it out. Try dev if you have Vite.js

h_a_r_s_a_l 2022-09-16 23:28:55
Severusxyz 2022-09-16 23:27:22
laravel_discuss-138640.jpg
You can’t use the post request to send mails. Using commands you should do it.

Which command?

|