Can I get some help


#1

I’m completely new to Web Design, I’ve had my site for about a month and haven’t been able to use it to the best of it’s ability cause the upload limit. Dreamhost gave me a set of directions- http://wiki.dreamhost.com/index.php/PHP.ini
and I can only get up to where it says:
"Execute the following commands into the shell. This will give you permission to execute the php-update.sh that we just created.

chmod +x php-update.sh"

After that I’m lost, can I get some help please?


#2

Sure. What’s the problem or question?


They recently hired more support help.
Tip me (and DreamHost gets 5%+$0.30)


#3

How do I-
Execute the following commands into the shell. This will give you permission to execute the php-update.sh that we just created.

chmod +x php-update.sh


#4

It would help us help you if you could elaborate a bit on how the “upload limit” is impacting your ability to use your site “to the best of its ability”. I assume you are talking about the PHP max upload file size; depending upon what you are trying to do, PHP may not even be the best way to accomplish that. :wink:

The link that DH provided is a good article on what is probably the easiest way to modify the characteristics of PHP on Dreamhost, but that is not to say that is is “trivial” for those who are not reasonably comfortable using the shell. The page itself “warns” of this:

[quote]The instructions provided in this article or section are considered advanced.

You are expected to be knowledgeable in the UNIX shell.
Support for these instructions are not available from DreamHost tech support. [/quote]
Frankly, the article does a very good job of describing how to accomplish that task, if you have the requisite understanding of what’s involved. The problem with attempting such changes without the requisite knowledge, is that if this is done incorrectly, you can re-introduce security vulnerabilities and resource usage into your site that have been purposely “engineered out” of common use by Dreamhost to insure the maximum safety and efficiency of the server to protect others who share your server.

Doing this takes upon yourself a huge responsibility to be sure your actions do not adversely impact others on your server; hence it should not be undertaken until you thoroughly understand all the potential ramifications (both from the security and resource usage standpoints) of what you are attempting to do.

That said, and given your own description of your knowledge and skills at this point, it may well be there is another “simpler” and “safer” approach to take toward your development problem, which is was the point of my intial paragraph in this reply.

If you tell us more about what you are trying to do, it will help us evaluate whether there is a better approach to take than customizing your version of PHP. If customizing PHP is, in fact, the best, or only, way to solve your problem, then we can be of help in pointing you to the correct resources to aquire the understanding you need to complete the process and/or help you with specific details as needed.

–rlparker


#5

Start with this Dreamhost Wiki article on introduction to the shell, paying special attention to also visit the links provided toward the end of the article (See also SSH, Shell Commands, and Enabling Shell Access.) Good Luck! :wink:

–rlparker


#6

All I’m trying to do is take make it capable to upload MEDIA files over 7mb, I read the introduction to the shell and now I’m trying it out.


#7

Let us know if you have any more questions - and more importantly, let us know if you get it to work!

Wholly


#8

One more question, are your trying to set up a form for other users to upload images, or do you wish to upload images for yourself only?
Silk

My website


#9

No, just for me. And I still haven’t got it, I don’t know what the freaking problem is, I follow all the instructions correctly, but I guess I’m not doing this part right:
Run the following command to convert it to proper Unix format before calling the script again: dos2unix php-update.sh
[edit]
Set up a cron task to keep php up to date

If there are no errors, type:

crontab -e


#10

Since it is just for you, I have a solution, though maybe temporary but works.
Use ftp to upload your images and thumbnails, then if you wish to make them publicly viewable, create a php program that reads that directory and places each thumbnail into a table. When the user clicks on the thumbnail, then they can see the full image.
This works for a number of reasons

  1. you don’t have to learn how to upload files
  2. you don’t have to learn how to generate thumbnails(predone on your own computer)
    3)Dial up users won’t get slow downloads because you are using thumbnails

Try out the following code: It has 3 includes, 1 for a header, 1 for a footer and 1 for a menu. This way it can in incorporated into a website using matching headers, footers and menu.
Go down through and find each string and see if you would like to change the directories or file extentions.

Silk

<?php $pagetitle='CG Stills'; include ('header.inc'); print <<<HEAD

{$pagetitle}

Click on image for full size. Click on back button to return.

# of Columns: HEAD; if ($_POST['columns']==2) { print "2"; } else { print "2"; } if ($_POST['columns']==3) { print "3"; } else { print "3"; } if (($_POST['columns']==4) || ($_POST['columns']==null)) { print "4"; } else { print "4"; } if ($_POST['columns']==5) { print "5"; } else { print "5"; } print <<< HEAD2

HEAD2; include ('menu.inc'); $max = $_POST['columns']; if (($_POST['columns'] < 2) || ($_POST['columns'] > 5)) { $max=4; } $dir = './Gallery'; $thumbnails = 'Thumbnails'; $tr = ''; $td = "\n\n"; $grid = "\n\n
\n\n\n\n$tr"; $i=0; print $grid; $d=opendir($dir); while (false !== ($file = readdir($d))) { $files[]=$file; } sort ($files); foreach ($files as $file) { if (preg_match('/(jpg|gif|png)$/', $file)) { $strip=rtrim($file, '.jpg|.gif|.png'); $dirfile = $dir . "/" . $file; $thumb = $dir . "/" . $thumbnails . '/' . $file; $size = intval(filesize($dir . "/" . $file)/ 1024); print $td . "\"$file\"< br>$strip< br>$size KB"; $i++; if ($i==$max) { print "\n\n$tr"; $i=0; } } } print "\n\n" . '
' . "\n\n"; print "
\n\n"; include ('footer.inc'); ?>

My website


#11

Thanks, Silkrooster. But I still have no idea what to do with what you gave me, hah.


#12
  1. Create a header.inc file This file is general html code which would look like:
<?php print $pagetitle; ?> - Name of web site
logo.jpg (0kb)

Note: Above has features that can be removed, I added a logo image so you can see that by having a image in the header file each of your web pages could link to the same header making it simple to edit the image only once to update all of your web pages. But like I said its optional.

  1. Create a menu if you don’t have one. If you have one, you can rename the menu.inc in the php file to the name of your menu.

  2. Create your footer.inc file(using a footer you can add images or text you want on all web pages that link to footer.inc:

4)upload the php file to the server and create the Gallery folder in a sub folder of the php file, then create a Thumbnails folder in a sub folder of the Gallery folder.
example:
Accessing the php file (assuming filename.php is in your root domain folder(when viewed from a browser))would be:
http://www.example.com/filename.php
accessing the gallery is:
http://www.example.com/Gallery
accessing the thumbnails is
http://www.example.com/Gallery/Thumbnails

Things to keep in mind:
1)filenames in Gallery and Thumbnails must match
2)Directory names are case sensitive So make sure the directories in the php program match the directories you create.
3)php programs normally only run when their extention is php, exception is changing the htaccess file to allow php to run in a html file (a search on the forum will explain how)

My website


#13

Mike, I think the problem is that you don’t understand how to create the file on the web server. The article doesn’t state in any way how to create the file php-update.sh. Have you made this file on the web server yet? if yes, then you should have no problems running the chmod command. if the file doesn’t exist then that’s the problem. the php-update.sh file should contain 1 of the 3 scripts that the document shows you.

I hope this helps a bit.

Granville

Sometimes it’s not about thinking outside the box, sometimes it’s about making things in the box fit and work better with newer technologies.


#14

I understand how to create files, but nothing happens afterwards.


#15

So, I finally got it working and uploaded a few things, but now whenever I attempt to upload things it stops at around 600kb and says- "Broken Pipe."
Help!