FTP Path / www path change or install mysqli

Hello,

i will try to install a webpage script on the nas, but it need mysqli , maybe i can install it ?

but if i try to chnge the php.ini whit ssh and restart the cloud, the changes are gone…

same if i put something in var/www/… if i put something insite, after restart cloud is it gone…

and the last problem:

i will use the cloud for space from my website, but the problem is:

the website upload something via ftp, on the cloud, this is ok, but i can not open it whit http… because http go to /var/www… and the ftp path go to /mnt/HD/HD_a2/Public 

can i change the FTP path thats uploads go to /var/www/files

or change the http phat from var/www to /mnt/HD/HD_a2/Public/files

?

Don’t know what this webpage script of yours does that specifically requires MySQLi, but you need to keep in mind that this system’s firmware is not meant to be mucked around with, unless your Linux/Unix skills are at least moderately advanced. Having said that, you need to keep in mind that most of these changes that you are saying gets wiped out after a restart is by design. If you have the skills enough, you can “bake-in” some of these changes into your custom compiled firmware using the source code WD provides in the Downloads section.

Short of baking-in these changes into the firmware so that the changes persist after a reboot,you are only limited in making any of these kinds of changes until the next reboot. To preserve any custom changes to a settings file like php.ini, you can copy your modified file to /usr/local/config/ preserving the permissions on the file intact (using copy commands -p switch) and copy over the default file after a restart, so that you don’t have to edit it again with your changes. And to make PHP take note of the changed php.ini file, you have two options…to kill the php process and restart it manually yourself but that is trickier to do. Or you can simply kill the web service (lighttpd process) by issuing the command ‘killall lighttpd’ which will kill the lighttpd process but also kill all php processes, and then automatically restart lighttpd and php processes for you. Just give it a couple minutes after the kill command and keep loading the web dashboard in your browser and when the web dashboard appears, it implies lighttpd and php processes have been restarted (alternately you can keep running the command ‘ps -ef | grep php’ and it will show on the command prompt when php has been restarted). This is my preferred way to make both lighttpd and php settings file changes to take effect without mucking with the manual stop and start of php processes…that has been tricky for me to restart sometimes (because the only way I have manually succeeded is by copying the master php process command line from the running processes listing and issuing that command…but like I said it is tricky…killing lighttpd is the easiest way).

As for putting something on /var/www, you should NOT be copying anything there anyway…at least as far as any web files are concerned because as you noticed the directory refreshes completely after a reboot. What you should do instead is create a share from the dashboard, which will put the directory under /mnt/HD/HD_a2/ and then you need to create a soft link (using on command) in the /var/www directory and point to the share you just created. And if you setup permissions correctly to the share, you can easily just connect to the share via Windows network (Samba/CIFS) and drop your files there. You can always ftp to that directory too to drop your files, but why bother with that when you can just do it from Windows network explorer. Another reason you should not be creating any big directories to store lots of files for your website under /var/www, besides the reboot wiping everything off, is because the space allocated to that partition is very small (run a ‘df - h /var/www’ command and you’ll see what I mean) and will likely run out quickly if you want to store a lot of web files. Hence it is practical to create a share and then symlink to that share from /var/www. I wrote two articles here earlier…for EX2, not the Mirror, but the firmware is nearly identical and everything for EX2 also applies to Mirror. You might be interested in them:

http://community.wd.com/t5/WD-My-Cloud-EX2/Share-your-files-with-friends-using-http-links/td-p/785417
&
http://community.wd.com/t5/WD-My-Cloud-EX2/Enabling-logging-for-lighttpd-web-server/m-p/788667

If this info helps you, or at least provides you with ideas to go about doing what you are thinking of doing, please show your thanks by clicking on the star under my username on the left and give me a kudo. Small gesture of thanks keeps me motivated to reply to queries like yours.

Also, Patrik, I hope you are aware that amongst the Mirror’s included third-party apps, is the excellent, freely available Joomla. I had written a post on how to install it here (for EX2 but applies to Mirror too) → http://community.wd.com/t5/WD-My-Cloud-EX2/Need-help-with-Joomla-install/m-p/774765

Though the bundled Joomla version is very stale at this point (WD bundles Joomla 2.5 with the My Cloud products), if you are comfy with Linux, you can very easily download the very latest Joomla (look for Full Stable release’s tar file from Joomla’s site) and set it up. Refer to my Joomla post (above link) for some pointers. As for the path to install it to, I decided to put it to where WD puts the stale version of Joomla, which is under /mnt/HD/HD_a2/Nas_Prog/Joomla/<Joomla specific version directory here like Joomla_3.3.6> and expand the tar all there, create a sy link to Joomla directory under /var/www and then go do your install from the browser. If it seems tricky, just stick with the bundled Joomla and you will have a sophisticated website up and running in no time. I’ve been running the latest Joomla for a few months now…and just installed 3.3.6 couple days ago…no problems at all. Great way to both build your personal site and learn Joomla in the process, if you aren’t familiar with it already.