• Resolved thesmu

    (@thesmu)


    hello everyone,

    i had been having a problem for a little while with one of my blogs prompting download of php files instead of running them, meaning that i basically can’t use most of the dashboard.

    after searching the forums here i found this thread:
    https://www.ads-software.com/support/topic/95787?replies=5

    and this article:
    https://www.jarrodgoddard.com/blog/wordpress-prompting-to-download-files-instead-of-displaying-them

    which suggest increasing the memory on the php.ini file.
    i got in touch with my hosts and thry sent me this reply:

    You will need to SSH to your server as the root user and edit the php.ini file which is located in the directory below and change or add the setting ‘memory_limit = xxM’ where xx is equal to the amount of megabytes you wish to allocate.

    ‘/etc/php.ini’

    I have provided instructions on how to SSH to your server below:

    To access your server through SSH, use the IP address(es) for your server and log in with your username and password:

    User ID:
    This is the User ID you defined when you set up your account

    Password:
    Use the password you defined when you set up your account

    NOTE: You can find the IP address(es) for your virtual dedicated server in your Virtual Dedicated Hosting Manager.

    If you do not have an SSH client, you can download the Putty SSH freeware client at: https://www.chiark.greenend.org.uk/~sgtatham/putty/

    Some functionality requires root access. You cannot log in to your server remotely using ‘root’. You will need to use the su command. The su (short for substitute user) command makes it possible to log in as root temporarily while you are logged in with your normal User ID.

    To use su for root access, type:

    su –

    Your root password is the same as the password for your normal User ID.

    i have (i think!) managed to connect as root through the ssh on the simple control pannel that comes with my godaddy virtual server but i am absolutely stumped as to what next..

    what i am looking for (and i know it is a big ask but i will love you forever and bake you virtual cookies) is someone who will explain to me in baby steps what i need to do becuse i don’t have a clue and am really worried about doing something BAD to my server..

    i have tried searching google and the tutorial files on godaddy but nothing i have found has explained the process from start to finish without assuming a degree of knowledge i don’t have.

    thank you for taking the time to read this, any help will be greatly apreciated..

Viewing 15 replies - 1 through 15 (of 16 total)
  • Have you talked to the Godaddy phone support department at (480)505-8877? They are usually pretty responsive.

    Thread Starter thesmu

    (@thesmu)

    i haven’t no, partly because i am in the uk and partly because i am on an unassisted plan and i wasn’t sure this was something they would help me through.
    you’re probably right though, i should give them a try..

    Thread Starter thesmu

    (@thesmu)

    hi again,
    i called godaddy and whilst the lady was very nice she didn’t have any personal knowledge on the subject.
    she emailed me a link to this tutorial:
    https://help.godaddy.com/article.php?article_id=1409&

    i ran the command to locate the file and it is sure enough /etc/php.ini but i’m still none the wiser as to how to get into the file and change it.
    i tried typing in /etc/php.ini but i just get:
    -bash: /etc/php.ini: permission denied

    i don’t have a clue and am really worried about doing something BAD to my server

    It’s always good to be cautious!

    It may be best to enlist the help of someone locally who has experience in using the command line to change and list directories, create back-up copies of files and efficiently navigate, edit, and save changes using a text editor such as vim or nano. If you are not already comfortable doing this from a command shell, it may not be a good idea to attempt it for the first time on your production server.

    The basic short steps are these…

    -ssh to your server
    -login using your account name and password
    -type: su
    -enter your root access password as provided by your host, and you should now have “root” or administrative rights on your virtual server.

    -change to the directory where the file is located

    -using the command line, create a backup copy of php.ini just in case. You must also know how to restore this file in case of problems.

    -open php.ini in a text editor and make the necessary changes. Successfully write out and save the changes, and exit the editor.

    -logout of your remote session.

    I have intentionally left out the actual commands because I advise against attempting this yourself for the first time (unless you have the knowledge required to perform the above steps), and fear that I would be contributing to disaster by doing so. If after thinking it over you still want to give it a go, the basic commands are pretty readily available with a little quick searching.

    Best of luck!

    I must stress that I am not encouraging you to attempt this on your own.

    That being said, this might be a good read.

    Linux/Bash Commands

    Thread Starter thesmu

    (@thesmu)

    i get what you are saying claytonjames, my problem is that i don’t know anyone who can do this for me and can’t afford to pay to hire someone. and i can’t update my site with anything other than text – which being as it is an artists portfolio makes it as good as useless.
    you say that information is readily available but without the knowledge/help to piece it together i am surely all the more dangerous!

    i think i might just have to make a wordpress back up and try pulling the site down and starting again with a new msql database and see if that makes any difference. i might also try downgrading my wordpress install since this only started happening since i upgraded – though that might be co-incedence.

    If this is indeed a php memory_limit issue, there may be another way to solve it. I can only direct you to a prior similar discussion on the subject, but it seems it might be worth a try before you scrap the install. I have never tried this, as I edit php.ini directly, but others say in some cases this might work. It’s worth a read anyhow.

    https://www.ads-software.com/support/topic/123495?replies=8

    Best wishes.

    godaddy allows you to have your own php.ini. You do NOT edit the one that exists at /etc/php.ini (thats a global one for the entire box) — you create and edit your own. It goes in YOUR directory.

    You do NOT edit the one that exists at /etc/php.ini

    Would that also hold true on a dedicated virtual server? I made the assumption from the correspondence he had with godaddy that he was on a VM.

    NOTE: You can find the IP address(es) for your virtual dedicated server in your Virtual Dedicated Hosting Manager.

    My bad.

    Thread Starter thesmu

    (@thesmu)

    hey there, no you were right claytonjames i am on a virtual dedicated server..

    i’ve had a look at the link you posted earlier and i’ve not had time to try anything yet but i’m going to try the .htaccess edit and see if that helps.

    p.s i’m a she ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    thesmu: Try this command at the ssh prompt:
    pico /etc/php.ini

    Pico is a very simple text editor that’s easy to use, especially for newbies.

    If they don’t have pico installed, you can try joe. If joe isn’t there, you can try vim or vi but that editor may take some learning before using it.

    If you do launch vi or vim, know that the command :q will quit the editor, and :q! will quit without saving.

    Thread Starter thesmu

    (@thesmu)

    otto 42 – thanks for this!
    i’ve managed to get in through vim and changed the line:

    memory_limit = 8M ;Maximum amount of memory a script may consume (8MB)

    to

    memory_limit = 16M ;Maximum amount of memory a script may consume (16MB)

    but it doesn’t seem to have rectified the original problem. do you think 16 is not enough, or have i done something wrong?

    thank you so much for all your help..

    xxsxx

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    You may need to restart Apache for your changes to the PHP.INI file to take effect.

    Thread Starter thesmu

    (@thesmu)

    hello all,
    i tried the .htaccess fix from the other thread and the apache restart, and i’m not sure which worked – but either way it’s fixed now ??

    thank you all so much for your help and support!

    That’s great!! …and I hope you will accept my humble apologies for making an assumption about your gender.

    That really IS my bad. ??

    Best wishes.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘increasing memory of php.ini on virtual server – can someone explain this to me?’ is closed to new replies.