Tag Info

New answers tagged

0

It should be on stack overflow, that said ... // Assign to a variable $str = str_replace('\', '',json_encode($_GET['data'])); // Remove spaces and " at the start and end with trim $strFinal = trim($str,'" ');


0

I got it working.In my case,I was missing the authorized_keys and the known_hosts files in my www-data users root folder.I added .ssh folder under /var/www/.ssh. I previously only moved the ssh key files hence I faced the issue for not able to connect to the git repository over http.


-2

apt-get install libapache2-mod-php5


0

The file PHP/Serialization.pm or better /usr/share/perl5/PHP/Serialization.pm is part of the package libphp-serialization-perl. Therefore install via sudo apt-get install libphp-serialization-perl


0

Try using an other method to get the file content. As suggested by a user here who seems to have the same problem: http://kb.odin.com/en/125759 function get_content($URL){ $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $URL); $data = curl_exec($ch); curl_close($ch); return $data; } ...


0

When you upgrade, Ubuntu will disable your PPA's, in an attempt to avoid conflicts of software that is no longer supported. You quite possibly upgraded from a previous version and need to re-enable the PPA. You can simply check a box in the software updater (settingsrepositoriesother software), or you could edit the source file(s) manually and uncomment ...


4

Force the installation of version 5.5.9+dfsg-1ubuntu4 sudo apt-get install php5-common=5.5.9+dfsg-1ubuntu4 Version 5.5.9+dfsg-1ubuntu4 can't be installed in the normal way, because your installed version has a higher version number. After reading your comments and your updated question, your system is pretty shot up. Why do you use PPAs or install deb ...


0

By default php is explicitly disabled for /home/*/public_html. To change this on ubuntu 14.04, cd /etc/apache2/mods-enabled/ sudo cp php5.conf my-php5.conf sudo rm php5.conf and edit my-php5.conf by changing the lines <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_flag engine Off </Directory> ...


0

In my case, my problem was that I installed atom via a PPA. When i delete atom and i reinstalled via the official web page the problem solved


1

For older versions of MySQL you would go to: MySQL Community Version And for PHP you would go to php.net/releases


1

LAMP, Linux, Apache, MySQL, PHP... as package doesnt have the newest releases of everything. Im sure someday there will be a LAMP package with php5.6 but not currently evidently. So that puts you with installing LAMP packages individually from source, or add a repo that includes php5.6. You can try this page for installing php5.6.


0

You can probably download them from somewhere (using Google or your favorite search engine) as .deb packages and install them with sudo dpkg -i /path_to_the_downloaded_package/package_name.deb. Another option is to compile them directly from their source code.


0

It means that, on your system (localhost) there is no program listening to TCP port 80. You need to start a webserver, e.g., apache2 and configure it to handle your requests. Reread the beginning of your course, and see what it says about webserver requirements.


0

The only folder which gets cleaned at every reboot regardless of the running processes, which might handle their temporary files differently, e.g. by storing them into other places and / or by removing them from /tmp or from other places during the execution, AFAIK, is /tmp, so it's likely (but indeed not sure) that it's /tmp that got cluttered. What I'd ...


1

Setting up a LAMP server, I go in the following order; 1. Apache, 2. PHP, 3. MySQL So for you I would run the following commands: sudo apt-get install --reinstall apache2 sudo apt-get install --reinstall php5 It won't remove the current configurations for either Apache or PHP but should at least be a bit more specific to troubleshoot then dpkg ...


1

Try to do this: mkdir /var/log/apache2 touch /var/log/apache2/error.log touch /var/log/apache2/access.log chown -R root:adm /var/log/apache2 chmod 750 /var/log/apache2 chmod -R 540 /var/log/apache2/* service apache2 restart But thats not a normal behaviour of apache2. May be you should check your server with the programm: chkrootkit - perhaps it was ...


0

The cli version of php has several differences with the cgi. One of these is that headers are printed. Since your code starts a session, which will not exist, and then checks for a given value of $_SESSION['state'] it will always end in the code header('Location: ' ...) which will output nothing, as the cli does not do headers.


1

@the_seppi answer is good and detailed and will probably do you, but I would like too add The quick way,using a terminal sudo -i apt-get install php5-dev build-essential apt-get install php-pear pecl download channel://pecl.php.net/blenc-1.1.4b tar xzf blenc-1.1.4b.tgz cd blenc-1.1.4b phpize Before you launch the configuration script you can change ...


1

From http://php.net/manual/en/intro.blenc.php, just to have said it: Warning This extension is EXPERIMENTAL. The behaviour of this extension including the names of its functions and any other documentation surrounding this extension may change without notice in a future release of PHP. This extension should be used at your own risk. First, of course, ...


2

A .sql is a text file. more {file}.sql will show you the contents and instructions that will be executed if you feed MySQL the file. You do that with ... mysql -u {user} -p {database} < {file}.sql Careful though. This will add the file contents to {database} and can potentially kill your database. Therefor first examine the file and see what is in it. ...


1

You need to sudo apt-get install libpq5 to install the postgresql client libraries. If you had installed the pgsql apache module using a package (sudo apt-get install libapache2-mod-auth-pgsql), the libpq5 package would have been installed automatically, whic makes me think you installed it "by hand" somehow. Anyway, installing libpq5 should help.


1

I recommend Codiad - dark theme, git, terminal, easy setup without big dependencies.


0

If you want the execution errors of a script, that's configured on /etc/php5/fpm/php.ini. If you want errors on a log file, edit php.ini : display_errors = off error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT error_log = /path/to/some/file.log If you want them on the browser, edit php.ini : display_errors = on error_reporting = E_ALL ...


1

ALWAYS sudo apt-get update Basic: sudo apt-get install apache2 php5-common mysql-server libapache2-mod-auth-mysql php5-mysql Extras: sudo apt-get install php5-dev php5-gd Make sure you ALWAYS run mysql_secure_installation after you have installed MySQL


0

I faced this exact same problem through the day and am glad I solved it in the below manner. Although, the above reply is marked as an answer, it is clear from the comments to that answer that it doesn't completely answer the question. The correct file to enable is in /etc/php5/cli/conf.d Then enter the following in there zend_extension=opcache.so ...


0

The easiest way is to add your user to the group that owns /var/www/, usually www-data Check the group of /var/www ls -la /var/ | grep www where the output will be something like drwxrwxr-x 3 www-data www-data 4096 ago 1 16:10 www on my output the second www-data position indicates the group is actually www-data so now you have to add yourself to ...


1

reset mysql's root password Stop MySQL The first thing to do is stop MySQL. If you are using Ubuntu or Debian the command is as follows: sudo /etc/init.d/mysql stop For CentOS, Fedora, and RHEL the command is: sudo /etc/init.d/mysqld stop Safe mode Next we need to start MySQL in safe mode - that is to say, we will start MySQL but skip the user ...


0

If you are not allowed access to a file, precede the command you are typing with sudo, this should prompt you for your password. The sudo command basically means "superuser do". So you have privileges of the root user when you use it. Example: sudo vi index.html. Hope that sorts that part of the problem out for you.


0

Swap the order of those Alias directives so the most specific one comes first: Alias /blog/wp-content /var/lib/wordpress/wp-content Alias /blog /usr/share/wordpress From the docs: [...] the Aliases and Redirects are processed in the order they appear in the configuration files, with the first match taking precedence. For this reason, when two ...



Top 50 recent answers are included