[SOLVED] Cannot get PHP scripts to work in Ubuntu Server 12.04
location: linuxquestions.com - date: May 26, 2013
Here's what is installed that i will be utilizing:
I have tried multiple ways of getting a PHP login script to work (ie: connects to mysql db pulls login credentials and authenticates user with a session) When i try to get this to work however, i get this generic error on my web browser.
The website encountered an error while retrieving http://intranet/login.php?attempt. It may be down for maintenance or configured incorrectly.
Here is the PHP script along with the HTML form i am using.
$user = $_POST['user'];
$password = $_POST['password'];
$link = mysql_connect('localhost', 'root', 'mypassword') or die('Cant connect to database');
$query = mysql_query("SELECT * FROM users") or die(mysql_error());
<form method="POST" action="login.php?atte
APT + .debs vs. Perl CPAN + Python easyinstall + Ruby Gems + PHP PEAR
location: ubuntuforums.com - date: June 17, 2007
I noticed that Ubuntu packaged some Perl CPAN stuff as lib-*-perl.
I noticed that Ubuntu packaged some Python Cheese Shop stuff as python-*.
I noticed that Ubuntu packaged some R CRAN stuff as r-cran-*.
What is Ubuntu's policy toward CPAN/Cheese-Shop/CRAN packages (and Ruby Gems and PHP PEAR/PECL)?
Do we package them as .deb packages?
Or do we tell users to use CPAN/easy_install/install.packages()?
PHP Pear Installation /usr/share/pear
location: ubuntuforums.com - date: December 17, 2009
I have installed the LAMP server with 'sudo tasksel install lamp-server' and installed 'PHP-PEAR' but I have no folder 'usr/share/pear'.
I am trying to follow a tutorial on the zend framework and it expects to see it in this place. Can you help?
I am on Ubuntu 9.10. The actual tutorial I was following was for 9.04. Will this make a difference?
Apache Web Server PHP Pear problem
location: ubuntuforums.com - date: December 30, 2008
I have installed Apache, PHP and PHP Pear. Apache works and PHP appears to work from the CLI, I can't get it to work from a web browser.
When I enter the web address ie http://localhost/index.php I get the following message.
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/home/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
What have I missed?
send email from php (using pear) (no need to change php.ini)
- date: June 16, 2010
I host a webpage from my PC, and I was having all kinds of issues trying to get it to send e-mails
note: these steps send and receive the email through a gmail account.
this page saved me.
here are the simple steps
0. get a gmail account
1. install pear
sudo apt-get install php-pear
2. install pear packages:
(i'm not really sure what this does, but I did it, and everything is working)
sudo pear install -o Mail
sudo pear install -o Net_SMTP
3. run php script to send email.
// Include the Mail package
// Identify the sender, recipient, mail subject, and body
$sender = "[email protected]
$recipient = "[email protected]
$subject = "Thank you for your email!";
$body = "I'll get back to you as soon as I can!";
// Identify the mail server, username, password, and port
$server = "ssl://smtp.gmail.
DB.php file using PEAR with PHP5
- date: September 20, 2008
I am running apache2 and php5 on ubuntu. I installed the PEAR module for php using the synaptic packet manager. When trying to connect to mySQL with php I put the following code:
$connection = DB::connect("mysql://$db_username:[email protected]
when I try to load the page in a browser I get the following error:
Warning: include(db_login.php) [function.include]: failed to open stream: No such file or directory in /var/www/search.php on line 3
Warning: include() [function.include]: Failed opening 'db_login.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/search.php on line 3
Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/search.php on line 4
Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/search.p
libssh2 not linking to PHP on Ubuntu 7.10 (Gutsy)
location: linuxquestions.com - date: December 28, 2007
I am trying to get libssh2 to work with PHP on Ubuntu 7.10 (Gutsy). The aim is to use SSH2 via PHP.
I've downloaded the source of libssh2, compiled it and installed it using:
Problem with PEAR after installing PHP and ILIAS
location: linuxquestions.com - date: February 13, 2010
i have tried to install Apache,php,mysql and Ilias on Ubuntu. But as 'im trying to run it, i'm receiving this error: /var/www/ilias-3.7.5/ilias3/include/inc.check_pear.php. I've tried to verify the installion of PEAR, but i seams to need some Package , i dont know why. So i've then tried to create a new file, but it does'nt work.
Please could somebody help me?
PHP not parsing after server upgrade (8.04 to 12.04)
location: ubuntuforums.com - date: January 24, 2013
I've been using my server set up for years running PHP scripts but after finally getting round to a server upgrade the PHP files that used to open correctly are now downloaded instead.
Have had a search around already but many solutions are old or don't fix my problem.
I have even tried removing and reinstalling PHP5 but with no success, although I'm not convinced I'm doing that correctly.
Any other help appreciated.
location: linux.com - date: June 17, 2010
Hi, thanks for taking time.
I've installed apache on Ubuntu 10.04 LTS. Primary configuration is ok and I can view localhost in firefox, but:
I don't have permission to my NTFS drive where my .php webfiles reside, therefore I get "403 Forbidden" for my /media/T0/ folder, but there's no problem with my home folder, for example.
On the other hand, I'm facing a problem in compiling php, where "sudo ./configure" tells me that I don't have libxml2 on my system, while it's source is there in the php source folder, under ext/libxml directory.
Would appreciate your helps folks, thanks so much!
Page: 1 2 3 4 5 6 7 8 9 10