Images in PHP not showing!

January 2, 2013 10.7k views
Hello, I got problem after installing LAMP... Images not showing on my wordpress blog. also images not uploading on the directory. Please help me! Thanks!
6 Answers
To upload images you would need to set the directory where they get saved to permissions: 777.

This would allow the web server to write files there directly, as it usually runs as a different user than the one that owns the directory.

As for images not loading you would need to look up the path that they are being served from and then check to make sure that first the path is correct and that path does exist on the server.

Secondly you would also need to make sure that all of the directories are readable by "other" in the entire path, otherwise the webserver would not be able to navigate to that directory and read the image for display to the browser.
yeah i give 777 permissions to that directory but still index file and images not loading.. also my path is correct... It's shows me Blank php Page :(
and can you explain where i've to give full permissions that users can view my applications?
my apps path is /var/www/domain.com/public_html/app
btw thanks for the reply =)
You should not be using 777 permissions on any directories except for those where you want your webserver to write files to. Setting directories to 777 isn't secure and is not recommended except in very particular circumstances.

It seems like you are having a different issue, if it was a permissions issue you would be receiving a 403 forbidden error, in this case y ou are saying that you are loading a PHP file but it's coming up blank.

We need a bit more information to help you troubleshoot this, if you provide the URLs that you are attempting to load I can see what you are seeing and also you may need to do a few directory listings to confirm permissions for every directory in the path.
Thanks for the reply. i give the correct chmod for directories also i checked phpinfo();
?> and php files works but i'ts shows blank pages :( also i installed php mudules such as gd gmp dev curl etc. then what's the problem? can you add 1 more post for php configuration after installation?
P.S. my .htaccess is also not working~
If PHP files show blank pages then it's not working.

You should throw up a test.php wich just phpinfo() to see if you get the phpinfo to display. According to your last message it seems that it doesn't.

At this point we are going to have to dig into your Apache config and how you installed PHP so it's best for you to open up a support ticket so we can review that in detail.

Otherwise you can post the relevant information here though some of it may get removed due to filters.
Have another answer? Share your knowledge.