Mysql-python
Mar 2, 2007If a shared hosting server has mod_python enabled, can we assume that it also has the MySQLdb module installed?
I mean, whats the point in having mod_python if theres no way to connect to a database?
If a shared hosting server has mod_python enabled, can we assume that it also has the MySQLdb module installed?
I mean, whats the point in having mod_python if theres no way to connect to a database?
I am following this guide to make my sitemap:
[url]
Here is the config file I am using (edited for my site):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--
sitemap_gen.py example configuration script
This file specifies a set of sample input parameters for the
sitemap_gen.py client.
You should copy this file into "config.xml" and modify it for
your server.
********************************************************* -->
<!-- ** MODIFY **
The "site" node describes your basic web site.
Required attributes:
base_url - the top-level URL of the site being mapped
store_into - the webserver path to the desired output file.
This should end in '.xml' or '.xml.gz'
(the script will create this file)
Optional attributes:
verbose - an integer from 0 (quiet) to 3 (noisy) for
how much diagnostic output the script gives
suppress_search_engine_notify="1"
- disables notifying search engines about the new map
(same as the "testing" command-line argument.)
default_encoding
- names a character encoding to use for URLs and
file paths. (Example: "UTF-8")
-->
<site
base_url=[url]
store_into="domains/mydomain/public_html/sitemap.xml"
verbose="1"
>
<!-- ********************************************************
INPUTS
All the various nodes in this section control where the script
looks to find URLs.
MODIFY or DELETE these entries as appropriate for your server.
********************************************************* -->
<!-- ** MODIFY or DELETE **
"url" nodes specify individual URLs to include in the map.
Required attributes:
href - the URL
Optional attributes:
lastmod - timestamp of last modification (ISO8601 format)
changefreq - how often content at this URL is usually updated
priority - value 0.0 to 1.0 of relative importance in your site
-->
<url
href=[url]
changefreq="monthly"
priority="1"
/>
<url
href=[url]
changefreq="monthly"
priority="0.8"
/>
<url
href=[url]
changefreq="daily"
priority="0.8"
/>
<url
href=[url]
changefreq="yearly"
priority="0.8"
/>
<!-- ********************************************************
FILTERS
Filters specify wild-card patterns that the script compares
against all URLs it finds. Filters can be used to exclude
certain URLs from your Sitemap, for instance if you have
hidden content that you hope the search engines don't find.
Filters can be either type="wildcard", which means standard
path wildcards (* and ?) are used to compare against URLs,
or type="regexp", which means regular expressions are used
to compare.
Filters are applied in the order specified in this file.
An action="drop" filter causes exclusion of matching URLs.
An action="pass" filter causes inclusion of matching URLs,
shortcutting any other later filters that might also match.
If no filter at all matches a URL, the URL will be included.
Together you can build up fairly complex rules.
The default action is "drop".
The default type is "wildcard".
You can MODIFY or DELETE these entries as appropriate for
your site. However, unlike above, the example entries in
this section are not contrived and may be useful to you as
they are.
********************************************************* -->
<!-- Exclude URLs that end with a '~' (IE: emacs backup files) -->
<filter action="drop" type="wildcard" pattern="*~" />
<!-- Exclude URLs within UNIX-style hidden files or directories -->
<filter action="drop" type="regexp" pattern="/.[^/]*" />
</site>
I have put the config file and the python script file in the directory /domains/mydomain/public_html/
Now I am trying to run the script via SSH. I have logged in fine to the admin account, and I am running this command:
Code:
python domains/mydomain/public_html/sitemap_gen.py --config=config.xml
Here is what is returning:
Quote:
Reading configuration file: config.xml
[ERROR] Cannot read configuration file: config.xml
Configuration file errors -- exiting.
We are having an issue when trying to cache Fedora Core 10.
Code:
vzpkg create cache fedora-core-10-x86_64
Creation OS template cache for fedora-core-10-x86_64 template
Error: Python directory not found in /vz/pkgenv/rpm46x64
Error: Can't find environment directory /vz/pkgenv/rpm46x64: No such file or directory
The only recent changes that have been made is the Hostname. Before making this change, I was caching OS templates like it was christmas.
i have been thinking of getting dedicated server and was wondering is it easy to install python on CentOS or is it already installed?
View 8 Replies View Relatedto enable these on a shared cpanel server (which is using php 5x, apache 2x, suphp)
python
mod_python
django
How can I enable all these 3 safely without any negative conflicts?
I currently host my site with Sharkspace [url] and have been very very pleased. I would recommend them without any hesitation. PHP, MySQL, Cpanel, great and affordable hosting packages.....
However, I want to start developping using Python and the Django framework.
With Sharkspace, Mod_python is not enabled. Django framework cannot be used on their shared hosting servers.
So, I need recommendations on a host who has Mod_python enabled (LoadModule python_module modules/mod_python.so)and allows Django to be installed.
I was told by Sharkspace that Django requires root access. I am not very familar with this framework as I have been using PHP and Zend Framework up until this point.
I have Python on my server and it is using the most CPU and Memory on my server than any other process. I don't believe any of my clients use it so I am planning to delete it.
I am just wondering, does CentOS 5.2 (With cPanel) require Python, or is it not required so I can delete it without any problems caused?
this only shows up in Centos 5, it seems.
You do the good ole "yum update"
and...something very bad happens:
Loading "installonlyn" plugin
>> Loading "rhnplugin" plugin
>>
>>
>> Could not find any working storages.
Ok..this is one of the times google fails me..I guess because this is a fairly new problem.
If you are lucky:
Visit the rpm repo of your choice..manually download:
python-sqlite*
and
sqlite*
and force a re-install:
rpm -ivh python-sqlite* --force
rpm -ivh sqlite* --force
Sadly..I did find that..and it was tried..and did not work for me.
The fix? Ohhh...you gonna love this:
I completely removed python and everything that depends on it.
Drastic? Oh yeah. But after wasting two days with fixes that did not help...I figured this was the only way. Drastic measures were called for.
It was. It worked. You put everything back..and it is fine.
Oh..I noticed yum.3.2.1is available..and decided to give that a shot as well. It is fine.
Certainly not as much fun as the time I decided to attempt a upgrade of glib2 on a vps..but close.
how may in disable pytion in cpanel?
View 4 Replies View RelatedI plan to develop a nice website in Python,AJAX with backend as mySQL database. This website is gonna send out a lot of notifications depending on the kind of activities that every account/logins does.
I am not very sure whats the business going to be for this website but would want to wait for few months after launching.
So, Please suggest me a cheap Hosting provider who can help me host my code in Python , MySQL database and also allow 100s of emails every day. I would also want to register a domain for my website too. Would everything comes as package?
I should also have 100GB space atleast to be prepared to grow !
I have not hosted any of my code yet though have written a lot which runs in my system only. Please guide me folks! thank you.
While Installing Applications on VPS Container On virtuozzo I`am running Into a error given below.
Operation install with the Env(s) "web209" is finished with errors: Can not install packages: exec failed: Error: python-devel conflicts with python < 2.4.3-27.el5 Error: Missing Dependency: gnutls = 1.4.1-3.el5_2.1 is needed by package gnutls-devel Error: Missing Dependency: nspr = 4.7.4-1.el5_3.1 is needed by package nspr-devel Error: /usr/share/vzyum/bin/yum failed, exitcode=1 .
Any good stable, secure Linux web host providing the same you know of?
View 3 Replies View RelatedI have installed mod_python and the mods-enabled directory in the Apache2 directory looks correct (links to the available directory and the .load file), but I can't get Apache2 to process Python coded files.
I am missing something, but don't know what.
I have a Windows 2003 dedicated Server with Plesk Control panel
I am not able to execute CGI scripts(Perl/Python/CGI) on it
when I try to execute on it
I get these errors:
Access denied to invalid credentials 401 Error
Error is 401.3 ACL restrictions....
what I tried is
I have tried to change IIS settings for IUSR_name
and also I tried editing in httpdconf file for CGI settings and restarted the server...
but all of no use
I am executing these scripts in CGI-BIN folder and outside of it..
I cant restore my back up. Get following warnings:
Warning:
php_version 5.3 is not supported. It will be replaced with php_version 5.4 for the following service plans: Unlimited, Admin Simple, Default Domain, Default Simple, Web Presence Builder, SiteBuilder
Warning:
python is not supported. It will be disabled for the following objects: Service plan 'Unlimited', Service plan 'Admin Simple', Service plan 'Default Domain', Service plan 'Default Simple'
Warning:
The component fail2ban is not installed. It will be disabled for the following objects: Server settings
Warning:
php_version 5.3 is not supported. It will be replaced with php_version 5.4 for the following websites: swen.flugzeugbilder.orgClick to expand...
I noticed that all my client websites were as slow as a snail snot before uninstalling perl and Python.
Is it normal that perl and python components slowing down IIS?
I search online, it is a common scenerio for those two to slow down IIS.
After I uninstalled perl and python as well as awstat, the site are working as fast as before.
I have a python script that generates images and is able to write them into a directory on the same web space
However, I would like the same script to write files into another directory located in the web space of another domain on the same server.
For example, script lives here...
/var/www/vhosts/domain1.com/httpdocs/scripts/myscript.py
this works...
/var/www/vhosts/domain1.com/httpdocs/scripts/images/
this fails...
/var/www/vhosts/domain2.com/httpdocs/web/images/
The directory structure already exists, so there is no need to create any new directories
I have tried setting permissions for the destination "images" directory to 777 and that didn't work.
Do I need to specify something within Plesk to enable it to write to another directory?
we use plesk 12 and server 2012 r2 i want know how can i disable php perl python cgi that resellers can not enable it for their users when add new plan, i do not want my users and users resellers access to php perl python cgi,
View 1 Replies View RelatedSince my /var partition is full, so I moved /var/lib/mysql to /backup/mysql/.
Seems all the files are copied and I changed my.cnf reboot mysql, but all the web sites using db is not working anymore..
I installed the MySQL binary packages in /usr/local/mysql/ after removing the MySQL RPM package. MySQL is functioning when I executed /usr/local/mysql/bin/safe_mysqld. I reinstalled MySQL before I installed PHP. When I used a PHP script to access a MySQL database, it outputs an error:
Code:
Warning: mysqli::mysqli() [function.mysqli-mysqli]: (HY000/2002): can't connect to local mysql server through socket /var/lib/mysql/mysql.sock in index.php on line 2
However, I installed MySQL in /usr/local/mysql, not in /var/lib/mysql. How do I fix MySQL?
For some reason mysql wont start, i have tried restarting mysql but it wont, it says FAILED. The mysql.sock file seems to have disappeared and i cannot find it anywhere.
View 5 Replies View RelatedI recently had a harddrive failure and luckliy I can still access certain directories on this failed drive. I can still access the /var/lib/mysql/ directory which holds all the users databases and have backed all these up separately using tar.
Now what I need to know is how do you restore these database files to another server? I tried simply untar'ing one of these to the new servers /var/lib/mysql/ direcotry and it stuffed Mysql up - it went offline. I had to get a cpanel tech to bring Mysql back online.
how can I get these database files to fully work on a new server?
Can someone recommended me some one with knowledge of mysql exploit or mysql injection, it seem to our VB forum have issue with database load..
View 5 Replies View RelatedI've been racking my brains with this problem for the last couple of months and have made zero progress. I've asked a lot of people if they know what might be wrong here, but none of them have any idea.
Basically, the problem is that any sort of service monitor I put on my server shows MySQL as being down/offline, even when I know for sure it's up and running perfectly fine. All other services report a green light.
The mysqld service is running on port 3306, which is open both inbound and outbound on my APF config, so as far as I can tell it's nothing to do with the firewall (I won't rule that out though).
The other odd thing is that MySQL shows a green light within WHM, but not anywhere else.
Does anyone know what might be wrong here? Am I missing something entirely fundamental and obvious?
my /var partition is full,
im not sure if any files i can remove to get more free space on /var partition.
because there are more free space on /home,
i think if i can move all the /var/lib/mysql to /home/mysql,
if yes,howcan i move it and do any change,
can let the sql data do not lose,
andrun well in the feature ?
I've rented a dedicated server that comes with Red Hat Enterprise Linux 4 and MySQL 3.23 but I need at least MySQL 4.1 or higher. My knowledge about GNU/Linux is very limited, so I've read some documents at mysql.com and now I think I have to follow these steps:
1. Uninstall MySQL 3.23 with this command line:
shell> rpm -e mysql-*.rpm
2. Install the server and client RPMs of MySQL 5.0:
shell> rpm -i MySQL-server-VERSION.i386.rpm
shell> rpm -i MySQL-client-VERSION.i386.rpm
I have a number of web sites on a dedicated server. Some of these web sites are a few years old. Are there any issues upgrading from MySQL 4.1 to 5.x? Are there web sites that may have compatibility issues?
View 6 Replies View RelatedI keep getting this error :
MySQL Error : MySQL server has gone away
How do I fix it?
my.cnf contents
Quote:
[mysqld]
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 800
key_buffer = 48M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 3000
thread_cache_size = 128
wait_timeout = 90
connect_timeout = 30
tmp_table_size = 128M
max_heap_table_size = 64M
max_allowed_packet = 256M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 4
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 48M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM
max_user_connections = 500
[mysqld_safe]
nice = -5
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
I have recently upgraded mysql server from 5.0.75 to 5.1.31 on my Ubuntu server 9.04 32 bit. After that when I am running phpmyadmin it is printing a warning :
Your PHP MySQL library version 5.0.75 differs from your MySQL server version 5.1.31.
I'm trying to upgrade from MySQL 4 to MySQL 5 for performance reasons. MySQL 4 was working great so I decided to just go ahead and upgrade to MySQL 5 via CPanel. The upgrade appeared to go fine however I now get this error when trying to start MySQL.
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
I went ahead and did a forced re-install of MySQL 5, but that didn't help. Apache has been updated as well since then, but that did no good, and the MySQL process isn't starting at all.
Its CENTOS with PHP5.
I am not sure what difference between --with-mysql and --with-mysql=/usr to compile php 4.4.7
because I get error message when I use --with-mysql=/usr
the error message is like Mysql header can not be found or similar thing.
it ok when I use --with-mysql
so, I am afraid that can I use php and mysql without problem by using --with-mysql?