LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   help with php wiki engine (https://www.linuxquestions.org/questions/linux-server-73/help-with-php-wiki-engine-922491/)

baronobeefdip 01-06-2012 05:19 PM

help with php wiki engine
 
I haven given up on trying to install and run moinmoin as a wiki engine plus i thought about some of the security flaws when it comes to creating page that requires the language to be ran on the computer accessing it. the wiki engine i am looking into using is phpwiki with apache2. i have exhausted all resources and have done numerious google searches but to no avail. i installed php (at least i think i did) on my box running apache but when i try to access the page named index.php it doesn't come up as a page in the clients web browser it just downloads it as a file so something needs to be installed in order for it to be viewable by a client. what do i have to install and what needs to be configured in apache in order for this to work.

bathory 01-07-2012 03:20 AM

Hi,

You didn't mention your distro, but if it's debian as in your profile, have a look here to see what you need to do in order to install php for apache2.

Regards

baronobeefdip 01-07-2012 01:46 PM

Yes that was very helpful. And yes i am using Debian squeeze but for what i am doing i want to know the differences in the process from distro to distro (possibly get a leg up on doing this in FreeBSD 8.2 as well) i am also looking into how to set up WIKI engines in fedora (14 and 15), Ubuntu, (I know this isn't a Windows oriented forum but just thought I'd mention it plus it might not be too difficult to do it in here) and Centos (optional).

But this helps a lot, from what i have been reading about apache is that most of the processes (and i gues that php thing) only vary slightly but remain similar between them. but i want ot know if this means that if the guide is about lenny will it work in squeeze (iguess the apt-get command are different since i think there has been a newer version of php since that article was written)

bathory 01-07-2012 02:55 PM

Quote:

i want to know the differences in the process from distro to distro (possibly get a leg up on doing this in FreeBSD 8.2 as well) i am also looking into how to set up WIKI engines in fedora (14 and 15), Ubuntu, (I know this isn't a Windows oriented forum but just thought I'd mention it plus it might not be too difficult to do it in here) and Centos (optional).
Any distro has its own package manager (apt for debian/ubuntu, yum for rhel/centos/fedora, slackpkg for Slackware, pkg_add for FreeBSD and so on).
The only difference between distros, is the different location of the configuration files, the docroot, logs etc.
After a package installation you may need to do some minor modifications to configure the installed application to your liking. For this you can use google to get help.


Quote:

i want ot know if this means that if the guide is about lenny will it work in squeeze (iguess the apt-get command are different since i think there has been a newer version of php since that article was written)
The guide is valid for any debian (and ubuntu) versions. The apt-get command will use the repositories for the specific version of your OS, to fetch and install the correct php version, or any other package you want.

Regards

baronobeefdip 01-07-2012 03:06 PM

alright the php test page that the guide told me to create and run in the browser works, but i downloaded the source for phpwiki and tried to run the file index.php, and instead of view the wiki's front page like i wanted to in just downloads the page as a file to the Downloads directory. i have gone over the readme and INSTALL file numerious times and none of it is making sense. for instance what does
Code:

In the config subdirectory copy 'config-dist.ini' to 'config.ini' and
edit the settings in 'config.ini' to your liking.

mean, i know where the config file and the configdist.ini file is but where is the config.ini file. is that an apache thing if not then i am really confused. so where do i got from here, obviously apache is set to run the php script (because the test page appeared as it should) but why isn't phpwiki working, what do i have to set, copy, configure, and which file in the phpwiki folder is the wiki's front page. the page that should appear when the browser opens the file instead of downloading the actual page as a file

thanks for the help

bathory 01-07-2012 03:21 PM

Quote:

i have gone over the readme and INSTALL file numerious times and none of it is making sense. for instance what does

In the config subdirectory copy 'config-dist.ini' to 'config.ini' and
edit the settings in 'config.ini' to your liking.
mean,
Isn't that obvious?
It means to copy the example file config-dist.ini to a new one named config.ini.
Code:

cp config-dist.ini config.ini
I guess afterwards you need to edit config.ini to configure it for your system

baronobeefdip 01-07-2012 03:31 PM

the guide i found just says that you can easily access the wiki by just going to
Code:

httP//localhost/wiki
but it left one thing out. instead of getting the wiki i get the Forbidden 403 page and i have read that you need to allow access to the page since the username and password sent by the client don't match. i haven't worked much in apache but i am also getting mentions of entries that aren't even in the httpd.conf and apache.conf files and want to know if it's okay to just add them or is there something more to these entries that are non-existent

here is the page i have found about installing phpwiki
http://www.phpbuilder.com/columns/ia...n20060309.php3

baronobeefdip 01-07-2012 03:43 PM

well just did the basic installation that it mentioned from the page, whenever i try to access the wiki from where the location of where all of it's files are i get the "403 Forbidden" page. I want to know how to allow users (all or certain i am sure this is an apache thing not a php or phpwiki thing)

bathory 01-07-2012 04:01 PM

Quote:

i get the "403 Forbidden" page. I want to know how to allow users (all or certain i am sure this is an apache thing not a php or phpwiki thing)
You should take a look at apache error_log to see why you get that error, but I guess you have to add index.php in the DirectoryIndex directive either in apache2.conf or inside /etc/apache2/sites-available/default.

If you want to restrict access based on clients IP, you can use:
Code:

<Directory /var/www/wiki>
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 x.x.x.x y.y.y.y
</Directory>

where x.x.x.x, y.y.y.y are the clients you want to allow access.

I suggest you once again to use google to search for specific instructions about the software you're trying to install

Regards

baronobeefdip 01-16-2012 03:30 PM

Just found the solution

I gave up on the engine i was trying to use and moved on to another, i started to experiment with MediaWIKI (the same engine that Wikipedia uses) and got it running since their help guides were a little more helpful all i had to do is install a few packages

libapache2-mod-php5
mysql-server
mysql-php5

now php5 is running as an apache2 modules and implements itself on the server itself instead of the client. also reduces a security risk since have the language running on the client is dangerous because the source code is view-able when running on the client and make it manipulative but when running on the server it's not view-able and not manipulative


All times are GMT -5. The time now is 09:02 AM.