Problem while changing server from pavo to tift


#1

After some sites have been hosted by the new server, I had some error 500 because of these line in .htacces :
################################
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

<FilesMatch “^php5?.(ini|cgi)$”>
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS

################################

So after comment these lines I meet problems with GET and POST.
SO I put a part of code very useful in my scripts :

foreach(${"_" . $_SERVER[“REQUEST_METHOD”]} as $k=>$v) $$k=$v;

Is there anybody that knows how to include a file with this code in the .htacces file because this directive doesn’t runs on DH :

#############################
php_value auto_prepend_file “method.php”
#############################

thank you


#2

[code]ini_set('auto_prepend_file',"[path_to_my_required_file]");[/code]

#3

Thank you but i have an error 500 with ini_set()
no probleme with more simple code “foreach($_REQUEST as $k=>$v)$$k=$v;”


#4

Sorry about that. I should have tested before posting :frowning:

For PHP 5.3 only:

Create file in script directory: .user.ini (.hidden file)

Edit .user.ini: auto_prepend_file = “./path/to/required_file”


#5

Thank you, php 5.3.13 but it doesn’t runs
even with complete path (not ./)

Thank you one more time, take it to respond, i really like to know the solution but its not urgent, the site runs with the code in the scripts


#6

Strange. I tested and it worked for me.

If you are using FastCGI (recommended) the change might only take effect after PHP has reloaded. That would need about 5 minutes with no one visiting the website for it to reload. If the website is very busy you could log in to shell and run the command killall -9 php53.cgi to restart PHP manually.


#7

THANK YOU IT’S RUNS, GREAT
I don’t change anything neither reload php.
Before the first time I test, I had verified the running version with phpinfo() (fast-cgi in DH panel) because I was on 5.2.17 and I was waiting for he change was effective. Perhaps not enough? Or a mistake in the name of the hidden file.

Can you tell me where you find all these indos, and if you are working for DH?


#8

Sweet! :smiley:

The .user.ini file was introduced with PHP 5.3 - it doesn’t work with 5.2

I’m not entirely sure what an “indos” is. I don’t work for DreamHost (I’m just a customer like you).


#9

*infos :slight_smile:
where? In your mind ok, but where are your main sources? RFCs !

I have chance with your posts so precises. Perhaps are you developper in your job? Anyway a great THANK YOU for your help.

I think you like DH, so do I, but the migration deceive me very lot.
[hr]
what is MAXCASH? http://www.dreamhost.com/r.cgi?384814/signup|MAXCASH

So many questions sorry.


#10

DreamHost are awesome compared to the other bulk hosts :smiley:

I use http://php.net for PHP information.