problem with my .htaccess file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

problem with my .htaccess file

Post by itsmani1 »

while installing ezPublish if found this result.

**************************************
php_magicquotes - Failure
zlib_extension - Success
mbstring_extension - Success
imagegd_extension - Success
imagemagick_program - Success
database_all_extensions - Failure
php_register_globals - Failure
texttoimage_functions - Success
***************************************

I tried to fix it using .htaccess file and here is my solution which is not working.

php_magicquotes on
database_all_extensions on
php_register_globals on

------------------------------
so final .htaccess file is like this :

Code: Select all

# Copy this file to a new file called .htaccess in your eZ publish root
# to make the site more secure in non-virtualhost mode (index.php used in urls).
#

php_value allow_call_time_pass_reference 0

<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf)$">
order allow,deny
allow from all
</FilesMatch>

# If you see "Forbidden" when trying to access root page of your site
# without 'index.php' appended, uncomment the following "Files" section.
# NOTE: replace "ezpublish-3.6.0" with base name of the directory
# where your eZ publish intallation resides.
# e.g. base name of "/sites/ezpublish/ezpublish-3.6.0" is "ezpublish-3.6.0".

#<Files "ezpublish-3.6.0">
#   order allow,deny
#   allow from all
#</Files>

RewriteEngine On
RewriteRule !\.(gif|jpe?g|png|css|js|html)|var(.+)storage.pdf(.+)\.pdf$ index.php

DirectoryIndex index.php


php_magicquotes on
database_all_extensions on
php_register_globals on

any help???

thanks in advance.
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

if im not mistaken its telling you that those functions arent available
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

sry i didnt read it too close, its saying register globals are off in ur php ini, and im assuming that a database type that it uses is not enabled, and im not sure about the magicquotes
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

can i fix these issues using .htaccess file?

to remove those failures i tried :

Code: Select all

php_magicquotes on 
database_all_extensions on 
php_register_globals on

what do you suggest? is this correct way? if its not please correct it.

thanks.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

These are all php.ini settings, not apache settings. You cannot change these with .htaccess, though you might be able to with the ini_set() function. Try reading the manual on it.
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Post by itsmani1 »

for last some hours i am trying hard with out any luck, can you please give some small example :
by using which i can understand it.

if i can't do these things using .htaccess then how can i change these setting ? is there anyway?

thanks much.
jonra
Forum Newbie
Posts: 22
Joined: Thu May 25, 2006 9:35 am
Location: Iowa
Contact:

Post by jonra »

itsmani1 wrote:for last some hours i am trying hard with out any luck, can you please give some small example :
by using which i can understand it.

if i can't do these things using .htaccess then how can i change these setting ? is there anyway?

thanks much.
Yes, you can manually edit your php.ini file to turn them on.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Or, if you read my previous post, you can try using ini_set().
Post Reply