I am bundling my build-by-Yii Web application with Server2Go into a CD. Now the problem is CD is a read-only media, while Server2Go need to write assets. I can disable Yii to logging so it won’t write to runtime directory. But I don’t know how to prevent it from writing into assets folder. My first thought is, I will just running the application first (so it generated all the files needed) and then burn to cd…
but unfortunately Yii still generates error. Is there anyway to make Yii web application run on CD?
He meant: "set it to whatever the temporary storage folder of Server2Go is". So first you need to find out, wether Server2Go has such a folder and how to configure it.
Still don’t think it’s accessible - there’s no information what the URL for that folder would be. What you could do, is to map a subfolder of that temporary path to the ‘/assets’ URL. You need to change the httpd.conf in that case:
Alias /assets "/path/to/tmp/dir'"
And configure the basePath of the assetManager component to the same directory.
I just downloaded Server2Go and changed the "assets" and "runtime" folders to the variable as per documentation… and deleted them from the application structure…
I run it locally on hard disk (haven’t burned it on CD)… but all assets and runtime data was saved in the temporary folder pointed by that environment variable…
mdomba, i’m confused now: How can you access the published content in the assets folder via URL then? Don’t you at least have to configure the baseUrl of the asset manager?
Mind sharing your config … ? (BTW i find it strange, that i have to ask you this )
Still confused. How is this supposed to work? Let’s say tmp folder is just “/tmp” and a script publishes “button.gif”. So you’ll end up with
/tmp/xyz123/button.gif
But the URL to the published image will look like:
/assets/xyz123/button.gif
How’s tho browser supposed to get access to this published image, if you don’t even set the baseUrl? Not to mention, you didn’t map the tmp folder into the public web directory.
I just assumed that Server2Go will map this… and did not check it…
The button.gif is published in the temp folder (eg c:\temp\button.gif)… and the script does include it as src="c:\temp\button.gif", but this does not work…
I didn’t notice this as the example application I tried was including all from the subfolders … but as soon as there is an CActiveForm with the ajaxvalidation enabled it does not work because it cannot include the activeform.js file…