Title: proc_open php problem
Last modified: April 16, 2017

---

# proc_open php problem

 *  [shimondadon](https://wordpress.org/support/users/shimondadon/)
 * (@shimondadon)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/proc_open-php-problem/)
 * hi all
 * when I run this php file:
 *     ```
       <?php
   
       add_shortcode( 'python', 'embed_python' );
   
       function embed_python( $attributes )
       {
           $data = shortcode_atts(
               [
                   'file' => 'hellow.py'
               ],
               $attributes
           );
   
           $handle = popen( __DIR__ . '/' . $data['file'], 'r' );
           $read = '';
   
           while ( ! feof( $handle ) )
           {
               $read .= fread( $handle, 2096 );
           }
   
           pclose( $handle );
   
           return $read;
       };
       embed_python('ddd');
       }
       ```
   
 * and I get this exception:
 * Warning: popen() has been disabled for security reasons in /storage/h10/305/1244305/
   public_html/wp-content/plugins/myfirstplugin/MyFirstPlugin.php on line 36
 * Warning: feof() expects parameter 1 to be resource, null given in /storage/h10/
   305/1244305/public_html/wp-content/plugins/myfirstplugin/MyFirstPlugin.php on
   line 39
 * Warning: fread() expects parameter 1 to be resource, null given in /storage/h10/
   305/1244305/public_html/wp-content/plugins/myfirstplugin/MyFirstPlugin.php on
   line 41
 * I try to run a python script. any one do it ?
    -  This topic was modified 9 years, 1 month ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
      Reason: put code in backticks

Viewing 1 replies (of 1 total)

 *  [Cybernetics Security](https://wordpress.org/support/users/cybernetics/)
 * (@cybernetics)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/proc_open-php-problem/#post-9034799)
 * **“Warning: popen() has been disabled for security reasons”**
 * Contact your hosting provider

Viewing 1 replies (of 1 total)

The topic ‘proc_open php problem’ is closed to new replies.

## Tags

 * [python](https://wordpress.org/support/topic-tag/python/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [shimondadon](https://wordpress.org/support/users/shimondadon/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/proc_open-php-problem/#post-9034799)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
