How do you specify a CACHE_DIR for a Windows development machine running Apache?
I tried the following with no luck:
define('CACHE_DIR','C:/root/public_html/mnc/jpgraph/cache/');
define('CACHE_DIR','C:\root\public_html\mnc\jpgraph\cache/');
define('CACHE_DIR','C:\root\public_html\mnc\jpgraph\cache\\');
The following is also set:
define('USE_CACHE',true);
define('READ_CACHE',true);
Graph creation is as follows:
$graph = new Graph(($tableWidth-2),($tableWidth/2),'auto',120);
...
$gdImgHandler = $graph->Stroke(_IMG_HANDLER);
// stream
$graphRendered = $filename;
$graph->img->Stream($graphRendered);
My img tag is as follows:
<img class="graphImg" src="<?php echo $graphRendered . '?' . uniqid()?>">
The cache folder has permissions set to Full Control for Administrators, Users, SYSTEM, and Authenticated Users.
My Apache root folder is C:\root\public_html\
Related
I windows and in my network we have one folder for everyone with pics, pdf, etc. When i open browser and type address below.
file://mysharedfolder/ourpics/mariobros.jpg
i see this pictures without any prblems but when i do
<img src="file://mysharedfolder/ourpics/mariobros.jpg">
i have no access. So can i fix it or is permanent deny ? If i have access from browser why cant see pic from html code ? is not the same ?
It is like i have samba dir /home/my_pics/pics
guest ok = yes
force create mode = 775
browseable = yes
writeable = yes
path = /home/my_pics/pics
force directory mode = 775
But when i tried get access img src "/home/my_pics/pics/1.jpg" i have error 403
what can i do ? add some user?
We need help trying to upload our opencart templatemonster.com template correctly on godaddy but we are not clear on how to do that.
FYI our public_html/system/database folder contains a mysqli.php file as well.
We made sure to upload the template via fullpackage (The name of the file is themeXXX(full).zip, where XXX is your theme number) to the public_html folder.
Extracted the zip files in the public_html folder.
Performed the installation using the installation manager .
At step 3 configuration we were prompted to input our database access details and made sure the database was empty. (GoDaddy told us to use the localhost)
After hitting continue:
The deprecated: mysql_connect() message and Warnings occur in step 3 of the opencart configuration setup after we enter the details and hit continue.
Where ‘store’ is the new directory name. Where ‘user’ is your server
account address. Where ‘yourdomainname.co.uk’ is the web domain of
your new website:
(DUMMY LINK FOR DEMONSTRATION PURPOSES) http://www.yourdomainname.co.uk/install/index.php?route=step_3
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/user /public_html/system/database/mysql.php on line 6
Lines 5-16:
public function __construct($hostname, $username, $password, $database) {
if (!$this->link = mysql_connect($hostname, $username, $password)) {
trigger_error('Error: Could not make a database link using ' . $username . '#' . $hostname);
}
if (!mysql_select_db($database, $this->link)) {
trigger_error('Error: Could not connect to database ' . $database);
}
Errors:
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/system/database/mysql.php:6) in /home/user/public_html/system/engine/controller.php on line 28
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/system/database/mysql.php:6) in /home/user/public_html/system/engine/controller.php on line 29
Lines 27-31
protected function redirect($url, $status = 302) {
header('Status: ' . $status);
header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url));
exit();
}
Template Features
OpenCart Compatibility: 1.5.6.x
OpenCart Engine: 1.5.6.4
(Trimmed)
Sources Available
PSD PNG PHP TPL JS
Hosting Requirements
Web Server (preferably Apache)
PHP (at least 5.2)
MySQL
Curl
Fsock
OpenCart Templates Help Center
Software Required
Adobe Photoshop CS+
For uncompressing a template ZIP package: WinZip 9+ (Windows);
Stuffit Expander 10+ (Mac)
Apache Server
PHP v. 5 or higher
MySQL 4.1.14 or later
OpenCart 1.5.6.4
Sublime Text2 or later, Notepad++ or any php-editor
A commenter stated
mysql_ calls will work on this server but are causing deprecation
notices. A quick fix would be to turn off warnings in your php.ini
file, in your error_reporting value. Or you could try turning off
display errors, set display_errors to 0.
I like the comment but could someone provide a slightly more comprehensive explanation or visual resource to this suggestion? Such as articulating a little further how to proceed? Should I download the file through GoDaddys public FTP or should I use FileZilla FTP client (does it matter), make a copy, make the proper changes then re-upload?
I like the possible solution but I am curious to know if these are the only ones.
UPDATE
I just changed display_errors = 1; to display_errors = 0;
saved the file (I edited the file withing GoDaddy's text editor)
re-input our database access details
hit continue on step 3 configuration and got the same error.
php.ini
magic_quotes_gpc = Off;
register_globals = Off;
default_charset = UTF-8;
memory_limit = 64M;
max_execution_time = 36000;
upload_max_filesize = 999M;
safe_mode = Off;
mysql.connect_timeout = 20;
session.use_only_cookies = On;
session.use_trans_sid = Off;
session.cookie_httponly = On;
session.gc_maxlifetime = 172800;
allow_url_fopen = on;
;display_errors = 0;
;error_reporting = E_ALL;
???
I have a similar experience! You don't need to enable these extensions the PHP Version needs to be update:
Sign into GoDaddy
Go to My Products under your sign in name at the top right.
Go to Web Hosting and click the Manage button.
Click manage again.
Scroll to the Software header and click "Select PHP Version"
Then change to an earlier version, in which this extension is not deprecated.
Let me know how that works for you.
config.push.define "ftp" do |push|
# Login Credentials
push.host = "104.131.46.134"
push.username = "root"
push.password = "password"
# FTP vs SFTP
push.secure = "true"
# Where to copy the files on the server
push.destination = "/var/www/html"
# Where are App is
push.dir = "public"
end
I have above code above. I understand push.destination = "/var/www/html" points to actually directory on the remote server. How do you specify source directory on guest machine? My Wordpress Theme is hosted on /usr/usrname/public_html/wp_content.
Should I put
push.dir = "/usr/usrname/public_html/wp_content"
and it would work?
Yes, per doc
dir - The base directory containing the files to upload. By default this is the same directory as the Vagrantfile, but you can specify this if you have a src folder or bin folder or some other folder you want to upload.
so if the host files that you want to push are on /usr/usrname/public_html/wp_content you will have
push.dir = "/usr/usrname/public_html/wp_content"
I'd like to seperate my custom theme folder from the default MoinMoin htdocs folder. Here is my directory structure of my current installation:
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/...
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/index.html
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/classic
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/modern
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/mytheme
/path/to/python2.7/lib/site-packages/MoinMoin/web/static/htdocs/mytheme/style.css
And my custom Git-versioned wiki/data directory:
/path/to/git-repo/wikiconfig.py
/path/to/git-repo/wikiserver.py
/path/to/git-repo/wiki/data/...
/path/to/git-repo/wiki/data/plugin/theme/mytheme.py
/path/to/git-repo/wiki/underlay/...
The wikiconfig.py contains the following configuration:
class LocalConfig(multiconfig.DefaultConfig):
wikiconfig_dir = os.path.abspath(os.path.dirname(__file__))
instance_dir = os.path.join(wikiconfig_dir, 'wiki')
data_dir = os.path.join(instance_dir, 'data', '') # path with trailing /
data_underlay_dir = os.path.join(instance_dir, 'underlay', '') # path with trailing /
DesktopEdition = True # give all local users full powers
acl_rights_default = u"All:read,write,delete,revert,admin"
surge_action_limits = None # no surge protection
sitename = u'Foo'
logo_string = u'<span><img src="...">Bar</span>' % url_prefix_static
page_front_page = u'StartPage'
theme_default = 'mytheme'
I would like to move the theme's static files to the /path/to/git-repo folder, because this directory is a Git repository which should contain all custom modifications, and also the theme's static files.
Any ideas how this could be done?
Regards
I suggest you just leave the builtin static stuff where it is.
What you can do for custom and separate theme development is to serve your static stuff at some specific URL and catch that URL in the web server before it gets given to moin.wsgi (and ends up being served by MoinMoin's builtin static file server), something like:
Alias /moin_static196/mytheme /path/to/git-repo/static
WSGIScriptAlias / /..../moin.wsgi
/moin_static196 is the url path moin 1.9.6 uses by default, you can modify it in wikiconfig.py to use anything you like.
You would put the theme python code also into your git repo and just symlink it from the instances data/plugin/theme/ directory.
I have the following path set as the upload_path for Upload library included with Codeigniter.
$this->upload_config['upload_path'] = './uploads/working/';
This path works fine on the remote server. However, when I'm debugging locally, it fails.
I have permissions set so the directory is writeable.
I added logging to the upload library and found that it is failing this check in the library:
! #is_dir($this->upload_path)
My development machine is a MacBook Pro running 10.6.2. I'm using MAMP Pro. My directory structure looks like:
app
cache
ci_1_7_2
html
- css
- images
- index.php
- js
- uploads
- large
- normal
- small
- working
Any help would be greatly appreciated. Thanks for your time.
When uploads folder is inside /application/ you can use:
$this->upload_config['upload_path'] = APPPATH . 'uploads/working/';
But for this structure, hardcode an absolute path or use:
$this->upload_config['upload_path'] = realpath(dirname(__FILE__)). '/uploads/working/';
Notice that APPPATH contains a trailing slash but realpath will strip the trailing slash.
When all else fails, use absolute paths.