Skip to content
Advertisement

Tag: php

Couldn’t get a file descriptor referring to the console while trying to open filestructure of laravel using terminal

I installed laravel 5.2 and tying to open the file structure through terminal using command: open ., it comes with error Couldn’t get a file descriptor referring to the console. How can I resolve this problem? Currently I’m using ubuntu 14.04. Screenshot Answer Try to use: It should work in Ubuntu. http://www.cyberciti.biz/faq/bash-shell-open-gnome-nautilus-file-manager/

Setting the right timezone, server and PHP

I need to set the right timezone. But I don’t understand if there is any difference between the PHP timezone (date_default_timezone_set()) and the Linux setting. Suppose I run a new AWS instance from N.Virginia. The default timezone of that server should be UTC-05:00 Does this mean that I have to set UTC-05:00 inside my PHP ini config? If I set

PHP / Linux shell unwanted character

I have an HTML form (field with multiple lines) that feeds a PHP code that will read each line of the field, and generate a pdf file using the line string as name. My problem is that all but the last file have a trailing ‘?’ at the end of the file. I think that somehow the form is sending

How to install hook in server?

I use Bitnami for local webserver I want try this system. But I have no experience with this script, I want understand how I can install it on my localhost. The documentation describe: how I should execute this command? Someone could explain me? Answer Bitnami developer here If you have installed an AMP Stack from Bitnami, you have to load

How to Grep for special characters in Linux

I wanna grep this $_SESSION[“sig”] in Linux, and find out all of files with this variable. I used but they are not working How can I fix this? Thank you. Answer Just use the grep -F ‘$_SESSION[“sig”]’ * command.

Remove folder structure (parents only) using ZIP command in PHP

I want to create a zip of all files in X folder with the name filename.zip using following command in php like: exec(zip -r “./Zips/filename.zip” “./Uploads/Data/X/”) but the created zip has the folder structure Uploads/Data/X. Please help me to get rid of these parent folders – Uploads/Data. Answer Ignoring folder structure when creating zip archive (Linux): By default, zip will

CHange php 5.4 to 5.5 on Hostgator

Currently on composer install I get the error need 5.5.9 but using 5.4 but on Hostgator cpanal it’s set as 5.5 On php -v I get On php –ini I get When going into /opt/ There is a php54, php55 and php56 How do I change my version to 5.5 I saw the following example on this link But when

Cannot pass STDIN using shell_exec() in PHP

I am a complete beginner in PHP. I want to execute a java .jar file using PHP.The jar file takes input from STDIN and generates the output at STDOUT.To execute the jar file this is what I do in my Ubuntu Linux terminal: This works perfect.However when I replicate this in PHP as: This sends $p the output generated when

‘exec(): Unable to fork’ on Ubuntu 14.04.3 LTS

I’m running unittest scripts and for test case setup I need to run shell command from time to time. As a result shell command is run around 50 times during unittest execution. It works ok on CentOS release 6.6 (Final) server but doesn’t work on Ubuntu 14.04.3 LTS. The problem is that after around 20th time shell script execution I

Specify output names on multiple files with curl using ranges

I am trying to download a few hundred URL’s and specify the output name for each, the only difference is an ID in the URL, such as ..something/1/something.., ..something/3/something.., ..something/4/something.. etc. I can use -o filename.zip but it will overwrite for each of the range of files, I am currently using: How can I output as this:? file1.zip, file3.zip, file4.zip,

Advertisement