LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

366 solutions found in php-dev

Page 17 of 19
0 votes
1 ans
3 views
How to test if a string is JSON or not?

I have a simple AJAX call, and the server will return either a JSON string with useful data or an error message string produced by the PHP function `mysql_error...

php-dev Solved
JE
asked 1 month ago by jeffery_the_wind
0 votes
1 ans
3 views
Import file size limit in PHPMyAdmin

I have changed all the php.ini parameters I know: `upload_max_filesize`, and `post_max_size`. Why am I still seeing 2MB? I'm using Zend Server CE on...

php-dev Solved
RO
asked 1 month ago by ronaldosantana
0 votes
1 ans
3 views
Update a column value, replacing part of a string

I have a table with the following columns in a MySQL database [id, url] And the URLs are like: http://domain1.example/images/img1.jpg I wan...

php-dev Solved
AD
asked 1 month ago by Addev
0 votes
1 ans
3 views
How to install php extension using pecl for specific php version, when several php versions installed in system?

I have installed both php5.6 and php7.0 from PPA on Ubuntu according to this manual [http://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu][1] But I d...

php-dev Solved
OL
asked 1 month ago by Oleg Abrazhaev
0 votes
1 ans
3 views
How to secure phpMyAdmin

I have noticed that there are strange requests to my website trying to find phpmyadmin, like /phpmyadmin/ /pma/ etc. Now I have installed PMA on...

php-dev Solved
AN
asked 1 month ago by Andy
0 votes
1 ans
4 views
/bin/sh: Syntax error: Unterminated quoted string

I am trying to get a cronjob to pipe output into a dated file in a specified (folder) location. My crontab entry looks something like this: * * * * *...

php-dev Solved
OO
asked 1 month ago by oompahloompah
0 votes
1 ans
3 views
How to enable color for PHP CLI?

How do I enable the colors for output of CLI? The below one is, running on Ubuntu. [![enter image description here][1]][1] [1]: https://i.sstatic.net/Tnd00...

php-dev Solved
BA
asked 1 month ago by Barbayar Dashzeveg
0 votes
1 ans
3 views
Empty function in BASH

I'm using FPM tool to create .deb package. This tool create before/after remove package from supported files. Unfortunatly the bash script generated by...

php-dev Solved
US
asked 1 month ago by user3550394
0 votes
1 ans
3 views
Fatal error: Call to undefined function curl_init()

<?php $filename = "xx.gif"; $handle = fopen($filename, "r"); $data = fread($handle, filesize($filename)); // $d...

php-dev Solved
TH
asked 1 month ago by Thew
0 votes
1 ans
3 views
How to remove all non-numeric characters from a string in Bash?

Example: file="123 hello" How can I edit the string `file` such that it only contains the numbers and the text part is removed? So,...

php-dev Solved
AY
asked 1 month ago by Ayush Mishra
0 votes
1 ans
3 views
PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!"

I get this error when I try to access localhost/phpmyadmin: *Wrong permissions on configuration file, should not be world writable!* I have already chmod...

php-dev Solved
GO
asked 1 month ago by good_evening
0 votes
1 ans
3 views
How to install all required PHP extensions for Laravel?

I need to make my Ubuntu 16.04. Is there a way using the GUI or is the simplest way to do this by using terminal? I have already installed PHP 7.1, MariaDB....

php-dev Solved
AI
asked 1 month ago by Aipo
0 votes
2 ans
3 views
How to use sed to extract substring

I have a file containing the following lines: <parameter name="PortMappingEnabled" access="readWrite" type="xsd:boolean&quo...

php-dev Solved
MO
asked 1 month ago by MOHAMED
0 votes
1 ans
3 views
Bash script error: "function: not found". Why would this appear?

I'm trying to run a `bash script` on my Ubuntu machine and it is giving me an error: > function not found To test, I created the following scri...

php-dev Solved
E
asked 1 month ago by E T
0 votes
1 ans
3 views
Configuration failed because libcurl was not found

I am trying to pull some json data from a remote server using `fromJSON`: > server <- 'http://111.111.000.00:3000' > streams <-...

php-dev Solved
RU
asked 1 month ago by Run
0 votes
2 ans
3 views
Curl with multiline of JSON

Consider the curl command below, is it possible to allow newline in JSON (without the minify) and execute directly in bash (Mac/Ubuntu) curl -0 -v -X POS...

php-dev Solved
RY
asked 1 month ago by Ryan
0 votes
1 ans
3 views
grep exclude multiple strings

I am trying to see a log file using `tail -f` and want to exclude all lines containing the following strings: `Nopaging the limit is` and `keyword to remove...

php-dev Solved
JE
asked 1 month ago by Jeets
0 votes
1 ans
3 views
How to fix git error: RPC failed; curl 56 GnuTLS

I use Ubuntu 16.04. When I want to git push origin master I get: error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received....

php-dev Solved
US
asked 1 month ago by user
0 votes
1 ans
3 views
How do I set up curl to permanently use a proxy?

How can I set up "curl" to permanently use a proxy server in the terminal?

php-dev Solved
BE
asked 1 month ago by Ben
0 votes
1 ans
3 views
PHP Fatal error: Call to undefined function json_decode()

Apache is logging `PHP Fatal error: Call to undefined function json_decode()`. After some googling, it seems this problem is a result of not having the latest...

php-dev Solved
MI
asked 1 month ago by MirroredFate