Welcome, Guest. Please login or register.
April 20, 2014, 15:50:37 PM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Pardus for beginners
| | |-+  Some problems with Apache / PHP
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Some problems with Apache / PHP  (Read 2004 times)
grandad
Newbie
*
Posts: 5


View Profile
« on: April 03, 2007, 20:18:07 PM »

I have recently installed Pardus and I like the product very much.  I do want to run CMS packages like Etomite. I have installed Apache, PHP, Mysql from Pardus site and these packages run OK together but I am having problems getting .htaccess URL redirection to work.

I am not sure why but seems that Apache is set up to run PHP as a CGI package and I know this spells trouble.  I know that I can download a LAMP package and run Etomite but I would like to use the Pardus version of a LAMP.

Can anyone please help me to get PHP to run directly from Apache?
Logged
Jan Gnodde
Global Moderator
Pardus Guru
*****
Gender: Male
Posts: 397


View Profile WWW
« Reply #1 on: April 03, 2007, 21:23:49 PM »

Quote from: "grandad"
I have recently installed Pardus and I like the product very much.  I do want to run CMS packages like Etomite. I have installed Apache, PHP, Mysql from Pardus site and these packages run OK together but I am having problems getting .htaccess URL redirection to work.

I think there is no support for .htaccess at all in the Pardus version of Apache (I can't get .htaccess - password protection to work).
I know the developers are working on a server-version of Pardus, but I can't find anything more about it.

But I'm using the Apache - PHP - MySQL -combination anyway on my laptop to develop websites, and it's doing its work fine.

Jan.
Logged
grandad
Newbie
*
Posts: 5


View Profile
« Reply #2 on: April 04, 2007, 12:33:32 PM »

Many thanks Jan for this information.  I assume the you are using the Pardus Apache PHP and MySql on your laptop.

My interest is in web development but in the past I have always worked
under Windows XP using a WAMP package.
Logged
Jan Gnodde
Global Moderator
Pardus Guru
*****
Gender: Male
Posts: 397


View Profile WWW
« Reply #3 on: April 04, 2007, 12:58:55 PM »

Quote from: "grandad"
I assume the you are using the Pardus Apache PHP and MySql on your laptop.

Yes, indeed. I just installed the packages, using the Package-manager. After that you can tell Tasma to run Apache and MySQL as a service. And then you can connect the webserver with Firefox connecting to http://localhost
The rootweb can be found in /var/www/localhost/htdocs

Jan.
Logged
grandad
Newbie
*
Posts: 5


View Profile
« Reply #4 on: April 04, 2007, 19:51:42 PM »

Thanks for your help Jan.
I am now doing what you suggest and am using Apache, PHP,  and Mysql packages from Pardus.   I hope that .htaccess will be useable very soon as without it cannot use 'friendly URLs.

Kind Regards  Peter
Logged
mephisto
Pardus fellow craft
**
Posts: 55


View Profile
« Reply #5 on: April 07, 2007, 12:59:23 PM »

I see the mod rewrite is loaded. Why would they do that and not make htaccess work?
Logged
Jan Gnodde
Global Moderator
Pardus Guru
*****
Gender: Male
Posts: 397


View Profile WWW
« Reply #6 on: April 07, 2007, 18:08:52 PM »

Quote from: "grandad"
I hope that .htaccess will be useable very soon as without it cannot use 'friendly URLs.

You can do redirects using PHP:
Code:
<?php
header
&#40;"Location&#58; http&#58;//www.site.com/"&#41;; /* Sends the browser to www.site.com */
exit; /* Code after this will not be executed */
?>

Make shure that this code is in the very top of the script (before any html-code output.).

Jan.
Logged
grandad
Newbie
*
Posts: 5


View Profile
« Reply #7 on: April 12, 2007, 17:32:12 PM »

It's me again and I spite of the advice given the standard Pardus Apache, Mysql, PHP package that can be installed from the package repository does not work as one would resonably expect.   mod_rewrite is loaded, AllowOverride in httpd.conf can be changed from None to All but .htaccess won't work.

Equally <?php phpinfo() ?> says that the php.ini file is in /etc/php but it quite clearly is not.

Can anyone help please?   From other comments I am not the only one who is confused to say the least.

Perhaps the Pardus gurus responsible for the Apache, Mysql, PHP packages could explain what is going on.  I am no expert but I can find nothing on the net that helps at all.  Largely because the packages seem to be set up in a unique way.    I am sorry to be such a pest.
Logged
grandad
Newbie
*
Posts: 5


View Profile
« Reply #8 on: April 13, 2007, 15:54:02 PM »

I must report some success with the previously reported problems with Apache, MySql and PHP and thanks all those that were kind enough to offer advice.  

My actions today were:-
(1)  Removed snd reinstalled Apache.

(2)  Modified /etc/Apache2/vhosts.d/00_default_vhost.conf to set   AllowOverride All instead of None.

(3) Created a new .htaccess file in /var/www/localhost/htdocs

(4) Added php_flag register_globals On in item (3).  This was required by the package I am using.

Following these changes everything is operating as required.
Many thanks everyone.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!