Tag Info

New answers tagged

0

Please use this as your .htaccess file: <IfModule mod_rewrite.c> Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php ...


0

As a follow up on my own question I will elaborate with my experience. I made Shell execution work from PHP, but had major security issues with the solution. That was a MAJOR mistake from my hand that I did not see this at the beginning. To eliminate security risks I made a bash script that looked activated users up in the user table. If the user was active ...


0

I solved with Guacamole (http://guac-dev.org). With a php script it could be dangerous and with teamviewer it freezes because every time I have to stop the demon with "teamviewer --daemon stop" from a remote terminal (very complicated if you connect from a mobile).


1

unlink /etc/alternatives/x-cursor-theme You may also be interested in update-alternates update-alternatives --config x-cursor-theme


0

Another common cause is that php short tags <? are not enabled by the default php.ini configuration, so after an upgrade or reinstall, that setting may be turned off and php code may depend on it. Try replacing <? with <?php. (Credit)


0

I did manage to fix it. From a basic install of phpmyadmin these are the steps to allow remote connection. If anyone ever needs it Code out /etc/phpmyadmin/confi.inc.php $cfg['Servers'][$i]['controluser'] = $dbuser; $cfg['Servers'][$i]['controlpass'] = $dbpass; Edit /etc/phpmyadmin/apache.conf 10.0.0.157 is the machine you want to access the myphpadmin ...


0

When I have had the similar issues with Phpmyadmin, I followed this awesome guide and fixed everything. Follow each step there, you might have missed something.


1

can i execute shell commands on Ubuntu from PHP, and automate what I am doing manually now? You can run shell commands from within PHP using the shell_exec() function or using the ` ` (backtick) operator: if you're running PHP < 5.4.0, first make sure to disable safe mode, then in your PHP script you can use either of those syntaxes: $return = ...


2

phpmyadmin should run on the server that has Apache2 and PHP running, but it is able to connect to an external database server. Answer taken from here: In the config file, change the "host" variable to point to the external server. The config file is called config.inc.php and it will be in the main phpMyAdmin folder. There should be a line like this: ...


1

This is the content of your sudoers file? www-data ALL=(ALL) NOPASSWD: /sbin/iptables Make sure to pass the full path of the executable. Here is code in python: #!/usr/bin/env python3 import subprocess as sp sp.call(['sudo', '/sbin/iptables' , '-S']) Here is someone who encountered a similar problem in PHP: ...


1

Well then check if mysql is really not running: sudo aptitude install nmap And then: sudo nmap -sS <ipofdbserverhere> You can also install the tool on the mysql server, the the command would be: sudo nmap -sS localhost In both cases your answer should look like this. [simmel]@[mars]$ sudo nmap -sS 172.16.1.41 Starting Nmap 6.40 ( ...


0

The solution is to remove $mydomain (or "myownservername.xxx" if set explicitly) from mydestination variable in /etc/postfix/main.cf. http://serverfault.com/questions/249561/configure-postfix-to-use-external-mx-servers-for-delivery-of-local-mail-if-user?newreg=418587ca2fe940d0b139d4194bea7fd7


0

I found a solution by adding this to htaccess: <IfModule mod_mime.c> AddType text/xml .xml .php </IfModule> Not sure why it even works but it does


0

Which version is your wordpress installation? If it is >= 3.9 read this: https://make.wordpress.org/core/2014/04/07/mysql-in-wordpress-3-9/ In WordPress 3.9, we added an extra layer to WPDB, causing it to switch to using the mysqli PHP library, when using PHP 5.5 or higher. For plugin developers, this means that you absolutely shouldn’t be using PHP’s ...


0

I found out the solution. XAMPP has php-cli already installed so there is no need to install php-cli via apt-get. The reason for the above problem is, as PHP is installed as a bundle along with XAMPP, the OS doesn't know it is there. So for this we should add the XAMPP php to environment variables. This done by typing following command in terminal export ...


0

You should then symlink it by ln -s /opt/lampp/bin/php /usr/local/bin/php And then if you type composer in your terminal it will be accessible globally in your system


0

This has been already answered. See this Stack Overflow (on Stack Overflow). UPDATE: try to reinstall your pecl extension following this guide: How to install a pecl extension module on ubuntu(mkfoster.com)


0

in your attempt: sudo chgrp apache /var/www/html/itdb/data/itdb.db you're setting group "apache" as owner of this resource /var/www/html/itdb/data/itdb.db and script is complaining: var/www/html/itdb is not writeable by apache and even giving you solution: chown www-data /var/www/html/itdb/data/files/; chmod u+w /var/www/html/itdb/data/files/ ...


0

At first reinstall pear: wget http://pear.php.net/go-pear.phar php go-pear.phar After that install graphviz via pear: sudo pear install Image_GraphViz That's all.


1

You can not install Eclipse over the repositories and Software Center or apt-get. You will have to visit https://eclipse.org/downloads/packages/eclipse-php-developers/lunasr2 and download the right version (Linux 32/64Bit). Then extract the tar.gz-archive (about 100-150MB) to your /opt directory. You need root privileges to access that folder, so run ...


0

PHP is integrated into apache upon installation and so, there is no need to worry. You can put php code into .php files into the web server. Foe example, instead of using index.html, you should use index.php so you can put php code into it. Here's a sample piece of code that can be used and easily understood - <!DOCTYPE html> <html> ...


0

You do not add these to eclipse - they run independently as servers (apache/php and mysql) Download and install eclipse specifically built for web development from PHP Development Tools.


-1

If you are running your file just for the localhost then change the chmod to 777 for /var/www/html save every php file in html folder which is found in the path mentioned above. The new apache loads the file from the server only if it is present in the HtMl folder. i hope it will work. (Though 777 chmod is not recommended of course because of the ...


0

I found that you have to edit the file /etc/mysql/my.cnf and make the bind-address the ip address you would like to give access to. And if you would like all you write 0.0.0.0


0

Best and easy LAMP installation tutorial.... http://11howto.in/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04/1425/


0

Sometimes it can be as simple as clearing the browser cache. If there was some misconfiguration and it was indeed downloading files, after fixing the config the browser needs to be told to stop using the cached download.


0

It might be the case that mysql is not configured with php. You can try and install it by the command sudo apt-get install php5-mysql Refresh the browser. Hope it helps.



Top 50 recent answers are included