xrserver

Well-Known Member
Jan 18, 2008
47
0
56
Hey, I am new to this but I am writing a little plugin for my server but I keep getting this error when executing it. I know some people are going to say I need to get curl but I do have it and I have checked to make sure. I even ran other scripts that use curl so I have no idea why I am getting this. Does anybody know?

Fatal error: Call to undefined function curl_init() in /usr/local/cpanel/whostmgr/docroot/cgi/test/test.php on line 17
 

xrserver

Well-Known Member
Jan 18, 2008
47
0
56
Yes curl is compiled with php. In fact below you will find part of the output of a phpinfo file.

I cant figure out what is causing this, I have other php scripts and even this script works fine when in my home directory but when I put it in the /usr/local/cpanel/whostmgr/docroot/cgi/test/ folder i get this when trying to execute it.

'./configure' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-sockets' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-png-dir=/usr' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
 

xrserver

Well-Known Member
Jan 18, 2008
47
0
56
Ok just decided to use sockets for now and it works fine. I have another question though. This is a script I only want my master resellers to be able to access. So how would I check if they have master reseller access. I wanted to make it to where I have a folder with files each named after a user that I want to have access to this. How would I make my cgi script detect which user is logged in and the look for that file in the /access directory.
 
Last edited:

xrserver

Well-Known Member
Jan 18, 2008
47
0
56
Also does anyone know how I could make a form submit the data to my plugin in the background without actually going to the plugin. Right now when i hit submit it sends the data but it goes to the actually plugin and i need it to just submit the data but stay on the form page.

And also it be nice if someone could tell my how to make a loading bar appear while it is submitting the data.