Current time: 04-24-2014, 03:11 PM Hello There, Guest! (LoginRegister)

Post Reply 
custom php.ini seems impossible
01-30-2007, 02:40 PM
Post: #1
custom php.ini seems impossible
i followed the directions (or at least a modified version that actually half works), and things are just screwy.

first, the directions:

Quote:mkdir ~/domain.com/cgi-bin/

Then make a file in ~ called php_update containing the following

#/bin/sh

CGIFILE="$HOME/domain.com/cgi-bin/php.cgi"
INIFILE="$HOME/domain.com/cgi-bin/php.ini"

cp /usr/local/bin/php "$CGIFILE"
cp /etc/php/php.ini "$INIFILE"

perl -p -i -e '
s/.*post_max_size.*/post_max_size = 100M/;
s/.*upload_max_filesize.*/upload_max_filesize = 100M/;
' "$INIFILE"
ok, now $HOME apparently doesn't work, so i had to change it to /home/myusername. (and yeah i changed domain.com) the stuff below the cp lines doesn't apply to me but i tried this with and without them. i run the php_update from the shell and i get:
command not found2
command not found5
(and when the php.ini file isn't already there in cgi-bin, a no such file or dir)

ok, so that copies the cgi and ini file to my /cgi-bin. but crazy thing: cuteftp (and webftp) shows a php.ini that's 22.53 KB, which i cannot edit or view, plus when i upload my php.ini it doesn't overwrite the other, and even disconnecting from the ftp and reconnecting back it shows BOTH files. at that point trying to view either views my custom one, and trying to delete both only deletes my custom one. i'm unable to delete my cgi-bin folder and start over because it can't delete that weird file.

ok, now third, i upload my .htaccess:
Options ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

to my domainname.com folder, and when i run my php script now i get an error 400.

the whole problem i'm having is the script was giving an error, the script author told me to add to the .htaccess:
PHP_FLAG output_buffering on
but that's not doing anything so he said to do php.ini.
i can't figure out why this thing is acting so crazy and i'm getting really aggrevated.

-edit-
oh, my custom php.ini:

output_buffering = On
zend_extension = ../ioncube/ioncube_loader_lin_4.4.so
memory_limit = 100M
include_path=.:/usr/local/lib/php:/usr/bin/pear
Find all posts by this user
Quote this message in a reply
01-30-2007, 02:51 PM
Post: #2
custom php.ini seems impossible
You'll have better luck if you stick to the instructions that are posted in the DH wiki. That procedure works.

Why in the world do you need a 100MB memory limit? That is *not* a very nice thing to pull on a shared server. Sad

--rlparker
Find all posts by this user
Quote this message in a reply
01-30-2007, 03:02 PM
Post: #3
custom php.ini seems impossible
well, no those on the wiki don't work. i hafta change $HOME for it to do anything. other than that tho i followed the directions, except some steps for setting up a cron file which i'm not worried about.

as for the MB limit i have no clue what that even does or anything. i'm sure it's not actually using 110 MB of memory tho....
Find all posts by this user
Quote this message in a reply
01-30-2007, 03:24 PM
Post: #4
custom php.ini seems impossible
Quote:i have no clue what that even does or anything
And you're using a custom php.ini file?

"The instructions provided in this article or section are considered advanced."

That means don't mess with it if you don't know what you are doing.

--------
Simon's website
Save $100 on 1-year plans with promo code SCJESSEY100 (details)
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2007, 03:49 PM
Post: #5
custom php.ini seems impossible
Quote:well, no those on the wiki don't work
Yes, they *do*, and there are *many* DH users who have followed those instructions with success.
Quote:i hafta change $HOME for it to do anything.
No, you *don't*, if you are following the instructions correctly and *understand what you are doing in the shell*.
Quote:as for the MB limit i have no clue what that even does or anything. i'm sure it's not actually using 110 MB of memory tho....
Then you have *no* business modifying the php.ini Dreamhost has installed for use on your shared server.

--rlparker
Find all posts by this user
Quote this message in a reply
01-30-2007, 04:20 PM
Post: #6
custom php.ini seems impossible
ok, i'm sorry but you all are just retarded. do i know what exactly that line does? no. but the dude who wrote the commercial script obviously does. the script is not resource intensive, it ain't gonna use no 100 megs of ram or anything, i'd say he just stuck a high figure on there because the actual amount doesn't matter, so long as the setting is changed from off to on.
i know what i'm doing, with the shell and changing the ini and all, and the code on the wiki DOES NOT work. it aint very freakin hard to type some text into a console window. changing the $HOME variable does the job and should make no different. it's just hard-coding the path instead of using a variable. so for all intents and purposes i follwed the directions.
Find all posts by this user
Quote this message in a reply
01-30-2007, 04:52 PM
Post: #7
custom php.ini seems impossible
I'm sorry but, who's the retarded one who can't get it to work?
Good luck finding someone who will help you here (for free), with that kind of attitude.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2007, 05:01 PM
Post: #8
custom php.ini seems impossible
well the "help" i got ths far was just some jackass telling me i don't know what i'm doing. he's the one with the bad attitude. i know what i'm doing, i know how to freakin type some text into a shell and upload a file, and whatever else i have to do, but something just ain't right. coming on here and telling me i have no business changing things ain't gonna get a friendly response from me. i'm funny like that...
Find all posts by this user
Quote this message in a reply
01-30-2007, 05:15 PM
Post: #9
custom php.ini seems impossible
Quote:ok, i'm sorry but you all are just retarded.
Nice! Okay, you have made your point, and your opinion has been noted. Wink
Quote:but the dude who wrote the commercial script obviously does.
The "dude" that wrote the program may very well know what *he* is doing; that does not mean that *you* know what *you* are doing.
Quote: the script is not resource intensive, it ain't gonna use no 100 megs of ram or anything,
Your posts have already made it quite clearly evident that *you* have no idea whether the script is "resource intensive" or not and that you have no idea how much ram the script is likely to use.
Quote: i'd say he just stuck a high figure on there because the actual amount doesn't matter, so long as the setting is changed from off to on.
And now you have proven that you are completely clueless about what is involved with these PHP settings, which is *exactly* why you shouldn't be messing with them.
Quote:i know what i'm doing, with the shell and changing the ini and all, and the code on the wiki DOES NOT work.
No, you *don't* know what you are doing, and your statements in these posts make that crystal clear. There is nothing wrong with not knowing something; it's just lame to act like you do when you don't. You can say those scripts don't work as many times as you like, and it does not change the fact that your inability to understand what those shell and perl scripts are doing does not mean they don't "work". They *do* "work", if you know how to use them. Of course, you never bothered to indicate what instructions you were following, and there is more than one section in the wiki that deals with such stuff - I believe from your code snippets that you were referring to the Wiki article on PHP.ini; those instruction work properly *for what they were intended to do*, which was to change to max upload filesize. Modifying that to make other php.ini changes is *not* covered in that article.
Quote:it aint very freakin hard to type some text into a console window.
That *is* the easy part - knowing what to type, and why, and how to accomplish your goal, is another thing all together, as you have just proven. Since you "know what you are doing", you shouldn't even need the wiki article to solve your problem.

All that said, you could have taken another approach. You *might* have explained what you were trying to install, and what changes you felt needed to be made, and why. You might have even asked how to set up a php.ini to facilitate your application, but instead you decided that "the wiki article doesn't work", took it upon yourself to follow the directions "for all intents and purposes" and then come on here and complain that it didn't work as expected. You might want to take the time to review How To Ask Questions The Smart Way...and maybe you will learn something. Or not.

The "bottom line" is pretty clear here: since we are retarded and you know what you are doing, you obviously *don't* need any help - so knock yourself out! Good Luck with that.

--rlparker
Find all posts by this user
Quote this message in a reply
01-30-2007, 05:26 PM
Post: #10
custom php.ini seems impossible
Quote:i know what i'm doing, i know how to freakin type some text into a shell and upload a file, and whatever else i have to do, but something just ain't right.
Right! Did it ever dawn on you that you need to know something more than you do?
Quote:coming on here and telling me i have no business changing things ain't gonna get a friendly response from me. i'm funny like that...
You may think that you are "funny like that", but to others it just makes you look the fool. You do *not* have any business changing security and performance related options installed by your hosting provider, on a shared server, if you *do not understand the things you are changing*.

If you can't understand that, then you are too ignorant or stupid to be allowed to change *anything* on a server where your actions can result in the degradation of performance for others.

--rlparker
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: