Jump to content


Photo

php.ini with godaddy hosting


  • Please log in to reply
14 replies to this topic

#1 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 05:42 AM

I have been working on an upload script lately and the max upload is 8mb.  I have found that you need to change the php.ini file.  Well with godaddy they dont give you access to this file.  Is there any alternatives to this?  I really need to get this change to a much larger number.

Thanks
Mach

#2 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 September 2006 - 05:45 AM

look up set_ini()
Why doesn't anyone ever say hi, hey, or whad up world?

#3 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 05:59 AM

I was looking here http://us3.php.net/m...ion.ini-set.php and one guy said..

"Many settings, although they do get set, have no influence in your script.... like upload_max_filesize will get set but uploaded files are already passed to your PHP script before the settings are changed.

Also other settings, set by ini_set(), may be to late because of this (post_max_size etc.).
beware, try settings thru php.ini or .htaccess."

Is this true? and I couldnt quite figure out how to make a php.ini file  :-[




#4 corbin

corbin
  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 02 September 2006 - 06:06 AM

Ummm, sorry, but I've never had to find a way around that since I host my own server on my computer and have direct access to my php.ini file...
Why doesn't anyone ever say hi, hey, or whad up world?

#5 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 06:17 AM

Well I dont know if that is correct or not, im in the dark here, not sure what is right or wrong.

I put this at the very top of my upload script
ini_set("post_max_size","200M");
ini_set("upload_max_filesize","200M");

It still didnt work
"The connection was reset
The connection to the server was reset while the page was loading."


Any suggestions?

#6 Joe Haley

Joe Haley
  • Members
  • PipPipPip
  • Advanced Member
  • 103 posts
  • LocationCanada, eh?

Posted 02 September 2006 - 09:55 AM

http://ca.php.net/ma...ct.file-uploads

Look for .htaccess on google.

both those directives can be controlled via a .htaccess file
Give a man a fish; you have fed him for today.  Teach a man to fish; and you have fed him for a lifetime
Don't teach men to program. Teach them to fish.

Please, try the RTFM solution before asking for help:
http://php.net/manual/en/index.php

#7 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 05:30 PM

Ok well I talked to Godaddy and they said that I could make my own php.ini file and put it in my root directory.  Any hints on how to do this?

thanks
MAch

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 05:44 PM

see what version they got php running then download that version then change the settings as needed then.

dont know if that helps  or is a bad idear but i am assuming your host told you to do so, so do  it.

good luck.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 05:49 PM

Ok they got PHP Version 4.3.11

Where would i find a php.ini code to download?
I was looking here, http://cvs.php.net/v...ini-recommended, But there is like a billion different ones, any idea which script to use?

#10 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 02 September 2006 - 07:18 PM

Ok I finally found one, thanks for all the help.

#11 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 02 September 2006 - 07:27 PM

It is very rare for Shared hosting to allow you access to the php.ini file
Simple reason being, the php.ini is set for all people on that server.

using MAX_UPLOAD_SIZE can set a max upload size, but the one set in php.ini comes first
so if php.ini is set to 8MB (standard) and you set MAX_UPLOAD_SIZE to 10MB
The limit is 8MB

Again, if php.ini is set to 8MB, and you set MAX_UPLOAD_SIZE to 4.
Then the max upload size is 4
Tell me the problem, I will try tell you the solution

#12 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 03 September 2006 - 05:05 AM

With the way Godaddy works, if you have a certain hosting plan you can create your own php.ini file.  I did that and got the sizes changed but now they keep timing out or something.

"This document contains no data."

I believe thats what it says when I test upload a largge file.

Am I missing something?

#13 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 03 September 2006 - 12:13 PM

Remember if your changing the Upload Size, you want to change the Time Out length
in the php_ini file, you have a set time that a script will execute before dying
Tell me the problem, I will try tell you the solution

#14 SuperMach1

SuperMach1
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 03 September 2006 - 07:21 PM

What is the name for the timeout variable?

#15 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 03 September 2006 - 08:22 PM

max_execution_time I think
Tell me the problem, I will try tell you the solution




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users