a few questions

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
sergey.khodjamirian
Posts: 35
Joined: Wed Aug 09, 2006 11:36 am

a few questions

Post by sergey.khodjamirian »

I am trying to set up phpmyFAQ at my workplace.

I have been told that due to security reasons, I won't be able to use 777 mode. However, I was recently installing phpBB on the same server (with all the same settings) and it worked without changing writing permissions on the config.php file for their application. My question is: is it going to install without these permissions in the case of phpMyFAQ?

Also I need to know what you mean by

You can only run phpMyFAQ successfully, when the PHP directive safe_mode is set to off, further constraints affect the directives open_basedir and disable_functions, which can be set in the central php.ini or the httpd.conf respectively.
The first bit I sort of understand. However, I don't understand the second part about the constraints. Could you please reiterate the sentence.

Thanks.
sergey.khodjamirian
Posts: 35
Joined: Wed Aug 09, 2006 11:36 am

Post by sergey.khodjamirian »

Ive uploaded the folder to the server. When I run the installer script, it gives me this
You don't have GD support enabled in your PHP installation. Please enabled GD support in your php.ini file.
I've spoken to the IT guy and he says that even if they allowing GD support won't help, since he wont be able to provide the server with the right extensions. What is it that causes this dependency? I am guessing the .pdf generation process requires it - what else?

Bottom line - is it possible to alter the application so that it doesn't have these dependencies?
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi Sergey,
sergey.khodjamirian wrote:Ive uploaded the folder to the server. When I run the installer script, it gives me this
You don't have GD support enabled in your PHP installation. Please enabled GD support in your php.ini file.
I've spoken to the IT guy and he says that even if they allowing GD support won't help, since he wont be able to provide the server with the right extensions. What is it that causes this dependency? I am guessing the .pdf generation process requires it - what else?
It also affects the Captcha support: you could hack the code for skipping this control but you must also disable the Captha support in the configuration, section 'Spam Control Center' (== no hack required).
sergey.khodjamirian wrote:Bottom line - is it possible to alter the application so that it doesn't have these dependencies?
Short answer: it depends.
You should carefully test your customized PMF server but it could be generally possibile to alter the application for relaxing those "blocking" dependencies IF they are not part of the functionalities you need ;).

Regards,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: a few questions

Post by matteo »

Hi Sergey,
sergey.khodjamirian wrote:I am trying to set up phpmyFAQ at my workplace.

I have been told that due to security reasons, I won't be able to use 777 mode.
You just need 0700 plus setting the ownership of the files/folders to the user under which your Web Server is running, if the security is an issue. That value is provided for those users that access to their web space only via FTP.
sergey.khodjamirian wrote:My question is: is it going to install without these permissions in the case of phpMyFAQ?
These are the reasons for the need of the write permission:
  1. The install stage will prepare for you some folders and will setup config.php and data.php files;
  2. If you want to upload images and attachments for inserting them into faq and news records you'll need that privilege;
  3. When a PDF (in the user context) or one of the supported export types (in the admin context) is requested, PMF prepares it using the filesystem before streaming it to the Client.
sergey.khodjamirian wrote:The first bit I sort of understand. However, I don't understand the second part about the constraints. Could you please reiterate the sentence.
In some hosting environments this two PHP "directives", open_basedir and disable_functions, should alter and break the PMF normal behaviours e.g. avoiding access to some directories, disabling some PHP functions used within PMF.

Regards,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
sergey.khodjamirian
Posts: 35
Joined: Wed Aug 09, 2006 11:36 am

Post by sergey.khodjamirian »

okay i gotcha about the captcha. ill just cut the following code out
}
if (!extension_loaded('gd')) {
print '<p class="center">You don\'t have GD support enabled in your PHP installation. Please enabled GD support in your php.ini file.</p>';
HTMLFooter();
die();
from installer.php and then turn off Gotcha function when i configure the app. Is this okay, or is more hacking needed for this?


Matteo, what else needs this dependency? i have looked into it and the pdf generation uses FPDF. I looked at FPDF and it says that it is purely php and doesnt need any extensions on the server. So does the pdf generation require GD support?

Also, could you please list all the features of phpmyFAQ that require GD support.

Many thanks!

Sergey
[/quote]
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
Matteo, what else needs this dependency? i have looked into it and the pdf generation uses FPDF. I looked at FPDF and it says that it is purely php and doesnt need any extensions on the server. So does the pdf generation require GD support?
The PDF generation does not require GD.
Also, could you please list all the features of phpmyFAQ that require GD support.
The captchas and the statistic bars generation require GD.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sergey.khodjamirian
Posts: 35
Joined: Wed Aug 09, 2006 11:36 am

Post by sergey.khodjamirian »

Thorsten

Many thanks for the help.

So the code alteration of installer.php is fine?

Also, how would you recommend getting rid of stats bars. Even if this involves getting rid of all stats - that's fine, as I won't need stats.

Cheers

Sergey
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
So the code alteration of installer.php is fine?
it's okay. :-)
Also, how would you recommend getting rid of stats bars. Even if this involves getting rid of all stats - that's fine, as I won't need stats.
you don't get any error, but also no stat bars. :-)

In version 1.6.4 and later we do not stop the installation if the GD library is missing. We're just showing a hint about the issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
sergey.khodjamirian
Posts: 35
Joined: Wed Aug 09, 2006 11:36 am

Post by sergey.khodjamirian »

Thorsten

This is good news. It takes me a step further to my goal. Thanks for all the help and advice.

I have a question about LDAP also. Where I work I think we have LDAP. What does it mean if I connect the LDAP to the PMF? Does this mean that when someone types in their name in the Name field it automatically fills it out, as well as their e-mail address?

What information do I have to ask the IT people to get this to work with phpmyfaq?

cheers

sergey
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
I have a question about LDAP also. Where I work I think we have LDAP. What does it mean if I connect the LDAP to the PMF? Does this mean that when someone types in their name in the Name field it automatically fills it out, as well as their e-mail address?
right. Currently we just have basic LDAP support. It just adds the name and the e-mail adress in all entries. The only thing is that your PHP has enabled LDAP support and you're entering the correct information during the installation.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply