Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
September 1, 2008 - Submit Your Web Site for the Sept 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 07, 2008, 11:34:26 PM


Login with username, password and session length


Pages: 1 [2] 3   Go Down
  Print  
Author Topic: PHP  (Read 1341 times)
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #15 on: October 23, 2004, 02:26:22 PM »

is it possible to change this setting? I would like to run php in apache2handler mode instead.
Logged
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #16 on: October 23, 2004, 02:32:55 PM »

This is the code mediawiki uses to determine if it will use pretty or ugly URLs
Quote

$sapi = php_sapi_name();
$conf->prettyURLs = true;
print "<li>PHP server API is $sapi; ";
switch( $sapi ) {
case "apache":
case "apache2handler":
   print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";
   break;
case "cgi":
case "cgi-fcgi":
case "apache2filter":
   print "using ugly URLs (<tt>index.php?title=Page_Title</tt>)";
   $conf->prettyURLs = false;
   break;
default:
   print "unknown; using pretty URLs (<tt>index.php/Page_Title</tt>), if you have trouble change this in <tt>LocalSettings.php</tt>";
}

As can be seen cgi, cgi-fcgi and apache2filter are bad answers... Crying or Very sad
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
PHP
« Reply #17 on: October 23, 2004, 06:25:45 PM »

no, LP runs suPHP as a CGI which allows the scripts to run with the permissions of the owner of the script as a security precaution... changing this would, I believe, have require a change for the entire server because of the shared environment...

not staff, but that's the impression I've gotten...
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #18 on: October 24, 2004, 01:39:01 AM »

I believe you are right... I decided to give the installation a try using ugly URLs. Unfortunately the site doesn't work after installation - it doesn't respond. (If I go outside the installation, the site will work - but that's not what I need!).
The installation instructions warns that
Quote

If your PHP is configured as a CGI plug-in rather than
an Apache module you may experience problems, as this
configuration is not well tested.

Has anyone else experienced problems/done workarounds on this?
Logged
Ed
Berserker Poster
*****
Offline Offline

Posts: 5205



WWW
PHP
« Reply #19 on: October 24, 2004, 09:36:34 PM »

You won't experience any issues. Have yet to see any arise that didn't have a quick and easy fix. (Permissions usually)

Here is the long and short of it Smile

Thanks to Katrina for producing most of this:
--

Your server has changed to suPHP as a security upgrade. If you are
running a PHP-based script on your site and are receiving
a 500 and/or 404 errors on your pages, it is likely you have one or more of
the following occurring:

1. The permissions on some of the folders or files are 777 or 666. If this
is the case, change them to either 755 or 644 in Cpanel's File Manager (or
using your local FTP client).

2. The files and/or folders are not owned by you. Certain applications
having been run under php as an apache module may have files owned by the
apache user of nobody. An indication that you don't own the files would be
if you are unable to change their file permissions. To correct this, please
provide your username and the last 4 digits of your credit card on file with
us for ownership verification (no charges apply) and provide the location of
the folder or files that need to have your ownership.

3. Your .htaccess file has php_values or php_flags in it. This causes a 500
Internal server error when attempting to execute the script.

The php_values and php_flags will need to be removed from your .htaccess file
(please make a backup of the .htaccess by copying its contents and saving it
on your desktop as htaccess.txt). Take the contents removed from .htaccess
and place it into a file you create called php.ini. Remember to remove the
php_flag and php_value part before the directives as php.ini files do not
require those in front of the values. You can always make the changes and
ask us if the changed files are correct.

Because php.ini values are not shared across directories, you would need a
separate php.ini file in each folder that has .htaccess or that requires the
php_values or php_flags. In order to avoid doing this, you can place a line
in the .htaccess file in your public_html folder to have all values in your
public_html php.ini to be shared across all folder. This line would be the
following:

suPHP_ConfigPath /home/username/public_html

Finally, to explain in depth why suPHP requires these changes to the file
permissions, please note that suPHP runs scripts with the permissions of
their owners. Regular PHP executes scripts under the permissions of the
system user running the web server, which means that your script runs with
different permissions than your own user account and makes it very hard to
use a PHP script to modify and create files without giving everyone on the
server access to your files (this means that on regular PHP you provide write
or execute access to group and world even for some files). Since SuPHP makes
your PHP scripts run with the same permissions as your regular user account,
you do not need group or world write access or execute access for files and
suPHP will even prevent files from running that are group or world writable
or executable as a security precaution.

666 equals the following:

Code:
Mode User Group World
Read 4 4 4 (all checked)
Write 2 2 2 (all checked)
Execute(none checked)

This makes group and world able to write to the file, a security risk

777 equals the following:

Code:
Mode User Group World
Read 4 4 4 (all checked)
Write 2 2 2 (all checked)
Execute 1 1 1 (all checked)


This makes group and world able to write and execute the file, a very large
security risk.

Basically, suPHP is more secure, and preventing scripts from running as 666
or 777 prevents group or world from maliciously writing to the files and
hacking your scripts.

- Ed
Logged

Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #20 on: October 25, 2004, 12:25:24 AM »

Thanks so much for all your replies - I'll get working on it!
Logged
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #21 on: October 26, 2004, 01:54:22 AM »

I'm not having any success with changing permissons and changing .htaccess
Could it not be that the problem is running php as a cgi script. Is anyone here running mediawiki? Who? Just so I know success is possible!
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
PHP
« Reply #22 on: October 26, 2004, 02:16:53 AM »

What sort of error message are you getting? Is it still the 500 Internal Server Error? Do you have a link where we could see what is happening? (If you don't want to post a link in public, feel free to send me a pm and I'll take a look...)
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #23 on: October 26, 2004, 02:26:38 AM »

gaypedia.org/wiki

there is a file called index.php that is supposed to pick up the link. The mediawiki software is described and available in http://wikipedia.sourceforge.net/
-it's the software running wikipedia.org.
Setting it up on a linuxbox is *very* easy - just putting the downloaded file in the html folder, go there with the browser and fill in a page for configuration (what psw u want etc) and you're up!
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
PHP
« Reply #24 on: October 26, 2004, 02:29:13 AM »

I'm not able to connect to that domain name and centralops is not showing a record of that domainname either...

It normally takes 24-72 hours for a domain name to propogate and during that time PHP will generally not work. (It will work sometimes but not others.) Could that  be the issue here?

UPDATE: Just checked the whois record for the domain... looks like the last update was on the 23rd of Oct. So right now, my guess is that it is a domain propogation issue.
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #25 on: October 26, 2004, 02:40:31 AM »

I get there, but I guess that is bec. I made an entry in my hosts file to direct me to the correct IP-number. If I visit the root I get a standard index-file list. I have now also tried another computer and then I'm not getting there. There is maybe something wrong with centralops then... The server I'm hosted on seems to know though which virtual host to connect me to though. I'll try to get a hold of these centralops guys then. Many thanks!
Logged
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #26 on: October 26, 2004, 02:42:42 AM »

Btw, I´ve had the domain delegated to
ns1.lunarpages.com  
ns2.lunarpages.com  
since saturday, so it should be ok by now...
Logged
GMTurner
Berserker Poster
*****
Offline Offline

Posts: 7539



WWW
PHP
« Reply #27 on: October 26, 2004, 02:44:12 AM »

No, centralops is a website that can be used to look up IP addresses, DNS info, etc. for a domain name. Right now your domain name is not resolving to an IP...  you can check it out here: http://centralops.net/co/DomainDossier.aspx

My guess is that it is working for you because of the entry in the hosts file... if it doesn't start resolving in another 12-24 hours though, then I'd be more concerned and you might want to check with support@lunarpages.com to make sure everything is setup correctly... though my guess is that things are setup correctly since it is directing you properly, just waiting for propogation to finish...
Logged

The above post was made at a time when I gave a dang and doesn't necessarily reflect my current views or opinions.

For those no longer with us ... Grr..!!

The Redheaded Penguin
Sten
Trekkie
**
Offline Offline

Posts: 16


PHP
« Reply #28 on: October 26, 2004, 10:38:41 AM »

I contacted suport and they fixed the domain - it now resolves as it should. Still no luck with mediawiki though... Crying or Very sad
Logged
Priest
Darth Vader
Support Supervisor
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3823



WWW
PHP
« Reply #29 on: October 26, 2004, 11:01:35 AM »

I see what's going on here, at least with respect to the Pretty URLs

Code:
print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";

This won't work in a PHP as CGI environment since the PATH_INFO will return null instead of Page_Title.  There is a workaround though that will still let you use Pretty URLs in your pages.  You can add the following code to your .htaccess file

Code:
RewriteEngine On
RewriteRule index.php/(.*) /index.php?title=$1


osCommerce has a similar tool called Search Engine Friendly URLs and the above code was tested with it back when PHP was first changed over.  It may take some fine tuning for this script, but it should allow you to use the Pretty URLs.

Can you post a link to the script so we can take a browse?
Logged

Lunarpages Web Hosting ~ Lunarpages Forums ~ Lunarpapages Affiliate Program

Steven Priest
Customer Services Supervisor, Technical Support
Geeky Perl Aficionado
College Guy

For all the things I cannot change...™
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM