PHP persistent or permanent connection to Mysql [duplicate] - php

This question already has answers here:
php connection pooling mysql [duplicate]
(6 answers)
mysqli persistent connection
(3 answers)
Closed 12 days ago.
The community reviewed whether to reopen this question 11 days ago and left it closed:
Original close reason(s) were not resolved
Is it possible to make persistent or permanent connection to Mysql in PHP?
I mean when I make few separate requests to PHP they all will use the same connection to Mysql. I use msqli driver not sure if it is possible.

Related

inputing details from form to database doesn't work [duplicate]

This question already has answers here:
PHP code is not being executed, but the code shows in the browser source code
(35 answers)
Closed 8 days ago.
i want to input the data from form to database i'm using xampp
If your xampp Apache server and MySQL server are turned on, you should be accessing the web pages with "localhost/proj/" not with the file directory.

Get information about php [duplicate]

This question already has answers here:
Where does phpinfo() get its info?
(5 answers)
Closed 2 years ago.
I just started with programing in PHP
And i have a problem:
I'm just experimenting and discovering the language. I tried compressing a string and display the output. I get an some zlib error. I am just wondering if there is a function that returns information about extensions?
You should use
phpinfo();
to display the PHP configuration.

How to set aws DB constants in my local apache (php)? [duplicate]

This question already has answers here:
Setting environment variables for accessing in PHP when using Apache
(4 answers)
Closed 3 years ago.
Amazon AWS (LAMP) automatically adds DB param constants so that it’s not necessary to mention them explicitly in the php: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP.rds.html. How can I replicate this on my local (windows) instance? I saw define, but that needs to go in the php file, which defeats the purpose I think. There must be a better way to achieve this, right?
The QA referenced in Jose Henrique Felipetto (Setting environment variables for accessing in PHP) answered this question. I have put in a close vote on my own question, and closed it as a duplicate

Serve Laravel on a custom port number [duplicate]

This question already has answers here:
Set port for php artisan.php serve
(9 answers)
Closed 6 years ago.
I am using laravel 5.3 and this may be a basic question but I want know how I can serve Laravel on a custom port number (port 1000).
For port 1000:
php artisan serve --port=1000

How to make PHP application working multi-threaded? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Multithreading/Parallel Processing in PHP
I need to make application which work 10 simultaneously like multi-threading .
If you application is running on the CLI, you can use pcntrl_fork:
http://www.php.net/manual/en/function.pcntl-fork.php

Categories