Blank screen on my domain and automatic Zip download - php

when i try upload something on my domain ftp, blank screen appiers and automatic Zip download starts , even phpinfo not working. I have dedicated server and never had any problems
My domain is and i want to install script at http://fablefly.com/install
Can You look Guys ?
P.S i'm running Cpanel , php 5.2 , mysql , ion cube enabled.

I think I understand what you mean. I had the issue before when I set up my server and installed PHP, whenever I went to a page, it downloaded a useless file. I solved the issue by running the following commands via ssh.
sudo apt-get install libapache2-mod-php5
sudo a2enmod php5
sudo service apache2 restart
Not sure exactly how you would go about doing this via cpanel as I use webmin personally and do most of the work via command line. But I believe this is your issue.
See this page
http://serverkb.co.uk/wiki/PHP - the section titled "PHP Page downloading"
Check this out
http://cpanelhostingstuff.com/php-files-are-downloading-instead-of-executing/
Also look at some of these pages https://www.google.co.uk/#q=php+downloading+instead+of+executing+cpanel

Related

Ubuntu / SQL Server - PHP script works in terminal, but not web application

I have an Ubuntu VM / Azure SQL DB combo where I have two sets of PHP files.
1) Some scripts that run from CRON jobs
2) A Yii2 Framework website
Both environments connect to an SQL Server database.
I have done all the steps to compile sqlsrv and added it to PHP's list of extensions. My scripts work great from the terminal, but on the website, I get an error:
could not find driver
My webserver is nginx, and it runs the website properly, but PDO does not connect to SQL Server.
I only have one PHP installation, but nevertheless used code to determine which is the right php.ini file in use and it has the right extensions directive.
A phpinfo() output also shows sqlsrv in the 'Registered PHP Streams' section.
My UFW firewall is inactive and I don't have SUSELinux. Nevertheless ports 22 and 80 are open. Even tried enabling it.
I am not sure what else to try. Help!
EDIT
I created a simple test file. When I run that through the terminal, it works, but when I do so via a browser, it doesn't.
EDIT 2
I installed Apache2 instead of nginx, and everything works now.
I think you need to try with just some "Hello world". If this not help type in terminal:
sudo apt-get install php-mysql
And restart your nginx server with:
sudo killall nginx && /usr/local/nginx/sbin/nginx

Apache2 doesn't show PHP code

I want to use my Raspi as a webserver so I followed this guide that basically set me up with an apache server and accompanying php modules. This works for html webpages.
The config file seems to suggest this module is being loaded by the apache server, but obviously something is going wrong since some test.php file:
<?php phpinfo(); ?>
fails to produce any output. I have reinstalled apache and have verified the (as far as I can see) correct url's to but to no avail.
How do I get to see my precious php info?
Obviously I will supply required information.
In order to run php script with Apache web server, you have to install php package in your server and libapache module which is required by apache to run php scripts. You can use following command to install php
sudo apt-get install php5 libapache2-mod-php5
Hope it helps.
I've replalced the flashdrive with a clean raspbian and retried the process, and for some reason this time I do get the desired output. I have no idea what happened there.

Apache http server dose not generate the "phpmyadmin" page

after installing the Apache http server and make sure it working.
Just added the folder of phpMyAdmin-4.2.0-english to the \Apache2\htdocs.
Renamed the folder to phpmyadmin.
while trying to view the page via http://localhost/phpmyadmin/index.php.
the page is not generated as php page.
all i can see is a textual page. (the index.php content as a text).
Did i miss anything? there is anything else i should install?
Try installing it using your package manager first. Once you get that to work, remove it and use the install you downloaded.
Assuming you're using Ubunutu/Debian:
$ sudo apt-get install apache2 php5 php5-mysql mysql-server phpmyadmin

http://localhost/phpmyadmin doesn't work

So, this is my problem. I have installed phpmyadmin via
sudo apt-get install phpmyadmin.
When I try to go "localhost/phpmyadmin", it downloads a file, called "download", without any explanation.
P.S. I have already installed LAMP before phpmyadmin.
Add the following line to /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf
Or the path that is correct for your system. After restart apache.
I solved this problem. It was very noobian mistake.
I really forgot, that I was using suPHP instead the original PHP5. Now, I removed suPHP mode and enabled PHP5 and everything is working.
At my site, the dashboard of phpmyadmin didn't show up, but the php file that
would show up the dashboard. This was because,
I forgot to install the connection between apache and php:
apt-get install libapache2-mod-php
After doing it, it worked.

PHP form handling [duplicate]

This question already has answers here:
Browser ask me to download php file
(4 answers)
Closed 8 years ago.
I began following a tutorial about PHP. Reached the form handling. But here it is: when I do what they say and press Submit, it gives me to save the .php file instead of executing it? What am I missing here?
You are missing an HTTP server that supports PHP and is configured to use it. PHP (in the context on the WWW) is a server side technology.
You may not actually be running a web server, and instead may be simply loading local files in your web browser. Install an easy setup web server and PHP setup package. On Windows, WAMP is recommended. On MacOS, the equivalent is MAMP
Rather than opening files from your local drive, you then access them as (for example):
http://localhost/your_php_file.php
It is a misconfiguration of the server. Perhaps the recommendations here could help. Either PHP isn't installed or Apache was not configured.
You are missing the Apache server and required PHP installation.
If you are on windows. Go to this link Wamp and select Downloads and download the latest version of Wamp.
For Mac OS you can use Mamp
Download and install it in your machine.
If you are on Linux - Ubuntu you can do:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
After installation place your php code in configured folder where the php is set to run and then go to browser and take the url : http://localhost/yourphp.file.
Hope this helps

Categories