500 Internal Server Error

Hi. Last few days i uploaded: cee-vee skeleton, just core and core with admin , each in separate folder. Prior to that i ran php info to verify it runs 5.6 version… Anyway, cee-vee skeleton works okay but other two give "500 internal server error… .htaccess files are the same in each of these… so, what should be the problem?

Oh and another thing. If i tray php -v through ssh i get php version 5.2.17 (cgi-fcgi). And just second later i refresh phpinfo.php file and it gives me 5.6.17. How is that possible? (i’m on hostmonster)

The PHP command line version can be different than the webserver PHP version. Can be fixed but depends on the hosting, e.g. see this guide but ask your hosting first.

As for the 500 error, did you already check the troubleshooting guide?

thanks, flaviocopes. I will try to contact them… I checked again troubleshooting guide… I tried everything there but one thing i misslooked…
"Then restart your Apache server."
I found out the following useful info, so no need to restart apache (hostmonster)

Must I restart Apache after changing a htaccess file?
No, you will not need to restart Apache.
You will need to “hard refresh” your web page to see the changes. Simply browse your site and go to the page that should be affected. Then hit Ctrl + F5 to refresh everything. (Some computers require the F Lock to be on before you can use F5.) Now you should see your new .htaccess code take effect.

…But still, nothing changed. Now i am waiting for a resolved ticket regarding the changing of php version in command line environment…

I got the reply from host monster support.
Hello Klemen,

Thank you for contacting Technical Support Department. We are very sorry for the inconvenience you are experiencing.

I have checked your issue and the ssh does not use the same php version as your hosting environment, in order to actually use a specific php version with ssh you have to specify within your commands which one you want to use.
For example /ramdisk/php/54/bin/php54-cli -v
Also, I could see that you are using php 5.6 beta we do not have the CLI path offered yet.

Is it now even possible for me to use grav? To install plugins?
How come that cee-vee skeleton works?

Grav requires PHP 5.5 or later. So you just need that, PHP 5.6 is not required.

I’m not sure why Grav runs fine on one of your sites and not on the other two you have, what are the differences? The other two are not skeletons? What’s not working, you don’t see any page?

grav core uploaded and unzipped: www.jaya.si/grav-regular/
grav core with admin upld. and unzip.: ----/grav-admin/
grav skeleton cee-vee upl and unzip.: ----/grav-ceevee/

in each directory is also phpinfo.php file…
In first two i only see "Internal server error"
Skeleton works okay.

I solved with this script

<?php echo "---"; function chmodDirectory( $path = ".", $level = 0 ){ echo decoct(fileperms($path)).'-'.$path."
"; $ignore = array( "cgi-bin", ".", ".." ); $dh = @opendir( $path ); while( false !== ( $file = readdir( $dh ) ) ){ // Loop through the directory if( !in_array( $file, $ignore ) ){ if( is_dir("$path/$file" ) ){ if (decoct(fileperms("$path/$file"))!=40755) echo decoct(fileperms("$path/$file")).'-'."$path/$file"."
"; chmod("$path/$file",0755); chmodDirectory("$path/$file", ($level+1)); } else { if (decoct(fileperms("$path/$file"))!=40755) echo decoct(fileperms("$path/$file")).'-'."$path/$file"."
"; chmod("$path/$file",0755); // desired permission settings }//elseif }//if in array }//while closedir( $dh ); }//function chmodDirectory(".",0); ?>

and this code should go to… where?

Permissions should be solved by following the guide.