tagged [php]

No Application Encryption Key Has Been Specified

No Application Encryption Key Has Been Specified I'm trying to use the Artisan command like this: It displays: > Laravel development server started: [http://127.0.0.1:8000](http://127.0.0.1:8000) Howe...

29 Dec at 00:44

How to loop through PHP object with dynamic keys

How to loop through PHP object with dynamic keys I tried to parse a JSON file using PHP. But I am stuck now. This is the content of my JSON file: And this is

28 Dec at 13:18

Simpler way to check if variable is not equal to multiple string values?

Simpler way to check if variable is not equal to multiple string values? Current Code: And: ```

Display all post meta keys and meta values of the same post ID in wordpress

Display all post meta keys and meta values of the same post ID in wordpress I'm trying to display post meta values and post meta keys, If only one value is to be display I can used the simple function...

27 Dec at 05:20

Laravel form html with PUT method for PUT routes

Laravel form html with PUT method for PUT routes I Have this in my routes : ``` +--------+---------------------------+--------------+--------------------------- ...

27 Dec at 05:15

Trying to get property of non-object - Laravel 5

Trying to get property of non-object - Laravel 5 I'm trying to echo out the name of the user in my article and I'm getting the > ErrorException: Trying to get property of non-object My code: ``` 1. Ne...

27 Dec at 05:12

How to create a logfile in php

How to create a logfile in php I want to create a logfile for my system to register/log every action they do inside the system. But I have no idea how to do it. For example, I have this php code that ...

27 Dec at 04:55

Any way to break if statement in PHP?

Any way to break if statement in PHP? Is there any command in PHP to stop executing the current or parent `if` statement, same as `break` or `break(1)` for `switch`/`loop`. For example in the above co...

27 Dec at 01:24

How to zip a whole folder using PHP

How to zip a whole folder using PHP I have found here at stackoveflow some code on how to ZIP a specific file, but how about a specific folder? inside in `My Folder`, there are files. after zipping th...

27 Dec at 01:21

Get integer value from malformed query string

Get integer value from malformed query string I'm looking for an way to parse a substring using PHP, and have come across preg_match however I can't seem to work out the rule that I need. I am parsing...

Laravel PDOException SQLSTATE[HY000] [1049] Unknown database 'forge'

Laravel PDOException SQLSTATE[HY000] [1049] Unknown database 'forge' I am using Laravel to connect to MySQL database and got this exception: and this is my config.database.php ``` 'mysql' => array( ...

22 Dec at 01:4

PHPMailer - SMTP ERROR: Password command failed when send mail from my server

PHPMailer - SMTP ERROR: Password command failed when send mail from my server I have used phpmailer() concept to send mail to users from my shared server using php script, but I'm not able to send eve...

21 Dec at 23:13

Disable PHP in directory (including all sub-directories) with .htaccess

Disable PHP in directory (including all sub-directories) with .htaccess I'm making a website which allows people to upload files, html pages, etc... Now I'm having a problem. I have a directory struct...

21 Dec at 22:48

Call to undefined function oci_connect()

Call to undefined function oci_connect() I got this error. that is the code. This is the error I got. I checked the PHP DLL f

21 Dec at 04:52

How to close Browser Tab After Submitting a Form?

How to close Browser Tab After Submitting a Form? I would like to close page after submitting the form. After running the above code the

21 Dec at 04:52

Get the path with query string on the current http request in PHP

Get the path with query string on the current http request in PHP I need to get the path with query string from the URL of the current request. For example, if the current URL is: I would want this:

20 Dec at 14:27

Execute PHP script in cron job

Execute PHP script in cron job In our centos6 server. I would like to execute a php script in cron job as apache user but unfortunately it does not work. Here is the edition of crontab (crontab -uapac...

20 Dec at 00:57

Redirect with CodeIgniter

Redirect with CodeIgniter Can anyone tell me why my redirect helper does not work the way I'd expect it to? I'm trying to redirect to the index method of my main controller, but it takes me `www.examp...

19 Dec at 21:13

how to call a onclick function in <a> tag?

how to call a onclick function in tag? I want to open a new window on click of 1 It is not showing me error. Is there any other way to open new window? Here is the fiddle [http://jsfiddle.net/ankurdha...

19 Dec at 21:10

How to check which PHP extensions have been enabled/disabled in Ubuntu Linux 12.04 LTS?

How to check which PHP extensions have been enabled/disabled in Ubuntu Linux 12.04 LTS? I'm using Ubuntu Linux 12.04 LTS on my local machine. I've installed LAMP long ago on my machine. Now I want to ...

19 Dec at 19:56

Calling Python in PHP

Calling Python in PHP I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac. I don't ...

19 Dec at 19:50

PHP: Fastest way to handle undefined array key

PHP: Fastest way to handle undefined array key in a very tight loop I need to access tens of thousands of values in an array containing millions of elements. The key can be undefined: In that case it ...

18 Dec at 21:46

How to check if PHP-FPM is running properly?

How to check if PHP-FPM is running properly? The documentation on php fpm website says that php fpm is part for coe php as of 5.3.3 I am running 5.3.10, how can i check that it is working correctly? I...

14 Dec at 10:55

Strip off specific parameter from URL's querystring

Strip off specific parameter from URL's querystring I have some links in a Powerpoint presentation, and for some reason, when those links get clicked, it adds a return parameter to the URL. Well, that...

Reference - What does this error mean in PHP?

Reference - What does this error mean in PHP? ### What is this? This is a number of answers about warnings, errors, and notices you might encounter while programming PHP and have no clue how to fix th...