The <cpanel Mysql="adddb('test')"> is now working (Thanks for correcting the case sensitive mistake)
1) However <cpanelif $CPERROR{'mysql'}> is not working even if the database is not created e.g. There is already an existing database rongup_test.
Now I create a database using :
<cpanel setvar="dprefix=../">
<cpanel Mysql="adddb('test')">
If there are errors it should be in this variable:
<cpanel print="$CPERROR{'mysql'}">
(I got this from the addb.html page)
But it prints no errors
2) I checked that Live PHP framework you posted above (even before you posted). But I refrained from using it as IT Had comments that it is going to be changed in the future and IT should be used only with the CPANEL VERSION it came with. Here is the Comments:
PHP Code:
# cpanel12 - cpanel.pl Copyright(c) 1997-2007 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
#
# You are free to include this module in your program as long as it is for use with cPanel.
# This module is only licensed for use with the version of cPanel it is distributed with.
#
# The backend xml api is going to change. If you ignore this message you will find
# that this module will not work in future versions. This module will be updated
# if the backend xml api changes. We will make all efforts to provide backwards
# compatibility, but if you do not use this module with any version of cpanel other then
# the one it is distributed with the results could be disasterous.
#
# That being said this module should insulate you from those changes if you use its api
# instead of the cpanel xml api which it translates to.
#
# FOR THE AVOIDANCE OF DOUBT: MAKE SURE YOU ONLY USE THIS MODULE WITH THE VERSION OF CPANEL
# THAT IT CAME WITH
#
#
So is it going to change every now and then with a new version of Cpanel or the output given by it will remain the same.
Also I will HAVE to RENAME 100's of pages to .LIVE.PHP which will not look so cool! Is there any other way of calling API2 from PHP or LivePHP is the stable one and can be used
3) Also I am having problems that <cpanel Mysql="adddb('.$dbname.')"> is executed before PHP is executed.
So the database user_dbname is created instead of the value in $dbname i.e a PHP variable!