Run CGI in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello !

Due to a limitation of PHP from my host (2mo on upload) I need to run a
cgi script to upload a file larger than 2MB ( PSUpload )

This script work good but i need to fill others information about the
file in mysql database with this upload form.

PHP_INI is locked by my host so i can't change MAX_FILE_SIZE with
ini_set function...
So, did anyone know how to execute this CGI perl script in php so i
could process mysql insert of the information and the file upload in
one unique php script ?

Thanks to all !


Re: Run CGI in php

On 13 Sep 2006 10:16:15 -0700, elgoomff wrote...
Quoted text here. Click to load it

You can usually run shell commands using "shell_exec()" or "system()". One
method returns complete output as a string while the other just outputs it.

If you need to manage form data in your Perl program, you might need to find a
creative way of jumping from one program to another or maybe considering
converting the exiting program to Perl is the MAX_FILE_SIZE is going to create
that much extra work for you.

Help a Community by Participating in Ours  
We donate your subscription fees to the charity you choose  
100% of your first month, 10% thereafter.

Re: Run CGI in php

Eddie a écrit :

Quoted text here. Click to load it
ind a

Thanks Eddie,

I dont need the form data in my form only use perl for upload the load.

Did u know the exec() or system() command to run the cgi that is store
in the upload.cgi in the cgi-bin folder of my host ?

Usually i only use exec() command for backup or restore mysql database.

thank u.


Site Timeline